@arquimedes.co/eureka-forms 1.9.79-test → 1.9.80-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 (217) hide show
  1. package/dist/@Types/@Types.d.ts +2 -0
  2. package/dist/@Types/@Types.js +1 -0
  3. package/dist/@Types/AYFFormStep.d.ts +19 -0
  4. package/dist/@Types/AYFFormStep.js +1 -0
  5. package/dist/@Types/CBRFormStep.d.ts +74 -0
  6. package/dist/@Types/CBRFormStep.js +1 -0
  7. package/dist/@Types/Form.d.ts +65 -0
  8. package/dist/@Types/Form.js +1 -0
  9. package/dist/@Types/FormStep.d.ts +138 -0
  10. package/dist/@Types/FormStep.js +1 -0
  11. package/dist/@Types/GenericFormSteps.d.ts +60 -0
  12. package/dist/@Types/GenericFormSteps.js +1 -0
  13. package/dist/@Types/Organization.d.ts +17 -0
  14. package/dist/@Types/Organization.js +1 -0
  15. package/dist/@Types/index.d.ts +1 -0
  16. package/dist/@Types/index.js +1 -0
  17. package/dist/App.d.ts +58 -0
  18. package/dist/App.js +470 -0
  19. package/dist/App.module.css +34 -0
  20. package/dist/AxiosAPI.d.ts +2 -0
  21. package/dist/AxiosAPI.js +8 -0
  22. package/dist/AxiosWidget.d.ts +2 -0
  23. package/dist/AxiosWidget.js +8 -0
  24. package/dist/FormComponents/Form/ColumnForm/ColumnForm.d.ts +7 -0
  25. package/dist/FormComponents/Form/ColumnForm/ColumnForm.js +379 -0
  26. package/dist/FormComponents/Form/ColumnForm/ColumnForm.module.css +51 -0
  27. package/dist/FormComponents/Form/ConfirmationDialog/ConfirmationDialog.d.ts +12 -0
  28. package/dist/FormComponents/Form/ConfirmationDialog/ConfirmationDialog.js +31 -0
  29. package/dist/FormComponents/Form/ConfirmationDialog/ConfirmationDialog.module.css +64 -0
  30. package/dist/FormComponents/Form/Form.d.ts +41 -0
  31. package/dist/FormComponents/Form/Form.js +147 -0
  32. package/dist/FormComponents/Form/Form.module.css +39 -0
  33. package/dist/FormComponents/Form/StepperForm/StepperForm.d.ts +4 -0
  34. package/dist/FormComponents/Form/StepperForm/StepperForm.js +6 -0
  35. package/dist/FormComponents/Form/StepperForm/StepperForm.module.css +0 -0
  36. package/dist/FormComponents/Section/MaterialSection/MaterialSection.d.ts +4 -0
  37. package/dist/FormComponents/Section/MaterialSection/MaterialSection.js +42 -0
  38. package/dist/FormComponents/Section/MaterialSection/MaterialSection.module.css +8 -0
  39. package/dist/FormComponents/Section/Section.d.ts +38 -0
  40. package/dist/FormComponents/Section/Section.js +23 -0
  41. package/dist/FormComponents/Step/@Construction/CBRElementStep/CBRElementStep.d.ts +8 -0
  42. package/dist/FormComponents/Step/@Construction/CBRElementStep/CBRElementStep.js +139 -0
  43. package/dist/FormComponents/Step/@Construction/CBRIncidentsStep/CBRIncidentsStep.d.ts +9 -0
  44. package/dist/FormComponents/Step/@Construction/CBRIncidentsStep/CBRIncidentsStep.js +23 -0
  45. package/dist/FormComponents/Step/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/Incident/Incident.d.ts +8 -0
  46. package/dist/FormComponents/Step/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/Incident/Incident.js +49 -0
  47. package/dist/FormComponents/Step/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/Incident/Incident.module.css +60 -0
  48. package/dist/FormComponents/Step/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/MaterialCBRIncidentsStep.d.ts +11 -0
  49. package/dist/FormComponents/Step/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/MaterialCBRIncidentsStep.js +121 -0
  50. package/dist/FormComponents/Step/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/MaterialCBRIncidentsStep.module.css +34 -0
  51. package/dist/FormComponents/Step/@Construction/CBRPropertyStep/CBRPropertyStep.d.ts +8 -0
  52. package/dist/FormComponents/Step/@Construction/CBRPropertyStep/CBRPropertyStep.js +138 -0
  53. package/dist/FormComponents/Step/@Construction/CBRPropertyStep/CBRPropertyStep.module.css +54 -0
  54. package/dist/FormComponents/Step/AYFStepMapper.d.ts +12 -0
  55. package/dist/FormComponents/Step/AYFStepMapper.js +170 -0
  56. package/dist/FormComponents/Step/CBRStepMapper.d.ts +13 -0
  57. package/dist/FormComponents/Step/CBRStepMapper.js +202 -0
  58. package/dist/FormComponents/Step/CheckBoxStep/CheckBoxStep.d.ts +9 -0
  59. package/dist/FormComponents/Step/CheckBoxStep/CheckBoxStep.js +35 -0
  60. package/dist/FormComponents/Step/CheckBoxStep/MaterialCheckBoxStep/MaterialCheckBoxStep.d.ts +4 -0
  61. package/dist/FormComponents/Step/CheckBoxStep/MaterialCheckBoxStep/MaterialCheckBoxStep.js +65 -0
  62. package/dist/FormComponents/Step/CheckBoxStep/MaterialCheckBoxStep/MaterialCheckBoxStep.module.css +37 -0
  63. package/dist/FormComponents/Step/ClassifierSelectorStep/ClassifierSelectorStep.d.ts +9 -0
  64. package/dist/FormComponents/Step/ClassifierSelectorStep/ClassifierSelectorStep.js +35 -0
  65. package/dist/FormComponents/Step/ClassifierSelectorStep/MaterialClassifierSelectorStep/MaterialClassifierSelectorStep.d.ts +4 -0
  66. package/dist/FormComponents/Step/ClassifierSelectorStep/MaterialClassifierSelectorStep/MaterialClassifierSelectorStep.js +121 -0
  67. package/dist/FormComponents/Step/ClassifierSelectorStep/MaterialClassifierSelectorStep/MaterialClassifierSelectorStep.module.css +25 -0
  68. package/dist/FormComponents/Step/CollapsibleStep/CollapsibleStep.d.ts +9 -0
  69. package/dist/FormComponents/Step/CollapsibleStep/CollapsibleStep.js +37 -0
  70. package/dist/FormComponents/Step/CollapsibleStep/MaterialTitleStep/MaterialCollapsibleStep.d.ts +4 -0
  71. package/dist/FormComponents/Step/CollapsibleStep/MaterialTitleStep/MaterialCollapsibleStep.js +75 -0
  72. package/dist/FormComponents/Step/CollapsibleStep/MaterialTitleStep/MaterialCollapsibleStep.module.css +62 -0
  73. package/dist/FormComponents/Step/DatePickerStep/DatePickerStep.d.ts +11 -0
  74. package/dist/FormComponents/Step/DatePickerStep/DatePickerStep.js +23 -0
  75. package/dist/FormComponents/Step/DatePickerStep/MaterialDatePickerStep/MaterialDatePickerStep.d.ts +4 -0
  76. package/dist/FormComponents/Step/DatePickerStep/MaterialDatePickerStep/MaterialDatePickerStep.js +48 -0
  77. package/dist/FormComponents/Step/DatePickerStep/MaterialDatePickerStep/MaterialDatePickerStep.module.css +9 -0
  78. package/dist/FormComponents/Step/EntityValueStep/EntityValuePickerStep.d.ts +15 -0
  79. package/dist/FormComponents/Step/EntityValueStep/EntityValuePickerStep.js +35 -0
  80. package/dist/FormComponents/Step/EntityValueStep/MaterialEntityValuePickerStep/MaterialEntityValuePickerStep.d.ts +4 -0
  81. package/dist/FormComponents/Step/EntityValueStep/MaterialEntityValuePickerStep/MaterialEntityValuePickerStep.js +203 -0
  82. package/dist/FormComponents/Step/EntityValueStep/MaterialEntityValuePickerStep/MaterialEntityValuePickerStep.module.css +25 -0
  83. package/dist/FormComponents/Step/FileUploadStep/FileUploadStep.d.ts +9 -0
  84. package/dist/FormComponents/Step/FileUploadStep/FileUploadStep.js +23 -0
  85. package/dist/FormComponents/Step/FileUploadStep/MaterialFileUploadStep/FileComponent/FileComponent.d.ts +13 -0
  86. package/dist/FormComponents/Step/FileUploadStep/MaterialFileUploadStep/FileComponent/FileComponent.js +123 -0
  87. package/dist/FormComponents/Step/FileUploadStep/MaterialFileUploadStep/FileComponent/FileComponent.module.css +60 -0
  88. package/dist/FormComponents/Step/FileUploadStep/MaterialFileUploadStep/MaterialFileUploadStep.d.ts +16 -0
  89. package/dist/FormComponents/Step/FileUploadStep/MaterialFileUploadStep/MaterialFileUploadStep.js +272 -0
  90. package/dist/FormComponents/Step/FileUploadStep/MaterialFileUploadStep/MaterialFileUploadStep.module.css +59 -0
  91. package/dist/FormComponents/Step/MapperStep/MapperStep.d.ts +15 -0
  92. package/dist/FormComponents/Step/MapperStep/MapperStep.js +35 -0
  93. package/dist/FormComponents/Step/MapperStep/MaterialMapperStep/Element/MapperElement.d.ts +10 -0
  94. package/dist/FormComponents/Step/MapperStep/MaterialMapperStep/Element/MapperElement.js +27 -0
  95. package/dist/FormComponents/Step/MapperStep/MaterialMapperStep/Element/MapperElement.module.css +60 -0
  96. package/dist/FormComponents/Step/MapperStep/MaterialMapperStep/Element/PillElementContainer/PillElementContainer.d.ts +13 -0
  97. package/dist/FormComponents/Step/MapperStep/MaterialMapperStep/Element/PillElementContainer/PillElementContainer.js +33 -0
  98. package/dist/FormComponents/Step/MapperStep/MaterialMapperStep/Element/PillElementContainer/PillElementContainer.module.css +60 -0
  99. package/dist/FormComponents/Step/MapperStep/MaterialMapperStep/MaterialMapperStep.d.ts +15 -0
  100. package/dist/FormComponents/Step/MapperStep/MaterialMapperStep/MaterialMapperStep.js +275 -0
  101. package/dist/FormComponents/Step/MapperStep/MaterialMapperStep/MaterialMapperStep.module.css +42 -0
  102. package/dist/FormComponents/Step/RatingStep/MaterialRatingStep/MaterialRatingStep.d.ts +4 -0
  103. package/dist/FormComponents/Step/RatingStep/MaterialRatingStep/MaterialRatingStep.js +71 -0
  104. package/dist/FormComponents/Step/RatingStep/MaterialRatingStep/MaterialRatingStep.module.css +30 -0
  105. package/dist/FormComponents/Step/RatingStep/RatingStep.d.ts +9 -0
  106. package/dist/FormComponents/Step/RatingStep/RatingStep.js +23 -0
  107. package/dist/FormComponents/Step/SelectorStep/MaterialSelectorStep/MaterialSelectorStep.d.ts +4 -0
  108. package/dist/FormComponents/Step/SelectorStep/MaterialSelectorStep/MaterialSelectorStep.js +104 -0
  109. package/dist/FormComponents/Step/SelectorStep/MaterialSelectorStep/MaterialSelectorStep.module.css +25 -0
  110. package/dist/FormComponents/Step/SelectorStep/SelectorStep.d.ts +9 -0
  111. package/dist/FormComponents/Step/SelectorStep/SelectorStep.js +35 -0
  112. package/dist/FormComponents/Step/SeparatorStep/MaterialSeparatorStep/MaterialSeparatorStep.d.ts +4 -0
  113. package/dist/FormComponents/Step/SeparatorStep/MaterialSeparatorStep/MaterialSeparatorStep.js +11 -0
  114. package/dist/FormComponents/Step/SeparatorStep/MaterialSeparatorStep/MaterialSeparatorStep.module.css +7 -0
  115. package/dist/FormComponents/Step/SeparatorStep/SeparatorStep.d.ts +9 -0
  116. package/dist/FormComponents/Step/SeparatorStep/SeparatorStep.js +35 -0
  117. package/dist/FormComponents/Step/SmartSelectStep/MaterialSmartSelectStep/MaterialSmartSelectStep.d.ts +10 -0
  118. package/dist/FormComponents/Step/SmartSelectStep/MaterialSmartSelectStep/MaterialSmartSelectStep.js +241 -0
  119. package/dist/FormComponents/Step/SmartSelectStep/MaterialSmartSelectStep/MaterialSmartSelectStep.module.css +9 -0
  120. package/dist/FormComponents/Step/SmartSelectStep/SmartSelectStep.d.ts +33 -0
  121. package/dist/FormComponents/Step/SmartSelectStep/SmartSelectStep.js +23 -0
  122. package/dist/FormComponents/Step/Step.d.ts +11 -0
  123. package/dist/FormComponents/Step/Step.js +108 -0
  124. package/dist/FormComponents/Step/StepFunctions.d.ts +5 -0
  125. package/dist/FormComponents/Step/StepFunctions.js +65 -0
  126. package/dist/FormComponents/Step/TextAreaStep/MaterialTextAreaStep/DraftEditor.css +96 -0
  127. package/dist/FormComponents/Step/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaStep.d.ts +13 -0
  128. package/dist/FormComponents/Step/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaStep.js +213 -0
  129. package/dist/FormComponents/Step/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaStep.module.css +93 -0
  130. package/dist/FormComponents/Step/TextAreaStep/TextAreaStep.d.ts +10 -0
  131. package/dist/FormComponents/Step/TextAreaStep/TextAreaStep.js +23 -0
  132. package/dist/FormComponents/Step/TextInputStep/MaterialTextInputStep/MaterialTextInputStep.d.ts +4 -0
  133. package/dist/FormComponents/Step/TextInputStep/MaterialTextInputStep/MaterialTextInputStep.js +76 -0
  134. package/dist/FormComponents/Step/TextInputStep/MaterialTextInputStep/MaterialTextInputStep.module.css +9 -0
  135. package/dist/FormComponents/Step/TextInputStep/TextInputStep.d.ts +13 -0
  136. package/dist/FormComponents/Step/TextInputStep/TextInputStep.js +23 -0
  137. package/dist/FormComponents/Step/TitleStep/MaterialTitleStep/MaterialTitleStep.d.ts +4 -0
  138. package/dist/FormComponents/Step/TitleStep/MaterialTitleStep/MaterialTitleStep.js +20 -0
  139. package/dist/FormComponents/Step/TitleStep/MaterialTitleStep/MaterialTitleStep.module.css +19 -0
  140. package/dist/FormComponents/Step/TitleStep/TitleStep.d.ts +9 -0
  141. package/dist/FormComponents/Step/TitleStep/TitleStep.js +35 -0
  142. package/dist/FormComponents/Term/MaterialTerm/MaterialTerm.d.ts +4 -0
  143. package/dist/FormComponents/Term/MaterialTerm/MaterialTerm.js +88 -0
  144. package/dist/FormComponents/Term/MaterialTerm/MaterialTerm.module.css +83 -0
  145. package/dist/FormComponents/Term/Term.d.ts +15 -0
  146. package/dist/FormComponents/Term/Term.js +23 -0
  147. package/dist/Icons/Construction/LeakIcon.d.ts +3 -0
  148. package/dist/Icons/Construction/LeakIcon.js +16 -0
  149. package/dist/Icons/Construction/ProjectIcon.d.ts +3 -0
  150. package/dist/Icons/Construction/ProjectIcon.js +16 -0
  151. package/dist/Icons/Construction/PropertyIcon.d.ts +3 -0
  152. package/dist/Icons/Construction/PropertyIcon.js +16 -0
  153. package/dist/Icons/Construction/SpaceIcon.d.ts +3 -0
  154. package/dist/Icons/Construction/SpaceIcon.js +16 -0
  155. package/dist/Icons/DocumentIcon.d.ts +3 -0
  156. package/dist/Icons/DocumentIcon.js +16 -0
  157. package/dist/Icons/Entities/GenericEntityIcon.d.ts +2 -0
  158. package/dist/Icons/Entities/GenericEntityIcon.js +17 -0
  159. package/dist/Icons/Entities/HandshakeIcon.d.ts +2 -0
  160. package/dist/Icons/Entities/HandshakeIcon.js +17 -0
  161. package/dist/Widget.d.ts +1 -0
  162. package/dist/Widget.js +61 -0
  163. package/dist/constants/AYFFormStepTypes.d.ts +9 -0
  164. package/dist/constants/AYFFormStepTypes.js +10 -0
  165. package/dist/constants/CBRFormStepTypes.d.ts +21 -0
  166. package/dist/constants/CBRFormStepTypes.js +22 -0
  167. package/dist/constants/Files/FileExtensions.d.ts +3 -0
  168. package/dist/constants/Files/FileExtensions.js +68 -0
  169. package/dist/constants/Files/FileMaxSize.d.ts +2 -0
  170. package/dist/constants/Files/FileMaxSize.js +2 -0
  171. package/dist/constants/FormStepTypes.d.ts +46 -0
  172. package/dist/constants/FormStepTypes.js +54 -0
  173. package/dist/constants/IconTypes.d.ts +10 -0
  174. package/dist/constants/IconTypes.js +11 -0
  175. package/dist/constants/InternalFormStyle.d.ts +3 -0
  176. package/dist/constants/InternalFormStyle.js +16 -0
  177. package/dist/constants/MaterialClassNameSeed.d.ts +1 -0
  178. package/dist/constants/MaterialClassNameSeed.js +1 -0
  179. package/dist/controllers/FileService.d.ts +5 -0
  180. package/dist/controllers/FileService.js +92 -0
  181. package/dist/index.d.ts +1 -0
  182. package/dist/index.js +29 -0
  183. package/dist/index.lib.d.ts +7 -0
  184. package/dist/index.lib.js +5 -0
  185. package/dist/index.module.css +14 -0
  186. package/dist/shared/InputIcon/InputIcon.d.ts +7 -0
  187. package/dist/shared/InputIcon/InputIcon.js +81 -0
  188. package/dist/shared/Loader/Loader.d.ts +18 -0
  189. package/dist/shared/Loader/Loader.js +26 -0
  190. package/dist/shared/Loader/Loader.module.css +12 -0
  191. package/dist/shared/Navbar/Navbar.d.ts +9 -0
  192. package/dist/shared/Navbar/Navbar.js +18 -0
  193. package/dist/shared/Navbar/Navbar.module.css +18 -0
  194. package/dist/shared/Rating/Rating.d.ts +16 -0
  195. package/dist/shared/Rating/Rating.js +41 -0
  196. package/dist/shared/Rating/Rating.module.css +32 -0
  197. package/dist/shared/Rating/Ratings/LikeRating.d.ts +4 -0
  198. package/dist/shared/Rating/Ratings/LikeRating.js +43 -0
  199. package/dist/shared/Rating/Ratings/SatisfactionRating.d.ts +4 -0
  200. package/dist/shared/Rating/Ratings/SatisfactionRating.js +61 -0
  201. package/dist/shared/Rating/Ratings/ScaleRating.d.ts +4 -0
  202. package/dist/shared/Rating/Ratings/ScaleRating.js +63 -0
  203. package/dist/shared/RoundedButton/RoundedButton.d.ts +30 -0
  204. package/dist/shared/RoundedButton/RoundedButton.js +45 -0
  205. package/dist/shared/RoundedCheckBox/RoundedCheckBox.d.ts +24 -0
  206. package/dist/shared/RoundedCheckBox/RoundedCheckBox.js +101 -0
  207. package/dist/shared/RoundedDatePicker/RoundedDatePicker.d.ts +48 -0
  208. package/dist/shared/RoundedDatePicker/RoundedDatePicker.js +348 -0
  209. package/dist/shared/RoundedSelect/RoundedSelect.d.ts +68 -0
  210. package/dist/shared/RoundedSelect/RoundedSelect.js +214 -0
  211. package/dist/shared/RoundedSmartSelect/RoundedSmartSelect.d.ts +66 -0
  212. package/dist/shared/RoundedSmartSelect/RoundedSmartSelect.js +234 -0
  213. package/dist/shared/RoundedTextField/RoundedTextField.d.ts +45 -0
  214. package/dist/shared/RoundedTextField/RoundedTextField.js +175 -0
  215. package/dist/utils/CbrFunctions.d.ts +8 -0
  216. package/dist/utils/CbrFunctions.js +53 -0
  217. package/package.json +1 -1
