@arquimedes.co/eureka-forms 1.9.20-test → 1.9.21-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.
|
@@ -163,7 +163,7 @@ function ColumnForm(_a) {
|
|
|
163
163
|
(originalValues === null || originalValues === void 0 ? void 0 : originalValues['INTERNAL_CREATING_AGENT']) === undefined && (_jsx("div", __assign({ className: styles.termsContainer, style: {
|
|
164
164
|
width: (form.size.blockSize + form.size.spacingSize) *
|
|
165
165
|
form.size.blockNum,
|
|
166
|
-
} }, { children: form.terms.map(function (term, index) { return (_jsx(TermComponent, { setValue: setValue, postview: postview, tempError: tempError, term: term, control: control, errors: errors, form: form, formStyle: formStyle }, index)); }) }))), !postview && (_jsxs(React.Fragment, { children: [form.hasCaptcha && !internal && (_jsx(ReCAPTCHA, { ref: recaptchaRef, sitekey: "6LcL22kkAAAAAEotDeAFbRATob-u5vbibbCyWL2p", size: 'invisible', badge: 'bottomright' })), _jsx("div", __assign({ className: styles.submitBtnContainer }, { children: _jsxs("button", __assign({ "data-testid": "form__submit", className: styles.submitBtn, onClick: function () { return __awaiter(_this, void 0, void 0, function () {
|
|
166
|
+
} }, { children: form.terms.map(function (term, index) { return (_jsx(TermComponent, { setValue: setValue, postview: postview, tempError: tempError, term: term, control: control, errors: errors, form: form, formStyle: formStyle }, index)); }) }))), !postview && others.editable && (_jsxs(React.Fragment, { children: [form.hasCaptcha && !internal && (_jsx(ReCAPTCHA, { ref: recaptchaRef, sitekey: "6LcL22kkAAAAAEotDeAFbRATob-u5vbibbCyWL2p", size: 'invisible', badge: 'bottomright' })), _jsx("div", __assign({ className: styles.submitBtnContainer }, { children: _jsxs("button", __assign({ "data-testid": "form__submit", className: styles.submitBtn, onClick: function () { return __awaiter(_this, void 0, void 0, function () {
|
|
167
167
|
var valid, captcha;
|
|
168
168
|
return __generator(this, function (_a) {
|
|
169
169
|
switch (_a.label) {
|
|
@@ -42,11 +42,15 @@ function Incidents(_a) {
|
|
|
42
42
|
var step = _a.step, form = _a.form, btnRef = _a.btnRef, editable = _a.editable, postview = _a.postview, onChange = _a.onChange, incidents = _a.incidents, formStyle = _a.formStyle, dependencyStore = _a.dependencyStore, setDependencyStore = _a.setDependencyStore, others = __rest(_a, ["step", "form", "btnRef", "editable", "postview", "onChange", "incidents", "formStyle", "dependencyStore", "setDependencyStore"]);
|
|
43
43
|
/** Form to pass down with aditional steps */
|
|
44
44
|
var _b = useState(__assign(__assign({}, form), { steps: __assign({}, form.steps) })), localForm = _b[0], setLocalForm = _b[1];
|
|
45
|
+
var _c = useState(false), firstRender = _c[0], setFirstRender = _c[1];
|
|
45
46
|
useEffect(function () {
|
|
46
|
-
|
|
47
|
+
setFirstRender(true);
|
|
48
|
+
}, []);
|
|
49
|
+
useEffect(function () {
|
|
50
|
+
if (firstRender && incidents.length === 0 && !postview && editable) {
|
|
47
51
|
handleAddIncident();
|
|
48
52
|
}
|
|
49
|
-
}, []);
|
|
53
|
+
}, [firstRender]);
|
|
50
54
|
var handleAddIncident = function () {
|
|
51
55
|
var _a, _b;
|
|
52
56
|
var current = incidents.filter(function (incident) { return !incident.deleted; });
|
|
@@ -86,12 +86,7 @@ function AYFStepMapper(props) {
|
|
|
86
86
|
marginTop: 2,
|
|
87
87
|
} }) })));
|
|
88
88
|
case AYFFormStepTypes.AYF_YEAR:
|
|
89
|
-
return (_jsx(TextInputStep, __assign({}, props, { step: props.step, defaultValue: new Date().getFullYear().toString()
|
|
90
|
-
color: '#757575',
|
|
91
|
-
fontSize: 20,
|
|
92
|
-
marginRight: 4,
|
|
93
|
-
marginTop: 2,
|
|
94
|
-
} }) })));
|
|
89
|
+
return (_jsx(TextInputStep, __assign({}, props, { step: props.step, defaultValue: new Date().getFullYear().toString() })));
|
|
95
90
|
case AYFFormStepTypes.AYF_BILL_NUM:
|
|
96
91
|
return (_jsx(TextInputStep, __assign({}, props, { step: props.step, icon: _jsx(DescriptionIcon, { style: { color: '#757575', fontSize: 23 } }) })));
|
|
97
92
|
case AYFFormStepTypes.AYF_CUT_OFF_DATE:
|
package/dist/Widget.js
CHANGED
package/package.json
CHANGED