@redneckz/wildless-cms-uni-blocks 0.14.178 → 0.14.179
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/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +21 -20
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/ApplicationForm/{renderAgreementWithSubmit.d.ts → renderAgreementSubmit.d.ts} +1 -1
- package/bundle/components/ApplicationFormCustom/ApplicationFormCustomContent.d.ts +2 -2
- package/bundle/components/ApplicationFormCustom/getField.d.ts +1 -1
- package/dist/components/ApplicationForm/ApplicationFormFeedback.js +2 -2
- package/dist/components/ApplicationForm/ApplicationFormFeedback.js.map +1 -1
- package/dist/components/ApplicationForm/ApplicationFormIndividuals.js +2 -2
- package/dist/components/ApplicationForm/ApplicationFormIndividuals.js.map +1 -1
- package/dist/components/ApplicationForm/ApplicationFormSelfCollection.js +2 -2
- package/dist/components/ApplicationForm/ApplicationFormSelfCollection.js.map +1 -1
- package/dist/components/ApplicationForm/ApplicationFormUltraPremium.js +2 -2
- package/dist/components/ApplicationForm/ApplicationFormUltraPremium.js.map +1 -1
- package/dist/components/ApplicationForm/Footnote.js +1 -1
- package/dist/components/ApplicationForm/Footnote.js.map +1 -1
- package/dist/components/ApplicationForm/{renderAgreementWithSubmit.d.ts → renderAgreementSubmit.d.ts} +1 -1
- package/dist/components/ApplicationForm/renderAgreementSubmit.js +13 -0
- package/dist/components/ApplicationForm/renderAgreementSubmit.js.map +1 -0
- package/dist/components/ApplicationFormCustom/ApplicationFormCustom.js +4 -5
- package/dist/components/ApplicationFormCustom/ApplicationFormCustom.js.map +1 -1
- package/dist/components/ApplicationFormCustom/ApplicationFormCustomContent.d.ts +2 -2
- package/dist/components/ApplicationFormCustom/columnStyle.js +1 -1
- package/dist/components/ApplicationFormCustom/columnStyle.js.map +1 -1
- package/dist/components/ApplicationFormCustom/getField.d.ts +1 -1
- package/dist/components/ApplicationFormCustom/getField.js +9 -9
- package/dist/components/ApplicationFormCustom/getField.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/ApplicationForm/ApplicationFormFeedback.js +2 -2
- package/lib/components/ApplicationForm/ApplicationFormFeedback.js.map +1 -1
- package/lib/components/ApplicationForm/ApplicationFormIndividuals.js +2 -2
- package/lib/components/ApplicationForm/ApplicationFormIndividuals.js.map +1 -1
- package/lib/components/ApplicationForm/ApplicationFormSelfCollection.js +2 -2
- package/lib/components/ApplicationForm/ApplicationFormSelfCollection.js.map +1 -1
- package/lib/components/ApplicationForm/ApplicationFormUltraPremium.js +2 -2
- package/lib/components/ApplicationForm/ApplicationFormUltraPremium.js.map +1 -1
- package/lib/components/ApplicationForm/Footnote.js +1 -1
- package/lib/components/ApplicationForm/Footnote.js.map +1 -1
- package/lib/components/ApplicationForm/{renderAgreementWithSubmit.d.ts → renderAgreementSubmit.d.ts} +1 -1
- package/lib/components/ApplicationForm/renderAgreementSubmit.js +10 -0
- package/lib/components/ApplicationForm/renderAgreementSubmit.js.map +1 -0
- package/lib/components/ApplicationFormCustom/ApplicationFormCustom.fixture.d.ts +1 -0
- package/lib/components/ApplicationFormCustom/ApplicationFormCustom.js +5 -6
- package/lib/components/ApplicationFormCustom/ApplicationFormCustom.js.map +1 -1
- package/lib/components/ApplicationFormCustom/ApplicationFormCustomContent.d.ts +2 -2
- package/lib/components/ApplicationFormCustom/columnStyle.js +1 -1
- package/lib/components/ApplicationFormCustom/columnStyle.js.map +1 -1
- package/lib/components/ApplicationFormCustom/getField.d.ts +1 -1
- package/lib/components/ApplicationFormCustom/getField.js +9 -9
- package/lib/components/ApplicationFormCustom/getField.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +21 -20
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/{dist/components/ApplicationForm/renderAgreementWithSubmit.d.ts → bundle/components/ApplicationForm/renderAgreementSubmit.d.ts} +1 -1
- package/mobile/bundle/components/ApplicationFormCustom/ApplicationFormCustomContent.d.ts +2 -2
- package/mobile/bundle/components/ApplicationFormCustom/getField.d.ts +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormFeedback.js +2 -2
- package/mobile/dist/components/ApplicationForm/ApplicationFormFeedback.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormIndividuals.js +2 -2
- package/mobile/dist/components/ApplicationForm/ApplicationFormIndividuals.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormSelfCollection.js +2 -2
- package/mobile/dist/components/ApplicationForm/ApplicationFormSelfCollection.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormUltraPremium.js +2 -2
- package/mobile/dist/components/ApplicationForm/ApplicationFormUltraPremium.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/Footnote.js +1 -1
- package/mobile/dist/components/ApplicationForm/Footnote.js.map +1 -1
- package/mobile/{bundle/components/ApplicationForm/renderAgreementWithSubmit.d.ts → dist/components/ApplicationForm/renderAgreementSubmit.d.ts} +1 -1
- package/mobile/dist/components/ApplicationForm/renderAgreementSubmit.js +13 -0
- package/mobile/dist/components/ApplicationForm/renderAgreementSubmit.js.map +1 -0
- package/mobile/dist/components/ApplicationFormCustom/ApplicationFormCustom.js +4 -5
- package/mobile/dist/components/ApplicationFormCustom/ApplicationFormCustom.js.map +1 -1
- package/mobile/dist/components/ApplicationFormCustom/ApplicationFormCustomContent.d.ts +2 -2
- package/mobile/dist/components/ApplicationFormCustom/columnStyle.js +1 -1
- package/mobile/dist/components/ApplicationFormCustom/columnStyle.js.map +1 -1
- package/mobile/dist/components/ApplicationFormCustom/getField.d.ts +1 -1
- package/mobile/dist/components/ApplicationFormCustom/getField.js +9 -9
- package/mobile/dist/components/ApplicationFormCustom/getField.js.map +1 -1
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormFeedback.js +2 -2
- package/mobile/lib/components/ApplicationForm/ApplicationFormFeedback.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormIndividuals.js +2 -2
- package/mobile/lib/components/ApplicationForm/ApplicationFormIndividuals.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormSelfCollection.js +2 -2
- package/mobile/lib/components/ApplicationForm/ApplicationFormSelfCollection.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormUltraPremium.js +2 -2
- package/mobile/lib/components/ApplicationForm/ApplicationFormUltraPremium.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/Footnote.js +1 -1
- package/mobile/lib/components/ApplicationForm/Footnote.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/renderAgreementSubmit.d.ts +5 -0
- package/mobile/lib/components/ApplicationForm/renderAgreementSubmit.js +10 -0
- package/mobile/lib/components/ApplicationForm/renderAgreementSubmit.js.map +1 -0
- package/mobile/lib/components/ApplicationFormCustom/ApplicationFormCustom.js +5 -6
- package/mobile/lib/components/ApplicationFormCustom/ApplicationFormCustom.js.map +1 -1
- package/mobile/lib/components/ApplicationFormCustom/ApplicationFormCustomContent.d.ts +2 -2
- package/mobile/lib/components/ApplicationFormCustom/columnStyle.js +1 -1
- package/mobile/lib/components/ApplicationFormCustom/columnStyle.js.map +1 -1
- package/mobile/lib/components/ApplicationFormCustom/getField.d.ts +1 -1
- package/mobile/lib/components/ApplicationFormCustom/getField.js +9 -9
- package/mobile/lib/components/ApplicationFormCustom/getField.js.map +1 -1
- package/mobile/src/components/ApplicationForm/ApplicationFormFeedback.tsx +2 -2
- package/mobile/src/components/ApplicationForm/ApplicationFormIndividuals.tsx +2 -2
- package/mobile/src/components/ApplicationForm/ApplicationFormSelfCollection.tsx +2 -2
- package/mobile/src/components/ApplicationForm/ApplicationFormUltraPremium.tsx +2 -2
- package/mobile/src/components/ApplicationForm/Footnote.tsx +1 -1
- package/mobile/src/components/ApplicationForm/{renderAgreementWithSubmit.tsx → renderAgreementSubmit.tsx} +13 -8
- package/mobile/src/components/ApplicationFormAntiFraud/ApplicationFormAntiFraud.example.json +3 -3
- package/mobile/src/components/ApplicationFormCorruption/ApplicationFormCorruption.example.json +3 -3
- package/mobile/src/components/ApplicationFormCustom/ApplicationFormCustom.example.json +2 -2
- package/mobile/src/components/ApplicationFormCustom/ApplicationFormCustom.tsx +14 -7
- package/mobile/src/components/ApplicationFormCustom/ApplicationFormCustomContent.ts +2 -2
- package/mobile/src/components/ApplicationFormCustom/columnStyle.tsx +1 -1
- package/mobile/src/components/ApplicationFormCustom/getField.tsx +5 -13
- package/package.json +1 -1
- package/src/components/ApplicationForm/ApplicationForm.fixture.mobile.tsx +1 -1
- package/src/components/ApplicationForm/ApplicationForm.fixture.tsx +1 -1
- package/src/components/ApplicationForm/ApplicationFormFeedback.tsx +2 -2
- package/src/components/ApplicationForm/ApplicationFormIndividuals.tsx +2 -2
- package/src/components/ApplicationForm/ApplicationFormSelfCollection.tsx +2 -2
- package/src/components/ApplicationForm/ApplicationFormUltraPremium.tsx +2 -2
- package/src/components/ApplicationForm/Footnote.tsx +1 -1
- package/src/components/ApplicationForm/{renderAgreementWithSubmit.tsx → renderAgreementSubmit.tsx} +13 -8
- package/src/components/ApplicationFormAntiFraud/ApplicationFormAntiFraud.example.json +3 -3
- package/src/components/ApplicationFormAntiFraud/ApplicationFormAntiFraud.fixture.tsx +3 -2
- package/src/components/ApplicationFormCorruption/ApplicationFormCorruption.example.json +3 -3
- package/src/components/ApplicationFormCorruption/ApplicationFormCorruption.fixture.tsx +3 -2
- package/src/components/ApplicationFormCustom/ApplicationFormCustom.example.json +2 -2
- package/src/components/ApplicationFormCustom/ApplicationFormCustom.fixture.tsx +24 -8
- package/src/components/ApplicationFormCustom/ApplicationFormCustom.tsx +14 -7
- package/src/components/ApplicationFormCustom/ApplicationFormCustomContent.ts +2 -2
- package/src/components/ApplicationFormCustom/columnStyle.tsx +1 -1
- package/src/components/ApplicationFormCustom/getField.tsx +5 -13
- package/dist/components/ApplicationForm/renderAgreementWithSubmit.js +0 -12
- package/dist/components/ApplicationForm/renderAgreementWithSubmit.js.map +0 -1
- package/lib/components/ApplicationForm/renderAgreementWithSubmit.js +0 -9
- package/lib/components/ApplicationForm/renderAgreementWithSubmit.js.map +0 -1
- package/mobile/dist/components/ApplicationForm/renderAgreementWithSubmit.js +0 -12
- package/mobile/dist/components/ApplicationForm/renderAgreementWithSubmit.js.map +0 -1
- package/mobile/lib/components/ApplicationForm/renderAgreementWithSubmit.d.ts +0 -5
- package/mobile/lib/components/ApplicationForm/renderAgreementWithSubmit.js +0 -9
- package/mobile/lib/components/ApplicationForm/renderAgreementWithSubmit.js.map +0 -1
package/bundle/bundle.umd.js
CHANGED
|
@@ -912,7 +912,7 @@
|
|
|
912
912
|
const isValidationSuccess = (info) => !info?.length;
|
|
913
913
|
const validator$1 = (predicate) => (message) => (_) => predicate(_) ? [] : [message];
|
|
914
914
|
|
|
915
|
-
const Footnote = JSX(({ text, link }) => (jsxs(Paragraph, { size: "text-s", font: "font-light", color: "text-secondary-text", children: [jsx(Text, { children: text
|
|
915
|
+
const Footnote = JSX(({ text, link }) => (jsxs(Paragraph, { size: "text-s", font: "font-light", color: "text-secondary-text", children: [jsx(Text, { children: text }), link ? (jsx(LinkButton, { href: link.href, ariaLabel: "\u0443\u0441\u043B\u043E\u0432\u0438\u044F \u043F\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0434\u0430\u043D\u043D\u044B\u0445", target: link.target || '', className: "text-primary-main", children: jsx(Text, { children: link.text }) })) : null] })));
|
|
916
916
|
|
|
917
917
|
const formStyle$1 = 'container space-y-lg';
|
|
918
918
|
const oneColumnFormStyle = 'w-full max-w-xl space-y-s m-auto';
|
|
@@ -1513,7 +1513,8 @@
|
|
|
1513
1513
|
});
|
|
1514
1514
|
const checkboxStyle = (value) => style('rounded border', value ? 'bg-primary-main' : '');
|
|
1515
1515
|
|
|
1516
|
-
const
|
|
1516
|
+
const agreementText = 'Нажимая кнопку, вы подтверждаете согласие с';
|
|
1517
|
+
const renderAgreementSubmit = (consentDataProcessing, link, button) => (jsxs("div", { className: "flex col-span-2 gap-m flex-col lg:flex-row w-full justify-between items-baseline", children: [consentDataProcessing ? (jsxs("div", { children: [jsxs("div", { className: "flex gap-3", children: [jsx(Checkbox, { ...consentDataProcessing }), jsx(Footnote, { link: link })] }), renderErrorText(withValidator(consentDataProcessing, checkboxValidator).error)] })) : (jsx(Footnote, { text: agreementText, link: link })), renderSubmitButton(button)] }));
|
|
1517
1518
|
|
|
1518
1519
|
const formatDate = (date, toTimeStamp = false) => {
|
|
1519
1520
|
if (typeof date === 'string') {
|
|
@@ -1699,7 +1700,7 @@
|
|
|
1699
1700
|
const isLegalEntity = getLegalEntity(field('typeForm').value?.key, field('serviceDirection').value?.key);
|
|
1700
1701
|
return (jsx("form", { className: formStyle$1, onSubmit: formProps.onSubmit, children: jsx(ApplicationFieldsetLayout, { children: jsxs("div", { className: oneColumnFormStyle, children: [jsx(SelectControl, { label: "\u0422\u0435\u043C\u0430", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0442\u0435\u043C\u0443", options: FEEDBACK_TYPES, ...withValidator(field('typeForm'), defaultValidator) }), isQualityService ? (jsx(SelectControl, { label: "\u041D\u0430\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435 \u043E\u0431\u0441\u043B\u0443\u0436\u0438\u0432\u0430\u043D\u0438\u044F", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u043D\u0430\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435", options: SERVICE_DIRECTIONS, ...withValidator(field('serviceDirection'), defaultValidator) })) : null, jsx(RegionField, { field: field }), isQualityService ? (jsx(AddressBranchField, { field: field, regionKey: formState?.region?.key })) : null, renderUserData(field, true), isLegalEntity ? (jsxs("div", { children: [jsx(InputControl, { label: "\u0418\u041D\u041D", ...withValidator(field('inn'), innValidator) }), jsx(InputControl, { label: "\u041D\u0430\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", ...field('fullName') })] })) : null, jsx(SelectControl, { label: "\u0421\u043F\u043E\u0441\u043E\u0431 \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u0438\u044F \u043E\u0442\u0432\u0435\u0442\u0430", options: FEEDBACK_METHOD, ...withValidator(field('feedbackMethod'), defaultValidator) }), jsx(PhoneInputControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...withValidator(field('phone'), phoneValidator) }), isQualityService ? (jsxs("div", { children: [jsx(PhoneInputControl, { label: "\u0414\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0439 \u0442\u0435\u043B\u0435\u0444\u043E\u043D", ...(!field('secondaryPhone').value || field('secondaryPhone').value === '+7 ('
|
|
1701
1702
|
? field('secondaryPhone')
|
|
1702
|
-
: 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 }),
|
|
1703
|
+
: 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)] }) }) }));
|
|
1703
1704
|
});
|
|
1704
1705
|
const getLegalEntity = (typeFormKey = '', serviceDirectionKey = '') => typeFormKey === 'FEEDBACK_QS' && serviceDirectionKey === 'Юридическое лицо / ИП';
|
|
1705
1706
|
|
|
@@ -1748,7 +1749,7 @@
|
|
|
1748
1749
|
}, true);
|
|
1749
1750
|
}, [onSubmit]);
|
|
1750
1751
|
const [, { field, ...formProps }] = useForm(initialFormState$4, { onSubmit: handleSubmit });
|
|
1751
|
-
return (jsxs("form", { className: formStyle$1, onSubmit: formProps.onSubmit, children: [jsxs(ApplicationFieldsetLayout, { children: [jsxs("div", { className: formChildrenStyle, children: [jsx(InputControl, { label: "\u0424\u0430\u043C\u0438\u043B\u0438\u044F", ...withValidator(field('surname'), nameValidator) }), jsx(InputControl, { label: "\u041E\u0442\u0447\u0435\u0441\u0442\u0432\u043E (\u041E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u043E, \u043F\u0440\u0438 \u043D\u0430\u043B\u0438\u0447\u0438\u0438)", ...field('middleName') }), jsx(PhoneInputControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...withValidator(field('phone'), phoneValidator) })] }), jsxs("div", { className: formChildrenStyle, children: [jsx(InputControl, { label: "\u0418\u043C\u044F", ...withValidator(field('name'), nameValidator) }), jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u0440\u043E\u0436\u0434\u0435\u043D\u0438\u044F", ...withValidator(field('birthday'), defaultValidator) }), jsx(InputControl, { label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", ...withValidator(field('email'), defaultValidator) })] })] }),
|
|
1752
|
+
return (jsxs("form", { className: formStyle$1, onSubmit: formProps.onSubmit, children: [jsxs(ApplicationFieldsetLayout, { children: [jsxs("div", { className: formChildrenStyle, children: [jsx(InputControl, { label: "\u0424\u0430\u043C\u0438\u043B\u0438\u044F", ...withValidator(field('surname'), nameValidator) }), jsx(InputControl, { label: "\u041E\u0442\u0447\u0435\u0441\u0442\u0432\u043E (\u041E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u043E, \u043F\u0440\u0438 \u043D\u0430\u043B\u0438\u0447\u0438\u0438)", ...field('middleName') }), jsx(PhoneInputControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...withValidator(field('phone'), phoneValidator) })] }), jsxs("div", { className: formChildrenStyle, children: [jsx(InputControl, { label: "\u0418\u043C\u044F", ...withValidator(field('name'), nameValidator) }), jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u0440\u043E\u0436\u0434\u0435\u043D\u0438\u044F", ...withValidator(field('birthday'), defaultValidator) }), jsx(InputControl, { label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", ...withValidator(field('email'), defaultValidator) })] })] }), renderAgreementSubmit(field('consentDataProcessing'), link, button)] }));
|
|
1752
1753
|
});
|
|
1753
1754
|
|
|
1754
1755
|
const initialFormState$3 = {
|
|
@@ -1768,7 +1769,7 @@
|
|
|
1768
1769
|
isValidationSuccess(feedbackValidator(formState)) && onSubmit(formState, false);
|
|
1769
1770
|
}, [onSubmit]);
|
|
1770
1771
|
const [, { field, ...formProps }] = useForm(initialFormState$3, { onSubmit: handleSubmit });
|
|
1771
|
-
return (jsx("form", { className: formStyle$1, onSubmit: formProps.onSubmit, children: jsx(ApplicationFieldsetLayout, { children: jsxs("div", { className: oneColumnFormStyle, children: [jsx(InputControl, { label: "\u0424\u0418\u041E", ...withValidator(field('fullName'), defaultValidator) }), jsx(RegionField, { field: field }), jsx(PhoneInputControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...withValidator(field('phone'), phoneValidator) }),
|
|
1772
|
+
return (jsx("form", { className: formStyle$1, onSubmit: formProps.onSubmit, children: jsx(ApplicationFieldsetLayout, { children: jsxs("div", { className: oneColumnFormStyle, children: [jsx(InputControl, { label: "\u0424\u0418\u041E", ...withValidator(field('fullName'), defaultValidator) }), jsx(RegionField, { field: field }), jsx(PhoneInputControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...withValidator(field('phone'), phoneValidator) }), renderAgreementSubmit(field('consentDataProcessing'), link, button)] }) }) }));
|
|
1772
1773
|
});
|
|
1773
1774
|
|
|
1774
1775
|
const RegionPremiumField = JSX(({ field }) => {
|
|
@@ -1808,7 +1809,7 @@
|
|
|
1808
1809
|
}, [onSubmit]);
|
|
1809
1810
|
const [formState, { field, ...formProps }] = useForm({ ...initialFormState$2, typeForm: getDefaultFormType(defaultType) }, { onSubmit: handleSubmit });
|
|
1810
1811
|
const regionKey = formState?.region?.key;
|
|
1811
|
-
return (jsxs("form", { className: formStyle$1, onSubmit: formProps.onSubmit, children: [jsxs(ApplicationFieldsetLayout, { title: "\u0412\u0430\u0448\u0438 \u0434\u0430\u043D\u043D\u044B\u0435", children: [jsxs("div", { className: formChildrenStyle, children: [jsx(InputControl, { label: "\u0424\u0430\u043C\u0438\u043B\u0438\u044F", ...withValidator(field('surname'), nameValidator) }), jsx(InputControl, { label: "\u041E\u0442\u0447\u0435\u0441\u0442\u0432\u043E (\u041E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u043E, \u043F\u0440\u0438 \u043D\u0430\u043B\u0438\u0447\u0438\u0438)", ...field('middleName') }), jsx(InputControl, { label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", ...withValidator(field('email'), defaultValidator) })] }), jsxs("div", { className: formChildrenStyle, children: [jsx(InputControl, { label: "\u0418\u043C\u044F", ...withValidator(field('name'), nameValidator) }), jsx(PhoneInputControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...withValidator(field('phone'), phoneValidator) }), jsx(SelectControl, { label: "\u0422\u0438\u043F \u043E\u0431\u0441\u043B\u0443\u0436\u0438\u0432\u0430\u043D\u0438\u044F", options: SERVICE_TYPES, ...withValidator(field('typeForm'), defaultValidator) })] })] }), jsxs(ApplicationFieldsetLayout, { title: "\u041E\u0444\u0438\u0441 \u0431\u0430\u043D\u043A\u0430", children: [jsx("div", { className: formChildrenStyle, children: jsx(RegionPremiumField, { field: field }) }), jsx("div", { className: formChildrenStyle, children: jsx(AddressBranchField, { field: field, regionKey: regionKey, isPremium: true }) })] }), jsx(InputControl, { ...field('comment'), placeholder: "\u041A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u0439, \u0443\u0434\u043E\u0431\u043D\u043E\u0435 \u0432\u0440\u0435\u043C\u044F \u0438 \u043F\u0440\u043E\u0447\u0435\u0435", isTextarea: true }),
|
|
1812
|
+
return (jsxs("form", { className: formStyle$1, onSubmit: formProps.onSubmit, children: [jsxs(ApplicationFieldsetLayout, { title: "\u0412\u0430\u0448\u0438 \u0434\u0430\u043D\u043D\u044B\u0435", children: [jsxs("div", { className: formChildrenStyle, children: [jsx(InputControl, { label: "\u0424\u0430\u043C\u0438\u043B\u0438\u044F", ...withValidator(field('surname'), nameValidator) }), jsx(InputControl, { label: "\u041E\u0442\u0447\u0435\u0441\u0442\u0432\u043E (\u041E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u043E, \u043F\u0440\u0438 \u043D\u0430\u043B\u0438\u0447\u0438\u0438)", ...field('middleName') }), jsx(InputControl, { label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", ...withValidator(field('email'), defaultValidator) })] }), jsxs("div", { className: formChildrenStyle, children: [jsx(InputControl, { label: "\u0418\u043C\u044F", ...withValidator(field('name'), nameValidator) }), jsx(PhoneInputControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...withValidator(field('phone'), phoneValidator) }), jsx(SelectControl, { label: "\u0422\u0438\u043F \u043E\u0431\u0441\u043B\u0443\u0436\u0438\u0432\u0430\u043D\u0438\u044F", options: SERVICE_TYPES, ...withValidator(field('typeForm'), defaultValidator) })] })] }), jsxs(ApplicationFieldsetLayout, { title: "\u041E\u0444\u0438\u0441 \u0431\u0430\u043D\u043A\u0430", children: [jsx("div", { className: formChildrenStyle, children: jsx(RegionPremiumField, { field: field }) }), jsx("div", { className: formChildrenStyle, children: jsx(AddressBranchField, { field: field, regionKey: regionKey, isPremium: true }) })] }), jsx(InputControl, { ...field('comment'), placeholder: "\u041A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u0439, \u0443\u0434\u043E\u0431\u043D\u043E\u0435 \u0432\u0440\u0435\u043C\u044F \u0438 \u043F\u0440\u043E\u0447\u0435\u0435", isTextarea: true }), renderAgreementSubmit(field('consentDataProcessing'), link, button)] }));
|
|
1812
1813
|
});
|
|
1813
1814
|
const getDefaultFormType = (defaultType) => SERVICE_TYPES.find((_) => _.key === defaultType);
|
|
1814
1815
|
|
|
@@ -1919,24 +1920,24 @@
|
|
|
1919
1920
|
const getFormatData = (data) => Object.fromEntries(Object.entries(data).map(([k, v]) => [k, (v?.region ? v?.text : v?.key) || v]));
|
|
1920
1921
|
|
|
1921
1922
|
const columnStyle = {
|
|
1922
|
-
1: 'space-y-s max-w-
|
|
1923
|
+
1: 'space-y-s max-w-2xl mx-auto',
|
|
1923
1924
|
2: 'grid @xl:grid-cols-2 gap-s',
|
|
1924
1925
|
};
|
|
1925
1926
|
|
|
1926
1927
|
const CheckboxWithError = JSX(({ className, text, value, key, disabled, error, onChange }) => (jsxs("div", { className: style('shrink-0 w-full', className), children: [jsx(Checkbox, { text: text, value: value, disabled: disabled, onChange: onChange }, key), renderErrorText(error)] })));
|
|
1927
1928
|
|
|
1928
|
-
const getField = (input, field
|
|
1929
|
+
const getField = (input, field) => {
|
|
1929
1930
|
const InputsMap = {
|
|
1930
|
-
surname: (jsx(InputControl, { label: "\u0424\u0430\u043C\u0438\u043B\u0438\u044F", ...getValidation(field('surname'), nameValidator, input?.required) }
|
|
1931
|
-
name: (jsx(InputControl, { label: "\u0418\u043C\u044F", ...getValidation(field('name'), nameValidator, input?.required) }
|
|
1932
|
-
middleName: (jsx(InputControl, { label: "\u041E\u0442\u0447\u0435\u0441\u0442\u0432\u043E (\u041E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u043E, \u043F\u0440\u0438 \u043D\u0430\u043B\u0438\u0447\u0438\u0438)", ...field('middleName') }
|
|
1933
|
-
phone: (jsx(PhoneInputControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...getValidation(field('phone'), phoneValidator, input?.required) }
|
|
1934
|
-
email: (jsx(InputControl, { label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", ...getValidation(field('email'), defaultValidator, input?.required) }
|
|
1935
|
-
comment: (jsx(InputControl, { className: "col-span-2", ...getValidation(field('comment'), defaultValidator, input?.required), placeholder: "\u0412\u0430\u0448\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435", isTextarea: true }
|
|
1936
|
-
region: jsx(RegionField, { field: field }
|
|
1931
|
+
surname: (jsx(InputControl, { label: "\u0424\u0430\u043C\u0438\u043B\u0438\u044F", ...getValidation(field('surname'), nameValidator, input?.required) })),
|
|
1932
|
+
name: (jsx(InputControl, { label: "\u0418\u043C\u044F", ...getValidation(field('name'), nameValidator, input?.required) })),
|
|
1933
|
+
middleName: (jsx(InputControl, { label: "\u041E\u0442\u0447\u0435\u0441\u0442\u0432\u043E (\u041E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u043E, \u043F\u0440\u0438 \u043D\u0430\u043B\u0438\u0447\u0438\u0438)", ...field('middleName') })),
|
|
1934
|
+
phone: (jsx(PhoneInputControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...getValidation(field('phone'), phoneValidator, input?.required) })),
|
|
1935
|
+
email: (jsx(InputControl, { label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", ...getValidation(field('email'), defaultValidator, input?.required) })),
|
|
1936
|
+
comment: (jsx(InputControl, { className: "col-span-2", ...getValidation(field('comment'), defaultValidator, input?.required), placeholder: "\u0412\u0430\u0448\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435", isTextarea: true })),
|
|
1937
|
+
region: jsx(RegionField, { field: field }),
|
|
1937
1938
|
client: (jsx(CheckboxWithError, { ...field('isClient'), text: '\u042F\u0432\u043B\u044F\u044E\u0441\u044C \u043A\u043B\u0438\u0435\u043D\u0442\u043E\u043C \u0431\u0430\u043D\u043A\u0430 \u0410\u041E "\u0420\u043E\u0441\u0441\u0435\u043B\u044C\u0445\u043E\u0437\u0431\u0430\u043D\u043A"' })),
|
|
1938
1939
|
birthday: (jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u0440\u043E\u0436\u0434\u0435\u043D\u0438\u044F", ...getValidation(field('birthday'), defaultValidator) })),
|
|
1939
|
-
legend: (jsx("legend", { className: "w-full col-span-2", children: jsx(Heading, { title: input.label, headingType: "h6", className: "@xl:text-center" }) }
|
|
1940
|
+
legend: (jsx("legend", { className: "w-full col-span-2", children: jsx(Heading, { title: input.label, headingType: "h6", className: "@xl:text-center" }) })),
|
|
1940
1941
|
};
|
|
1941
1942
|
return InputsMap[input.name];
|
|
1942
1943
|
};
|
|
@@ -1990,10 +1991,10 @@
|
|
|
1990
1991
|
return status;
|
|
1991
1992
|
}, []);
|
|
1992
1993
|
const [, { field, onSubmit }] = useForm(initialFormState, { onSubmit: handleSubmit });
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
: renderSubmitButton(button)] }) }));
|
|
1994
|
+
const fieldName = getConsentDataProcessing(inputs)?.name;
|
|
1995
|
+
return (jsx(ApplicationFormLayout, { className: style(formStyle$1, className), title: title, responseType: responseType, children: jsxs("form", { className: columnStyle[formColumns], onSubmit: onSubmit, children: [inputs.map((_, index) => (jsx("div", { children: getField(_, field) }, String(index)))), renderAgreementSubmit(fieldName ? field('consentDataProcessing') : undefined, link, button)] }) }));
|
|
1996
1996
|
});
|
|
1997
|
+
const getConsentDataProcessing = (inputs) => inputs.find((_) => _?.name === 'consentDataProcessing');
|
|
1997
1998
|
|
|
1998
1999
|
/** @deprecated */
|
|
1999
2000
|
const AlignStyles = 'text-center';
|
|
@@ -6011,7 +6012,7 @@
|
|
|
6011
6012
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
6012
6013
|
});
|
|
6013
6014
|
|
|
6014
|
-
const packageVersion = "0.14.
|
|
6015
|
+
const packageVersion = "0.14.178";
|
|
6015
6016
|
|
|
6016
6017
|
exports.Blocks = Blocks;
|
|
6017
6018
|
exports.ContentPage = ContentPage;
|