@evoke-platform/ui-components 1.0.0-dev.136 → 1.0.0-dev.138
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/core/Autocomplete/Autocomplete.js +3 -3
- package/dist/published/components/core/TextField/TextField.js +3 -4
- package/dist/published/components/custom/CriteriaBuilder/CriteriaBuilder.js +12 -12
- package/dist/published/components/custom/FormField/BooleanSelect/BooleanSelect.js +1 -1
- package/dist/published/components/custom/FormField/DatePickerSelect/DatePickerSelect.js +1 -1
- package/dist/published/components/custom/FormField/InputFieldComponent/InputFieldComponent.js +9 -11
- package/dist/published/components/custom/Menubar/Menubar.js +4 -2
- package/dist/published/components/custom/MultiSelect/MultiSelect.js +20 -13
- package/dist/published/components/custom/MultiSelect/SortableItem.js +8 -4
- package/dist/published/components/custom/RepeatableField/RepeatableField.js +4 -4
- package/dist/published/icons/custom/TrashCan.d.ts +2 -2
- package/dist/published/icons/custom/TrashCan.js +6 -7
- package/dist/published/index.d.ts +1 -1
- package/dist/published/index.js +1 -1
- package/package.json +12 -3
|
@@ -29,9 +29,9 @@ const Autocomplete = (props) => {
|
|
|
29
29
|
if (!!props.label && props.labelPlacement === 'outside-top') {
|
|
30
30
|
return (React.createElement(UIThemeProvider, null,
|
|
31
31
|
React.createElement(InputLabel, { "data-testid": "label-outside", htmlFor: (_b = (_a = props.label) === null || _a === void 0 ? void 0 : _a.toString()) !== null && _b !== void 0 ? _b : '', sx: { paddingBottom: '0px', fontSize: '14px' } }, (_c = props.label) !== null && _c !== void 0 ? _c : '',
|
|
32
|
-
|
|
33
|
-
props.required ? React.createElement(
|
|
34
|
-
props.instructionText && React.createElement(Typography, { fontSize: '10px', lineHeight: '14px' }, props.instructionText),
|
|
32
|
+
' ',
|
|
33
|
+
props.required ? (React.createElement(Typography, { sx: { color: 'red', fontSize: '14px' }, component: 'span' }, "*")) : null),
|
|
34
|
+
props.instructionText && (React.createElement(Typography, { fontSize: '10px', lineHeight: '14px' }, props.instructionText)),
|
|
35
35
|
React.createElement(MUIAutocomplete, Object.assign({}, props, { sx: Object.assign({ '& fieldset': { borderRadius: '8px', borderColor: props.error ? 'red' : undefined } }, props.sx), options: sortedOptions, popupIcon: (_d = props.popupIcon) !== null && _d !== void 0 ? _d : React.createElement(ExpandMore, null) })),
|
|
36
36
|
props.error && React.createElement(FieldError, { required: props.required, label: props.errorMessage })));
|
|
37
37
|
}
|
|
@@ -20,10 +20,9 @@ const TextField = (props) => {
|
|
|
20
20
|
};
|
|
21
21
|
return (React.createElement(UIThemeProvider, null, variant === 'outlined' && !!label && labelPlacement === 'outside-top' ? (React.createElement(React.Fragment, null,
|
|
22
22
|
React.createElement(InputLabel, { "data-testid": "label-outside", htmlFor: (_a = label === null || label === void 0 ? void 0 : label.toString()) !== null && _a !== void 0 ? _a : '', sx: { paddingBottom: instructionText ? '0px' : '3px', fontSize: '14px' } }, label !== null && label !== void 0 ? label : '',
|
|
23
|
-
|
|
24
|
-
props.required ? React.createElement(
|
|
25
|
-
instructionText &&
|
|
26
|
-
React.createElement(Typography, { variant: 'caption' }, instructionText),
|
|
23
|
+
' ',
|
|
24
|
+
props.required ? (React.createElement(Typography, { sx: { color: 'red', fontSize: '14px' }, component: 'span' }, "*")) : null),
|
|
25
|
+
instructionText && React.createElement(Typography, { variant: 'caption' }, instructionText),
|
|
27
26
|
React.createElement(MUITextField, Object.assign({}, props, { label: null, inputProps: { readOnly: readOnly, 'aria-readonly': !!readOnly }, sx: readOnly
|
|
28
27
|
? readOnlyStyles
|
|
29
28
|
: Object.assign({ '& fieldset': { borderRadius: '8px' } }, props.sx) })),
|
|
@@ -57,7 +57,7 @@ const customSelector = (props) => {
|
|
|
57
57
|
return option === value;
|
|
58
58
|
}, onChange: (event, newValue) => {
|
|
59
59
|
handleOnChange(newValue === null || newValue === void 0 ? void 0 : newValue.value.name);
|
|
60
|
-
}, renderInput: (params) => React.createElement(TextField, Object.assign({}, params, { size: "small" })),
|
|
60
|
+
}, renderInput: (params) => React.createElement(TextField, Object.assign({}, params, { size: "small" })), sx: { width: width }, disableClearable: true }));
|
|
61
61
|
};
|
|
62
62
|
const customCombinator = (props) => {
|
|
63
63
|
const { options, value, handleOnChange } = props;
|
|
@@ -86,7 +86,7 @@ const customButton = (props) => {
|
|
|
86
86
|
buttonLabel = '+ Condition';
|
|
87
87
|
break;
|
|
88
88
|
}
|
|
89
|
-
return (React.createElement(Button, { variant: "contained", onClick: handleOnClick, size: "small",
|
|
89
|
+
return (React.createElement(Button, { variant: "contained", onClick: handleOnClick, size: "small", sx: { backgroundColor: '#ebf4f8', color: '#0678a9', boxShadow: 'none' } }, buttonLabel));
|
|
90
90
|
};
|
|
91
91
|
const customDelete = (props) => {
|
|
92
92
|
const { handleOnClick } = props;
|
|
@@ -113,11 +113,11 @@ export const customValueEditorWithPresets = (props) => {
|
|
|
113
113
|
}, disabled: ['null', 'notNull'].includes(props.operator), renderInput: (params) => (React.createElement(TextField, Object.assign({}, params, { size: "small", placeholder: 'Value', readOnly: value === '{{user.id}}', onChange: (event) => {
|
|
114
114
|
handleOnChange(event.target.value);
|
|
115
115
|
} }))), renderOption: (props, option) => {
|
|
116
|
-
return (React.createElement(MenuItem, Object.assign({}, props, {
|
|
116
|
+
return (React.createElement(MenuItem, Object.assign({}, props, { sx: { padding: '0px 8px' } }),
|
|
117
117
|
React.createElement(Box, { padding: 0, margin: 0 },
|
|
118
118
|
React.createElement(Typography, { fontSize: '14px', fontWeight: 500 }, option.label),
|
|
119
119
|
React.createElement(Typography, { fontSize: '14px', fontWeight: 500, color: 'rgba(145, 158, 171, 1)' }, option.value.sublabel))));
|
|
120
|
-
}, componentsProps: { popper: { style: { width: 'fit-content' } } },
|
|
120
|
+
}, componentsProps: { popper: { style: { width: 'fit-content' } } }, sx: { width: '33%' } }));
|
|
121
121
|
return determineValueEditor(valueEditor, props);
|
|
122
122
|
};
|
|
123
123
|
export const customValueEditor = (props) => {
|
|
@@ -149,7 +149,7 @@ const determineValueEditor = (baseValueEditor, props) => {
|
|
|
149
149
|
valueEditor = (React.createElement(LocalizationProvider, null,
|
|
150
150
|
React.createElement(DatePicker, { disabled: disabled, value: disabled ? null : value, onChange: (value) => {
|
|
151
151
|
handleOnChange(value);
|
|
152
|
-
}, renderInput: (params) => (React.createElement(TextField, Object.assign({}, params, { placeholder: "Value", size: "small",
|
|
152
|
+
}, renderInput: (params) => (React.createElement(TextField, Object.assign({}, params, { placeholder: "Value", size: "small", sx: { width: '33%' } }))) })));
|
|
153
153
|
break;
|
|
154
154
|
case 'integer':
|
|
155
155
|
{
|
|
@@ -163,7 +163,7 @@ const determineValueEditor = (baseValueEditor, props) => {
|
|
|
163
163
|
handleOnChange(uniqueSelections.length ? uniqueSelections : '');
|
|
164
164
|
}, isOptionEqualToValue: (option, value) => {
|
|
165
165
|
return option === value;
|
|
166
|
-
}, renderInput: (params) => (React.createElement(TextField, Object.assign({ label: params.label }, params, { size: "small" }))),
|
|
166
|
+
}, renderInput: (params) => (React.createElement(TextField, Object.assign({ label: params.label }, params, { size: "small" }))), sx: { width: '33%' } }));
|
|
167
167
|
}
|
|
168
168
|
else if (type === 'select' && values) {
|
|
169
169
|
valueEditor = (React.createElement(Autocomplete, { freeSolo: true, options: values, multiple: ['in', 'notIn'].includes(operator), value: disabled ? '' : value, onChange: (event, newValue) => {
|
|
@@ -172,7 +172,7 @@ const determineValueEditor = (baseValueEditor, props) => {
|
|
|
172
172
|
return option === value;
|
|
173
173
|
}, renderInput: (params) => (React.createElement(TextField, Object.assign({}, params, { size: "small", placeholder: 'Value', readOnly: value === '{{user.id}}', onChange: (event) => {
|
|
174
174
|
handleOnChange(event.target.value);
|
|
175
|
-
} }))),
|
|
175
|
+
} }))), sx: { width: '33%' }, disableClearable: true }));
|
|
176
176
|
}
|
|
177
177
|
}
|
|
178
178
|
else {
|
|
@@ -194,7 +194,7 @@ const determineValueEditor = (baseValueEditor, props) => {
|
|
|
194
194
|
handleOnChange(uniqueSelections.length ? uniqueSelections : '');
|
|
195
195
|
}, isOptionEqualToValue: (option, value) => {
|
|
196
196
|
return option === value;
|
|
197
|
-
}, renderInput: (params) => (React.createElement(TextField, Object.assign({ label: params.label }, params, { size: "small" }))),
|
|
197
|
+
}, renderInput: (params) => (React.createElement(TextField, Object.assign({ label: params.label }, params, { size: "small" }))), sx: { width: '33%' } }));
|
|
198
198
|
}
|
|
199
199
|
else if (type === 'select' && values) {
|
|
200
200
|
valueEditor = (React.createElement(Autocomplete, { freeSolo: true, options: values, multiple: ['in', 'notIn'].includes(operator), value: disabled ? '' : value, onChange: (event, newValue) => {
|
|
@@ -203,7 +203,7 @@ const determineValueEditor = (baseValueEditor, props) => {
|
|
|
203
203
|
return option === value;
|
|
204
204
|
}, renderInput: (params) => (React.createElement(TextField, Object.assign({}, params, { size: "small", placeholder: 'Value', readOnly: value === '{{user.id}}', onChange: (event) => {
|
|
205
205
|
handleOnChange(event.target.value);
|
|
206
|
-
} }))),
|
|
206
|
+
} }))), sx: { width: '33%' }, disableClearable: true }));
|
|
207
207
|
}
|
|
208
208
|
}
|
|
209
209
|
else {
|
|
@@ -222,7 +222,7 @@ const determineValueEditor = (baseValueEditor, props) => {
|
|
|
222
222
|
handleOnChange(uniqueSelections.length ? uniqueSelections : '');
|
|
223
223
|
}, isOptionEqualToValue: (option, value) => {
|
|
224
224
|
return option === value;
|
|
225
|
-
}, renderInput: (params) => React.createElement(TextField, Object.assign({ label: params.label }, params, { size: "small" })),
|
|
225
|
+
}, renderInput: (params) => React.createElement(TextField, Object.assign({ label: params.label }, params, { size: "small" })), sx: { width: '33%' } }));
|
|
226
226
|
break;
|
|
227
227
|
case 'string':
|
|
228
228
|
if ((operator === 'in' || operator === 'notIn') && type === 'select' && values) {
|
|
@@ -233,7 +233,7 @@ const determineValueEditor = (baseValueEditor, props) => {
|
|
|
233
233
|
handleOnChange(uniqueSelections.length ? uniqueSelections : '');
|
|
234
234
|
}, isOptionEqualToValue: (option, value) => {
|
|
235
235
|
return option === value;
|
|
236
|
-
}, renderInput: (params) => React.createElement(TextField, Object.assign({ label: params.label }, params, { size: "small" })),
|
|
236
|
+
}, renderInput: (params) => React.createElement(TextField, Object.assign({ label: params.label }, params, { size: "small" })), sx: { width: '33%' } }));
|
|
237
237
|
}
|
|
238
238
|
else if (type === 'select' && values) {
|
|
239
239
|
valueEditor = (React.createElement(Autocomplete, { freeSolo: true, options: values, multiple: ['in', 'notIn'].includes(operator), value: disabled ? '' : value, onChange: (event, newValue) => {
|
|
@@ -242,7 +242,7 @@ const determineValueEditor = (baseValueEditor, props) => {
|
|
|
242
242
|
return option === value;
|
|
243
243
|
}, renderInput: (params) => (React.createElement(TextField, Object.assign({}, params, { size: "small", placeholder: 'Value', readOnly: value === '{{user.id}}', onChange: (event) => {
|
|
244
244
|
handleOnChange(event.target.value);
|
|
245
|
-
} }))),
|
|
245
|
+
} }))), sx: { width: '33%' }, disableClearable: true }));
|
|
246
246
|
}
|
|
247
247
|
break;
|
|
248
248
|
}
|
|
@@ -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, errorMessage: errorMessage, onBlur: onBlur, fullWidth: true,
|
|
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, onBlur: onBlur, fullWidth: true, sx: { background: 'white' }, size: size !== null && size !== void 0 ? size : 'medium', placeholder: placeholder }))), value: value, onChange: handleChange, inputValue: value, options: booleanOptions, disableClearable: true, sx: { background: 'white', borderRadius: '8px' } }));
|
|
26
26
|
};
|
|
27
27
|
export default BooleanSelect;
|
|
@@ -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, errorMessage: errorMessage, onBlur: onBlur, fullWidth: true, required: required,
|
|
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, onBlur: onBlur, fullWidth: true, required: required, sx: { background: 'white', borderRadius: '8px' }, size: size !== null && size !== void 0 ? size : 'medium' }))) })));
|
|
41
41
|
};
|
|
42
42
|
export default DatePickerSelect;
|
package/dist/published/components/custom/FormField/InputFieldComponent/InputFieldComponent.js
CHANGED
|
@@ -62,17 +62,15 @@ const InputFieldComponent = (props) => {
|
|
|
62
62
|
}
|
|
63
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, onBlur: onBlur, size: size !== null && size !== void 0 ? size : 'medium', placeholder: placeholder }))), disableClearable: true, value: value, isOptionEqualToValue: (option, value) => {
|
|
64
64
|
return option.value === value;
|
|
65
|
-
}, error: error, required: required, inputValue: inputValue !== null && inputValue !== void 0 ? inputValue : '', onInputChange: handleInputValueChange })) : !mask ? (React.createElement(TextField, { id: id, sx: readOnly
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
'
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
}
|
|
75
|
-
: undefined, error: error, errorMessage: errorMessage, value: value, onChange: !readOnly ? handleChange : undefined, InputProps: Object.assign(Object.assign({}, InputProps), { readOnly: readOnly }), required: required, fullWidth: true, onBlur: onBlur, 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 && isMultiLineText, rows: isMultiLineText ? (rows ? rows : 3) : undefined })) : (React.createElement(InputMask, { mask: mask, maskChar: inputMaskPlaceholderChar !== null && inputMaskPlaceholderChar !== void 0 ? inputMaskPlaceholderChar : '_', value: value, onChange: !readOnly ? handleChange : undefined, onBlur: onBlur, alwaysShowMask: true }, () => (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: Object.assign({ background: 'white', borderRadius: '8px' }, (readOnly && {
|
|
66
|
+
'& .MuiOutlinedInput-notchedOutline': {
|
|
67
|
+
border: 'none',
|
|
68
|
+
},
|
|
69
|
+
'.MuiOutlinedInput-root': {
|
|
70
|
+
borderRadius: '8px',
|
|
71
|
+
backgroundColor: '#f4f6f8',
|
|
72
|
+
},
|
|
73
|
+
})), error: error, errorMessage: errorMessage, value: value, onChange: !readOnly ? handleChange : undefined, InputProps: Object.assign(Object.assign({}, InputProps), { readOnly: readOnly }), required: required, fullWidth: true, onBlur: onBlur, placeholder: placeholder, size: size !== null && size !== void 0 ? size : 'medium', type: property.type === 'integer' ? 'number' : 'text', multiline: property.type === 'string' && !readOnly && isMultiLineText, rows: isMultiLineText ? (rows ? rows : 3) : undefined })) : (React.createElement(InputMask, { mask: mask, maskChar: inputMaskPlaceholderChar !== null && inputMaskPlaceholderChar !== void 0 ? inputMaskPlaceholderChar : '_', value: value, onChange: !readOnly ? handleChange : undefined, onBlur: onBlur, alwaysShowMask: true }, () => (React.createElement(TextField, { id: id, sx: readOnly
|
|
76
74
|
? {
|
|
77
75
|
'& .MuiOutlinedInput-notchedOutline': {
|
|
78
76
|
border: 'none',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { AppBar, Toolbar, Box, Typography } from '@mui/material';
|
|
2
|
+
import { AppBar, Toolbar, Box, Typography, CardMedia } from '@mui/material';
|
|
3
3
|
import { Notifications as NotificationIcon } from '@mui/icons-material';
|
|
4
4
|
import UIThemeProvider from '../../../theme';
|
|
5
5
|
const classes = {
|
|
@@ -9,6 +9,8 @@ const classes = {
|
|
|
9
9
|
},
|
|
10
10
|
logo: {
|
|
11
11
|
paddingRight: '16px',
|
|
12
|
+
height: '70px',
|
|
13
|
+
width: 'inherit',
|
|
12
14
|
},
|
|
13
15
|
};
|
|
14
16
|
export default function MenuBar(props) {
|
|
@@ -16,7 +18,7 @@ export default function MenuBar(props) {
|
|
|
16
18
|
return (React.createElement(UIThemeProvider, null,
|
|
17
19
|
React.createElement(AppBar, { color: "inherit", position: "fixed", elevation: 0, sx: { zIndex: (theme) => theme.zIndex.drawer + 1, borderBottom: '1px solid #919EAB3D' } },
|
|
18
20
|
React.createElement(Toolbar, { sx: { justifyContent: 'space-between' } },
|
|
19
|
-
React.createElement(Box, { sx: classes.title }, !props.envName ? (React.createElement(
|
|
21
|
+
React.createElement(Box, { sx: classes.title }, !props.envName ? (React.createElement(CardMedia, { component: 'img', src: props.logo, alt: props.logoAltText, sx: classes.logo })) : (React.createElement(Box, { mt: 2 },
|
|
20
22
|
React.createElement(Typography, { variant: "h5" }, props === null || props === void 0 ? void 0 :
|
|
21
23
|
props.envName,
|
|
22
24
|
" ")))),
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React, { useEffect, useState } from 'react';
|
|
2
|
-
import { Box, FormControlLabel, Grid, InputAdornment, Switch, TextField, Typography } from '@mui/material';
|
|
3
|
-
import
|
|
4
|
-
import { Search } from '@mui/icons-material';
|
|
2
|
+
import { Box, FormControlLabel, Grid, InputAdornment, Switch, TextField, Typography, IconButton } from '@mui/material';
|
|
3
|
+
import { Search, DragHandleOutlined } from '@mui/icons-material';
|
|
5
4
|
import UIThemeProvider from '../../../theme';
|
|
6
5
|
import { sortBy } from 'lodash';
|
|
7
6
|
import { DndContext, closestCenter, KeyboardSensor, PointerSensor, useSensor, useSensors } from '@dnd-kit/core';
|
|
@@ -24,6 +23,17 @@ const styles = {
|
|
|
24
23
|
switch: {
|
|
25
24
|
padding: '1px 8px',
|
|
26
25
|
},
|
|
26
|
+
dragHandleBox: {
|
|
27
|
+
display: 'flex',
|
|
28
|
+
flexDirection: 'row',
|
|
29
|
+
alignItems: 'center',
|
|
30
|
+
},
|
|
31
|
+
dragHandle: {
|
|
32
|
+
cursor: 'grab',
|
|
33
|
+
marginLeft: '4px',
|
|
34
|
+
marginRight: '4px',
|
|
35
|
+
padding: '2px',
|
|
36
|
+
},
|
|
27
37
|
};
|
|
28
38
|
export default function MultiSelect(props) {
|
|
29
39
|
const { options, onChange, maxHeight, isSortable } = props;
|
|
@@ -108,21 +118,18 @@ export default function MultiSelect(props) {
|
|
|
108
118
|
React.createElement(Box, { sx: Object.assign(Object.assign({}, styles.list), { maxHeight: maxHeight !== null && maxHeight !== void 0 ? maxHeight : 'auto' }) }, !!isSortable ? (React.createElement(DndContext, { sensors: sensors, collisionDetection: closestCenter, onDragEnd: handleDragEnd, modifiers: [restrictToVerticalAxis, restrictToWindowEdges] },
|
|
109
119
|
React.createElement(SortableContext, { items: optionsArray, strategy: verticalListSortingStrategy }, optionsArray.map((option) => {
|
|
110
120
|
var _a, _b;
|
|
111
|
-
return (React.createElement(SortableItem, { Item: () => {
|
|
121
|
+
return (React.createElement(SortableItem, { Item: (props) => {
|
|
112
122
|
var _a, _b;
|
|
113
123
|
return (React.createElement(Grid, { item: true, m: 1, sx: styles.listItem, key: (_a = option === null || option === void 0 ? void 0 : option.id) !== null && _a !== void 0 ? _a : option === null || option === void 0 ? void 0 : option.label },
|
|
114
124
|
React.createElement(Grid, { container: true, justifyContent: "space-between", wrap: "nowrap" },
|
|
115
125
|
React.createElement(Grid, { alignSelf: "center", pl: 1, display: "flex", item: true },
|
|
116
|
-
React.createElement(Box, { sx:
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
React.createElement(DragHandleIcon, { fontSize: "small" })),
|
|
122
|
-
React.createElement(Typography, null,
|
|
123
|
-
" ", option === null || option === void 0 ? void 0 :
|
|
126
|
+
React.createElement(Box, Object.assign({ sx: styles.dragHandleBox, ref: props.activatorRef }, props.listeners),
|
|
127
|
+
React.createElement(IconButton, { size: "medium", sx: styles.dragHandle },
|
|
128
|
+
React.createElement(DragHandleOutlined, null))),
|
|
129
|
+
React.createElement(Typography, { sx: { lineHeight: '36px' } },
|
|
130
|
+
' ', option === null || option === void 0 ? void 0 :
|
|
124
131
|
option.label,
|
|
125
|
-
|
|
132
|
+
' ')),
|
|
126
133
|
React.createElement(Grid, { item: true },
|
|
127
134
|
React.createElement(Switch, { id: (_b = option === null || option === void 0 ? void 0 : option.id) !== null && _b !== void 0 ? _b : option === null || option === void 0 ? void 0 : option.label, checked: option.value, onChange: (event) => {
|
|
128
135
|
var _a;
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { Box } from '@mui/material';
|
|
2
3
|
import { useSortable } from '@dnd-kit/sortable';
|
|
3
4
|
import { CSS } from '@dnd-kit/utilities';
|
|
4
5
|
export const SortableItem = (props) => {
|
|
5
6
|
const { Item } = props;
|
|
6
|
-
const { attributes, listeners, setNodeRef, transform, transition } = useSortable({
|
|
7
|
-
|
|
7
|
+
const { attributes, setActivatorNodeRef, listeners, setNodeRef, transform, transition } = useSortable({
|
|
8
|
+
id: props.id,
|
|
9
|
+
});
|
|
10
|
+
const styles = {
|
|
8
11
|
transform: CSS.Transform.toString(transform),
|
|
9
12
|
transition,
|
|
10
13
|
};
|
|
11
|
-
return (React.createElement("div", Object.assign({ ref: setNodeRef
|
|
12
|
-
React.createElement(
|
|
14
|
+
return (React.createElement("div", Object.assign({ ref: setNodeRef }, attributes),
|
|
15
|
+
React.createElement(Box, { sx: styles },
|
|
16
|
+
React.createElement(Item, { activatorRef: setActivatorNodeRef, listeners: listeners }))));
|
|
13
17
|
};
|
|
@@ -19,8 +19,8 @@ const styles = {
|
|
|
19
19
|
borderRadius: '8px',
|
|
20
20
|
maxHeight: '30px',
|
|
21
21
|
'& .MuiAccordionSummary-content': {
|
|
22
|
-
alignItems: 'center'
|
|
23
|
-
}
|
|
22
|
+
alignItems: 'center',
|
|
23
|
+
},
|
|
24
24
|
},
|
|
25
25
|
accordionDetails: {
|
|
26
26
|
display: 'flex',
|
|
@@ -108,8 +108,8 @@ export default function RepeatableField(props) {
|
|
|
108
108
|
return (React.createElement(UIThemeProvider, null,
|
|
109
109
|
React.createElement("div", null, selectedField === null || selectedField === void 0 ? void 0 :
|
|
110
110
|
selectedField.map((field, index) => (React.createElement(Accordion, { key: index, elevation: 0, sx: styles.accordion },
|
|
111
|
-
React.createElement(AccordionSummary, { expandIcon: React.createElement(ExpandMoreIcon, null), "aria-controls": "panel1a-content",
|
|
112
|
-
(dynamicHeaders === null || dynamicHeaders === void 0 ? void 0 : dynamicHeaders.isError) && (dynamicHeaders === null || dynamicHeaders === void 0 ? void 0 : dynamicHeaders.isError(field)) && React.createElement(InfoRounded, { sx: { color:
|
|
111
|
+
React.createElement(AccordionSummary, { expandIcon: React.createElement(ExpandMoreIcon, null), "aria-controls": "panel1a-content", sx: styles.accordionSummary, color: '#F4F6F8' },
|
|
112
|
+
(dynamicHeaders === null || dynamicHeaders === void 0 ? void 0 : dynamicHeaders.isError) && (dynamicHeaders === null || dynamicHeaders === void 0 ? void 0 : dynamicHeaders.isError(field)) && (React.createElement(InfoRounded, { sx: { color: '#A12723', paddingRight: '4px' } })),
|
|
113
113
|
React.createElement(Typography, { sx: { padding: '4px' } }, displayHeaders(index))),
|
|
114
114
|
React.createElement(AccordionDetails, { sx: styles.accordionDetails },
|
|
115
115
|
React.createElement(React.Fragment, null, children(handler, index, selectedField)),
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
3
|
-
export declare const TrashCan: (props:
|
|
2
|
+
import { SvgIconProps } from '@mui/material';
|
|
3
|
+
export declare const TrashCan: (props: SvgIconProps) => JSX.Element;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { SvgIcon } from '@mui/material';
|
|
3
3
|
export const TrashCan = (props) => {
|
|
4
4
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
5
|
-
return (React.createElement(
|
|
6
|
-
React.createElement("
|
|
7
|
-
React.createElement("
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
React.createElement("path", { id: "Vector_3", d: "M12.5003 14.1667C12.7213 14.1667 12.9333 14.0789 13.0896 13.9226C13.2459 13.7663 13.3337 13.5543 13.3337 13.3333V9.99999C13.3337 9.77898 13.2459 9.56701 13.0896 9.41073C12.9333 9.25445 12.7213 9.16666 12.5003 9.16666C12.2793 9.16666 12.0674 9.25445 11.9111 9.41073C11.7548 9.56701 11.667 9.77898 11.667 9.99999V13.3333C11.667 13.5543 11.7548 13.7663 11.9111 13.9226C12.0674 14.0789 12.2793 14.1667 12.5003 14.1667Z", fill: (_k = (_j = props === null || props === void 0 ? void 0 : props.sx) === null || _j === void 0 ? void 0 : _j['color']) !== null && _k !== void 0 ? _k : "#637381" })))));
|
|
5
|
+
return (React.createElement(SvgIcon, Object.assign({}, props, { viewBox: '0 0 20 20', sx: Object.assign({ verticalAlign: 'top', maxWidth: (_b = (_a = props.sx) === null || _a === void 0 ? void 0 : _a['width']) !== null && _b !== void 0 ? _b : '24', maxHeight: (_d = (_c = props.sx) === null || _c === void 0 ? void 0 : _c['height']) !== null && _d !== void 0 ? _d : '24' }, props.sx) }),
|
|
6
|
+
React.createElement("g", { id: "icon/ic_trash" },
|
|
7
|
+
React.createElement("path", { id: "Vector", d: "M17.5003 5.00001L13.3337 5.00001V3.60834C13.3141 3.07486 13.0838 2.57089 12.6933 2.20692C12.3028 1.84295 11.7839 1.64867 11.2503 1.66668H8.75033C8.21679 1.64867 7.69788 1.84295 7.30735 2.20692C6.91682 2.57089 6.68654 3.07486 6.66699 3.60834V5.00001H2.50033C2.27931 5.00001 2.06735 5.08781 1.91107 5.24409C1.75479 5.40037 1.66699 5.61233 1.66699 5.83334C1.66699 6.05436 1.75479 6.26632 1.91107 6.4226C2.06735 6.57888 2.27931 6.66668 2.50033 6.66668H3.33366L3.33366 15.8333C3.33366 16.4964 3.59705 17.1323 4.06589 17.6011C4.53473 18.07 5.17062 18.3333 5.83366 18.3333H14.167C14.83 18.3333 15.4659 18.07 15.9348 17.6011C16.4036 17.1323 16.667 16.4964 16.667 15.8333V6.66668H17.5003C17.7213 6.66668 17.9333 6.57888 18.0896 6.4226C18.2459 6.26632 18.3337 6.05436 18.3337 5.83334C18.3337 5.61233 18.2459 5.40037 18.0896 5.24409C17.9333 5.08781 17.7213 5.00001 17.5003 5.00001ZM8.33366 3.60834C8.33366 3.47501 8.50866 3.33334 8.75033 3.33334H11.2503C11.492 3.33334 11.667 3.47501 11.667 3.60834V5.00001H8.33366V3.60834ZM15.0003 15.8333C15.0003 16.0544 14.9125 16.2663 14.7562 16.4226C14.6 16.5789 14.388 16.6667 14.167 16.6667H5.83366C5.61265 16.6667 5.40068 16.5789 5.2444 16.4226C5.08812 16.2663 5.00033 16.0544 5.00033 15.8333L5.00033 6.66668L15.0003 6.66668V15.8333Z", fill: (_f = (_e = props === null || props === void 0 ? void 0 : props.sx) === null || _e === void 0 ? void 0 : _e['color']) !== null && _f !== void 0 ? _f : '#637381' }),
|
|
8
|
+
React.createElement("path", { id: "Vector_2", d: "M7.50033 14.1667C7.72134 14.1667 7.9333 14.0789 8.08958 13.9226C8.24586 13.7663 8.33366 13.5543 8.33366 13.3333V9.99999C8.33366 9.77898 8.24586 9.56701 8.08958 9.41073C7.9333 9.25445 7.72134 9.16666 7.50033 9.16666C7.27931 9.16666 7.06735 9.25445 6.91107 9.41073C6.75479 9.56701 6.66699 9.77898 6.66699 9.99999V13.3333C6.66699 13.5543 6.75479 13.7663 6.91107 13.9226C7.06735 14.0789 7.27931 14.1667 7.50033 14.1667Z", fill: (_h = (_g = props === null || props === void 0 ? void 0 : props.sx) === null || _g === void 0 ? void 0 : _g['color']) !== null && _h !== void 0 ? _h : '#637381' }),
|
|
9
|
+
React.createElement("path", { id: "Vector_3", d: "M12.5003 14.1667C12.7213 14.1667 12.9333 14.0789 13.0896 13.9226C13.2459 13.7663 13.3337 13.5543 13.3337 13.3333V9.99999C13.3337 9.77898 13.2459 9.56701 13.0896 9.41073C12.9333 9.25445 12.7213 9.16666 12.5003 9.16666C12.2793 9.16666 12.0674 9.25445 11.9111 9.41073C11.7548 9.56701 11.667 9.77898 11.667 9.99999V13.3333C11.667 13.5543 11.7548 13.7663 11.9111 13.9226C12.0674 14.0789 12.2793 14.1667 12.5003 14.1667Z", fill: (_k = (_j = props === null || props === void 0 ? void 0 : props.sx) === null || _j === void 0 ? void 0 : _j['color']) !== null && _k !== void 0 ? _k : '#637381' }))));
|
|
11
10
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { ClickAwayListener, FormControlProps, FormHelperTextProps, GridSize, Toolbar, createTheme, } from '@mui/material';
|
|
1
|
+
export { ClickAwayListener, FormControlProps, FormHelperTextProps, GridSize, Toolbar, createTheme, styled, } from '@mui/material';
|
|
2
2
|
export { CalendarPicker, DateTimePicker, MonthPicker, PickersDay, StaticDateTimePicker, StaticTimePicker, TimePicker, YearPicker, } from '@mui/x-date-pickers';
|
|
3
3
|
export * from './components/core';
|
|
4
4
|
export { CriteriaBuilder, DataGrid, FormField, MenuBar, MultiSelect, RepeatableField, UserAvatar, } from './components/custom';
|
package/dist/published/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { ClickAwayListener, Toolbar, createTheme, } from '@mui/material';
|
|
1
|
+
export { ClickAwayListener, Toolbar, createTheme, styled, } from '@mui/material';
|
|
2
2
|
export { CalendarPicker, DateTimePicker, MonthPicker, PickersDay, StaticDateTimePicker, StaticTimePicker, TimePicker, YearPicker, } from '@mui/x-date-pickers';
|
|
3
3
|
export * from './components/core';
|
|
4
4
|
export { CriteriaBuilder, DataGrid, FormField, MenuBar, MultiSelect, RepeatableField, UserAvatar, } from './components/custom';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@evoke-platform/ui-components",
|
|
3
|
-
"version": "1.0.0-dev.
|
|
3
|
+
"version": "1.0.0-dev.138",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/published/index.js",
|
|
6
6
|
"module": "dist/published/index.js",
|
|
@@ -18,7 +18,11 @@
|
|
|
18
18
|
"storybook": "start-storybook -p 6006",
|
|
19
19
|
"build-storybook": "build-storybook",
|
|
20
20
|
"lint": "prettier --check src/**/*.*",
|
|
21
|
-
"format": "prettier --write ."
|
|
21
|
+
"format": "prettier --write .",
|
|
22
|
+
"eslint": "eslint . --ext .ts, --ext .tsx",
|
|
23
|
+
"eslint:fix": "eslint . --ext .ts, --ext .tsx --fix",
|
|
24
|
+
"prettier:fix": "prettier --write \"**/*.{ts,tsx,md}\"",
|
|
25
|
+
"lint:fix": "npm run eslint:fix && npm run prettier:fix"
|
|
22
26
|
},
|
|
23
27
|
"author": "",
|
|
24
28
|
"license": "MIT",
|
|
@@ -41,6 +45,8 @@
|
|
|
41
45
|
"@types/react-dom": "^18.0.5",
|
|
42
46
|
"babel-jest": "^28.1.2",
|
|
43
47
|
"babel-loader": "^8.2.5",
|
|
48
|
+
"eslint": "^8.22.0",
|
|
49
|
+
"eslint-plugin-prettier": "^4.2.1",
|
|
44
50
|
"husky": "^4.3.8",
|
|
45
51
|
"is-ci": "^3.0.1",
|
|
46
52
|
"jest": "^28.1.2",
|
|
@@ -63,6 +69,7 @@
|
|
|
63
69
|
"@dnd-kit/sortable": "^7.0.1",
|
|
64
70
|
"@emotion/react": "^11.9.0",
|
|
65
71
|
"@emotion/styled": "^11.8.1",
|
|
72
|
+
"eslint-plugin-no-inline-styles": "^1.0.5",
|
|
66
73
|
"@formio/react": "^5.2.4-rc.1",
|
|
67
74
|
"@js-joda/core": "^3.2.0",
|
|
68
75
|
"@js-joda/locale_en-us": "^3.2.2",
|
|
@@ -73,6 +80,8 @@
|
|
|
73
80
|
"@mui/x-date-pickers": "^5.0.13",
|
|
74
81
|
"@react-querybuilder/dnd": "^5.4.1",
|
|
75
82
|
"@react-querybuilder/material": "^5.4.1",
|
|
83
|
+
"@typescript-eslint/parser": "^5.35.1",
|
|
84
|
+
"@typescript-eslint/typescript-estree": "^5.35.1",
|
|
76
85
|
"@types/react-input-mask": "^3.0.2",
|
|
77
86
|
"formiojs": "^4.15.0-rc.23",
|
|
78
87
|
"lodash-es": "^4.17.21",
|
|
@@ -88,4 +97,4 @@
|
|
|
88
97
|
"verbose": true,
|
|
89
98
|
"testEnvironment": "jsdom"
|
|
90
99
|
}
|
|
91
|
-
}
|
|
100
|
+
}
|