@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.
Files changed (80) hide show
  1. package/bundle/blocks.schema.json +1 -1
  2. package/bundle/bundle.umd.js +109 -24
  3. package/bundle/bundle.umd.min.js +1 -1
  4. package/bundle/components/ReferalForm/ReferalFormContent.d.ts +2 -2
  5. package/bundle/components/ReferalForm/referalFormData.d.ts +2 -2
  6. package/dist/components/CreditForm/StepsNavigationButtons.js +93 -1
  7. package/dist/components/CreditForm/StepsNavigationButtons.js.map +1 -1
  8. package/dist/components/ReferalForm/ReferalForm.js +6 -6
  9. package/dist/components/ReferalForm/ReferalForm.js.map +1 -1
  10. package/dist/components/ReferalForm/ReferalFormContent.d.ts +2 -2
  11. package/dist/components/ReferalForm/referalFormData.d.ts +2 -2
  12. package/dist/components/ReferalForm/referalFormData.js +8 -14
  13. package/dist/components/ReferalForm/referalFormData.js.map +1 -1
  14. package/dist/components/ReferalForm/renderLinkInput.js +4 -1
  15. package/dist/components/ReferalForm/renderLinkInput.js.map +1 -1
  16. package/lib/components/CreditForm/StepsNavigationButtons.js +93 -1
  17. package/lib/components/CreditForm/StepsNavigationButtons.js.map +1 -1
  18. package/lib/components/ReferalForm/ReferalForm.js +6 -6
  19. package/lib/components/ReferalForm/ReferalForm.js.map +1 -1
  20. package/lib/components/ReferalForm/ReferalFormContent.d.ts +2 -2
  21. package/lib/components/ReferalForm/referalFormData.d.ts +2 -2
  22. package/lib/components/ReferalForm/referalFormData.js +7 -13
  23. package/lib/components/ReferalForm/referalFormData.js.map +1 -1
  24. package/lib/components/ReferalForm/renderLinkInput.js +4 -1
  25. package/lib/components/ReferalForm/renderLinkInput.js.map +1 -1
  26. package/mobile/bundle/bundle.umd.js +109 -24
  27. package/mobile/bundle/bundle.umd.min.js +1 -1
  28. package/mobile/bundle/components/ReferalForm/ReferalFormContent.d.ts +2 -2
  29. package/mobile/bundle/components/ReferalForm/referalFormData.d.ts +2 -2
  30. package/mobile/dist/components/CreditForm/StepsNavigationButtons.js +93 -1
  31. package/mobile/dist/components/CreditForm/StepsNavigationButtons.js.map +1 -1
  32. package/mobile/dist/components/ReferalForm/ReferalForm.js +6 -6
  33. package/mobile/dist/components/ReferalForm/ReferalForm.js.map +1 -1
  34. package/mobile/dist/components/ReferalForm/ReferalFormContent.d.ts +2 -2
  35. package/mobile/dist/components/ReferalForm/referalFormData.d.ts +2 -2
  36. package/mobile/dist/components/ReferalForm/referalFormData.js +8 -14
  37. package/mobile/dist/components/ReferalForm/referalFormData.js.map +1 -1
  38. package/mobile/dist/components/ReferalForm/renderLinkInput.js +4 -1
  39. package/mobile/dist/components/ReferalForm/renderLinkInput.js.map +1 -1
  40. package/mobile/lib/components/CreditForm/StepsNavigationButtons.js +93 -1
  41. package/mobile/lib/components/CreditForm/StepsNavigationButtons.js.map +1 -1
  42. package/mobile/lib/components/ReferalForm/ReferalForm.js +6 -6
  43. package/mobile/lib/components/ReferalForm/ReferalForm.js.map +1 -1
  44. package/mobile/lib/components/ReferalForm/ReferalFormContent.d.ts +2 -2
  45. package/mobile/lib/components/ReferalForm/referalFormData.d.ts +2 -2
  46. package/mobile/lib/components/ReferalForm/referalFormData.js +7 -13
  47. package/mobile/lib/components/ReferalForm/referalFormData.js.map +1 -1
  48. package/mobile/lib/components/ReferalForm/renderLinkInput.js +4 -1
  49. package/mobile/lib/components/ReferalForm/renderLinkInput.js.map +1 -1
  50. package/mobile/src/components/CreditForm/StepsNavigationButtons.tsx +97 -1
  51. package/mobile/src/components/ReferalForm/ReferalForm.example.json +3 -1
  52. package/mobile/src/components/ReferalForm/ReferalForm.tsx +11 -11
  53. package/mobile/src/components/ReferalForm/ReferalFormContent.ts +11 -9
  54. package/mobile/src/components/ReferalForm/referalFormData.ts +8 -14
  55. package/mobile/src/components/ReferalForm/renderLinkInput.tsx +5 -1
  56. package/package.json +1 -1
  57. package/src/components/CreditForm/StepsNavigationButtons.tsx +97 -1
  58. package/src/components/ReferalForm/ReferalForm.example.json +3 -1
  59. package/src/components/ReferalForm/ReferalForm.fixture.mobile.tsx +2 -0
  60. package/src/components/ReferalForm/ReferalForm.fixture.tsx +2 -0
  61. package/src/components/ReferalForm/ReferalForm.tsx +11 -11
  62. package/src/components/ReferalForm/ReferalFormContent.ts +11 -9
  63. package/src/components/ReferalForm/referalFormData.ts +8 -14
  64. package/src/components/ReferalForm/renderLinkInput.tsx +5 -1
  65. package/bundle/components/ReferalForm/renderSections.d.ts +0 -3
  66. package/dist/components/ReferalForm/renderSections.d.ts +0 -3
  67. package/dist/components/ReferalForm/renderSections.js +0 -10
  68. package/dist/components/ReferalForm/renderSections.js.map +0 -1
  69. package/lib/components/ReferalForm/renderSections.d.ts +0 -3
  70. package/lib/components/ReferalForm/renderSections.js +0 -7
  71. package/lib/components/ReferalForm/renderSections.js.map +0 -1
  72. package/mobile/bundle/components/ReferalForm/renderSections.d.ts +0 -3
  73. package/mobile/dist/components/ReferalForm/renderSections.d.ts +0 -3
  74. package/mobile/dist/components/ReferalForm/renderSections.js +0 -10
  75. package/mobile/dist/components/ReferalForm/renderSections.js.map +0 -1
  76. package/mobile/lib/components/ReferalForm/renderSections.d.ts +0 -3
  77. package/mobile/lib/components/ReferalForm/renderSections.js +0 -7
  78. package/mobile/lib/components/ReferalForm/renderSections.js.map +0 -1
  79. package/mobile/src/components/ReferalForm/renderSections.tsx +0 -18
  80. package/src/components/ReferalForm/renderSections.tsx +0 -18
