@arquimedes.co/eureka-forms 1.9.35-test → 1.9.37-test

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.
@@ -79,7 +79,7 @@ function ColumnForm(_a) {
79
79
  defaultValues: originalValues,
80
80
  mode: 'onTouched',
81
81
  shouldFocusError: true,
82
- }), getValues = _d.getValues, setValue = _d.setValue, clearErrors = _d.clearErrors, control = _d.control, errors = _d.formState.errors, trigger = _d.trigger;
82
+ }), getValues = _d.getValues, setValue = _d.setValue, clearErrors = _d.clearErrors, control = _d.control, errors = _d.formState.errors, trigger = _d.trigger, setFocus = _d.setFocus;
83
83
  var recaptchaRef = useRef();
84
84
  var _e = useState(undefined), sections = _e[0], setSections = _e[1];
85
85
  var _f = useState(false), loading = _f[0], setLoading = _f[1];
@@ -94,7 +94,7 @@ function ColumnForm(_a) {
94
94
  return _jsx("div", {});
95
95
  }
96
96
  var onSubmit = function (token) { return __awaiter(_this, void 0, void 0, function () {
97
- var valid, values, newValues, _i, _a, idStep, step, test_1, payload, url, resp, _b, error_1;
97
+ var valid, values, newValues, _i, _a, idStep, step, payload, url, resp, _b, error_1;
98
98
  return __generator(this, function (_c) {
99
99
  switch (_c.label) {
100
100
  case 0:
@@ -119,10 +119,6 @@ function ColumnForm(_a) {
119
119
  step = form.steps[idStep];
120
120
  newValues[idStep] = calcValue(step, values, customSteps);
121
121
  }
122
- test_1 = true;
123
- setLoading(false);
124
- if (test_1)
125
- return [2 /*return*/];
126
122
  if (!customSend) return [3 /*break*/, 4];
127
123
  return [4 /*yield*/, customSend(newValues, reload)];
128
124
  case 3:
@@ -164,7 +160,7 @@ function ColumnForm(_a) {
164
160
  return (_jsxs("div", __assign({ className: styles.container, style: { color: formStyle.textColor } }, { children: [loading && _jsx("div", { className: styles.curtain }), showConfirmation !== undefined && (_jsx(ConfirmationDialog, { formStyle: formStyle, confirmation: showConfirmation, onClose: function () {
165
161
  reload();
166
162
  setShowConfirmation(undefined);
167
- } })), sections.map(function (idSection, index) { return (_jsx(SectionComponent, __assign({ form: form, sendLabel: sendLabel, domain: domain, postview: postview, clearErrors: clearErrors, widthStats: widthStats, control: control, getValues: getValues, originalValues: originalValues, errors: errors, index: index, setSections: setSections, section: form.sections[idSection], formStyle: formStyle, customSteps: customSteps, setDependencyStore: setDependencyStore, dependencyStore: dependencyStore, trigger: trigger }, others), index)); }), form.terms &&
163
+ } })), sections.map(function (idSection, index) { return (_jsx(SectionComponent, __assign({ form: form, sendLabel: sendLabel, domain: domain, postview: postview, clearErrors: clearErrors, widthStats: widthStats, control: control, getValues: getValues, originalValues: originalValues, errors: errors, index: index, setSections: setSections, section: form.sections[idSection], formStyle: formStyle, customSteps: customSteps, setDependencyStore: setDependencyStore, dependencyStore: dependencyStore, setFocus: setFocus }, others), index)); }), form.terms &&
168
164
  (!internal || (internal && postview)) &&
169
165
  (originalValues === null || originalValues === void 0 ? void 0 : originalValues['INTERNAL_CREATING_AGENT']) === undefined && (_jsx("div", __assign({ className: styles.termsContainer, style: {
170
166
  width: (form.size.blockSize + form.size.spacingSize) *
@@ -271,8 +267,8 @@ var calcValue = function (step, values, customSteps, value) {
271
267
  var mappedId = element.ids[idStep];
272
268
  if (values[mappedId] !== undefined) {
273
269
  var substep = step.steps[idStep];
274
- var test_2 = calcValue(substep, values, customSteps, values[mappedId]);
275
- newValue[idStep] = test_2;
270
+ var test_1 = calcValue(substep, values, customSteps, values[mappedId]);
271
+ newValue[idStep] = test_1;
276
272
  }
277
273
  }
278
274
  mappedValues.push(newValue);
@@ -305,19 +301,23 @@ function stringToDraft(text) {
305
301
  });
306
302
  return draftStructure;
307
303
  }
308
- function calcDependencies(steps, originalValues) {
309
- var dependencies = {};
304
+ function calcDependencies(steps, originalValues, allSteps, dependencies) {
305
+ if (allSteps === void 0) { allSteps = steps; }
306
+ if (dependencies === void 0) { dependencies = {}; }
310
307
  for (var _i = 0, _a = Object.values(steps); _i < _a.length; _i++) {
311
308
  var step = _a[_i];
312
309
  if (step.dependencies) {
313
310
  for (var _b = 0, _c = step.dependencies; _b < _c.length; _b++) {
314
311
  var idDep = _c[_b];
315
- var depStep = steps[idDep];
312
+ var depStep = allSteps[idDep];
316
313
  if (depStep && dependencies[idDep] === undefined) {
317
314
  dependencies[idDep] = calcStepDependencyValue(depStep, originalValues);
318
315
  }
319
316
  }
320
317
  }
318
+ if (step.type === Types.MAPPER) {
319
+ calcDependencies(step.steps, originalValues, __assign(__assign({}, allSteps), step.steps), dependencies);
320
+ }
321
321
  }
322
322
  return dependencies;
323
323
  }
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { Control, FieldValues, UseFormGetValues, UseFormTrigger } from 'react-hook-form';
2
+ import { Control, FieldValues, UseFormGetValues } from 'react-hook-form';
3
3
  import { Organization } from '../../@Types';
4
4
  import { Form, FormStyle, Section } from '../../@Types/Form';
5
5
  import { CustomStep } from '../../App';
@@ -24,7 +24,7 @@ export interface RecursiveData {
24
24
  fetchDownloadUrl?: (S3Key: string, fileName: string) => Promise<string>;
25
25
  dependencyStore: Record<string, any>;
26
26
  setDependencyStore: (values: Record<string, any>) => void;
27
- trigger: UseFormTrigger<any>;
27
+ setFocus: (id: string) => void;
28
28
  }
29
29
  export interface SectionComponentProps extends RecursiveData {
30
30
  /** The custom send label to display */
@@ -88,7 +88,7 @@ function EntityValuePickerStep(_a) {
88
88
  if (typeof currentValue === 'string')
89
89
  value = currentValue;
90
90
  else
91
- value = (_c = currentValue.id) !== null && _c !== void 0 ? _c : currentValue.id;
91
+ value = (_c = currentValue._id) !== null && _c !== void 0 ? _c : currentValue.id;
92
92
  //TODO: Manejo de multiple!
93
93
  }
94
94
  else if (filter.required) {
@@ -38,6 +38,8 @@ import RoundedButton from '../../../../shared/RoundedButton/RoundedButton';
38
38
  import { nanoid } from 'nanoid';
39
39
  import { calcStepDependencyValue } from '../../../Form/ColumnForm/ColumnForm';
40
40
  import MapperElementComponent from './Element/MapperElement';
41
+ import AYFFormStepTypes from '../../../../constants/AYFFormStepTypes';
42
+ import CBRFormStepTypes from '../../../../constants/CBRFormStepTypes';
41
43
  function Elements(_a) {
42
44
  var step = _a.step, form = _a.form, btnRef = _a.btnRef, editable = _a.editable, postview = _a.postview, onChange = _a.onChange, elements = _a.elements, formStyle = _a.formStyle, dependencyStore = _a.dependencyStore, setDependencyStore = _a.setDependencyStore, others = __rest(_a, ["step", "form", "btnRef", "editable", "postview", "onChange", "elements", "formStyle", "dependencyStore", "setDependencyStore"]);
43
45
  var _b = useState(false), firstRender = _b[0], setFirstRender = _b[1];
@@ -80,7 +82,7 @@ function Elements(_a) {
80
82
  var newSteps = {};
81
83
  for (var _i = 0, _a = Object.keys(step.steps); _i < _a.length; _i++) {
82
84
  var idStep = _a[_i];
83
- var baseStep = JSON.parse(JSON.stringify(form.steps[idStep]));
85
+ var baseStep = JSON.parse(JSON.stringify(step.steps[idStep]));
84
86
  var newIdStep = step.id + '-' + idStep + '-' + idElement;
85
87
  baseStep.id = newIdStep;
86
88
  newElement.ids[idStep] = newIdStep;
@@ -108,7 +110,7 @@ function Elements(_a) {
108
110
  margin: step.description
109
111
  ? '10px 0px'
110
112
  : '0px 0px 5px 0px',
111
- } }, { children: step.description }))), elements.map(function (incident, index) { return (_jsx(MapperElementComponent, __assign({ num: index, element: incident, formStyle: formStyle, step: step, form: __assign(__assign({}, form), { steps: localSteps }), editable: editable, postview: postview, dependencyStore: dependencyStore, setDependencyStore: setDependencyStore, handleDelete: function () {
113
+ } }, { children: step.description }))), elements.map(function (incident, index) { return (_jsx(MapperElementComponent, __assign({ num: index, element: incident, formStyle: formStyle, step: step, form: __assign(__assign({}, form), { steps: __assign(__assign({}, form.steps), localSteps) }), editable: editable, postview: postview, dependencyStore: dependencyStore, setDependencyStore: setDependencyStore, handleDelete: function () {
112
114
  var tempElements = __spreadArray([], elements, true);
113
115
  tempElements[index].deleted = true;
114
116
  onChange(tempElements);
@@ -138,7 +140,7 @@ function calcRecursiveData(element, newSteps, deps) {
138
140
  var idDep = step.dependencies[i];
139
141
  var newId = element.ids[idDep];
140
142
  if (newId) {
141
- step.dependencies[i] = element.ids[newId];
143
+ step.dependencies[i] = newId;
142
144
  deps[newId] = calcStepDependencyValue(newSteps[newId], {});
143
145
  }
144
146
  }
@@ -182,6 +184,36 @@ function calcRecursiveData(element, newSteps, deps) {
182
184
  }
183
185
  }
184
186
  break;
187
+ case StepTypes.ENTITYVALUEPICKER:
188
+ for (var _h = 0, _j = step.filters; _h < _j.length; _h++) {
189
+ var filter = _j[_h];
190
+ if (filter.idStep) {
191
+ var newId = element.ids[filter.idStep];
192
+ if (newId) {
193
+ filter.idStep = newId;
194
+ deps[newId] = calcStepDependencyValue(newSteps[newId], {});
195
+ }
196
+ }
197
+ }
198
+ break;
199
+ case CBRFormStepTypes.CBR_LOCATIVAS:
200
+ var elementStep = step;
201
+ if (elementStep.subStep) {
202
+ var newId = element.ids[elementStep.subStep];
203
+ if (newId) {
204
+ elementStep.subStep = newId;
205
+ }
206
+ }
207
+ break;
208
+ case AYFFormStepTypes.AYF_ICA_CITY:
209
+ var cityStep = step;
210
+ if (cityStep.idNitStep) {
211
+ var newId = element.ids[cityStep.idNitStep];
212
+ if (newId) {
213
+ cityStep.idNitStep = newId;
214
+ }
215
+ }
216
+ break;
185
217
  default:
186
218
  break;
187
219
  }
@@ -66,7 +66,7 @@ import React from 'react';
66
66
  function SmartSelect(_a) {
67
67
  var _this = this;
68
68
  var _b, _c, _d, _e;
69
- var icon = _a.icon, step = _a.step, form = _a.form, value = _a.value, onBlur = _a.onBlur, errors = _a.errors, trigger = _a.trigger, children = _a.children, editable = _a.editable, onChange = _a.onChange, inputRef = _a.inputRef, postview = _a.postview, formStyle = _a.formStyle, getOptions = _a.getOptions, widthStats = _a.widthStats, organization = _a.organization, calcDepError = _a.calcDepError, valueOverwrite = _a.valueOverwrite, getValueString = _a.getValueString, originalValues = _a.originalValues, changeListener = _a.changeListener, dependencyStore = _a.dependencyStore, _f = _a.calcInvalidDeps, calcInvalidDeps = _f === void 0 ? function (step, depStore) {
69
+ var icon = _a.icon, step = _a.step, form = _a.form, value = _a.value, onBlur = _a.onBlur, errors = _a.errors, setFocus = _a.setFocus, children = _a.children, editable = _a.editable, onChange = _a.onChange, inputRef = _a.inputRef, postview = _a.postview, formStyle = _a.formStyle, getOptions = _a.getOptions, widthStats = _a.widthStats, organization = _a.organization, calcDepError = _a.calcDepError, valueOverwrite = _a.valueOverwrite, getValueString = _a.getValueString, originalValues = _a.originalValues, changeListener = _a.changeListener, dependencyStore = _a.dependencyStore, _f = _a.calcInvalidDeps, calcInvalidDeps = _f === void 0 ? function (step, depStore) {
70
70
  var _a;
71
71
  var missingDeps = [];
72
72
  for (var _i = 0, _b = (_a = step.dependencies) !== null && _a !== void 0 ? _a : []; _i < _b.length; _i++) {
@@ -76,7 +76,7 @@ function SmartSelect(_a) {
76
76
  }
77
77
  }
78
78
  return missingDeps;
79
- } : _f, getValueWarning = _a.getValueWarning, getOptionSelected = _a.getOptionSelected, setDependencyStore = _a.setDependencyStore, others = __rest(_a, ["icon", "step", "form", "value", "onBlur", "errors", "trigger", "children", "editable", "onChange", "inputRef", "postview", "formStyle", "getOptions", "widthStats", "organization", "calcDepError", "valueOverwrite", "getValueString", "originalValues", "changeListener", "dependencyStore", "calcInvalidDeps", "getValueWarning", "getOptionSelected", "setDependencyStore"]);
79
+ } : _f, getValueWarning = _a.getValueWarning, getOptionSelected = _a.getOptionSelected, setDependencyStore = _a.setDependencyStore, others = __rest(_a, ["icon", "step", "form", "value", "onBlur", "errors", "setFocus", "children", "editable", "onChange", "inputRef", "postview", "formStyle", "getOptions", "widthStats", "organization", "calcDepError", "valueOverwrite", "getValueString", "originalValues", "changeListener", "dependencyStore", "calcInvalidDeps", "getValueWarning", "getOptionSelected", "setDependencyStore"]);
80
80
  var _g = useState(true), first = _g[0], setFirst = _g[1];
81
81
  var _h = useState(), options = _h[0], setOptions = _h[1];
82
82
  var _j = useState(), error = _j[0], setError = _j[1];
@@ -164,7 +164,7 @@ function SmartSelect(_a) {
164
164
  setError(calcDepError === null || calcDepError === void 0 ? void 0 : calcDepError(invalids.map(function (idDep) { return form.steps[idDep]; })));
165
165
  if (!value) {
166
166
  if (invalids.length > 0) {
167
- trigger(invalids, { shouldFocus: true });
167
+ setFocus(invalids[0]);
168
168
  }
169
169
  else {
170
170
  setLoading(true);
@@ -194,10 +194,10 @@ function SmartSelect(_a) {
194
194
  if (options === undefined && !(!editable || postview)) {
195
195
  setLoading(true);
196
196
  }
197
- }, disabled: options === null, loading: loading, options: options !== null && options !== void 0 ? options : [], inputRef: inputRef, cantEdit: !editable || postview, fullWidth: true, backgroundColor: "transparent", innerBackgroundColor: (_d = formStyle.stepBackgroundColor) !== null && _d !== void 0 ? _d : 'white', label: step.label, required: step.required, height: '31px', changeListener: changeListener, searchable: step.searchable, icon: step.showIcon ? icon : undefined, helperTextColor: formStyle.descriptionTextColor, focusColor: formStyle.primaryColor, outlineColor: formStyle.outlineColor, errorColor: formStyle.errorColor, color: formStyle.textColor, containerMargin: "0px", handleUpdate: function (value) {
197
+ }, disabled: options === null, loading: loading, options: options !== null && options !== void 0 ? options : undefined, inputRef: inputRef, cantEdit: !editable || postview, fullWidth: true, backgroundColor: "transparent", innerBackgroundColor: (_d = formStyle.stepBackgroundColor) !== null && _d !== void 0 ? _d : 'white', label: step.label, required: step.required, height: '31px', changeListener: changeListener, searchable: step.searchable, icon: step.showIcon ? icon : undefined, helperTextColor: formStyle.descriptionTextColor, focusColor: formStyle.primaryColor, outlineColor: formStyle.outlineColor, errorColor: formStyle.errorColor, color: formStyle.textColor, containerMargin: "0px", handleUpdate: function (value) {
198
198
  var _a;
199
199
  if (dependencyStore[step.id] !== undefined) {
200
- setDependencyStore(__assign(__assign({}, dependencyStore), (_a = {}, _a[step.id] = value, _a)));
200
+ setDependencyStore(__assign(__assign({}, dependencyStore), (_a = {}, _a[step.id] = value !== null && value !== void 0 ? value : null, _a)));
201
201
  }
202
202
  valueOverwrite
203
203
  ? onChange(valueOverwrite(value))
@@ -210,7 +210,7 @@ function SmartSelect(_a) {
210
210
  !!errors[step.id] }) })), children &&
211
211
  cloneElement(children, {
212
212
  value: value,
213
- stepProps: __assign({ step: step, form: form, errors: errors, trigger: trigger, postview: postview, editable: editable, formStyle: formStyle, widthStats: widthStats, organization: organization, originalValues: originalValues, dependencyStore: dependencyStore, setDependencyStore: setDependencyStore }, others),
213
+ stepProps: __assign({ step: step, form: form, errors: errors, setFocus: setFocus, postview: postview, editable: editable, formStyle: formStyle, widthStats: widthStats, organization: organization, originalValues: originalValues, dependencyStore: dependencyStore, setDependencyStore: setDependencyStore }, others),
214
214
  })] }));
215
215
  }
216
216
  function SmartSelectStep(props) {
@@ -103,6 +103,9 @@ var useTextfieldStyles = function (props) {
103
103
  '& .EF-MuiFormHelperText-root': {
104
104
  color: props.helperTextColor,
105
105
  },
106
+ '& .EF-MuiFormHelperText-root.Mui-error': {
107
+ color: props.errorColor + ' !important',
108
+ },
106
109
  '& .EF-MuiFormLabel-root.Mui-disabled': {
107
110
  color: '#0000008a',
108
111
  },
@@ -125,7 +128,7 @@ var useTextfieldStyles = function (props) {
125
128
  }); });
126
129
  };
127
130
  export default function RoundedSmartSelect(_a) {
128
- var _b = _a.options, options = _b === void 0 ? [] : _b, _c = _a.value, value = _c === void 0 ? '' : _c, handleUpdate = _a.handleUpdate, label = _a.label, _d = _a.getValueString, getValueString = _d === void 0 ? function (value) { return value.value; } : _d, _e = _a.color, color = _e === void 0 ? '#293241' : _e, _f = _a.errorColor, errorColor = _f === void 0 ? '#cc2936' : _f, _g = _a.focusColor, focusColor = _g === void 0 ? '#3d5a7f' : _g, _h = _a.helperTextColor, helperTextColor = _h === void 0 ? '#989898' : _h, _j = _a.outlineColor, outlineColor = _j === void 0 ? '#b8b8b8' : _j, _k = _a.backgroundColor, backgroundColor = _k === void 0 ? '#ffffff' : _k, _l = _a.cantEdit, cantEdit = _l === void 0 ? false : _l, _m = _a.loading, loading = _m === void 0 ? false : _m, _o = _a.height, height = _o === void 0 ? '31px' : _o, _p = _a.fontSize, fontSize = _p === void 0 ? '1rem' : _p, required = _a.required, changeListener = _a.changeListener, error = _a.error, innerBackgroundColor = _a.innerBackgroundColor, getOptionSelected = _a.getOptionSelected, helperText = _a.helperText, _q = _a.readOnly, readOnly = _q === void 0 ? false : _q, _r = _a.borderRadius, borderRadius = _r === void 0 ? 10 : _r, _s = _a.fontWeight, fontWeight = _s === void 0 ? '400' : _s, icon = _a.icon, _t = _a.searchable, searchable = _t === void 0 ? false : _t, _u = _a.containerMargin, containerMargin = _u === void 0 ? '0px' : _u, _v = _a.showIcon, showIcon = _v === void 0 ? true : _v, inputRef = _a.inputRef, disabled = _a.disabled, _w = _a.creatable, creatable = _w === void 0 ? false : _w, onBlur = _a.onBlur, name = _a.name, onFocus = _a.onFocus;
131
+ var options = _a.options, _b = _a.value, value = _b === void 0 ? '' : _b, handleUpdate = _a.handleUpdate, label = _a.label, _c = _a.getValueString, getValueString = _c === void 0 ? function (value) { return value.value; } : _c, _d = _a.color, color = _d === void 0 ? '#293241' : _d, _e = _a.errorColor, errorColor = _e === void 0 ? '#cc2936' : _e, _f = _a.focusColor, focusColor = _f === void 0 ? '#3d5a7f' : _f, _g = _a.helperTextColor, helperTextColor = _g === void 0 ? '#989898' : _g, _h = _a.outlineColor, outlineColor = _h === void 0 ? '#b8b8b8' : _h, _j = _a.backgroundColor, backgroundColor = _j === void 0 ? '#ffffff' : _j, _k = _a.cantEdit, cantEdit = _k === void 0 ? false : _k, _l = _a.loading, loading = _l === void 0 ? false : _l, _m = _a.height, height = _m === void 0 ? '31px' : _m, _o = _a.fontSize, fontSize = _o === void 0 ? '1rem' : _o, required = _a.required, changeListener = _a.changeListener, error = _a.error, innerBackgroundColor = _a.innerBackgroundColor, getOptionSelected = _a.getOptionSelected, helperText = _a.helperText, _p = _a.readOnly, readOnly = _p === void 0 ? false : _p, _q = _a.borderRadius, borderRadius = _q === void 0 ? 10 : _q, _r = _a.fontWeight, fontWeight = _r === void 0 ? '400' : _r, icon = _a.icon, _s = _a.searchable, searchable = _s === void 0 ? false : _s, _t = _a.containerMargin, containerMargin = _t === void 0 ? '0px' : _t, _u = _a.showIcon, showIcon = _u === void 0 ? true : _u, inputRef = _a.inputRef, disabled = _a.disabled, _v = _a.creatable, creatable = _v === void 0 ? false : _v, onBlur = _a.onBlur, name = _a.name, onFocus = _a.onFocus;
129
132
  var props = {
130
133
  color: color,
131
134
  height: height,
@@ -144,7 +147,7 @@ export default function RoundedSmartSelect(_a) {
144
147
  };
145
148
  var textFieldClasses = useTextfieldStyles(props)();
146
149
  if (searchable) {
147
- return (_jsx(Autocomplete, { onFocus: onFocus, size: "small", fullWidth: true, openOnFocus: true, freeSolo: creatable, disabled: cantEdit || disabled, popupIcon: loading ? (_jsx(CircularProgress, { size: 22, style: { color: '#757575' } })) : showIcon && icon ? (icon) : undefined, onOpen: function () { }, loading: loading, loadingText: 'Cargando...', closeIcon: false, options: options, getOptionLabel: function (option) {
150
+ return (_jsx(Autocomplete, { onFocus: onFocus, size: "small", fullWidth: true, openOnFocus: true, freeSolo: creatable, disabled: cantEdit || disabled, popupIcon: loading ? (_jsx(CircularProgress, { size: 22, style: { color: '#757575' } })) : showIcon && icon ? (icon) : undefined, onOpen: function () { }, loading: loading, loadingText: 'Cargando...', closeIcon: false, options: options !== null && options !== void 0 ? options : [], getOptionLabel: function (option) {
148
151
  var _a, _b;
149
152
  // Value selected with enter, right from the input
150
153
  if (typeof option === 'string') {
@@ -199,8 +202,8 @@ export default function RoundedSmartSelect(_a) {
199
202
  }, renderInput: function (params) { return (_jsx(TextField, __assign({ classes: textFieldClasses }, params, { inputRef: inputRef, onBlur: onBlur, name: name, variant: "outlined", label: label, required: required, error: error, helperText: helperText }))); }, style: { pointerEvents: 'none' }, noOptionsText: "No hay opciones" }));
200
203
  }
201
204
  else {
202
- return (_jsxs(RoundedSelect, __assign({ onBlur: onBlur, inputRef: inputRef, name: name, fullWidth: true, handleUpdate: function (event) {
203
- handleUpdate === null || handleUpdate === void 0 ? void 0 : handleUpdate(options.find(function (option) {
205
+ return (_jsxs(RoundedSelect, __assign({ onBlur: onBlur, onFocus: onFocus, inputRef: inputRef, name: name, fullWidth: true, handleUpdate: function (event) {
206
+ handleUpdate === null || handleUpdate === void 0 ? void 0 : handleUpdate(options === null || options === void 0 ? void 0 : options.find(function (option) {
204
207
  return getValueString(option) == event.target.value;
205
208
  }));
206
209
  }, onOpen: function () {
@@ -216,6 +219,6 @@ export default function RoundedSmartSelect(_a) {
216
219
  ? function (props) {
217
220
  return cloneElement(icon, props);
218
221
  }
219
- : undefined, showIcon: showIcon }, { children: [_jsx(MenuItem, __assign({ value: '', style: { whiteSpace: 'normal' } }, { children: _jsx("em", { children: "Sin Seleccionar" }) }), 'EMPTY'), options.map(function (option) { return (_jsx(MenuItem, __assign({ value: getValueString(option), style: { whiteSpace: 'normal' } }, { children: option.label }), getValueString(option))); })] })));
222
+ : undefined, showIcon: showIcon }, { children: [_jsx(MenuItem, __assign({ value: '', style: { whiteSpace: 'normal' } }, { children: _jsx("em", { children: options ? 'Sin Seleccionar' : 'Cargando...' }) }), 'EMPTY'), options === null || options === void 0 ? void 0 : options.map(function (option) { return (_jsx(MenuItem, __assign({ value: getValueString(option), style: { whiteSpace: 'normal' } }, { children: option.label }), getValueString(option))); })] })));
220
223
  }
221
224
  }
@@ -105,6 +105,9 @@ var useTextfieldStyles = function (props) {
105
105
  color: props.helperTextColor,
106
106
  marginRight: props.maxLength ? 40 : 14,
107
107
  },
108
+ '& .EF-MuiFormHelperText-root.Mui-error': {
109
+ color: props.errorColor,
110
+ },
108
111
  '& .EF-MuiOutlinedInput-multiline': {
109
112
  padding: 0,
110
113
  backgroundColor: props.innerBackgroundColor,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@arquimedes.co/eureka-forms",
3
3
  "repository": "git://github.com/Arquimede5/Eureka-Forms.git",
4
- "version":"1.9.35-test",
4
+ "version":"1.9.37-test",
5
5
  "scripts": {
6
6
  "start": "react-scripts start",
7
7
  "build": "react-scripts build",