Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import {
Row,
Col,
FormGroup,
ControlLabel,
FieldLevelHelp,
} from 'patternfly-react';
import { formattedText, required, minLength, maxLength } from '@entando/utils';
import FormattedMessage from 'ui/i18n/FormattedMessage';
import SwitchRenderer from 'ui/common/form/SwitchRenderer';
import FieldArrayDropDownMultiple from 'ui/common/FieldArrayDropDownMultiple';
const maxLength30 = maxLength(30);
const minLength3 = minLength(3);
const inputTextField = ({
input,
meta: { touched, error },
label,
append,
disabled,
}) => (
import {
formattedText,
required,
minLength,
maxLength,
isNumber,
} from '@entando/utils';
import FormattedMessageLocal from 'ui/i18n/FormattedMessage';
import SwitchRenderer from 'ui/common/form/SwitchRenderer';
import RenderTextInput from 'ui/common/form/RenderTextInput';
import RenderSelectInput from 'ui/common/form/RenderSelectInput';
import FormLabel from 'ui/common/form/FormLabel';
import DashboardConfigDatasource from 'ui/dashboard-config/common/components/DashboardConfigDatasource';
const maxLength30 = maxLength(30);
const minLength3 = minLength(3);
const renderField = (
name,
labelId,
placeholder,
validate,
labelSize,
append,
) => {
let requiredLabel = false;
if (validate) {
requiredLabel = !!validate.find(f => f.name === 'required');
}
let pholder = '';
if (placeholder) {
pholder = placeholder;
} else {
maxLength,
minLength,
matchPassword,
userFormText,
} from '@entando/utils';
import { FormattedMessage } from 'react-intl';
import RenderTextInput from 'ui/common/form/RenderTextInput';
import SwitchRenderer from 'ui/common/form/SwitchRenderer';
import RenderSelectInput from 'ui/common/form/RenderSelectInput';
import FormLabel from 'ui/common/form/FormLabel';
import FormSectionTitle from 'ui/common/form/FormSectionTitle';
const EDIT_MODE = 'edit';
const NEW_MODE = 'new';
const minLength4 = minLength(4);
const minLength8 = minLength(8);
const maxLength20 = maxLength(20);
export const renderStaticField = (field) => {
const { input, label, name } = field;
let fieldValue = input.value.title || input.value;
if (!input.value) {
fieldValue = <i>;
}
return (
<div>
<label>
{label}
</label>
</div></i>
minLength,
matchPassword,
userFormText,
} from '@entando/utils';
import { FormattedMessage } from 'react-intl';
import RenderTextInput from 'ui/common/form/RenderTextInput';
import SwitchRenderer from 'ui/common/form/SwitchRenderer';
import RenderSelectInput from 'ui/common/form/RenderSelectInput';
import FormLabel from 'ui/common/form/FormLabel';
import FormSectionTitle from 'ui/common/form/FormSectionTitle';
const EDIT_MODE = 'edit';
const NEW_MODE = 'new';
const minLength4 = minLength(4);
const minLength8 = minLength(8);
const maxLength20 = maxLength(20);
export const renderStaticField = (field) => {
const { input, label, name } = field;
let fieldValue = input.value.title || input.value;
if (!input.value) {
fieldValue = <i>;
}
return (
<div>
<label>
{label}
</label>
{fieldValue}</div></i>
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { Field, FormSection } from 'redux-form';
import { Tabs, Tab, InputGroup } from 'patternfly-react';
import { formattedText, required, minLength, maxLength } from '@entando/utils';
import RenderTextInput from 'ui/common/form/RenderTextInput';
import FormLabel from 'ui/common/form/FormLabel';
const maxLength30 = maxLength(30);
const minLength3 = minLength(3);
class DashboardWidgetTitle extends Component {
componentWillMount() {
this.props.onWillMount();
}
render() {
const tabs = this.props.languages
.sort(a => (a.isDefault ? -1 : 1))
.map((lang, i) => {
const validate = [minLength3, maxLength30];
if (lang.isDefault) {
validate.push(required);
}
return (
import React from 'react';
import PropTypes from 'prop-types';
import { Field, FieldArray } from 'redux-form';
import { Grid, Row, Col, InputGroup } from 'patternfly-react';
import DatasourceFormContainer from 'ui/widgets/common/form/containers/DatasourceFormContainer';
import { formattedText, minLength, maxLength } from '@entando/utils';
import RenderTextInput from 'ui/common/form/RenderTextInput';
import FormLabel from 'ui/common/form/FormLabel';
import FieldArrayDropDownMultiple from 'ui/common/FieldArrayDropDownMultiple';
import FormattedMessage from 'ui/i18n/FormattedMessage';
import IconMarker from './IconMarker';
const maxLength20 = maxLength(20);
const minLength3 = minLength(3);
const ICONS_MARKER_1 = [
'fa-map-marker',
'fa-map-pin',
'fa-circle',
'fa-exclamation-triangle',
'fa-flag',
'fa-star',
'fa-street-view',
'fa-bed',
];
const ICONS_MARKER_2 = [
'fa-male',
'fa-female',
'fa-car',
'fa-bus',