@arquimedes.co/eureka-forms 1.8.5 → 1.8.6-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
CHANGED
|
@@ -13,6 +13,8 @@ export interface AppProps {
|
|
|
13
13
|
internal?: boolean;
|
|
14
14
|
/** If the widget is a postview (view what the user filled)*/
|
|
15
15
|
postview?: boolean;
|
|
16
|
+
/** If postview should only show steps with values*/
|
|
17
|
+
partial?: boolean;
|
|
16
18
|
/** If the widget is a preview (view from admin)*/
|
|
17
19
|
preview?: boolean;
|
|
18
20
|
/** If the form can be edited (For entities) */
|
|
@@ -35,7 +37,7 @@ export interface CustomStep {
|
|
|
35
37
|
component: ReactNode;
|
|
36
38
|
updateValue: (idStep: string, values: Record<string, any>, form: Form) => void;
|
|
37
39
|
}
|
|
38
|
-
declare function App({ apiKey, domain, preview, formData, postview, editable, isWidget, internal, valuesData, customSend, customSteps, handleConfirmed, ...others }: AppProps): JSX.Element;
|
|
40
|
+
declare function App({ apiKey, domain, preview, partial, formData, postview, editable, isWidget, internal, valuesData, customSend, customSteps, handleConfirmed, ...others }: AppProps): JSX.Element;
|
|
39
41
|
export default App;
|
|
40
42
|
export declare enum SIZES {
|
|
41
43
|
SMALL = "SMALL",
|
package/dist/App.js
CHANGED
|
@@ -71,7 +71,7 @@ import CBRStepTypes from './constants/CBRFormStepTypes';
|
|
|
71
71
|
function App(_a) {
|
|
72
72
|
var _this = this;
|
|
73
73
|
var _b, _c, _d, _e;
|
|
74
|
-
var apiKey = _a.apiKey, domain = _a.domain, preview = _a.preview, 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, handleConfirmed = _a.handleConfirmed, others = __rest(_a, ["apiKey", "domain", "preview", "formData", "postview", "editable", "isWidget", "internal", "valuesData", "customSend", "customSteps", "handleConfirmed"]);
|
|
74
|
+
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, handleConfirmed = _a.handleConfirmed, others = __rest(_a, ["apiKey", "domain", "preview", "partial", "formData", "postview", "editable", "isWidget", "internal", "valuesData", "customSend", "customSteps", "handleConfirmed"]);
|
|
75
75
|
var _g = useState(undefined), form = _g[0], setForm = _g[1];
|
|
76
76
|
var _h = useState({}), originalValues = _h[0], setOriginalValues = _h[1];
|
|
77
77
|
var _j = useState(undefined), organizationInfo = _j[0], setOrganizationInfo = _j[1];
|
|
@@ -270,7 +270,7 @@ function App(_a) {
|
|
|
270
270
|
if (handleConfirmed) {
|
|
271
271
|
handleConfirmed();
|
|
272
272
|
}
|
|
273
|
-
}, editable: editable, postview: postview === 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 }), void 0) }), void 0));
|
|
273
|
+
}, editable: editable, postview: postview === 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 }), void 0) }), void 0));
|
|
274
274
|
}
|
|
275
275
|
}
|
|
276
276
|
export default App;
|
|
@@ -20,18 +20,25 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
20
20
|
}
|
|
21
21
|
return t;
|
|
22
22
|
};
|
|
23
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
23
|
import { createElement as _createElement } from "react";
|
|
24
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
25
25
|
import StepComponent from '../../Step/Step';
|
|
26
26
|
import styles from './MaterialSection.module.css';
|
|
27
27
|
function MaterialSection(_a) {
|
|
28
28
|
var section = _a.section, form = _a.form, others = __rest(_a, ["section", "form"]);
|
|
29
|
+
var postview = others.postview, partial = others.partial, originalValues = others.originalValues;
|
|
29
30
|
return (_jsx("div", __assign({ className: styles.container, style: {
|
|
30
31
|
width: (form.size.blockSize + form.size.spacingSize) *
|
|
31
32
|
form.size.blockNum,
|
|
32
33
|
} }, { children: section.steps.map(function (idStep, index) {
|
|
33
34
|
var step = form.steps[idStep];
|
|
34
|
-
|
|
35
|
+
//If partial is active only display steps with originalValues
|
|
36
|
+
if (postview &&
|
|
37
|
+
partial &&
|
|
38
|
+
originalValues[idStep] === undefined) {
|
|
39
|
+
return _jsx("div", {}, index);
|
|
40
|
+
}
|
|
41
|
+
else if (step) {
|
|
35
42
|
return (_createElement(StepComponent, __assign({}, others, { form: form, step: step, handleSizeChange: function () { }, key: index, level: 0 })));
|
|
36
43
|
}
|
|
37
44
|
else {
|
package/package.json
CHANGED