@evoke-platform/ui-components 1.0.0-dev.102 → 1.0.0-dev.104

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.
@@ -132,7 +132,7 @@ const dynamicContentInputEditor = (props) => {
132
132
  const DynamicContentInput = (_a = props.context) === null || _a === void 0 ? void 0 : _a.dynamicContentInput.component;
133
133
  let valueEditor;
134
134
  if (DynamicContentInput) {
135
- valueEditor = (React.createElement(DynamicContentInput, { values: ['null', 'notNull'].includes(operator) ? '' : value, setValues: handleOnChange, disabled: ['null', 'notNull'].includes(operator), isSingleValue: true, size: 'small', previousSteps: (_c = (_b = props.context) === null || _b === void 0 ? void 0 : _b.previousSteps) !== null && _c !== void 0 ? _c : [] }));
135
+ valueEditor = (React.createElement(DynamicContentInput, { values: ['null', 'notNull'].includes(operator) ? '' : value, setValues: handleOnChange, disabled: ['null', 'notNull'].includes(operator), size: 'small', previousSteps: (_c = (_b = props.context) === null || _b === void 0 ? void 0 : _b.previousSteps) !== null && _c !== void 0 ? _c : [] }));
136
136
  }
137
137
  return determineValueEditor(valueEditor, props);
138
138
  };
@@ -169,11 +169,13 @@ const determineValueEditor = (baseValueEditor, props) => {
169
169
  }, renderInput: (params) => React.createElement(TextField, Object.assign({ label: params.label }, params, { size: "small" })), style: { width: '33%' } }));
170
170
  }
171
171
  else if (type === 'select' && values) {
172
- valueEditor = (React.createElement(Autocomplete, { options: values, multiple: ['in', 'notIn'].includes(operator), value: disabled ? '' : value, onChange: (event, newValue) => {
172
+ valueEditor = (React.createElement(Autocomplete, { freeSolo: true, options: values, multiple: ['in', 'notIn'].includes(operator), value: disabled ? '' : value, onChange: (event, newValue) => {
173
173
  handleOnChange(newValue === null || newValue === void 0 ? void 0 : newValue.label);
174
174
  }, disabled: disabled, isOptionEqualToValue: (option, value) => {
175
175
  return option === value;
176
- }, renderInput: (params) => React.createElement(TextField, Object.assign({}, params, { size: "small" })), style: { width: '33%' }, disableClearable: true }));
176
+ }, renderInput: (params) => (React.createElement(TextField, Object.assign({}, params, { size: "small", placeholder: 'Value', readOnly: value === '{{user.id}}', onChange: (event) => {
177
+ handleOnChange(event.target.value);
178
+ } }))), style: { width: '33%' }, disableClearable: true }));
177
179
  }
178
180
  break;
179
181
  }
@@ -3,6 +3,7 @@ export declare type DynamicHeaders = {
3
3
  field: string;
4
4
  displayTitle: string;
5
5
  mapping: string;
6
+ isError?: Function;
6
7
  };
7
8
  declare type RepeatableFieldProps = {
8
9
  children: Function;
@@ -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)),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@evoke-platform/ui-components",
3
- "version": "1.0.0-dev.102",
3
+ "version": "1.0.0-dev.104",
4
4
  "description": "",
5
5
  "main": "dist/published/index.js",
6
6
  "module": "dist/published/index.js",