@arquimedes.co/eureka-forms 1.9.83-test → 1.9.85-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.
- package/dist/@Types/@Types.d.ts +2 -0
- package/dist/@Types/@Types.js +1 -0
- package/dist/@Types/AYFFormStep.d.ts +19 -0
- package/dist/@Types/AYFFormStep.js +1 -0
- package/dist/@Types/CBRFormStep.d.ts +74 -0
- package/dist/@Types/CBRFormStep.js +1 -0
- package/dist/@Types/Form.d.ts +65 -0
- package/dist/@Types/Form.js +1 -0
- package/dist/@Types/FormStep.d.ts +138 -0
- package/dist/@Types/FormStep.js +1 -0
- package/dist/@Types/GenericFormSteps.d.ts +60 -0
- package/dist/@Types/GenericFormSteps.js +1 -0
- package/dist/@Types/Organization.d.ts +17 -0
- package/dist/@Types/Organization.js +1 -0
- package/dist/@Types/index.d.ts +1 -0
- package/dist/@Types/index.js +1 -0
- package/dist/App.d.ts +62 -0
- package/dist/App.js +470 -0
- package/dist/App.module.css +34 -0
- package/dist/AxiosAPI.d.ts +2 -0
- package/dist/AxiosAPI.js +8 -0
- package/dist/AxiosWidget.d.ts +2 -0
- package/dist/AxiosWidget.js +8 -0
- package/dist/FormComponents/Form/ColumnForm/ColumnForm.d.ts +8 -0
- package/dist/FormComponents/Form/ColumnForm/ColumnForm.js +379 -0
- package/dist/FormComponents/Form/ColumnForm/ColumnForm.module.css +51 -0
- package/dist/FormComponents/Form/ConfirmationDialog/ConfirmationDialog.d.ts +12 -0
- package/dist/FormComponents/Form/ConfirmationDialog/ConfirmationDialog.js +31 -0
- package/dist/FormComponents/Form/ConfirmationDialog/ConfirmationDialog.module.css +64 -0
- package/dist/FormComponents/Form/Form.d.ts +42 -0
- package/dist/FormComponents/Form/Form.js +147 -0
- package/dist/FormComponents/Form/Form.module.css +39 -0
- package/dist/FormComponents/Form/StepperForm/StepperForm.d.ts +4 -0
- package/dist/FormComponents/Form/StepperForm/StepperForm.js +6 -0
- package/dist/FormComponents/Form/StepperForm/StepperForm.module.css +0 -0
- package/dist/FormComponents/Section/MaterialSection/MaterialSection.d.ts +4 -0
- package/dist/FormComponents/Section/MaterialSection/MaterialSection.js +42 -0
- package/dist/FormComponents/Section/MaterialSection/MaterialSection.module.css +8 -0
- package/dist/FormComponents/Section/Section.d.ts +39 -0
- package/dist/FormComponents/Section/Section.js +23 -0
- package/dist/FormComponents/Step/@Construction/CBRElementStep/CBRElementStep.d.ts +8 -0
- package/dist/FormComponents/Step/@Construction/CBRElementStep/CBRElementStep.js +139 -0
- package/dist/FormComponents/Step/@Construction/CBRIncidentsStep/CBRIncidentsStep.d.ts +9 -0
- package/dist/FormComponents/Step/@Construction/CBRIncidentsStep/CBRIncidentsStep.js +23 -0
- package/dist/FormComponents/Step/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/Incident/Incident.d.ts +8 -0
- package/dist/FormComponents/Step/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/Incident/Incident.js +49 -0
- package/dist/FormComponents/Step/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/Incident/Incident.module.css +60 -0
- package/dist/FormComponents/Step/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/MaterialCBRIncidentsStep.d.ts +11 -0
- package/dist/FormComponents/Step/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/MaterialCBRIncidentsStep.js +121 -0
- package/dist/FormComponents/Step/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/MaterialCBRIncidentsStep.module.css +34 -0
- package/dist/FormComponents/Step/@Construction/CBRPropertyStep/CBRPropertyStep.d.ts +8 -0
- package/dist/FormComponents/Step/@Construction/CBRPropertyStep/CBRPropertyStep.js +138 -0
- package/dist/FormComponents/Step/@Construction/CBRPropertyStep/CBRPropertyStep.module.css +54 -0
- package/dist/FormComponents/Step/AYFStepMapper.d.ts +12 -0
- package/dist/FormComponents/Step/AYFStepMapper.js +170 -0
- package/dist/FormComponents/Step/CBRStepMapper.d.ts +13 -0
- package/dist/FormComponents/Step/CBRStepMapper.js +202 -0
- package/dist/FormComponents/Step/CheckBoxStep/CheckBoxStep.d.ts +9 -0
- package/dist/FormComponents/Step/CheckBoxStep/CheckBoxStep.js +35 -0
- package/dist/FormComponents/Step/CheckBoxStep/MaterialCheckBoxStep/MaterialCheckBoxStep.d.ts +4 -0
- package/dist/FormComponents/Step/CheckBoxStep/MaterialCheckBoxStep/MaterialCheckBoxStep.js +65 -0
- package/dist/FormComponents/Step/CheckBoxStep/MaterialCheckBoxStep/MaterialCheckBoxStep.module.css +37 -0
- package/dist/FormComponents/Step/ClassifierSelectorStep/ClassifierSelectorStep.d.ts +9 -0
- package/dist/FormComponents/Step/ClassifierSelectorStep/ClassifierSelectorStep.js +35 -0
- package/dist/FormComponents/Step/ClassifierSelectorStep/MaterialClassifierSelectorStep/MaterialClassifierSelectorStep.d.ts +4 -0
- package/dist/FormComponents/Step/ClassifierSelectorStep/MaterialClassifierSelectorStep/MaterialClassifierSelectorStep.js +121 -0
- package/dist/FormComponents/Step/ClassifierSelectorStep/MaterialClassifierSelectorStep/MaterialClassifierSelectorStep.module.css +25 -0
- package/dist/FormComponents/Step/CollapsibleStep/CollapsibleStep.d.ts +9 -0
- package/dist/FormComponents/Step/CollapsibleStep/CollapsibleStep.js +37 -0
- package/dist/FormComponents/Step/CollapsibleStep/MaterialTitleStep/MaterialCollapsibleStep.d.ts +4 -0
- package/dist/FormComponents/Step/CollapsibleStep/MaterialTitleStep/MaterialCollapsibleStep.js +75 -0
- package/dist/FormComponents/Step/CollapsibleStep/MaterialTitleStep/MaterialCollapsibleStep.module.css +62 -0
- package/dist/FormComponents/Step/DatePickerStep/DatePickerStep.d.ts +11 -0
- package/dist/FormComponents/Step/DatePickerStep/DatePickerStep.js +23 -0
- package/dist/FormComponents/Step/DatePickerStep/MaterialDatePickerStep/MaterialDatePickerStep.d.ts +4 -0
- package/dist/FormComponents/Step/DatePickerStep/MaterialDatePickerStep/MaterialDatePickerStep.js +48 -0
- package/dist/FormComponents/Step/DatePickerStep/MaterialDatePickerStep/MaterialDatePickerStep.module.css +9 -0
- package/dist/FormComponents/Step/EntityValueStep/EntityValuePickerStep.d.ts +15 -0
- package/dist/FormComponents/Step/EntityValueStep/EntityValuePickerStep.js +35 -0
- package/dist/FormComponents/Step/EntityValueStep/MaterialEntityValuePickerStep/MaterialEntityValuePickerStep.d.ts +4 -0
- package/dist/FormComponents/Step/EntityValueStep/MaterialEntityValuePickerStep/MaterialEntityValuePickerStep.js +203 -0
- package/dist/FormComponents/Step/EntityValueStep/MaterialEntityValuePickerStep/MaterialEntityValuePickerStep.module.css +25 -0
- package/dist/FormComponents/Step/FileUploadStep/FileUploadStep.d.ts +9 -0
- package/dist/FormComponents/Step/FileUploadStep/FileUploadStep.js +23 -0
- package/dist/FormComponents/Step/FileUploadStep/MaterialFileUploadStep/FileComponent/FileComponent.d.ts +13 -0
- package/dist/FormComponents/Step/FileUploadStep/MaterialFileUploadStep/FileComponent/FileComponent.js +123 -0
- package/dist/FormComponents/Step/FileUploadStep/MaterialFileUploadStep/FileComponent/FileComponent.module.css +60 -0
- package/dist/FormComponents/Step/FileUploadStep/MaterialFileUploadStep/MaterialFileUploadStep.d.ts +16 -0
- package/dist/FormComponents/Step/FileUploadStep/MaterialFileUploadStep/MaterialFileUploadStep.js +272 -0
- package/dist/FormComponents/Step/FileUploadStep/MaterialFileUploadStep/MaterialFileUploadStep.module.css +59 -0
- package/dist/FormComponents/Step/MapperStep/MapperStep.d.ts +16 -0
- package/dist/FormComponents/Step/MapperStep/MapperStep.js +35 -0
- package/dist/FormComponents/Step/MapperStep/MaterialMapperStep/Element/MapperElement.d.ts +10 -0
- package/dist/FormComponents/Step/MapperStep/MaterialMapperStep/Element/MapperElement.js +29 -0
- package/dist/FormComponents/Step/MapperStep/MaterialMapperStep/Element/MapperElement.module.css +60 -0
- package/dist/FormComponents/Step/MapperStep/MaterialMapperStep/Element/PillElementContainer/PillElementContainer.d.ts +13 -0
- package/dist/FormComponents/Step/MapperStep/MaterialMapperStep/Element/PillElementContainer/PillElementContainer.js +33 -0
- package/dist/FormComponents/Step/MapperStep/MaterialMapperStep/Element/PillElementContainer/PillElementContainer.module.css +60 -0
- package/dist/FormComponents/Step/MapperStep/MaterialMapperStep/MaterialMapperStep.d.ts +15 -0
- package/dist/FormComponents/Step/MapperStep/MaterialMapperStep/MaterialMapperStep.js +275 -0
- package/dist/FormComponents/Step/MapperStep/MaterialMapperStep/MaterialMapperStep.module.css +42 -0
- package/dist/FormComponents/Step/RatingStep/MaterialRatingStep/MaterialRatingStep.d.ts +4 -0
- package/dist/FormComponents/Step/RatingStep/MaterialRatingStep/MaterialRatingStep.js +71 -0
- package/dist/FormComponents/Step/RatingStep/MaterialRatingStep/MaterialRatingStep.module.css +30 -0
- package/dist/FormComponents/Step/RatingStep/RatingStep.d.ts +9 -0
- package/dist/FormComponents/Step/RatingStep/RatingStep.js +23 -0
- package/dist/FormComponents/Step/SelectorStep/MaterialSelectorStep/MaterialSelectorStep.d.ts +4 -0
- package/dist/FormComponents/Step/SelectorStep/MaterialSelectorStep/MaterialSelectorStep.js +104 -0
- package/dist/FormComponents/Step/SelectorStep/MaterialSelectorStep/MaterialSelectorStep.module.css +25 -0
- package/dist/FormComponents/Step/SelectorStep/SelectorStep.d.ts +9 -0
- package/dist/FormComponents/Step/SelectorStep/SelectorStep.js +35 -0
- package/dist/FormComponents/Step/SeparatorStep/MaterialSeparatorStep/MaterialSeparatorStep.d.ts +4 -0
- package/dist/FormComponents/Step/SeparatorStep/MaterialSeparatorStep/MaterialSeparatorStep.js +11 -0
- package/dist/FormComponents/Step/SeparatorStep/MaterialSeparatorStep/MaterialSeparatorStep.module.css +7 -0
- package/dist/FormComponents/Step/SeparatorStep/SeparatorStep.d.ts +9 -0
- package/dist/FormComponents/Step/SeparatorStep/SeparatorStep.js +35 -0
- package/dist/FormComponents/Step/SmartSelectStep/MaterialSmartSelectStep/MaterialSmartSelectStep.d.ts +10 -0
- package/dist/FormComponents/Step/SmartSelectStep/MaterialSmartSelectStep/MaterialSmartSelectStep.js +241 -0
- package/dist/FormComponents/Step/SmartSelectStep/MaterialSmartSelectStep/MaterialSmartSelectStep.module.css +9 -0
- package/dist/FormComponents/Step/SmartSelectStep/SmartSelectStep.d.ts +33 -0
- package/dist/FormComponents/Step/SmartSelectStep/SmartSelectStep.js +23 -0
- package/dist/FormComponents/Step/Step.d.ts +11 -0
- package/dist/FormComponents/Step/Step.js +108 -0
- package/dist/FormComponents/Step/StepFunctions.d.ts +5 -0
- package/dist/FormComponents/Step/StepFunctions.js +65 -0
- package/dist/FormComponents/Step/TextAreaStep/MaterialTextAreaStep/DraftEditor.css +96 -0
- package/dist/FormComponents/Step/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaStep.d.ts +13 -0
- package/dist/FormComponents/Step/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaStep.js +213 -0
- package/dist/FormComponents/Step/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaStep.module.css +93 -0
- package/dist/FormComponents/Step/TextAreaStep/TextAreaStep.d.ts +10 -0
- package/dist/FormComponents/Step/TextAreaStep/TextAreaStep.js +23 -0
- package/dist/FormComponents/Step/TextInputStep/MaterialTextInputStep/MaterialTextInputStep.d.ts +4 -0
- package/dist/FormComponents/Step/TextInputStep/MaterialTextInputStep/MaterialTextInputStep.js +76 -0
- package/dist/FormComponents/Step/TextInputStep/MaterialTextInputStep/MaterialTextInputStep.module.css +9 -0
- package/dist/FormComponents/Step/TextInputStep/TextInputStep.d.ts +13 -0
- package/dist/FormComponents/Step/TextInputStep/TextInputStep.js +23 -0
- package/dist/FormComponents/Step/TitleStep/MaterialTitleStep/MaterialTitleStep.d.ts +4 -0
- package/dist/FormComponents/Step/TitleStep/MaterialTitleStep/MaterialTitleStep.js +20 -0
- package/dist/FormComponents/Step/TitleStep/MaterialTitleStep/MaterialTitleStep.module.css +19 -0
- package/dist/FormComponents/Step/TitleStep/TitleStep.d.ts +9 -0
- package/dist/FormComponents/Step/TitleStep/TitleStep.js +35 -0
- package/dist/FormComponents/Term/MaterialTerm/MaterialTerm.d.ts +4 -0
- package/dist/FormComponents/Term/MaterialTerm/MaterialTerm.js +88 -0
- package/dist/FormComponents/Term/MaterialTerm/MaterialTerm.module.css +83 -0
- package/dist/FormComponents/Term/Term.d.ts +15 -0
- package/dist/FormComponents/Term/Term.js +23 -0
- package/dist/Icons/Construction/LeakIcon.d.ts +3 -0
- package/dist/Icons/Construction/LeakIcon.js +16 -0
- package/dist/Icons/Construction/ProjectIcon.d.ts +3 -0
- package/dist/Icons/Construction/ProjectIcon.js +16 -0
- package/dist/Icons/Construction/PropertyIcon.d.ts +3 -0
- package/dist/Icons/Construction/PropertyIcon.js +16 -0
- package/dist/Icons/Construction/SpaceIcon.d.ts +3 -0
- package/dist/Icons/Construction/SpaceIcon.js +16 -0
- package/dist/Icons/DocumentIcon.d.ts +3 -0
- package/dist/Icons/DocumentIcon.js +16 -0
- package/dist/Icons/Entities/GenericEntityIcon.d.ts +2 -0
- package/dist/Icons/Entities/GenericEntityIcon.js +17 -0
- package/dist/Icons/Entities/HandshakeIcon.d.ts +2 -0
- package/dist/Icons/Entities/HandshakeIcon.js +17 -0
- package/dist/Widget.d.ts +1 -0
- package/dist/Widget.js +61 -0
- package/dist/constants/AYFFormStepTypes.d.ts +9 -0
- package/dist/constants/AYFFormStepTypes.js +10 -0
- package/dist/constants/CBRFormStepTypes.d.ts +21 -0
- package/dist/constants/CBRFormStepTypes.js +22 -0
- package/dist/constants/Files/FileExtensions.d.ts +3 -0
- package/dist/constants/Files/FileExtensions.js +68 -0
- package/dist/constants/Files/FileMaxSize.d.ts +2 -0
- package/dist/constants/Files/FileMaxSize.js +2 -0
- package/dist/constants/FormStepTypes.d.ts +46 -0
- package/dist/constants/FormStepTypes.js +54 -0
- package/dist/constants/IconTypes.d.ts +10 -0
- package/dist/constants/IconTypes.js +11 -0
- package/dist/constants/InternalFormStyle.d.ts +3 -0
- package/dist/constants/InternalFormStyle.js +16 -0
- package/dist/constants/MaterialClassNameSeed.d.ts +1 -0
- package/dist/constants/MaterialClassNameSeed.js +1 -0
- package/dist/controllers/FileService.d.ts +5 -0
- package/dist/controllers/FileService.js +92 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +29 -0
- package/dist/index.lib.d.ts +7 -0
- package/dist/index.lib.js +5 -0
- package/dist/index.module.css +14 -0
- package/dist/shared/InputIcon/InputIcon.d.ts +7 -0
- package/dist/shared/InputIcon/InputIcon.js +81 -0
- package/dist/shared/Loader/Loader.d.ts +18 -0
- package/dist/shared/Loader/Loader.js +26 -0
- package/dist/shared/Loader/Loader.module.css +12 -0
- package/dist/shared/Navbar/Navbar.d.ts +9 -0
- package/dist/shared/Navbar/Navbar.js +18 -0
- package/dist/shared/Navbar/Navbar.module.css +18 -0
- package/dist/shared/Rating/Rating.d.ts +16 -0
- package/dist/shared/Rating/Rating.js +41 -0
- package/dist/shared/Rating/Rating.module.css +32 -0
- package/dist/shared/Rating/Ratings/LikeRating.d.ts +4 -0
- package/dist/shared/Rating/Ratings/LikeRating.js +43 -0
- package/dist/shared/Rating/Ratings/SatisfactionRating.d.ts +4 -0
- package/dist/shared/Rating/Ratings/SatisfactionRating.js +61 -0
- package/dist/shared/Rating/Ratings/ScaleRating.d.ts +4 -0
- package/dist/shared/Rating/Ratings/ScaleRating.js +63 -0
- package/dist/shared/RoundedButton/RoundedButton.d.ts +30 -0
- package/dist/shared/RoundedButton/RoundedButton.js +45 -0
- package/dist/shared/RoundedCheckBox/RoundedCheckBox.d.ts +24 -0
- package/dist/shared/RoundedCheckBox/RoundedCheckBox.js +101 -0
- package/dist/shared/RoundedDatePicker/RoundedDatePicker.d.ts +48 -0
- package/dist/shared/RoundedDatePicker/RoundedDatePicker.js +348 -0
- package/dist/shared/RoundedSelect/RoundedSelect.d.ts +68 -0
- package/dist/shared/RoundedSelect/RoundedSelect.js +214 -0
- package/dist/shared/RoundedSmartSelect/RoundedSmartSelect.d.ts +66 -0
- package/dist/shared/RoundedSmartSelect/RoundedSmartSelect.js +234 -0
- package/dist/shared/RoundedTextField/RoundedTextField.d.ts +45 -0
- package/dist/shared/RoundedTextField/RoundedTextField.js +175 -0
- package/dist/utils/CbrFunctions.d.ts +8 -0
- package/dist/utils/CbrFunctions.js +53 -0
- package/package.json +1 -1
package/dist/App.js
ADDED
|
@@ -0,0 +1,470 @@
|
|
|
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
|
+
var _a;
|
|
60
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
61
|
+
import { useEffect, useRef, useState } from 'react';
|
|
62
|
+
import Loader from './shared/Loader/Loader';
|
|
63
|
+
import styles from './App.module.css';
|
|
64
|
+
import FormComponent from './FormComponents/Form/Form';
|
|
65
|
+
import StepTypes from './constants/FormStepTypes';
|
|
66
|
+
import axiosInstance from './AxiosAPI';
|
|
67
|
+
import widgetInstance from './AxiosWidget';
|
|
68
|
+
import InternalFormStyle from './constants/InternalFormStyle';
|
|
69
|
+
import { calcCbrForm } from './utils/CbrFunctions';
|
|
70
|
+
import CBRStepTypes from './constants/CBRFormStepTypes';
|
|
71
|
+
import { nanoid } from 'nanoid';
|
|
72
|
+
import { EditorState, convertFromRaw } from 'draft-js';
|
|
73
|
+
import { stringToDraft, getRawText, } from './FormComponents/Step/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaStep';
|
|
74
|
+
function App(_a) {
|
|
75
|
+
var _this = this;
|
|
76
|
+
var _b, _c, _d, _e;
|
|
77
|
+
var apiKey = _a.apiKey, domain = _a.domain, preview = _a.preview, partial = _a.partial, formData = _a.formData, postview = _a.postview, _f = _a.editable, editable = _f === void 0 ? true : _f, isWidget = _a.isWidget, internal = _a.internal, valuesData = _a.valuesData, customSend = _a.customSend, customSteps = _a.customSteps, classifiers = _a.classifiers, handleConfirmed = _a.handleConfirmed, customStepProps = _a.customStepProps, others = __rest(_a, ["apiKey", "domain", "preview", "partial", "formData", "postview", "editable", "isWidget", "internal", "valuesData", "customSend", "customSteps", "classifiers", "handleConfirmed", "customStepProps"]);
|
|
78
|
+
var _g = useState(undefined), form = _g[0], setForm = _g[1];
|
|
79
|
+
var _h = useState({}), originalValues = _h[0], setOriginalValues = _h[1];
|
|
80
|
+
var _j = useState(undefined), organizationInfo = _j[0], setOrganizationInfo = _j[1];
|
|
81
|
+
var migrateFormData = function (formData, valuesData) {
|
|
82
|
+
var form = migrateForm(formData, classifiers);
|
|
83
|
+
var steps = Object.values(form.steps);
|
|
84
|
+
var hasCBR = steps.find(function (step) {
|
|
85
|
+
return step.type.startsWith('CBR');
|
|
86
|
+
});
|
|
87
|
+
if (hasCBR !== undefined) {
|
|
88
|
+
var CBRForm = calcCbrForm(form, valuesData !== null && valuesData !== void 0 ? valuesData : {});
|
|
89
|
+
setForm(CBRForm);
|
|
90
|
+
}
|
|
91
|
+
else {
|
|
92
|
+
setForm(form);
|
|
93
|
+
}
|
|
94
|
+
if (valuesData !== undefined) {
|
|
95
|
+
setOriginalValues(mapOriginalValues(valuesData, form));
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
function fetchPreview(formData, valuesData) {
|
|
99
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
100
|
+
var response;
|
|
101
|
+
return __generator(this, function (_a) {
|
|
102
|
+
switch (_a.label) {
|
|
103
|
+
case 0: return [4 /*yield*/, widgetInstance.get('/organization')];
|
|
104
|
+
case 1:
|
|
105
|
+
response = _a.sent();
|
|
106
|
+
if (response.data) {
|
|
107
|
+
setOrganizationInfo(response.data);
|
|
108
|
+
migrateFormData(formData, valuesData);
|
|
109
|
+
}
|
|
110
|
+
return [2 /*return*/];
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
useEffect(function () {
|
|
116
|
+
if (formData !== undefined) {
|
|
117
|
+
if (preview && formData.isStandAlone) {
|
|
118
|
+
fetchPreview(formData, valuesData);
|
|
119
|
+
}
|
|
120
|
+
else {
|
|
121
|
+
migrateFormData(__assign({}, formData), valuesData);
|
|
122
|
+
setOrganizationInfo(null);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
else if (!isWidget && apiKey) {
|
|
126
|
+
//Is iframe
|
|
127
|
+
loadOrgInfo(domain);
|
|
128
|
+
loadInfo(apiKey, domain);
|
|
129
|
+
}
|
|
130
|
+
else if (isWidget && apiKey && domain) {
|
|
131
|
+
//Is widget
|
|
132
|
+
loadOrgInfo(domain);
|
|
133
|
+
loadInfo(apiKey, domain);
|
|
134
|
+
}
|
|
135
|
+
else {
|
|
136
|
+
console.error('ERROREMBED');
|
|
137
|
+
//Error in embed
|
|
138
|
+
setForm(null);
|
|
139
|
+
setOrganizationInfo(null);
|
|
140
|
+
}
|
|
141
|
+
}, []);
|
|
142
|
+
var loadLogRocket = function () { return __awaiter(_this, void 0, void 0, function () {
|
|
143
|
+
var LogRocket, error_1;
|
|
144
|
+
return __generator(this, function (_a) {
|
|
145
|
+
switch (_a.label) {
|
|
146
|
+
case 0:
|
|
147
|
+
if (!(organizationInfo && form !== undefined)) return [3 /*break*/, 4];
|
|
148
|
+
if (!(process.env.NODE_ENV === 'production' &&
|
|
149
|
+
apiKey !== 'rCgWiEfOSN1TlUmHO28Y0' &&
|
|
150
|
+
apiKey !== 'FORMSTEST' &&
|
|
151
|
+
!internal &&
|
|
152
|
+
!postview &&
|
|
153
|
+
!preview)) return [3 /*break*/, 4];
|
|
154
|
+
_a.label = 1;
|
|
155
|
+
case 1:
|
|
156
|
+
_a.trys.push([1, 3, , 4]);
|
|
157
|
+
return [4 /*yield*/, import('logrocket')];
|
|
158
|
+
case 2:
|
|
159
|
+
LogRocket = _a.sent();
|
|
160
|
+
LogRocket.default.init('63mg8a/forms-uv0gd');
|
|
161
|
+
LogRocket.default.identify(organizationInfo.idOrganization + '/' + apiKey, {
|
|
162
|
+
name: organizationInfo.name +
|
|
163
|
+
'/' +
|
|
164
|
+
((form === null || form === void 0 ? void 0 : form.name) ? form === null || form === void 0 ? void 0 : form.name : '404'),
|
|
165
|
+
});
|
|
166
|
+
return [3 /*break*/, 4];
|
|
167
|
+
case 3:
|
|
168
|
+
error_1 = _a.sent();
|
|
169
|
+
console.error('LogRocker Error', error_1);
|
|
170
|
+
return [3 /*break*/, 4];
|
|
171
|
+
case 4: return [2 /*return*/];
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
}); };
|
|
175
|
+
useEffect(function () {
|
|
176
|
+
loadLogRocket();
|
|
177
|
+
}, [organizationInfo, form]);
|
|
178
|
+
var containerRef = useRef();
|
|
179
|
+
var loadOrgInfo = function (domain) { return __awaiter(_this, void 0, void 0, function () {
|
|
180
|
+
var response, _a, error_2;
|
|
181
|
+
return __generator(this, function (_b) {
|
|
182
|
+
switch (_b.label) {
|
|
183
|
+
case 0:
|
|
184
|
+
_b.trys.push([0, 5, , 6]);
|
|
185
|
+
if (!domain) return [3 /*break*/, 2];
|
|
186
|
+
return [4 /*yield*/, widgetInstance.get("/organization?idOrganization=".concat(domain))];
|
|
187
|
+
case 1:
|
|
188
|
+
_a = _b.sent();
|
|
189
|
+
return [3 /*break*/, 4];
|
|
190
|
+
case 2: return [4 /*yield*/, axiosInstance.get('/organization')];
|
|
191
|
+
case 3:
|
|
192
|
+
_a = _b.sent();
|
|
193
|
+
_b.label = 4;
|
|
194
|
+
case 4:
|
|
195
|
+
response = _a;
|
|
196
|
+
if (response === null || response === void 0 ? void 0 : response.data) {
|
|
197
|
+
if (response === null || response === void 0 ? void 0 : response.data) {
|
|
198
|
+
// document.title = currentOrg.name;
|
|
199
|
+
// const favicon: any = document.getElementById('favicon');
|
|
200
|
+
// if (favicon !== undefined) {
|
|
201
|
+
// favicon.href = currentOrg.partialLogoUrl;
|
|
202
|
+
// }
|
|
203
|
+
//TODO cambiar el color del navbar en movil
|
|
204
|
+
// eslint-disable-next-line no-console
|
|
205
|
+
console.log(response === null || response === void 0 ? void 0 : response.data);
|
|
206
|
+
setOrganizationInfo(response === null || response === void 0 ? void 0 : response.data);
|
|
207
|
+
}
|
|
208
|
+
else {
|
|
209
|
+
setOrganizationInfo(null);
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
return [3 /*break*/, 6];
|
|
213
|
+
case 5:
|
|
214
|
+
error_2 = _b.sent();
|
|
215
|
+
console.error(error_2);
|
|
216
|
+
setOrganizationInfo(null);
|
|
217
|
+
return [3 /*break*/, 6];
|
|
218
|
+
case 6: return [2 /*return*/];
|
|
219
|
+
}
|
|
220
|
+
});
|
|
221
|
+
}); };
|
|
222
|
+
var loadInfo = function (apiKey, domain) { return __awaiter(_this, void 0, void 0, function () {
|
|
223
|
+
var response, error_3;
|
|
224
|
+
return __generator(this, function (_a) {
|
|
225
|
+
switch (_a.label) {
|
|
226
|
+
case 0:
|
|
227
|
+
_a.trys.push([0, 2, , 3]);
|
|
228
|
+
return [4 /*yield*/, (domain
|
|
229
|
+
? widgetInstance.get("/form/".concat(apiKey, "?idOrganization=").concat(domain))
|
|
230
|
+
: axiosInstance.get("/form/".concat(apiKey)))];
|
|
231
|
+
case 1:
|
|
232
|
+
response = _a.sent();
|
|
233
|
+
if (response) {
|
|
234
|
+
migrateFormData(response.data, valuesData);
|
|
235
|
+
}
|
|
236
|
+
return [3 /*break*/, 3];
|
|
237
|
+
case 2:
|
|
238
|
+
error_3 = _a.sent();
|
|
239
|
+
console.error(error_3);
|
|
240
|
+
setForm(null);
|
|
241
|
+
return [3 /*break*/, 3];
|
|
242
|
+
case 3: return [2 /*return*/];
|
|
243
|
+
}
|
|
244
|
+
});
|
|
245
|
+
}); };
|
|
246
|
+
if (form === undefined || organizationInfo === undefined) {
|
|
247
|
+
if (isWidget) {
|
|
248
|
+
return (_jsx("div", __assign({ className: styles.widgetContainer }, { children: _jsx("div", __assign({ className: styles.curtain }, { children: _jsx(Loader, { size: 50, color: (_c = (_b = organizationInfo === null || organizationInfo === void 0 ? void 0 : organizationInfo.styles) === null || _b === void 0 ? void 0 : _b.primaryColor) !== null && _c !== void 0 ? _c : '#b8b8b8' }) })) })));
|
|
249
|
+
}
|
|
250
|
+
return (_jsx("div", __assign({ className: styles.curtain }, { children: _jsx(Loader, { size: 50, color: (_e = (_d = organizationInfo === null || organizationInfo === void 0 ? void 0 : organizationInfo.styles) === null || _d === void 0 ? void 0 : _d.primaryColor) !== null && _e !== void 0 ? _e : '#b8b8b8' }) })));
|
|
251
|
+
}
|
|
252
|
+
else if (form === null) {
|
|
253
|
+
if (organizationInfo === null) {
|
|
254
|
+
if (isWidget) {
|
|
255
|
+
return (_jsx("div", __assign({ className: styles.widgetContainer }, { children: _jsx("div", __assign({ className: styles.curtain }, { children: "Error" })) })));
|
|
256
|
+
}
|
|
257
|
+
return _jsx("div", __assign({ className: styles.curtain }, { children: "Error" }));
|
|
258
|
+
}
|
|
259
|
+
else {
|
|
260
|
+
if (isWidget) {
|
|
261
|
+
return (_jsx("div", __assign({ className: styles.widgetContainer }, { children: _jsx("div", __assign({ className: styles.curtain }, { children: "404" })) })));
|
|
262
|
+
}
|
|
263
|
+
return _jsx("div", __assign({ className: styles.curtain }, { children: "404" }));
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
else {
|
|
267
|
+
return (_jsx("div", __assign({ ref: containerRef, className: styles.container }, { children: _jsx(FormComponent, __assign({}, others, { form: form, reload: function () {
|
|
268
|
+
var tempForm = __assign({}, form);
|
|
269
|
+
setForm(undefined);
|
|
270
|
+
setTimeout(function () {
|
|
271
|
+
setForm(tempForm);
|
|
272
|
+
}, 100);
|
|
273
|
+
if (handleConfirmed) {
|
|
274
|
+
handleConfirmed();
|
|
275
|
+
}
|
|
276
|
+
}, editable: editable, postview: postview === true, preview: preview === true, partial: partial === true, internal: internal === true, apiKey: apiKey, domain: domain, customSend: customSend, originalValues: originalValues, containerRef: containerRef, organization: organizationInfo !== null && organizationInfo !== void 0 ? organizationInfo : { idOrganization: domain }, customSteps: customSteps !== null && customSteps !== void 0 ? customSteps : {}, customStepProps: customStepProps !== null && customStepProps !== void 0 ? customStepProps : {}, isWidget: isWidget === true })) })));
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
export default App;
|
|
280
|
+
//THIS IS TEMP
|
|
281
|
+
export var SIZES;
|
|
282
|
+
(function (SIZES) {
|
|
283
|
+
SIZES["SMALL"] = "SMALL";
|
|
284
|
+
SIZES["MEDIUM"] = "MEDIUM";
|
|
285
|
+
SIZES["LARGE"] = "LARGE";
|
|
286
|
+
})(SIZES || (SIZES = {}));
|
|
287
|
+
export var SizesToNum = (_a = {},
|
|
288
|
+
_a[SIZES.LARGE] = 4,
|
|
289
|
+
_a[SIZES.MEDIUM] = 2,
|
|
290
|
+
_a[SIZES.SMALL] = 1,
|
|
291
|
+
_a);
|
|
292
|
+
var migrateForm = function (form, classifiers) {
|
|
293
|
+
var steps = __assign({}, form.steps);
|
|
294
|
+
for (var _i = 0, _a = Object.keys(form.steps); _i < _a.length; _i++) {
|
|
295
|
+
var idStep = _a[_i];
|
|
296
|
+
var step = __assign({}, form.steps[idStep]);
|
|
297
|
+
if (step.size && isNaN(step.size)) {
|
|
298
|
+
step.size = getStaticWidth(step);
|
|
299
|
+
}
|
|
300
|
+
if (step.type === CBRStepTypes.CBR_EMAIL) {
|
|
301
|
+
step.validation = {
|
|
302
|
+
value: /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
|
|
303
|
+
.source,
|
|
304
|
+
message: 'El correo no es válido',
|
|
305
|
+
};
|
|
306
|
+
}
|
|
307
|
+
else if (step.type === CBRStepTypes.CBR_PHONE ||
|
|
308
|
+
step.type === CBRStepTypes.CBR_CEL) {
|
|
309
|
+
step.validation = {
|
|
310
|
+
value: /^(\+[0-9])|([0-9])$/.source,
|
|
311
|
+
message: 'El teléfono no es válido',
|
|
312
|
+
};
|
|
313
|
+
}
|
|
314
|
+
steps[idStep] = step;
|
|
315
|
+
}
|
|
316
|
+
var newForm = __assign(__assign({}, form), { steps: steps });
|
|
317
|
+
if (form.size === undefined) {
|
|
318
|
+
if (form.spacingSize) {
|
|
319
|
+
newForm.size = {
|
|
320
|
+
spacingSize: form.spacingSize,
|
|
321
|
+
blockNum: form.blockNum,
|
|
322
|
+
blockSize: form.blockSize,
|
|
323
|
+
};
|
|
324
|
+
}
|
|
325
|
+
else {
|
|
326
|
+
newForm.size = {
|
|
327
|
+
spacingSize: 20,
|
|
328
|
+
blockNum: 4,
|
|
329
|
+
blockSize: 210,
|
|
330
|
+
};
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
if (form.style === undefined) {
|
|
334
|
+
newForm.style = InternalFormStyle;
|
|
335
|
+
}
|
|
336
|
+
if (form.classifiers) {
|
|
337
|
+
var mappedClassifiers = {};
|
|
338
|
+
for (var _b = 0, _c = Object.keys(form.classifiers); _b < _c.length; _b++) {
|
|
339
|
+
var idClassifier = _c[_b];
|
|
340
|
+
var classifier = __assign({}, form.classifiers[idClassifier]);
|
|
341
|
+
if (classifier.children &&
|
|
342
|
+
classifier.children.find(function (child) { return typeof child !== 'string'; })) {
|
|
343
|
+
var children = [];
|
|
344
|
+
for (var _d = 0, _e = classifier.children; _d < _e.length; _d++) {
|
|
345
|
+
var child = _e[_d];
|
|
346
|
+
if (typeof child === 'string') {
|
|
347
|
+
children.push(child);
|
|
348
|
+
}
|
|
349
|
+
else if (child._id) {
|
|
350
|
+
mappedClassifiers[child._id] = child;
|
|
351
|
+
children.push(child._id);
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
classifier.children = children;
|
|
355
|
+
}
|
|
356
|
+
mappedClassifiers[idClassifier] = classifier;
|
|
357
|
+
}
|
|
358
|
+
newForm.classifiers = mappedClassifiers;
|
|
359
|
+
}
|
|
360
|
+
else if (classifiers) {
|
|
361
|
+
newForm.classifiers = classifiers;
|
|
362
|
+
}
|
|
363
|
+
return newForm;
|
|
364
|
+
};
|
|
365
|
+
function getStaticWidth(step) {
|
|
366
|
+
if (step.type === StepTypes.SELECTOR ||
|
|
367
|
+
step.type === StepTypes.TEXTINPUT ||
|
|
368
|
+
step.type === StepTypes.CLASSIFIER_SELECTOR) {
|
|
369
|
+
switch (step.size) {
|
|
370
|
+
case SIZES.LARGE:
|
|
371
|
+
return 4;
|
|
372
|
+
case SIZES.MEDIUM:
|
|
373
|
+
return 2;
|
|
374
|
+
case SIZES.SMALL:
|
|
375
|
+
return 1;
|
|
376
|
+
default:
|
|
377
|
+
return 1;
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
else {
|
|
381
|
+
return 4;
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
var mapOriginalValues = function (originalValues, form) {
|
|
385
|
+
var _a;
|
|
386
|
+
var newValues = {};
|
|
387
|
+
for (var _i = 0, _b = Object.keys(originalValues); _i < _b.length; _i++) {
|
|
388
|
+
var idValue = _b[_i];
|
|
389
|
+
var step = form.steps[idValue];
|
|
390
|
+
if (step) {
|
|
391
|
+
if (step.type === StepTypes.MAPPER) {
|
|
392
|
+
var elements = originalValues[step.id];
|
|
393
|
+
var mappedElements = [];
|
|
394
|
+
for (var _c = 0, elements_1 = elements; _c < elements_1.length; _c++) {
|
|
395
|
+
var element = elements_1[_c];
|
|
396
|
+
var idElement = (_a = element.id) !== null && _a !== void 0 ? _a : nanoid();
|
|
397
|
+
var mappedElement = {
|
|
398
|
+
id: idElement,
|
|
399
|
+
ids: {},
|
|
400
|
+
value: element.value,
|
|
401
|
+
};
|
|
402
|
+
for (var _d = 0, _e = Object.keys(step.steps); _d < _e.length; _d++) {
|
|
403
|
+
var idStep = _e[_d];
|
|
404
|
+
var newIdStep = step.id + '-' + idStep + '-' + idElement;
|
|
405
|
+
mappedElement.ids[idStep] = newIdStep;
|
|
406
|
+
if (element[idStep] !== undefined) {
|
|
407
|
+
var value = mapOriginalValue(step.steps[idStep], element[idStep], form);
|
|
408
|
+
if (value !== undefined) {
|
|
409
|
+
newValues[newIdStep] = value;
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
mappedElements.push(mappedElement);
|
|
414
|
+
}
|
|
415
|
+
newValues[step.id] = mappedElements;
|
|
416
|
+
}
|
|
417
|
+
else {
|
|
418
|
+
var value = mapOriginalValue(step, originalValues[step.id], form);
|
|
419
|
+
if (value !== undefined) {
|
|
420
|
+
newValues[step.id] = value;
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
else {
|
|
425
|
+
newValues[idValue] = originalValues[idValue];
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
return newValues;
|
|
429
|
+
};
|
|
430
|
+
export var mapOriginalValue = function (step, value, form) {
|
|
431
|
+
var _a, _b, _c, _d;
|
|
432
|
+
switch (step === null || step === void 0 ? void 0 : step.type) {
|
|
433
|
+
case StepTypes.TEXTAREA: {
|
|
434
|
+
if (step.hasTextEditor) {
|
|
435
|
+
return calcDefaultDraftValue(value);
|
|
436
|
+
}
|
|
437
|
+
return (_a = value.value) !== null && _a !== void 0 ? _a : value;
|
|
438
|
+
}
|
|
439
|
+
case StepTypes.SELECTOR: {
|
|
440
|
+
var option = step.options.find(function (option) { return option.value == value; });
|
|
441
|
+
if (!(value === null || value === void 0 ? void 0 : value.value))
|
|
442
|
+
return option;
|
|
443
|
+
return value;
|
|
444
|
+
}
|
|
445
|
+
case StepTypes.CLASSIFIER_SELECTOR: {
|
|
446
|
+
var stepClassifier = (_b = form === null || form === void 0 ? void 0 : form.classifiers) === null || _b === void 0 ? void 0 : _b[(_c = step.idClassifier) !== null && _c !== void 0 ? _c : ''];
|
|
447
|
+
if (stepClassifier) {
|
|
448
|
+
var classifier = (_d = form.classifiers) === null || _d === void 0 ? void 0 : _d[value];
|
|
449
|
+
if (!(value === null || value === void 0 ? void 0 : value.value))
|
|
450
|
+
return { value: value, label: classifier === null || classifier === void 0 ? void 0 : classifier.name };
|
|
451
|
+
}
|
|
452
|
+
break;
|
|
453
|
+
}
|
|
454
|
+
default:
|
|
455
|
+
if (step.type.startsWith('CBR_') &&
|
|
456
|
+
(value === null || value === void 0 ? void 0 : value.id) &&
|
|
457
|
+
typeof value.id === 'number') {
|
|
458
|
+
return __assign(__assign({}, value), { id: value.id.toString() });
|
|
459
|
+
}
|
|
460
|
+
return value;
|
|
461
|
+
}
|
|
462
|
+
};
|
|
463
|
+
var calcDefaultDraftValue = function (defaultValue) {
|
|
464
|
+
if (typeof defaultValue === 'string') {
|
|
465
|
+
return EditorState.createWithContent(convertFromRaw(stringToDraft(defaultValue)));
|
|
466
|
+
}
|
|
467
|
+
else {
|
|
468
|
+
return EditorState.createWithContent(convertFromRaw(getRawText(defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.draft, defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.text)));
|
|
469
|
+
}
|
|
470
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
.curtain {
|
|
2
|
+
position: absolute;
|
|
3
|
+
width: 100%;
|
|
4
|
+
height: 100%;
|
|
5
|
+
max-width: 100%;
|
|
6
|
+
display: flex;
|
|
7
|
+
justify-content: center;
|
|
8
|
+
align-items: center;
|
|
9
|
+
background-color: white;
|
|
10
|
+
z-index: 5000;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
#widget:eureka {
|
|
14
|
+
min-height: inherit;
|
|
15
|
+
}
|
|
16
|
+
.container {
|
|
17
|
+
width: 100%;
|
|
18
|
+
position: relative;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.widgetContainer {
|
|
22
|
+
position: relative;
|
|
23
|
+
max-width: 100%;
|
|
24
|
+
height: 100%;
|
|
25
|
+
min-height: inherit;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.container *,
|
|
29
|
+
.container *::after,
|
|
30
|
+
.container *::before {
|
|
31
|
+
-webkit-box-sizing: content-box;
|
|
32
|
+
-moz-box-sizing: content-box;
|
|
33
|
+
box-sizing: content-box;
|
|
34
|
+
}
|
package/dist/AxiosAPI.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FormComponentProps } from '../Form';
|
|
3
|
+
import { CustomStep } from '../../../App';
|
|
4
|
+
import { FormStep } from '../../../@Types/FormStep';
|
|
5
|
+
declare function ColumnForm({ form, apiKey, reload, domain, postview, internal, formStyle, sendLabel, widthStats, customSteps, customSend, customSubmit, handleLoaded, originalValues, ...others }: FormComponentProps): JSX.Element;
|
|
6
|
+
export default ColumnForm;
|
|
7
|
+
export declare const calcValue: (idStep: string, steps: Record<string, FormStep>, values: Record<string, any>, customSteps: Record<string, CustomStep>, deleteIds: string[], value?: any) => any;
|
|
8
|
+
export declare function calcStepDependencyValue(depStep: FormStep, originalValues: Record<string, any>, customSteps?: Record<string, CustomStep>): any;
|