@redneckz/wildless-cms-uni-blocks 0.14.1038 → 0.14.1040
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 +109 -24
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/ReferalForm/ReferalFormContent.d.ts +2 -2
- package/bundle/components/ReferalForm/referalFormData.d.ts +2 -2
- package/dist/components/CreditForm/StepsNavigationButtons.js +93 -1
- package/dist/components/CreditForm/StepsNavigationButtons.js.map +1 -1
- package/dist/components/ReferalForm/ReferalForm.js +6 -6
- package/dist/components/ReferalForm/ReferalForm.js.map +1 -1
- package/dist/components/ReferalForm/ReferalFormContent.d.ts +2 -2
- package/dist/components/ReferalForm/referalFormData.d.ts +2 -2
- package/dist/components/ReferalForm/referalFormData.js +8 -14
- package/dist/components/ReferalForm/referalFormData.js.map +1 -1
- package/dist/components/ReferalForm/renderLinkInput.js +4 -1
- package/dist/components/ReferalForm/renderLinkInput.js.map +1 -1
- package/lib/components/CreditForm/StepsNavigationButtons.js +93 -1
- package/lib/components/CreditForm/StepsNavigationButtons.js.map +1 -1
- package/lib/components/ReferalForm/ReferalForm.js +6 -6
- package/lib/components/ReferalForm/ReferalForm.js.map +1 -1
- package/lib/components/ReferalForm/ReferalFormContent.d.ts +2 -2
- package/lib/components/ReferalForm/referalFormData.d.ts +2 -2
- package/lib/components/ReferalForm/referalFormData.js +7 -13
- package/lib/components/ReferalForm/referalFormData.js.map +1 -1
- package/lib/components/ReferalForm/renderLinkInput.js +4 -1
- package/lib/components/ReferalForm/renderLinkInput.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +109 -24
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/ReferalForm/ReferalFormContent.d.ts +2 -2
- package/mobile/bundle/components/ReferalForm/referalFormData.d.ts +2 -2
- package/mobile/dist/components/CreditForm/StepsNavigationButtons.js +93 -1
- package/mobile/dist/components/CreditForm/StepsNavigationButtons.js.map +1 -1
- package/mobile/dist/components/ReferalForm/ReferalForm.js +6 -6
- package/mobile/dist/components/ReferalForm/ReferalForm.js.map +1 -1
- package/mobile/dist/components/ReferalForm/ReferalFormContent.d.ts +2 -2
- package/mobile/dist/components/ReferalForm/referalFormData.d.ts +2 -2
- package/mobile/dist/components/ReferalForm/referalFormData.js +8 -14
- package/mobile/dist/components/ReferalForm/referalFormData.js.map +1 -1
- package/mobile/dist/components/ReferalForm/renderLinkInput.js +4 -1
- package/mobile/dist/components/ReferalForm/renderLinkInput.js.map +1 -1
- package/mobile/lib/components/CreditForm/StepsNavigationButtons.js +93 -1
- package/mobile/lib/components/CreditForm/StepsNavigationButtons.js.map +1 -1
- package/mobile/lib/components/ReferalForm/ReferalForm.js +6 -6
- package/mobile/lib/components/ReferalForm/ReferalForm.js.map +1 -1
- package/mobile/lib/components/ReferalForm/ReferalFormContent.d.ts +2 -2
- package/mobile/lib/components/ReferalForm/referalFormData.d.ts +2 -2
- package/mobile/lib/components/ReferalForm/referalFormData.js +7 -13
- package/mobile/lib/components/ReferalForm/referalFormData.js.map +1 -1
- package/mobile/lib/components/ReferalForm/renderLinkInput.js +4 -1
- package/mobile/lib/components/ReferalForm/renderLinkInput.js.map +1 -1
- package/mobile/src/components/CreditForm/StepsNavigationButtons.tsx +97 -1
- package/mobile/src/components/ReferalForm/ReferalForm.example.json +3 -1
- package/mobile/src/components/ReferalForm/ReferalForm.tsx +11 -11
- package/mobile/src/components/ReferalForm/ReferalFormContent.ts +11 -9
- package/mobile/src/components/ReferalForm/referalFormData.ts +8 -14
- package/mobile/src/components/ReferalForm/renderLinkInput.tsx +5 -1
- package/package.json +1 -1
- package/src/components/CreditForm/StepsNavigationButtons.tsx +97 -1
- package/src/components/ReferalForm/ReferalForm.example.json +3 -1
- package/src/components/ReferalForm/ReferalForm.fixture.mobile.tsx +2 -0
- package/src/components/ReferalForm/ReferalForm.fixture.tsx +2 -0
- package/src/components/ReferalForm/ReferalForm.tsx +11 -11
- package/src/components/ReferalForm/ReferalFormContent.ts +11 -9
- package/src/components/ReferalForm/referalFormData.ts +8 -14
- package/src/components/ReferalForm/renderLinkInput.tsx +5 -1
- package/bundle/components/ReferalForm/renderSections.d.ts +0 -3
- package/dist/components/ReferalForm/renderSections.d.ts +0 -3
- package/dist/components/ReferalForm/renderSections.js +0 -10
- package/dist/components/ReferalForm/renderSections.js.map +0 -1
- package/lib/components/ReferalForm/renderSections.d.ts +0 -3
- package/lib/components/ReferalForm/renderSections.js +0 -7
- package/lib/components/ReferalForm/renderSections.js.map +0 -1
- package/mobile/bundle/components/ReferalForm/renderSections.d.ts +0 -3
- package/mobile/dist/components/ReferalForm/renderSections.d.ts +0 -3
- package/mobile/dist/components/ReferalForm/renderSections.js +0 -10
- package/mobile/dist/components/ReferalForm/renderSections.js.map +0 -1
- package/mobile/lib/components/ReferalForm/renderSections.d.ts +0 -3
- package/mobile/lib/components/ReferalForm/renderSections.js +0 -7
- package/mobile/lib/components/ReferalForm/renderSections.js.map +0 -1
- package/mobile/src/components/ReferalForm/renderSections.tsx +0 -18
- package/src/components/ReferalForm/renderSections.tsx +0 -18
|
@@ -3841,7 +3841,7 @@
|
|
|
3841
3841
|
|
|
3842
3842
|
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;
|
|
3843
3843
|
|
|
3844
|
-
const renderSections
|
|
3844
|
+
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}`)));
|
|
3845
3845
|
|
|
3846
3846
|
const useInterval = (handler, period) => {
|
|
3847
3847
|
const timer = useRef(null);
|
|
@@ -4050,7 +4050,7 @@
|
|
|
4050
4050
|
});
|
|
4051
4051
|
const fieldName = getConsentDataProcessing(inputs)?.name;
|
|
4052
4052
|
const consentDataProcessing = fieldName ? field('consentDataProcessing') : undefined;
|
|
4053
|
-
return (jsxs(ApplicationFormLayout, { className: style('container space-y-m', className), title: title, ...rest, children: [jsxs("form", { onSubmit: onSubmit, children: [renderSections
|
|
4053
|
+
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({
|
|
4054
4054
|
consentDataProcessing,
|
|
4055
4055
|
link,
|
|
4056
4056
|
additionalLink,
|
|
@@ -11574,10 +11574,101 @@
|
|
|
11574
11574
|
return statusesMap[status] || jsx(ReworkStatusContent, {});
|
|
11575
11575
|
};
|
|
11576
11576
|
|
|
11577
|
+
const YANDEX_ID = projectSettings.YANDEX_METRIKA_ID || '92511315';
|
|
11578
|
+
const data = [
|
|
11579
|
+
[
|
|
11580
|
+
{
|
|
11581
|
+
aspectName: 'ymReachGoal',
|
|
11582
|
+
params: {
|
|
11583
|
+
yandexId: YANDEX_ID,
|
|
11584
|
+
targetName: 'credit_calculator',
|
|
11585
|
+
},
|
|
11586
|
+
},
|
|
11587
|
+
{
|
|
11588
|
+
aspectName: 'snowplowEvent',
|
|
11589
|
+
params: {
|
|
11590
|
+
eventAction: 'naturalCreditsReducedPaymentCreditSummPeriodNext',
|
|
11591
|
+
eventCategory: 'naturalCredits',
|
|
11592
|
+
eventValueText: 'Кредит со сниженным платежом Сумма и сроки кредита Кнопка Далее',
|
|
11593
|
+
},
|
|
11594
|
+
},
|
|
11595
|
+
],
|
|
11596
|
+
[
|
|
11597
|
+
{
|
|
11598
|
+
aspectName: 'ymReachGoal',
|
|
11599
|
+
params: {
|
|
11600
|
+
yandexId: YANDEX_ID,
|
|
11601
|
+
targetName: 'app_personal_data',
|
|
11602
|
+
},
|
|
11603
|
+
},
|
|
11604
|
+
{
|
|
11605
|
+
aspectName: 'snowplowEvent',
|
|
11606
|
+
params: {
|
|
11607
|
+
eventAction: 'naturalCreditsReducedPaymentCreditFormPassportNext',
|
|
11608
|
+
eventCategory: 'naturalCredits',
|
|
11609
|
+
eventValueText: 'Кредит со сниженным платежом Паспортные данные Кнопка Далее',
|
|
11610
|
+
},
|
|
11611
|
+
},
|
|
11612
|
+
],
|
|
11613
|
+
[
|
|
11614
|
+
{
|
|
11615
|
+
aspectName: 'ymReachGoal',
|
|
11616
|
+
params: {
|
|
11617
|
+
yandexId: YANDEX_ID,
|
|
11618
|
+
targetName: 'app_work',
|
|
11619
|
+
},
|
|
11620
|
+
},
|
|
11621
|
+
{
|
|
11622
|
+
aspectName: 'snowplowEvent',
|
|
11623
|
+
params: {
|
|
11624
|
+
eventAction: 'naturalCreditsReducedPaymentCreditFormEmployerDetailsNext',
|
|
11625
|
+
eventCategory: 'naturalCredits',
|
|
11626
|
+
eventValueText: 'Кредит со сниженным платежом Данные о работодателе Кнопка Далее',
|
|
11627
|
+
},
|
|
11628
|
+
},
|
|
11629
|
+
],
|
|
11630
|
+
[
|
|
11631
|
+
{
|
|
11632
|
+
aspectName: 'ymReachGoal',
|
|
11633
|
+
params: {
|
|
11634
|
+
yandexId: YANDEX_ID,
|
|
11635
|
+
targetName: 'app_income',
|
|
11636
|
+
},
|
|
11637
|
+
},
|
|
11638
|
+
{
|
|
11639
|
+
aspectName: 'snowplowEvent',
|
|
11640
|
+
params: {
|
|
11641
|
+
eventAction: 'naturalCreditsReducedPaymentCreditFormFamilyStatusNext',
|
|
11642
|
+
eventCategory: 'naturalCredits',
|
|
11643
|
+
eventValueText: 'Кредит со сниженным платежом Семейное положение и доход Кнопка Далее',
|
|
11644
|
+
},
|
|
11645
|
+
},
|
|
11646
|
+
],
|
|
11647
|
+
[
|
|
11648
|
+
{
|
|
11649
|
+
aspectName: 'ymReachGoal',
|
|
11650
|
+
params: {
|
|
11651
|
+
yandexId: YANDEX_ID,
|
|
11652
|
+
targetName: 'app_bank_office',
|
|
11653
|
+
},
|
|
11654
|
+
},
|
|
11655
|
+
{
|
|
11656
|
+
aspectName: 'snowplowEvent',
|
|
11657
|
+
params: {
|
|
11658
|
+
eventAction: 'naturalCreditsReducedPaymentCreditFormBankDepartmentChoosingNext',
|
|
11659
|
+
eventCategory: 'naturalCredits',
|
|
11660
|
+
eventValueText: 'Кредит со сниженным платежом Выбор отделения Кнопка Далее',
|
|
11661
|
+
},
|
|
11662
|
+
},
|
|
11663
|
+
],
|
|
11664
|
+
];
|
|
11665
|
+
const getAspects = (step) => {
|
|
11666
|
+
return data[step] || [];
|
|
11667
|
+
};
|
|
11577
11668
|
const StepsNavigationButtons$1 = JSX(({ step, onPrevStep, isSending }) => {
|
|
11578
11669
|
const isFirstStep = step === 0;
|
|
11579
11670
|
const isFinalStep = step === 5;
|
|
11580
|
-
return (jsxs("div", { className: 'flex justify-between gap-m', children: [jsx(Button, { version: "secondary", disabled: isFirstStep, onClick: onPrevStep, testId: "back-button", children: "\u041D\u0430\u0437\u0430\u0434" }), jsx(SubmitButton$1, { isLoading: isSending, testId: "next-button", children: isFinalStep ? 'Отправить заявку' : 'Далее' })] }));
|
|
11671
|
+
return (jsxs("div", { className: 'flex justify-between gap-m', children: [jsx(Button, { version: "secondary", disabled: isFirstStep, onClick: onPrevStep, testId: "back-button", children: "\u041D\u0430\u0437\u0430\u0434" }), jsx(SubmitButton$1, { isLoading: isSending, testId: "next-button", data: getAspects(step), children: isFinalStep ? 'Отправить заявку' : 'Далее' })] }));
|
|
11581
11672
|
});
|
|
11582
11673
|
|
|
11583
11674
|
const PAYMENT_TYPE_DATA = {
|
|
@@ -13637,25 +13728,20 @@
|
|
|
13637
13728
|
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] }));
|
|
13638
13729
|
});
|
|
13639
13730
|
|
|
13640
|
-
const
|
|
13641
|
-
{ title: 'Заполните ваши данные и получите персональную ссылку', inputs: [] },
|
|
13731
|
+
const inputs = [
|
|
13642
13732
|
{
|
|
13643
|
-
|
|
13644
|
-
|
|
13645
|
-
|
|
13646
|
-
|
|
13647
|
-
|
|
13648
|
-
|
|
13649
|
-
{
|
|
13650
|
-
name: 'email',
|
|
13651
|
-
required: true,
|
|
13652
|
-
},
|
|
13653
|
-
],
|
|
13733
|
+
name: 'dadataPartyInnSelect',
|
|
13734
|
+
required: true,
|
|
13735
|
+
},
|
|
13736
|
+
{
|
|
13737
|
+
name: 'email',
|
|
13738
|
+
required: true,
|
|
13654
13739
|
},
|
|
13655
13740
|
];
|
|
13656
13741
|
|
|
13657
|
-
const
|
|
13658
|
-
|
|
13742
|
+
const defaultIcon = {
|
|
13743
|
+
icon: 'CopyIcon',
|
|
13744
|
+
};
|
|
13659
13745
|
const renderLinkInput = JSX(({ className, value = '', copyIcon }) => {
|
|
13660
13746
|
const onClick = useCallback(async () => {
|
|
13661
13747
|
try {
|
|
@@ -13665,7 +13751,7 @@
|
|
|
13665
13751
|
console.log('Ошибка копирования');
|
|
13666
13752
|
}
|
|
13667
13753
|
}, []);
|
|
13668
|
-
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 }) })] }));
|
|
13754
|
+
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 ?? defaultIcon, width: "20px" }) })] }));
|
|
13669
13755
|
});
|
|
13670
13756
|
|
|
13671
13757
|
const ResultLink = JSX(({ link, copyIcon }) => {
|
|
@@ -13675,10 +13761,9 @@
|
|
|
13675
13761
|
})] }));
|
|
13676
13762
|
});
|
|
13677
13763
|
|
|
13678
|
-
const ReferalForm = UniBlock(({ link = '', button, copyIcon, ...rest }) => {
|
|
13764
|
+
const ReferalForm = UniBlock(({ title, description, link = '', button, copyIcon, ...rest }) => {
|
|
13679
13765
|
const [isShowResultLink, setIsShowResultLink] = useState(false);
|
|
13680
13766
|
const [referalLink, setReferalLink] = useState('');
|
|
13681
|
-
const inputs = useMemo(() => (sections?.flatMap((_) => _?.inputs) || []), [sections]);
|
|
13682
13767
|
const formValidator = useMemo(() => getFormValidator(inputs), [inputs]);
|
|
13683
13768
|
const handleSubmit = useCallback(async (formData) => {
|
|
13684
13769
|
setReferalLink(`${link}?utm_source=${formData.dadataPartyInnSelect?.text}&utm_mail=${formData.email}`);
|
|
@@ -13689,9 +13774,9 @@
|
|
|
13689
13774
|
formValidator,
|
|
13690
13775
|
onSubmit: handleSubmit,
|
|
13691
13776
|
});
|
|
13692
|
-
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: [
|
|
13777
|
+
return (jsx(ApplicationFormLayout, { className: "container space-y-m col-span-12", title: getTitle(title, isShowResultLink), ...rest, children: isShowResultLink ? (jsx(ResultLink, { link: referalLink, copyIcon: copyIcon })) : (jsxs("form", { onSubmit: onSubmit, children: [jsxs("div", { className: "grid @xl:grid-cols-2 gap-x-m", children: [renderTitle(description), inputs.map(getField(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 ?? 'Получить ссылку' })] })) }));
|
|
13693
13778
|
});
|
|
13694
|
-
const getTitle = (isShowResultLink = false) => isShowResultLink ? 'Ваша личная ссылка' :
|
|
13779
|
+
const getTitle = (title = '', isShowResultLink = false) => isShowResultLink ? 'Ваша личная ссылка' : title;
|
|
13695
13780
|
|
|
13696
13781
|
const RichTextBlock = UniBlock((props) => {
|
|
13697
13782
|
const { __html, dynamicQueryParamText = {}, dynamicTextSource, richVersion = '', ...rest } = props;
|
|
@@ -14461,7 +14546,7 @@
|
|
|
14461
14546
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
14462
14547
|
});
|
|
14463
14548
|
|
|
14464
|
-
const packageVersion = "0.14.
|
|
14549
|
+
const packageVersion = "0.14.1039";
|
|
14465
14550
|
|
|
14466
14551
|
exports.Blocks = Blocks;
|
|
14467
14552
|
exports.ContentPage = ContentPage;
|