@evoke-platform/ui-components 1.0.0-dev.150 → 1.0.0-dev.152
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/TextField/TextField.js +3 -3
- package/dist/published/components/custom/BuilderGrid/BuilderGrid.js +4 -2
- package/dist/published/components/custom/MultiSelect/MultiSelect.d.ts +1 -0
- package/dist/published/components/custom/MultiSelect/MultiSelect.js +3 -3
- package/package.json +1 -1
@@ -25,10 +25,10 @@ const TextField = (props) => {
|
|
25
25
|
props.required ? (React.createElement(Typography, { sx: { color: 'red', fontSize: '14px' }, component: 'span' }, "*")) : null),
|
26
26
|
instructionText && React.createElement(Typography, { variant: 'caption' }, instructionText),
|
27
27
|
React.createElement(MUITextField, Object.assign({}, props, { label: null, inputProps: { readOnly: readOnly, 'aria-readonly': !!readOnly }, sx: readOnly
|
28
|
-
? readOnlyStyles
|
29
|
-
: Object.assign({ '& fieldset': { borderRadius: '8px' } }, props.sx) })),
|
28
|
+
? Object.assign(Object.assign({}, readOnlyStyles), props.sx) : Object.assign({ '& fieldset': { borderRadius: '8px' } }, props.sx) })),
|
30
29
|
error && React.createElement(FieldError, { required: required, label: errorMessage }))) : (React.createElement(React.Fragment, null,
|
31
|
-
React.createElement(MUITextField, Object.assign({ "data-testid": "label-inside", inputProps: { readOnly: readOnly, 'aria-readonly': !!readOnly } }, props, { sx: readOnly
|
30
|
+
React.createElement(MUITextField, Object.assign({ "data-testid": "label-inside", inputProps: { readOnly: readOnly, 'aria-readonly': !!readOnly } }, props, { sx: readOnly
|
31
|
+
? Object.assign(Object.assign({}, readOnlyStyles), props.sx) : Object.assign({ '& fieldset': { borderRadius: '8px' } }, props.sx) })),
|
32
32
|
error && React.createElement(FieldError, { required: required, label: errorMessage })))));
|
33
33
|
};
|
34
34
|
export default TextField;
|
@@ -19,7 +19,7 @@ const BuilderGrid = (props) => {
|
|
19
19
|
var _a, _b;
|
20
20
|
const { loading, action, item, rows, initialSort, emptyContentSelectOptions } = props, rest = __rest(props, ["loading", "action", "item", "rows", "initialSort", "emptyContentSelectOptions"]);
|
21
21
|
const [anchorEl, setAnchorEl] = useState();
|
22
|
-
const toolbar = useMemo(() => () => React.createElement(BuilderGridToolbar, { loading: loading, action: action }), [loading]);
|
22
|
+
const toolbar = useMemo(() => () => React.createElement(BuilderGridToolbar, { loading: loading, action: action }), [loading, action]);
|
23
23
|
return (React.createElement(UIThemeProvider, null, loading || rows.length ? (React.createElement(Box, { sx: {
|
24
24
|
backgroundColor: '#fff',
|
25
25
|
borderRadius: '6px',
|
@@ -59,7 +59,9 @@ const BuilderGrid = (props) => {
|
|
59
59
|
}, '& .MuiDataGrid-iconButtonContainer': {
|
60
60
|
marginLeft: '4px',
|
61
61
|
}, height: 'calc(100vh - 240px)' }, rest.sx), getRowId: (row) => row.id, disableColumnMenu: true, initialState: {
|
62
|
-
sorting: {
|
62
|
+
sorting: {
|
63
|
+
sortModel: initialSort ? [{ field: initialSort, sort: 'asc' }] : [],
|
64
|
+
},
|
63
65
|
}, componentsProps: {
|
64
66
|
panel: {
|
65
67
|
anchorEl: anchorEl,
|
@@ -114,7 +114,7 @@ export default function MultiSelect(props) {
|
|
114
114
|
React.createElement(Search, null))),
|
115
115
|
}, fullWidth: true, sx: styles.textField, value: searchText, onChange: filterItems }))),
|
116
116
|
(optionsArray === null || optionsArray === void 0 ? void 0 : optionsArray.length) > 1 && (React.createElement(Grid, { item: true, sx: styles.switch },
|
117
|
-
React.createElement(FormControlLabel, { control: React.createElement(Switch, { checked: selectAll, onChange: handleSelectAllChange }), label: "Select all fields" }))),
|
117
|
+
React.createElement(FormControlLabel, { control: React.createElement(Switch, { checked: selectAll, onChange: handleSelectAllChange }), label: "Select all fields", disabled: optionsArray.every((option) => option.disabled === true) }))),
|
118
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] },
|
119
119
|
React.createElement(SortableContext, { items: optionsArray, strategy: verticalListSortingStrategy }, optionsArray.map((option) => {
|
120
120
|
var _a, _b;
|
@@ -134,7 +134,7 @@ export default function MultiSelect(props) {
|
|
134
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) => {
|
135
135
|
var _a;
|
136
136
|
handleFlagChange(event, (_a = option === null || option === void 0 ? void 0 : option.id) !== null && _a !== void 0 ? _a : option === null || option === void 0 ? void 0 : option.label);
|
137
|
-
} })))));
|
137
|
+
}, disabled: option.disabled })))));
|
138
138
|
}, 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, 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 }));
|
139
139
|
})))) : (React.createElement(React.Fragment, null, sortBy(optionsArray, 'label').map((option) => {
|
140
140
|
var _a, _b;
|
@@ -146,6 +146,6 @@ export default function MultiSelect(props) {
|
|
146
146
|
option.label,
|
147
147
|
" ")),
|
148
148
|
React.createElement(Grid, null,
|
149
|
-
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) => { var _a; return handleFlagChange(event, (_a = option === null || option === void 0 ? void 0 : option.id) !== null && _a !== void 0 ? _a : option === null || option === void 0 ? void 0 : option.label); } })))));
|
149
|
+
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) => { var _a; return handleFlagChange(event, (_a = option === null || option === void 0 ? void 0 : option.id) !== null && _a !== void 0 ? _a : option === null || option === void 0 ? void 0 : option.label); }, disabled: option.disabled })))));
|
150
150
|
})))))));
|
151
151
|
}
|