@evoke-platform/ui-components 1.0.0-dev.1.10.7 → 1.0.0-dev.1.10.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/published/components/custom/CriteriaBuilder/CriteriaBuilder.d.ts +2 -0
- package/dist/published/components/custom/CriteriaBuilder/CriteriaBuilder.js +22 -2
- package/dist/published/components/custom/FormField/BooleanSelect/BooleanSelect.js +2 -2
- package/dist/published/components/custom/FormField/DatePickerSelect/DatePickerSelect.js +2 -2
- package/dist/published/components/custom/FormField/FileUpload/FileUpload.js +2 -2
- package/dist/published/components/custom/FormField/FormField.d.ts +2 -0
- package/dist/published/components/custom/FormField/FormField.js +3 -2
- package/dist/published/components/custom/FormField/InputFieldComponent/InputFieldComponent.js +17 -5
- package/dist/published/components/custom/FormField/Select/Select.js +2 -2
- package/dist/published/components/custom/RepeatableField/RepeatableField.js +23 -15
- package/dist/published/stories/CriteriaBuilder.stories.d.ts +3 -0
- package/dist/published/stories/RepeatableField.stories.js +3 -3
- package/package.json +2 -1
@@ -15,11 +15,13 @@ export declare type ObjectProperty = {
|
|
15
15
|
declare type CustomValueEditorProps = ValueEditorProps & {
|
16
16
|
values?: AutocompleteOption[] | any[];
|
17
17
|
};
|
18
|
+
declare type Operator = ('=' | '=!' | '<' | '>' | '<=' | '>=' | 'contains' | 'beginsWith' | 'endsWith' | 'doesNotContain' | 'doesNotBeginWith' | 'doesNotEndWith' | 'null' | 'notNull' | 'in' | 'notIn' | 'between' | 'notBetween');
|
18
19
|
declare type CriteriaInputProps = {
|
19
20
|
properties: ObjectProperty[];
|
20
21
|
setCriteria: Function;
|
21
22
|
criteria?: Record<string, any>;
|
22
23
|
enablePresetValues?: boolean;
|
24
|
+
operators?: Operator[];
|
23
25
|
};
|
24
26
|
export declare const customValueEditorWithPresets: (props: CustomValueEditorProps) => JSX.Element;
|
25
27
|
export declare const customValueEditor: (props: CustomValueEditorProps) => JSX.Element;
|
@@ -5,6 +5,26 @@ import 'react-querybuilder/dist/query-builder.css';
|
|
5
5
|
import { RemoveCircleOutline } from '../../../icons';
|
6
6
|
import { Autocomplete, Button, DatePicker, IconButton, LocalizationProvider, MenuItem, TextField, Typography, } from '../../core';
|
7
7
|
import { Box } from '../../layout';
|
8
|
+
const ALL_OPERATORS = [
|
9
|
+
{ name: '=', label: '=' },
|
10
|
+
{ name: '!=', label: '!=' },
|
11
|
+
{ name: '<', label: '<' },
|
12
|
+
{ name: '>', label: '>' },
|
13
|
+
{ name: '<=', label: '<=' },
|
14
|
+
{ name: '>=', label: '>=' },
|
15
|
+
{ name: 'contains', label: 'contains' },
|
16
|
+
{ name: 'beginsWith', label: 'begins with' },
|
17
|
+
{ name: 'endsWith', label: 'ends with' },
|
18
|
+
{ name: 'doesNotContain', label: 'does not contain' },
|
19
|
+
{ name: 'doesNotBeginWith', label: 'does not begin with' },
|
20
|
+
{ name: 'doesNotEndWith', label: 'does not end with' },
|
21
|
+
{ name: 'null', label: 'is null' },
|
22
|
+
{ name: 'notNull', label: 'is not null' },
|
23
|
+
{ name: 'in', label: 'in' },
|
24
|
+
{ name: 'notIn', label: 'not in' },
|
25
|
+
{ name: 'between', label: 'between' },
|
26
|
+
{ name: 'notBetween', label: 'not between' },
|
27
|
+
];
|
8
28
|
const customSelector = (props) => {
|
9
29
|
var _a, _b;
|
10
30
|
const { options, value, handleOnChange, title } = props;
|
@@ -150,7 +170,7 @@ const determineValueEditor = (baseValueEditor, props) => {
|
|
150
170
|
return valueEditor;
|
151
171
|
};
|
152
172
|
const CriteriaBuilder = (props) => {
|
153
|
-
const { properties, criteria, setCriteria, enablePresetValues } = props;
|
173
|
+
const { properties, criteria, setCriteria, enablePresetValues, operators } = props;
|
154
174
|
const [query, setQuery] = useState(undefined);
|
155
175
|
useEffect(() => {
|
156
176
|
if (criteria) {
|
@@ -225,7 +245,7 @@ const CriteriaBuilder = (props) => {
|
|
225
245
|
}, controlClassnames: {
|
226
246
|
queryBuilder: 'queryBuilder-branches',
|
227
247
|
ruleGroup: 'container',
|
228
|
-
} }))));
|
248
|
+
}, operators: operators ? ALL_OPERATORS.filter((o) => operators.includes(o.name)) : ALL_OPERATORS }))));
|
229
249
|
}
|
230
250
|
return React.createElement(React.Fragment, null);
|
231
251
|
};
|
@@ -2,7 +2,7 @@ import React, { useEffect, useState } from 'react';
|
|
2
2
|
import { Autocomplete, TextField } from '../../../core';
|
3
3
|
import InputFieldComponent from '../InputFieldComponent/InputFieldComponent';
|
4
4
|
const BooleanSelect = (props) => {
|
5
|
-
const { property, defaultValue, error, readOnly, size, placeholder } = props;
|
5
|
+
const { property, defaultValue, error, errorMessage, readOnly, size, placeholder } = props;
|
6
6
|
const [value, setValue] = useState(defaultValue);
|
7
7
|
const id = property.id;
|
8
8
|
useEffect(() => {
|
@@ -22,6 +22,6 @@ const BooleanSelect = (props) => {
|
|
22
22
|
value: false,
|
23
23
|
},
|
24
24
|
];
|
25
|
-
return readOnly ? (React.createElement(InputFieldComponent, Object.assign({}, props))) : (React.createElement(Autocomplete, { id: id, renderInput: (params) => (React.createElement(TextField, Object.assign({}, params, { value: value, error: error, fullWidth: true, style: { background: 'white' }, size: size !== null && size !== void 0 ? size : 'medium', placeholder: placeholder }))), value: value, onChange: handleChange, inputValue: value, options: booleanOptions, disableClearable: true, style: { background: 'white', borderRadius: '8px' } }));
|
25
|
+
return readOnly ? (React.createElement(InputFieldComponent, Object.assign({}, props))) : (React.createElement(Autocomplete, { id: id, renderInput: (params) => (React.createElement(TextField, Object.assign({}, params, { value: value, error: error, errorMessage: errorMessage, fullWidth: true, style: { background: 'white' }, size: size !== null && size !== void 0 ? size : 'medium', placeholder: placeholder }))), value: value, onChange: handleChange, inputValue: value, options: booleanOptions, disableClearable: true, style: { background: 'white', borderRadius: '8px' } }));
|
26
26
|
};
|
27
27
|
export default BooleanSelect;
|
@@ -26,7 +26,7 @@ const asMonthDayYearFormat = (date) => {
|
|
26
26
|
}
|
27
27
|
};
|
28
28
|
const DatePickerSelect = (props) => {
|
29
|
-
const { property, defaultValue, error, readOnly, required, size } = props;
|
29
|
+
const { property, defaultValue, error, errorMessage, readOnly, required, size } = props;
|
30
30
|
const [value, setValue] = useState(asCalendarDate(defaultValue));
|
31
31
|
const id = property.id;
|
32
32
|
useEffect(() => {
|
@@ -37,6 +37,6 @@ const DatePickerSelect = (props) => {
|
|
37
37
|
props.onChange(id, date, property);
|
38
38
|
};
|
39
39
|
return readOnly ? (React.createElement(InputFieldComponent, Object.assign({}, Object.assign(Object.assign({}, props), { defaultValue: asMonthDayYearFormat(value) })))) : (React.createElement(LocalizationProvider, null,
|
40
|
-
React.createElement(DatePicker, { value: value, onChange: handleChange, inputFormat: "MM/dd/yyyy", renderInput: (params) => (React.createElement(TextField, Object.assign({}, params, { id: id, error: error, fullWidth: true, required: required, style: { background: 'white', borderRadius: '8px' }, size: size !== null && size !== void 0 ? size : 'medium' }))) })));
|
40
|
+
React.createElement(DatePicker, { value: value, onChange: handleChange, inputFormat: "MM/dd/yyyy", renderInput: (params) => (React.createElement(TextField, Object.assign({}, params, { id: id, error: error, errorMessage: errorMessage, fullWidth: true, required: required, style: { background: 'white', borderRadius: '8px' }, size: size !== null && size !== void 0 ? size : 'medium' }))) })));
|
41
41
|
};
|
42
42
|
export default DatePickerSelect;
|
@@ -5,7 +5,7 @@ import { Button, TextField } from '../../../core';
|
|
5
5
|
const FileUploadControl = (props) => {
|
6
6
|
var _a;
|
7
7
|
const [uploadedFile, setUploadedFile] = useState(undefined);
|
8
|
-
const { property, required, error } = props;
|
8
|
+
const { property, required, error, errorMessage } = props;
|
9
9
|
const id = property.id;
|
10
10
|
const styles = {
|
11
11
|
button: {
|
@@ -58,7 +58,7 @@ const FileUploadControl = (props) => {
|
|
58
58
|
})),
|
59
59
|
React.createElement(Grid, { item: true, flexGrow: 1 },
|
60
60
|
React.createElement("input", Object.assign({ disabled: true }, getInputProps())),
|
61
|
-
React.createElement(TextField, { sx: { '& fieldset': { border: 'none' } }, fullWidth: true, value: (_a = uploadedFile === null || uploadedFile === void 0 ? void 0 : uploadedFile.name) !== null && _a !== void 0 ? _a : (isDragActive ? 'Drop your file here' : 'File'), error: error, required: required })),
|
61
|
+
React.createElement(TextField, { sx: { '& fieldset': { border: 'none' } }, fullWidth: true, value: (_a = uploadedFile === null || uploadedFile === void 0 ? void 0 : uploadedFile.name) !== null && _a !== void 0 ? _a : (isDragActive ? 'Drop your file here' : 'File'), error: error, errorMessage: errorMessage, required: required })),
|
62
62
|
React.createElement(Grid, { item: true },
|
63
63
|
React.createElement(Button, { sx: Object.assign(Object.assign({}, styles.button), styles.selectFileBtn), onClick: () => handleSelectFile() }, uploadedFile ? 'Remove' : 'Select File'))));
|
64
64
|
};
|
@@ -3,12 +3,14 @@ export declare type FormFieldProps = {
|
|
3
3
|
onChange: Function;
|
4
4
|
defaultValue?: unknown;
|
5
5
|
error?: boolean;
|
6
|
+
errorMessage?: string;
|
6
7
|
required?: boolean;
|
7
8
|
readOnly?: boolean;
|
8
9
|
selectOptions?: Array<string>;
|
9
10
|
locale?: string;
|
10
11
|
size?: 'small' | 'medium';
|
11
12
|
placeholder?: string;
|
13
|
+
mask?: string;
|
12
14
|
};
|
13
15
|
export declare type ObjectProperty = {
|
14
16
|
id: string;
|
@@ -5,7 +5,7 @@ import FileUploadControl from './FileUpload/FileUpload';
|
|
5
5
|
import InputFieldComponent from './InputFieldComponent/InputFieldComponent';
|
6
6
|
import Select from './Select/Select';
|
7
7
|
const FormField = (props) => {
|
8
|
-
const { defaultValue, error, onChange, property, readOnly, selectOptions, required, size, placeholder } = props;
|
8
|
+
const { defaultValue, error, onChange, property, readOnly, selectOptions, required, size, placeholder, errorMessage, mask } = props;
|
9
9
|
const id = property.id;
|
10
10
|
let control;
|
11
11
|
const commonProps = {
|
@@ -13,6 +13,7 @@ const FormField = (props) => {
|
|
13
13
|
property,
|
14
14
|
onChange,
|
15
15
|
error,
|
16
|
+
errorMessage,
|
16
17
|
readOnly,
|
17
18
|
defaultValue,
|
18
19
|
selectOptions,
|
@@ -37,7 +38,7 @@ const FormField = (props) => {
|
|
37
38
|
control = React.createElement(Select, Object.assign({}, commonProps));
|
38
39
|
break;
|
39
40
|
default:
|
40
|
-
control = React.createElement(InputFieldComponent, Object.assign({}, commonProps));
|
41
|
+
control = React.createElement(InputFieldComponent, Object.assign({}, commonProps, { mask: mask }));
|
41
42
|
break;
|
42
43
|
}
|
43
44
|
return control;
|
package/dist/published/components/custom/FormField/InputFieldComponent/InputFieldComponent.js
CHANGED
@@ -12,6 +12,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
12
12
|
import React, { useEffect, useState } from 'react';
|
13
13
|
import NumberFormat from 'react-number-format';
|
14
14
|
import { Autocomplete, TextField } from '../../../core';
|
15
|
+
import InputMask from 'react-input-mask';
|
15
16
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
16
17
|
const NumericFormat = (props) => {
|
17
18
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
@@ -22,11 +23,11 @@ const NumericFormat = (props) => {
|
|
22
23
|
value: values.floatValue,
|
23
24
|
},
|
24
25
|
});
|
25
|
-
}, thousandSeparator: true, isNumericString: true, fixedDecimalScale: true, allowNegative:
|
26
|
+
}, thousandSeparator: true, isNumericString: true, fixedDecimalScale: true, allowNegative: false })));
|
26
27
|
};
|
27
28
|
const InputFieldComponent = (props) => {
|
28
29
|
var _a;
|
29
|
-
const { property, defaultValue, error, readOnly, required, size, placeholder } = props;
|
30
|
+
const { property, defaultValue, error, errorMessage, readOnly, required, size, placeholder, mask } = props;
|
30
31
|
const [value, setValue] = useState(defaultValue !== null && defaultValue !== void 0 ? defaultValue : '');
|
31
32
|
const [inputValue, setInputValue] = useState('');
|
32
33
|
const id = property.id;
|
@@ -59,9 +60,9 @@ const InputFieldComponent = (props) => {
|
|
59
60
|
//widgets had it like this, as strings w/isOptionEqualToValue
|
60
61
|
selectOptions.push(value);
|
61
62
|
}
|
62
|
-
return property.enum && !readOnly ? (React.createElement(Autocomplete, { id: id, options: selectOptions, onChange: handleSelectChange, renderInput: (params) => (React.createElement(TextField, Object.assign({}, params, { value: value, error: error, fullWidth: true, size: size !== null && size !== void 0 ? size : 'medium', placeholder: placeholder }))), disableClearable: true, value: value, isOptionEqualToValue: (option, value) => {
|
63
|
+
return property.enum && !readOnly ? (React.createElement(Autocomplete, { id: id, options: selectOptions, onChange: handleSelectChange, renderInput: (params) => (React.createElement(TextField, Object.assign({}, params, { value: value, error: error, errorMessage: errorMessage, fullWidth: true, size: size !== null && size !== void 0 ? size : 'medium', placeholder: placeholder }))), disableClearable: true, value: value, isOptionEqualToValue: (option, value) => {
|
63
64
|
return option.value === value;
|
64
|
-
}, error: error, required: required, inputValue: inputValue !== null && inputValue !== void 0 ? inputValue : '', onInputChange: handleInputValueChange })) : (React.createElement(TextField, { id: id, sx: readOnly
|
65
|
+
}, error: error, required: required, inputValue: inputValue !== null && inputValue !== void 0 ? inputValue : '', onInputChange: handleInputValueChange })) : !mask ? (React.createElement(TextField, { id: id, sx: readOnly
|
65
66
|
? {
|
66
67
|
'& .MuiOutlinedInput-notchedOutline': {
|
67
68
|
border: 'none',
|
@@ -71,6 +72,17 @@ const InputFieldComponent = (props) => {
|
|
71
72
|
backgroundColor: '#f4f6f8',
|
72
73
|
},
|
73
74
|
}
|
74
|
-
: undefined, error: error, value: value, onChange: !readOnly ? handleChange : undefined, InputProps: Object.assign(Object.assign({}, InputProps), { readOnly: readOnly }), required: required, fullWidth: true, placeholder: placeholder, style: { background: 'white', borderRadius: '8px' }, size: size !== null && size !== void 0 ? size : 'medium', type: property.type === 'integer' ? 'number' : 'text' }))
|
75
|
+
: undefined, error: error, errorMessage: errorMessage, value: value, onChange: !readOnly ? handleChange : undefined, InputProps: Object.assign(Object.assign({}, InputProps), { readOnly: readOnly }), required: required, fullWidth: true, placeholder: placeholder, style: { background: 'white', borderRadius: '8px' }, size: size !== null && size !== void 0 ? size : 'medium', type: property.type === 'integer' ? 'number' : 'text', multiline: property.type === 'string' && !!readOnly })) : (React.createElement(InputMask, { mask: mask, value: value, onChange: !readOnly ? handleChange : undefined, alwaysShowMask: true },
|
76
|
+
React.createElement(TextField, { id: id, sx: readOnly
|
77
|
+
? {
|
78
|
+
'& .MuiOutlinedInput-notchedOutline': {
|
79
|
+
border: 'none',
|
80
|
+
},
|
81
|
+
'.MuiOutlinedInput-root': {
|
82
|
+
borderRadius: '8px',
|
83
|
+
backgroundColor: '#f4f6f8',
|
84
|
+
},
|
85
|
+
}
|
86
|
+
: undefined, error: error, InputProps: Object.assign(Object.assign({}, InputProps), { readOnly: readOnly }), fullWidth: true, type: property.type === 'integer' ? 'number' : 'text' })));
|
75
87
|
};
|
76
88
|
export default InputFieldComponent;
|
@@ -2,7 +2,7 @@ import React, { useEffect, useState } from 'react';
|
|
2
2
|
import { Autocomplete, TextField } from '../../../core';
|
3
3
|
import InputFieldComponent from '../InputFieldComponent/InputFieldComponent';
|
4
4
|
const Select = (props) => {
|
5
|
-
const { property, defaultValue, error, readOnly, selectOptions, required, size } = props;
|
5
|
+
const { property, defaultValue, error, errorMessage, readOnly, selectOptions, required, size } = props;
|
6
6
|
const [value, setValue] = useState(defaultValue);
|
7
7
|
const [inputValue, setInputValue] = useState('');
|
8
8
|
useEffect(() => {
|
@@ -27,6 +27,6 @@ const Select = (props) => {
|
|
27
27
|
setInputValue(selectValue);
|
28
28
|
}
|
29
29
|
};
|
30
|
-
return readOnly ? (React.createElement(InputFieldComponent, Object.assign({}, props))) : (React.createElement(Autocomplete, { multiple: (property === null || property === void 0 ? void 0 : property.type) === 'array' ? true : false, id: id, renderInput: (params) => React.createElement(TextField, Object.assign({}, params, { value: value, fullWidth: true })), value: value, onChange: handleChange, options: (property === null || property === void 0 ? void 0 : property.type) === 'array' ? property === null || property === void 0 ? void 0 : property.enum : selectOptions, disableClearable: true, inputValue: inputValue !== null && inputValue !== void 0 ? inputValue : '', error: error, required: required, onInputChange: handleInputValueChange, filterOptions: (option) => { var _a; return (property === null || property === void 0 ? void 0 : property.type) === 'array' ? (_a = property === null || property === void 0 ? void 0 : property.enum) === null || _a === void 0 ? void 0 : _a.filter((item) => item !== option.value) : option; }, size: size }));
|
30
|
+
return readOnly ? (React.createElement(InputFieldComponent, Object.assign({}, props))) : (React.createElement(Autocomplete, { multiple: (property === null || property === void 0 ? void 0 : property.type) === 'array' ? true : false, id: id, renderInput: (params) => React.createElement(TextField, Object.assign({}, params, { value: value, fullWidth: true })), value: value, onChange: handleChange, options: (property === null || property === void 0 ? void 0 : property.type) === 'array' ? property === null || property === void 0 ? void 0 : property.enum : selectOptions, disableClearable: true, inputValue: inputValue !== null && inputValue !== void 0 ? inputValue : '', error: error, errorMessage: errorMessage, required: required, onInputChange: handleInputValueChange, filterOptions: (option) => { var _a; return (property === null || property === void 0 ? void 0 : property.type) === 'array' ? (_a = property === null || property === void 0 ? void 0 : property.enum) === null || _a === void 0 ? void 0 : _a.filter((item) => item !== option.value) : option; }, size: size }));
|
31
31
|
};
|
32
32
|
export default Select;
|
@@ -12,13 +12,13 @@ const styles = {
|
|
12
12
|
display: 'none',
|
13
13
|
},
|
14
14
|
'& .Mui-expanded': {
|
15
|
-
borderRadius: '8px 8px 0 0'
|
16
|
-
}
|
15
|
+
borderRadius: '8px 8px 0 0',
|
16
|
+
},
|
17
17
|
},
|
18
18
|
accordionSummary: {
|
19
19
|
background: '#F4F6F8',
|
20
20
|
borderRadius: '8px',
|
21
|
-
maxHeight: '30px'
|
21
|
+
maxHeight: '30px',
|
22
22
|
},
|
23
23
|
accordionDetails: {
|
24
24
|
display: 'flex',
|
@@ -91,20 +91,28 @@ export default function RepeatableField(props) {
|
|
91
91
|
const handleAddSelectedField = () => {
|
92
92
|
createInitialStateForFields(selectedField.length);
|
93
93
|
};
|
94
|
+
const displayHeaders = (index) => {
|
95
|
+
var _a;
|
96
|
+
if (dynamicHeaders === null || dynamicHeaders === void 0 ? void 0 : dynamicHeaders.displayTitle) {
|
97
|
+
if (dynamicHeaders === null || dynamicHeaders === void 0 ? void 0 : dynamicHeaders.mapping) {
|
98
|
+
return (_a = selectedField[index][dynamicHeaders === null || dynamicHeaders === void 0 ? void 0 : dynamicHeaders.field]) === null || _a === void 0 ? void 0 : _a[`${dynamicHeaders.mapping}`];
|
99
|
+
}
|
100
|
+
else {
|
101
|
+
return selectedField[index][dynamicHeaders === null || dynamicHeaders === void 0 ? void 0 : dynamicHeaders.field] || dynamicHeaders.displayTitle;
|
102
|
+
}
|
103
|
+
}
|
104
|
+
return `Item ${index + 1}`;
|
105
|
+
};
|
94
106
|
return (React.createElement(UIThemeProvider, null,
|
95
107
|
React.createElement("div", null, selectedField === null || selectedField === void 0 ? void 0 :
|
96
|
-
selectedField.map((field, index) => {
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
React.createElement(Button, { variant: "outlined", color: "error", size: "small", sx: { margin: '15px 0 0 0', borderRadius: '8px', width: 'max-content' }, onClick: () => handleRemoveSelectField(index) },
|
105
|
-
"Delete ",
|
106
|
-
(dynamicHeaders === null || dynamicHeaders === void 0 ? void 0 : dynamicHeaders.displayTitle) || 'Item'))));
|
107
|
-
}),
|
108
|
+
selectedField.map((field, index) => (React.createElement(Accordion, { key: index, elevation: 0, sx: styles.accordion },
|
109
|
+
React.createElement(AccordionSummary, { expandIcon: React.createElement(ExpandMoreIcon, null), "aria-controls": "panel1a-content", id: "panel1a-header", sx: styles.accordionSummary, color: '#F4F6F8' },
|
110
|
+
React.createElement(Typography, { sx: { padding: '4px' } }, displayHeaders(index))),
|
111
|
+
React.createElement(AccordionDetails, { sx: styles.accordionDetails },
|
112
|
+
React.createElement(React.Fragment, null, children(handler, index, selectedField)),
|
113
|
+
React.createElement(Button, { variant: "outlined", color: "error", size: "small", sx: { margin: '15px 0 0 0', borderRadius: '8px', width: 'max-content' }, onClick: () => handleRemoveSelectField(index) },
|
114
|
+
"Delete ",
|
115
|
+
(dynamicHeaders === null || dynamicHeaders === void 0 ? void 0 : dynamicHeaders.displayTitle) || 'Item'))))),
|
108
116
|
React.createElement(Button, { variant: "outlined", color: "primary", size: "large", startIcon: React.createElement(AddIcon, null), fullWidth: true, sx: { margin: '15px 0px', borderRadius: '8px' }, onClick: () => handleAddSelectedField() },
|
109
117
|
"Add ",
|
110
118
|
(dynamicHeaders === null || dynamicHeaders === void 0 ? void 0 : dynamicHeaders.displayTitle) || 'Item'))));
|
@@ -5,6 +5,7 @@ declare const _default: ComponentMeta<(props: {
|
|
5
5
|
setCriteria: Function;
|
6
6
|
criteria?: Record<string, any> | undefined;
|
7
7
|
enablePresetValues?: boolean | undefined;
|
8
|
+
operators?: ("endsWith" | "in" | "=" | "=!" | "<" | ">" | "<=" | ">=" | "contains" | "beginsWith" | "doesNotContain" | "doesNotBeginWith" | "doesNotEndWith" | "null" | "notNull" | "notIn" | "between" | "notBetween")[] | undefined;
|
8
9
|
}) => JSX.Element>;
|
9
10
|
export default _default;
|
10
11
|
export declare const CriteriaBuilder: ComponentStory<(props: {
|
@@ -12,10 +13,12 @@ export declare const CriteriaBuilder: ComponentStory<(props: {
|
|
12
13
|
setCriteria: Function;
|
13
14
|
criteria?: Record<string, any> | undefined;
|
14
15
|
enablePresetValues?: boolean | undefined;
|
16
|
+
operators?: ("endsWith" | "in" | "=" | "=!" | "<" | ">" | "<=" | ">=" | "contains" | "beginsWith" | "doesNotContain" | "doesNotBeginWith" | "doesNotEndWith" | "null" | "notNull" | "notIn" | "between" | "notBetween")[] | undefined;
|
15
17
|
}) => JSX.Element>;
|
16
18
|
export declare const CriteriaBuilderPresetValues: ComponentStory<(props: {
|
17
19
|
properties: import("../components/custom/CriteriaBuilder/CriteriaBuilder").ObjectProperty[];
|
18
20
|
setCriteria: Function;
|
19
21
|
criteria?: Record<string, any> | undefined;
|
20
22
|
enablePresetValues?: boolean | undefined;
|
23
|
+
operators?: ("endsWith" | "in" | "=" | "=!" | "<" | ">" | "<=" | ">=" | "contains" | "beginsWith" | "doesNotContain" | "doesNotBeginWith" | "doesNotEndWith" | "null" | "notNull" | "notIn" | "between" | "notBetween")[] | undefined;
|
21
24
|
}) => JSX.Element>;
|
@@ -8,7 +8,7 @@ const Template = (props) => {
|
|
8
8
|
const dynamicHeaders = {
|
9
9
|
field: 'movies',
|
10
10
|
displayTitle: 'Condition',
|
11
|
-
mapping: '
|
11
|
+
mapping: 'value',
|
12
12
|
};
|
13
13
|
const top100Films = [
|
14
14
|
{ label: 'The Shawshank Redemption', value: 'The Shawshank Redemption' },
|
@@ -20,8 +20,8 @@ const Template = (props) => {
|
|
20
20
|
{ label: 'Pulp Fiction', value: 'Pulp Fiction' },
|
21
21
|
];
|
22
22
|
const defaultValues = {
|
23
|
-
textField: '
|
24
|
-
checkbox: false
|
23
|
+
textField: 'Default text',
|
24
|
+
checkbox: false,
|
25
25
|
};
|
26
26
|
return (React.createElement(CustomRepeatableField, Object.assign({}, props, { dynamicHeaders: dynamicHeaders }), (handler, index, selectedField) => {
|
27
27
|
var _a, _b, _c;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@evoke-platform/ui-components",
|
3
|
-
"version": "1.0.0-dev.1.10.
|
3
|
+
"version": "1.0.0-dev.1.10.9",
|
4
4
|
"description": "",
|
5
5
|
"main": "dist/published/index.js",
|
6
6
|
"module": "dist/published/index.js",
|
@@ -72,6 +72,7 @@
|
|
72
72
|
"@react-querybuilder/material": "^5.4.1",
|
73
73
|
"lodash-es": "^4.17.21",
|
74
74
|
"react-dropzone": "^14.2.2",
|
75
|
+
"react-input-mask": "^3.0.0-alpha.2",
|
75
76
|
"react-number-format": "^4.9.3",
|
76
77
|
"react-querybuilder": "^6.0.2"
|
77
78
|
},
|