@arquimedes.co/eureka-forms 1.9.19-test → 1.9.20-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.
Files changed (64) hide show
  1. package/dist/App.js +205 -98
  2. package/dist/AxiosAPI.js +3 -3
  3. package/dist/AxiosWidget.js +4 -4
  4. package/dist/FormComponents/Form/ColumnForm/ColumnForm.js +207 -104
  5. package/dist/FormComponents/Form/ConfirmationDialog/ConfirmationDialog.js +17 -5
  6. package/dist/FormComponents/Form/Form.js +56 -29
  7. package/dist/FormComponents/Form/StepperForm/StepperForm.js +1 -1
  8. package/dist/FormComponents/Section/MaterialSection/MaterialSection.js +30 -7
  9. package/dist/FormComponents/Section/Section.js +13 -2
  10. package/dist/FormComponents/Step/@Construction/CBRIncidentsStep/CBRIncidentsStep.js +13 -2
  11. package/dist/FormComponents/Step/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/Incident/Incident.js +32 -9
  12. package/dist/FormComponents/Step/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/MaterialCBRIncidentsStep.js +64 -47
  13. package/dist/FormComponents/Step/@Construction/CBRLocativasStep/CBRLocativasStep.js +102 -41
  14. package/dist/FormComponents/Step/@Construction/CBRPropertyStep/CBRPropertyStep.js +92 -37
  15. package/dist/FormComponents/Step/AYFStepMapper.js +75 -23
  16. package/dist/FormComponents/Step/CBRStepMapper.js +144 -56
  17. package/dist/FormComponents/Step/CheckBoxStep/CheckBoxStep.js +26 -3
  18. package/dist/FormComponents/Step/CheckBoxStep/MaterialCheckBoxStep/MaterialCheckBoxStep.js +21 -6
  19. package/dist/FormComponents/Step/ClassifierSelectorStep/ClassifierSelectorStep.js +26 -3
  20. package/dist/FormComponents/Step/ClassifierSelectorStep/MaterialClassifierSelectorStep/MaterialClassifierSelectorStep.js +65 -32
  21. package/dist/FormComponents/Step/DatePickerStep/DatePickerStep.js +13 -2
  22. package/dist/FormComponents/Step/DatePickerStep/MaterialDatePickerStep/MaterialDatePickerStep.js +21 -6
  23. package/dist/FormComponents/Step/FileUploadStep/FileUploadStep.js +13 -2
  24. package/dist/FormComponents/Step/FileUploadStep/MaterialFileUploadStep/FileComponent/FileComponent.js +88 -27
  25. package/dist/FormComponents/Step/FileUploadStep/MaterialFileUploadStep/MaterialFileUploadStep.js +171 -81
  26. package/dist/FormComponents/Step/RatingStep/MaterialRatingStep/MaterialRatingStep.js +41 -15
  27. package/dist/FormComponents/Step/RatingStep/RatingStep.js +13 -2
  28. package/dist/FormComponents/Step/SelectorStep/MaterialSelectorStep/MaterialSelectorStep.js +52 -25
  29. package/dist/FormComponents/Step/SelectorStep/SelectorStep.js +26 -3
  30. package/dist/FormComponents/Step/SeparatorStep/MaterialSeparatorStep/MaterialSeparatorStep.js +2 -1
  31. package/dist/FormComponents/Step/SeparatorStep/SeparatorStep.js +26 -3
  32. package/dist/FormComponents/Step/SmartSelectStep/MaterialSmartSelectStep/MaterialSmartSelectStep.js +145 -83
  33. package/dist/FormComponents/Step/SmartSelectStep/SmartSelectStep.js +13 -2
  34. package/dist/FormComponents/Step/Step.js +39 -19
  35. package/dist/FormComponents/Step/StepFunctions.js +16 -14
  36. package/dist/FormComponents/Step/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaStep.js +62 -43
  37. package/dist/FormComponents/Step/TextAreaStep/TextAreaStep.js +13 -2
  38. package/dist/FormComponents/Step/TextInputStep/MaterialTextInputStep/MaterialTextInputStep.js +21 -6
  39. package/dist/FormComponents/Step/TextInputStep/TextInputStep.js +13 -2
  40. package/dist/FormComponents/Step/TitleStep/MaterialTitleStep/MaterialTitleStep.js +15 -3
  41. package/dist/FormComponents/Step/TitleStep/TitleStep.js +26 -3
  42. package/dist/FormComponents/Term/MaterialTerm/MaterialTerm.js +35 -19
  43. package/dist/FormComponents/Term/Term.js +13 -2
  44. package/dist/Widget.js +25 -13
  45. package/dist/constants/Files/FileExtensions.js +3 -3
  46. package/dist/constants/Files/FileMaxSize.js +1 -1
  47. package/dist/constants/InternalFormStyle.js +1 -1
  48. package/dist/constants/MaterialClassNameSeed.js +1 -1
  49. package/dist/controllers/FileService.js +86 -29
  50. package/dist/index.js +15 -4
  51. package/dist/shared/Loader/Loader.js +17 -5
  52. package/dist/shared/Navbar/Navbar.js +14 -2
  53. package/dist/shared/Rating/Rating.js +27 -4
  54. package/dist/shared/Rating/Ratings/LikeRating.js +21 -9
  55. package/dist/shared/Rating/Ratings/SatisfactionRating.js +27 -15
  56. package/dist/shared/Rating/Ratings/ScaleRating.js +49 -22
  57. package/dist/shared/RoundedButton/RoundedButton.js +24 -12
  58. package/dist/shared/RoundedCheckBox/RoundedCheckBox.js +84 -39
  59. package/dist/shared/RoundedDatePicker/RoundedDatePicker.js +286 -235
  60. package/dist/shared/RoundedSelect/RoundedSelect.js +152 -103
  61. package/dist/shared/RoundedSmartSelect/RoundedSmartSelect.js +160 -125
  62. package/dist/shared/RoundedTextField/RoundedTextField.js +137 -92
  63. package/dist/utils/CbrFunctions.js +30 -30
  64. package/package.json +1 -3
