@redneckz/wildless-cms-uni-blocks 0.14.191 → 0.14.192
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/bundle/bundle.umd.js +31 -32
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/ApplicationForm/ApplicationFormFeedback.d.ts +13 -0
- package/dist/components/ApplicationForm/ApplicationFormFeedback.d.ts +13 -0
- package/dist/components/ApplicationForm/ApplicationFormFeedback.js +35 -3
- package/dist/components/ApplicationForm/ApplicationFormFeedback.js.map +1 -1
- package/lib/components/ApplicationForm/ApplicationFormFeedback.d.ts +13 -0
- package/lib/components/ApplicationForm/ApplicationFormFeedback.js +33 -2
- package/lib/components/ApplicationForm/ApplicationFormFeedback.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +31 -32
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/ApplicationForm/ApplicationFormFeedback.d.ts +13 -0
- package/mobile/dist/components/ApplicationForm/ApplicationFormFeedback.d.ts +13 -0
- package/mobile/dist/components/ApplicationForm/ApplicationFormFeedback.js +35 -3
- package/mobile/dist/components/ApplicationForm/ApplicationFormFeedback.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormFeedback.d.ts +13 -0
- package/mobile/lib/components/ApplicationForm/ApplicationFormFeedback.js +33 -2
- package/mobile/lib/components/ApplicationForm/ApplicationFormFeedback.js.map +1 -1
- package/mobile/src/components/ApplicationForm/ApplicationFormFeedback.tsx +52 -2
- package/package.json +1 -1
- package/src/components/ApplicationForm/ApplicationFormFeedback.tsx +52 -2
- package/bundle/components/ApplicationForm/handleSubmitFeedback.d.ts +0 -15
- package/dist/components/ApplicationForm/handleSubmitFeedback.d.ts +0 -15
- package/dist/components/ApplicationForm/handleSubmitFeedback.js +0 -38
- package/dist/components/ApplicationForm/handleSubmitFeedback.js.map +0 -1
- package/lib/components/ApplicationForm/handleSubmitFeedback.d.ts +0 -15
- package/lib/components/ApplicationForm/handleSubmitFeedback.js +0 -35
- package/lib/components/ApplicationForm/handleSubmitFeedback.js.map +0 -1
- package/mobile/bundle/components/ApplicationForm/handleSubmitFeedback.d.ts +0 -15
- package/mobile/dist/components/ApplicationForm/handleSubmitFeedback.d.ts +0 -15
- package/mobile/dist/components/ApplicationForm/handleSubmitFeedback.js +0 -38
- package/mobile/dist/components/ApplicationForm/handleSubmitFeedback.js.map +0 -1
- package/mobile/lib/components/ApplicationForm/handleSubmitFeedback.d.ts +0 -15
- package/mobile/lib/components/ApplicationForm/handleSubmitFeedback.js +0 -35
- package/mobile/lib/components/ApplicationForm/handleSubmitFeedback.js.map +0 -1
- package/mobile/src/components/ApplicationForm/handleSubmitFeedback.tsx +0 -54
- package/src/components/ApplicationForm/handleSubmitFeedback.tsx +0 -54
package/bundle/bundle.umd.js
CHANGED
|
@@ -1453,37 +1453,6 @@
|
|
|
1453
1453
|
{ key: 'Юридическое лицо / ИП' },
|
|
1454
1454
|
];
|
|
1455
1455
|
|
|
1456
|
-
const feedbackValidatorDefaultObject = {
|
|
1457
|
-
typeForm: defaultValidator,
|
|
1458
|
-
region: defaultValidator,
|
|
1459
|
-
surname: defaultValidator,
|
|
1460
|
-
name: nameValidator,
|
|
1461
|
-
feedbackMethod: defaultValidator,
|
|
1462
|
-
phone: phoneValidator,
|
|
1463
|
-
email: defaultValidator,
|
|
1464
|
-
comment: defaultValidator,
|
|
1465
|
-
consentDataProcessing: checkboxValidator,
|
|
1466
|
-
};
|
|
1467
|
-
const handleSubmitFeedback = (formState, onSubmit) => {
|
|
1468
|
-
const isLegal = getLegalEntity(formState?.typeForm.key, formState?.serviceDirection?.key);
|
|
1469
|
-
const feedbackValidator = objectValidator({
|
|
1470
|
-
...feedbackValidatorDefaultObject,
|
|
1471
|
-
...getFeedbackValidationObject(formState, isLegal),
|
|
1472
|
-
});
|
|
1473
|
-
isValidationSuccess(feedbackValidator(formState)) && onSubmit(formState, !isLegal);
|
|
1474
|
-
};
|
|
1475
|
-
const getFeedbackValidationObject = (formState, isLegal) => {
|
|
1476
|
-
if (isLegal) {
|
|
1477
|
-
return { addressBranch: defaultValidator, inn: innValidator };
|
|
1478
|
-
}
|
|
1479
|
-
else if (formState.typeForm.key === 'FEEDBACK') {
|
|
1480
|
-
return { birthday: defaultValidator };
|
|
1481
|
-
}
|
|
1482
|
-
else {
|
|
1483
|
-
return { addressBranch: defaultValidator };
|
|
1484
|
-
}
|
|
1485
|
-
};
|
|
1486
|
-
|
|
1487
1456
|
const SVG = JSX(({ className, viewBox, fill = 'none', width, height, paths, ...commonOptions }) => {
|
|
1488
1457
|
return (jsx("svg", { xmlns: "http://www.w3.org/2000/svg", className: className, viewBox: viewBox, fill: fill, width: width, height: height, children: paths.map(({ d, fill: pathFill, ...options }, i) => {
|
|
1489
1458
|
const resultOptions = { ...commonOptions, ...options };
|
|
@@ -1689,6 +1658,17 @@
|
|
|
1689
1658
|
comment: '',
|
|
1690
1659
|
consentDataProcessing: false,
|
|
1691
1660
|
};
|
|
1661
|
+
const feedbackValidatorDefaultObject = {
|
|
1662
|
+
typeForm: defaultValidator,
|
|
1663
|
+
region: defaultValidator,
|
|
1664
|
+
surname: defaultValidator,
|
|
1665
|
+
name: nameValidator,
|
|
1666
|
+
feedbackMethod: defaultValidator,
|
|
1667
|
+
phone: phoneValidator,
|
|
1668
|
+
email: defaultValidator,
|
|
1669
|
+
comment: defaultValidator,
|
|
1670
|
+
consentDataProcessing: checkboxValidator,
|
|
1671
|
+
};
|
|
1692
1672
|
const ApplicationFormFeedback = JSX(({ button, link, onSubmit }) => {
|
|
1693
1673
|
const handleSubmit = useCallback((feedbackFormState) => {
|
|
1694
1674
|
handleSubmitFeedback(feedbackFormState, onSubmit);
|
|
@@ -1702,6 +1682,25 @@
|
|
|
1702
1682
|
? field('secondaryPhone')
|
|
1703
1683
|
: withValidator(field('secondaryPhone'), phoneValidator)) }), jsx(InputControl, { label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", ...withValidator(field('email'), defaultValidator) }), jsx(InputControl, { label: "\u0424\u0418\u041E \u0438\u043B\u0438 \u0434\u043E\u043B\u0436\u043D\u043E\u0441\u0442\u044C \u043E\u0431\u0441\u043B\u0443\u0436\u0438\u0432\u0430\u0432\u0448\u0435\u0433\u043E \u0412\u0430\u0441 \u0441\u043E\u0442\u0440\u0443\u0434\u043D\u0438\u043A\u0430 \u0411\u0430\u043D\u043A\u0430", ...field('bankEmpolee') }), jsx(InputControl, { label: "\u0414\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F \u043E\u0431\u0440\u0430\u0449\u0435\u043D\u0438\u044F \u0432 \u0411\u0430\u043D\u043A", ...field('applicationDate') })] })) : (jsx(InputControl, { label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", ...withValidator(field('email'), defaultValidator) })), jsx(InputControl, { ...withValidator(field('comment'), defaultValidator), placeholder: "\u0412\u0430\u0448\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435", isTextarea: true }), renderAgreementSubmit(field('consentDataProcessing'), link, button)] }) }) }));
|
|
1704
1684
|
});
|
|
1685
|
+
const handleSubmitFeedback = (formState, onSubmit) => {
|
|
1686
|
+
const isLegal = getLegalEntity(formState?.typeForm.key, formState?.serviceDirection?.key);
|
|
1687
|
+
const feedbackValidator = objectValidator({
|
|
1688
|
+
...feedbackValidatorDefaultObject,
|
|
1689
|
+
...getFeedbackValidationObject(formState, isLegal),
|
|
1690
|
+
});
|
|
1691
|
+
isValidationSuccess(feedbackValidator(formState)) && onSubmit(formState, !isLegal);
|
|
1692
|
+
};
|
|
1693
|
+
const getFeedbackValidationObject = (formState, isLegal) => {
|
|
1694
|
+
if (isLegal) {
|
|
1695
|
+
return { addressBranch: defaultValidator, inn: innValidator };
|
|
1696
|
+
}
|
|
1697
|
+
else if (formState.typeForm.key === 'FEEDBACK') {
|
|
1698
|
+
return { birthday: defaultValidator };
|
|
1699
|
+
}
|
|
1700
|
+
else {
|
|
1701
|
+
return { addressBranch: defaultValidator };
|
|
1702
|
+
}
|
|
1703
|
+
};
|
|
1705
1704
|
const getLegalEntity = (typeFormKey = '', serviceDirectionKey = '') => typeFormKey === 'FEEDBACK_QS' && serviceDirectionKey === 'Юридическое лицо / ИП';
|
|
1706
1705
|
|
|
1707
1706
|
const ApplicationFormGrantSupport = JSX((props) => {
|
|
@@ -6034,7 +6033,7 @@
|
|
|
6034
6033
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
6035
6034
|
});
|
|
6036
6035
|
|
|
6037
|
-
const packageVersion = "0.14.
|
|
6036
|
+
const packageVersion = "0.14.191";
|
|
6038
6037
|
|
|
6039
6038
|
exports.Blocks = Blocks;
|
|
6040
6039
|
exports.ContentPage = ContentPage;
|