@arquimedes.co/eureka-forms 1.9.128 → 1.9.129
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/App.js +4 -2
- package/dist/{FormComponents/Form → Form}/ConfirmationDialog/ConfirmationDialog.d.ts +1 -1
- package/dist/{FormComponents/Form → Form}/Form.d.ts +19 -8
- package/dist/Form/Form.js +264 -0
- package/dist/Form/FormFunctions.d.ts +6 -0
- package/dist/Form/FormFunctions.js +200 -0
- package/dist/Form/FormTypes/ColumnForm/ColumnForm.d.ts +4 -0
- package/dist/Form/FormTypes/ColumnForm/ColumnForm.js +106 -0
- package/dist/{FormComponents/Form → Form/FormTypes}/StepperForm/StepperForm.d.ts +1 -1
- package/dist/{FormComponents → Form}/Section/MaterialSection/MaterialSection.js +1 -1
- package/dist/{FormComponents → Form}/Section/Section.d.ts +1 -4
- package/dist/{FormComponents → Form/Terms}/Term/MaterialTerm/MaterialTerm.js +2 -2
- package/dist/{FormComponents → Form/Terms}/Term/Term.d.ts +1 -1
- package/dist/{FormComponents → Form/Terms}/Term/Term.js +1 -1
- package/dist/Form/Terms/Terms.d.ts +4 -0
- package/dist/Form/Terms/Terms.js +36 -0
- package/dist/{FormComponents/Step → FormSteps}/@Construction/CBRElementStep/CBRElementStep.d.ts +1 -1
- package/dist/{FormComponents/Step → FormSteps}/@Construction/CBRElementStep/CBRElementStep.js +2 -2
- package/dist/{FormComponents/Step → FormSteps}/@Construction/CBRIncidentsStep/CBRIncidentsStep.d.ts +1 -1
- package/dist/{FormComponents/Step → FormSteps}/@Construction/CBRIncidentsStep/CBRIncidentsStep.js +1 -1
- package/dist/{FormComponents/Step → FormSteps}/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/MaterialCBRIncidentsStep.js +2 -2
- package/dist/{FormComponents/Step → FormSteps}/@Construction/CBRPropertyStep/CBRPropertyStep.d.ts +1 -1
- package/dist/{FormComponents/Step → FormSteps}/@Construction/CBRPropertyStep/CBRPropertyStep.js +2 -2
- package/dist/{FormComponents/Step → FormSteps}/AYFStepMapper.d.ts +1 -1
- package/dist/{FormComponents/Step → FormSteps}/AYFStepMapper.js +1 -1
- package/dist/{FormComponents/Step → FormSteps}/ApiSelectorStep/ApiSelectorStep.d.ts +1 -1
- package/dist/{FormComponents/Step → FormSteps}/ApiSelectorStep/ApiSelectorStep.js +1 -1
- package/dist/{FormComponents/Step → FormSteps}/ApiSelectorStep/MaterialApiSelectorStep/MaterialApiSelectorStep.js +4 -4
- package/dist/{FormComponents/Step → FormSteps}/CBRStepMapper.d.ts +1 -1
- package/dist/{FormComponents/Step → FormSteps}/CBRStepMapper.js +2 -2
- package/dist/{FormComponents/Step → FormSteps}/CheckBoxStep/CheckBoxStep.d.ts +1 -1
- package/dist/{FormComponents/Step → FormSteps}/CheckBoxStep/CheckBoxStep.js +1 -1
- package/dist/{FormComponents/Step → FormSteps}/CheckBoxStep/MaterialCheckBoxStep/MaterialCheckBoxStep.js +1 -1
- package/dist/{FormComponents/Step → FormSteps}/ClassifierSelectorStep/ClassifierSelectorStep.d.ts +1 -1
- package/dist/{FormComponents/Step → FormSteps}/ClassifierSelectorStep/ClassifierSelectorStep.js +1 -1
- package/dist/{FormComponents/Step → FormSteps}/ClassifierSelectorStep/MaterialClassifierSelectorStep/MaterialClassifierSelectorStep.js +2 -2
- package/dist/{FormComponents/Step → FormSteps}/CollapsibleStep/CollapsibleStep.d.ts +1 -1
- package/dist/{FormComponents/Step → FormSteps}/CollapsibleStep/CollapsibleStep.js +1 -1
- package/dist/{FormComponents/Step → FormSteps}/DatePickerStep/DatePickerStep.d.ts +1 -1
- package/dist/{FormComponents/Step → FormSteps}/DatePickerStep/DatePickerStep.js +1 -1
- package/dist/{FormComponents/Step → FormSteps}/DatePickerStep/MaterialDatePickerStep/MaterialDatePickerStep.js +1 -1
- package/dist/{FormComponents/Step → FormSteps}/EntityValueStep/EntityValuePickerStep.d.ts +1 -1
- package/dist/{FormComponents/Step → FormSteps}/EntityValueStep/EntityValuePickerStep.js +1 -1
- package/dist/{FormComponents/Step → FormSteps}/EntityValueStep/MaterialEntityValuePickerStep/MaterialEntityValuePickerStep.js +4 -4
- package/dist/{FormComponents/Step → FormSteps}/FileUploadStep/FileUploadStep.d.ts +1 -1
- package/dist/{FormComponents/Step → FormSteps}/FileUploadStep/FileUploadStep.js +1 -1
- package/dist/{FormComponents/Step → FormSteps}/FileUploadStep/MaterialFileUploadStep/FileComponent/FileComponent.d.ts +1 -1
- package/dist/{FormComponents/Step → FormSteps}/FileUploadStep/MaterialFileUploadStep/FileComponent/FileComponent.js +1 -1
- package/dist/{FormComponents/Step → FormSteps}/FileUploadStep/MaterialFileUploadStep/MaterialFileUploadStep.js +4 -4
- package/dist/{FormComponents/Step → FormSteps}/MapperStep/MapperStep.d.ts +1 -1
- package/dist/{FormComponents/Step → FormSteps}/MapperStep/MapperStep.js +1 -1
- package/dist/{FormComponents/Step → FormSteps}/MapperStep/MaterialMapperStep/Element/MapperElement.js +1 -1
- package/dist/{FormComponents/Step → FormSteps}/MapperStep/MaterialMapperStep/Element/PillMapperElement/PillMapperElement.js +3 -1
- package/dist/{FormComponents/Step → FormSteps}/MapperStep/MaterialMapperStep/MaterialMapperStep.d.ts +2 -1
- package/dist/{FormComponents/Step → FormSteps}/MapperStep/MaterialMapperStep/MaterialMapperStep.js +10 -18
- package/dist/{FormComponents/Step → FormSteps}/RatingStep/MaterialRatingStep/MaterialRatingStep.js +2 -2
- package/dist/{FormComponents/Step → FormSteps}/RatingStep/RatingStep.d.ts +1 -1
- package/dist/{FormComponents/Step → FormSteps}/RatingStep/RatingStep.js +1 -1
- package/dist/{FormComponents/Step → FormSteps}/SelectorStep/MaterialSelectorStep/MaterialSelectorStep.js +2 -2
- package/dist/{FormComponents/Step → FormSteps}/SelectorStep/SelectorStep.d.ts +1 -1
- package/dist/{FormComponents/Step → FormSteps}/SelectorStep/SelectorStep.js +1 -1
- package/dist/{FormComponents/Step → FormSteps}/SeparatorStep/SeparatorStep.d.ts +1 -1
- package/dist/{FormComponents/Step → FormSteps}/SeparatorStep/SeparatorStep.js +1 -1
- package/dist/{FormComponents/Step → FormSteps}/SmartSelectStep/MaterialSmartSelectStep/MaterialSmartSelectStep.js +1 -1
- package/dist/{FormComponents/Step → FormSteps}/SmartSelectStep/SmartSelectStep.d.ts +4 -4
- package/dist/{FormComponents/Step → FormSteps}/SmartSelectStep/SmartSelectStep.js +1 -1
- package/dist/{FormComponents/Step → FormSteps}/Step.d.ts +2 -2
- package/dist/{FormComponents/Step → FormSteps}/Step.js +1 -1
- package/dist/{FormComponents/Step → FormSteps}/StepFunctions.d.ts +2 -2
- package/dist/{FormComponents/Step → FormSteps}/StepFunctions.js +1 -1
- package/dist/{FormComponents/Step → FormSteps}/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaStep.js +1 -1
- package/dist/{FormComponents/Step → FormSteps}/TextAreaStep/TextAreaStep.d.ts +1 -1
- package/dist/{FormComponents/Step → FormSteps}/TextAreaStep/TextAreaStep.js +1 -1
- package/dist/{FormComponents/Step → FormSteps}/TextInputStep/MaterialTextInputStep/MaterialTextInputStep.js +1 -1
- package/dist/{FormComponents/Step → FormSteps}/TextInputStep/TextInputStep.d.ts +1 -1
- package/dist/{FormComponents/Step → FormSteps}/TextInputStep/TextInputStep.js +1 -1
- package/dist/{FormComponents/Step → FormSteps}/TitleStep/TitleStep.d.ts +1 -1
- package/dist/{FormComponents/Step → FormSteps}/TitleStep/TitleStep.js +1 -1
- package/dist/Widget.js +0 -2
- package/dist/index.js +0 -2
- package/dist/index.lib.d.ts +2 -2
- package/dist/index.lib.js +1 -1
- package/dist/shared/RoundedDatePicker/RoundedDatePicker.js +1 -1
- package/package.json +1 -1
- package/dist/FormComponents/Form/ColumnForm/ColumnForm.d.ts +0 -15
- package/dist/FormComponents/Form/ColumnForm/ColumnForm.js +0 -411
- package/dist/FormComponents/Form/Form.js +0 -147
- /package/dist/{FormComponents/Form → Form}/ConfirmationDialog/ConfirmationDialog.js +0 -0
- /package/dist/{FormComponents/Form → Form}/ConfirmationDialog/ConfirmationDialog.module.css +0 -0
- /package/dist/{FormComponents/Form → Form}/Form.module.css +0 -0
- /package/dist/{FormComponents/Form → Form/FormTypes}/ColumnForm/ColumnForm.module.css +0 -0
- /package/dist/{FormComponents/Form → Form/FormTypes}/StepperForm/StepperForm.js +0 -0
- /package/dist/{FormComponents/Form → Form/FormTypes}/StepperForm/StepperForm.module.css +0 -0
- /package/dist/{FormComponents → Form}/Section/MaterialSection/MaterialSection.d.ts +0 -0
- /package/dist/{FormComponents → Form}/Section/MaterialSection/MaterialSection.module.css +0 -0
- /package/dist/{FormComponents → Form}/Section/Section.js +0 -0
- /package/dist/{FormComponents → Form/Terms}/Term/MaterialTerm/MaterialTerm.d.ts +0 -0
- /package/dist/{FormComponents → Form/Terms}/Term/MaterialTerm/MaterialTerm.module.css +0 -0
- /package/dist/{FormComponents/Step → FormSteps}/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/Incident/Incident.d.ts +0 -0
- /package/dist/{FormComponents/Step → FormSteps}/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/Incident/Incident.js +0 -0
- /package/dist/{FormComponents/Step → FormSteps}/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/Incident/Incident.module.css +0 -0
- /package/dist/{FormComponents/Step → FormSteps}/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/MaterialCBRIncidentsStep.d.ts +0 -0
- /package/dist/{FormComponents/Step → FormSteps}/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/MaterialCBRIncidentsStep.module.css +0 -0
- /package/dist/{FormComponents/Step → FormSteps}/@Construction/CBRPropertyStep/CBRPropertyStep.module.css +0 -0
- /package/dist/{FormComponents/Step → FormSteps}/ApiSelectorStep/MaterialApiSelectorStep/MaterialApiSelectorStep.d.ts +0 -0
- /package/dist/{FormComponents/Step → FormSteps}/ApiSelectorStep/MaterialApiSelectorStep/MaterialApiSelectorStep.module.css +0 -0
- /package/dist/{FormComponents/Step → FormSteps}/CheckBoxStep/MaterialCheckBoxStep/MaterialCheckBoxStep.d.ts +0 -0
- /package/dist/{FormComponents/Step → FormSteps}/CheckBoxStep/MaterialCheckBoxStep/MaterialCheckBoxStep.module.css +0 -0
- /package/dist/{FormComponents/Step → FormSteps}/ClassifierSelectorStep/MaterialClassifierSelectorStep/MaterialClassifierSelectorStep.d.ts +0 -0
- /package/dist/{FormComponents/Step → FormSteps}/ClassifierSelectorStep/MaterialClassifierSelectorStep/MaterialClassifierSelectorStep.module.css +0 -0
- /package/dist/{FormComponents/Step → FormSteps}/CollapsibleStep/MaterialTitleStep/MaterialCollapsibleStep.d.ts +0 -0
- /package/dist/{FormComponents/Step → FormSteps}/CollapsibleStep/MaterialTitleStep/MaterialCollapsibleStep.js +0 -0
- /package/dist/{FormComponents/Step → FormSteps}/CollapsibleStep/MaterialTitleStep/MaterialCollapsibleStep.module.css +0 -0
- /package/dist/{FormComponents/Step → FormSteps}/DatePickerStep/MaterialDatePickerStep/MaterialDatePickerStep.d.ts +0 -0
- /package/dist/{FormComponents/Step → FormSteps}/DatePickerStep/MaterialDatePickerStep/MaterialDatePickerStep.module.css +0 -0
- /package/dist/{FormComponents/Step → FormSteps}/EntityValueStep/MaterialEntityValuePickerStep/MaterialEntityValuePickerStep.d.ts +0 -0
- /package/dist/{FormComponents/Step → FormSteps}/EntityValueStep/MaterialEntityValuePickerStep/MaterialEntityValuePickerStep.module.css +0 -0
- /package/dist/{FormComponents/Step → FormSteps}/FileUploadStep/MaterialFileUploadStep/FileComponent/FileComponent.module.css +0 -0
- /package/dist/{FormComponents/Step → FormSteps}/FileUploadStep/MaterialFileUploadStep/MaterialFileUploadStep.d.ts +0 -0
- /package/dist/{FormComponents/Step → FormSteps}/FileUploadStep/MaterialFileUploadStep/MaterialFileUploadStep.module.css +0 -0
- /package/dist/{FormComponents/Step → FormSteps}/MapperStep/MaterialMapperStep/Element/ListMapperElement/ListMapperElement.d.ts +0 -0
- /package/dist/{FormComponents/Step → FormSteps}/MapperStep/MaterialMapperStep/Element/ListMapperElement/ListMapperElement.js +0 -0
- /package/dist/{FormComponents/Step → FormSteps}/MapperStep/MaterialMapperStep/Element/ListMapperElement/ListMapperElement.module.css +0 -0
- /package/dist/{FormComponents/Step → FormSteps}/MapperStep/MaterialMapperStep/Element/MapperElement.d.ts +0 -0
- /package/dist/{FormComponents/Step → FormSteps}/MapperStep/MaterialMapperStep/Element/PillMapperElement/PillMapperElement.d.ts +0 -0
- /package/dist/{FormComponents/Step → FormSteps}/MapperStep/MaterialMapperStep/Element/PillMapperElement/PillMapperElement.module.css +0 -0
- /package/dist/{FormComponents/Step → FormSteps}/MapperStep/MaterialMapperStep/MaterialMapperStep.module.css +0 -0
- /package/dist/{FormComponents/Step → FormSteps}/RatingStep/MaterialRatingStep/MaterialRatingStep.d.ts +0 -0
- /package/dist/{FormComponents/Step → FormSteps}/RatingStep/MaterialRatingStep/MaterialRatingStep.module.css +0 -0
- /package/dist/{FormComponents/Step → FormSteps}/SelectorStep/MaterialSelectorStep/MaterialSelectorStep.d.ts +0 -0
- /package/dist/{FormComponents/Step → FormSteps}/SelectorStep/MaterialSelectorStep/MaterialSelectorStep.module.css +0 -0
- /package/dist/{FormComponents/Step → FormSteps}/SeparatorStep/MaterialSeparatorStep/MaterialSeparatorStep.d.ts +0 -0
- /package/dist/{FormComponents/Step → FormSteps}/SeparatorStep/MaterialSeparatorStep/MaterialSeparatorStep.js +0 -0
- /package/dist/{FormComponents/Step → FormSteps}/SeparatorStep/MaterialSeparatorStep/MaterialSeparatorStep.module.css +0 -0
- /package/dist/{FormComponents/Step → FormSteps}/SmartSelectStep/MaterialSmartSelectStep/MaterialSmartSelectStep.d.ts +0 -0
- /package/dist/{FormComponents/Step → FormSteps}/SmartSelectStep/MaterialSmartSelectStep/MaterialSmartSelectStep.module.css +0 -0
- /package/dist/{FormComponents/Step → FormSteps}/TextAreaStep/MaterialTextAreaStep/DraftEditor.css +0 -0
- /package/dist/{FormComponents/Step → FormSteps}/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaStep.d.ts +0 -0
- /package/dist/{FormComponents/Step → FormSteps}/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaStep.module.css +0 -0
- /package/dist/{FormComponents/Step → FormSteps}/TextInputStep/MaterialTextInputStep/MaterialTextInputStep.d.ts +0 -0
- /package/dist/{FormComponents/Step → FormSteps}/TextInputStep/MaterialTextInputStep/MaterialTextInputStep.module.css +0 -0
- /package/dist/{FormComponents/Step → FormSteps}/TitleStep/MaterialTitleStep/MaterialTitleStep.d.ts +0 -0
- /package/dist/{FormComponents/Step → FormSteps}/TitleStep/MaterialTitleStep/MaterialTitleStep.js +0 -0
- /package/dist/{FormComponents/Step → FormSteps}/TitleStep/MaterialTitleStep/MaterialTitleStep.module.css +0 -0
|
@@ -21,7 +21,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
21
21
|
return t;
|
|
22
22
|
};
|
|
23
23
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
|
-
import { FormStyleTypes } from '
|
|
24
|
+
import { FormStyleTypes } from '../../constants/FormStepTypes';
|
|
25
25
|
import MaterialMapperStep from './MaterialMapperStep/MaterialMapperStep';
|
|
26
26
|
function MapperStep(_a) {
|
|
27
27
|
var step = _a.step, formStyle = _a.formStyle, others = __rest(_a, ["step", "formStyle"]);
|
|
@@ -12,7 +12,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
12
12
|
import { createElement as _createElement } from "react";
|
|
13
13
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
14
|
import StepComponent from '../../../Step';
|
|
15
|
-
import { MapperStyleTypes } from '
|
|
15
|
+
import { MapperStyleTypes } from '../../../../constants/FormStepTypes';
|
|
16
16
|
import ListMapperElement from './ListMapperElement/ListMapperElement';
|
|
17
17
|
import PillMapperElement from './PillMapperElement/PillMapperElement';
|
|
18
18
|
import React from 'react';
|
|
@@ -13,7 +13,9 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
13
13
|
import styles from './PillMapperElement.module.css';
|
|
14
14
|
import DeleteRoundedIcon from '@material-ui/icons/DeleteRounded';
|
|
15
15
|
function PillMapperElement(_a) {
|
|
16
|
+
var _b;
|
|
16
17
|
var step = _a.step, form = _a.form, num = _a.num, loading = _a.loading, element = _a.element, children = _a.children, editable = _a.editable, postview = _a.postview, formStyle = _a.formStyle, handleDelete = _a.handleDelete, widthStats = _a.widthStats, customElementModifiers = _a.customElementModifiers, customElementRender = _a.customElementRender;
|
|
18
|
+
var deletable = (_b = step.deletable) !== null && _b !== void 0 ? _b : true;
|
|
17
19
|
var size = form.size;
|
|
18
20
|
var calcName = (customElementModifiers !== null && customElementModifiers !== void 0 ? customElementModifiers : {}).calcName;
|
|
19
21
|
var name = calcName
|
|
@@ -28,7 +30,7 @@ function PillMapperElement(_a) {
|
|
|
28
30
|
: styles.container }, { children: _jsxs("div", __assign({ className: styles.contentContainer, style: {
|
|
29
31
|
width: (size.blockSize + size.spacingSize) *
|
|
30
32
|
((_b = (_a = step.style) === null || _a === void 0 ? void 0 : _a.size) !== null && _b !== void 0 ? _b : size.blockNum - 1),
|
|
31
|
-
} }, { children: [name && (_jsx("div", __assign({ className: styles.titleLbl, style: { color: formStyle.textColor } }, { children: loading ? 'Cargando...' : name + ':' }))), _jsxs("div", __assign({ className: styles.btnsContainer }, { children: [renderElementButtons === null || renderElementButtons === void 0 ? void 0 : renderElementButtons(element),
|
|
33
|
+
} }, { children: [name && (_jsx("div", __assign({ className: styles.titleLbl, style: { color: formStyle.textColor } }, { children: loading ? 'Cargando...' : name + ':' }))), _jsxs("div", __assign({ className: styles.btnsContainer }, { children: [renderElementButtons === null || renderElementButtons === void 0 ? void 0 : renderElementButtons(element), (deletable || !element.isOriginal) && (_jsx("div", __assign({ className: !editable || postview
|
|
32
34
|
? styles.disabledDeleteBtn
|
|
33
35
|
: styles.deleteBtn, style: { color: formStyle.textColor }, onClick: function () {
|
|
34
36
|
if (editable && !postview) {
|
package/dist/{FormComponents/Step → FormSteps}/MapperStep/MaterialMapperStep/MaterialMapperStep.d.ts
RENAMED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { MapperStepProps } from '../MapperStep';
|
|
3
3
|
export interface MapperElement<Type> {
|
|
4
|
-
ids: Record<string, string>;
|
|
5
4
|
id: string;
|
|
5
|
+
ids: Record<string, string>;
|
|
6
6
|
deleted?: boolean;
|
|
7
7
|
value?: Type;
|
|
8
8
|
originalValues: Record<string, any>;
|
|
9
|
+
isOriginal: boolean;
|
|
9
10
|
}
|
|
10
11
|
export declare function ElementsComponent<Type = any>({ step, form, errors, inputRef, editable, postview, elements, formStyle, customAdd, loading, dependencyStore, setDependencyStore, ...others }: MapperStepProps<Type> & {
|
|
11
12
|
loading?: boolean;
|
package/dist/{FormComponents/Step → FormSteps}/MapperStep/MaterialMapperStep/MaterialMapperStep.js
RENAMED
|
@@ -34,14 +34,14 @@ import { createElement as _createElement } from "react";
|
|
|
34
34
|
import React, { useState, useEffect, cloneElement } from 'react';
|
|
35
35
|
import styles from './MaterialMapperStep.module.css';
|
|
36
36
|
import { Controller } from 'react-hook-form';
|
|
37
|
-
import StepTypes, { ClassifierOptionTypes, EntityValueDataTypes, EntityValueOptionTypes, MapperStyleTypes, OptionTypes, } from '
|
|
38
|
-
import RoundedButton from '
|
|
37
|
+
import StepTypes, { ClassifierOptionTypes, EntityValueDataTypes, EntityValueOptionTypes, MapperStyleTypes, OptionTypes, } from '../../../constants/FormStepTypes';
|
|
38
|
+
import RoundedButton from '../../../shared/RoundedButton/RoundedButton';
|
|
39
39
|
import { nanoid } from 'nanoid';
|
|
40
|
-
import { calcStepDependencyValue, } from '../../../Form/ColumnForm/ColumnForm';
|
|
41
40
|
import MapperElementComponent from './Element/MapperElement';
|
|
42
|
-
import AYFFormStepTypes from '
|
|
43
|
-
import CBRFormStepTypes from '
|
|
44
|
-
import { addInitialMapper } from '
|
|
41
|
+
import AYFFormStepTypes from '../../../constants/AYFFormStepTypes';
|
|
42
|
+
import CBRFormStepTypes from '../../../constants/CBRFormStepTypes';
|
|
43
|
+
import { addInitialMapper } from '../../../App';
|
|
44
|
+
import { calcStepDependency } from '../../../Form/FormFunctions';
|
|
45
45
|
export function ElementsComponent(_a) {
|
|
46
46
|
var _b, _c;
|
|
47
47
|
var step = _a.step, form = _a.form, errors = _a.errors, inputRef = _a.inputRef, editable = _a.editable, postview = _a.postview, elements = _a.elements, formStyle = _a.formStyle, customAdd = _a.customAdd, _d = _a.loading, loading = _d === void 0 ? false : _d, dependencyStore = _a.dependencyStore, setDependencyStore = _a.setDependencyStore, others = __rest(_a, ["step", "form", "errors", "inputRef", "editable", "postview", "elements", "formStyle", "customAdd", "loading", "dependencyStore", "setDependencyStore"]);
|
|
@@ -99,6 +99,7 @@ export function ElementsComponent(_a) {
|
|
|
99
99
|
ids: {},
|
|
100
100
|
id: idElement,
|
|
101
101
|
originalValues: {},
|
|
102
|
+
isOriginal: false,
|
|
102
103
|
};
|
|
103
104
|
if (value)
|
|
104
105
|
newElement.value = value;
|
|
@@ -188,10 +189,7 @@ function calcRecursiveData(element, newSteps, deps, customSteps, originalValues)
|
|
|
188
189
|
var newId = element.ids[idDep];
|
|
189
190
|
if (newId) {
|
|
190
191
|
step.dependencies[i] = newId;
|
|
191
|
-
deps[newId] =
|
|
192
|
-
type: newSteps[newId].type,
|
|
193
|
-
value: calcStepDependencyValue(newSteps[newId], originalValues),
|
|
194
|
-
};
|
|
192
|
+
deps[newId] = calcStepDependency(newId, newSteps, originalValues, customSteps);
|
|
195
193
|
}
|
|
196
194
|
}
|
|
197
195
|
}
|
|
@@ -269,10 +267,7 @@ function calcRecursiveData(element, newSteps, deps, customSteps, originalValues)
|
|
|
269
267
|
var newId = element.ids[path.idStep];
|
|
270
268
|
if (newId) {
|
|
271
269
|
path.idStep = newId;
|
|
272
|
-
deps[newId] =
|
|
273
|
-
type: newSteps[newId].type,
|
|
274
|
-
value: calcStepDependencyValue(newSteps[newId], originalValues),
|
|
275
|
-
};
|
|
270
|
+
deps[newId] = calcStepDependency(newId, newSteps, originalValues, customSteps);
|
|
276
271
|
}
|
|
277
272
|
break;
|
|
278
273
|
default:
|
|
@@ -286,10 +281,7 @@ function calcRecursiveData(element, newSteps, deps, customSteps, originalValues)
|
|
|
286
281
|
var newId = element.ids[filter.idStep];
|
|
287
282
|
if (newId) {
|
|
288
283
|
filter.idStep = newId;
|
|
289
|
-
deps[newId] =
|
|
290
|
-
type: newSteps[newId].type,
|
|
291
|
-
value: calcStepDependencyValue(newSteps[newId], originalValues),
|
|
292
|
-
};
|
|
284
|
+
deps[newId] = calcStepDependency(newId, newSteps, originalValues, customSteps);
|
|
293
285
|
}
|
|
294
286
|
break;
|
|
295
287
|
default:
|
package/dist/{FormComponents/Step → FormSteps}/RatingStep/MaterialRatingStep/MaterialRatingStep.js
RENAMED
|
@@ -25,8 +25,8 @@ import { createElement as _createElement } from "react";
|
|
|
25
25
|
import styles from './MaterialRatingStep.module.css';
|
|
26
26
|
import { Controller } from 'react-hook-form';
|
|
27
27
|
import React from 'react';
|
|
28
|
-
import Rating from '
|
|
29
|
-
import { RatingTypes } from '
|
|
28
|
+
import Rating from '../../../shared/Rating/Rating';
|
|
29
|
+
import { RatingTypes } from '../../../constants/FormStepTypes';
|
|
30
30
|
import StepComponent from '../../Step';
|
|
31
31
|
function MaterialRatingStep(_a) {
|
|
32
32
|
var _b, _c, _d, _e, _f;
|
|
@@ -10,7 +10,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
-
import { FormStyleTypes } from '
|
|
13
|
+
import { FormStyleTypes } from '../../constants/FormStepTypes';
|
|
14
14
|
import MaterialRatingStep from './MaterialRatingStep/MaterialRatingStep';
|
|
15
15
|
function RatingStep(props) {
|
|
16
16
|
switch (props.formStyle.type) {
|
|
@@ -23,12 +23,12 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
23
23
|
import { createElement as _createElement } from "react";
|
|
24
24
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
25
25
|
import React, { useState } from 'react';
|
|
26
|
-
import { OptionTypes } from '
|
|
26
|
+
import { OptionTypes } from '../../../constants/FormStepTypes';
|
|
27
27
|
import styles from './MaterialSelectorStep.module.css';
|
|
28
28
|
import StepComponent from '../../Step';
|
|
29
29
|
import { calcFillerSize, calcStepWidth } from '../../StepFunctions';
|
|
30
30
|
import { Controller } from 'react-hook-form';
|
|
31
|
-
import RoundedSmartSelect from '
|
|
31
|
+
import RoundedSmartSelect from '../../../shared/RoundedSmartSelect/RoundedSmartSelect';
|
|
32
32
|
function Selector(_a) {
|
|
33
33
|
var step = _a.step, form = _a.form, value = _a.value, level = _a.level, onBlur = _a.onBlur, control = _a.control, editable = _a.editable, onChange = _a.onChange, postview = _a.postview, formStyle = _a.formStyle, getValues = _a.getValues, widthStats = _a.widthStats, handleSizeChange = _a.handleSizeChange, errors = _a.errors, inputRef = _a.inputRef, others = __rest(_a, ["step", "form", "value", "level", "onBlur", "control", "editable", "onChange", "postview", "formStyle", "getValues", "widthStats", "handleSizeChange", "errors", "inputRef"]);
|
|
34
34
|
var _b = useState(level === 0
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { FormSelector } from '
|
|
2
|
+
import { FormSelector } from '../../@Types/FormStep';
|
|
3
3
|
import { StepProps } from '../Step';
|
|
4
4
|
export interface SelectorStepProps extends StepProps {
|
|
5
5
|
/** The SelectorStep to display */
|
|
@@ -21,7 +21,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
21
21
|
return t;
|
|
22
22
|
};
|
|
23
23
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
|
-
import { FormStyleTypes } from '
|
|
24
|
+
import { FormStyleTypes } from '../../constants/FormStepTypes';
|
|
25
25
|
import MaterialSelectorStep from './MaterialSelectorStep/MaterialSelectorStep';
|
|
26
26
|
function SelectorStep(_a) {
|
|
27
27
|
var formStyle = _a.formStyle, others = __rest(_a, ["formStyle"]);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { Separator } from '
|
|
2
|
+
import { Separator } from '../../@Types/FormStep';
|
|
3
3
|
import { StepProps } from '../Step';
|
|
4
4
|
export interface SeparatorStepProps extends StepProps {
|
|
5
5
|
/** The TitleStep to display */
|
|
@@ -21,7 +21,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
21
21
|
return t;
|
|
22
22
|
};
|
|
23
23
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
|
-
import { FormStyleTypes } from '
|
|
24
|
+
import { FormStyleTypes } from '../../constants/FormStepTypes';
|
|
25
25
|
import MaterialSeparatorStep from './MaterialSeparatorStep/MaterialSeparatorStep';
|
|
26
26
|
function SeparatorStep(_a) {
|
|
27
27
|
var step = _a.step, formStyle = _a.formStyle, others = __rest(_a, ["step", "formStyle"]);
|
|
@@ -69,7 +69,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
69
69
|
import styles from './MaterialSmartSelectStep.module.css';
|
|
70
70
|
import { Controller } from 'react-hook-form';
|
|
71
71
|
import { calcStepWidth } from '../../StepFunctions';
|
|
72
|
-
import RoundedSmartSelect from '
|
|
72
|
+
import RoundedSmartSelect from '../../../shared/RoundedSmartSelect/RoundedSmartSelect';
|
|
73
73
|
import { cloneElement, useEffect, useState } from 'react';
|
|
74
74
|
import React from 'react';
|
|
75
75
|
export function SmartSelect(_a) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { StepProps } from '../Step';
|
|
3
|
-
import { GSmartSelect } from '
|
|
4
|
-
import { Organization } from '
|
|
5
|
-
import { FormStep } from '
|
|
6
|
-
import { DependencyStore } from '../../Form/
|
|
3
|
+
import { GSmartSelect } from '../../@Types/GenericFormSteps';
|
|
4
|
+
import { Organization } from '../../@Types';
|
|
5
|
+
import { FormStep } from '../../@Types/FormStep';
|
|
6
|
+
import { DependencyStore } from '../../Form/Form';
|
|
7
7
|
export interface SmartSelectStepProps extends Omit<StepProps, 'step'> {
|
|
8
8
|
/** The SmartSelectStep to display */
|
|
9
9
|
step: GSmartSelect;
|
|
@@ -10,7 +10,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
-
import { FormStyleTypes } from '
|
|
13
|
+
import { FormStyleTypes } from '../../constants/FormStepTypes';
|
|
14
14
|
import MaterialSmartSelectStep from './MaterialSmartSelectStep/MaterialSmartSelectStep';
|
|
15
15
|
function SmartSelectStep(props) {
|
|
16
16
|
switch (props.formStyle.type) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { FormStep } from '
|
|
3
|
-
import { RecursiveData } from '../Section/Section';
|
|
2
|
+
import { FormStep } from '../@Types/FormStep';
|
|
3
|
+
import { RecursiveData } from '../Form/Section/Section';
|
|
4
4
|
export interface StepProps extends RecursiveData {
|
|
5
5
|
step: FormStep;
|
|
6
6
|
handleSizeChange?: Function;
|
|
@@ -21,7 +21,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
21
21
|
return t;
|
|
22
22
|
};
|
|
23
23
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
|
-
import Types from '
|
|
24
|
+
import Types from '../constants/FormStepTypes';
|
|
25
25
|
import SelectorStep from './SelectorStep/SelectorStep';
|
|
26
26
|
import SeparatorStep from './SeparatorStep/SeparatorStep';
|
|
27
27
|
import TextInputStep from './TextInputStep/TextInputStep';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { FormSize } from '
|
|
2
|
-
import { ApiSelector, CheckBox, ClassifierSelector, EntityValuePicker, FormSelector, FormStep } from '
|
|
1
|
+
import { FormSize } from '../@Types/Form';
|
|
2
|
+
import { ApiSelector, CheckBox, ClassifierSelector, EntityValuePicker, FormSelector, FormStep } from '../@Types/FormStep';
|
|
3
3
|
export declare function calcFillerSize(step: FormSelector | ClassifierSelector | EntityValuePicker | ApiSelector | CheckBox, steps: Record<string, FormStep>, values: Record<string, unknown>, size: FormSize): number;
|
|
4
4
|
export declare function recursivelyCheckOpenSize(idStep: string, steps: Record<string, FormStep>, values: Record<string, any>): number;
|
|
5
5
|
export declare const calcStepWidth: (stepSize: 1 | 2 | 3 | 4, size: FormSize) => number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import Types, { ApiSelectorOptionTypes, ClassifierOptionTypes, EntityValueOptionTypes, OptionTypes, } from '
|
|
1
|
+
import Types, { ApiSelectorOptionTypes, ClassifierOptionTypes, EntityValueOptionTypes, OptionTypes, } from '../constants/FormStepTypes';
|
|
2
2
|
export function calcFillerSize(step, steps, values, size) {
|
|
3
3
|
var _a;
|
|
4
4
|
var maxSize = (_a = step.maxSize) !== null && _a !== void 0 ? _a : size.blockNum;
|
|
@@ -21,7 +21,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
21
21
|
return t;
|
|
22
22
|
};
|
|
23
23
|
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
24
|
-
import RoundedTextField from '
|
|
24
|
+
import RoundedTextField from '../../../shared/RoundedTextField/RoundedTextField';
|
|
25
25
|
import styles from './MaterialTextAreaStep.module.css';
|
|
26
26
|
import { Controller } from 'react-hook-form';
|
|
27
27
|
import { Editor } from 'react-draft-wysiwyg'; //Load programatically only if step has editor
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { TextArea } from '
|
|
2
|
+
import { TextArea } from '../../@Types/FormStep';
|
|
3
3
|
import { StepProps } from '../Step';
|
|
4
4
|
export interface TextAreaStepProps extends StepProps {
|
|
5
5
|
/** The TextAreaStep to display */
|
|
@@ -10,7 +10,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
-
import { FormStyleTypes } from '
|
|
13
|
+
import { FormStyleTypes } from '../../constants/FormStepTypes';
|
|
14
14
|
import MaterialTextAreaStep from './MaterialTextAreaStep/MaterialTextAreaStep';
|
|
15
15
|
function TextAreaStep(props) {
|
|
16
16
|
switch (props.formStyle.type) {
|
|
@@ -21,7 +21,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
21
21
|
return t;
|
|
22
22
|
};
|
|
23
23
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
|
-
import RoundedTextField from '
|
|
24
|
+
import RoundedTextField from '../../../shared/RoundedTextField/RoundedTextField';
|
|
25
25
|
import styles from './MaterialTextInputStep.module.css';
|
|
26
26
|
import { Controller } from 'react-hook-form';
|
|
27
27
|
import { calcStepWidth } from '../../StepFunctions';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { TextInput } from '
|
|
2
|
+
import { TextInput } from '../../@Types/FormStep';
|
|
3
3
|
import { StepProps } from '../Step';
|
|
4
4
|
export interface TextInputStepProps extends StepProps {
|
|
5
5
|
/** The TextInputStep to display */
|
|
@@ -10,7 +10,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
-
import { FormStyleTypes } from '
|
|
13
|
+
import { FormStyleTypes } from '../../constants/FormStepTypes';
|
|
14
14
|
import MaterialTextInputStep from './MaterialTextInputStep/MaterialTextInputStep';
|
|
15
15
|
function TextInputStep(props) {
|
|
16
16
|
switch (props.formStyle.type) {
|
|
@@ -21,7 +21,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
21
21
|
return t;
|
|
22
22
|
};
|
|
23
23
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
|
-
import { FormStyleTypes } from '
|
|
24
|
+
import { FormStyleTypes } from '../../constants/FormStepTypes';
|
|
25
25
|
import MaterialTitleStep from './MaterialTitleStep/MaterialTitleStep';
|
|
26
26
|
function TitleStep(_a) {
|
|
27
27
|
var step = _a.step, formStyle = _a.formStyle, others = __rest(_a, ["step", "formStyle"]);
|
package/dist/Widget.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -19,8 +19,6 @@ var dataValues = undefined;
|
|
|
19
19
|
if (values) {
|
|
20
20
|
try {
|
|
21
21
|
dataValues = JSON.parse(decodeURIComponent(values));
|
|
22
|
-
// eslint-disable-next-line no-console
|
|
23
|
-
console.log('DATA:', dataValues);
|
|
24
22
|
}
|
|
25
23
|
catch (error) {
|
|
26
24
|
console.error('Invalid data-values JSON', error);
|
package/dist/index.lib.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import EurekaForm, { AppProps as EurekaFormProps } from './App';
|
|
2
|
-
import { StepProps } from './
|
|
3
|
-
import * as StepFunctions from './
|
|
2
|
+
import { StepProps } from './FormSteps/Step';
|
|
3
|
+
import * as StepFunctions from './FormSteps/StepFunctions';
|
|
4
4
|
export type { StepProps, EurekaFormProps };
|
|
5
5
|
export { EurekaForm, StepFunctions };
|
|
6
6
|
export default EurekaForm;
|
package/dist/index.lib.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import EurekaForm from './App';
|
|
2
|
-
import * as StepFunctions from './
|
|
2
|
+
import * as StepFunctions from './FormSteps/StepFunctions';
|
|
3
3
|
export { EurekaForm, StepFunctions };
|
|
4
4
|
export default EurekaForm;
|
|
5
5
|
export { default as ReactFromModule } from 'react';
|
|
@@ -40,7 +40,7 @@ import React, { cloneElement } from 'react';
|
|
|
40
40
|
import { makeStyles } from '@material-ui/core/styles';
|
|
41
41
|
import CalendarTodayRoundedIcon from '@material-ui/icons/CalendarTodayRounded';
|
|
42
42
|
import { DatePicker, DateTimePicker, } from '@material-ui/pickers';
|
|
43
|
-
import { getLocale } from '../../
|
|
43
|
+
import { getLocale } from '../../Form/Form';
|
|
44
44
|
import { format } from 'date-fns';
|
|
45
45
|
var useDatePickerStyles = function (props) {
|
|
46
46
|
return makeStyles(function () { return ({
|
package/package.json
CHANGED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { FormComponentProps } from '../Form';
|
|
3
|
-
import Types from '../../../constants/FormStepTypes';
|
|
4
|
-
import { CustomStep } from '../../../App';
|
|
5
|
-
import { FormStep } from '../../../@Types/FormStep';
|
|
6
|
-
export interface StepDependency {
|
|
7
|
-
value: any | undefined;
|
|
8
|
-
type: Types | 'ORIGINAL';
|
|
9
|
-
empty?: boolean;
|
|
10
|
-
}
|
|
11
|
-
export type DependencyStore = Record<string, StepDependency>;
|
|
12
|
-
declare function ColumnForm({ form, apiKey, reload, domain, postview, internal, formStyle, sendLabel, widthStats, customSteps, customSend, customSubmit, handleLoaded, originalValues, ...others }: FormComponentProps): JSX.Element;
|
|
13
|
-
export default ColumnForm;
|
|
14
|
-
export declare const calcValue: (idStep: string, steps: Record<string, FormStep>, values: Record<string, any>, customSteps: Record<string, CustomStep>, deleteIds: string[], value?: any) => any;
|
|
15
|
-
export declare function calcStepDependencyValue(depStep: FormStep, originalValues: Record<string, any>, customSteps?: Record<string, CustomStep>): StepDependency['value'];
|