@evoke-platform/ui-components 1.0.0-dev.101 → 1.0.0-dev.103
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.js +1 -1
- package/dist/published/components/custom/FormField/InputFieldComponent/InputFieldComponent.js +2 -2
- package/dist/published/components/custom/RepeatableField/RepeatableField.d.ts +1 -0
- package/dist/published/components/custom/RepeatableField/RepeatableField.js +5 -0
- package/package.json +1 -1
@@ -218,7 +218,7 @@ const CriteriaBuilder = (props) => {
|
|
218
218
|
};
|
219
219
|
const fields = useMemo(() => {
|
220
220
|
return properties.map((property) => {
|
221
|
-
return Object.assign({ name: property.id, label: property.name, inputType: property.type }, (property.enum && {
|
221
|
+
return Object.assign({ name: property.type === 'object' ? `${property.id}.id` : property.id, label: property.name, inputType: property.type }, (property.enum && {
|
222
222
|
valueEditorType: property.type === 'array' ? 'multiselect' : 'select',
|
223
223
|
values: property.enum.map((item) => ({ name: item, label: item })),
|
224
224
|
}));
|
package/dist/published/components/custom/FormField/InputFieldComponent/InputFieldComponent.js
CHANGED
@@ -70,7 +70,7 @@ const InputFieldComponent = (props) => {
|
|
70
70
|
backgroundColor: '#f4f6f8',
|
71
71
|
},
|
72
72
|
}
|
73
|
-
: 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 })) : (React.createElement(InputMask, { mask: mask, value: value, onChange: !readOnly ? handleChange : undefined, alwaysShowMask: true },
|
73
|
+
: 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 })) : (React.createElement(InputMask, { mask: mask, value: value, onChange: !readOnly ? handleChange : undefined, onBlur: onBlur, alwaysShowMask: true },
|
74
74
|
React.createElement(TextField, { id: id, sx: readOnly
|
75
75
|
? {
|
76
76
|
'& .MuiOutlinedInput-notchedOutline': {
|
@@ -81,6 +81,6 @@ const InputFieldComponent = (props) => {
|
|
81
81
|
backgroundColor: '#f4f6f8',
|
82
82
|
},
|
83
83
|
}
|
84
|
-
: undefined, error: error, errorMessage: errorMessage,
|
84
|
+
: undefined, error: error, errorMessage: errorMessage, InputProps: Object.assign(Object.assign({}, InputProps), { readOnly: readOnly }), fullWidth: true, type: property.type === 'integer' ? 'number' : 'text' })));
|
85
85
|
};
|
86
86
|
export default InputFieldComponent;
|
@@ -4,6 +4,7 @@ import { Accordion, Typography, AccordionSummary, AccordionDetails, Button } fro
|
|
4
4
|
import UIThemeProvider from '../../../theme';
|
5
5
|
import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
|
6
6
|
import AddIcon from '@mui/icons-material/Add';
|
7
|
+
import { InfoRounded } from '../../../icons';
|
7
8
|
const styles = {
|
8
9
|
accordion: {
|
9
10
|
borderRadius: '8px',
|
@@ -19,6 +20,9 @@ const styles = {
|
|
19
20
|
background: '#F4F6F8',
|
20
21
|
borderRadius: '8px',
|
21
22
|
maxHeight: '30px',
|
23
|
+
'& .MuiAccordionSummary-content': {
|
24
|
+
alignItems: 'center'
|
25
|
+
}
|
22
26
|
},
|
23
27
|
accordionDetails: {
|
24
28
|
display: 'flex',
|
@@ -107,6 +111,7 @@ export default function RepeatableField(props) {
|
|
107
111
|
React.createElement("div", null, selectedField === null || selectedField === void 0 ? void 0 :
|
108
112
|
selectedField.map((field, index) => (React.createElement(Accordion, { key: index, elevation: 0, sx: styles.accordion },
|
109
113
|
React.createElement(AccordionSummary, { expandIcon: React.createElement(ExpandMoreIcon, null), "aria-controls": "panel1a-content", id: "panel1a-header", sx: styles.accordionSummary, color: '#F4F6F8' },
|
114
|
+
(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' } }),
|
110
115
|
React.createElement(Typography, { sx: { padding: '4px' } }, displayHeaders(index))),
|
111
116
|
React.createElement(AccordionDetails, { sx: styles.accordionDetails },
|
112
117
|
React.createElement(React.Fragment, null, children(handler, index, selectedField)),
|