@arquimedes.co/eureka-forms 1.9.75-test → 1.9.78-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/package.json +1 -1
  2. package/dist/@Types/@Types.d.ts +0 -2
  3. package/dist/@Types/@Types.js +0 -1
  4. package/dist/@Types/AYFFormStep.d.ts +0 -19
  5. package/dist/@Types/AYFFormStep.js +0 -1
  6. package/dist/@Types/CBRFormStep.d.ts +0 -74
  7. package/dist/@Types/CBRFormStep.js +0 -1
  8. package/dist/@Types/Form.d.ts +0 -65
  9. package/dist/@Types/Form.js +0 -1
  10. package/dist/@Types/FormStep.d.ts +0 -138
  11. package/dist/@Types/FormStep.js +0 -1
  12. package/dist/@Types/GenericFormSteps.d.ts +0 -60
  13. package/dist/@Types/GenericFormSteps.js +0 -1
  14. package/dist/@Types/Organization.d.ts +0 -17
  15. package/dist/@Types/Organization.js +0 -1
  16. package/dist/@Types/index.d.ts +0 -1
  17. package/dist/@Types/index.js +0 -1
  18. package/dist/App.d.ts +0 -58
  19. package/dist/App.js +0 -470
  20. package/dist/App.module.css +0 -34
  21. package/dist/AxiosAPI.d.ts +0 -2
  22. package/dist/AxiosAPI.js +0 -8
  23. package/dist/AxiosWidget.d.ts +0 -2
  24. package/dist/AxiosWidget.js +0 -8
  25. package/dist/FormComponents/Form/ColumnForm/ColumnForm.d.ts +0 -7
  26. package/dist/FormComponents/Form/ColumnForm/ColumnForm.js +0 -379
  27. package/dist/FormComponents/Form/ColumnForm/ColumnForm.module.css +0 -51
  28. package/dist/FormComponents/Form/ConfirmationDialog/ConfirmationDialog.d.ts +0 -12
  29. package/dist/FormComponents/Form/ConfirmationDialog/ConfirmationDialog.js +0 -31
  30. package/dist/FormComponents/Form/ConfirmationDialog/ConfirmationDialog.module.css +0 -64
  31. package/dist/FormComponents/Form/Form.d.ts +0 -41
  32. package/dist/FormComponents/Form/Form.js +0 -147
  33. package/dist/FormComponents/Form/Form.module.css +0 -39
  34. package/dist/FormComponents/Form/StepperForm/StepperForm.d.ts +0 -4
  35. package/dist/FormComponents/Form/StepperForm/StepperForm.js +0 -6
  36. package/dist/FormComponents/Form/StepperForm/StepperForm.module.css +0 -0
  37. package/dist/FormComponents/Section/MaterialSection/MaterialSection.d.ts +0 -4
  38. package/dist/FormComponents/Section/MaterialSection/MaterialSection.js +0 -42
  39. package/dist/FormComponents/Section/MaterialSection/MaterialSection.module.css +0 -8
  40. package/dist/FormComponents/Section/Section.d.ts +0 -38
  41. package/dist/FormComponents/Section/Section.js +0 -23
  42. package/dist/FormComponents/Step/@Construction/CBRElementStep/CBRElementStep.d.ts +0 -8
  43. package/dist/FormComponents/Step/@Construction/CBRElementStep/CBRElementStep.js +0 -139
  44. package/dist/FormComponents/Step/@Construction/CBRIncidentsStep/CBRIncidentsStep.d.ts +0 -9
  45. package/dist/FormComponents/Step/@Construction/CBRIncidentsStep/CBRIncidentsStep.js +0 -23
  46. package/dist/FormComponents/Step/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/Incident/Incident.d.ts +0 -8
  47. package/dist/FormComponents/Step/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/Incident/Incident.js +0 -49
  48. package/dist/FormComponents/Step/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/Incident/Incident.module.css +0 -60
  49. package/dist/FormComponents/Step/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/MaterialCBRIncidentsStep.d.ts +0 -11
  50. package/dist/FormComponents/Step/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/MaterialCBRIncidentsStep.js +0 -121
  51. package/dist/FormComponents/Step/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/MaterialCBRIncidentsStep.module.css +0 -34
  52. package/dist/FormComponents/Step/@Construction/CBRPropertyStep/CBRPropertyStep.d.ts +0 -8
  53. package/dist/FormComponents/Step/@Construction/CBRPropertyStep/CBRPropertyStep.js +0 -138
  54. package/dist/FormComponents/Step/@Construction/CBRPropertyStep/CBRPropertyStep.module.css +0 -54
  55. package/dist/FormComponents/Step/AYFStepMapper.d.ts +0 -12
  56. package/dist/FormComponents/Step/AYFStepMapper.js +0 -170
  57. package/dist/FormComponents/Step/CBRStepMapper.d.ts +0 -13
  58. package/dist/FormComponents/Step/CBRStepMapper.js +0 -202
  59. package/dist/FormComponents/Step/CheckBoxStep/CheckBoxStep.d.ts +0 -9
  60. package/dist/FormComponents/Step/CheckBoxStep/CheckBoxStep.js +0 -35
  61. package/dist/FormComponents/Step/CheckBoxStep/MaterialCheckBoxStep/MaterialCheckBoxStep.d.ts +0 -4
  62. package/dist/FormComponents/Step/CheckBoxStep/MaterialCheckBoxStep/MaterialCheckBoxStep.js +0 -65
  63. package/dist/FormComponents/Step/CheckBoxStep/MaterialCheckBoxStep/MaterialCheckBoxStep.module.css +0 -37
  64. package/dist/FormComponents/Step/ClassifierSelectorStep/ClassifierSelectorStep.d.ts +0 -9
  65. package/dist/FormComponents/Step/ClassifierSelectorStep/ClassifierSelectorStep.js +0 -35
  66. package/dist/FormComponents/Step/ClassifierSelectorStep/MaterialClassifierSelectorStep/MaterialClassifierSelectorStep.d.ts +0 -4
  67. package/dist/FormComponents/Step/ClassifierSelectorStep/MaterialClassifierSelectorStep/MaterialClassifierSelectorStep.js +0 -121
  68. package/dist/FormComponents/Step/ClassifierSelectorStep/MaterialClassifierSelectorStep/MaterialClassifierSelectorStep.module.css +0 -25
  69. package/dist/FormComponents/Step/CollapsibleStep/CollapsibleStep.d.ts +0 -9
  70. package/dist/FormComponents/Step/CollapsibleStep/CollapsibleStep.js +0 -37
  71. package/dist/FormComponents/Step/CollapsibleStep/MaterialTitleStep/MaterialCollapsibleStep.d.ts +0 -4
  72. package/dist/FormComponents/Step/CollapsibleStep/MaterialTitleStep/MaterialCollapsibleStep.js +0 -75
  73. package/dist/FormComponents/Step/CollapsibleStep/MaterialTitleStep/MaterialCollapsibleStep.module.css +0 -62
  74. package/dist/FormComponents/Step/DatePickerStep/DatePickerStep.d.ts +0 -11
  75. package/dist/FormComponents/Step/DatePickerStep/DatePickerStep.js +0 -23
  76. package/dist/FormComponents/Step/DatePickerStep/MaterialDatePickerStep/MaterialDatePickerStep.d.ts +0 -4
  77. package/dist/FormComponents/Step/DatePickerStep/MaterialDatePickerStep/MaterialDatePickerStep.js +0 -48
  78. package/dist/FormComponents/Step/DatePickerStep/MaterialDatePickerStep/MaterialDatePickerStep.module.css +0 -9
  79. package/dist/FormComponents/Step/EntityValueStep/EntityValuePickerStep.d.ts +0 -15
  80. package/dist/FormComponents/Step/EntityValueStep/EntityValuePickerStep.js +0 -35
  81. package/dist/FormComponents/Step/EntityValueStep/MaterialEntityValuePickerStep/MaterialEntityValuePickerStep.d.ts +0 -4
  82. package/dist/FormComponents/Step/EntityValueStep/MaterialEntityValuePickerStep/MaterialEntityValuePickerStep.js +0 -203
  83. package/dist/FormComponents/Step/EntityValueStep/MaterialEntityValuePickerStep/MaterialEntityValuePickerStep.module.css +0 -25
  84. package/dist/FormComponents/Step/FileUploadStep/FileUploadStep.d.ts +0 -9
  85. package/dist/FormComponents/Step/FileUploadStep/FileUploadStep.js +0 -23
  86. package/dist/FormComponents/Step/FileUploadStep/MaterialFileUploadStep/FileComponent/FileComponent.d.ts +0 -13
  87. package/dist/FormComponents/Step/FileUploadStep/MaterialFileUploadStep/FileComponent/FileComponent.js +0 -123
  88. package/dist/FormComponents/Step/FileUploadStep/MaterialFileUploadStep/FileComponent/FileComponent.module.css +0 -60
  89. package/dist/FormComponents/Step/FileUploadStep/MaterialFileUploadStep/MaterialFileUploadStep.d.ts +0 -16
  90. package/dist/FormComponents/Step/FileUploadStep/MaterialFileUploadStep/MaterialFileUploadStep.js +0 -272
  91. package/dist/FormComponents/Step/FileUploadStep/MaterialFileUploadStep/MaterialFileUploadStep.module.css +0 -59
  92. package/dist/FormComponents/Step/MapperStep/MapperStep.d.ts +0 -10
  93. package/dist/FormComponents/Step/MapperStep/MapperStep.js +0 -35
  94. package/dist/FormComponents/Step/MapperStep/MaterialMapperStep/Element/MapperElement.d.ts +0 -14
  95. package/dist/FormComponents/Step/MapperStep/MaterialMapperStep/Element/MapperElement.js +0 -27
  96. package/dist/FormComponents/Step/MapperStep/MaterialMapperStep/Element/MapperElement.module.css +0 -60
  97. package/dist/FormComponents/Step/MapperStep/MaterialMapperStep/Element/PillElementContainer/PillElementContainer.d.ts +0 -13
  98. package/dist/FormComponents/Step/MapperStep/MaterialMapperStep/Element/PillElementContainer/PillElementContainer.js +0 -33
  99. package/dist/FormComponents/Step/MapperStep/MaterialMapperStep/Element/PillElementContainer/PillElementContainer.module.css +0 -60
  100. package/dist/FormComponents/Step/MapperStep/MaterialMapperStep/MaterialMapperStep.d.ts +0 -15
  101. package/dist/FormComponents/Step/MapperStep/MaterialMapperStep/MaterialMapperStep.js +0 -275
  102. package/dist/FormComponents/Step/MapperStep/MaterialMapperStep/MaterialMapperStep.module.css +0 -42
  103. package/dist/FormComponents/Step/RatingStep/MaterialRatingStep/MaterialRatingStep.d.ts +0 -4
  104. package/dist/FormComponents/Step/RatingStep/MaterialRatingStep/MaterialRatingStep.js +0 -71
  105. package/dist/FormComponents/Step/RatingStep/MaterialRatingStep/MaterialRatingStep.module.css +0 -30
  106. package/dist/FormComponents/Step/RatingStep/RatingStep.d.ts +0 -9
  107. package/dist/FormComponents/Step/RatingStep/RatingStep.js +0 -23
  108. package/dist/FormComponents/Step/SelectorStep/MaterialSelectorStep/MaterialSelectorStep.d.ts +0 -4
  109. package/dist/FormComponents/Step/SelectorStep/MaterialSelectorStep/MaterialSelectorStep.js +0 -104
  110. package/dist/FormComponents/Step/SelectorStep/MaterialSelectorStep/MaterialSelectorStep.module.css +0 -25
  111. package/dist/FormComponents/Step/SelectorStep/SelectorStep.d.ts +0 -9
  112. package/dist/FormComponents/Step/SelectorStep/SelectorStep.js +0 -35
  113. package/dist/FormComponents/Step/SeparatorStep/MaterialSeparatorStep/MaterialSeparatorStep.d.ts +0 -4
  114. package/dist/FormComponents/Step/SeparatorStep/MaterialSeparatorStep/MaterialSeparatorStep.js +0 -11
  115. package/dist/FormComponents/Step/SeparatorStep/MaterialSeparatorStep/MaterialSeparatorStep.module.css +0 -7
  116. package/dist/FormComponents/Step/SeparatorStep/SeparatorStep.d.ts +0 -9
  117. package/dist/FormComponents/Step/SeparatorStep/SeparatorStep.js +0 -35
  118. package/dist/FormComponents/Step/SmartSelectStep/MaterialSmartSelectStep/MaterialSmartSelectStep.d.ts +0 -10
  119. package/dist/FormComponents/Step/SmartSelectStep/MaterialSmartSelectStep/MaterialSmartSelectStep.js +0 -241
  120. package/dist/FormComponents/Step/SmartSelectStep/MaterialSmartSelectStep/MaterialSmartSelectStep.module.css +0 -9
  121. package/dist/FormComponents/Step/SmartSelectStep/SmartSelectStep.d.ts +0 -33
  122. package/dist/FormComponents/Step/SmartSelectStep/SmartSelectStep.js +0 -23
  123. package/dist/FormComponents/Step/Step.d.ts +0 -11
  124. package/dist/FormComponents/Step/Step.js +0 -108
  125. package/dist/FormComponents/Step/StepFunctions.d.ts +0 -5
  126. package/dist/FormComponents/Step/StepFunctions.js +0 -65
  127. package/dist/FormComponents/Step/TextAreaStep/MaterialTextAreaStep/DraftEditor.css +0 -96
  128. package/dist/FormComponents/Step/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaStep.d.ts +0 -13
  129. package/dist/FormComponents/Step/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaStep.js +0 -213
  130. package/dist/FormComponents/Step/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaStep.module.css +0 -93
  131. package/dist/FormComponents/Step/TextAreaStep/TextAreaStep.d.ts +0 -10
  132. package/dist/FormComponents/Step/TextAreaStep/TextAreaStep.js +0 -23
  133. package/dist/FormComponents/Step/TextInputStep/MaterialTextInputStep/MaterialTextInputStep.d.ts +0 -4
  134. package/dist/FormComponents/Step/TextInputStep/MaterialTextInputStep/MaterialTextInputStep.js +0 -76
  135. package/dist/FormComponents/Step/TextInputStep/MaterialTextInputStep/MaterialTextInputStep.module.css +0 -9
  136. package/dist/FormComponents/Step/TextInputStep/TextInputStep.d.ts +0 -13
  137. package/dist/FormComponents/Step/TextInputStep/TextInputStep.js +0 -23
  138. package/dist/FormComponents/Step/TitleStep/MaterialTitleStep/MaterialTitleStep.d.ts +0 -4
  139. package/dist/FormComponents/Step/TitleStep/MaterialTitleStep/MaterialTitleStep.js +0 -20
  140. package/dist/FormComponents/Step/TitleStep/MaterialTitleStep/MaterialTitleStep.module.css +0 -19
  141. package/dist/FormComponents/Step/TitleStep/TitleStep.d.ts +0 -9
  142. package/dist/FormComponents/Step/TitleStep/TitleStep.js +0 -35
  143. package/dist/FormComponents/Term/MaterialTerm/MaterialTerm.d.ts +0 -4
  144. package/dist/FormComponents/Term/MaterialTerm/MaterialTerm.js +0 -88
  145. package/dist/FormComponents/Term/MaterialTerm/MaterialTerm.module.css +0 -83
  146. package/dist/FormComponents/Term/Term.d.ts +0 -15
  147. package/dist/FormComponents/Term/Term.js +0 -23
  148. package/dist/Icons/Construction/LeakIcon.d.ts +0 -3
  149. package/dist/Icons/Construction/LeakIcon.js +0 -16
  150. package/dist/Icons/Construction/ProjectIcon.d.ts +0 -3
  151. package/dist/Icons/Construction/ProjectIcon.js +0 -16
  152. package/dist/Icons/Construction/PropertyIcon.d.ts +0 -3
  153. package/dist/Icons/Construction/PropertyIcon.js +0 -16
  154. package/dist/Icons/Construction/SpaceIcon.d.ts +0 -3
  155. package/dist/Icons/Construction/SpaceIcon.js +0 -16
  156. package/dist/Icons/DocumentIcon.d.ts +0 -3
  157. package/dist/Icons/DocumentIcon.js +0 -16
  158. package/dist/Icons/Entities/GenericEntityIcon.d.ts +0 -2
  159. package/dist/Icons/Entities/GenericEntityIcon.js +0 -17
  160. package/dist/Icons/Entities/HandshakeIcon.d.ts +0 -2
  161. package/dist/Icons/Entities/HandshakeIcon.js +0 -17
  162. package/dist/Widget.d.ts +0 -1
  163. package/dist/Widget.js +0 -61
  164. package/dist/constants/AYFFormStepTypes.d.ts +0 -9
  165. package/dist/constants/AYFFormStepTypes.js +0 -10
  166. package/dist/constants/CBRFormStepTypes.d.ts +0 -21
  167. package/dist/constants/CBRFormStepTypes.js +0 -22
  168. package/dist/constants/Files/FileExtensions.d.ts +0 -3
  169. package/dist/constants/Files/FileExtensions.js +0 -68
  170. package/dist/constants/Files/FileMaxSize.d.ts +0 -2
  171. package/dist/constants/Files/FileMaxSize.js +0 -2
  172. package/dist/constants/FormStepTypes.d.ts +0 -46
  173. package/dist/constants/FormStepTypes.js +0 -54
  174. package/dist/constants/IconTypes.d.ts +0 -10
  175. package/dist/constants/IconTypes.js +0 -11
  176. package/dist/constants/InternalFormStyle.d.ts +0 -3
  177. package/dist/constants/InternalFormStyle.js +0 -16
  178. package/dist/constants/MaterialClassNameSeed.d.ts +0 -1
  179. package/dist/constants/MaterialClassNameSeed.js +0 -1
  180. package/dist/controllers/FileService.d.ts +0 -5
  181. package/dist/controllers/FileService.js +0 -92
  182. package/dist/index.d.ts +0 -1
  183. package/dist/index.js +0 -29
  184. package/dist/index.lib.d.ts +0 -7
  185. package/dist/index.lib.js +0 -5
  186. package/dist/index.module.css +0 -14
  187. package/dist/shared/InputIcon/InputIcon.d.ts +0 -7
  188. package/dist/shared/InputIcon/InputIcon.js +0 -81
  189. package/dist/shared/Loader/Loader.d.ts +0 -18
  190. package/dist/shared/Loader/Loader.js +0 -26
  191. package/dist/shared/Loader/Loader.module.css +0 -12
  192. package/dist/shared/Navbar/Navbar.d.ts +0 -9
  193. package/dist/shared/Navbar/Navbar.js +0 -18
  194. package/dist/shared/Navbar/Navbar.module.css +0 -18
  195. package/dist/shared/Rating/Rating.d.ts +0 -16
  196. package/dist/shared/Rating/Rating.js +0 -41
  197. package/dist/shared/Rating/Rating.module.css +0 -32
  198. package/dist/shared/Rating/Ratings/LikeRating.d.ts +0 -4
  199. package/dist/shared/Rating/Ratings/LikeRating.js +0 -43
  200. package/dist/shared/Rating/Ratings/SatisfactionRating.d.ts +0 -4
  201. package/dist/shared/Rating/Ratings/SatisfactionRating.js +0 -61
  202. package/dist/shared/Rating/Ratings/ScaleRating.d.ts +0 -4
  203. package/dist/shared/Rating/Ratings/ScaleRating.js +0 -63
  204. package/dist/shared/RoundedButton/RoundedButton.d.ts +0 -30
  205. package/dist/shared/RoundedButton/RoundedButton.js +0 -45
  206. package/dist/shared/RoundedCheckBox/RoundedCheckBox.d.ts +0 -24
  207. package/dist/shared/RoundedCheckBox/RoundedCheckBox.js +0 -101
  208. package/dist/shared/RoundedDatePicker/RoundedDatePicker.d.ts +0 -48
  209. package/dist/shared/RoundedDatePicker/RoundedDatePicker.js +0 -348
  210. package/dist/shared/RoundedSelect/RoundedSelect.d.ts +0 -68
  211. package/dist/shared/RoundedSelect/RoundedSelect.js +0 -214
  212. package/dist/shared/RoundedSmartSelect/RoundedSmartSelect.d.ts +0 -66
  213. package/dist/shared/RoundedSmartSelect/RoundedSmartSelect.js +0 -234
  214. package/dist/shared/RoundedTextField/RoundedTextField.d.ts +0 -45
  215. package/dist/shared/RoundedTextField/RoundedTextField.js +0 -175
  216. package/dist/utils/CbrFunctions.d.ts +0 -8
  217. package/dist/utils/CbrFunctions.js +0 -53