@@ -3833,7 +3833,7 @@
3833
3833
 
3834
3834
  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;
3835
3835
 
3836
- 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}`)));
3836
+ 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}`)));
3837
3837
 
3838
3838
  const useInterval = (handler, period) => {
3839
3839
  const timer = useRef(null);
@@ -4042,7 +4042,7 @@
4042
4042
  });
4043
4043
  const fieldName = getConsentDataProcessing(inputs)?.name;
4044
4044
  const consentDataProcessing = fieldName ? field('consentDataProcessing') : undefined;
4045
- 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({
4045
+ 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({
4046
4046
  consentDataProcessing,
4047
4047
  link,
4048
4048
  additionalLink,
@@ -11582,10 +11582,101 @@
11582
11582
  return statusesMap[status] || jsx(ReworkStatusContent, {});
11583
11583
  };
11584
11584
 
11585
+ const YANDEX_ID = projectSettings.YANDEX_METRIKA_ID || '92511315';
11586
+ const data = [
11587
+ [
11588
+ {
11589
+ aspectName: 'ymReachGoal',
11590
+ params: {
11591
+ yandexId: YANDEX_ID,
11592
+ targetName: 'credit_calculator',
11593
+ },
11594
+ },
11595
+ {
11596
+ aspectName: 'snowplowEvent',
11597
+ params: {
11598
+ eventAction: 'naturalCreditsReducedPaymentCreditSummPeriodNext',
11599
+ eventCategory: 'naturalCredits',
11600
+ eventValueText: 'Кредит со сниженным платежом Сумма и сроки кредита Кнопка Далее',
11601
+ },
11602
+ },
11603
+ ],
11604
+ [
11605
+ {
11606
+ aspectName: 'ymReachGoal',
11607
+ params: {
11608
+ yandexId: YANDEX_ID,
11609
+ targetName: 'app_personal_data',
11610
+ },
11611
+ },
11612
+ {
11613
+ aspectName: 'snowplowEvent',
11614
+ params: {
11615
+ eventAction: 'naturalCreditsReducedPaymentCreditFormPassportNext',
11616
+ eventCategory: 'naturalCredits',
11617
+ eventValueText: 'Кредит со сниженным платежом Паспортные данные Кнопка Далее',
11618
+ },
11619
+ },
11620
+ ],
11621
+ [
11622
+ {
11623
+ aspectName: 'ymReachGoal',
11624
+ params: {
11625
+ yandexId: YANDEX_ID,
11626
+ targetName: 'app_work',
11627
+ },
11628
+ },
11629
+ {
11630
+ aspectName: 'snowplowEvent',
11631
+ params: {
11632
+ eventAction: 'naturalCreditsReducedPaymentCreditFormEmployerDetailsNext',
11633
+ eventCategory: 'naturalCredits',
11634
+ eventValueText: 'Кредит со сниженным платежом Данные о работодателе Кнопка Далее',
11635
+ },
11636
+ },
11637
+ ],
11638
+ [
11639
+ {
11640
+ aspectName: 'ymReachGoal',
11641
+ params: {
11642
+ yandexId: YANDEX_ID,
11643
+ targetName: 'app_income',
11644
+ },
11645
+ },
11646
+ {
11647
+ aspectName: 'snowplowEvent',
11648
+ params: {
11649
+ eventAction: 'naturalCreditsReducedPaymentCreditFormFamilyStatusNext',
11650
+ eventCategory: 'naturalCredits',
11651
+ eventValueText: 'Кредит со сниженным платежом Семейное положение и доход Кнопка Далее',
11652
+ },
11653
+ },
11654
+ ],
11655
+ [
11656
+ {
11657
+ aspectName: 'ymReachGoal',
11658
+ params: {
11659
+ yandexId: YANDEX_ID,
11660
+ targetName: 'app_bank_office',
11661
+ },
11662
+ },
11663
+ {
11664
+ aspectName: 'snowplowEvent',
11665
+ params: {
11666
+ eventAction: 'naturalCreditsReducedPaymentCreditFormBankDepartmentChoosingNext',
11667
+ eventCategory: 'naturalCredits',
11668
+ eventValueText: 'Кредит со сниженным платежом Выбор отделения Кнопка Далее',
11669
+ },
11670
+ },
11671
+ ],
11672
+ ];
11673
+ const getAspects = (step) => {
11674
+ return data[step] || [];
11675
+ };
11585
11676
  const StepsNavigationButtons$1 = JSX(({ step, onPrevStep, isSending }) => {
11586
11677
  const isFirstStep = step === 0;
11587
11678
  const isFinalStep = step === 5;
11588
- 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 ? 'Отправить заявку' : 'Далее' })] }));
11679
+ 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 ? 'Отправить заявку' : 'Далее' })] }));
11589
11680
  });
