@redneckz/wildless-cms-uni-blocks 0.14.1029 → 0.14.1031
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/api/getSubmitBody.d.ts +4225 -865
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +79 -7
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +10 -0
- package/bundle/components/ApplicationForm/Footnote.d.ts +1 -0
- package/bundle/components/ApplicationForm/renderAgreementSubmit.d.ts +2 -1
- package/bundle/components/ReferalForm/ReferalForm.d.ts +10 -0
- package/bundle/components/ReferalForm/ReferalFormContent.d.ts +14 -0
- package/bundle/components/ReferalForm/ResultLink.d.ts +7 -0
- package/bundle/components/ReferalForm/referalFormData.d.ts +2 -0
- package/bundle/components/ReferalForm/renderLinkInput.d.ts +7 -0
- package/bundle/components/ReferalForm/renderSections.d.ts +3 -0
- package/bundle/model/FormTypeFieldDef.d.ts +1 -1
- package/dist/api/getSubmitBody.d.ts +4225 -865
- package/dist/api/getSubmitBody.js +14 -0
- package/dist/api/getSubmitBody.js.map +1 -1
- package/dist/components/ApplicationForm/ApplicationForm.js +2 -1
- package/dist/components/ApplicationForm/ApplicationForm.js.map +1 -1
- package/dist/components/ApplicationForm/ApplicationFormContent.d.ts +10 -0
- package/dist/components/ApplicationForm/Footnote.d.ts +1 -0
- package/dist/components/ApplicationForm/Footnote.js +1 -1
- package/dist/components/ApplicationForm/Footnote.js.map +1 -1
- package/dist/components/ApplicationForm/renderAgreementSubmit.d.ts +2 -1
- package/dist/components/ApplicationForm/renderAgreementSubmit.js +1 -1
- package/dist/components/ApplicationForm/renderAgreementSubmit.js.map +1 -1
- package/dist/components/Blocks.js +2 -0
- package/dist/components/Blocks.js.map +1 -1
- package/dist/components/Blocks.mobile.js +2 -0
- package/dist/components/Blocks.mobile.js.map +1 -1
- package/dist/components/ReferalForm/ReferalForm.d.ts +10 -0
- package/dist/components/ReferalForm/ReferalForm.js +33 -0
- package/dist/components/ReferalForm/ReferalForm.js.map +1 -0
- package/dist/components/ReferalForm/ReferalFormContent.d.ts +14 -0
- package/dist/components/ReferalForm/ReferalFormContent.js +2 -0
- package/dist/components/ReferalForm/ReferalFormContent.js.map +1 -0
- package/dist/components/ReferalForm/ResultLink.d.ts +7 -0
- package/dist/components/ReferalForm/ResultLink.js +13 -0
- package/dist/components/ReferalForm/ResultLink.js.map +1 -0
- package/dist/components/ReferalForm/referalFormData.d.ts +2 -0
- package/dist/components/ReferalForm/referalFormData.js +19 -0
- package/dist/components/ReferalForm/referalFormData.js.map +1 -0
- package/dist/components/ReferalForm/renderLinkInput.d.ts +7 -0
- package/dist/components/ReferalForm/renderLinkInput.js +20 -0
- package/dist/components/ReferalForm/renderLinkInput.js.map +1 -0
- package/dist/components/ReferalForm/renderSections.d.ts +3 -0
- package/dist/components/ReferalForm/renderSections.js +10 -0
- package/dist/components/ReferalForm/renderSections.js.map +1 -0
- package/dist/hooks/useDadataParty.js +1 -1
- package/dist/hooks/useDadataParty.js.map +1 -1
- package/dist/model/FormTypeFieldDef.d.ts +1 -1
- package/lib/api/getSubmitBody.d.ts +4225 -865
- package/lib/api/getSubmitBody.js +14 -0
- package/lib/api/getSubmitBody.js.map +1 -1
- package/lib/components/ApplicationForm/ApplicationForm.fixture.d.ts +1 -0
- package/lib/components/ApplicationForm/ApplicationForm.js +2 -1
- package/lib/components/ApplicationForm/ApplicationForm.js.map +1 -1
- package/lib/components/ApplicationForm/ApplicationFormContent.d.ts +10 -0
- package/lib/components/ApplicationForm/Footnote.d.ts +1 -0
- package/lib/components/ApplicationForm/Footnote.js +1 -1
- package/lib/components/ApplicationForm/Footnote.js.map +1 -1
- package/lib/components/ApplicationForm/renderAgreementSubmit.d.ts +2 -1
- package/lib/components/ApplicationForm/renderAgreementSubmit.js +1 -1
- package/lib/components/ApplicationForm/renderAgreementSubmit.js.map +1 -1
- package/lib/components/Blocks.js +2 -0
- package/lib/components/Blocks.js.map +1 -1
- package/lib/components/Blocks.mobile.js +2 -0
- package/lib/components/Blocks.mobile.js.map +1 -1
- package/lib/components/ReferalForm/ReferalForm.d.ts +10 -0
- package/lib/components/ReferalForm/ReferalForm.fixture.d.ts +5 -0
- package/lib/components/ReferalForm/ReferalForm.fixture.mobile.d.ts +5 -0
- package/lib/components/ReferalForm/ReferalForm.js +31 -0
- package/lib/components/ReferalForm/ReferalForm.js.map +1 -0
- package/lib/components/ReferalForm/ReferalFormContent.d.ts +14 -0
- package/lib/components/ReferalForm/ReferalFormContent.js +2 -0
- package/lib/components/ReferalForm/ReferalFormContent.js.map +1 -0
- package/lib/components/ReferalForm/ResultLink.d.ts +7 -0
- package/lib/components/ReferalForm/ResultLink.js +11 -0
- package/lib/components/ReferalForm/ResultLink.js.map +1 -0
- package/lib/components/ReferalForm/referalFormData.d.ts +2 -0
- package/lib/components/ReferalForm/referalFormData.js +17 -0
- package/lib/components/ReferalForm/referalFormData.js.map +1 -0
- package/lib/components/ReferalForm/renderLinkInput.d.ts +7 -0
- package/lib/components/ReferalForm/renderLinkInput.js +18 -0
- package/lib/components/ReferalForm/renderLinkInput.js.map +1 -0
- package/lib/components/ReferalForm/renderSections.d.ts +3 -0
- package/lib/components/ReferalForm/renderSections.js +7 -0
- package/lib/components/ReferalForm/renderSections.js.map +1 -0
- package/lib/hooks/useDadataParty.js +1 -1
- package/lib/hooks/useDadataParty.js.map +1 -1
- package/lib/model/FormTypeFieldDef.d.ts +1 -1
- package/mobile/bundle/api/getSubmitBody.d.ts +4225 -865
- package/mobile/bundle/bundle.umd.js +79 -7
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +10 -0
- package/mobile/bundle/components/ApplicationForm/Footnote.d.ts +1 -0
- package/mobile/bundle/components/ApplicationForm/renderAgreementSubmit.d.ts +2 -1
- package/mobile/bundle/components/ReferalForm/ReferalForm.d.ts +10 -0
- package/mobile/bundle/components/ReferalForm/ReferalFormContent.d.ts +14 -0
- package/mobile/bundle/components/ReferalForm/ResultLink.d.ts +7 -0
- package/mobile/bundle/components/ReferalForm/referalFormData.d.ts +2 -0
- package/mobile/bundle/components/ReferalForm/renderLinkInput.d.ts +7 -0
- package/mobile/bundle/components/ReferalForm/renderSections.d.ts +3 -0
- package/mobile/bundle/model/FormTypeFieldDef.d.ts +1 -1
- package/mobile/dist/api/getSubmitBody.d.ts +4225 -865
- package/mobile/dist/api/getSubmitBody.js +14 -0
- package/mobile/dist/api/getSubmitBody.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationForm.js +2 -1
- package/mobile/dist/components/ApplicationForm/ApplicationForm.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormContent.d.ts +10 -0
- package/mobile/dist/components/ApplicationForm/Footnote.d.ts +1 -0
- package/mobile/dist/components/ApplicationForm/Footnote.js +1 -1
- package/mobile/dist/components/ApplicationForm/Footnote.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/renderAgreementSubmit.d.ts +2 -1
- package/mobile/dist/components/ApplicationForm/renderAgreementSubmit.js +1 -1
- package/mobile/dist/components/ApplicationForm/renderAgreementSubmit.js.map +1 -1
- package/mobile/dist/components/Blocks.js +2 -0
- package/mobile/dist/components/Blocks.js.map +1 -1
- package/mobile/dist/components/ReferalForm/ReferalForm.d.ts +10 -0
- package/mobile/dist/components/ReferalForm/ReferalForm.js +33 -0
- package/mobile/dist/components/ReferalForm/ReferalForm.js.map +1 -0
- package/mobile/dist/components/ReferalForm/ReferalFormContent.d.ts +14 -0
- package/mobile/dist/components/ReferalForm/ReferalFormContent.js +2 -0
- package/mobile/dist/components/ReferalForm/ReferalFormContent.js.map +1 -0
- package/mobile/dist/components/ReferalForm/ResultLink.d.ts +7 -0
- package/mobile/dist/components/ReferalForm/ResultLink.js +13 -0
- package/mobile/dist/components/ReferalForm/ResultLink.js.map +1 -0
- package/mobile/dist/components/ReferalForm/referalFormData.d.ts +2 -0
- package/mobile/dist/components/ReferalForm/referalFormData.js +19 -0
- package/mobile/dist/components/ReferalForm/referalFormData.js.map +1 -0
- package/mobile/dist/components/ReferalForm/renderLinkInput.d.ts +7 -0
- package/mobile/dist/components/ReferalForm/renderLinkInput.js +20 -0
- package/mobile/dist/components/ReferalForm/renderLinkInput.js.map +1 -0
- package/mobile/dist/components/ReferalForm/renderSections.d.ts +3 -0
- package/mobile/dist/components/ReferalForm/renderSections.js +10 -0
- package/mobile/dist/components/ReferalForm/renderSections.js.map +1 -0
- package/mobile/dist/hooks/useDadataParty.js +1 -1
- package/mobile/dist/hooks/useDadataParty.js.map +1 -1
- package/mobile/dist/model/FormTypeFieldDef.d.ts +1 -1
- package/mobile/lib/api/getSubmitBody.d.ts +4225 -865
- package/mobile/lib/api/getSubmitBody.js +14 -0
- package/mobile/lib/api/getSubmitBody.js.map +1 -1
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationForm.js +2 -1
- package/mobile/lib/components/ApplicationForm/ApplicationForm.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormContent.d.ts +10 -0
- package/mobile/lib/components/ApplicationForm/Footnote.d.ts +1 -0
- 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 +2 -1
- package/mobile/lib/components/ApplicationForm/renderAgreementSubmit.js +1 -1
- package/mobile/lib/components/ApplicationForm/renderAgreementSubmit.js.map +1 -1
- package/mobile/lib/components/Blocks.js +2 -0
- package/mobile/lib/components/Blocks.js.map +1 -1
- package/mobile/lib/components/ReferalForm/ReferalForm.d.ts +10 -0
- package/mobile/lib/components/ReferalForm/ReferalForm.js +31 -0
- package/mobile/lib/components/ReferalForm/ReferalForm.js.map +1 -0
- package/mobile/lib/components/ReferalForm/ReferalFormContent.d.ts +14 -0
- package/mobile/lib/components/ReferalForm/ReferalFormContent.js +2 -0
- package/mobile/lib/components/ReferalForm/ReferalFormContent.js.map +1 -0
- package/mobile/lib/components/ReferalForm/ResultLink.d.ts +7 -0
- package/mobile/lib/components/ReferalForm/ResultLink.js +11 -0
- package/mobile/lib/components/ReferalForm/ResultLink.js.map +1 -0
- package/mobile/lib/components/ReferalForm/referalFormData.d.ts +2 -0
- package/mobile/lib/components/ReferalForm/referalFormData.js +17 -0
- package/mobile/lib/components/ReferalForm/referalFormData.js.map +1 -0
- package/mobile/lib/components/ReferalForm/renderLinkInput.d.ts +7 -0
- package/mobile/lib/components/ReferalForm/renderLinkInput.js +18 -0
- package/mobile/lib/components/ReferalForm/renderLinkInput.js.map +1 -0
- package/mobile/lib/components/ReferalForm/renderSections.d.ts +3 -0
- package/mobile/lib/components/ReferalForm/renderSections.js +7 -0
- package/mobile/lib/components/ReferalForm/renderSections.js.map +1 -0
- package/mobile/lib/hooks/useDadataParty.js +1 -1
- package/mobile/lib/hooks/useDadataParty.js.map +1 -1
- package/mobile/lib/model/FormTypeFieldDef.d.ts +1 -1
- package/mobile/src/api/getSubmitBody.ts +17 -0
- package/mobile/src/components/ApplicationForm/ApplicationForm.example.json +38 -0
- package/mobile/src/components/ApplicationForm/ApplicationForm.tsx +2 -0
- package/mobile/src/components/ApplicationForm/ApplicationFormContent.ts +10 -0
- package/mobile/src/components/ApplicationForm/Footnote.tsx +10 -1
- package/mobile/src/components/ApplicationForm/renderAgreementSubmit.tsx +7 -1
- package/mobile/src/components/Blocks.ts +2 -0
- package/mobile/src/components/ReferalForm/ReferalForm.example.json +8 -0
- package/mobile/src/components/ReferalForm/ReferalForm.tsx +80 -0
- package/mobile/src/components/ReferalForm/ReferalForm.ui.json +12 -0
- package/mobile/src/components/ReferalForm/ReferalFormContent.ts +15 -0
- package/mobile/src/components/ReferalForm/ResultLink.tsx +23 -0
- package/mobile/src/components/ReferalForm/referalFormData.ts +18 -0
- package/mobile/src/components/ReferalForm/renderLinkInput.tsx +35 -0
- package/mobile/src/components/ReferalForm/renderSections.tsx +18 -0
- package/mobile/src/hooks/useDadataParty.ts +1 -1
- package/mobile/src/model/FormTypeFieldDef.ts +2 -1
- package/package.json +1 -1
- package/src/api/getSubmitBody.ts +17 -0
- package/src/components/ApplicationForm/ApplicationForm.example.json +38 -0
- package/src/components/ApplicationForm/ApplicationForm.fixture.tsx +36 -0
- package/src/components/ApplicationForm/ApplicationForm.tsx +2 -0
- package/src/components/ApplicationForm/ApplicationFormContent.ts +10 -0
- package/src/components/ApplicationForm/Footnote.tsx +10 -1
- package/src/components/ApplicationForm/renderAgreementSubmit.tsx +7 -1
- package/src/components/Blocks.mobile.ts +2 -0
- package/src/components/Blocks.ts +2 -0
- package/src/components/ReferalForm/ReferalForm.example.json +8 -0
- package/src/components/ReferalForm/ReferalForm.fixture.mobile.tsx +24 -0
- package/src/components/ReferalForm/ReferalForm.fixture.tsx +24 -0
- package/src/components/ReferalForm/ReferalForm.tsx +80 -0
- package/src/components/ReferalForm/ReferalForm.ui.json +12 -0
- package/src/components/ReferalForm/ReferalFormContent.ts +15 -0
- package/src/components/ReferalForm/ResultLink.tsx +23 -0
- package/src/components/ReferalForm/referalFormData.ts +18 -0
- package/src/components/ReferalForm/renderLinkInput.tsx +35 -0
- package/src/components/ReferalForm/renderSections.tsx +18 -0
- package/src/hooks/useDadataParty.ts +1 -1
- package/src/icons/IconName.ts +4 -4
- package/src/model/FormTypeFieldDef.ts +2 -1
|
@@ -1655,6 +1655,7 @@
|
|
|
1655
1655
|
}),
|
|
1656
1656
|
...getRkoTariffName(typeForm),
|
|
1657
1657
|
...staticBody,
|
|
1658
|
+
...getReferalRkoData(body, typeForm),
|
|
1658
1659
|
};
|
|
1659
1660
|
};
|
|
1660
1661
|
const getPhoneBody = (phone) => {
|
|
@@ -1690,6 +1691,19 @@
|
|
|
1690
1691
|
partnerComments: globalThis?.sessionStorage.getItem('rkoTariffName') ?? 'Неизвестный тариф',
|
|
1691
1692
|
}
|
|
1692
1693
|
: {};
|
|
1694
|
+
const getReferalRkoData = (body, typeForm) => {
|
|
1695
|
+
const params = new URLSearchParams(decodeURIComponent(globalThis.location?.search));
|
|
1696
|
+
const partnerComments = params.get('utm_mail');
|
|
1697
|
+
const partner = params.get('utm_source');
|
|
1698
|
+
return typeForm === 'REF'
|
|
1699
|
+
? {
|
|
1700
|
+
name: body.fullName,
|
|
1701
|
+
fullName: undefined,
|
|
1702
|
+
partnerComments,
|
|
1703
|
+
partner,
|
|
1704
|
+
}
|
|
1705
|
+
: {};
|
|
1706
|
+
};
|
|
1693
1707
|
|
|
1694
1708
|
// eslint-disable-next-line max-lines-per-function
|
|
1695
1709
|
function LeadServiceAPI() {
|
|
@@ -2530,11 +2544,11 @@
|
|
|
2530
2544
|
});
|
|
2531
2545
|
const renderText$3 = (text, aboveText) => text || aboveText ? (jsxs("div", { className: "whitespace-pre", children: [aboveText ? jsx("div", { className: "font-light text-left text-xs", children: aboveText }) : null, jsx("div", { className: style('text-left', { 'text-s -mt-3xs': Boolean(aboveText) }), children: text })] })) : null;
|
|
2532
2546
|
|
|
2533
|
-
const Footnote = JSX(({ text, link }) => (jsxs(Paragraph, { size: "text-l", font: "font-light", color: "text-secondary-text", children: [text ? jsx(Text, { children: text }) : null, link ? (jsx(Link, { ...link, ariaLabel: "\u0443\u0441\u043B\u043E\u0432\u0438\u044F \u043F\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0434\u0430\u043D\u043D\u044B\u0445", children: link.text })) : null] })));
|
|
2547
|
+
const Footnote = JSX(({ text, link, additionalLink }) => (jsxs(Paragraph, { size: "text-l", font: "font-light", color: "text-secondary-text", children: [text ? jsx(Text, { children: text }) : null, link ? (jsx(Link, { ...link, ariaLabel: "\u0443\u0441\u043B\u043E\u0432\u0438\u044F \u043F\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0434\u0430\u043D\u043D\u044B\u0445", children: link.text })) : null, additionalLink ? (jsxs(Text, { children: [' и ', jsx(Link, { ...additionalLink, ariaLabel: "\u0443\u0441\u043B\u043E\u0432\u0438\u044F \u043F\u0440\u043E\u0432\u0435\u0434\u0435\u043D\u0438\u044F \u0430\u043A\u0446\u0438\u0438", children: additionalLink.text })] })) : null] })));
|
|
2534
2548
|
|
|
2535
2549
|
const agreementText = 'Нажимая кнопку, вы подтверждаете согласие с ';
|
|
2536
2550
|
const agreementTextPF = 'Нажимая на кнопку, вы подтверждаете, что клиент дал согласие на ';
|
|
2537
|
-
const renderAgreementSubmit = ({ consentDataProcessing, link, button, typeForm, }) => (jsxs("div", { className: "flex col-span-2 gap-xs flex-col w-full items-baseline", children: [consentDataProcessing ? (jsxs("div", { children: [jsxs("div", { className: "flex gap-3 items-center", children: [jsx(Checkbox, { ...consentDataProcessing }), jsx(Footnote, { link: link })] }), renderErrorText(withValidator(consentDataProcessing, agreementValidator).error)] })) : (jsx(Footnote, { text: typeForm === 'PF' ? agreementTextPF : agreementText, link: link })), jsx(SubmitButton$1, { className: "w-full @xl:w-auto", children: button?.text ? button.text : 'Отправить заявку' })] }));
|
|
2551
|
+
const renderAgreementSubmit = ({ consentDataProcessing, link, additionalLink, button, typeForm, }) => (jsxs("div", { className: "flex col-span-2 gap-xs flex-col w-full items-baseline", children: [consentDataProcessing ? (jsxs("div", { children: [jsxs("div", { className: "flex gap-3 items-center", children: [jsx(Checkbox, { ...consentDataProcessing }), jsx(Footnote, { link: link })] }), renderErrorText(withValidator(consentDataProcessing, agreementValidator).error)] })) : (jsx(Footnote, { text: typeForm === 'PF' ? agreementTextPF : agreementText, link: link, additionalLink: additionalLink })), jsx(SubmitButton$1, { className: "w-full @xl:w-auto", children: button?.text ? button.text : 'Отправить заявку' })] }));
|
|
2538
2552
|
|
|
2539
2553
|
const renderContacts = () => (jsxs("div", { className: "space-y-m", children: [jsx(Heading, { headingType: "h6", title: "\u0418\u043B\u0438 \u0441\u0432\u044F\u0436\u0438\u0442\u0435\u0441\u044C \u0441 \u043D\u0430\u043C\u0438 \u0443\u0434\u043E\u0431\u043D\u044B\u043C \u0441\u043F\u043E\u0441\u043E\u0431\u043E\u043C", className: "@xl:text-center" }), jsxs("div", { className: "flex sm:justify-center gap-xl", children: [jsxs("a", { className: "flex gap-s items-center text-primary-text no-underline", href: `tel:8 (800) 200-78-70`, "aria-label": "\u0442\u0435\u043B\u0435\u0444\u043E\u043D 8 (800) 200-78-70", children: [jsx(Img, { image: { icon: 'PhoneIcon' }, width: "24", height: "24" }), jsx("span", { children: "8 (800) 200-78-70" })] }), jsxs("a", { className: "flex gap-s items-center text-primary-text no-underline", "aria-label": "\u043F\u043E\u0447\u0442\u0430 ved@rshb.ru", href: `mailto:ved@rshb.ru`, children: [jsx(Img, { image: { icon: 'MailIcon' }, width: "24", height: "24" }), jsx("span", { children: "ved@rshb.ru" })] })] })] }));
|
|
2540
2554
|
|
|
@@ -3077,7 +3091,7 @@
|
|
|
3077
3091
|
};
|
|
3078
3092
|
|
|
3079
3093
|
const INN_DADATA_URL = 'suggest/party';
|
|
3080
|
-
const useDadataParty = async (searchQuery) => (await getDaDataHints({ url: INN_DADATA_URL, query: searchQuery }))
|
|
3094
|
+
const useDadataParty = async (searchQuery) => (await getDaDataHints({ url: INN_DADATA_URL, query: searchQuery }))?.map((_) => ({
|
|
3081
3095
|
fullName: _?.value,
|
|
3082
3096
|
address: _?.data?.address?.value,
|
|
3083
3097
|
inn: _?.data?.inn,
|
|
@@ -3825,7 +3839,7 @@
|
|
|
3825
3839
|
|
|
3826
3840
|
const renderTitle = (title) => title ? (jsx("div", { className: "@xl:text-center @xl:col-span-2 mb-m", children: jsx(Text, { size: "text-h6", children: title }) })) : null;
|
|
3827
3841
|
|
|
3828
|
-
const renderSections = (sections, field, { typeForm, additionalParams }) => sections.map((_, i) => (jsxs("div", { className: style(inputColumnStyles(_.columns), 'grid'), children: [renderTitle(_.title), (_?.inputs || [])?.map(getField(field, { typeForm, ...additionalParams }))] }, `section-${i}`)));
|
|
3842
|
+
const renderSections$1 = (sections, field, { typeForm, additionalParams }) => sections.map((_, i) => (jsxs("div", { className: style(inputColumnStyles(_.columns), 'grid'), children: [renderTitle(_.title), (_?.inputs || [])?.map(getField(field, { typeForm, ...additionalParams }))] }, `section-${i}`)));
|
|
3829
3843
|
|
|
3830
3844
|
const useInterval = (handler, period) => {
|
|
3831
3845
|
const timer = useRef(null);
|
|
@@ -3999,7 +4013,7 @@
|
|
|
3999
4013
|
};
|
|
4000
4014
|
const ApplicationForm = UniBlock(
|
|
4001
4015
|
// eslint-disable-next-line max-lines-per-function
|
|
4002
|
-
({ className, title, typeForm = '', sections = [], button, link, endpoint, additionalParams, withSnowplow, isContacts, data, onSuccess, ...rest }) => {
|
|
4016
|
+
({ className, title, typeForm = '', sections = [], button, link, additionalLink, endpoint, additionalParams, withSnowplow, isContacts, data, onSuccess, ...rest }) => {
|
|
4003
4017
|
const inputs = useMemo(() => (sections?.flatMap((_) => _?.inputs) || []), [sections]);
|
|
4004
4018
|
const initialFormState = useMemo(() => getInitialFormState$2(inputs, typeForm), [inputs, typeForm]);
|
|
4005
4019
|
const router = useRouter();
|
|
@@ -4031,9 +4045,10 @@
|
|
|
4031
4045
|
});
|
|
4032
4046
|
const fieldName = getConsentDataProcessing(inputs)?.name;
|
|
4033
4047
|
const consentDataProcessing = fieldName ? field('consentDataProcessing') : undefined;
|
|
4034
|
-
return (jsxs(ApplicationFormLayout, { className: style('container space-y-m', className), title: title, ...rest, children: [jsxs("form", { onSubmit: onSubmit, children: [renderSections(sections, field, { typeForm, additionalParams }), renderAgreementSubmit({
|
|
4048
|
+
return (jsxs(ApplicationFormLayout, { className: style('container space-y-m', className), title: title, ...rest, children: [jsxs("form", { onSubmit: onSubmit, children: [renderSections$1(sections, field, { typeForm, additionalParams }), renderAgreementSubmit({
|
|
4035
4049
|
consentDataProcessing,
|
|
4036
4050
|
link,
|
|
4051
|
+
additionalLink,
|
|
4037
4052
|
button,
|
|
4038
4053
|
typeForm,
|
|
4039
4054
|
})] }), isContacts ? renderContacts() : null] }));
|
|
@@ -13548,6 +13563,62 @@
|
|
|
13548
13563
|
return (jsxs(BlockWrapper, { className: style('p-6xl space-y-xl', className), defaultPadding: "p-0", ...rest, children: [jsx(Heading, { className: "mb-xl", children: title }), isArchive ? renderDataPickForm() : null, ratesList.map((list, i) => (jsx(RatesTableItem, { list: list, isRatesValid: isRatesValid, isArchive: isArchive, infoMessage: infoMessage }, String(i)))), href ? renderLink(href) : null] }));
|
|
13549
13564
|
});
|
|
13550
13565
|
|
|
13566
|
+
const sections = [
|
|
13567
|
+
{ title: 'Заполните ваши данные и получите персональную ссылку', inputs: [] },
|
|
13568
|
+
{
|
|
13569
|
+
columns: 2,
|
|
13570
|
+
inputs: [
|
|
13571
|
+
{
|
|
13572
|
+
name: 'dadataPartyInnSelect',
|
|
13573
|
+
required: true,
|
|
13574
|
+
},
|
|
13575
|
+
{
|
|
13576
|
+
name: 'email',
|
|
13577
|
+
required: true,
|
|
13578
|
+
},
|
|
13579
|
+
],
|
|
13580
|
+
},
|
|
13581
|
+
];
|
|
13582
|
+
|
|
13583
|
+
const renderSections = (sections, field) => sections.map((_, i) => (jsxs("div", { className: style(inputColumnStyles(_.columns), 'grid'), children: [renderTitle(_.title), (_?.inputs || [])?.map(getField(field))] }, `section-${i}`)));
|
|
13584
|
+
|
|
13585
|
+
const renderLinkInput = JSX(({ className, value = '', copyIcon }) => {
|
|
13586
|
+
const onClick = useCallback(async () => {
|
|
13587
|
+
try {
|
|
13588
|
+
await globalThis.navigator.clipboard.writeText(value);
|
|
13589
|
+
}
|
|
13590
|
+
catch {
|
|
13591
|
+
console.log('Ошибка копирования');
|
|
13592
|
+
}
|
|
13593
|
+
}, []);
|
|
13594
|
+
return (jsxs("div", { className: style('relative flex items-center max-w-lg m-auto', className), children: [jsx("input", { className: style('h-14 border-gray text-ellipsis pr-5xl', defaultStyle$1), type: "text", value: value, disabled: true }), jsx("div", { role: "button", className: "absolute right-3", onClick: onClick, children: jsx(Img, { image: copyIcon }) })] }));
|
|
13595
|
+
});
|
|
13596
|
+
|
|
13597
|
+
const ResultLink = JSX(({ link, copyIcon }) => {
|
|
13598
|
+
return (jsxs("div", { children: [jsx("div", { className: "@xl:text-center @xl:col-span-2 mb-m", children: jsx(Text, { size: "text-h6", children: "\u0421\u043A\u043E\u043F\u0438\u0440\u0443\u0439\u0442\u0435 \u0441\u0441\u044B\u043B\u043A\u0443 \u0438 \u043E\u0442\u043F\u0440\u0430\u0432\u044C\u0442\u0435 \u0434\u0440\u0443\u0433\u0443" }) }), renderLinkInput({
|
|
13599
|
+
value: link,
|
|
13600
|
+
copyIcon,
|
|
13601
|
+
})] }));
|
|
13602
|
+
});
|
|
13603
|
+
|
|
13604
|
+
const ReferalForm = UniBlock(({ link = '', button, copyIcon, ...rest }) => {
|
|
13605
|
+
const [isShowResultLink, setIsShowResultLink] = useState(false);
|
|
13606
|
+
const [referalLink, setReferalLink] = useState('');
|
|
13607
|
+
const inputs = useMemo(() => (sections?.flatMap((_) => _?.inputs) || []), [sections]);
|
|
13608
|
+
const formValidator = useMemo(() => getFormValidator(inputs), [inputs]);
|
|
13609
|
+
const handleSubmit = useCallback(async (formData) => {
|
|
13610
|
+
setReferalLink(`${link}?utm_source=${formData.dadataPartyInnSelect?.text}&utm_mail=${formData.email}`);
|
|
13611
|
+
setIsShowResultLink(true);
|
|
13612
|
+
}, []);
|
|
13613
|
+
const [, { field, onSubmit }] = useForm({}, {
|
|
13614
|
+
resetOnSubmit: true,
|
|
13615
|
+
formValidator,
|
|
13616
|
+
onSubmit: handleSubmit,
|
|
13617
|
+
});
|
|
13618
|
+
return (jsx(ApplicationFormLayout, { className: "container space-y-m col-span-12", title: getTitle(isShowResultLink), ...rest, children: isShowResultLink ? (jsx(ResultLink, { link: referalLink, copyIcon: copyIcon })) : (jsxs("form", { onSubmit: onSubmit, children: [renderSections(sections, field), jsxs(Paragraph, { size: "text-l", font: "font-light", color: "text-secondary-text", children: [jsx(Text, { children: "\u041D\u0430\u0436\u0438\u043C\u0430\u044F \u043A\u043D\u043E\u043F\u043A\u0443, \u0432\u044B \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u0435\u0442\u0435 \u0441\u043E\u0433\u043B\u0430\u0441\u0438\u0435 \u0441 " }), jsx(Link, { href: "/privacy-policy", target: "_blank", ariaLabel: "\u0443\u0441\u043B\u043E\u0432\u0438\u044F \u043F\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0434\u0430\u043D\u043D\u044B\u0445", children: "\u0443\u0441\u043B\u043E\u0432\u0438\u044F\u043C\u0438 \u043F\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0434\u0430\u043D\u043D\u044B\u0445" })] }), jsx(SubmitButton$1, { className: "w-full @xl:w-auto mt-xs", children: button?.text ?? 'Получить ссылку' })] })) }));
|
|
13619
|
+
});
|
|
13620
|
+
const getTitle = (isShowResultLink = false) => isShowResultLink ? 'Ваша личная ссылка' : 'Как получить бесплатное обслуживание счёта';
|
|
13621
|
+
|
|
13551
13622
|
const RichTextBlock = UniBlock((props) => {
|
|
13552
13623
|
const { __html, dynamicQueryParamText = {}, dynamicTextSource, richVersion = '', ...rest } = props;
|
|
13553
13624
|
const formatText = getFormatDynamicText(dynamicQueryParamText, dynamicTextSource?.list, __html);
|
|
@@ -14191,6 +14262,7 @@
|
|
|
14191
14262
|
CalculatorRko,
|
|
14192
14263
|
RkoTariffCardsTable,
|
|
14193
14264
|
RatesTable,
|
|
14265
|
+
ReferalForm,
|
|
14194
14266
|
};
|
|
14195
14267
|
|
|
14196
14268
|
const applyAspects = (aspects) => (ev) => {
|
|
@@ -14315,7 +14387,7 @@
|
|
|
14315
14387
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
14316
14388
|
});
|
|
14317
14389
|
|
|
14318
|
-
const packageVersion = "0.14.
|
|
14390
|
+
const packageVersion = "0.14.1030";
|
|
14319
14391
|
|
|
14320
14392
|
exports.Blocks = Blocks;
|
|
14321
14393
|
exports.ContentPage = ContentPage;
|