@arquimedes.co/eureka-forms 1.9.28-test → 1.9.29-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 (74) hide show
  1. package/dist/@Types/CBRFormStep.d.ts +1 -3
  2. package/dist/@Types/FormStep.d.ts +25 -2
  3. package/dist/App.d.ts +2 -1
  4. package/dist/FormComponents/Form/ColumnForm/ColumnForm.d.ts +2 -0
  5. package/dist/FormComponents/Form/ColumnForm/ColumnForm.js +74 -50
  6. package/dist/FormComponents/Section/MaterialSection/MaterialSection.js +1 -1
  7. package/dist/FormComponents/Section/Section.js +1 -3
  8. package/dist/FormComponents/Step/@Construction/CBRElementStep/CBRElementStep.d.ts +8 -0
  9. package/dist/FormComponents/Step/@Construction/{CBRLocativasStep/CBRLocativasStep.js → CBRElementStep/CBRElementStep.js} +14 -23
  10. package/dist/FormComponents/Step/@Construction/CBRIncidentsStep/CBRIncidentsStep.js +1 -3
  11. package/dist/FormComponents/Step/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/Incident/Incident.js +1 -1
  12. package/dist/FormComponents/Step/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/MaterialCBRIncidentsStep.js +3 -3
  13. package/dist/FormComponents/Step/@Construction/CBRPropertyStep/CBRPropertyStep.js +2 -6
  14. package/dist/FormComponents/Step/CBRStepMapper.js +13 -30
  15. package/dist/FormComponents/Step/CheckBoxStep/CheckBoxStep.js +1 -3
  16. package/dist/FormComponents/Step/CheckBoxStep/MaterialCheckBoxStep/MaterialCheckBoxStep.js +13 -2
  17. package/dist/FormComponents/Step/ClassifierSelectorStep/ClassifierSelectorStep.js +1 -3
  18. package/dist/FormComponents/Step/ClassifierSelectorStep/MaterialClassifierSelectorStep/MaterialClassifierSelectorStep.js +3 -3
  19. package/dist/FormComponents/Step/DatePickerStep/DatePickerStep.js +1 -3
  20. package/dist/FormComponents/Step/DatePickerStep/MaterialDatePickerStep/MaterialDatePickerStep.js +13 -2
  21. package/dist/FormComponents/Step/EntityValueStep/EntityValueStep.d.ts +15 -0
  22. package/dist/FormComponents/Step/EntityValueStep/EntityValueStep.js +129 -0
  23. package/dist/FormComponents/Step/FileUploadStep/FileUploadStep.js +1 -3
  24. package/dist/FormComponents/Step/FileUploadStep/MaterialFileUploadStep/MaterialFileUploadStep.js +13 -2
  25. package/dist/FormComponents/Step/MapperStep/MapperStep.d.ts +9 -0
  26. package/dist/FormComponents/Step/MapperStep/MapperStep.js +35 -0
  27. package/dist/FormComponents/Step/MapperStep/MaterialMapperStep/Element/MapperElement.d.ts +11 -0
  28. package/dist/FormComponents/Step/MapperStep/MaterialMapperStep/Element/MapperElement.js +49 -0
  29. package/dist/FormComponents/Step/MapperStep/MaterialMapperStep/Element/MapperElement.module.css +60 -0
  30. package/dist/FormComponents/Step/MapperStep/MaterialMapperStep/MaterialMapperStep.d.ts +8 -0
  31. package/dist/FormComponents/Step/MapperStep/MaterialMapperStep/MaterialMapperStep.js +182 -0
  32. package/dist/FormComponents/Step/MapperStep/MaterialMapperStep/MaterialMapperStep.module.css +13 -0
  33. package/dist/FormComponents/Step/RatingStep/MaterialRatingStep/MaterialRatingStep.js +2 -2
  34. package/dist/FormComponents/Step/RatingStep/RatingStep.js +1 -3
  35. package/dist/FormComponents/Step/SelectorStep/MaterialSelectorStep/MaterialSelectorStep.js +3 -3
  36. package/dist/FormComponents/Step/SelectorStep/SelectorStep.js +1 -3
  37. package/dist/FormComponents/Step/SeparatorStep/SeparatorStep.js +1 -3
  38. package/dist/FormComponents/Step/SmartSelectStep/MaterialSmartSelectStep/MaterialSmartSelectStep.js +17 -6
  39. package/dist/FormComponents/Step/SmartSelectStep/SmartSelectStep.d.ts +3 -3
  40. package/dist/FormComponents/Step/SmartSelectStep/SmartSelectStep.js +1 -3
  41. package/dist/FormComponents/Step/Step.d.ts +1 -1
  42. package/dist/FormComponents/Step/Step.js +8 -0
  43. package/dist/FormComponents/Step/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaStep.js +13 -2
  44. package/dist/FormComponents/Step/TextAreaStep/TextAreaStep.js +1 -3
  45. package/dist/FormComponents/Step/TextInputStep/MaterialTextInputStep/MaterialTextInputStep.js +13 -2
  46. package/dist/FormComponents/Step/TextInputStep/TextInputStep.js +1 -3
  47. package/dist/FormComponents/Step/TitleStep/TitleStep.js +1 -3
  48. package/dist/FormComponents/Term/MaterialTerm/MaterialTerm.js +13 -2
  49. package/dist/FormComponents/Term/Term.js +1 -3
  50. package/dist/Icons/Construction/LeakIcon.d.ts +3 -0
  51. package/dist/Icons/Construction/LeakIcon.js +16 -0
  52. package/dist/Icons/Construction/ProjectIcon.d.ts +3 -0
  53. package/dist/Icons/Construction/ProjectIcon.js +16 -0
  54. package/dist/Icons/Construction/PropertyIcon.d.ts +3 -0
  55. package/dist/Icons/Construction/PropertyIcon.js +16 -0
  56. package/dist/Icons/Construction/SpaceIcon.d.ts +3 -0
  57. package/dist/Icons/Construction/SpaceIcon.js +16 -0
  58. package/dist/Icons/DocumentIcon.d.ts +3 -0
  59. package/dist/Icons/DocumentIcon.js +16 -0
  60. package/dist/Icons/Entities/GenericEntityIcon.d.ts +2 -0
  61. package/dist/Icons/Entities/GenericEntityIcon.js +17 -0
  62. package/dist/Icons/Entities/HandshakeIcon.d.ts +2 -0
  63. package/dist/Icons/Entities/HandshakeIcon.js +17 -0
  64. package/dist/constants/FormStepTypes.d.ts +9 -3
  65. package/dist/constants/FormStepTypes.js +21 -14
  66. package/dist/constants/IconTypes.d.ts +10 -0
  67. package/dist/constants/IconTypes.js +11 -0
  68. package/dist/shared/InputIcon/InputIcon.d.ts +7 -0
  69. package/dist/shared/InputIcon/InputIcon.js +81 -0
  70. package/dist/shared/RoundedSelect/RoundedSelect.js +17 -3
  71. package/dist/shared/RoundedSmartSelect/RoundedSmartSelect.js +12 -5
  72. package/dist/utils/CbrFunctions.js +1 -1
  73. package/package.json +2 -2
  74. package/dist/FormComponents/Step/@Construction/CBRLocativasStep/CBRLocativasStep.d.ts +0 -8