11590
11681
 
11591
11682
  const PAYMENT_TYPE_DATA = {
@@ -14095,25 +14186,20 @@
14095
14186
  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] }));
14096
14187
  });
14097
14188
 
14098
- const sections = [
14099
- { title: 'Заполните ваши данные и получите персональную ссылку', inputs: [] },
14189
+ const inputs = [
14100
14190
  {
14101
- columns: 2,
14102
- inputs: [
14103
- {
14104
- name: 'dadataPartyInnSelect',
14105
- required: true,
14106
- },
14107
- {
14108
- name: 'email',
14109
- required: true,
14110
- },
14111
- ],
14191
+ name: 'dadataPartyInnSelect',
14192
+ required: true,
14193
+ },
14194
+ {
14195
+ name: 'email',
14196
+ required: true,
14112
14197
  },
14113
14198
  ];
14114
14199
 
14115
- const renderSections = (sections, field) => sections.map((_, i) => (jsxs("div", { className: style(inputColumnStyles(_.columns), 'grid'), children: [renderTitle(_.title), (_?.inputs || [])?.map(getField(field))] }, `section-${i}`)));
14116
-
14200
+ const defaultIcon = {
14201
+ icon: 'CopyIcon',
14202
+ };
14117
14203
  const renderLinkInput = JSX(({ className, value = '', copyIcon }) => {
14118
14204
  const onClick = useCallback(async () => {
14119
14205
  try {
@@ -14123,7 +14209,7 @@
14123
14209
  console.log('Ошибка копирования');
14124
14210
  }
14125
14211
  }, []);
14126
- 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 }) })] }));
14212
+ 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" }) })] }));
14127
14213
  });
