@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.
Files changed (204) hide show
  1. package/bundle/api/getSubmitBody.d.ts +4225 -865
  2. package/bundle/blocks.schema.json +1 -1
  3. package/bundle/bundle.umd.js +85 -9
  4. package/bundle/bundle.umd.min.js +1 -1
  5. package/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +10 -0
  6. package/bundle/components/ApplicationForm/Footnote.d.ts +1 -0
  7. package/bundle/components/ApplicationForm/renderAgreementSubmit.d.ts +2 -1
  8. package/bundle/components/ReferalForm/ReferalForm.d.ts +10 -0
  9. package/bundle/components/ReferalForm/ReferalFormContent.d.ts +11 -0
  10. package/bundle/components/ReferalForm/ResultLink.d.ts +5 -0
  11. package/bundle/components/ReferalForm/referalFormData.d.ts +2 -0
  12. package/bundle/components/ReferalForm/renderLinkInput.d.ts +2 -0
  13. package/bundle/components/ReferalForm/renderSections.d.ts +3 -0
  14. package/bundle/model/FormTypeFieldDef.d.ts +1 -1
  15. package/dist/api/getSubmitBody.d.ts +4225 -865
  16. package/dist/api/getSubmitBody.js +14 -0
  17. package/dist/api/getSubmitBody.js.map +1 -1
  18. package/dist/components/ApplicationForm/ApplicationForm.js +2 -1
  19. package/dist/components/ApplicationForm/ApplicationForm.js.map +1 -1
  20. package/dist/components/ApplicationForm/ApplicationFormContent.d.ts +10 -0
  21. package/dist/components/ApplicationForm/Footnote.d.ts +1 -0
  22. package/dist/components/ApplicationForm/Footnote.js +1 -1
  23. package/dist/components/ApplicationForm/Footnote.js.map +1 -1
  24. package/dist/components/ApplicationForm/renderAgreementSubmit.d.ts +2 -1
  25. package/dist/components/ApplicationForm/renderAgreementSubmit.js +1 -1
  26. package/dist/components/ApplicationForm/renderAgreementSubmit.js.map +1 -1
  27. package/dist/components/Blocks.js +2 -0
  28. package/dist/components/Blocks.js.map +1 -1
  29. package/dist/components/ReferalForm/ReferalForm.d.ts +10 -0
  30. package/dist/components/ReferalForm/ReferalForm.js +33 -0
  31. package/dist/components/ReferalForm/ReferalForm.js.map +1 -0
  32. package/dist/components/ReferalForm/ReferalFormContent.d.ts +11 -0
  33. package/dist/components/ReferalForm/ReferalFormContent.js +2 -0
  34. package/dist/components/ReferalForm/ReferalFormContent.js.map +1 -0
  35. package/dist/components/ReferalForm/ResultLink.d.ts +5 -0
  36. package/dist/components/ReferalForm/ResultLink.js +12 -0
  37. package/dist/components/ReferalForm/ResultLink.js.map +1 -0
  38. package/dist/components/ReferalForm/referalFormData.d.ts +2 -0
  39. package/dist/components/ReferalForm/referalFormData.js +19 -0
  40. package/dist/components/ReferalForm/referalFormData.js.map +1 -0
  41. package/dist/components/ReferalForm/renderLinkInput.d.ts +2 -0
  42. package/dist/components/ReferalForm/renderLinkInput.js +25 -0
  43. package/dist/components/ReferalForm/renderLinkInput.js.map +1 -0
  44. package/dist/components/ReferalForm/renderSections.d.ts +3 -0
  45. package/dist/components/ReferalForm/renderSections.js +10 -0
  46. package/dist/components/ReferalForm/renderSections.js.map +1 -0
  47. package/dist/hooks/useDadataParty.js +1 -1
  48. package/dist/hooks/useDadataParty.js.map +1 -1
  49. package/dist/model/FormTypeFieldDef.d.ts +1 -1
  50. package/lib/api/getSubmitBody.d.ts +4225 -865
  51. package/lib/api/getSubmitBody.js +14 -0
  52. package/lib/api/getSubmitBody.js.map +1 -1
  53. package/lib/components/ApplicationForm/ApplicationForm.fixture.d.ts +1 -0
  54. package/lib/components/ApplicationForm/ApplicationForm.js +2 -1
  55. package/lib/components/ApplicationForm/ApplicationForm.js.map +1 -1
  56. package/lib/components/ApplicationForm/ApplicationFormContent.d.ts +10 -0
  57. package/lib/components/ApplicationForm/Footnote.d.ts +1 -0
  58. package/lib/components/ApplicationForm/Footnote.js +1 -1
  59. package/lib/components/ApplicationForm/Footnote.js.map +1 -1
  60. package/lib/components/ApplicationForm/renderAgreementSubmit.d.ts +2 -1
  61. package/lib/components/ApplicationForm/renderAgreementSubmit.js +1 -1
  62. package/lib/components/ApplicationForm/renderAgreementSubmit.js.map +1 -1
  63. package/lib/components/Blocks.js +2 -0
  64. package/lib/components/Blocks.js.map +1 -1
  65. package/lib/components/ReferalForm/ReferalForm.d.ts +10 -0
  66. package/lib/components/ReferalForm/ReferalForm.fixture.d.ts +5 -0
  67. package/lib/components/ReferalForm/ReferalForm.fixture.mobile.d.ts +5 -0
  68. package/lib/components/ReferalForm/ReferalForm.js +31 -0
  69. package/lib/components/ReferalForm/ReferalForm.js.map +1 -0
  70. package/lib/components/ReferalForm/ReferalFormContent.d.ts +11 -0
  71. package/lib/components/ReferalForm/ReferalFormContent.js +2 -0
  72. package/lib/components/ReferalForm/ReferalFormContent.js.map +1 -0
  73. package/lib/components/ReferalForm/ResultLink.d.ts +5 -0
  74. package/lib/components/ReferalForm/ResultLink.js +10 -0
  75. package/lib/components/ReferalForm/ResultLink.js.map +1 -0
  76. package/lib/components/ReferalForm/referalFormData.d.ts +2 -0
  77. package/lib/components/ReferalForm/referalFormData.js +17 -0
  78. package/lib/components/ReferalForm/referalFormData.js.map +1 -0
  79. package/lib/components/ReferalForm/renderLinkInput.d.ts +2 -0
  80. package/lib/components/ReferalForm/renderLinkInput.js +23 -0
  81. package/lib/components/ReferalForm/renderLinkInput.js.map +1 -0
  82. package/lib/components/ReferalForm/renderSections.d.ts +3 -0
  83. package/lib/components/ReferalForm/renderSections.js +7 -0
  84. package/lib/components/ReferalForm/renderSections.js.map +1 -0
  85. package/lib/hooks/useDadataParty.js +1 -1
  86. package/lib/hooks/useDadataParty.js.map +1 -1
  87. package/lib/model/FormTypeFieldDef.d.ts +1 -1
  88. package/mobile/bundle/api/getSubmitBody.d.ts +4225 -865
  89. package/mobile/bundle/bundle.umd.js +20 -5
  90. package/mobile/bundle/bundle.umd.min.js +1 -1
  91. package/mobile/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +10 -0
  92. package/mobile/bundle/components/ApplicationForm/Footnote.d.ts +1 -0
  93. package/mobile/bundle/components/ApplicationForm/renderAgreementSubmit.d.ts +2 -1
  94. package/mobile/bundle/components/ReferalForm/ReferalForm.d.ts +10 -0
  95. package/mobile/bundle/components/ReferalForm/ReferalFormContent.d.ts +11 -0
  96. package/mobile/bundle/components/ReferalForm/ResultLink.d.ts +5 -0
  97. package/mobile/bundle/components/ReferalForm/referalFormData.d.ts +2 -0
  98. package/mobile/bundle/components/ReferalForm/renderLinkInput.d.ts +2 -0
  99. package/mobile/bundle/components/ReferalForm/renderSections.d.ts +3 -0
  100. package/mobile/bundle/model/FormTypeFieldDef.d.ts +1 -1
  101. package/mobile/dist/api/getSubmitBody.d.ts +4225 -865
  102. package/mobile/dist/api/getSubmitBody.js +14 -0
  103. package/mobile/dist/api/getSubmitBody.js.map +1 -1
  104. package/mobile/dist/components/ApplicationForm/ApplicationForm.js +2 -1
  105. package/mobile/dist/components/ApplicationForm/ApplicationForm.js.map +1 -1
  106. package/mobile/dist/components/ApplicationForm/ApplicationFormContent.d.ts +10 -0
  107. package/mobile/dist/components/ApplicationForm/Footnote.d.ts +1 -0
  108. package/mobile/dist/components/ApplicationForm/Footnote.js +1 -1
  109. package/mobile/dist/components/ApplicationForm/Footnote.js.map +1 -1
  110. package/mobile/dist/components/ApplicationForm/renderAgreementSubmit.d.ts +2 -1
  111. package/mobile/dist/components/ApplicationForm/renderAgreementSubmit.js +1 -1
  112. package/mobile/dist/components/ApplicationForm/renderAgreementSubmit.js.map +1 -1
  113. package/mobile/dist/components/ReferalForm/ReferalForm.d.ts +10 -0
  114. package/mobile/dist/components/ReferalForm/ReferalForm.js +33 -0
  115. package/mobile/dist/components/ReferalForm/ReferalForm.js.map +1 -0
  116. package/mobile/dist/components/ReferalForm/ReferalFormContent.d.ts +11 -0
  117. package/mobile/dist/components/ReferalForm/ReferalFormContent.js +2 -0
  118. package/mobile/dist/components/ReferalForm/ReferalFormContent.js.map +1 -0
  119. package/mobile/dist/components/ReferalForm/ResultLink.d.ts +5 -0
  120. package/mobile/dist/components/ReferalForm/ResultLink.js +12 -0
  121. package/mobile/dist/components/ReferalForm/ResultLink.js.map +1 -0
  122. package/mobile/dist/components/ReferalForm/referalFormData.d.ts +2 -0
  123. package/mobile/dist/components/ReferalForm/referalFormData.js +19 -0
  124. package/mobile/dist/components/ReferalForm/referalFormData.js.map +1 -0
  125. package/mobile/dist/components/ReferalForm/renderLinkInput.d.ts +2 -0
  126. package/mobile/dist/components/ReferalForm/renderLinkInput.js +25 -0
  127. package/mobile/dist/components/ReferalForm/renderLinkInput.js.map +1 -0
  128. package/mobile/dist/components/ReferalForm/renderSections.d.ts +3 -0
  129. package/mobile/dist/components/ReferalForm/renderSections.js +10 -0
  130. package/mobile/dist/components/ReferalForm/renderSections.js.map +1 -0
  131. package/mobile/dist/hooks/useDadataParty.js +1 -1
  132. package/mobile/dist/hooks/useDadataParty.js.map +1 -1
  133. package/mobile/dist/model/FormTypeFieldDef.d.ts +1 -1
  134. package/mobile/lib/api/getSubmitBody.d.ts +4225 -865
  135. package/mobile/lib/api/getSubmitBody.js +14 -0
  136. package/mobile/lib/api/getSubmitBody.js.map +1 -1
  137. package/mobile/lib/common.css +1 -1
  138. package/mobile/lib/components/ApplicationForm/ApplicationForm.js +2 -1
  139. package/mobile/lib/components/ApplicationForm/ApplicationForm.js.map +1 -1
  140. package/mobile/lib/components/ApplicationForm/ApplicationFormContent.d.ts +10 -0
  141. package/mobile/lib/components/ApplicationForm/Footnote.d.ts +1 -0
  142. package/mobile/lib/components/ApplicationForm/Footnote.js +1 -1
  143. package/mobile/lib/components/ApplicationForm/Footnote.js.map +1 -1
  144. package/mobile/lib/components/ApplicationForm/renderAgreementSubmit.d.ts +2 -1
  145. package/mobile/lib/components/ApplicationForm/renderAgreementSubmit.js +1 -1
  146. package/mobile/lib/components/ApplicationForm/renderAgreementSubmit.js.map +1 -1
  147. package/mobile/lib/components/ReferalForm/ReferalForm.d.ts +10 -0
  148. package/mobile/lib/components/ReferalForm/ReferalForm.js +31 -0
  149. package/mobile/lib/components/ReferalForm/ReferalForm.js.map +1 -0
  150. package/mobile/lib/components/ReferalForm/ReferalFormContent.d.ts +11 -0
  151. package/mobile/lib/components/ReferalForm/ReferalFormContent.js +2 -0
  152. package/mobile/lib/components/ReferalForm/ReferalFormContent.js.map +1 -0
  153. package/mobile/lib/components/ReferalForm/ResultLink.d.ts +5 -0
  154. package/mobile/lib/components/ReferalForm/ResultLink.js +10 -0
  155. package/mobile/lib/components/ReferalForm/ResultLink.js.map +1 -0
  156. package/mobile/lib/components/ReferalForm/referalFormData.d.ts +2 -0
  157. package/mobile/lib/components/ReferalForm/referalFormData.js +17 -0
  158. package/mobile/lib/components/ReferalForm/referalFormData.js.map +1 -0
  159. package/mobile/lib/components/ReferalForm/renderLinkInput.d.ts +2 -0
  160. package/mobile/lib/components/ReferalForm/renderLinkInput.js +23 -0
  161. package/mobile/lib/components/ReferalForm/renderLinkInput.js.map +1 -0
  162. package/mobile/lib/components/ReferalForm/renderSections.d.ts +3 -0
  163. package/mobile/lib/components/ReferalForm/renderSections.js +7 -0
  164. package/mobile/lib/components/ReferalForm/renderSections.js.map +1 -0
  165. package/mobile/lib/hooks/useDadataParty.js +1 -1
  166. package/mobile/lib/hooks/useDadataParty.js.map +1 -1
  167. package/mobile/lib/model/FormTypeFieldDef.d.ts +1 -1
  168. package/mobile/src/api/getSubmitBody.ts +17 -0
  169. package/mobile/src/components/ApplicationForm/ApplicationForm.example.json +38 -0
  170. package/mobile/src/components/ApplicationForm/ApplicationForm.tsx +2 -0
  171. package/mobile/src/components/ApplicationForm/ApplicationFormContent.ts +10 -0
  172. package/mobile/src/components/ApplicationForm/Footnote.tsx +10 -1
  173. package/mobile/src/components/ApplicationForm/renderAgreementSubmit.tsx +7 -1
  174. package/mobile/src/components/ReferalForm/ReferalForm.example.json +8 -0
  175. package/mobile/src/components/ReferalForm/ReferalForm.tsx +78 -0
  176. package/mobile/src/components/ReferalForm/ReferalForm.ui.json +1 -0
  177. package/mobile/src/components/ReferalForm/ReferalFormContent.ts +12 -0
  178. package/mobile/src/components/ReferalForm/ResultLink.tsx +20 -0
  179. package/mobile/src/components/ReferalForm/referalFormData.ts +18 -0
  180. package/mobile/src/components/ReferalForm/renderLinkInput.tsx +37 -0
  181. package/mobile/src/components/ReferalForm/renderSections.tsx +18 -0
  182. package/mobile/src/hooks/useDadataParty.ts +1 -1
  183. package/mobile/src/model/FormTypeFieldDef.ts +2 -1
  184. package/package.json +1 -1
  185. package/src/api/getSubmitBody.ts +17 -0
  186. package/src/components/ApplicationForm/ApplicationForm.example.json +38 -0
  187. package/src/components/ApplicationForm/ApplicationForm.fixture.tsx +36 -0
  188. package/src/components/ApplicationForm/ApplicationForm.tsx +2 -0
  189. package/src/components/ApplicationForm/ApplicationFormContent.ts +10 -0
  190. package/src/components/ApplicationForm/Footnote.tsx +10 -1
  191. package/src/components/ApplicationForm/renderAgreementSubmit.tsx +7 -1
  192. package/src/components/Blocks.ts +2 -0
  193. package/src/components/ReferalForm/ReferalForm.example.json +8 -0
  194. package/src/components/ReferalForm/ReferalForm.fixture.mobile.tsx +16 -0
  195. package/src/components/ReferalForm/ReferalForm.fixture.tsx +16 -0
  196. package/src/components/ReferalForm/ReferalForm.tsx +78 -0
  197. package/src/components/ReferalForm/ReferalForm.ui.json +1 -0
  198. package/src/components/ReferalForm/ReferalFormContent.ts +12 -0
  199. package/src/components/ReferalForm/ResultLink.tsx +20 -0
  200. package/src/components/ReferalForm/referalFormData.ts +18 -0
  201. package/src/components/ReferalForm/renderLinkInput.tsx +37 -0
  202. package/src/components/ReferalForm/renderSections.tsx +18 -0
  203. package/src/hooks/useDadataParty.ts +1 -1
  204. package/src/model/FormTypeFieldDef.ts +2 -1
@@ -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 })).map((_) => ({
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.1028";
14624
+ const packageVersion = "0.14.1029";
14549
14625
 
14550
14626
  exports.Blocks = Blocks;
14551
14627
  exports.ContentPage = ContentPage;