@arquimedes.co/eureka-forms 1.9.91-test → 1.9.93-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.
@@ -63,7 +63,7 @@ import FormStepTypes, { EntityValueOptionTypes, } from '../../../../constants/Fo
63
63
  import styles from './MaterialEntityValuePickerStep.module.css';
64
64
  import StepComponent from '../../Step';
65
65
  import { Controller } from 'react-hook-form';
66
- import { calcFillerSize, calcStepWidth } from '../../StepFunctions';
66
+ import { calcFillerSize } from '../../StepFunctions';
67
67
  import { SmartSelect } from '../../SmartSelectStep/MaterialSmartSelectStep/MaterialSmartSelectStep';
68
68
  import widgetInstance from '../../../../AxiosWidget';
69
69
  import axiosInstance from '../../../../AxiosAPI';
@@ -129,9 +129,7 @@ function EntityValuePicker(_a) {
129
129
  : axiosInstance.get(url))];
130
130
  case 1:
131
131
  response = _d.sent();
132
- return [2 /*return*/, response.data.filter(function (option) {
133
- return step.options[option._id].type !== EntityValueOptionTypes.HIDE;
134
- })];
132
+ return [2 /*return*/, response.data.filter(function (option) { var _a; return ((_a = step.options[option._id]) === null || _a === void 0 ? void 0 : _a.type) !== EntityValueOptionTypes.HIDE; })];
135
133
  }
136
134
  });
137
135
  });
@@ -143,25 +141,17 @@ function EntityValuePicker(_a) {
143
141
  }
144
142
  };