14128
14214
 
14129
14215
  const ResultLink = JSX(({ link, copyIcon }) => {
@@ -14133,10 +14219,9 @@
14133
14219
  })] }));
14134
14220
  });
14135
14221
 
14136
- const ReferalForm = UniBlock(({ link = '', button, copyIcon, ...rest }) => {
14222
+ const ReferalForm = UniBlock(({ title, description, link = '', button, copyIcon, ...rest }) => {
14137
14223
  const [isShowResultLink, setIsShowResultLink] = useState(false);
14138
14224
  const [referalLink, setReferalLink] = useState('');
14139
- const inputs = useMemo(() => (sections?.flatMap((_) => _?.inputs) || []), [sections]);
14140
14225
  const formValidator = useMemo(() => getFormValidator(inputs), [inputs]);
14141
14226
  const handleSubmit = useCallback(async (formData) => {
14142
14227
  setReferalLink(`${link}?utm_source=${formData.dadataPartyInnSelect?.text}&utm_mail=${formData.email}`);
@@ -14147,9 +14232,9 @@
14147
14232
  formValidator,
14148
14233
  onSubmit: handleSubmit,
14149
14234
  });
14150
- 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 ?? 'Получить ссылку' })] })) }));
14235
+ 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 ?? 'Получить ссылку' })] })) }));
14151
14236
  });
14152
- const getTitle = (isShowResultLink = false) => isShowResultLink ? 'Ваша личная ссылка' : 'Как получить бесплатное обслуживание счёта';
14237
+ const getTitle = (title = '', isShowResultLink = false) => isShowResultLink ? 'Ваша личная ссылка' : title;
14153
14238
 
14154
14239
  const RichTextBlock = UniBlock((props) => {
14155
14240
  const { __html, dynamicQueryParamText = {}, dynamicTextSource, richVersion = '', ...rest } = props;
@@ -14691,7 +14776,7 @@
14691
14776
  slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
14692
14777
  });
14693
14778
 
14694
- const packageVersion = "0.14.1037";
14779
+ const packageVersion = "0.14.1039";
14695
14780
 
14696
14781
  exports.Blocks = Blocks;
14697
14782
  exports.ContentPage = ContentPage;