@@ -1,3 +1,50 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
13
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
14
+ return new (P || (P = Promise))(function (resolve, reject) {
15
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
16
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
17
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
18
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
19
+ });
20
+ };
21
+ var __generator = (this && this.__generator) || function (thisArg, body) {
22
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
23
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
24
+ function verb(n) { return function (v) { return step([n, v]); }; }
25
+ function step(op) {
26
+ if (f) throw new TypeError("Generator is already executing.");
27
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
28
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
29
+ if (y = 0, t) op = [op[0] & 2, t.value];
30
+ switch (op[0]) {
31
+ case 0: case 1: t = op; break;
32
+ case 4: _.label++; return { value: op[1], done: false };
33
+ case 5: _.label++; y = op[1]; op = [0]; continue;
34
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
35
+ default:
36
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
37
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
38
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
39
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
40
+ if (t[2]) _.ops.pop();
41
+ _.trys.pop(); continue;
42
+ }
43
+ op = body.call(thisArg, _);
44
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
45
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
46
+ }
47
+ };
1
48
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
49
  import CBRFormStepTypes from '../../constants/CBRFormStepTypes';
3
50
  import PersonRoundedIcon from '@material-ui/icons/PersonRounded';
@@ -8,41 +55,71 @@ import CBRIncidentsStep from './@Construction/CBRIncidentsStep/CBRIncidentsStep'
8
55
  import CBRLocativasStep from './@Construction/CBRLocativasStep/CBRLocativasStep';
9
56
  import axios from 'axios';
10
57
  import CBRPropertyStep from './@Construction/CBRPropertyStep/CBRPropertyStep';