145
143
  var renderSelect = function () {
146
- return (_jsx("div", __assign({ className: styles.container, style: {
147
- width: widthStats.currentBreakPoint <= step.size
148
- ? '100%'
149
- : calcStepWidth(step.size, form.size),
150
- minHeight: step.description ||
151
- (!postview && editable && step.required)
152
- ? '55px'
153
- : '43px',
154
- } }, { children: _jsx(SmartSelect, __assign({}, others, { form: form, level: level, control: control, postview: postview, getValues: getValues, widthStats: widthStats, value: value, inputRef: inputRef, editable: editable, step: step, icon: step.icon ? _jsx(InputIcon, { icon: step.icon }) : undefined, getOptions: getEntityValueOptions, getOptionSelected: function (option, value) {
155
- return option._id === value._id;
156
- }, calcDepError: function (steps) {
157
- for (var _i = 0, steps_1 = steps; _i < steps_1.length; _i++) {
158
- var step_1 = steps_1[_i];
159
- if (step_1.type === FormStepTypes.ENTITYVALUEPICKER) {
160
- return 'Selecciona un ' + step_1.label;
161
- }
144
+ return (_jsx(SmartSelect, __assign({}, others, { form: form, level: level, control: control, postview: postview, getValues: getValues, widthStats: widthStats, value: value, inputRef: inputRef, editable: editable, step: step, icon: step.icon ? _jsx(InputIcon, { icon: step.icon }) : undefined, getOptions: getEntityValueOptions, getOptionSelected: function (option, value) {
145
+ return option._id === value._id;
146
+ }, calcDepError: function (steps) {
147
+ for (var _i = 0, steps_1 = steps; _i < steps_1.length; _i++) {
148
+ var step_1 = steps_1[_i];
149
+ if (step_1.type === FormStepTypes.ENTITYVALUEPICKER) {
150
+ return 'Selecciona un ' + step_1.label;
162
151
  }
163
- return undefined;
164
- }, getValueString: function (value) { return value === null || value === void 0 ? void 0 : value._id; } })) }), step.id));
152
+ }
153
+ return undefined;
154
+ }, getValueString: function (value) { return value === null || value === void 0 ? void 0 : value._id; } })));
165
155
  };
166
156
  var mapNestedOption = function () {
167
157
  if (value) {
@@ -163,9 +163,12 @@ function MapperStep(props) {
163
163
  }
164
164
  export default MapperStep;
165
165
  function calcRecursiveData(element, newSteps, deps, customSteps, originalValues) {
166
+ var _a;
166
167
  if (originalValues === void 0) { originalValues = {}; }
167
- for (var _i = 0, _a = Object.keys(newSteps); _i < _a.length; _i++) {
168
- var idStep = _a[_i];
168
+ if (!newSteps)
169
+ return;
170
+ for (var _i = 0, _b = Object.keys(newSteps); _i < _b.length; _i++) {
171
+ var idStep = _b[_i];
169
172
  var step = newSteps[idStep];
170
173
  if (step.dependencies) {
171
174
  for (var i = 0; i < step.dependencies.length; i++) {
@@ -183,8 +186,8 @@ function calcRecursiveData(element, newSteps, deps, customSteps, originalValues)
183
186
  }
184
187
  switch (step.type) {
185
188
  case StepTypes.SELECTOR: {
186
- for (var _b = 0, _c = step.options; _b < _c.length; _b++) {
187
- var option = _c[_b];
189
+ for (var _c = 0, _d = step.options; _c < _d.length; _c++) {
190
+ var option = _d[_c];
188
191
  if (option.type === OptionTypes.NESTED) {
189
192
  for (var i = 0; i < option.steps.length; i++) {
190
193
  var idStep_1 = option.steps[i];
@@ -196,8 +199,8 @@ function calcRecursiveData(element, newSteps, deps, customSteps, originalValues)
196
199
  break;
197
200
  }
198
201
  case StepTypes.CLASSIFIER_SELECTOR:
199
- for (var _d = 0, _e = Object.keys(step.options); _d < _e.length; _d++) {
200
- var idOption = _e[_d];
202
+ for (var _e = 0, _f = Object.keys(step.options); _e < _f.length; _e++) {
203
+ var idOption = _f[_e];
201
204
  var option = step.options[idOption];
202
205
  if (option.type === ClassifierOptionTypes.NESTED) {
203
206
  for (var i = 0; i < option.steps.length; i++) {
@@ -210,8 +213,8 @@ function calcRecursiveData(element, newSteps, deps, customSteps, originalValues)
210
213
  break;
211
214
  case StepTypes.RATING:
212
215
  if (step.nestedSteps) {
213
- for (var _f = 0, _g = step.nestedSteps; _f < _g.length; _f++) {
214
- var steps = _g[_f];
216
+ for (var _g = 0, _h = step.nestedSteps; _g < _h.length; _g++) {
217
+ var steps = _h[_g];
215
218
  for (var i = 0; i < steps.length; i++) {
216
219
  var idStep_3 = steps[i];
217
220
  var newId = element.ids[idStep_3];
@@ -244,8 +247,8 @@ function calcRecursiveData(element, newSteps, deps, customSteps, originalValues)
244
247
  break;
245
248
  }
246
249
  case StepTypes.ENTITYVALUEPICKER:
247
- for (var _h = 0, _j = step.filters; _h < _j.length; _h++) {
248
- var filter = _j[_h];
250
+ for (var _j = 0, _k = step.filters; _j < _k.length; _j++) {
251
+ var filter = _k[_j];
249
252
  if (filter.idStep) {
250
253
  var newId = element.ids[filter.idStep];
251
254
  if (newId) {
@@ -254,8 +257,8 @@ function calcRecursiveData(element, newSteps, deps, customSteps, originalValues)
254
257
  }
255
258
  }
256
259
  }
257
- for (var _k = 0, _l = Object.keys(step.options); _k < _l.length; _k++) {
258
- var idOption = _l[_k];
260
+ for (var _l = 0, _m = Object.keys((_a = step.options) !== null && _a !== void 0 ? _a : {}); _l < _m.length; _l++) {
261
+ var idOption = _m[_l];
259
262
  var option = step.options[idOption];
260
263
  if (option.type === EntityValueOptionTypes.NESTED) {
261
264
  for (var i = 0; i < option.steps.length; i++) {
@@ -114,6 +114,7 @@ export function SmartSelect(_a) {
114
114
  return [3 /*break*/, 4];
115
115
  case 3:
116
116
  error_1 = _b.sent();
117
+ console.error(error_1);
117
118
  setOptions(null);
118
119
  return [3 /*break*/, 4];
119
120
  case 4:
@@ -82,6 +82,7 @@ var useTextfieldStyles = function (props) {
82
82
  },
83
83
  '& .EF-MuiOutlinedInput-notchedOutline': {
84
84
  borderColor: props.outlineColor,
85
+ pointerEvents: 'all',
85
86
  },
86
87
  height: props.height,
87
88
  '& .EF-MuiAutocomplete-input': {
@@ -210,7 +211,7 @@ export default function RoundedSmartSelect(_a) {
210
211
  }
211
212
  }, renderOption: function (option) {
212
213
  return typeof option === 'string' ? option : option.label;
213
- }, 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" }));
214
+ }, 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 }))); }, noOptionsText: "No hay opciones" }));
214
215
  }
215
216
  else {
216
217
  return (_jsxs(RoundedSelect, __assign({ onBlur: onBlur, onFocus: onFocus, inputRef: inputRef, name: name, fullWidth: true, handleUpdate: function (event) {
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.91-test",
4
+ "version":"1.9.93-test",
5
5
  "scripts": {
6
6
  "start": "react-scripts start",
7
7
  "build": "react-scripts build",