@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
|
@@ -0,0 +1,108 @@
|
|
|
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 Types from '../../constants/FormStepTypes';
|
|
25
|
+
import SelectorStep from './SelectorStep/SelectorStep';
|
|
26
|
+
import SeparatorStep from './SeparatorStep/SeparatorStep';
|
|
27
|
+
import TextInputStep from './TextInputStep/TextInputStep';
|
|
28
|
+
import TitleStep from './TitleStep/TitleStep';
|
|
29
|
+
import ClassifierSelectorStep from './ClassifierSelectorStep/ClassifierSelectorStep';
|
|
30
|
+
import TextAreaStep from './TextAreaStep/TextAreaStep';
|
|
31
|
+
import DatePickerStep from './DatePickerStep/DatePickerStep';
|
|
32
|
+
import FileUploadStep from './FileUploadStep/FileUploadStep';
|
|
33
|
+
import CheckBoxStep from './CheckBoxStep/MaterialCheckBoxStep/MaterialCheckBoxStep';
|
|
34
|
+
import CBRStepMapper from './CBRStepMapper';
|
|
35
|
+
import RatingStep from './RatingStep/RatingStep';
|
|
36
|
+
import AYFStepMapper from './AYFStepMapper';
|
|
37
|
+
import EntityValuePickerStep from './EntityValueStep/EntityValuePickerStep';
|
|
38
|
+
import MapperStep from './MapperStep/MapperStep';
|
|
39
|
+
import CollapsibleStep from './CollapsibleStep/CollapsibleStep';
|
|
40
|
+
function StepComponent(_a) {
|
|
41
|
+
var _b, _c;
|
|
42
|
+
var step = _a.step, props = __rest(_a, ["step"]);
|
|
43
|
+
if (!step) {
|
|
44
|
+
console.error('Step not found!');
|
|
45
|
+
return _jsx("div", {});
|
|
46
|
+
}
|
|
47
|
+
var customStep = props.customSteps[step.type];
|
|
48
|
+
var editable = props.globalEditable ? (_b = step.editable) !== null && _b !== void 0 ? _b : true : false;
|
|
49
|
+
if ((props.postview || !editable) &&
|
|
50
|
+
(props.partial || step.partial) &&
|
|
51
|
+
props.originalValues[step.id] === undefined) {
|
|
52
|
+
return _jsx("div", {});
|
|
53
|
+
}
|
|
54
|
+
if (customStep) {
|
|
55
|
+
return customStep.component(__assign(__assign(__assign({}, props), ((_c = customStep.componentProps) !== null && _c !== void 0 ? _c : {})), { step: step, editable: editable }));
|
|
56
|
+
}
|
|
57
|
+
switch (step.type) {
|
|
58
|
+
case Types.TITLE: {
|
|
59
|
+
return (_jsx(TitleStep, __assign({}, props, { step: step, editable: editable })));
|
|
60
|
+
}
|
|
61
|
+
case Types.SELECTOR: {
|
|
62
|
+
return (_jsx(SelectorStep, __assign({}, props, { step: step, editable: editable })));
|
|
63
|
+
}
|
|
64
|
+
case Types.CHECKBOX: {
|
|
65
|
+
return (_jsx(CheckBoxStep, __assign({}, props, { step: step, editable: editable })));
|
|
66
|
+
}
|
|
67
|
+
case Types.CLASSIFIER_SELECTOR: {
|
|
68
|
+
return (_jsx(ClassifierSelectorStep, __assign({}, props, { step: step, editable: editable })));
|
|
69
|
+
}
|
|
70
|
+
case Types.TEXTAREA: {
|
|
71
|
+
return (_jsx(TextAreaStep, __assign({}, props, { step: step, editable: editable })));
|
|
72
|
+
}
|
|
73
|
+
case Types.TEXTINPUT: {
|
|
74
|
+
return (_jsx(TextInputStep, __assign({}, props, { step: step, editable: editable })));
|
|
75
|
+
}
|
|
76
|
+
case Types.DATEPICKER: {
|
|
77
|
+
return (_jsx(DatePickerStep, __assign({}, props, { step: step, editable: editable })));
|
|
78
|
+
}
|
|
79
|
+
case Types.SEPARATOR: {
|
|
80
|
+
return (_jsx(SeparatorStep, __assign({}, props, { step: step, editable: editable })));
|
|
81
|
+
}
|
|
82
|
+
case Types.FILEUPLOAD: {
|
|
83
|
+
return (_jsx(FileUploadStep, __assign({}, props, { step: step, editable: editable })));
|
|
84
|
+
}
|
|
85
|
+
case Types.RATING: {
|
|
86
|
+
return (_jsx(RatingStep, __assign({}, props, { step: step, editable: editable })));
|
|
87
|
+
}
|
|
88
|
+
case Types.COLLAPSIBLE: {
|
|
89
|
+
return (_jsx(CollapsibleStep, __assign({}, props, { step: step, editable: editable })));
|
|
90
|
+
}
|
|
91
|
+
case Types.ENTITYVALUEPICKER: {
|
|
92
|
+
return (_jsx(EntityValuePickerStep, __assign({}, props, { step: step, editable: editable })));
|
|
93
|
+
}
|
|
94
|
+
case Types.MAPPER: {
|
|
95
|
+
return (_jsx(MapperStep, __assign({}, props, { step: step, editable: editable })));
|
|
96
|
+
}
|
|
97
|
+
default:
|
|
98
|
+
break;
|
|
99
|
+
}
|
|
100
|
+
if (step.type.startsWith('CBR')) {
|
|
101
|
+
return (_jsx(CBRStepMapper, __assign({}, props, { step: step, editable: editable })));
|
|
102
|
+
}
|
|
103
|
+
else if (step.type.startsWith('AYF')) {
|
|
104
|
+
return (_jsx(AYFStepMapper, __assign({}, props, { step: step, editable: editable })));
|
|
105
|
+
}
|
|
106
|
+
return _jsx("div", {});
|
|
107
|
+
}
|
|
108
|
+
export default StepComponent;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { FormSize } from '../../@Types/Form';
|
|
2
|
+
import { ClassifierSelector, EntityValuePicker, FormSelector, FormStep } from '../../@Types/FormStep';
|
|
3
|
+
export declare function calcFillerSize(step: FormSelector | ClassifierSelector | EntityValuePicker, steps: Record<string, FormStep>, values: Record<string, unknown>, size: FormSize): number;
|
|
4
|
+
export declare function recursivelyCheckOpenSize(idStep: string, steps: Record<string, FormStep>, values: Record<string, any>): number;
|
|
5
|
+
export declare const calcStepWidth: (stepSize: 1 | 2 | 3 | 4, size: FormSize) => number;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import Types, { ClassifierOptionTypes, EntityValueOptionTypes, OptionTypes, } from '../../constants/FormStepTypes';
|
|
2
|
+
export function calcFillerSize(step, steps, values, size) {
|
|
3
|
+
if (step.maxSize < size.blockNum) {
|
|
4
|
+
var stepSize = step.maxSize - recursivelyCheckOpenSize(step.id, steps, values);
|
|
5
|
+
return (size.blockSize * stepSize + size.spacingSize * (stepSize - 1) + 20);
|
|
6
|
+
}
|
|
7
|
+
else {
|
|
8
|
+
return 0;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export function recursivelyCheckOpenSize(idStep, steps, values) {
|
|
12
|
+
var step = steps[idStep];
|
|
13
|
+
var value = values[idStep];
|
|
14
|
+
if (step.type === Types.SELECTOR) {
|
|
15
|
+
var size = step.size;
|
|
16
|
+
if (value) {
|
|
17
|
+
var currentOption = step.options.find(function (option) { return option.value === value; });
|
|
18
|
+
if ((currentOption === null || currentOption === void 0 ? void 0 : currentOption.type) === OptionTypes.NESTED) {
|
|
19
|
+
var optionSize = 0;
|
|
20
|
+
for (var _i = 0, _a = currentOption.steps; _i < _a.length; _i++) {
|
|
21
|
+
var pStepId = _a[_i];
|
|
22
|
+
optionSize += recursivelyCheckOpenSize(pStepId, steps, values);
|
|
23
|
+
}
|
|
24
|
+
size += optionSize;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
return size;
|
|
28
|
+
}
|
|
29
|
+
else if (step.type === Types.CLASSIFIER_SELECTOR) {
|
|
30
|
+
var size = step.size;
|
|
31
|
+
if (value) {
|
|
32
|
+
var currentOption = step.options[value];
|
|
33
|
+
if ((currentOption === null || currentOption === void 0 ? void 0 : currentOption.type) === ClassifierOptionTypes.NESTED) {
|
|
34
|
+
var optionSize = 0;
|
|
35
|
+
for (var _b = 0, _c = currentOption.steps; _b < _c.length; _b++) {
|
|
36
|
+
var pStepId = _c[_b];
|
|
37
|
+
optionSize += recursivelyCheckOpenSize(pStepId, steps, values);
|
|
38
|
+
}
|
|
39
|
+
size += optionSize;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return size;
|
|
43
|
+
}
|
|
44
|
+
if (step.type === Types.ENTITYVALUEPICKER) {
|
|
45
|
+
var size = step.size;
|
|
46
|
+
if (value) {
|
|
47
|
+
var currentOption = step.options[value];
|
|
48
|
+
if ((currentOption === null || currentOption === void 0 ? void 0 : currentOption.type) === EntityValueOptionTypes.NESTED) {
|
|
49
|
+
var optionSize = 0;
|
|
50
|
+
for (var _d = 0, _e = currentOption.steps; _d < _e.length; _d++) {
|
|
51
|
+
var pStepId = _e[_d];
|
|
52
|
+
optionSize += recursivelyCheckOpenSize(pStepId, steps, values);
|
|
53
|
+
}
|
|
54
|
+
size += optionSize;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return size;
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
return 4;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
export var calcStepWidth = function (stepSize, size) {
|
|
64
|
+
return size.blockSize * stepSize + size.spacingSize * (stepSize - 1);
|
|
65
|
+
};
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
.EF-DraftContainer {
|
|
2
|
+
font: inherit;
|
|
3
|
+
font-size: 1rem;
|
|
4
|
+
}
|
|
5
|
+
.postview-editor {
|
|
6
|
+
cursor: default !important;
|
|
7
|
+
}
|
|
8
|
+
.EF-DraftContainer .DraftEditor-root {
|
|
9
|
+
height: unset;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.EF-DraftContainer .rdw-option-wrapper {
|
|
13
|
+
border-radius: 7px;
|
|
14
|
+
border: 1px solid var(--eureka-outline);
|
|
15
|
+
background-color: transparent;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.EF-DraftContainer .rdw-option-wrapper:active {
|
|
19
|
+
border: 1px solid var(--eureka-primary);
|
|
20
|
+
}
|
|
21
|
+
.EF-DraftContainer .rdw-option-wrapper:hover {
|
|
22
|
+
box-shadow: none;
|
|
23
|
+
border: 1px solid var(--eureka-primary);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.EF-DraftContainer .rdw-option-active {
|
|
27
|
+
border: 1px solid var(--eureka-primary);
|
|
28
|
+
box-shadow: none;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.EF-DraftContainer .rdw-editor-toolbar {
|
|
32
|
+
border-radius: 15px 15px 0 0;
|
|
33
|
+
border: none;
|
|
34
|
+
border-bottom: 1px solid var(--eureka-outline);
|
|
35
|
+
background-color: transparent;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.postview-editor-toolbar {
|
|
39
|
+
pointer-events: none;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.EF-DraftContainer .rdw-editor-main {
|
|
43
|
+
cursor: text;
|
|
44
|
+
padding-top: 12px;
|
|
45
|
+
padding-bottom: 40px;
|
|
46
|
+
margin-right: 0px;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.EF-DraftContainer .public-DraftStyleDefault-block {
|
|
50
|
+
margin: 0px 0;
|
|
51
|
+
max-width: 100%;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.EF-DraftContainer .rdw-image-imagewrapper {
|
|
55
|
+
max-width: 100%;
|
|
56
|
+
/* cursor: pointer; */
|
|
57
|
+
position: relative;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.EF-DraftContainer .rdw-image-alignment-editor {
|
|
61
|
+
padding-right: 10px;
|
|
62
|
+
padding-left: 5px;
|
|
63
|
+
margin-left: -5px;
|
|
64
|
+
}
|
|
65
|
+
.EF-DraftContainer .rdw-editing-image {
|
|
66
|
+
border: 1px solid var(--secondary);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.EF-DraftContainer .DraftEditor-root figure {
|
|
70
|
+
margin: 0px;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.EF-DraftContainer .rdw-image-alignment-option {
|
|
74
|
+
font-size: 16px !important;
|
|
75
|
+
width: 20px;
|
|
76
|
+
height: 20px;
|
|
77
|
+
margin-left: 2px;
|
|
78
|
+
border-radius: 2px;
|
|
79
|
+
|
|
80
|
+
display: flex;
|
|
81
|
+
align-items: center;
|
|
82
|
+
justify-content: center;
|
|
83
|
+
border: 1px solid var(--light-grey);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.EF-DraftContainer .rdw-image-alignment-options-popup {
|
|
87
|
+
width: fit-content;
|
|
88
|
+
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/* Hides empty placeholder */
|
|
92
|
+
.EF-DraftContainer
|
|
93
|
+
.RichEditor-hidePlaceholder
|
|
94
|
+
.public-DraftEditorPlaceholder-root {
|
|
95
|
+
display: none;
|
|
96
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import 'react-draft-wysiwyg/dist/react-draft-wysiwyg.css';
|
|
3
|
+
import './DraftEditor.css';
|
|
4
|
+
import { RawDraftContentState } from 'draft-js';
|
|
5
|
+
import { TextAreaStepProps } from '../TextAreaStep';
|
|
6
|
+
export interface Payload {
|
|
7
|
+
text: string;
|
|
8
|
+
draft: any;
|
|
9
|
+
}
|
|
10
|
+
declare function TextAreaStep({ step, errors, partial, control, editable, postview, formStyle, maxLength, originalValues, }: TextAreaStepProps): JSX.Element;
|
|
11
|
+
export default TextAreaStep;
|
|
12
|
+
export declare function stringToDraft(text: string): RawDraftContentState;
|
|
13
|
+
export declare const getRawText: (draft?: RawDraftContentState, text?: string) => RawDraftContentState;
|
|
@@ -0,0 +1,213 @@
|
|
|
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 { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
24
|
+
import RoundedTextField from '../../../../shared/RoundedTextField/RoundedTextField';
|
|
25
|
+
import styles from './MaterialTextAreaStep.module.css';
|
|
26
|
+
import { Controller } from 'react-hook-form';
|
|
27
|
+
import { Editor } from 'react-draft-wysiwyg'; //Load programatically only if step has editor
|
|
28
|
+
import 'react-draft-wysiwyg/dist/react-draft-wysiwyg.css';
|
|
29
|
+
import './DraftEditor.css';
|
|
30
|
+
import { EditorState } from 'draft-js';
|
|
31
|
+
import React, { useState } from 'react';
|
|
32
|
+
import { ClickAwayListener } from '@material-ui/core';
|
|
33
|
+
function TextAreaStep(_a) {
|
|
34
|
+
var step = _a.step, errors = _a.errors, partial = _a.partial, control = _a.control, editable = _a.editable, postview = _a.postview, formStyle = _a.formStyle, maxLength = _a.maxLength, originalValues = _a.originalValues;
|
|
35
|
+
var _b = useState(false), hovering = _b[0], setHovering = _b[1];
|
|
36
|
+
var _c = useState(false), focus = _c[0], setFocus = _c[1];
|
|
37
|
+
var calcStyle = function () {
|
|
38
|
+
var backgroundColor = formStyle.stepBackgroundColor;
|
|
39
|
+
if (focus) {
|
|
40
|
+
return {
|
|
41
|
+
border: '2px solid ' + formStyle.primaryColor,
|
|
42
|
+
marginTop: -1,
|
|
43
|
+
marginLeft: -1,
|
|
44
|
+
marginBottom: 0,
|
|
45
|
+
backgroundColor: backgroundColor,
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
else if (hovering) {
|
|
49
|
+
return {
|
|
50
|
+
border: '1px solid ' + formStyle.primaryColor,
|
|
51
|
+
backgroundColor: backgroundColor,
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
return {
|
|
56
|
+
border: '1px solid ' + formStyle.outlineColor,
|
|
57
|
+
backgroundColor: backgroundColor,
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
var calcDefaultStringValue = function (defaultValue) {
|
|
62
|
+
var _a;
|
|
63
|
+
if (typeof defaultValue === 'string') {
|
|
64
|
+
return defaultValue;
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
return (_a = defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.text) !== null && _a !== void 0 ? _a : '';
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
var canEdit = editable && !postview;
|
|
71
|
+
if (step.hasTextEditor) {
|
|
72
|
+
return (_jsxs("div", __assign({ className: styles.textEditorContainer, style: {
|
|
73
|
+
'--eureka-outline': formStyle.outlineColor,
|
|
74
|
+
'--eureka-primary': formStyle.primaryColor,
|
|
75
|
+
} }, { children: [step.label && (_jsxs("div", __assign({ className: styles.textEditorLabel, style: {
|
|
76
|
+
color: !!errors[step.id]
|
|
77
|
+
? formStyle.errorColor
|
|
78
|
+
: formStyle.textColor,
|
|
79
|
+
} }, { children: [step.label, " ", step.required ? ' *' : ''] }))), _jsx(ClickAwayListener, __assign({ mouseEvent: "onMouseDown", onClickAway: function () {
|
|
80
|
+
if (canEdit) {
|
|
81
|
+
setFocus(false);
|
|
82
|
+
}
|
|
83
|
+
} }, { children: _jsx("div", __assign({ className: postview
|
|
84
|
+
? styles.postViewContainer +
|
|
85
|
+
' EF-DraftContainer'
|
|
86
|
+
: styles.textContainer + ' EF-DraftContainer', "data-testid": step.id, style: calcStyle(), onMouseEnter: function () {
|
|
87
|
+
if (canEdit) {
|
|
88
|
+
setHovering(true);
|
|
89
|
+
}
|
|
90
|
+
}, onMouseLeave: function () {
|
|
91
|
+
if (canEdit) {
|
|
92
|
+
setHovering(false);
|
|
93
|
+
}
|
|
94
|
+
}, onClick: function () {
|
|
95
|
+
if (canEdit) {
|
|
96
|
+
setFocus(true);
|
|
97
|
+
}
|
|
98
|
+
} }, { children: _jsx(Controller, { name: step.id, control: control, defaultValue: EditorState.createEmpty(), rules: step.required
|
|
99
|
+
? {
|
|
100
|
+
validate: function (editorState) {
|
|
101
|
+
return editorState
|
|
102
|
+
.getCurrentContent()
|
|
103
|
+
.hasText();
|
|
104
|
+
},
|
|
105
|
+
}
|
|
106
|
+
: {}, shouldUnregister: true, render: function (_a) {
|
|
107
|
+
var _b;
|
|
108
|
+
var field = _a.field;
|
|
109
|
+
var editorClassName = styles.editor;
|
|
110
|
+
if (!field.value.getCurrentContent().hasText()) {
|
|
111
|
+
if (field.value
|
|
112
|
+
.getCurrentContent()
|
|
113
|
+
.getBlockMap()
|
|
114
|
+
.first()
|
|
115
|
+
.getType() !== 'unstyled') {
|
|
116
|
+
editorClassName +=
|
|
117
|
+
' RichEditor-hidePlaceholder';
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
if (!canEdit) {
|
|
121
|
+
editorClassName += ' postview-editor';
|
|
122
|
+
}
|
|
123
|
+
return (_jsx(Editor, { editorRef: field.ref, onFocus: function () {
|
|
124
|
+
setFocus(true);
|
|
125
|
+
}, readOnly: !canEdit, onBlur: field.onBlur, stripPastedStyles: true, editorState: field.value, onEditorStateChange: field.onChange, toolbarClassName: styles.toolbar +
|
|
126
|
+
(!canEdit
|
|
127
|
+
? ' postview-editor-toolbar'
|
|
128
|
+
: ''), editorClassName: editorClassName, wrapperClassName: styles.wrapper, placeholder: (_b = step.description) !== null && _b !== void 0 ? _b : '', toolbar: {
|
|
129
|
+
options: [
|
|
130
|
+
'inline',
|
|
131
|
+
'list',
|
|
132
|
+
'history',
|
|
133
|
+
],
|
|
134
|
+
inline: {
|
|
135
|
+
options: [
|
|
136
|
+
'bold',
|
|
137
|
+
'italic',
|
|
138
|
+
'underline',
|
|
139
|
+
'strikethrough',
|
|
140
|
+
],
|
|
141
|
+
},
|
|
142
|
+
list: {
|
|
143
|
+
options: ['unordered'],
|
|
144
|
+
},
|
|
145
|
+
} }));
|
|
146
|
+
} }) })) })), _jsx("div", __assign({ className: styles.errorMsg, style: {
|
|
147
|
+
color: formStyle.errorColor,
|
|
148
|
+
} }, { children: !!errors[step.id] && 'Este campo es obligatorio' }))] })));
|
|
149
|
+
}
|
|
150
|
+
else {
|
|
151
|
+
return (_jsx("div", __assign({ className: styles.container, style: {
|
|
152
|
+
paddingBottom: step.required || step.description || !!errors[step.id]
|
|
153
|
+
? '0px'
|
|
154
|
+
: '5px',
|
|
155
|
+
} }, { children: _jsx(Controller, { name: step.id, control: control, defaultValue: calcDefaultStringValue(originalValues[step.id]), rules: {
|
|
156
|
+
required: step.required
|
|
157
|
+
? 'Este campo es obligatorio'
|
|
158
|
+
: undefined,
|
|
159
|
+
}, shouldUnregister: true, render: function (_a) {
|
|
160
|
+
var _b;
|
|
161
|
+
var _c = _a.field, ref = _c.ref, field = __rest(_c, ["ref"]);
|
|
162
|
+
return (_jsxs(React.Fragment, { children: [_jsx("div", __assign({ className: styles.erkTextArea }, { children: _jsx(RoundedTextField, __assign({}, field, { "data-testid": step.id, maxLength: maxLength, label: step.label, inputRef: ref, required: step.required, cantEdit: !canEdit, fontWeight: 400, multiline: true, minRows: postview && partial ? undefined : 4, focusColor: formStyle.primaryColor, outlineColor: formStyle.outlineColor, textColor: formStyle.textColor, errorColor: formStyle.errorColor, backgroundColor: formStyle.stepBackgroundColor, helperTextColor: formStyle.descriptionTextColor, helperText: errors[step.id]
|
|
163
|
+
? errors[step.id].message
|
|
164
|
+
: (_b = step.description) !== null && _b !== void 0 ? _b : (step.required ? ' ' : null), error: !!errors[step.id] })) })), postview && (_jsxs("div", __assign({ className: styles.print }, { children: [_jsxs("div", { children: [step.label, ":"] }), _jsx("p", __assign({ className: styles.printContainer, style: {
|
|
165
|
+
backgroundColor: formStyle.stepBackgroundColor,
|
|
166
|
+
borderColor: formStyle.outlineColor,
|
|
167
|
+
} }, { children: field.value }))] })))] }));
|
|
168
|
+
} }) })));
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
export default TextAreaStep;
|
|
172
|
+
export function stringToDraft(text) {
|
|
173
|
+
var draftStructure = {
|
|
174
|
+
blocks: [],
|
|
175
|
+
entityMap: {},
|
|
176
|
+
};
|
|
177
|
+
text.split('\n').forEach(function (element, index) {
|
|
178
|
+
draftStructure.blocks.push({
|
|
179
|
+
key: String(index),
|
|
180
|
+
text: element,
|
|
181
|
+
type: 'unstyled',
|
|
182
|
+
depth: 0,
|
|
183
|
+
inlineStyleRanges: [],
|
|
184
|
+
entityRanges: [],
|
|
185
|
+
data: {},
|
|
186
|
+
});
|
|
187
|
+
});
|
|
188
|
+
return draftStructure;
|
|
189
|
+
}
|
|
190
|
+
export var getRawText = function (draft, text) {
|
|
191
|
+
if (draft !== undefined) {
|
|
192
|
+
return draft;
|
|
193
|
+
}
|
|
194
|
+
else if (text !== undefined) {
|
|
195
|
+
return stringToDraft(text);
|
|
196
|
+
}
|
|
197
|
+
else {
|
|
198
|
+
return {
|
|
199
|
+
blocks: [
|
|
200
|
+
{
|
|
201
|
+
key: 'fudmo',
|
|
202
|
+
text: '',
|
|
203
|
+
type: 'unstyled',
|
|
204
|
+
depth: 0,
|
|
205
|
+
inlineStyleRanges: [],
|
|
206
|
+
entityRanges: [],
|
|
207
|
+
data: {},
|
|
208
|
+
},
|
|
209
|
+
],
|
|
210
|
+
entityMap: {},
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
};
|
package/dist/FormComponents/Step/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaStep.module.css
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
.container,
|
|
2
|
+
.textEditorContainer {
|
|
3
|
+
width: fit-content;
|
|
4
|
+
max-width: calc(100% - 20px);
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
padding: 10px;
|
|
8
|
+
padding-top: 5px;
|
|
9
|
+
width: calc(100% - 20px);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.textEditorContainer {
|
|
13
|
+
max-width: '100%';
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
}
|
|
17
|
+
.postViewContainer {
|
|
18
|
+
height: fit-content;
|
|
19
|
+
border-radius: 15px;
|
|
20
|
+
min-height: 265px;
|
|
21
|
+
width: 100%;
|
|
22
|
+
position: relative;
|
|
23
|
+
margin-bottom: 1px;
|
|
24
|
+
overflow: hidden;
|
|
25
|
+
}
|
|
26
|
+
.textContainer {
|
|
27
|
+
height: 100%;
|
|
28
|
+
border-radius: 15px;
|
|
29
|
+
height: 265px;
|
|
30
|
+
width: 100%;
|
|
31
|
+
position: relative;
|
|
32
|
+
margin-bottom: 1px;
|
|
33
|
+
overflow: hidden;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.editor {
|
|
37
|
+
margin: -5px 10px 0 10px;
|
|
38
|
+
height: calc(100% - 22px) !important;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.wrapper {
|
|
42
|
+
height: 100%;
|
|
43
|
+
border-radius: 15px;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.disabledCurtain {
|
|
47
|
+
position: absolute;
|
|
48
|
+
bottom: 0;
|
|
49
|
+
top: 0;
|
|
50
|
+
left: 0;
|
|
51
|
+
right: 0;
|
|
52
|
+
z-index: 2;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.errorMsg {
|
|
56
|
+
margin-top: 4px;
|
|
57
|
+
margin-bottom: 5px;
|
|
58
|
+
margin-left: 14px;
|
|
59
|
+
font-size: 0.75rem;
|
|
60
|
+
height: 0.75rem;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.textEditorLabel {
|
|
64
|
+
margin-left: 5px;
|
|
65
|
+
margin-bottom: 2px;
|
|
66
|
+
font-size: 1rem;
|
|
67
|
+
}
|
|
68
|
+
.print {
|
|
69
|
+
display: none;
|
|
70
|
+
}
|
|
71
|
+
.printContainer {
|
|
72
|
+
border-radius: 10px;
|
|
73
|
+
border: 1px solid black;
|
|
74
|
+
padding: 6px 12px;
|
|
75
|
+
width: calc(100% - 2);
|
|
76
|
+
font-size: 1rem;
|
|
77
|
+
min-height: 50px;
|
|
78
|
+
margin: 0px;
|
|
79
|
+
}
|
|
80
|
+
.erkTextArea {
|
|
81
|
+
position: relative;
|
|
82
|
+
width: 100%;
|
|
83
|
+
max-width: 100%;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
@media print {
|
|
87
|
+
.print {
|
|
88
|
+
display: block;
|
|
89
|
+
}
|
|
90
|
+
.erkTextArea {
|
|
91
|
+
display: none !important;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { TextArea } from '../../../@Types/FormStep';
|
|
3
|
+
import { StepProps } from '../Step';
|
|
4
|
+
export interface TextAreaStepProps extends StepProps {
|
|
5
|
+
/** The TextAreaStep to display */
|
|
6
|
+
step: TextArea;
|
|
7
|
+
maxLength?: number;
|
|
8
|
+
}
|
|
9
|
+
declare function TextAreaStep(props: TextAreaStepProps): JSX.Element;
|
|
10
|
+
export default TextAreaStep;
|
|
@@ -0,0 +1,23 @@
|
|
|
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 } from "react/jsx-runtime";
|
|
13
|
+
import { FormStyleTypes } from '../../../constants/FormStepTypes';
|
|
14
|
+
import MaterialTextAreaStep from './MaterialTextAreaStep/MaterialTextAreaStep';
|
|
15
|
+
function TextAreaStep(props) {
|
|
16
|
+
switch (props.formStyle.type) {
|
|
17
|
+
case FormStyleTypes.MATERIAL:
|
|
18
|
+
default: {
|
|
19
|
+
return _jsx(MaterialTextAreaStep, __assign({}, props));
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
export default TextAreaStep;
|
package/dist/FormComponents/Step/TextInputStep/MaterialTextInputStep/MaterialTextInputStep.d.ts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { TextInputStepProps } from '../TextInputStep';
|
|
3
|
+
declare function TextInputStep({ icon, step, form, errors, control, editable, postview, formStyle, widthStats, defaultValue, dependencyStore, setDependencyStore, }: TextInputStepProps): JSX.Element;
|
|
4
|
+
export default TextInputStep;
|