@redneckz/wildless-cms-uni-blocks 0.14.1030 → 0.14.1031

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/bundle/blocks.schema.json +1 -1
  2. package/bundle/bundle.umd.js +9 -13
  3. package/bundle/bundle.umd.min.js +1 -1
  4. package/bundle/components/ReferalForm/ReferalFormContent.d.ts +3 -0
  5. package/bundle/components/ReferalForm/ResultLink.d.ts +2 -0
  6. package/bundle/components/ReferalForm/renderLinkInput.d.ts +6 -1
  7. package/dist/components/Blocks.mobile.js +2 -0
  8. package/dist/components/Blocks.mobile.js.map +1 -1
  9. package/dist/components/ReferalForm/ReferalForm.js +2 -2
  10. package/dist/components/ReferalForm/ReferalForm.js.map +1 -1
  11. package/dist/components/ReferalForm/ReferalFormContent.d.ts +3 -0
  12. package/dist/components/ReferalForm/ResultLink.d.ts +2 -0
  13. package/dist/components/ReferalForm/ResultLink.js +2 -1
  14. package/dist/components/ReferalForm/ResultLink.js.map +1 -1
  15. package/dist/components/ReferalForm/renderLinkInput.d.ts +6 -1
  16. package/dist/components/ReferalForm/renderLinkInput.js +2 -7
  17. package/dist/components/ReferalForm/renderLinkInput.js.map +1 -1
  18. package/lib/components/Blocks.mobile.js +2 -0
  19. package/lib/components/Blocks.mobile.js.map +1 -1
  20. package/lib/components/ReferalForm/ReferalForm.js +2 -2
  21. package/lib/components/ReferalForm/ReferalForm.js.map +1 -1
  22. package/lib/components/ReferalForm/ReferalFormContent.d.ts +3 -0
  23. package/lib/components/ReferalForm/ResultLink.d.ts +2 -0
  24. package/lib/components/ReferalForm/ResultLink.js +2 -1
  25. package/lib/components/ReferalForm/ResultLink.js.map +1 -1
  26. package/lib/components/ReferalForm/renderLinkInput.d.ts +6 -1
  27. package/lib/components/ReferalForm/renderLinkInput.js +2 -7
  28. package/lib/components/ReferalForm/renderLinkInput.js.map +1 -1
  29. package/mobile/bundle/bundle.umd.js +60 -3
  30. package/mobile/bundle/bundle.umd.min.js +1 -1
  31. package/mobile/bundle/components/ReferalForm/ReferalFormContent.d.ts +3 -0
  32. package/mobile/bundle/components/ReferalForm/ResultLink.d.ts +2 -0
  33. package/mobile/bundle/components/ReferalForm/renderLinkInput.d.ts +6 -1
  34. package/mobile/dist/components/Blocks.js +2 -0
  35. package/mobile/dist/components/Blocks.js.map +1 -1
  36. package/mobile/dist/components/ReferalForm/ReferalForm.js +2 -2
  37. package/mobile/dist/components/ReferalForm/ReferalForm.js.map +1 -1
  38. package/mobile/dist/components/ReferalForm/ReferalFormContent.d.ts +3 -0
  39. package/mobile/dist/components/ReferalForm/ResultLink.d.ts +2 -0
  40. package/mobile/dist/components/ReferalForm/ResultLink.js +2 -1
  41. package/mobile/dist/components/ReferalForm/ResultLink.js.map +1 -1
  42. package/mobile/dist/components/ReferalForm/renderLinkInput.d.ts +6 -1
  43. package/mobile/dist/components/ReferalForm/renderLinkInput.js +2 -7
  44. package/mobile/dist/components/ReferalForm/renderLinkInput.js.map +1 -1
  45. package/mobile/lib/components/Blocks.js +2 -0
  46. package/mobile/lib/components/Blocks.js.map +1 -1
  47. package/mobile/lib/components/ReferalForm/ReferalForm.js +2 -2
  48. package/mobile/lib/components/ReferalForm/ReferalForm.js.map +1 -1
  49. package/mobile/lib/components/ReferalForm/ReferalFormContent.d.ts +3 -0
  50. package/mobile/lib/components/ReferalForm/ResultLink.d.ts +2 -0
  51. package/mobile/lib/components/ReferalForm/ResultLink.js +2 -1
  52. package/mobile/lib/components/ReferalForm/ResultLink.js.map +1 -1
  53. package/mobile/lib/components/ReferalForm/renderLinkInput.d.ts +6 -1
  54. package/mobile/lib/components/ReferalForm/renderLinkInput.js +2 -7
  55. package/mobile/lib/components/ReferalForm/renderLinkInput.js.map +1 -1
  56. package/mobile/src/components/Blocks.ts +2 -0
  57. package/mobile/src/components/ReferalForm/ReferalForm.tsx +49 -47
  58. package/mobile/src/components/ReferalForm/ReferalForm.ui.json +12 -1
  59. package/mobile/src/components/ReferalForm/ReferalFormContent.ts +3 -0
  60. package/mobile/src/components/ReferalForm/ResultLink.tsx +4 -1
  61. package/mobile/src/components/ReferalForm/renderLinkInput.tsx +4 -6
  62. package/package.json +1 -1
  63. package/src/components/Blocks.mobile.ts +2 -0
  64. package/src/components/ReferalForm/ReferalForm.fixture.mobile.tsx +8 -0
  65. package/src/components/ReferalForm/ReferalForm.fixture.tsx +8 -0
  66. package/src/components/ReferalForm/ReferalForm.tsx +49 -47
  67. package/src/components/ReferalForm/ReferalForm.ui.json +12 -1
  68. package/src/components/ReferalForm/ReferalFormContent.ts +3 -0
  69. package/src/components/ReferalForm/ResultLink.tsx +4 -1
  70. package/src/components/ReferalForm/renderLinkInput.tsx +4 -6
  71. package/src/icons/IconName.ts +4 -4