@@ -54,7 +54,6 @@ export interface CBREmailStep extends GTextInput {
54
54
  export interface CBRElementStep extends GSmartSelect {
55
55
  type: Types.CBR_LOCATIVAS;
56
56
  subStep: string | null;
57
- parentStep: string | null;
58
57
  }
59
58
  export interface CBRCommentStep extends Omit<GTextArea, 'hasTextEditor'> {
60
59
  type: Types.CBR_COMENTARIO;
@@ -67,10 +66,9 @@ export interface CBRIncidentsStep extends GBaseStep {
67
66
  required: boolean;
68
67
  unitLabel: string;
69
68
  spaceStep: Omit<CBRSpaceTypeStep, 'id' | 'type'>;
70
- newLineAfterSpace: boolean;
71
69
  elementStep: IncidentElementStep;
72
70
  commentStep: Omit<CBRCommentStep, 'id' | 'type'>;
73
71
  }
74
- export interface IncidentElementStep extends Omit<CBRElementStep, 'id' | 'subStep' | 'parentStep' | 'type'> {
72
+ export interface IncidentElementStep extends Omit<CBRElementStep, 'id' | 'subStep' | 'type'> {
75
73
  subStep?: IncidentElementStep;
76
74
  }
@@ -1,6 +1,6 @@
1
- import Types, { ClassifierOptionTypes, OptionTypes, RatingTypes } from '../constants/FormStepTypes';
1
+ import Types, { ClassifierOptionTypes, OptionTypes, RatingTypes, MapperStyleTypes } from '../constants/FormStepTypes';
2
2
  import * as GSteps from './GenericFormSteps';
3
- export type FormStep = Title | Rating | CheckBox | TextArea | TextInput | DatePicker | FileUpload | Separator | FormSelector | ClassifierSelector;
3
+ export type FormStep = Title | Rating | CheckBox | TextArea | TextInput | DatePicker | FileUpload | Separator | FormSelector | ClassifierSelector | EntityValuePicker | Mapper;
4
4
  export interface Title extends GSteps.GBaseStep {
5
5
  type: Types.TITLE;
6
6
  title: string;
@@ -85,4 +85,27 @@ interface HideValueOption {
85
85
  type: ClassifierOptionTypes.HIDE;
86
86
  idClassifier: String;
87
87
  }
88
+ export interface EntityValuePicker extends GSteps.GSmartSelect {
89
+ type: Types.ENTITYVALUEPICKER;
90
+ idEntity: string;
91
+ icon: string | null;
92
+ filters: {
93
+ idProperty: string;
94
+ idStep?: string;
95
+ value?: string;
96
+ required?: boolean;
97
+ }[];
98
+ }
99
+ export interface Mapper extends GSteps.GBaseStep {
100
+ type: Types.MAPPER;
101
+ style: MapperStyleTypes;
102
+ label: string;
103
+ description: string | null;
104
+ addBtnLabel: string;
105
+ rootSteps: string[];
106
+ steps: Record<string, FormStep>;
107
+ required: boolean;
108
+ unitLabel: string;
109
+ creatable: boolean;
110
+ }
88
111
  export {};
package/dist/App.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { Form } from './@Types/Form';
3
+ import { FormStep } from './@Types/FormStep';
3
4
  export interface AppProps {
4
5
  /** If the app is currently a widget */
5
6
  isWidget?: boolean;
@@ -37,7 +38,7 @@ export interface AppProps {
37
38
  export interface CustomStep {
38
39
  componentProps?: Record<string, any>;
39
40
  component: ReactNode;
40
- updateValue: (idStep: string, values: Record<string, any>, form: Form) => void;
41
+ calcValue?: (step: FormStep, value: any) => any;
41
42
  }
42
43
  declare function App({ apiKey, domain, preview, partial, formData, postview, editable, isWidget, internal, valuesData, customSend, customSteps, handleConfirmed, ...others }: AppProps): JSX.Element;
43
44
  export default App;
@@ -1,6 +1,8 @@
1
1
  /// <reference types="react" />
2
2
  import { Form } from '../../../@Types/Form';
3
3
  import { FormComponentProps } from '../Form';
4
+ import { FormStep } from '../../../@Types/FormStep';
4
5
  declare function ColumnForm({ form, apiKey, reload, domain, postview, internal, formStyle, sendLabel, widthStats, customSteps, customSend, customSubmit, handleLoaded, originalValues, ...others }: FormComponentProps): JSX.Element;
5
6
  export default ColumnForm;
6
7
  export declare const mapOriginalValues: (originalValues: Record<string, any>, form: Form) => any;
8
+ export declare function calcStepDependencyValue(depStep: FormStep, originalValues: Record<string, any>): any;
@@ -70,6 +70,7 @@ import Loader from '../../../shared/Loader/Loader';
70
70
  import axiosInstance from '../../../AxiosAPI';
71
71
  import widgetInstance from '../../../AxiosWidget';
72
72
  import React from 'react';
73
+ import { nanoid } from 'nanoid';
73
74
  function ColumnForm(_a) {
74
75
  var _this = this;
75
76
  var form = _a.form, apiKey = _a.apiKey, reload = _a.reload, domain = _a.domain, postview = _a.postview, internal = _a.internal, formStyle = _a.formStyle, sendLabel = _a.sendLabel, widthStats = _a.widthStats, customSteps = _a.customSteps, customSend = _a.customSend, customSubmit = _a.customSubmit, handleLoaded = _a.handleLoaded, originalValues = _a.originalValues, others = __rest(_a, ["form", "apiKey", "reload", "domain", "postview", "internal", "formStyle", "sendLabel", "widthStats", "customSteps", "customSend", "customSubmit", "handleLoaded", "originalValues"]);
@@ -94,7 +95,7 @@ function ColumnForm(_a) {
94
95
  return _jsx("div", {});
95
96
  }
96
97
  var onSubmit = function (token) { return __awaiter(_this, void 0, void 0, function () {
97
- var valid, values, _i, _a, idStep, payload, url, resp, _b, error_1;
98
+ var valid, values, newValues, _i, _a, idStep, step, payload, url, resp, _b, error_1;
98
99
  return __generator(this, function (_c) {
99
100
  switch (_c.label) {
100
101
  case 0:
@@ -113,18 +114,20 @@ function ColumnForm(_a) {
113
114
  case 2:
114
115
  _c.trys.push([2, 10, , 11]);
115
116
  setLoading(true);
117
+ newValues = {};
116
118
  for (_i = 0, _a = Object.keys(values); _i < _a.length; _i++) {
117
119
  idStep = _a[_i];
118
- updateValue(idStep, values, form, customSteps);
120
+ step = form.steps[idStep];
121
+ newValues[idStep] = calcValue(step, values, customSteps);
119
122
  }
120
123
  if (!customSend) return [3 /*break*/, 4];
121
- return [4 /*yield*/, customSend(values, reload)];
124
+ return [4 /*yield*/, customSend(newValues, reload)];
122
125
  case 3:
123
126
  _c.sent();
124
127
  return [3 /*break*/, 9];
125
128
  case 4:
126
129
  payload = {
127
- formValues: { steps: values },
130
+ formValues: { steps: newValues },
128
131
  };
129
132
  if (token) {
130
133
  payload.token = token;
@@ -219,7 +222,6 @@ function calcNextSection(form, idSection, sections) {
219
222
  }
220
223
  }
221
224
  export var mapOriginalValues = function (originalValues, form) {
222
- var _a;
223
225
  var newValues = __assign({}, originalValues);
224
226
  var _loop_1 = function (val) {
225
227
  var step = form.steps[val];
@@ -242,14 +244,23 @@ export var mapOriginalValues = function (originalValues, form) {
242
244
  newValues[step.id] = option;
243
245
  break;
244
246
  }
245
- case Types.CLASSIFIER_SELECTOR: {
246
- var value_2 = originalValues[step.id];
247
- var classifier = form.classifiers[(_a = step.idClassifier) !== null && _a !== void 0 ? _a : ''];
248
- if (classifier) {
249
- var option = classifier.children.find(function (child) { return child._id == value_2; });
250
- if (!(value_2 === null || value_2 === void 0 ? void 0 : value_2.value))
251
- newValues[step.id] = { value: value_2, label: option === null || option === void 0 ? void 0 : option.name };
247
+ case Types.MAPPER: {
248
+ var valueArr = originalValues[step.id];
249
+ var elements = [];
250
+ for (var _b = 0, valueArr_1 = valueArr; _b < valueArr_1.length; _b++) {
251
+ var values = valueArr_1[_b];
252
+ var idElement = nanoid();
253
+ var newElement = {
254
+ ids: {},
255
+ };
256
+ for (var _c = 0, _d = Object.keys(step.steps); _c < _d.length; _c++) {
257
+ var idStep = _d[_c];
258
+ var newIdStep = step.id + '-' + idStep + '-' + idElement;
259
+ newElement.ids[idStep] = newIdStep;
260
+ newValues[newIdStep] = values[idStep];
261
+ }
252
262
  }
263
+ newValues[step.id] = elements;
253
264
  break;
254
265
  }
255
266
  default:
@@ -257,57 +268,70 @@ export var mapOriginalValues = function (originalValues, form) {
257
268
  }
258
269
  }
259
270
  };
260
- for (var _i = 0, _b = Object.keys(originalValues); _i < _b.length; _i++) {
261
- var val = _b[_i];
271
+ for (var _i = 0, _a = Object.keys(originalValues); _i < _a.length; _i++) {
272
+ var val = _a[_i];
262
273
  _loop_1(val);
263
274
  }
264
275
  return newValues;
265
276
  };
266
- var updateValue = function (idStep, values, form, customSteps) {
267
- var _a;
268
- var step = form.steps[idStep];
277
+ var calcValue = function (step, values, customSteps, value) {
278
+ var _a, _b;
279
+ if (value === void 0) { value = values[step.id]; }
280
+ if (!step)
281
+ return;
269
282
  var custom = customSteps[step === null || step === void 0 ? void 0 : step.type];
270
283
  if (custom !== undefined) {
271
- custom.updateValue(idStep, values, form);
284
+ return (_b = (_a = custom.calcValue) === null || _a === void 0 ? void 0 : _a.call(custom, step, value)) !== null && _b !== void 0 ? _b : value;
272
285
  }
273
286
  else {
274
287
  switch (step === null || step === void 0 ? void 0 : step.type) {
275
288
  case Types.TEXTAREA: {
276
- var value = values[step.id];
277
289
  if (step.hasTextEditor) {
278
290
  var currentContent = value.getCurrentContent();
279
- values[step.id] = {
291
+ return {
280
292
  value: currentContent.getPlainText(),
281
293
  draft: convertToRaw(currentContent),
282
294
  };
283
295
  }
284
296
  else {
285
- values[step.id] = {
297
+ return {
286
298
  value: value,
287
299
  draft: stringToDraft(value),
288
300
  };
289
301
  }
290
- break;
291
302
  }
292
303
  case Types.FILEUPLOAD: {
293
- var value = values[step.id];
294
- values[step.id] = value.map(function (val) { return ({
304
+ return value.map(function (val) { return ({
295
305
  fileName: val.fileName,
296
306
  S3Key: val.S3Key,
297
307
  }); });
298
- break;
299
308
  }
300
309
  case Types.SELECTOR:
301
310
  case Types.CLASSIFIER_SELECTOR: {
302
- var value = values[step.id];
303
- values[step.id] = value.value;
304
- break;
311
+ return value.value;
312
+ }
313
+ case Types.MAPPER: {
314
+ var elements = value === null || value === void 0 ? void 0 : value.filter(function (element) { return element.deleted !== true; });
315
+ var mappedValues = [];
316
+ for (var _i = 0, elements_1 = elements; _i < elements_1.length; _i++) {
317
+ var element = elements_1[_i];
318
+ var newValue = {};
319
+ for (var _c = 0, _d = Object.keys(element.ids); _c < _d.length; _c++) {
320
+ var idStep = _d[_c];
321
+ var mappedId = element.ids[idStep];
322
+ if (values[mappedId]) {
323
+ newValue[idStep] = calcValue(step.steps[idStep], values, customSteps, values[mappedId]);
324
+ }
325
+ }
326
+ mappedValues.push(newValue);
327
+ }
328
+ return mappedValues;
305
329
  }
306
330
  default:
307
331
  if ((step === null || step === void 0 ? void 0 : step.type) === 'CBR_INCIDENCIAS') {
308
- values[step.id] = (_a = values[step.id]) === null || _a === void 0 ? void 0 : _a.filter(function (inmueble) { return inmueble.deleted !== true; });
332
+ return value === null || value === void 0 ? void 0 : value.filter(function (incidencia) { return incidencia.deleted !== true; });
309
333
  }
310
- break;
334
+ return value;
311
335
  }
312
336
  }
313
337
  };
@@ -330,33 +354,33 @@ function stringToDraft(text) {
330
354
  return draftStructure;
331
355
  }
332
356
  function calcDependencies(steps, originalValues) {
333
- var _a;
334
357
  var dependencies = {};
335
- for (var _i = 0, _b = Object.values(steps); _i < _b.length; _i++) {
336
- var step = _b[_i];
358
+ for (var _i = 0, _a = Object.values(steps); _i < _a.length; _i++) {
359
+ var step = _a[_i];
337
360
  if (step.dependencies) {
338
- for (var _c = 0, _d = step.dependencies; _c < _d.length; _c++) {
339
- var idDep = _d[_c];
361
+ for (var _b = 0, _c = step.dependencies; _b < _c.length; _b++) {
362
+ var idDep = _c[_b];
340
363
  var depStep = steps[idDep];
341
364
  if (depStep && dependencies[idDep] === undefined) {
342
- switch (depStep === null || depStep === void 0 ? void 0 : depStep.type) {
343
- case Types.TEXTAREA: {
344
- if (depStep.hasTextEditor) {
345
- dependencies[idDep] = null;
346
- }
347
- else {
348
- dependencies[idDep] =
349
- originalValues[idDep].value;
350
- }
351
- break;
352
- }
353
- default:
354
- dependencies[idDep] = (_a = originalValues[idDep]) !== null && _a !== void 0 ? _a : null;
355
- break;
356
- }
365
+ dependencies[idDep] = calcStepDependencyValue(depStep, originalValues);
357
366
  }
358
367
  }
359
368
  }
360
369
  }
361
370
  return dependencies;
362
371
  }
372
+ export function calcStepDependencyValue(depStep, originalValues) {
373
+ var _a;
374
+ switch (depStep.type) {
375
+ case Types.TEXTAREA: {
376
+ if (depStep.hasTextEditor) {
377
+ return null;
378
+ }
379
+ else {
380
+ return originalValues[depStep.id].value;
381
+ }
382
+ }
383
+ default:
384
+ return (_a = originalValues[depStep.id]) !== null && _a !== void 0 ? _a : null;
385
+ }
386
+ }
@@ -43,7 +43,7 @@ function MaterialSection(_a) {
43
43
  return _jsx("div", {}, index);
44
44
  }
45
45
  else if (step) {
46
- return (_createElement(StepComponent, __assign({}, others, { widthStats: widthStats, form: form, step: step, handleSizeChange: function () { }, key: index, level: 0 })));
46
+ return (_createElement(StepComponent, __assign({}, others, { widthStats: widthStats, form: form, step: step, key: index, level: 0 })));
47
47
  }
48
48
  else {
49
49
  console.error('Step not found:', idStep);
@@ -14,9 +14,7 @@ import { FormStyleTypes } from '../../constants/FormStepTypes';
14
14
  import MaterialSection from './MaterialSection/MaterialSection';
15
15
  function SectionComponent(props) {
16
16
  switch (props.formStyle.type) {
17
- case FormStyleTypes.MATERIAL: {
18
- return _jsx(MaterialSection, __assign({}, props));
19
- }
17
+ case FormStyleTypes.MATERIAL:
20
18
  default: {
21
19
  return _jsx(MaterialSection, __assign({}, props));
22
20
  }
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import { StepProps } from '../../Step';
3
+ import { CBRElementStep } from '../../../../@Types/CBRFormStep';
4
+ declare function CBRElementStepComponent(props: ElementSubStepRendererProps): JSX.Element;
5
+ export default CBRElementStepComponent;
6
+ export interface ElementSubStepRendererProps extends Omit<StepProps, 'step'> {
7
+ step: CBRElementStep;
8
+ }
@@ -45,17 +45,13 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
45
45
  if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
46
46
  }
47
47
  };
48
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
48
+ import { jsx as _jsx } from "react/jsx-runtime";
49
49
  import SmartSelectStep from '../../SmartSelectStep/SmartSelectStep';
50
50
  import CBRFormStepTypes from '../../../../constants/CBRFormStepTypes';
51
51
  import axios from 'axios';
52
- function CBRLocativasStep(props) {
53
- return (_jsx(SmartSelectStep, __assign({}, props, { step: props.step, icon: _jsx(Leak, { fill: "#757575", style: {
54
- display: 'flex',
55
- height: 23,
56
- width: 23,
57
- marginTop: 2,
58
- } }), getOptions: getLocativasOptions, getOptionSelected: function (option, value) {
52
+ import InputIcon from '../../../../shared/InputIcon/InputIcon';
53
+ function CBRElementStepComponent(props) {
54
+ return (_jsx(SmartSelectStep, __assign({}, props, { step: props.step, icon: _jsx(InputIcon, { icon: 'LEAK' }), getOptions: getElementOptions, getOptionSelected: function (option, value) {
59
55
  return option.id === value.id;
60
56
  }, getValueString: function (value) { return value === null || value === void 0 ? void 0 : value.id; }, calcDepError: calcDepError, calcInvalidDeps: calcInvalidDependencies, valueOverwrite: function (value) {
61
57
  if (value) {
@@ -64,10 +60,10 @@ function CBRLocativasStep(props) {
64
60
  else {
65
61
  return null;
66
62
  }
67
- } }, { children: _jsx(LocativasSubStepRenderer, {}) })));
63
+ } }, { children: _jsx(ElementSubStepRenderer, {}) })));
68
64
  }
69
- export default CBRLocativasStep;
70
- function LocativasSubStepRenderer(_a) {
65
+ export default CBRElementStepComponent;
66
+ function ElementSubStepRenderer(_a) {
71
67
  var _b;
72
68
  var value = _a.value, stepProps = _a.stepProps;
73
69
  if (!value || stepProps == undefined) {
@@ -77,16 +73,11 @@ function LocativasSubStepRenderer(_a) {
77
73
  if ((subStep === null || subStep === void 0 ? void 0 : subStep.type) !== CBRFormStepTypes.CBR_LOCATIVAS) {
78
74
  return _jsx("div", {});
79
75
  }
80
- return (_jsx(SmartSelectStep, __assign({}, stepProps, { step: subStep, level: stepProps.level + 1, icon: _jsx(Leak, { fill: "#757575", style: {
81
- display: 'flex',
82
- height: 23,
83
- width: 23,
84
- marginTop: 2,
85
- } }), calcInvalidDeps: calcInvalidDependencies, getOptions: getLocativasOptions, calcDepError: calcDepError, getOptionSelected: function (option, value) {
76
+ return (_jsx(SmartSelectStep, __assign({}, stepProps, { step: subStep, level: stepProps.level + 1, icon: _jsx(InputIcon, { icon: 'LEAK' }), calcInvalidDeps: calcInvalidDependencies, getOptions: getElementOptions, calcDepError: calcDepError, getOptionSelected: function (option, value) {
86
77
  return option.id === value.id;
87
- }, getValueString: function (value) { return value === null || value === void 0 ? void 0 : value.id; } }, { children: _jsx(LocativasSubStepRenderer, {}) })));
78
+ }, getValueString: function (value) { return value === null || value === void 0 ? void 0 : value.id; } }, { children: _jsx(ElementSubStepRenderer, {}) })));
88
79
  }
89
- var getLocativasOptions = function (_a, step, dependencyStore) {
80
+ var getElementOptions = function (_a, step, dependencyStore) {
90
81
  var idOrganization = _a.idOrganization;
91
82
  return __awaiter(void 0, void 0, void 0, function () {
92
83
  var idProyecto, response, father_1;
@@ -133,9 +124,10 @@ var calcInvalidDependencies = function (step, dependencyStore) {
133
124
  }
134
125
  return deps;
135
126
  };
136
- var calcDepError = function (types) {
137
- for (var _i = 0, _a = types; _i < _a.length; _i++) {
138
- var type = _a[_i];
127
+ var calcDepError = function (steps) {
128
+ for (var _i = 0, steps_1 = steps; _i < steps_1.length; _i++) {
129
+ var step = steps_1[_i];
130
+ var type = step.type;
139
131
  if (type === CBRFormStepTypes.CBR_PROYECTO) {
140
132
  return 'Selecciona un proyecto';
141
133
  }
@@ -145,4 +137,3 @@ var calcDepError = function (types) {
145
137
  }
146
138
  return undefined;
147
139
  };
148
- var Leak = function (props) { return (_jsxs("svg", __assign({ fill: props.fill, className: props.class, style: props.style, height: "512pt", viewBox: "0 -86 512.00056 512", width: "512pt", xmlns: "http://www.w3.org/2000/svg" }, { children: [_jsx("path", { d: "m203.484375 196.359375c2.402344 0 4.753906-.867187 6.601563-2.492187l26.621093-23.394532c3.03125-2.664062 4.164063-6.890625 2.871094-10.714844l-9.21875-27.257812 21.613281-18.996094c3.03125-2.664062 4.164063-6.890625 2.871094-10.714844l-11.359375-33.570312c-1.070313-3.167969-3.652344-5.589844-6.882813-6.457031l-57.925781-15.519531c-5.335937-1.433594-10.816406 1.734374-12.246093 7.070312-1.429688 5.335938 1.734374 10.820312 7.070312 12.25l52.753906 14.132812 7.507813 22.1875-21.613281 18.996094c-3.03125 2.664063-4.164063 6.890625-2.871094 10.714844l9.21875 27.257812-17.59375 15.460938-130.027344-34.839844 30.992188-115.667968c.6875-2.5625.328124-5.292969-.996094-7.589844-1.328125-2.296875-3.511719-3.972656-6.074219-4.660156l-45.574219-12.210938c-5.332031-1.429688-10.816406 1.734375-12.246094 7.070312l-36.636718 136.722657c-.6875 2.5625-.324219 5.292969 1 7.589843 1.324218 2.292969 3.511718 3.972657 6.070312 4.65625l45.574219 12.210938c.867187.234375 1.738281.34375 2.597656.34375 4.414063 0 8.453125-2.945312 9.652344-7.414062l.464844-1.734376 135.199219 36.226563c.851562.230469 1.722656.34375 2.585937.34375zm-181.238281-56.703125 31.460937-117.40625 26.253907 7.035156-31.457032 117.40625zm0 0" }), _jsx("path", { d: "m511.660156 144.136719-36.636718-136.722657c-1.429688-5.332031-6.910157-8.5-12.246094-7.070312l-45.574219 12.210938c-2.5625.6875-4.746094 2.363281-6.070313 4.660156-1.328124 2.296875-1.6875 5.023437-1 7.585937l.464844 1.734375-135.199218 36.226563c-3.28125.878906-5.894532 3.367187-6.933594 6.605469-1.039063 3.238281-.363282 6.777343 1.796875 9.40625l19.121093 23.265624-5.867187 25.070313c-.796875 3.40625.242187 6.980469 2.738281 9.425781l19.386719 18.988282-6.847656 28.496093c-.824219 3.429688.21875 7.039063 2.742187 9.5 1.894532 1.84375 4.40625 2.839844 6.980469 2.839844.863281 0 1.730469-.113281 2.585937-.34375l57.925782-15.519531c5.335937-1.429688 8.5-6.914063 7.070312-12.25-1.429687-5.332032-6.914062-8.5-12.246094-7.070313l-41.683593 11.171875 4.246093-17.664062c.820313-3.421875-.214843-7.023438-2.726562-9.484375l-19.417969-19.015625 5.714844-24.398438c.710937-3.035156-.035156-6.222656-2.011719-8.628906l-12.40625-15.09375 120.207032-32.207031 30.992187 115.667969c1.199219 4.46875 5.238281 7.414062 9.65625 7.414062.855469 0 1.726563-.109375 2.59375-.339844l45.574219-12.210937c2.5625-.6875 4.746094-2.363281 6.070312-4.660157 1.328125-2.296874 1.6875-5.027343 1-7.589843zm-48.160156 2.554687-30.996094-115.667968s0 0 0-.003907v-.003906l-.464844-1.730469 26.257813-7.035156 31.457031 117.40625zm0 0" }), _jsx("path", { d: "m263.386719 203.265625c-1.894531-2.078125-4.574219-3.261719-7.386719-3.261719-2.808594 0-5.492188 1.183594-7.386719 3.261719-.78125.855469-1.640625 1.789063-2.570312 2.792969-14.488281 15.730468-44.640625 48.457031-44.640625 79.34375 0 30.105468 24.492187 54.601562 54.597656 54.601562s54.597656-24.496094 54.597656-54.601562c0-30.886719-30.148437-63.613282-44.640625-79.339844-.925781-1.007812-1.789062-1.941406-2.570312-2.796875zm-7.386719 116.738281c-19.078125 0-34.597656-15.523437-34.597656-34.601562 0-20.492188 20.960937-45.539063 34.597656-60.601563 13.636719 15.0625 34.597656 40.109375 34.597656 60.601563 0 19.078125-15.519531 34.601562-34.597656 34.601562zm0 0" }), _jsx("path", { d: "m129.878906 54.871094c.917969.261718 1.839844.386718 2.75.386718 4.351563 0 8.355469-2.863281 9.609375-7.253906 1.519531-5.3125-1.554687-10.847656-6.867187-12.363281h-.007813c-5.308593-1.519531-10.839843 1.554687-12.359375 6.867187-1.515625 5.308594 1.5625 10.847657 6.875 12.363282zm0 0" }), _jsx("path", { d: "m407.335938 149.527344-.007813.003906c-5.335937 1.421875-8.507813 6.898438-7.082031 12.238281 1.191406 4.472657 5.238281 7.421875 9.65625 7.421875.855468 0 1.722656-.109375 2.585937-.339844 5.335938-1.421874 8.507813-6.902343 7.085938-12.238281-1.425781-5.335937-6.90625-8.511719-12.238281-7.085937zm0 0" })] }))); };
@@ -14,9 +14,7 @@ import { FormStyleTypes } from '../../../../constants/FormStepTypes';
14
14
  import MaterialCBRIncidentsStep from './MaterialCBRIncidentsStep/MaterialCBRIncidentsStep';
15
15
  function CBRIncidentsStep(props) {
16
16
  switch (props.formStyle.type) {
17
- case FormStyleTypes.MATERIAL: {
18
- return _jsx(MaterialCBRIncidentsStep, __assign({}, props));
19
- }
17
+ case FormStyleTypes.MATERIAL:
20
18
  default: {
21
19
  return _jsx(MaterialCBRIncidentsStep, __assign({}, props));
22
20
  }
@@ -44,6 +44,6 @@ function IncidentComponent(_a) {
44
44
  if (others.editable && !others.postview) {
45
45
  handleDelete();
46
46
  }
47
- } }, { children: _jsx(DeleteRoundedIcon, { fontSize: "inherit" }) })), _jsx(StepComponent, __assign({}, others, { formStyle: formStyle, form: form, step: spaceStep, handleSizeChange: function () { }, level: level + 1 })), _jsx(StepComponent, __assign({}, others, { form: form, formStyle: formStyle, step: elementStep, handleSizeChange: function () { }, level: level + 1 })), _jsx(TextAreaStep, __assign({}, others, { form: form, backgroundColor: 'transparent', formStyle: formStyle, step: commentStep, maxLength: 200, handleSizeChange: function () { }, level: level + 1 }))] })) })));
47
+ } }, { children: _jsx(DeleteRoundedIcon, { fontSize: "inherit" }) })), _jsx(StepComponent, __assign({}, others, { formStyle: formStyle, form: form, step: spaceStep, level: level + 1 })), _jsx(StepComponent, __assign({}, others, { form: form, formStyle: formStyle, step: elementStep, level: level + 1 })), _jsx(TextAreaStep, __assign({}, others, { form: form, backgroundColor: 'transparent', formStyle: formStyle, step: commentStep, maxLength: 200, level: level + 1 }))] })) })));
48
48
  }
49
49
  export default IncidentComponent;
@@ -73,7 +73,7 @@ function Incidents(_a) {
73
73
  var _a, _b;
74
74
  var idSubStep = CBRFormStepTypes.CBR_LOCATIVAS + '-' + nanoid();
75
75
  var newSubStep = step.subStep ? __assign({}, step.subStep) : undefined;
76
- var newStep = __assign(__assign({}, step), { id: idStep, type: CBRFormStepTypes.CBR_LOCATIVAS, parentStep: idParent, dependencies: [idProjectDep], subStep: null });
76
+ var newStep = __assign(__assign({}, step), { id: idStep, type: CBRFormStepTypes.CBR_LOCATIVAS, dependencies: [idProjectDep], subStep: null });
77
77
  if (newSubStep) {
78
78
  newStep.subStep = idSubStep;
79
79
  }
@@ -114,8 +114,8 @@ function CBRIncidentsStep(props) {
114
114
  ? 'Este campo es obligatorio'
115
115
  : undefined,
116
116
  }, shouldUnregister: true, render: function (_a) {
117
- var field = _a.field;
118
- return (_jsx(Incidents, __assign({}, props, { incidents: field.value, onChange: field.onChange, btnRef: field.ref })));
117
+ var _b = _a.field, ref = _b.ref, value = _b.value, field = __rest(_b, ["ref", "value"]);
118
+ return (_jsx(Incidents, __assign({}, props, field, { incidents: value, onChange: field.onChange, btnRef: ref })));
119
119
  } }));
120
120
  }
121
121
  export default CBRIncidentsStep;
@@ -54,6 +54,7 @@ import axios from 'axios';
54
54
  import React, { useState } from 'react';
55
55
  import { Dialog } from '@material-ui/core';
56
56
  import RoundedButton from '../../../../shared/RoundedButton/RoundedButton';
57
+ import InputIcon from '../../../../shared/InputIcon/InputIcon';
57
58
  var baseUrl = "https://integrations.".concat(process.env.REACT_APP_DOMAIN, "/sinco/cbr/");
58
59
  function CBRPropertyStepComponent(props) {
59
60
  var _this = this;
@@ -85,11 +86,7 @@ function CBRPropertyStepComponent(props) {
85
86
  });
86
87
  });
87
88
  };
88
- return (_jsxs(React.Fragment, { children: [_jsx(SmartSelectStep, __assign({}, props, { step: props.step, icon: _jsx(PropertyIcon, { fill: "#757575", style: {
89
- display: 'flex',
90
- height: 23,
91
- width: 23,
92
- } }), getOptionSelected: function (option, value) {
89
+ return (_jsxs(React.Fragment, { children: [_jsx(SmartSelectStep, __assign({}, props, { step: props.step, icon: _jsx(InputIcon, { icon: 'PROPERTY' }), getOptionSelected: function (option, value) {
93
90
  return option.id === value.id;
94
91
  }, getValueString: function (value) { return value === null || value === void 0 ? void 0 : value.id; }, getValueWarning: props.step.validation
95
92
  ? function (value) {
@@ -139,4 +136,3 @@ function CBRPropertyStepComponent(props) {
139
136
  } }) }))] }))] })) })))] }));
140
137
  }
141
138
  export default CBRPropertyStepComponent;
142
- var PropertyIcon = function (props) { return (_jsx("svg", __assign({ fill: props.fill, className: props.class, style: props.style, height: "512", viewBox: "0 0 512 512", width: "512", xmlns: "http://www.w3.org/2000/svg" }, { children: _jsx("g", __assign({ id: "_01-home", "data-name": "01-home" }, { children: _jsxs("g", __assign({ id: "glyph" }, { children: [_jsx("path", { d: "m256 4c-108.075 0-196 87.925-196 196 0 52.5 31.807 119.92 94.537 200.378a1065.816 1065.816 0 0 0 93.169 104.294 12 12 0 0 0 16.588 0 1065.816 1065.816 0 0 0 93.169-104.294c62.73-80.458 94.537-147.878 94.537-200.378 0-108.075-87.925-196-196-196zm0 336c-77.2 0-140-62.8-140-140s62.8-140 140-140 140 62.8 140 140-62.8 140-140 140z" }), _jsx("path", { d: "m352.072 183.121-88-80a12 12 0 0 0 -16.144 0l-88 80a12.006 12.006 0 0 0 -2.23 15.039 12.331 12.331 0 0 0 10.66 5.84h11.642v76a12 12 0 0 0 12 12h28a12 12 0 0 0 12-12v-44a12 12 0 0 1 12-12h24a12 12 0 0 1 12 12v44a12 12 0 0 0 12 12h28a12 12 0 0 0 12-12v-76h11.642a12.331 12.331 0 0 0 10.66-5.84 12.006 12.006 0 0 0 -2.23-15.039z" })] })) })) }))); };
@@ -45,16 +45,17 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
45
45
  if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
46
46
  }
47
47
  };
48
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
48
+ import { jsx as _jsx } from "react/jsx-runtime";
49
49
  import CBRFormStepTypes from '../../constants/CBRFormStepTypes';
50
50
  import PersonRoundedIcon from '@material-ui/icons/PersonRounded';
51
51
  import TextInputStep from './TextInputStep/TextInputStep';
52
52
  import SmartSelectStep from './SmartSelectStep/SmartSelectStep';
53
53
  import TextAreaStep from './TextAreaStep/TextAreaStep';
54
54
  import CBRIncidentsStep from './@Construction/CBRIncidentsStep/CBRIncidentsStep';
55
- import CBRLocativasStep from './@Construction/CBRLocativasStep/CBRLocativasStep';
55
+ import CBRElementStep from './@Construction/CBRElementStep/CBRElementStep';
56
56
  import axios from 'axios';
57
57
  import CBRPropertyStep from './@Construction/CBRPropertyStep/CBRPropertyStep';
58
+ import InputIcon from '../../shared/InputIcon/InputIcon';
58
59
  var baseUrl = "https://integrations.".concat(process.env.REACT_APP_DOMAIN, "/sinco/cbr/");
59
60
  function CBRStepMapper(props) {
60
61
  var _this = this;
@@ -151,19 +152,11 @@ function CBRStepMapper(props) {
151
152
  return option.id === value.id;
152
153
  }, getValueString: function (value) { return value === null || value === void 0 ? void 0 : value.id; } })));
