@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.
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +9 -13
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/ReferalForm/ReferalFormContent.d.ts +3 -0
- package/bundle/components/ReferalForm/ResultLink.d.ts +2 -0
- package/bundle/components/ReferalForm/renderLinkInput.d.ts +6 -1
- package/dist/components/Blocks.mobile.js +2 -0
- package/dist/components/Blocks.mobile.js.map +1 -1
- package/dist/components/ReferalForm/ReferalForm.js +2 -2
- package/dist/components/ReferalForm/ReferalForm.js.map +1 -1
- package/dist/components/ReferalForm/ReferalFormContent.d.ts +3 -0
- package/dist/components/ReferalForm/ResultLink.d.ts +2 -0
- package/dist/components/ReferalForm/ResultLink.js +2 -1
- package/dist/components/ReferalForm/ResultLink.js.map +1 -1
- package/dist/components/ReferalForm/renderLinkInput.d.ts +6 -1
- package/dist/components/ReferalForm/renderLinkInput.js +2 -7
- package/dist/components/ReferalForm/renderLinkInput.js.map +1 -1
- package/lib/components/Blocks.mobile.js +2 -0
- package/lib/components/Blocks.mobile.js.map +1 -1
- package/lib/components/ReferalForm/ReferalForm.js +2 -2
- package/lib/components/ReferalForm/ReferalForm.js.map +1 -1
- package/lib/components/ReferalForm/ReferalFormContent.d.ts +3 -0
- package/lib/components/ReferalForm/ResultLink.d.ts +2 -0
- package/lib/components/ReferalForm/ResultLink.js +2 -1
- package/lib/components/ReferalForm/ResultLink.js.map +1 -1
- package/lib/components/ReferalForm/renderLinkInput.d.ts +6 -1
- package/lib/components/ReferalForm/renderLinkInput.js +2 -7
- package/lib/components/ReferalForm/renderLinkInput.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +60 -3
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/ReferalForm/ReferalFormContent.d.ts +3 -0
- package/mobile/bundle/components/ReferalForm/ResultLink.d.ts +2 -0
- package/mobile/bundle/components/ReferalForm/renderLinkInput.d.ts +6 -1
- package/mobile/dist/components/Blocks.js +2 -0
- package/mobile/dist/components/Blocks.js.map +1 -1
- package/mobile/dist/components/ReferalForm/ReferalForm.js +2 -2
- package/mobile/dist/components/ReferalForm/ReferalForm.js.map +1 -1
- package/mobile/dist/components/ReferalForm/ReferalFormContent.d.ts +3 -0
- package/mobile/dist/components/ReferalForm/ResultLink.d.ts +2 -0
- package/mobile/dist/components/ReferalForm/ResultLink.js +2 -1
- package/mobile/dist/components/ReferalForm/ResultLink.js.map +1 -1
- package/mobile/dist/components/ReferalForm/renderLinkInput.d.ts +6 -1
- package/mobile/dist/components/ReferalForm/renderLinkInput.js +2 -7
- package/mobile/dist/components/ReferalForm/renderLinkInput.js.map +1 -1
- package/mobile/lib/components/Blocks.js +2 -0
- package/mobile/lib/components/Blocks.js.map +1 -1
- package/mobile/lib/components/ReferalForm/ReferalForm.js +2 -2
- package/mobile/lib/components/ReferalForm/ReferalForm.js.map +1 -1
- package/mobile/lib/components/ReferalForm/ReferalFormContent.d.ts +3 -0
- package/mobile/lib/components/ReferalForm/ResultLink.d.ts +2 -0
- package/mobile/lib/components/ReferalForm/ResultLink.js +2 -1
- package/mobile/lib/components/ReferalForm/ResultLink.js.map +1 -1
- package/mobile/lib/components/ReferalForm/renderLinkInput.d.ts +6 -1
- package/mobile/lib/components/ReferalForm/renderLinkInput.js +2 -7
- package/mobile/lib/components/ReferalForm/renderLinkInput.js.map +1 -1
- package/mobile/src/components/Blocks.ts +2 -0
- package/mobile/src/components/ReferalForm/ReferalForm.tsx +49 -47
- package/mobile/src/components/ReferalForm/ReferalForm.ui.json +12 -1
- package/mobile/src/components/ReferalForm/ReferalFormContent.ts +3 -0
- package/mobile/src/components/ReferalForm/ResultLink.tsx +4 -1
- package/mobile/src/components/ReferalForm/renderLinkInput.tsx +4 -6
- package/package.json +1 -1
- package/src/components/Blocks.mobile.ts +2 -0
- package/src/components/ReferalForm/ReferalForm.fixture.mobile.tsx +8 -0
- package/src/components/ReferalForm/ReferalForm.fixture.tsx +8 -0
- package/src/components/ReferalForm/ReferalForm.tsx +49 -47
- package/src/components/ReferalForm/ReferalForm.ui.json +12 -1
- package/src/components/ReferalForm/ReferalFormContent.ts +3 -0
- package/src/components/ReferalForm/ResultLink.tsx +4 -1
- package/src/components/ReferalForm/renderLinkInput.tsx +4 -6
- package/src/icons/IconName.ts +4 -4
package/bundle/bundle.umd.js
CHANGED
|
@@ -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
|
|
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
|
|
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
|
|
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:
|
|
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.
|
|
14620
|
+
const packageVersion = "0.14.1030";
|
|
14625
14621
|
|
|
14626
14622
|
exports.Blocks = Blocks;
|
|
14627
14623
|
exports.ContentPage = ContentPage;
|