11
- const baseUrl = `https://integrations.${process.env.REACT_APP_DOMAIN}/sinco/cbr/`;
58
+ var baseUrl = "https://integrations.".concat(process.env.REACT_APP_DOMAIN, "/sinco/cbr/");
12
59
  function CBRStepMapper(props) {
13
- const getTipoDocOptions = async (idOrganization) => {
14
- return (await axios.get(baseUrl + 'TiposDoc?idOrganization=' + idOrganization)).data;
15
- };
16
- const getProyectoOptions = async (idOrganization, step, dependencyStore) => {
17
- const idMacroProyecto = dependencyStore[step.dependencies?.[0] ?? '']?.id;
18
- let proyectos = (await axios.get(baseUrl + 'Proyectos?idOrganization=' + idOrganization)).data;
19
- if (idMacroProyecto) {
20
- proyectos = proyectos.filter((proyecto) => proyecto.idMacroProyecto === idMacroProyecto);
21
- }
22
- return proyectos;
23
- };
24
- const getMacroProyectoOptions = async (idOrganization) => {
25
- return (await axios.get(baseUrl + 'MacroProyectos?idOrganization=' + idOrganization)).data;
26
- };
27
- const getTipoSolicitanteOptions = async (idOrganization) => {
28
- return (await axios.get(baseUrl + 'TiposSolicitante?idOrganization=' + idOrganization)).data;
29
- };
30
- const getTipoEspaciosOptions = async (idOrganization, step, dependencyStore) => {
31
- if (step.dependencies) {
32
- const idProyecto = dependencyStore[step.dependencies[0]]?.id;
33
- if (!idProyecto) {
34
- return null; //null para indicar que falta la depedency
60
+ var _this = this;
61
+ var getTipoDocOptions = function (idOrganization) { return __awaiter(_this, void 0, void 0, function () {
62
+ return __generator(this, function (_a) {
63
+ switch (_a.label) {
64
+ case 0: return [4 /*yield*/, axios.get(baseUrl + 'TiposDoc?idOrganization=' + idOrganization)];
65
+ case 1: return [2 /*return*/, (_a.sent()).data];
35
66
  }
36
- return (await axios.get(baseUrl +
37
- 'TiposEspacio?idProyecto=' +
38
- idProyecto +
39
- '&idOrganization=' +
40
- idOrganization)).data;
41
- }
42
- else {
43
- return null;
44
- }
45
- };
67
+ });
68
+ }); };
69
+ var getProyectoOptions = function (idOrganization, step, dependencyStore) { return __awaiter(_this, void 0, void 0, function () {
70
+ var idMacroProyecto, proyectos;
71
+ var _a, _b, _c;
72
+ return __generator(this, function (_d) {
73
+ switch (_d.label) {
74
+ case 0:
75
+ idMacroProyecto = (_c = dependencyStore[(_b = (_a = step.dependencies) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : '']) === null || _c === void 0 ? void 0 : _c.id;
76
+ return [4 /*yield*/, axios.get(baseUrl + 'Proyectos?idOrganization=' + idOrganization)];
77
+ case 1:
78
+ proyectos = (_d.sent()).data;
79
+ if (idMacroProyecto) {
80
+ proyectos = proyectos.filter(function (proyecto) { return proyecto.idMacroProyecto === idMacroProyecto; });
81
+ }
82
+ return [2 /*return*/, proyectos];
83
+ }
84
+ });
85
+ }); };
86
+ var getMacroProyectoOptions = function (idOrganization) { return __awaiter(_this, void 0, void 0, function () {
87
+ return __generator(this, function (_a) {
88
+ switch (_a.label) {
89
+ case 0: return [4 /*yield*/, axios.get(baseUrl + 'MacroProyectos?idOrganization=' + idOrganization)];
90
+ case 1: return [2 /*return*/, (_a.sent()).data];
91
+ }
92
+ });
93
+ }); };
94
+ var getTipoSolicitanteOptions = function (idOrganization) { return __awaiter(_this, void 0, void 0, function () {
95
+ return __generator(this, function (_a) {
96
+ switch (_a.label) {
97
+ case 0: return [4 /*yield*/, axios.get(baseUrl + 'TiposSolicitante?idOrganization=' + idOrganization)];
98
+ case 1: return [2 /*return*/, (_a.sent()).data];
99
+ }
100
+ });
101
+ }); };
102
+ var getTipoEspaciosOptions = function (idOrganization, step, dependencyStore) { return __awaiter(_this, void 0, void 0, function () {
103
+ var idProyecto;
104
+ var _a;
105
+ return __generator(this, function (_b) {
106
+ switch (_b.label) {
107
+ case 0:
108
+ if (!step.dependencies) return [3 /*break*/, 2];
109
+ idProyecto = (_a = dependencyStore[step.dependencies[0]]) === null || _a === void 0 ? void 0 : _a.id;
110
+ if (!idProyecto) {
111
+ return [2 /*return*/, null]; //null para indicar que falta la depedency
112
+ }
113
+ return [4 /*yield*/, axios.get(baseUrl +
114
+ 'TiposEspacio?idProyecto=' +
115
+ idProyecto +
116
+ '&idOrganization=' +
117
+ idOrganization)];
118
+ case 1: return [2 /*return*/, (_b.sent()).data];
119
+ case 2: return [2 /*return*/, null];
120
+ }
121
+ });
122
+ }); };
46
123
  switch (props.step.type) {
47
124
  case CBRFormStepTypes.CBR_CEL:
48
125
  case CBRFormStepTypes.CBR_EMAIL:
@@ -51,66 +128,77 @@ function CBRStepMapper(props) {
51
128
  case CBRFormStepTypes.CBR_FIRST_NAME:
52
129
  case CBRFormStepTypes.CBR_MIDDLE_NAME:
53
130
  case CBRFormStepTypes.CBR_SECOND_LAST_NAME:
54
- return _jsx(TextInputStep, { ...props, step: props.step });
131
+ return _jsx(TextInputStep, __assign({}, props, { step: props.step }));
55
132
  case CBRFormStepTypes.CBR_DOC:
56
- return (_jsx(TextInputStep, { ...props, step: props.step, icon: _jsx(DocumentIconComponent, {}) }));
133
+ return (_jsx(TextInputStep, __assign({}, props, { step: props.step, icon: _jsx(DocumentIconComponent, {}) })));
57
134
  case CBRFormStepTypes.CBR_TIPO_DOC:
58
- return (_jsx(SmartSelectStep, { ...props, step: { ...props.step, showIcon: false }, getOptions: getTipoDocOptions, getOptionSelected: (option, value) => option.id === value.id, getValueString: (value) => value?.id }));
135
+ return (_jsx(SmartSelectStep, __assign({}, props, { step: __assign(__assign({}, props.step), { showIcon: false }), getOptions: getTipoDocOptions, getOptionSelected: function (option, value) {
136
+ return option.id === value.id;
137
+ }, getValueString: function (value) { return value === null || value === void 0 ? void 0 : value.id; } })));
59
138
  case CBRFormStepTypes.CBR_MACRO_PROYECTO:
60
- return (_jsx(SmartSelectStep, { ...props, step: props.step, icon: _jsx(ProjectIcon, { fill: "#757575", style: {
139
+ return (_jsx(SmartSelectStep, __assign({}, props, { step: props.step, icon: _jsx(ProjectIcon, { fill: "#757575", style: {
61
140
  display: 'flex',
62
141
  height: 23,
63
142
  width: 23,
64
- } }), getOptions: getMacroProyectoOptions, getOptionSelected: (option, value) => option.id === value.id, getValueString: (value) => value?.id }));
143
+ } }), getOptions: getMacroProyectoOptions, getOptionSelected: function (option, value) {
144
+ return option.id === value.id;
145
+ }, getValueString: function (value) { return value === null || value === void 0 ? void 0 : value.id; } })));
65
146
  case CBRFormStepTypes.CBR_PROYECTO:
66
- return (_jsx(SmartSelectStep, { ...props, step: props.step, icon: _jsx(ProjectIcon, { fill: "#757575", style: {
147
+ return (_jsx(SmartSelectStep, __assign({}, props, { step: props.step, icon: _jsx(ProjectIcon, { fill: "#757575", style: {
67
148
  display: 'flex',
68
149
  height: 24,
69
150
  width: 24,
70
- } }), getOptions: getProyectoOptions, getOptionSelected: (option, value) => option.id === value.id, getValueString: (value) => value?.id }));
151
+ } }), getOptions: getProyectoOptions, getOptionSelected: function (option, value) {
152
+ return option.id === value.id;
153
+ }, getValueString: function (value) { return value === null || value === void 0 ? void 0 : value.id; } })));
71
154
  case CBRFormStepTypes.CBR_INMUEBLE:
72
- return _jsx(CBRPropertyStep, { ...props, step: props.step });
155
+ return _jsx(CBRPropertyStep, __assign({}, props, { step: props.step }));
73
156
  case CBRFormStepTypes.CBR_TIPO_SOLICITANTE:
74
- return (_jsx(SmartSelectStep, { ...props, step: props.step, icon: _jsx(PersonRoundedIcon, { fill: "#757575", style: {
157
+ return (_jsx(SmartSelectStep, __assign({}, props, { step: props.step, icon: _jsx(PersonRoundedIcon, { fill: "#757575", style: {
75
158
  display: 'flex',
76
159
  height: 23,
77
160
  width: 23,
78
161
  marginRight: 3,
79
162
  marginTop: 1,
80
- } }), getOptions: getTipoSolicitanteOptions, getOptionSelected: (option, value) => option.id === value.id, getValueString: (value) => value?.id }));
163
+ } }), getOptions: getTipoSolicitanteOptions, getOptionSelected: function (option, value) {
164
+ return option.id === value.id;
165
+ }, getValueString: function (value) { return value === null || value === void 0 ? void 0 : value.id; } })));
81
166
  case CBRFormStepTypes.CBR_TIPO_ESPACIO:
82
- return (_jsx(SmartSelectStep, { ...props, step: props.step, icon: _jsx(SpaceTypeIcon, { fill: "#757575", style: {
167
+ return (_jsx(SmartSelectStep, __assign({}, props, { step: props.step, icon: _jsx(SpaceTypeIcon, { fill: "#757575", style: {
83
168
  display: 'flex',
84
169
  height: 23,
85
170
  width: 23,
86
- } }), getOptions: getTipoEspaciosOptions, calcDepError: (types) => {
87
- for (const type of types) {
171
+ } }), getOptions: getTipoEspaciosOptions, calcDepError: function (types) {
172
+ for (var _i = 0, _a = types; _i < _a.length; _i++) {
173
+ var type = _a[_i];
88
174
  if (type === CBRFormStepTypes.CBR_PROYECTO) {
89
175
  return 'Selecciona un proyecto';
90
176
  }
91
177
  }
92
178
  return undefined;
93
- }, getOptionSelected: (option, value) => option.id === value.id, getValueString: (value) => value?.id }));
179
+ }, getOptionSelected: function (option, value) {
180
+ return option.id === value.id;
181
+ }, getValueString: function (value) { return value === null || value === void 0 ? void 0 : value.id; } })));
94
182
  case CBRFormStepTypes.CBR_LOCATIVAS:
95
- return _jsx(CBRLocativasStep, { ...props, step: props.step });
183
+ return _jsx(CBRLocativasStep, __assign({}, props, { step: props.step }));
96
184
  case CBRFormStepTypes.CBR_COMENTARIO:
97
- return _jsx(TextAreaStep, { ...props, step: props.step });
185
+ return _jsx(TextAreaStep, __assign({}, props, { step: props.step }));
98
186
  case CBRFormStepTypes.CBR_INCIDENCIAS:
99
- return _jsx(CBRIncidentsStep, { ...props, step: props.step });
187
+ return _jsx(CBRIncidentsStep, __assign({}, props, { step: props.step }));
100
188
  default:
101
189
  return _jsx("div", {});
102
190
  }
103
191
  }
104
192
  export default CBRStepMapper;
105
193
  function DocumentIconComponent(props) {
106
- return (_jsx("div", { style: {
194
+ return (_jsx("div", __assign({ style: {
107
195
  marginRight: 2,
108
- }, children: _jsx(DocumentIcon, { className: props.className, fill: "#757575", style: {
196
+ } }, { children: _jsx(DocumentIcon, { className: props.className, fill: "#757575", style: {
109
197
  display: 'flex',
110
198
  height: 23,
111
199
  width: 23,
112
- } }) }));
200
+ } }) })));
113
201
  }
114
- const SpaceTypeIcon = (props) => (_jsxs("svg", { fill: props.fill, className: props.class, style: props.style, width: "512pt", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 64 64", children: [_jsx("title", { children: "SpaceType" }), _jsxs("g", { id: "space_type", "data-name": "space type", children: [_jsx("path", { d: "M29.74,39A10.21,10.21,0,0,0,27.61,39,1.63,1.63,0,0,0,26,40.61V53.35A1.63,1.63,0,0,0,27.61,55h1.74A1.63,1.63,0,0,0,31,53.35V40.61A1.63,1.63,0,0,0,29.74,39Z" }), _jsx("path", { d: "M57.35,39a10.27,10.27,0,0,0-2.13.05A1.63,1.63,0,0,0,54,40.61V53.35A1.63,1.63,0,0,0,55.61,55h1.74A1.63,1.63,0,0,0,59,53.35V40.61A1.63,1.63,0,0,0,57.35,39Z" }), _jsx("path", { d: "M33,54a1,1,0,0,0,1,1H51a1,1,0,0,0,1-1V49H33Z" }), _jsx("path", { d: "M49,42H36a3,3,0,0,0-3,3v2H52V45A3,3,0,0,0,49,42Z" }), _jsx("path", { d: "M54,31a5,5,0,0,0-5-5H36a5,5,0,0,0-5,5v6.39a3.62,3.62,0,0,1,1.86,2.24A4.68,4.68,0,0,1,33,41c1.37-1.37,4.2-1,16-1a5,5,0,0,1,2.68.78c.64.39.07.39.46-1.15a3.65,3.65,0,0,1,1.43-2C54.15,37.19,54,38.41,54,31Z" }), _jsx("path", { d: "M17,32c-5.85,0-4.33,0-4-.05a7.06,7.06,0,0,0,6-7,7,7,0,0,0-4.47,1.59,7.08,7.08,0,0,0-2.07-5.05,7.06,7.06,0,0,0-2.07,5.05,7,7,0,0,0-4.47-1.59,7.07,7.07,0,0,0,6,7c.36.08,1.89.05-4,.05l1.71,6H3V55H5V50H20v5h2V38H15.26ZM15,45H10V43h5Z" }), _jsx("path", { d: "M26,21h6L31,10H19L18,21h6V40.61a3.63,3.63,0,0,1,2-3.24Z" })] })] }));
115
- const DocumentIcon = (props) => (_jsx("svg", { fill: props.fill, className: props.class, style: props.style, id: "bold", enableBackground: "new 0 0 24 24", height: "512", viewBox: "0 0 24 24", width: "512", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { d: "m21.25 3h-18.5c-1.517 0-2.75 1.233-2.75 2.75v12.5c0 1.517 1.233 2.75 2.75 2.75h18.5c1.517 0 2.75-1.233 2.75-2.75v-12.5c0-1.517-1.233-2.75-2.75-2.75zm-13.75 4c1.378 0 2.5 1.122 2.5 2.5s-1.122 2.5-2.5 2.5-2.5-1.122-2.5-2.5 1.122-2.5 2.5-2.5zm4.5 9.25c0 .414-.336.75-.75.75h-7.5c-.414 0-.75-.336-.75-.75v-.5c0-1.517 1.233-2.75 2.75-2.75h3.5c1.517 0 2.75 1.233 2.75 2.75zm8.25.75h-5.5c-.414 0-.75-.336-.75-.75s.336-.75.75-.75h5.5c.414 0 .75.336.75.75s-.336.75-.75.75zm0-4h-5.5c-.414 0-.75-.336-.75-.75s.336-.75.75-.75h5.5c.414 0 .75.336.75.75s-.336.75-.75.75zm0-4h-5.5c-.414 0-.75-.336-.75-.75s.336-.75.75-.75h5.5c.414 0 .75.336.75.75s-.336.75-.75.75z" }) }));
116
- const ProjectIcon = (props) => (_jsx("svg", { fill: props.fill, className: props.class, style: props.style, height: "480pt", viewBox: "0 -8 480 480", width: "480pt", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { d: "m440 448v-49.960938c10.546875-6.214843 16.726562-17.816406 16-30.039062 0-17.671875-10.742188-32-24-32s-24 14.328125-24 32c-.726562 12.222656 5.453125 23.824219 16 30.039062v49.960938h-56v-243.054688l-48-24v43.054688h24v16h-24v32h24v16h-24v32h24v16h-24v32h24v16h-24v32h24v16h-24v16h-16v-321.96875l-96-27.421875v29.390625h56v16h-56v32h56v16h-56v32h56v16h-56v32h56v16h-56v32h56v16h-56v32h56v16h-56v32h56v16h-56v16h-16v-448h-144v32h72v16h-72v32h72v16h-72v32h72v16h-72v32h72v16h-72v32h72v16h-72v32h72v16h-72v32h72v16h-72v32h72v16h-72v32h72v16h-72v16h-48v16h480v-16zm0 0" }) }));
202
+ var SpaceTypeIcon = function (props) { return (_jsxs("svg", __assign({ fill: props.fill, className: props.class, style: props.style, width: "512pt", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 64 64" }, { children: [_jsx("title", { children: "SpaceType" }), _jsxs("g", __assign({ id: "space_type", "data-name": "space type" }, { children: [_jsx("path", { d: "M29.74,39A10.21,10.21,0,0,0,27.61,39,1.63,1.63,0,0,0,26,40.61V53.35A1.63,1.63,0,0,0,27.61,55h1.74A1.63,1.63,0,0,0,31,53.35V40.61A1.63,1.63,0,0,0,29.74,39Z" }), _jsx("path", { d: "M57.35,39a10.27,10.27,0,0,0-2.13.05A1.63,1.63,0,0,0,54,40.61V53.35A1.63,1.63,0,0,0,55.61,55h1.74A1.63,1.63,0,0,0,59,53.35V40.61A1.63,1.63,0,0,0,57.35,39Z" }), _jsx("path", { d: "M33,54a1,1,0,0,0,1,1H51a1,1,0,0,0,1-1V49H33Z" }), _jsx("path", { d: "M49,42H36a3,3,0,0,0-3,3v2H52V45A3,3,0,0,0,49,42Z" }), _jsx("path", { d: "M54,31a5,5,0,0,0-5-5H36a5,5,0,0,0-5,5v6.39a3.62,3.62,0,0,1,1.86,2.24A4.68,4.68,0,0,1,33,41c1.37-1.37,4.2-1,16-1a5,5,0,0,1,2.68.78c.64.39.07.39.46-1.15a3.65,3.65,0,0,1,1.43-2C54.15,37.19,54,38.41,54,31Z" }), _jsx("path", { d: "M17,32c-5.85,0-4.33,0-4-.05a7.06,7.06,0,0,0,6-7,7,7,0,0,0-4.47,1.59,7.08,7.08,0,0,0-2.07-5.05,7.06,7.06,0,0,0-2.07,5.05,7,7,0,0,0-4.47-1.59,7.07,7.07,0,0,0,6,7c.36.08,1.89.05-4,.05l1.71,6H3V55H5V50H20v5h2V38H15.26ZM15,45H10V43h5Z" }), _jsx("path", { d: "M26,21h6L31,10H19L18,21h6V40.61a3.63,3.63,0,0,1,2-3.24Z" })] }))] }))); };
203
+ var DocumentIcon = function (props) { return (_jsx("svg", __assign({ fill: props.fill, className: props.class, style: props.style, id: "bold", enableBackground: "new 0 0 24 24", height: "512", viewBox: "0 0 24 24", width: "512", xmlns: "http://www.w3.org/2000/svg" }, { children: _jsx("path", { d: "m21.25 3h-18.5c-1.517 0-2.75 1.233-2.75 2.75v12.5c0 1.517 1.233 2.75 2.75 2.75h18.5c1.517 0 2.75-1.233 2.75-2.75v-12.5c0-1.517-1.233-2.75-2.75-2.75zm-13.75 4c1.378 0 2.5 1.122 2.5 2.5s-1.122 2.5-2.5 2.5-2.5-1.122-2.5-2.5 1.122-2.5 2.5-2.5zm4.5 9.25c0 .414-.336.75-.75.75h-7.5c-.414 0-.75-.336-.75-.75v-.5c0-1.517 1.233-2.75 2.75-2.75h3.5c1.517 0 2.75 1.233 2.75 2.75zm8.25.75h-5.5c-.414 0-.75-.336-.75-.75s.336-.75.75-.75h5.5c.414 0 .75.336.75.75s-.336.75-.75.75zm0-4h-5.5c-.414 0-.75-.336-.75-.75s.336-.75.75-.75h5.5c.414 0 .75.336.75.75s-.336.75-.75.75zm0-4h-5.5c-.414 0-.75-.336-.75-.75s.336-.75.75-.75h5.5c.414 0 .75.336.75.75s-.336.75-.75.75z" }) }))); };
204
+ var ProjectIcon = function (props) { return (_jsx("svg", __assign({ fill: props.fill, className: props.class, style: props.style, height: "480pt", viewBox: "0 -8 480 480", width: "480pt", xmlns: "http://www.w3.org/2000/svg" }, { children: _jsx("path", { d: "m440 448v-49.960938c10.546875-6.214843 16.726562-17.816406 16-30.039062 0-17.671875-10.742188-32-24-32s-24 14.328125-24 32c-.726562 12.222656 5.453125 23.824219 16 30.039062v49.960938h-56v-243.054688l-48-24v43.054688h24v16h-24v32h24v16h-24v32h24v16h-24v32h24v16h-24v32h24v16h-24v16h-16v-321.96875l-96-27.421875v29.390625h56v16h-56v32h56v16h-56v32h56v16h-56v32h56v16h-56v32h56v16h-56v32h56v16h-56v32h56v16h-56v16h-16v-448h-144v32h72v16h-72v32h72v16h-72v32h72v16h-72v32h72v16h-72v32h72v16h-72v32h72v16h-72v32h72v16h-72v32h72v16h-72v32h72v16h-72v16h-48v16h480v-16zm0 0" }) }))); };
@@ -1,13 +1,36 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __rest = (this && this.__rest) || function (s, e) {
13
+ var t = {};
14
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
+ t[p] = s[p];
16
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
+ t[p[i]] = s[p[i]];
20
+ }
21
+ return t;
22
+ };
1
23
  import { jsx as _jsx } from "react/jsx-runtime";
2
24
  import { FormStyleTypes } from '../../../constants/FormStepTypes';
3
25
  import MaterialCheckBoxStep from './MaterialCheckBoxStep/MaterialCheckBoxStep';
4
- function CheckboxStep({ formStyle, ...others }) {
26
+ function CheckboxStep(_a) {
27
+ var formStyle = _a.formStyle, others = __rest(_a, ["formStyle"]);
5
28
  switch (formStyle.type) {
6
29
  case FormStyleTypes.MATERIAL: {
7
- return _jsx(MaterialCheckBoxStep, { formStyle: formStyle, ...others });
30
+ return _jsx(MaterialCheckBoxStep, __assign({ formStyle: formStyle }, others));
8
31
  }
9
32
  default: {
10
- return _jsx(MaterialCheckBoxStep, { formStyle: formStyle, ...others });
33
+ return _jsx(MaterialCheckBoxStep, __assign({ formStyle: formStyle }, others));
11
34
  }
12
35
  }
13
36
  }
@@ -1,24 +1,39 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
1
12
  import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
2
13
  import styles from './MaterialCheckBoxStep.module.css';
3
14
  import { calcStepWidth } from '../../StepFunctions';
4
15
  import RoundedCheckBox from '../../../../shared/RoundedCheckBox/RoundedCheckBox';
5
16
  import { Controller } from 'react-hook-form';
6
- function CheckBoxStep({ step, form, errors, control, editable, postview, formStyle, widthStats, }) {
7
- return (_jsxs("div", { className: styles.container, style: {
17
+ function CheckBoxStep(_a) {
18
+ var step = _a.step, form = _a.form, errors = _a.errors, control = _a.control, editable = _a.editable, postview = _a.postview, formStyle = _a.formStyle, widthStats = _a.widthStats;
19
+ return (_jsxs("div", __assign({ className: styles.container, style: {
8
20
  width: widthStats.currentBreakPoint <= step.size
9
21
  ? '100%'
10
22
  : calcStepWidth(step.size, form.size),
11
23
  minHeight: step.description || step.required ? '55px' : '43px',
12
- }, children: [_jsxs("div", { className: styles.labelCheckBoxContainer, children: [step.label && (_jsxs("div", { className: styles.checkboxLbl, children: [step.label, step.required ? ' *' : '', ":"] })), _jsx(Controller, { name: step.id, control: control, defaultValue: false, rules: {
24
+ } }, { children: [_jsxs("div", __assign({ className: styles.labelCheckBoxContainer }, { children: [step.label && (_jsxs("div", __assign({ className: styles.checkboxLbl }, { children: [step.label, step.required ? ' *' : '', ":"] }))), _jsx(Controller, { name: step.id, control: control, defaultValue: false, rules: {
13
25
  required: step.required
14
26
  ? 'Este campo es obligatorio'
15
27
  : undefined,
16
- }, shouldUnregister: true, render: ({ field }) => (_jsx(RoundedCheckBox, { ...field, "data-testid": step.id, inputRef: field.ref, padding: "0px", size: "1.6rem", cantEdit: !editable || postview, checkedColor: formStyle.primaryColor, uncheckedColor: formStyle.outlineColor, checked: field.value })) })] }), (step.description || !!errors[step.id]) && (_jsx("div", { className: styles.descriptionPar, style: {
28
+ }, shouldUnregister: true, render: function (_a) {
29
+ var field = _a.field;
30
+ return (_jsx(RoundedCheckBox, __assign({}, field, { "data-testid": step.id, inputRef: field.ref, padding: "0px", size: "1.6rem", cantEdit: !editable || postview, checkedColor: formStyle.primaryColor, uncheckedColor: formStyle.outlineColor, checked: field.value })));
31
+ } })] })), (step.description || !!errors[step.id]) && (_jsx("div", __assign({ className: styles.descriptionPar, style: {
17
32
  color: !!errors[step.id]
18
33
  ? formStyle.errorColor
19
34
  : formStyle.descriptionTextColor,
20
- }, children: !!errors[step.id]
35
+ } }, { children: !!errors[step.id]
21
36
  ? 'Este campo es obligatorio'
22
- : step.description }))] }));
37
+ : step.description })))] })));
23
38
  }
24
39
  export default CheckBoxStep;
@@ -1,13 +1,36 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __rest = (this && this.__rest) || function (s, e) {
13
+ var t = {};
14
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
+ t[p] = s[p];
16
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
+ t[p[i]] = s[p[i]];
20
+ }
21
+ return t;
22
+ };
1
23
  import { jsx as _jsx } from "react/jsx-runtime";
2
24
  import { FormStyleTypes } from '../../../constants/FormStepTypes';
3
25
  import MaterialClassifierSelectorStep from './MaterialClassifierSelectorStep/MaterialClassifierSelectorStep';
4
- function ClassifierSelectorStep({ formStyle, ...others }) {
26
+ function ClassifierSelectorStep(_a) {
27
+ var formStyle = _a.formStyle, others = __rest(_a, ["formStyle"]);
5
28
  switch (formStyle.type) {
6
29
  case FormStyleTypes.MATERIAL: {
7
- return (_jsx(MaterialClassifierSelectorStep, { formStyle: formStyle, ...others }));
30
+ return (_jsx(MaterialClassifierSelectorStep, __assign({ formStyle: formStyle }, others)));
8
31
  }
9
32
  default: {
10
- return (_jsx(MaterialClassifierSelectorStep, { formStyle: formStyle, ...others }));
33
+ return (_jsx(MaterialClassifierSelectorStep, __assign({ formStyle: formStyle }, others)));
11
34
  }
12
35
  }
13
36
  }
@@ -1,3 +1,25 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __rest = (this && this.__rest) || function (s, e) {
13
+ var t = {};
14
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
+ t[p] = s[p];
16
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
+ t[p[i]] = s[p[i]];
20
+ }
21
+ return t;
22
+ };
1
23
  import { createElement as _createElement } from "react";
2
24
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
25
  import React, { useState } from 'react';
@@ -7,69 +29,77 @@ import StepComponent from '../../Step';
7
29
  import { Controller } from 'react-hook-form';
8
30
  import { calcFillerSize, calcStepWidth } from '../../StepFunctions';
9
31
  import RoundedSmartSelect from '../../../../shared/RoundedSmartSelect/RoundedSmartSelect';
10
- function ClassifierSelector({ step, form, level, errors, value, onBlur, control, editable, onChange, postview, inputRef, formStyle, getValues, widthStats, handleSizeChange, ...others }) {
11
- const [fillerSize, setFillerSize] = useState(level === 0
32
+ function ClassifierSelector(_a) {
33
+ var step = _a.step, form = _a.form, level = _a.level, errors = _a.errors, value = _a.value, onBlur = _a.onBlur, control = _a.control, editable = _a.editable, onChange = _a.onChange, postview = _a.postview, inputRef = _a.inputRef, formStyle = _a.formStyle, getValues = _a.getValues, widthStats = _a.widthStats, handleSizeChange = _a.handleSizeChange, others = __rest(_a, ["step", "form", "level", "errors", "value", "onBlur", "control", "editable", "onChange", "postview", "inputRef", "formStyle", "getValues", "widthStats", "handleSizeChange"]);
34
+ var _b = useState(level === 0
12
35
  ? calcFillerSize(step, form.steps, getValues(), form.size)
13
- : 0);
36
+ : 0), fillerSize = _b[0], setFillerSize = _b[1];
14
37
  if (!step.idClassifier) {
15
38
  return _jsx("div", {});
16
39
  }
17
- const classifier = form.classifiers[step.idClassifier];
40
+ var classifier = form.classifiers[step.idClassifier];
18
41
  if (!classifier) {
19
42
  return _jsx("div", {});
20
43
  }
21
- const options = classifier.children
22
- .filter((classifier) => step.options[typeof classifier === 'string'
23
- ? classifier
24
- : classifier?._id]?.type !== ClassifierOptionTypes.HIDE)
25
- .map((classifier) => typeof classifier === 'string'
26
- ? {
27
- value: classifier,
28
- label: form.classifiers[classifier]?.name,
29
- }
30
- : { value: classifier._id, label: classifier.name });
31
- const sizeChange = () => {
44
+ var options = classifier.children
45
+ .filter(function (classifier) {
46
+ var _a;
47
+ return ((_a = step.options[typeof classifier === 'string'
48
+ ? classifier
49
+ : classifier === null || classifier === void 0 ? void 0 : classifier._id]) === null || _a === void 0 ? void 0 : _a.type) !== ClassifierOptionTypes.HIDE;
50
+ })
51
+ .map(function (classifier) {
52
+ var _a;
53
+ return typeof classifier === 'string'
54
+ ? {
55
+ value: classifier,
56
+ label: (_a = form.classifiers[classifier]) === null || _a === void 0 ? void 0 : _a.name,
57
+ }
58
+ : { value: classifier._id, label: classifier.name };
59
+ });
60
+ var sizeChange = function () {
32
61
  handleSizeChange();
33
62
  if (level === 0) {
34
63
  setFillerSize(calcFillerSize(step, form.steps, getValues(), form.size));
35
64
  }
36
65
  };
37
- const renderSelect = () => {
38
- return (_jsx("div", { className: styles.container, style: {
66
+ var renderSelect = function () {
67
+ var _a;
68
+ return (_jsx("div", __assign({ className: styles.container, style: {
39
69
  width: widthStats.currentBreakPoint <= step.size
40
70
  ? '100%'
41
71
  : calcStepWidth(step.size, form.size),
42
72
  minHeight: step.description || step.required ? '55px' : '43px',
43
- }, children: _jsx(RoundedSmartSelect, { value: value, onBlur: onBlur, disabled: false, loading: false, options: options, inputRef: inputRef, cantEdit: !editable || postview, fullWidth: true, backgroundColor: "transparent", innerBackgroundColor: formStyle.stepBackgroundColor ?? 'white', label: step.label ? step.label : classifier.name, required: step.required, height: '31px', searchable: step.searchable, icon: undefined, helperTextColor: formStyle.descriptionTextColor, focusColor: formStyle.primaryColor, outlineColor: formStyle.outlineColor, errorColor: formStyle.errorColor, color: formStyle.textColor, containerMargin: "0px", handleUpdate: (value) => {
73
+ } }, { children: _jsx(RoundedSmartSelect, { value: value, onBlur: onBlur, disabled: false, loading: false, options: options, inputRef: inputRef, cantEdit: !editable || postview, fullWidth: true, backgroundColor: "transparent", innerBackgroundColor: (_a = formStyle.stepBackgroundColor) !== null && _a !== void 0 ? _a : 'white', label: step.label ? step.label : classifier.name, required: step.required, height: '31px', searchable: step.searchable, icon: undefined, helperTextColor: formStyle.descriptionTextColor, focusColor: formStyle.primaryColor, outlineColor: formStyle.outlineColor, errorColor: formStyle.errorColor, color: formStyle.textColor, containerMargin: "0px", handleUpdate: function (value) {
44
74
  onChange(value);
45
75
  sizeChange();
46
- }, getOptionSelected: (option, value) => {
47
- return option.value === value?.value;
76
+ }, getOptionSelected: function (option, value) {
77
+ return option.value === (value === null || value === void 0 ? void 0 : value.value);
48
78
  }, helperText: errors[step.id]
49
79
  ? errors[step.id].message
50
- : step.description, error: !!errors[step.id] }) }, step.id));
80
+ : step.description, error: !!errors[step.id] }) }), step.id));
51
81
  };
52
- const mapNestedOption = () => {
82
+ var mapNestedOption = function () {
53
83
  if (value) {
54
- const currentOption = step.options[value.value];
55
- if (currentOption?.type === ClassifierOptionTypes.NESTED) {
56
- return (_jsx(React.Fragment, { children: currentOption.steps.map((idStep, index) => {
57
- const subStep = form.steps[idStep];
58
- return (_createElement(StepComponent, { ...others, postview: postview, editable: editable, widthStats: widthStats, getValues: getValues, formStyle: formStyle, errors: errors, form: form, control: control, step: subStep, key: index, level: level + 1, handleSizeChange: () => {
84
+ var currentOption = step.options[value.value];
85
+ if ((currentOption === null || currentOption === void 0 ? void 0 : currentOption.type) === ClassifierOptionTypes.NESTED) {
86
+ return (_jsx(React.Fragment, { children: currentOption.steps.map(function (idStep, index) {
87
+ var subStep = form.steps[idStep];
88
+ return (_createElement(StepComponent, __assign({}, others, { postview: postview, editable: editable, widthStats: widthStats, getValues: getValues, formStyle: formStyle, errors: errors, form: form, control: control, step: subStep, key: index, level: level + 1, handleSizeChange: function () {
59
89
  sizeChange();
60
- } }));
90
+ } })));
61
91
  }) }));
62
92
  }
63
93
  }
64
94
  };
65
95
  if (level === 0 && step.maxSize < form.size.blockNum) {
66
- return (_jsxs("div", { className: styles.firstLvlContainer, style: {
96
+ return (_jsxs("div", __assign({ className: styles.firstLvlContainer, style: {
67
97
  width: widthStats.currentBreakPoint <= step.size
68
98
  ? '100%'
69
99
  : 'fit-content',
70
- }, children: [renderSelect(), mapNestedOption(), level === 0 && step.maxSize < form.size.blockNum && (_jsx("div", { className: styles.smallSeparator, style: {
100
+ } }, { children: [renderSelect(), mapNestedOption(), level === 0 && step.maxSize < form.size.blockNum && (_jsx("div", { className: styles.smallSeparator, style: {
71
101
  width: fillerSize,
72
- } }, "SEPARATOR"))] }));
102
+ } }, "SEPARATOR"))] })));
73
103
  }
74
104
  else {
75
105
  return (_jsxs(React.Fragment, { children: [renderSelect(), mapNestedOption(), level === 0 && _jsx("div", { className: styles.separator })] }));
@@ -81,5 +111,8 @@ function ClassifierSelectorStep(props) {
81
111
  required: props.step.required
82
112
  ? 'Este campo es obligatorio'
83
113
  : undefined,
84
- }, shouldUnregister: true, render: ({ field }) => (_jsx(ClassifierSelector, { ...props, inputRef: field.ref, value: field.value, onChange: field.onChange, onBlur: field.onBlur })) }));
114
+ }, shouldUnregister: true, render: function (_a) {
115
+ var field = _a.field;
116
+ return (_jsx(ClassifierSelector, __assign({}, props, { inputRef: field.ref, value: field.value, onChange: field.onChange, onBlur: field.onBlur })));
117
+ } }));
85
118
  }
@@ -1,13 +1,24 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
1
12
  import { jsx as _jsx } from "react/jsx-runtime";
2
13
  import { FormStyleTypes } from '../../../constants/FormStepTypes';
3
14
  import MaterialDatePickerStep from './MaterialDatePickerStep/MaterialDatePickerStep';
4
15
  function DatePickerStep(props) {
5
16
  switch (props.formStyle.type) {
6
17
  case FormStyleTypes.MATERIAL: {
7
- return _jsx(MaterialDatePickerStep, { ...props });
18
+ return _jsx(MaterialDatePickerStep, __assign({}, props));
8
19
  }
9
20
  default: {
10
- return _jsx(MaterialDatePickerStep, { ...props });
21
+ return _jsx(MaterialDatePickerStep, __assign({}, props));
11
22
  }
12
23
  }
13
24
  }
@@ -1,20 +1,35 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
1
12
  import { jsx as _jsx } from "react/jsx-runtime";
2
13
  import styles from './MaterialDatePickerStep.module.css';
3
14
  import { Controller } from 'react-hook-form';
4
15
  import RoundedDatePicker from '../../../../shared/RoundedDatePicker/RoundedDatePicker';
5
16
  import { calcStepWidth } from '../../StepFunctions';
6
- function DatePickerStep({ step, form, errors, control, editable, postview, formStyle, widthStats, defaultValue = null, }) {
7
- return (_jsx("div", { className: styles.container, style: {
17
+ function DatePickerStep(_a) {
18
+ var step = _a.step, form = _a.form, errors = _a.errors, control = _a.control, editable = _a.editable, postview = _a.postview, formStyle = _a.formStyle, widthStats = _a.widthStats, _b = _a.defaultValue, defaultValue = _b === void 0 ? null : _b;
19
+ return (_jsx("div", __assign({ className: styles.container, style: {
8
20
  width: widthStats.currentBreakPoint <= step.size
9
21
  ? '100%'
10
22
  : calcStepWidth(step.size, form.size),
11
23
  minHeight: step.description || step.required ? '55px' : '43px',
12
- }, children: _jsx(Controller, { name: step.id, control: control, defaultValue: defaultValue, rules: {
24
+ } }, { children: _jsx(Controller, { name: step.id, control: control, defaultValue: defaultValue, rules: {
13
25
  required: step.required
14
26
  ? 'Este campo es obligatorio'
15
27
  : undefined,
16
- }, shouldUnregister: true, render: ({ field }) => (_jsx(RoundedDatePicker, { ...field, pickTime: step.pickTime, inputRef: field.ref, cantEdit: !editable || postview, "data-testid": step.id, secondaryColor: formStyle.secondaryColor, contrastColor: formStyle.secondaryContrastColor, accentColor: formStyle.textColor, focusColor: formStyle.primaryColor, outlineColor: formStyle.outlineColor, textColor: formStyle.textColor, errorColor: formStyle.errorColor, helperTextColor: formStyle.descriptionTextColor, fontWeight: 400, label: step.label, helperText: errors[step.id]
17
- ? errors[step.id].message
18
- : step.description, error: !!errors[step.id], required: step.required })) }) }));
28
+ }, shouldUnregister: true, render: function (_a) {
29
+ var field = _a.field;
30
+ return (_jsx(RoundedDatePicker, __assign({}, field, { pickTime: step.pickTime, inputRef: field.ref, cantEdit: !editable || postview, "data-testid": step.id, secondaryColor: formStyle.secondaryColor, contrastColor: formStyle.secondaryContrastColor, accentColor: formStyle.textColor, focusColor: formStyle.primaryColor, outlineColor: formStyle.outlineColor, textColor: formStyle.textColor, errorColor: formStyle.errorColor, helperTextColor: formStyle.descriptionTextColor, fontWeight: 400, label: step.label, helperText: errors[step.id]
31
+ ? errors[step.id].message
32
+ : step.description, error: !!errors[step.id], required: step.required })));
33
+ } }) })));
19
34
  }
20
35
  export default DatePickerStep;