153
154
  case CBRFormStepTypes.CBR_MACRO_PROYECTO:
154
- return (_jsx(SmartSelectStep, __assign({}, props, { step: props.step, icon: _jsx(ProjectIcon, { fill: "#757575", style: {
155
- display: 'flex',
156
- height: 23,
157
- width: 23,
158
- } }), getOptions: getMacroProyectoOptions, getOptionSelected: function (option, value) {
155
+ return (_jsx(SmartSelectStep, __assign({}, props, { step: props.step, icon: _jsx(InputIcon, { icon: 'PROJECT' }), getOptions: getMacroProyectoOptions, getOptionSelected: function (option, value) {
159
156
  return option.id === value.id;
160
157
  }, getValueString: function (value) { return value === null || value === void 0 ? void 0 : value.id; } })));
161
158
  case CBRFormStepTypes.CBR_PROYECTO:
162
- return (_jsx(SmartSelectStep, __assign({}, props, { step: props.step, icon: _jsx(ProjectIcon, { fill: "#757575", style: {
163
- display: 'flex',
164
- height: 24,
165
- width: 24,
166
- } }), getOptions: getProyectoOptions, getOptionSelected: function (option, value) {
159
+ return (_jsx(SmartSelectStep, __assign({}, props, { step: props.step, icon: _jsx(InputIcon, { icon: 'PROJECT' }), getOptions: getProyectoOptions, getOptionSelected: function (option, value) {
167
160
  return option.id === value.id;
168
161
  }, getValueString: function (value) { return value === null || value === void 0 ? void 0 : value.id; } })));
169
162
  case CBRFormStepTypes.CBR_INMUEBLE:
@@ -179,14 +172,11 @@ function CBRStepMapper(props) {
179
172
  return option.id === value.id;
180
173
  }, getValueString: function (value) { return value === null || value === void 0 ? void 0 : value.id; } })));
181
174
  case CBRFormStepTypes.CBR_TIPO_ESPACIO:
182
- return (_jsx(SmartSelectStep, __assign({}, props, { step: props.step, icon: _jsx(SpaceTypeIcon, { fill: "#757575", style: {
183
- display: 'flex',
184
- height: 23,
185
- width: 23,
186
- } }), getOptions: getTipoEspaciosOptions, calcDepError: function (types) {
187
- for (var _i = 0, _a = types; _i < _a.length; _i++) {
188
- var type = _a[_i];
189
- if (type === CBRFormStepTypes.CBR_PROYECTO) {
175
+ return (_jsx(SmartSelectStep, __assign({}, props, { step: props.step, icon: _jsx(InputIcon, { icon: 'SPACE' }), getOptions: getTipoEspaciosOptions, calcDepError: function (steps) {
176
+ for (var _i = 0, steps_1 = steps; _i < steps_1.length; _i++) {
177
+ var step = steps_1[_i];
178
+ if (step.type ===
179
+ CBRFormStepTypes.CBR_PROYECTO) {
190
180
  return 'Selecciona un proyecto';
191
181
  }
192
182
  }
@@ -195,7 +185,7 @@ function CBRStepMapper(props) {
195
185
  return option.id === value.id;
196
186
  }, getValueString: function (value) { return value === null || value === void 0 ? void 0 : value.id; } })));
197
187
  case CBRFormStepTypes.CBR_LOCATIVAS:
198
- return _jsx(CBRLocativasStep, __assign({}, props, { step: props.step }));
188
+ return _jsx(CBRElementStep, __assign({}, props, { step: props.step }));
199
189
  case CBRFormStepTypes.CBR_COMENTARIO:
200
190
  return _jsx(TextAreaStep, __assign({}, props, { step: props.step }));
201
191
  case CBRFormStepTypes.CBR_INCIDENCIAS:
@@ -205,15 +195,8 @@ function CBRStepMapper(props) {
205
195
  }
206
196
  }
207
197
  export default CBRStepMapper;
208
- function DocumentIconComponent(props) {
198
+ function DocumentIconComponent() {
209
199
  return (_jsx("div", __assign({ style: {
210
200
  marginRight: 2,
211
- } }, { children: _jsx(DocumentIcon, { className: props.className, fill: "#757575", style: {
212
- display: 'flex',
213
- height: 23,
214
- width: 23,
215
- } }) })));
201
+ } }, { children: _jsx(InputIcon, { icon: 'DOCUMENT' }) })));
216
202
  }
217
- 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" })] }))] }))); };
218
- 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" }) }))); };
219
- 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" }) }))); };
@@ -26,9 +26,7 @@ import MaterialCheckBoxStep from './MaterialCheckBoxStep/MaterialCheckBoxStep';
26
26
  function CheckboxStep(_a) {
27
27
  var formStyle = _a.formStyle, others = __rest(_a, ["formStyle"]);
28
28
  switch (formStyle.type) {
29
- case FormStyleTypes.MATERIAL: {
30
- return _jsx(MaterialCheckBoxStep, __assign({ formStyle: formStyle }, others));
31
- }
29
+ case FormStyleTypes.MATERIAL:
32
30
  default: {
33
31
  return _jsx(MaterialCheckBoxStep, __assign({ formStyle: formStyle }, others));
34
32
  }
@@ -9,6 +9,17 @@ var __assign = (this && this.__assign) || function () {
9
9
  };
10
10
  return __assign.apply(this, arguments);
11
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
+ };
12
23
  import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
13
24
  import styles from './MaterialCheckBoxStep.module.css';
14
25
  import { calcStepWidth } from '../../StepFunctions';
@@ -26,8 +37,8 @@ function CheckBoxStep(_a) {
26
37
  ? 'Este campo es obligatorio'
27
38
  : undefined,
28
39
  }, 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 })));
40
+ var _b = _a.field, ref = _b.ref, field = __rest(_b, ["ref"]);
41
+ return (_jsx(RoundedCheckBox, __assign({}, field, { "data-testid": step.id, inputRef: ref, padding: "0px", size: "1.6rem", error: !!errors[step.id], cantEdit: !editable || postview, checkedColor: formStyle.primaryColor, uncheckedColor: formStyle.outlineColor, checked: field.value })));
31
42
  } })] })), (step.description || !!errors[step.id]) && (_jsx("div", __assign({ className: styles.descriptionPar, style: {
32
43
  color: !!errors[step.id]
33
44
  ? formStyle.errorColor