@redneckz/wildless-cms-uni-blocks 0.14.1029 → 0.14.1030
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 +85 -9
- 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 +11 -0
- package/bundle/components/ReferalForm/ResultLink.d.ts +5 -0
- package/bundle/components/ReferalForm/referalFormData.d.ts +2 -0
- package/bundle/components/ReferalForm/renderLinkInput.d.ts +2 -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/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 +11 -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 +5 -0
- package/dist/components/ReferalForm/ResultLink.js +12 -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 +2 -0
- package/dist/components/ReferalForm/renderLinkInput.js +25 -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/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 +11 -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 +5 -0
- package/lib/components/ReferalForm/ResultLink.js +10 -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 +2 -0
- package/lib/components/ReferalForm/renderLinkInput.js +23 -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 +20 -5
- 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 +11 -0
- package/mobile/bundle/components/ReferalForm/ResultLink.d.ts +5 -0
- package/mobile/bundle/components/ReferalForm/referalFormData.d.ts +2 -0
- package/mobile/bundle/components/ReferalForm/renderLinkInput.d.ts +2 -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/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 +11 -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 +5 -0
- package/mobile/dist/components/ReferalForm/ResultLink.js +12 -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 +2 -0
- package/mobile/dist/components/ReferalForm/renderLinkInput.js +25 -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/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 +11 -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 +5 -0
- package/mobile/lib/components/ReferalForm/ResultLink.js +10 -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 +2 -0
- package/mobile/lib/components/ReferalForm/renderLinkInput.js +23 -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/ReferalForm/ReferalForm.example.json +8 -0
- package/mobile/src/components/ReferalForm/ReferalForm.tsx +78 -0
- package/mobile/src/components/ReferalForm/ReferalForm.ui.json +1 -0
- package/mobile/src/components/ReferalForm/ReferalFormContent.ts +12 -0
- package/mobile/src/components/ReferalForm/ResultLink.tsx +20 -0
- package/mobile/src/components/ReferalForm/referalFormData.ts +18 -0
- package/mobile/src/components/ReferalForm/renderLinkInput.tsx +37 -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.ts +2 -0
- package/src/components/ReferalForm/ReferalForm.example.json +8 -0
- package/src/components/ReferalForm/ReferalForm.fixture.mobile.tsx +16 -0
- package/src/components/ReferalForm/ReferalForm.fixture.tsx +16 -0
- package/src/components/ReferalForm/ReferalForm.tsx +78 -0
- package/src/components/ReferalForm/ReferalForm.ui.json +1 -0
- package/src/components/ReferalForm/ReferalFormContent.ts +12 -0
- package/src/components/ReferalForm/ResultLink.tsx +20 -0
- package/src/components/ReferalForm/referalFormData.ts +18 -0
- package/src/components/ReferalForm/renderLinkInput.tsx +37 -0
- package/src/components/ReferalForm/renderSections.tsx +18 -0
- package/src/hooks/useDadataParty.ts +1 -1
- package/src/model/FormTypeFieldDef.ts +2 -1
package/bundle/bundle.umd.js
CHANGED
|
@@ -1647,6 +1647,7 @@
|
|
|
1647
1647
|
}),
|
|
1648
1648
|
...getRkoTariffName(typeForm),
|
|
1649
1649
|
...staticBody,
|
|
1650
|
+
...getReferalRkoData(body, typeForm),
|
|
1650
1651
|
};
|
|
1651
1652
|
};
|
|
1652
1653
|
const getPhoneBody = (phone) => {
|
|
@@ -1682,6 +1683,19 @@
|
|
|
1682
1683
|
partnerComments: globalThis?.sessionStorage.getItem('rkoTariffName') ?? 'Неизвестный тариф',
|
|
1683
1684
|
}
|
|
1684
1685
|
: {};
|
|
1686
|
+
const getReferalRkoData = (body, typeForm) => {
|
|
1687
|
+
const params = new URLSearchParams(decodeURIComponent(globalThis.location?.search));
|
|
1688
|
+
const partnerComments = params.get('utm_mail');
|
|
1689
|
+
const partner = params.get('utm_source');
|
|
1690
|
+
return typeForm === 'REF'
|
|
1691
|
+
? {
|
|
1692
|
+
name: body.fullName,
|
|
1693
|
+
fullName: undefined,
|
|
1694
|
+
partnerComments,
|
|
1695
|
+
partner,
|
|
1696
|
+
}
|
|
1697
|
+
: {};
|
|
1698
|
+
};
|
|
1685
1699
|
|
|
1686
1700
|
// eslint-disable-next-line max-lines-per-function
|
|
1687
1701
|
function LeadServiceAPI() {
|
|
@@ -2522,11 +2536,11 @@
|
|
|
2522
2536
|
});
|
|
2523
2537
|
const renderText$2 = (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;
|
|
2524
2538
|
|
|
2525
|
-
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] })));
|
|
2539
|
+
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] })));
|
|
2526
2540
|
|
|
2527
2541
|
const agreementText = 'Нажимая кнопку, вы подтверждаете согласие с ';
|
|
2528
2542
|
const agreementTextPF = 'Нажимая на кнопку, вы подтверждаете, что клиент дал согласие на ';
|
|
2529
|
-
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 : 'Отправить заявку' })] }));
|
|
2543
|
+
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 : 'Отправить заявку' })] }));
|
|
2530
2544
|
|
|
2531
2545
|
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" })] })] })] }));
|
|
2532
2546
|
|
|
@@ -3069,7 +3083,7 @@
|
|
|
3069
3083
|
};
|
|
3070
3084
|
|
|
3071
3085
|
const INN_DADATA_URL = 'suggest/party';
|
|
3072
|
-
const useDadataParty = async (searchQuery) => (await getDaDataHints({ url: INN_DADATA_URL, query: searchQuery }))
|
|
3086
|
+
const useDadataParty = async (searchQuery) => (await getDaDataHints({ url: INN_DADATA_URL, query: searchQuery }))?.map((_) => ({
|
|
3073
3087
|
fullName: _?.value,
|
|
3074
3088
|
address: _?.data?.address?.value,
|
|
3075
3089
|
inn: _?.data?.inn,
|
|
@@ -3817,7 +3831,7 @@
|
|
|
3817
3831
|
|
|
3818
3832
|
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;
|
|
3819
3833
|
|
|
3820
|
-
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}`)));
|
|
3834
|
+
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}`)));
|
|
3821
3835
|
|
|
3822
3836
|
const useInterval = (handler, period) => {
|
|
3823
3837
|
const timer = useRef(null);
|
|
@@ -3991,7 +4005,7 @@
|
|
|
3991
4005
|
};
|
|
3992
4006
|
const ApplicationForm = UniBlock(
|
|
3993
4007
|
// eslint-disable-next-line max-lines-per-function
|
|
3994
|
-
({ className, title, typeForm = '', sections = [], button, link, endpoint, additionalParams, withSnowplow, isContacts, data, onSuccess, ...rest }) => {
|
|
4008
|
+
({ className, title, typeForm = '', sections = [], button, link, additionalLink, endpoint, additionalParams, withSnowplow, isContacts, data, onSuccess, ...rest }) => {
|
|
3995
4009
|
const inputs = useMemo(() => (sections?.flatMap((_) => _?.inputs) || []), [sections]);
|
|
3996
4010
|
const initialFormState = useMemo(() => getInitialFormState$2(inputs, typeForm), [inputs, typeForm]);
|
|
3997
4011
|
const router = useRouter();
|
|
@@ -4023,9 +4037,10 @@
|
|
|
4023
4037
|
});
|
|
4024
4038
|
const fieldName = getConsentDataProcessing(inputs)?.name;
|
|
4025
4039
|
const consentDataProcessing = fieldName ? field('consentDataProcessing') : undefined;
|
|
4026
|
-
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({
|
|
4040
|
+
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({
|
|
4027
4041
|
consentDataProcessing,
|
|
4028
4042
|
link,
|
|
4043
|
+
additionalLink,
|
|
4029
4044
|
button,
|
|
4030
4045
|
typeForm,
|
|
4031
4046
|
})] }), isContacts ? renderContacts() : null] }));
|
|
@@ -12596,8 +12611,8 @@
|
|
|
12596
12611
|
return (jsxs("tr", { className: "pb-2xs text-h6", children: [jsx("td", { className: "pt-m m-auto flex text-left", children: jsxs("div", { className: "flex items-center gap-xs", children: [currency ? (jsx(Img, { image: { icon: CURRENCY_ICONS_MAP[currency] }, width: "24", height: "24" })) : null, jsx(Text, { size: "text-h6", children: currency })] }) }), jsx("td", { className: "pt-m pl-5xl text-center", children: jsx(Text, { size: "text-h6", children: formatCurrency(exchangeCurrencyItem?.saleExchangeRate) }) }), jsx("td", { className: "pt-m pl-5xl text-right", children: jsx(Text, { size: "text-h6", children: formatCurrency(exchangeCurrencyItem?.buyExchangeRate) }) })] }, currency));
|
|
12597
12612
|
};
|
|
12598
12613
|
|
|
12599
|
-
const icon = { icon: 'GpsIcon' };
|
|
12600
|
-
const CurrentLocation = JSX(({ className = '', address }) => (jsxs("div", { className: style('flex gap-s w-full justify-between @sm:justify-center', className), children: [jsx(RoundedIcon, { ...icon, iconBgVersion: "primary", className: "shrink-0" }), jsxs("div", { className: "space-y-2xs whitespace-pre-wrap", children: [address ? (jsx(Paragraph, { size: "text-l", color: "text-primary-main", children: address })) : null, jsx(Paragraph, { size: "text-m", color: "text-secondary-text", children: "\u041A\u0443\u0440\u0441 \u0443\u043A\u0430\u0437\u0430\u043D \u0434\u043B\u044F \u0437\u0430\u0434\u0430\u043D\u043D\u043E\u0433\u043E \u043E\u0444\u0438\u0441\u0430" })] })] })));
|
|
12614
|
+
const icon$1 = { icon: 'GpsIcon' };
|
|
12615
|
+
const CurrentLocation = JSX(({ className = '', address }) => (jsxs("div", { className: style('flex gap-s w-full justify-between @sm:justify-center', className), children: [jsx(RoundedIcon, { ...icon$1, iconBgVersion: "primary", className: "shrink-0" }), jsxs("div", { className: "space-y-2xs whitespace-pre-wrap", children: [address ? (jsx(Paragraph, { size: "text-l", color: "text-primary-main", children: address })) : null, jsx(Paragraph, { size: "text-m", color: "text-secondary-text", children: "\u041A\u0443\u0440\u0441 \u0443\u043A\u0430\u0437\u0430\u043D \u0434\u043B\u044F \u0437\u0430\u0434\u0430\u043D\u043D\u043E\u0433\u043E \u043E\u0444\u0438\u0441\u0430" })] })] })));
|
|
12601
12616
|
|
|
12602
12617
|
const roundTo = (value, precision = 2) => {
|
|
12603
12618
|
const factor = 10 ** precision;
|
|
@@ -14006,6 +14021,66 @@
|
|
|
14006
14021
|
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] }));
|
|
14007
14022
|
});
|
|
14008
14023
|
|
|
14024
|
+
const sections = [
|
|
14025
|
+
{ title: 'Заполните ваши данные и получите персональную ссылку', inputs: [] },
|
|
14026
|
+
{
|
|
14027
|
+
columns: 2,
|
|
14028
|
+
inputs: [
|
|
14029
|
+
{
|
|
14030
|
+
name: 'dadataPartyInnSelect',
|
|
14031
|
+
required: true,
|
|
14032
|
+
},
|
|
14033
|
+
{
|
|
14034
|
+
name: 'email',
|
|
14035
|
+
required: true,
|
|
14036
|
+
},
|
|
14037
|
+
],
|
|
14038
|
+
},
|
|
14039
|
+
];
|
|
14040
|
+
|
|
14041
|
+
const renderSections = (sections, field) => sections.map((_, i) => (jsxs("div", { className: style(inputColumnStyles(_.columns), 'grid'), children: [renderTitle(_.title), (_?.inputs || [])?.map(getField(field))] }, `section-${i}`)));
|
|
14042
|
+
|
|
14043
|
+
const icon = {
|
|
14044
|
+
src: 'CopyIcon.svg',
|
|
14045
|
+
iconVersion: 'normal',
|
|
14046
|
+
size: { width: 20 },
|
|
14047
|
+
};
|
|
14048
|
+
const renderLinkInput = JSX(({ className, value = '' }) => {
|
|
14049
|
+
const onClick = useCallback(async () => {
|
|
14050
|
+
try {
|
|
14051
|
+
await globalThis.navigator.clipboard.writeText(value);
|
|
14052
|
+
}
|
|
14053
|
+
catch {
|
|
14054
|
+
console.log('Ошибка копирования');
|
|
14055
|
+
}
|
|
14056
|
+
}, []);
|
|
14057
|
+
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: icon }) })] }));
|
|
14058
|
+
});
|
|
14059
|
+
|
|
14060
|
+
const ResultLink = JSX(({ link }) => {
|
|
14061
|
+
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({
|
|
14062
|
+
value: link,
|
|
14063
|
+
})] }));
|
|
14064
|
+
});
|
|
14065
|
+
|
|
14066
|
+
const ReferalForm = UniBlock(({ link = '', button, ...rest }) => {
|
|
14067
|
+
const [isShowResultLink, setIsShowResultLink] = useState(false);
|
|
14068
|
+
const [referalLink, setReferalLink] = useState('');
|
|
14069
|
+
const inputs = useMemo(() => (sections?.flatMap((_) => _?.inputs) || []), [sections]);
|
|
14070
|
+
const formValidator = useMemo(() => getFormValidator(inputs), [inputs]);
|
|
14071
|
+
const handleSubmit = useCallback(async (formData) => {
|
|
14072
|
+
setReferalLink(`${link}?utm_source=${formData.dadataPartyInnSelect?.text}&utm_mail=${formData.email}`);
|
|
14073
|
+
setIsShowResultLink(true);
|
|
14074
|
+
}, []);
|
|
14075
|
+
const [, { field, onSubmit }] = useForm({}, {
|
|
14076
|
+
resetOnSubmit: true,
|
|
14077
|
+
formValidator,
|
|
14078
|
+
onSubmit: handleSubmit,
|
|
14079
|
+
});
|
|
14080
|
+
return (jsx(ApplicationFormLayout, { className: "container space-y-m col-span-12", title: getTitle(isShowResultLink), ...rest, children: isShowResultLink ? (jsx(ResultLink, { link: referalLink })) : (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", children: button?.text ?? 'Получить ссылку' })] })) }));
|
|
14081
|
+
});
|
|
14082
|
+
const getTitle = (isShowResultLink = false) => isShowResultLink ? 'Ваша личная ссылка' : 'Как получить бесплатное обслуживание счёта';
|
|
14083
|
+
|
|
14009
14084
|
const RichTextBlock = UniBlock((props) => {
|
|
14010
14085
|
const { __html, dynamicQueryParamText = {}, dynamicTextSource, richVersion = '', ...rest } = props;
|
|
14011
14086
|
const formatText = getFormatDynamicText(dynamicQueryParamText, dynamicTextSource?.list, __html);
|
|
@@ -14401,6 +14476,7 @@
|
|
|
14401
14476
|
CalculatorRko,
|
|
14402
14477
|
RkoTariffCardsTable,
|
|
14403
14478
|
RatesTable,
|
|
14479
|
+
ReferalForm,
|
|
14404
14480
|
};
|
|
14405
14481
|
|
|
14406
14482
|
const applyAspects = (aspects) => (ev) => {
|
|
@@ -14545,7 +14621,7 @@
|
|
|
14545
14621
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
14546
14622
|
});
|
|
14547
14623
|
|
|
14548
|
-
const packageVersion = "0.14.
|
|
14624
|
+
const packageVersion = "0.14.1029";
|
|
14549
14625
|
|
|
14550
14626
|
exports.Blocks = Blocks;
|
|
14551
14627
|
exports.ContentPage = ContentPage;
|