@arquimedes.co/eureka-forms 1.9.80-test → 1.9.82-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/App.d.ts +5 -1
- package/dist/App.js +4 -4
- package/dist/FormComponents/Form/ColumnForm/ColumnForm.d.ts +1 -0
- package/dist/FormComponents/Form/ColumnForm/ColumnForm.js +1 -1
- package/dist/FormComponents/Form/Form.d.ts +1 -0
- package/dist/FormComponents/Section/Section.d.ts +1 -0
- package/package.json +1 -1
package/dist/App.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { Classifier, Form } from './@Types/Form';
|
|
3
|
+
import { FormStep } from './@Types/FormStep';
|
|
3
4
|
export interface AppProps {
|
|
4
5
|
/** If the app is currently a widget */
|
|
5
6
|
isWidget?: boolean;
|
|
@@ -25,6 +26,8 @@ export interface AppProps {
|
|
|
25
26
|
valuesData?: Record<string, unknown>;
|
|
26
27
|
/** Custom steps to display */
|
|
27
28
|
customSteps?: Record<string, CustomStep>;
|
|
29
|
+
/** Custom steps to display */
|
|
30
|
+
customStepProps?: Record<string, any>;
|
|
28
31
|
/** Classifiers dict */
|
|
29
32
|
classifiers?: Record<string, Classifier>;
|
|
30
33
|
/** Custom function to call on send */
|
|
@@ -44,7 +47,7 @@ export interface CustomStep {
|
|
|
44
47
|
calcRecursiveData?: (step: any, ids: Record<string, string>) => void;
|
|
45
48
|
calcDependencyValue?: (step: any, value: any) => any;
|
|
46
49
|
}
|
|
47
|
-
declare function App({ apiKey, domain, preview, partial, formData, postview, editable, isWidget, internal, valuesData, customSend, customSteps, classifiers, handleConfirmed, ...others }: AppProps): JSX.Element;
|
|
50
|
+
declare function App({ apiKey, domain, preview, partial, formData, postview, editable, isWidget, internal, valuesData, customSend, customSteps, classifiers, handleConfirmed, customStepProps, ...others }: AppProps): JSX.Element;
|
|
48
51
|
export default App;
|
|
49
52
|
export declare enum SIZES {
|
|
50
53
|
SMALL = "SMALL",
|
|
@@ -56,3 +59,4 @@ export declare const SizesToNum: {
|
|
|
56
59
|
MEDIUM: number;
|
|
57
60
|
SMALL: number;
|
|
58
61
|
};
|
|
62
|
+
export declare const mapOriginalValue: (step: FormStep, value: any, form?: Form) => any;
|
package/dist/App.js
CHANGED
|
@@ -74,7 +74,7 @@ import { stringToDraft, getRawText, } from './FormComponents/Step/TextAreaStep/M
|
|
|
74
74
|
function App(_a) {
|
|
75
75
|
var _this = this;
|
|
76
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, others = __rest(_a, ["apiKey", "domain", "preview", "partial", "formData", "postview", "editable", "isWidget", "internal", "valuesData", "customSend", "customSteps", "classifiers", "handleConfirmed"]);
|
|
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
78
|
var _g = useState(undefined), form = _g[0], setForm = _g[1];
|
|
79
79
|
var _h = useState({}), originalValues = _h[0], setOriginalValues = _h[1];
|
|
80
80
|
var _j = useState(undefined), organizationInfo = _j[0], setOrganizationInfo = _j[1];
|
|
@@ -273,7 +273,7 @@ function App(_a) {
|
|
|
273
273
|
if (handleConfirmed) {
|
|
274
274
|
handleConfirmed();
|
|
275
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 : {}, isWidget: isWidget === true })) })));
|
|
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
277
|
}
|
|
278
278
|
}
|
|
279
279
|
export default App;
|
|
@@ -427,7 +427,7 @@ var mapOriginalValues = function (originalValues, form) {
|
|
|
427
427
|
}
|
|
428
428
|
return newValues;
|
|
429
429
|
};
|
|
430
|
-
var mapOriginalValue = function (step, value, form) {
|
|
430
|
+
export var mapOriginalValue = function (step, value, form) {
|
|
431
431
|
var _a, _b, _c, _d;
|
|
432
432
|
switch (step === null || step === void 0 ? void 0 : step.type) {
|
|
433
433
|
case StepTypes.TEXTAREA: {
|
|
@@ -443,7 +443,7 @@ var mapOriginalValue = function (step, value, form) {
|
|
|
443
443
|
return value;
|
|
444
444
|
}
|
|
445
445
|
case StepTypes.CLASSIFIER_SELECTOR: {
|
|
446
|
-
var stepClassifier = (_b = form.classifiers) === null || _b === void 0 ? void 0 : _b[(_c = step.idClassifier) !== null && _c !== void 0 ? _c : ''];
|
|
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
447
|
if (stepClassifier) {
|
|
448
448
|
var classifier = (_d = form.classifiers) === null || _d === void 0 ? void 0 : _d[value];
|
|
449
449
|
if (!(value === null || value === void 0 ? void 0 : value.value))
|
|
@@ -4,4 +4,5 @@ import { CustomStep } from '../../../App';
|
|
|
4
4
|
import { FormStep } from '../../../@Types/FormStep';
|
|
5
5
|
declare function ColumnForm({ form, apiKey, reload, domain, postview, internal, formStyle, sendLabel, widthStats, customSteps, customSend, customSubmit, handleLoaded, originalValues, ...others }: FormComponentProps): JSX.Element;
|
|
6
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;
|
|
7
8
|
export declare function calcStepDependencyValue(depStep: FormStep, originalValues: Record<string, any>, customSteps?: Record<string, CustomStep>): any;
|
|
@@ -225,7 +225,7 @@ function calcNextSection(form, idSection, sections) {
|
|
|
225
225
|
}
|
|
226
226
|
}
|
|
227
227
|
}
|
|
228
|
-
var calcValue = function (idStep, steps, values, customSteps, deleteIds, value) {
|
|
228
|
+
export var calcValue = function (idStep, steps, values, customSteps, deleteIds, value) {
|
|
229
229
|
var _a, _b;
|
|
230
230
|
if (value === void 0) { value = values[idStep]; }
|
|
231
231
|
var step = steps[idStep];
|
|
@@ -13,6 +13,7 @@ export interface FormComponentProps {
|
|
|
13
13
|
organization: Organization;
|
|
14
14
|
originalValues: Record<string, unknown>;
|
|
15
15
|
customSteps: Record<string, CustomStep>;
|
|
16
|
+
customStepProps: Record<string, any>;
|
|
16
17
|
customSend?: (values: any, reload: Function) => Promise<any>;
|
|
17
18
|
customSubmit?: JSX.Element;
|
|
18
19
|
widthStats: WidthStats;
|
|
@@ -21,6 +21,7 @@ export interface RecursiveData {
|
|
|
21
21
|
getValues: UseFormGetValues<FieldValues>;
|
|
22
22
|
originalValues: Record<string, any>;
|
|
23
23
|
customSteps: Record<string, CustomStep>;
|
|
24
|
+
customStepProps: Record<string, any>;
|
|
24
25
|
/** Function to call on postview to fetch the download url of a file */
|
|
25
26
|
fetchDownloadUrl?: (S3Key: string, fileName: string) => Promise<string>;
|
|
26
27
|
dependencyStore: Record<string, any>;
|
package/package.json
CHANGED