@@ -12611,8 +12611,8 @@
12611
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));
12612
12612
  };
12613
12613
 
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" })] })] })));
12614
+ const icon = { 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, 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" })] })] })));
12616
12616
 
12617
12617
  const roundTo = (value, precision = 2) => {
12618
12618
  const factor = 10 ** precision;
@@ -14040,12 +14040,7 @@
14040
14040
 
14041
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
14042
 
14043
- const icon = {
14044
- src: 'CopyIcon.svg',
14045
- iconVersion: 'normal',
14046
- size: { width: 20 },
14047
- };
14048
- const renderLinkInput = JSX(({ className, value = '' }) => {
14043
+ const renderLinkInput = JSX(({ className, value = '', copyIcon }) => {
14049
14044
  const onClick = useCallback(async () => {
14050
14045
  try {
14051
14046
  await globalThis.navigator.clipboard.writeText(value);
@@ -14054,16 +14049,17 @@
14054
14049
  console.log('Ошибка копирования');
14055
14050
  }
14056
14051
  }, []);
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 }) })] }));
14052
+ 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 }) })] }));
14058
14053
  });
14059
14054
 
14060
- const ResultLink = JSX(({ link }) => {
14055
+ const ResultLink = JSX(({ link, copyIcon }) => {
14061
14056
  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
14057
  value: link,
14058
+ copyIcon,
14063
14059
  })] }));
14064
14060
  });
14065
14061
 
14066
- const ReferalForm = UniBlock(({ link = '', button, ...rest }) => {
14062
+ const ReferalForm = UniBlock(({ link = '', button, copyIcon, ...rest }) => {
14067
14063
  const [isShowResultLink, setIsShowResultLink] = useState(false);
14068
14064
  const [referalLink, setReferalLink] = useState('');
14069
14065
  const inputs = useMemo(() => (sections?.flatMap((_) => _?.inputs) || []), [sections]);
@@ -14077,7 +14073,7 @@
14077
14073
  formValidator,
14078
14074
  onSubmit: handleSubmit,
14079
14075
  });
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 ?? 'Получить ссылку' })] })) }));
14076
+ 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 ?? 'Получить ссылку' })] })) }));
14081
14077
  });
14082
14078
  const getTitle = (isShowResultLink = false) => isShowResultLink ? 'Ваша личная ссылка' : 'Как получить бесплатное обслуживание счёта';
14083
14079
 
@@ -14621,7 +14617,7 @@
14621
14617
  slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
14622
14618
  });
14623
14619
 
14624
- const packageVersion = "0.14.1029";
14620
+ const packageVersion = "0.14.1030";
14625
14621
 
14626
14622
  exports.Blocks = Blocks;
14627
14623
  exports.ContentPage = ContentPage;