@@ -1,379 +0,0 @@
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
- var __rest = (this && this.__rest) || function (s, e) {
49
- var t = {};
50
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
51
- t[p] = s[p];
52
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
53
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
54
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
55
- t[p[i]] = s[p[i]];
56
- }
57
- return t;
58
- };
59
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
60
- import { cloneElement, useEffect, useRef, useState } from 'react';
61
- import ReCAPTCHA from 'react-google-recaptcha';
62
- import SectionComponent from '../../Section/Section';
63
- import { useForm } from 'react-hook-form';
64
- import styles from './ColumnForm.module.css';
65
- import Types from '../../../constants/FormStepTypes';
66
- import { convertToRaw } from 'draft-js';
67
- import TermComponent from '../../Term/Term';
68
- import ConfirmationDialog from '../ConfirmationDialog/ConfirmationDialog';
69
- import Loader from '../../../shared/Loader/Loader';
70
- import axiosInstance from '../../../AxiosAPI';
71
- import widgetInstance from '../../../AxiosWidget';
72
- import React from 'react';
73
- function ColumnForm(_a) {
74
- var _this = this;
75
- 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"]);
76
- var _b = useState(false), tempError = _b[0], setTempError = _b[1];
77
- var _c = useState(calcDependencies(form.steps, originalValues, customSteps)), dependencyStore = _c[0], setDependencyStore = _c[1];
78
- var _d = useForm({
79
- defaultValues: originalValues,
80
- mode: 'onTouched',
81
- shouldFocusError: true,
82
- }), getValues = _d.getValues, setValue = _d.setValue, clearErrors = _d.clearErrors, control = _d.control, errors = _d.formState.errors, trigger = _d.trigger, setFocus = _d.setFocus;
83
- var recaptchaRef = useRef();
84
- var _e = useState(undefined), sections = _e[0], setSections = _e[1];
85
- var _f = useState(false), loading = _f[0], setLoading = _f[1];
86
- var _g = useState(), showConfirmation = _g[0], setShowConfirmation = _g[1];
87
- useEffect(function () {
88
- var tempSections = [];
89
- calcNextSection(form, form.firstSection, tempSections);
90
- setSections(tempSections);
91
- handleLoaded();
92
- }, []);
93
- if (sections === undefined) {
94
- return _jsx("div", {});
95
- }
96
- var onSubmit = function (token) { return __awaiter(_this, void 0, void 0, function () {
97
- var valid, values, newValues, deleteIds, _i, _a, idStep, _b, deleteIds_1, id, customResp, payload, url, resp, _c, error_1;
98
- return __generator(this, function (_d) {
99
- switch (_d.label) {
100
- case 0:
101
- if (!(apiKey || internal || customSend)) return [3 /*break*/, 11];
102
- return [4 /*yield*/, trigger(undefined, { shouldFocus: true })];
103
- case 1:
104
- valid = _d.sent();
105
- values = getValues();
106
- if (!!valid) return [3 /*break*/, 2];
107
- console.error('ERRORS:', errors);
108
- setTempError(true);
109
- setTimeout(function () {
110
- setTempError(false);
111
- }, 500);
112
- return [3 /*break*/, 11];
113
- case 2:
114
- _d.trys.push([2, 10, , 11]);
115
- setLoading(true);
116
- newValues = {};
117
- deleteIds = [];
118
- for (_i = 0, _a = Object.keys(values); _i < _a.length; _i++) {
119
- idStep = _a[_i];
120
- newValues[idStep] = calcValue(idStep, form.steps, values, customSteps, deleteIds);
121
- }
122
- for (_b = 0, deleteIds_1 = deleteIds; _b < deleteIds_1.length; _b++) {
123
- id = deleteIds_1[_b];
124
- delete newValues[id];
125
- }
126
- if (!customSend) return [3 /*break*/, 4];
127
- return [4 /*yield*/, customSend(newValues, reload)];
128
- case 3:
129
- customResp = _d.sent();
130
- setLoading(false);
131
- return [2 /*return*/, customResp];
132
- case 4:
133
- payload = {
134
- formValues: { steps: newValues },
135
- };
136
- if (token) {
137
- payload.token = token;
138
- }
139
- url = "/ticket/".concat(internal ? form.apiKey : apiKey);
140
- if (!(domain || internal)) return [3 /*break*/, 6];
141
- return [4 /*yield*/, widgetInstance.post("".concat(url, "?idOrganization=").concat(domain), payload)];
142
- case 5:
143
- _c = _d.sent();
144
- return [3 /*break*/, 8];
145
- case 6: return [4 /*yield*/, axiosInstance.post(url, payload)];
146
- case 7:
147
- _c = _d.sent();
148
- _d.label = 8;
149
- case 8:
150
- resp = _c;
151
- setShowConfirmation(resp === null || resp === void 0 ? void 0 : resp.data);
152
- _d.label = 9;
153
- case 9:
154
- setLoading(false);
155
- return [3 /*break*/, 11];
156
- case 10:
157
- error_1 = _d.sent();
158
- console.error(error_1);
159
- setLoading(false);
160
- return [3 /*break*/, 11];
161
- case 11: return [2 /*return*/];
162
- }
163
- });
164
- }); };
165
- return (_jsxs("div", __assign({ className: styles.container, style: { color: formStyle.textColor } }, { children: [loading && _jsx("div", { className: styles.curtain }), showConfirmation !== undefined && (_jsx(ConfirmationDialog, { formStyle: formStyle, confirmation: showConfirmation, onClose: function () {
166
- reload();
167
- setShowConfirmation(undefined);
168
- } })), sections.map(function (idSection, index) { return (_jsx(SectionComponent, __assign({ form: form, sendLabel: sendLabel, domain: domain, postview: postview, clearErrors: clearErrors, widthStats: widthStats, control: control, getValues: getValues, originalValues: originalValues, errors: errors, index: index, setSections: setSections, section: form.sections[idSection], formStyle: formStyle, customSteps: customSteps, setDependencyStore: setDependencyStore, dependencyStore: dependencyStore, setFocus: setFocus }, others), idSection)); }), form.terms &&
169
- (!internal || (internal && postview)) &&
170
- (originalValues === null || originalValues === void 0 ? void 0 : originalValues['INTERNAL_CREATING_AGENT']) === undefined && (_jsx("div", __assign({ className: styles.termsContainer, style: {
171
- width: (form.size.blockSize + form.size.spacingSize) *
172
- form.size.blockNum,
173
- } }, { children: form.terms.map(function (term) { return (_jsx(TermComponent, { setValue: setValue, postview: postview, tempError: tempError, term: term, control: control, errors: errors, form: form, formStyle: formStyle }, term.id)); }) }))), !postview && others.editable && (_jsxs(React.Fragment, { children: [form.hasCaptcha && !internal && (_jsx(ReCAPTCHA, { ref: recaptchaRef, sitekey: "6LcL22kkAAAAAEotDeAFbRATob-u5vbibbCyWL2p", size: 'invisible', badge: 'bottomright' })), !customSubmit && (_jsx("div", __assign({ className: styles.submitBtnContainer }, { children: _jsxs("button", __assign({ "data-testid": "form__submit", className: styles.submitBtn, onClick: function () { return __awaiter(_this, void 0, void 0, function () {
174
- var valid, captcha;
175
- return __generator(this, function (_a) {
176
- switch (_a.label) {
177
- case 0:
178
- if (!(form.hasCaptcha && !internal)) return [3 /*break*/, 5];
179
- return [4 /*yield*/, trigger(undefined, {
180
- shouldFocus: true,
181
- })];
182
- case 1:
183
- valid = _a.sent();
184
- if (!valid) return [3 /*break*/, 4];
185
- captcha = recaptchaRef.current.getValue();
186
- if (!!captcha) return [3 /*break*/, 3];
187
- return [4 /*yield*/, (recaptchaRef === null || recaptchaRef === void 0 ? void 0 : recaptchaRef.current.executeAsync())];
188
- case 2:
189
- captcha =
190
- _a.sent();
191
- _a.label = 3;
192
- case 3:
193
- onSubmit(captcha);
194
- _a.label = 4;
195
- case 4: return [3 /*break*/, 6];
196
- case 5:
197
- onSubmit();
198
- _a.label = 6;
199
- case 6: return [2 /*return*/];
200
- }
201
- });
202
- }); }, style: {
203
- background: formStyle.primaryColor,
204
- color: formStyle.primaryContrastColor,
205
- }, disabled: loading }, { children: [_jsx("div", __assign({ style: {
206
- visibility: loading
207
- ? 'hidden'
208
- : 'visible',
209
- } }, { children: sendLabel !== null && sendLabel !== void 0 ? sendLabel : 'Enviar' })), loading && (_jsx("div", __assign({ className: styles.loaderContainer }, { children: _jsx(Loader, { color: formStyle.primaryContrastColor, position: "unset" }) })))] })) }))), customSubmit &&
210
- cloneElement(customSubmit, {
211
- onSubmit: onSubmit,
212
- loading: loading,
213
- })] }))] })));
214
- }
215
- export default ColumnForm;
216
- function calcNextSection(form, idSection, sections) {
217
- var _a;
218
- var section = form.sections[idSection];
219
- if (section) {
220
- sections.push(idSection);
221
- var nextSectionId = (_a = section.nextSection) !== null && _a !== void 0 ? _a : '';
222
- var nextSection = form.sections[nextSectionId];
223
- if (nextSection) {
224
- calcNextSection(form, nextSectionId, sections);
225
- }
226
- }
227
- }
228
- var calcValue = function (idStep, steps, values, customSteps, deleteIds, value) {
229
- var _a, _b;
230
- if (value === void 0) { value = values[idStep]; }
231
- var step = steps[idStep];
232
- if (!step)
233
- return value;
234
- var custom = customSteps[step === null || step === void 0 ? void 0 : step.type];
235
- if (custom !== undefined) {
236
- return (_b = (_a = custom.calcValue) === null || _a === void 0 ? void 0 : _a.call(custom, step, value)) !== null && _b !== void 0 ? _b : value;
237
- }
238
- else {
239
- switch (step === null || step === void 0 ? void 0 : step.type) {
240
- case Types.TEXTAREA: {
241
- if (step.hasTextEditor) {
242
- var currentContent = value.getCurrentContent();
243
- return {
244
- value: currentContent.getPlainText(),
245
- draft: convertToRaw(currentContent),
246
- };
247
- }
248
- else {
249
- return {
250
- value: value,
251
- draft: stringToDraft(value),
252
- };
253
- }
254
- }
255
- case Types.FILEUPLOAD: {
256
- return value.map(function (val) { return ({
257
- fileName: val.fileName,
258
- S3Key: val.S3Key,
259
- }); });
260
- }
261
- case Types.SELECTOR:
262
- case Types.CLASSIFIER_SELECTOR: {
263
- return value.value;
264
- }
265
- case Types.COLLAPSIBLE: {
266
- return !!value;
267
- }
268
- case Types.MAPPER: {
269
- var elements = value === null || value === void 0 ? void 0 : value.filter(function (element) { return element.deleted !== true; });
270
- var mappedValues = [];
271
- for (var _i = 0, elements_1 = elements; _i < elements_1.length; _i++) {
272
- var element = elements_1[_i];
273
- var newValue = {
274
- id: element.id,
275
- value: element.value,
276
- };
277
- for (var _c = 0, _d = Object.keys(step.steps); _c < _d.length; _c++) {
278
- var idStep_1 = _d[_c];
279
- var mappedId = element.ids[idStep_1];
280
- if (values[mappedId] !== undefined) {
281
- newValue[idStep_1] = calcValue(idStep_1, step.steps, values, customSteps, deleteIds, values[mappedId]);
282
- deleteIds.push(mappedId);
283
- }
284
- }
285
- mappedValues.push(newValue);
286
- }
287
- return mappedValues;
288
- }
289
- default:
290
- if ((step === null || step === void 0 ? void 0 : step.type) === 'CBR_INCIDENCIAS') {
291
- return value === null || value === void 0 ? void 0 : value.filter(function (incidencia) { return incidencia.deleted !== true; });
292
- }
293
- return value;
294
- }
295
- }
296
- };
297
- function stringToDraft(text) {
298
- var draftStructure = {
299
- blocks: [],
300
- entityMap: {},
301
- };
302
- text.split('\n').forEach(function (element, index) {
303
- draftStructure.blocks.push({
304
- key: String(index),
305
- text: element,
306
- type: 'unstyled',
307
- depth: 0,
308
- inlineStyleRanges: [],
309
- entityRanges: [],
310
- data: {},
311
- });
312
- });
313
- return draftStructure;
314
- }
315
- function calcDependencies(steps, originalValues, customSteps, allSteps, dependencies) {
316
- var _a, _b;
317
- if (customSteps === void 0) { customSteps = {}; }
318
- if (allSteps === void 0) { allSteps = steps; }
319
- if (dependencies === void 0) { dependencies = {}; }
320
- for (var _i = 0, _c = Object.values(steps); _i < _c.length; _i++) {
321
- var step = _c[_i];
322
- if (step.dependencies) {
323
- for (var _d = 0, _e = step.dependencies; _d < _e.length; _d++) {
324
- var idDep = _e[_d];
325
- var depStep = allSteps[idDep];
326
- if (depStep && dependencies[idDep] === undefined) {
327
- dependencies[idDep] = calcStepDependencyValue(depStep, customSteps, originalValues);
328
- }
329
- else if (dependencies[idDep] === undefined) {
330
- dependencies[idDep] = originalValues[idDep];
331
- }
332
- }
333
- }
334
- if (step.type === Types.MAPPER) {
335
- var newSteps = {};
336
- var elements = (_a = originalValues[step.id]) !== null && _a !== void 0 ? _a : [];
337
- var _loop_1 = function (element) {
338
- for (var _g = 0, _h = Object.keys(step.steps); _g < _h.length; _g++) {
339
- var idSubStep = _h[_g];
340
- var subStep = step.steps[idSubStep];
341
- var mappedId = element.ids[idSubStep];
342
- newSteps[mappedId] = __assign(__assign({}, subStep), { id: mappedId, dependencies: (_b = subStep.dependencies) === null || _b === void 0 ? void 0 : _b.map(function (dep) { var _a; return (_a = element.ids[dep]) !== null && _a !== void 0 ? _a : dep; }) });
343
- }
344
- };
345
- for (var _f = 0, elements_2 = elements; _f < elements_2.length; _f++) {
346
- var element = elements_2[_f];
347
- _loop_1(element);
348
- }
349
- if (elements.length === 0) {
350
- newSteps = step.steps;
351
- }
352
- calcDependencies(newSteps, originalValues, customSteps, __assign(__assign({}, allSteps), newSteps), dependencies);
353
- }
354
- }
355
- return dependencies;
356
- }
357
- export function calcStepDependencyValue(depStep, originalValues, customSteps) {
358
- var _a, _b, _c, _d;
359
- if (customSteps === void 0) { customSteps = {}; }
360
- var custom = customSteps[depStep === null || depStep === void 0 ? void 0 : depStep.type];
361
- if (custom.calcDependencyValue) {
362
- return custom.calcDependencyValue(depStep, originalValues[depStep.id]);
363
- }
364
- switch (depStep.type) {
365
- case Types.TEXTAREA: {
366
- if (depStep.hasTextEditor) {
367
- return null;
368
- }
369
- else {
370
- return (_a = originalValues[depStep.id]) === null || _a === void 0 ? void 0 : _a.value;
371
- }
372
- }
373
- case Types.MAPPER: {
374
- return ((_c = (_b = originalValues[depStep.id]) === null || _b === void 0 ? void 0 : _b.map(function (mapperValue) { var _a; return (_a = mapperValue.value) !== null && _a !== void 0 ? _a : mapperValue; })) !== null && _c !== void 0 ? _c : null);
375
- }
376
- default:
377
- return (_d = originalValues[depStep.id]) !== null && _d !== void 0 ? _d : null;
378
- }
379
- }
@@ -1,51 +0,0 @@
1
- .container {
2
- width: fit-content;
3
- display: flex;
4
- flex-direction: column;
5
- align-items: center;
6
- max-width: 100%;
7
- position: relative;
8
- }
9
- .curtain {
10
- position: absolute;
11
- width: 100%;
12
- height: 100%;
13
- z-index: 2;
14
- }
15
- .submitBtnContainer {
16
- margin-top: 10px;
17
- width: 200px;
18
- max-width: calc(100% - 40px);
19
- }
20
-
21
- .submitBtn {
22
- border-radius: 20px;
23
- padding: 15px 10px;
24
- width: calc(100% - 30px);
25
- margin: 0 auto 0 auto;
26
- font-size: 1.4rem;
27
- cursor: pointer;
28
- -moz-user-select: none;
29
- -khtml-user-select: none;
30
- -webkit-user-select: none;
31
- -ms-user-select: none;
32
- user-select: none;
33
- border: none;
34
- position: relative;
35
- }
36
- .submitBtn[disabled] {
37
- pointer-events: none;
38
- opacity: 0.5;
39
- }
40
-
41
- .loaderContainer {
42
- top: 0px;
43
- bottom: 0px;
44
- right: 0px;
45
- left: 0px;
46
- position: absolute;
47
- }
48
-
49
- .termsContainer {
50
- max-width: 100%;
51
- }
@@ -1,12 +0,0 @@
1
- /// <reference types="react" />
2
- import { FormStyle } from '../../../@Types/Form';
3
- interface ConfirmationDialogProps {
4
- confirmation: {
5
- case: string;
6
- url: string;
7
- };
8
- onClose: Function;
9
- formStyle: FormStyle;
10
- }
11
- declare function ConfirmationDialog({ confirmation, formStyle, onClose, }: ConfirmationDialogProps): JSX.Element;
12
- export default ConfirmationDialog;
@@ -1,31 +0,0 @@
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
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
- import CheckCircleOutlineRoundedIcon from '@material-ui/icons/CheckCircleOutlineRounded';
14
- import styles from './ConfirmationDialog.module.css';
15
- import Dialog from '@material-ui/core/Dialog';
16
- import CloseRoundedIcon from '@material-ui/icons/CloseRounded';
17
- function ConfirmationDialog(_a) {
18
- var confirmation = _a.confirmation, formStyle = _a.formStyle, onClose = _a.onClose;
19
- return (_jsx(Dialog, __assign({ PaperProps: {
20
- style: {
21
- borderRadius: '20px',
22
- maxWidth: '100vw',
23
- boxSizing: 'content-box',
24
- },
25
- }, open: true }, { children: _jsxs("div", __assign({ className: styles.confirmationContainer, style: { color: '#293241' } }, { children: [_jsx("div", __assign({ className: styles.closeIcon, onClick: function () {
26
- onClose();
27
- } }, { children: _jsx(CloseRoundedIcon, { fontSize: "inherit" }) })), _jsxs("div", __assign({ className: styles.container }, { children: [_jsx("div", __assign({ className: styles.checkContainer, style: { color: formStyle.primaryColor } }, { children: _jsx(CheckCircleOutlineRoundedIcon, { fontSize: "inherit", style: { fontSize: '160px' } }) })), _jsxs("div", __assign({ className: styles.messageContainer }, { children: ["Tu caso n\u00FAmero", ' ', _jsx("span", __assign({ style: { fontWeight: 'bold' } }, { children: confirmation.case })), ' ', "ha sido registrado!"] })), _jsx("div", __assign({ className: styles.messageContainer }, { children: "Pronto te estaremos dando respuesta." })), _jsxs("div", __assign({ className: styles.linkContainer }, { children: ["Puedes consultar el estado aqui:", ' '] })), _jsx("a", __assign({ className: styles.url, "data-testid": "ResUrl", target: "_blank", href: confirmation.url, style: {
28
- color: '#293241',
29
- } }, { children: confirmation.url }))] }))] })) })));
30
- }
31
- export default ConfirmationDialog;
@@ -1,64 +0,0 @@
1
- .confirmationContainer {
2
- display: flex;
3
- flex-direction: column;
4
- width: fit-content;
5
- max-height: 80vh;
6
- max-width: 80vw;
7
- position: relative;
8
- }
9
-
10
- .container {
11
- max-height: 100%;
12
- display: flex;
13
- flex-direction: column;
14
- overflow: hidden;
15
- overflow-y: auto;
16
- }
17
- .confirmationContainer,
18
- .confirmationContainer *,
19
- .confirmationContainer *::after,
20
- .confirmationContainer *::before {
21
- -webkit-box-sizing: content-box;
22
- -moz-box-sizing: content-box;
23
- box-sizing: content-box;
24
- }
25
-
26
- .checkContainer {
27
- margin-left: auto;
28
- margin-right: auto;
29
- padding-top: 30px;
30
- height: fit-content;
31
- margin-bottom: 15px;
32
- }
33
-
34
- .messageContainer {
35
- margin-top: 5px;
36
- margin-left: 20px;
37
- margin-right: 20px;
38
- font-size: 1.2rem;
39
- text-align: center;
40
- }
41
-
42
- .linkContainer {
43
- margin-top: 20px;
44
- font-size: 1.2rem;
45
- margin-left: 20px;
46
- }
47
- .url {
48
- font-weight: bolder;
49
- margin-left: 40px;
50
- margin-right: 40px;
51
- margin-top: 10px;
52
- margin-bottom: 40px;
53
- cursor: pointer;
54
- font-size: 1rem;
55
- max-width: calc(100% - 100px);
56
- word-break: break-all;
57
- }
58
- .closeIcon {
59
- right: 15px;
60
- top: 10px;
61
- font-size: 26px;
62
- position: absolute;
63
- cursor: pointer;
64
- }
@@ -1,41 +0,0 @@
1
- /// <reference types="react" />
2
- import { Organization } from '../../@Types/@Types';
3
- import { Form, FormStyle } from '../../@Types/Form';
4
- import { CustomStep } from '../../App';
5
- export declare const getLocale: () => any;
6
- export interface WidthStats {
7
- currentBreakPoint: number;
8
- isResponsive: boolean;
9
- isMobile: boolean;
10
- }
11
- export interface FormComponentProps {
12
- form: Form;
13
- organization: Organization;
14
- originalValues: Record<string, unknown>;
15
- customSteps: Record<string, CustomStep>;
16
- customSend?: (values: any, reload: Function) => Promise<any>;
17
- customSubmit?: JSX.Element;
18
- widthStats: WidthStats;
19
- internal: boolean;
20
- reload: Function;
21
- partial: boolean;
22
- postview: boolean;
23
- preview: boolean;
24
- formStyle: FormStyle;
25
- domain?: string;
26
- apiKey: string | undefined;
27
- /** Function to call on postview to fetch the download url of a file */
28
- fetchDownloadUrl?: (S3Key: string, fileName: string) => Promise<string>;
29
- /** Function to call when the form has loaded */
30
- handleLoaded: () => void;
31
- /** If the form can be edited (For entities) */
32
- editable: boolean;
33
- /** The custom send label to display */
34
- sendLabel?: string;
35
- }
36
- declare function FormComponent({ form, isWidget, internal, postview, organization, containerRef, ...others }: Omit<FormComponentProps, 'widthStats' | 'formStyle' | 'handleLoaded'> & {
37
- containerRef: any;
38
- organization: Organization | null;
39
- isWidget: boolean;
40
- }): JSX.Element;
41
- export default FormComponent;