@@ -0,0 +1,202 @@
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
+ };
48
+ import { jsx as _jsx } from "react/jsx-runtime";
49
+ import CBRFormStepTypes from '../../constants/CBRFormStepTypes';
50
+ import PersonRoundedIcon from '@material-ui/icons/PersonRounded';
51
+ import TextInputStep from './TextInputStep/TextInputStep';
52
+ import SmartSelectStep from './SmartSelectStep/SmartSelectStep';
53
+ import TextAreaStep from './TextAreaStep/TextAreaStep';
54
+ import CBRIncidentsStep from './@Construction/CBRIncidentsStep/CBRIncidentsStep';
55
+ import CBRElementStep from './@Construction/CBRElementStep/CBRElementStep';
56
+ import axios from 'axios';
57
+ import CBRPropertyStep from './@Construction/CBRPropertyStep/CBRPropertyStep';
58
+ import InputIcon from '../../shared/InputIcon/InputIcon';
59
+ var baseUrl = "https://integrations.".concat(process.env.REACT_APP_DOMAIN, "/sinco/cbr/");
60
+ function CBRStepMapper(props) {
61
+ var _this = this;
62
+ var getTipoDocOptions = function (_a) {
63
+ var idOrganization = _a.idOrganization;
64
+ return __awaiter(_this, void 0, void 0, function () {
65
+ return __generator(this, function (_b) {
66
+ switch (_b.label) {
67
+ case 0: return [4 /*yield*/, axios.get(baseUrl + 'TiposDoc?idOrganization=' + idOrganization)];
68
+ case 1: return [2 /*return*/, (_b.sent()).data];
69
+ }
70
+ });
71
+ });
72
+ };
73
+ var getProyectoOptions = function (_a, step, dependencyStore) {
74
+ var idOrganization = _a.idOrganization;
75
+ return __awaiter(_this, void 0, void 0, function () {
76
+ var idMacroProyecto, proyectos;
77
+ var _b, _c, _d;
78
+ return __generator(this, function (_e) {
79
+ switch (_e.label) {
80
+ case 0:
81
+ idMacroProyecto = (_d = dependencyStore[(_c = (_b = step.dependencies) === null || _b === void 0 ? void 0 : _b[0]) !== null && _c !== void 0 ? _c : '']) === null || _d === void 0 ? void 0 : _d.id;
82
+ return [4 /*yield*/, axios.get(baseUrl + 'Proyectos?idOrganization=' + idOrganization)];
83
+ case 1:
84
+ proyectos = (_e.sent()).data;
85
+ if (idMacroProyecto) {
86
+ proyectos = proyectos.filter(function (proyecto) { return proyecto.idMacroProyecto === idMacroProyecto; });
87
+ }
88
+ return [2 /*return*/, proyectos];
89
+ }
90
+ });
91
+ });
92
+ };
93
+ var getMacroProyectoOptions = function (_a) {
94
+ var idOrganization = _a.idOrganization;
95
+ return __awaiter(_this, void 0, void 0, function () {
96
+ return __generator(this, function (_b) {
97
+ switch (_b.label) {
98
+ case 0: return [4 /*yield*/, axios.get(baseUrl + 'MacroProyectos?idOrganization=' + idOrganization)];
99
+ case 1: return [2 /*return*/, (_b.sent()).data];
100
+ }
101
+ });
102
+ });
103
+ };
104
+ var getTipoSolicitanteOptions = function (_a) {
105
+ var idOrganization = _a.idOrganization;
106
+ return __awaiter(_this, void 0, void 0, function () {
107
+ return __generator(this, function (_b) {
108
+ switch (_b.label) {
109
+ case 0: return [4 /*yield*/, axios.get(baseUrl + 'TiposSolicitante?idOrganization=' + idOrganization)];
110
+ case 1: return [2 /*return*/, (_b.sent()).data];
111
+ }
112
+ });
113
+ });
114
+ };
115
+ var getTipoEspaciosOptions = function (_a, step, dependencyStore) {
116
+ var idOrganization = _a.idOrganization;
117
+ return __awaiter(_this, void 0, void 0, function () {
118
+ var idProyecto;
119
+ var _b;
120
+ return __generator(this, function (_c) {
121
+ switch (_c.label) {
122
+ case 0:
123
+ if (!step.dependencies) return [3 /*break*/, 2];
124
+ idProyecto = (_b = dependencyStore[step.dependencies[0]]) === null || _b === void 0 ? void 0 : _b.id;
125
+ if (!idProyecto) {
126
+ return [2 /*return*/, null]; //null para indicar que falta la depedency
127
+ }
128
+ return [4 /*yield*/, axios.get(baseUrl +
129
+ 'TiposEspacio?idProyecto=' +
130
+ idProyecto +
131
+ '&idOrganization=' +
132
+ idOrganization)];
133
+ case 1: return [2 /*return*/, (_c.sent()).data];
134
+ case 2: return [2 /*return*/, null];
135
+ }
136
+ });
137
+ });
138
+ };
139
+ switch (props.step.type) {
140
+ case CBRFormStepTypes.CBR_CEL:
141
+ case CBRFormStepTypes.CBR_EMAIL:
142
+ case CBRFormStepTypes.CBR_PHONE:
143
+ case CBRFormStepTypes.CBR_LAST_NAME:
144
+ case CBRFormStepTypes.CBR_FIRST_NAME:
145
+ case CBRFormStepTypes.CBR_MIDDLE_NAME:
146
+ case CBRFormStepTypes.CBR_SECOND_LAST_NAME:
147
+ return _jsx(TextInputStep, __assign({}, props, { step: props.step }));
148
+ case CBRFormStepTypes.CBR_DOC:
149
+ return (_jsx(TextInputStep, __assign({}, props, { step: props.step, icon: _jsx(DocumentIconComponent, {}) })));
150
+ case CBRFormStepTypes.CBR_TIPO_DOC:
151
+ return (_jsx(SmartSelectStep, __assign({}, props, { step: __assign(__assign({}, props.step), { showIcon: false }), getOptions: getTipoDocOptions, getOptionSelected: function (option, value) {
152
+ return option.id === value.id;
153
+ }, getValueString: function (value) { return value === null || value === void 0 ? void 0 : value.id; } })));
154
+ case CBRFormStepTypes.CBR_MACRO_PROYECTO:
155
+ return (_jsx(SmartSelectStep, __assign({}, props, { step: props.step, icon: _jsx(InputIcon, { icon: 'PROJECT' }), getOptions: getMacroProyectoOptions, getOptionSelected: function (option, value) {
156
+ return option.id === value.id;
157
+ }, getValueString: function (value) { return value === null || value === void 0 ? void 0 : value.id; } })));
158
+ case CBRFormStepTypes.CBR_PROYECTO:
159
+ return (_jsx(SmartSelectStep, __assign({}, props, { step: props.step, icon: _jsx(InputIcon, { icon: 'PROJECT' }), getOptions: getProyectoOptions, getOptionSelected: function (option, value) {
160
+ return option.id === value.id;
161
+ }, getValueString: function (value) { return value === null || value === void 0 ? void 0 : value.id; } })));
162
+ case CBRFormStepTypes.CBR_INMUEBLE:
163
+ return _jsx(CBRPropertyStep, __assign({}, props, { step: props.step }));
164
+ case CBRFormStepTypes.CBR_TIPO_SOLICITANTE:
165
+ return (_jsx(SmartSelectStep, __assign({}, props, { step: props.step, icon: _jsx(PersonRoundedIcon, { fill: "#757575", style: {
166
+ display: 'flex',
167
+ height: 23,
168
+ width: 23,
169
+ marginRight: 3,
170
+ marginTop: 1,
171
+ } }), getOptions: getTipoSolicitanteOptions, getOptionSelected: function (option, value) {
172
+ return option.id === value.id;
173
+ }, getValueString: function (value) { return value === null || value === void 0 ? void 0 : value.id; } })));
174
+ case CBRFormStepTypes.CBR_TIPO_ESPACIO:
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) {
180
+ return 'Selecciona un proyecto';
181
+ }
182
+ }
183
+ return undefined;
184
+ }, getOptionSelected: function (option, value) {
185
+ return option.id === value.id;
186
+ }, getValueString: function (value) { return value === null || value === void 0 ? void 0 : value.id; } })));
187
+ case CBRFormStepTypes.CBR_LOCATIVAS:
188
+ return _jsx(CBRElementStep, __assign({}, props, { step: props.step }));
189
+ case CBRFormStepTypes.CBR_COMENTARIO:
190
+ return _jsx(TextAreaStep, __assign({}, props, { step: props.step }));
191
+ case CBRFormStepTypes.CBR_INCIDENCIAS:
192
+ return _jsx(CBRIncidentsStep, __assign({}, props, { step: props.step }));
193
+ default:
194
+ return _jsx("div", {});
195
+ }
196
+ }
197
+ export default CBRStepMapper;
198
+ function DocumentIconComponent() {
199
+ return (_jsx("div", __assign({ style: {
200
+ marginRight: 2,
201
+ } }, { children: _jsx(InputIcon, { icon: 'DOCUMENT' }) })));
202
+ }
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ import { CheckBox } from '../../../@Types/FormStep';
3
+ import { StepProps } from '../Step';
4
+ export interface CheckBoxStepProps extends StepProps {
5
+ /** The CheckboxStep to display */
6
+ step: CheckBox;
7
+ }
8
+ declare function CheckboxStep({ formStyle, ...others }: CheckBoxStepProps): JSX.Element;
9
+ export default CheckboxStep;
@@ -0,0 +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
+ };
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
+ };
23
+ import { jsx as _jsx } from "react/jsx-runtime";
24
+ import { FormStyleTypes } from '../../../constants/FormStepTypes';
25
+ import MaterialCheckBoxStep from './MaterialCheckBoxStep/MaterialCheckBoxStep';
26
+ function CheckboxStep(_a) {
27
+ var formStyle = _a.formStyle, others = __rest(_a, ["formStyle"]);
28
+ switch (formStyle.type) {
29
+ case FormStyleTypes.MATERIAL:
30
+ default: {
31
+ return _jsx(MaterialCheckBoxStep, __assign({ formStyle: formStyle }, others));
32
+ }
33
+ }
34
+ }
35
+ export default CheckboxStep;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { CheckBoxStepProps } from '../CheckBoxStep';
3
+ declare function CheckBoxStep(props: CheckBoxStepProps): JSX.Element;
4
+ export default CheckBoxStep;
@@ -0,0 +1,65 @@
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
+ };
23
+ import { createElement as _createElement } from "react";
24
+ import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
25
+ import styles from './MaterialCheckBoxStep.module.css';
26
+ import { calcStepWidth } from '../../StepFunctions';
27
+ import RoundedCheckBox from '../../../../shared/RoundedCheckBox/RoundedCheckBox';
28
+ import { Controller } from 'react-hook-form';
29
+ import React from 'react';
30
+ import StepComponent from '../../Step';
31
+ function CheckBox(_a) {
32
+ var step = _a.step, form = _a.form, value = _a.value, onBlur = _a.onBlur, errors = _a.errors, onChange = _a.onChange, inputRef = _a.inputRef, editable = _a.editable, postview = _a.postview, formStyle = _a.formStyle, widthStats = _a.widthStats, others = __rest(_a, ["step", "form", "value", "onBlur", "errors", "onChange", "inputRef", "editable", "postview", "formStyle", "widthStats"]);
33
+ return (_jsxs(React.Fragment, { children: [_jsxs("div", __assign({ className: styles.container, style: {
34
+ width: widthStats.currentBreakPoint <= step.size
35
+ ? '100%'
36
+ : calcStepWidth(step.size, form.size),
37
+ minHeight: step.description ||
38
+ (!postview && editable && step.required)
39
+ ? '55px'
40
+ : '43px',
41
+ } }, { children: [_jsxs("div", __assign({ className: styles.labelCheckBoxContainer }, { children: [step.label && (_jsxs("div", __assign({ className: styles.checkboxLbl }, { children: [step.label, step.required ? ' *' : '', ":"] }))), _jsx(RoundedCheckBox, { onChange: onChange, onBlur: onBlur, "data-testid": step.id, inputRef: inputRef, padding: "0px", size: "1.6rem", error: !!errors[step.id], cantEdit: !editable || postview, checkedColor: formStyle.primaryColor, uncheckedColor: formStyle.outlineColor, checked: value })] })), (step.description || !!errors[step.id]) && (_jsx("div", __assign({ className: styles.descriptionPar, style: {
42
+ color: !!errors[step.id]
43
+ ? formStyle.errorColor
44
+ : formStyle.descriptionTextColor,
45
+ } }, { children: !!errors[step.id]
46
+ ? 'Este campo es obligatorio'
47
+ : step.description })))] })), value &&
48
+ step.steps &&
49
+ step.steps.map(function (idSubStep) {
50
+ var subStep = form.steps[idSubStep];
51
+ return (_createElement(StepComponent, __assign({}, others, { editable: editable, postview: postview, errors: errors, formStyle: formStyle, form: form, widthStats: widthStats, step: subStep, key: idSubStep, handleSizeChange: function () { } })));
52
+ })] }));
53
+ }
54
+ function CheckBoxStep(props) {
55
+ var _a;
56
+ return (_jsx(Controller, { name: props.step.id, control: props.control, defaultValue: (_a = props.originalValues[props.step.id]) !== null && _a !== void 0 ? _a : false, rules: {
57
+ required: props.step.required
58
+ ? 'Este campo es obligatorio'
59
+ : undefined,
60
+ }, shouldUnregister: true, render: function (_a) {
61
+ var _b = _a.field, ref = _b.ref, field = __rest(_b, ["ref"]);
62
+ return (_jsx(CheckBox, __assign({}, props, field, { inputRef: ref })));
63
+ } }));
64
+ }
65
+ export default CheckBoxStep;
@@ -0,0 +1,37 @@
1
+ .container {
2
+ width: fit-content;
3
+ max-width: calc(100% - 20px);
4
+ display: flex;
5
+ padding: 10px;
6
+ padding-bottom: 0px;
7
+ padding-top: 5px;
8
+ margin-bottom: 0px;
9
+ flex-direction: column;
10
+ }
11
+
12
+ .checkboxLbl {
13
+ font-size: 18px;
14
+ margin-right: 10px;
15
+ margin-left: 10px;
16
+ white-space: nowrap;
17
+ overflow: hidden;
18
+ text-overflow: ellipsis;
19
+ }
20
+ .labelCheckBoxContainer {
21
+ display: flex;
22
+ align-items: center;
23
+ flex-direction: row;
24
+ align-items: center;
25
+ height: 31px;
26
+ }
27
+
28
+ .descriptionPar {
29
+ font-size: 0.75rem;
30
+ margin-left: 14px;
31
+ margin-top: 4px;
32
+ font-weight: 400;
33
+ line-height: 1.66;
34
+ max-width: 100%;
35
+ overflow: hidden;
36
+ text-overflow: ellipsis;
37
+ }
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ import { ClassifierSelector } from '../../../@Types/FormStep';
3
+ import { StepProps } from '../Step';
4
+ export interface ClassifierSelectorStepProps extends StepProps {
5
+ /** The ClassifierSelectorStep to display */
6
+ step: ClassifierSelector;
7
+ }
8
+ declare function ClassifierSelectorStep({ formStyle, ...others }: ClassifierSelectorStepProps): JSX.Element;
9
+ export default ClassifierSelectorStep;
@@ -0,0 +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
+ };
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
+ };
23
+ import { jsx as _jsx } from "react/jsx-runtime";
24
+ import { FormStyleTypes } from '../../../constants/FormStepTypes';
25
+ import MaterialClassifierSelectorStep from './MaterialClassifierSelectorStep/MaterialClassifierSelectorStep';
26
+ function ClassifierSelectorStep(_a) {
27
+ var formStyle = _a.formStyle, others = __rest(_a, ["formStyle"]);
28
+ switch (formStyle.type) {
29
+ case FormStyleTypes.MATERIAL:
30
+ default: {
31
+ return (_jsx(MaterialClassifierSelectorStep, __assign({ formStyle: formStyle }, others)));
32
+ }
33
+ }
34
+ }
35
+ export default ClassifierSelectorStep;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { ClassifierSelectorStepProps } from '../ClassifierSelectorStep';
3
+ export default ClassifierSelectorStep;
4
+ declare function ClassifierSelectorStep(props: ClassifierSelectorStepProps): JSX.Element;
@@ -0,0 +1,121 @@
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
+ };
23
+ import { createElement as _createElement } from "react";
24
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
25
+ import React, { useState } from 'react';
26
+ import { ClassifierOptionTypes } from '../../../../constants/FormStepTypes';
27
+ import styles from './MaterialClassifierSelectorStep.module.css';
28
+ import StepComponent from '../../Step';
29
+ import { Controller } from 'react-hook-form';
30
+ import { calcFillerSize, calcStepWidth } from '../../StepFunctions';
31
+ import RoundedSmartSelect from '../../../../shared/RoundedSmartSelect/RoundedSmartSelect';
32
+ function ClassifierSelector(_a) {
33
+ var _b, _c;
34
+ 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"]);
35
+ var _d = useState(level === 0
36
+ ? calcFillerSize(step, form.steps, getValues(), form.size)
37
+ : 0), fillerSize = _d[0], setFillerSize = _d[1];
38
+ if (!step.idClassifier) {
39
+ return _jsx("div", {});
40
+ }
41
+ var classifier = (_b = form.classifiers) === null || _b === void 0 ? void 0 : _b[step.idClassifier];
42
+ if (!classifier) {
43
+ return _jsx("div", {});
44
+ }
45
+ var options = (_c = classifier.children) === null || _c === void 0 ? void 0 : _c.filter(function (idClassifier) {
46
+ var _a, _b;
47
+ return ((_a = step.options[idClassifier]) === null || _a === void 0 ? void 0 : _a.type) !==
48
+ ClassifierOptionTypes.HIDE &&
49
+ ((_b = form.classifiers) === null || _b === void 0 ? void 0 : _b[idClassifier]);
50
+ }).map(function (idClassifier) {
51
+ var _a, _b, _c;
52
+ var classifier = (_a = form.classifiers) === null || _a === void 0 ? void 0 : _a[idClassifier];
53
+ return {
54
+ value: classifier === null || classifier === void 0 ? void 0 : classifier._id,
55
+ label: ((_c = (_b = classifier === null || classifier === void 0 ? void 0 : classifier.clientName) === null || _b === void 0 ? void 0 : _b.trim) === null || _c === void 0 ? void 0 : _c.call(_b)) && others.preview
56
+ ? classifier === null || classifier === void 0 ? void 0 : classifier.clientName
57
+ : classifier === null || classifier === void 0 ? void 0 : classifier.name,
58
+ };
59
+ });
60
+ var sizeChange = function () {
61
+ handleSizeChange === null || handleSizeChange === void 0 ? void 0 : handleSizeChange();
62
+ if (level === 0) {
63
+ setFillerSize(calcFillerSize(step, form.steps, getValues(), form.size));
64
+ }
65
+ };
66
+ var renderSelect = function () {
67
+ var _a;
68
+ return (_jsx("div", __assign({ className: styles.container, style: {
69
+ width: widthStats.currentBreakPoint <= step.size
70
+ ? '100%'
71
+ : calcStepWidth(step.size, form.size),
72
+ minHeight: step.description ||
73
+ (!postview && editable && step.required)
74
+ ? '55px'
75
+ : '43px',
76
+ } }, { children: _jsx(RoundedSmartSelect, { value: value, onBlur: onBlur, disabled: false, loading: false, options: options, inputRef: inputRef, cantEdit: !editable || postview, fullWidth: true, backgroundColor: (_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) {
77
+ onChange(value);
78
+ sizeChange();
79
+ }, getOptionSelected: function (option, value) {
80
+ return option.value === (value === null || value === void 0 ? void 0 : value.value);
81
+ }, helperText: errors[step.id]
82
+ ? errors[step.id].message
83
+ : step.description, error: !!errors[step.id] }) }), step.id));
84
+ };
85
+ var mapNestedOption = function () {
86
+ if (value) {
87
+ var currentOption = step.options[value.value];
88
+ if ((currentOption === null || currentOption === void 0 ? void 0 : currentOption.type) === ClassifierOptionTypes.NESTED) {
89
+ return (_jsx(React.Fragment, { children: currentOption.steps.map(function (idStep) {
90
+ var subStep = form.steps[idStep];
91
+ return (_createElement(StepComponent, __assign({}, others, { postview: postview, editable: editable, widthStats: widthStats, getValues: getValues, formStyle: formStyle, errors: errors, form: form, control: control, step: subStep, key: idStep, level: level + 1, handleSizeChange: function () {
92
+ sizeChange();
93
+ } })));
94
+ }) }));
95
+ }
96
+ }
97
+ };
98
+ if (level === 0 && step.maxSize < form.size.blockNum) {
99
+ return (_jsxs("div", __assign({ className: styles.firstLvlContainer, style: {
100
+ width: widthStats.currentBreakPoint <= step.size
101
+ ? '100%'
102
+ : 'fit-content',
103
+ } }, { children: [renderSelect(), mapNestedOption(), level === 0 && step.maxSize < form.size.blockNum && (_jsx("div", { className: styles.smallSeparator, style: {
104
+ width: fillerSize,
105
+ } }, "SEPARATOR"))] })));
106
+ }
107
+ else {
108
+ return (_jsxs(React.Fragment, { children: [renderSelect(), mapNestedOption(), level === 0 && _jsx("div", { className: styles.separator })] }));
109
+ }
110
+ }
111
+ export default ClassifierSelectorStep;
112
+ function ClassifierSelectorStep(props) {
113
+ return (_jsx(Controller, { name: props.step.id, control: props.control, defaultValue: "", rules: {
114
+ required: props.step.required
115
+ ? 'Este campo es obligatorio'
116
+ : undefined,
117
+ }, shouldUnregister: true, render: function (_a) {
118
+ var _b = _a.field, ref = _b.ref, field = __rest(_b, ["ref"]);
119
+ return (_jsx(ClassifierSelector, __assign({}, props, field, { inputRef: ref })));
120
+ } }));
121
+ }
@@ -0,0 +1,25 @@
1
+ .container {
2
+ width: fit-content;
3
+ max-width: calc(100% - 20px);
4
+ display: flex;
5
+ padding: 10px;
6
+ padding-bottom: 0px;
7
+ padding-top: 5px;
8
+ margin-bottom: 0px;
9
+ }
10
+ .separator {
11
+ flex-basis: 100%;
12
+ height: 0;
13
+ }
14
+
15
+ .firstLvlContainer {
16
+ max-width: 100%;
17
+ display: flex;
18
+ flex-flow: row wrap;
19
+ }
20
+
21
+ .smallSeparator {
22
+ height: 0;
23
+ max-width: 100%;
24
+ flex-basis: 0;
25
+ }
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ import { Collapsible } from '../../../@Types/FormStep';
3
+ import { StepProps } from '../Step';
4
+ export interface CollapsibleStepProps extends StepProps {
5
+ /** The CollapsibleStep to display */
6
+ step: Collapsible;
7
+ }
8
+ declare function CollapsibleStep({ step, formStyle, ...others }: CollapsibleStepProps): JSX.Element;
9
+ export default CollapsibleStep;
@@ -0,0 +1,37 @@
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
+ };
23
+ import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
24
+ import { FormStyleTypes } from '../../../constants/FormStepTypes';
25
+ import MaterialCollapsibleStep from './MaterialTitleStep/MaterialCollapsibleStep';
26
+ function CollapsibleStep(_a) {
27
+ var step = _a.step, formStyle = _a.formStyle, others = __rest(_a, ["step", "formStyle"]);
28
+ if (step.steps.length === 0)
29
+ return _jsx(_Fragment, {});
30
+ switch (formStyle.type) {
31
+ case FormStyleTypes.MATERIAL:
32
+ default: {
33
+ return (_jsx(MaterialCollapsibleStep, __assign({ step: step, formStyle: formStyle }, others)));
34
+ }
35
+ }
36
+ }
37
+ export default CollapsibleStep;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { CollapsibleStepProps } from '../CollapsibleStep';
3
+ declare function CollapsibleStep(props: CollapsibleStepProps): JSX.Element;
4
+ export default CollapsibleStep;