@redneckz/wildless-cms-uni-blocks 0.14.1030 → 0.14.1032
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 +10 -15
- 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/dist/ui-kit/Rate/Rate.js +1 -2
- package/dist/ui-kit/Rate/Rate.js.map +1 -1
- package/lib/components/Blocks.mobile.js +2 -0
- package/lib/components/Blocks.mobile.js.map +1 -1
- package/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.d.ts +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/lib/ui-kit/Rate/Rate.js +1 -2
- package/lib/ui-kit/Rate/Rate.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +61 -5
- 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/dist/ui-kit/Rate/Rate.js +1 -2
- package/mobile/dist/ui-kit/Rate/Rate.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/lib/ui-kit/Rate/Rate.js +1 -2
- package/mobile/lib/ui-kit/Rate/Rate.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/mobile/src/ui-kit/Rate/Rate.tsx +2 -4
- 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/src/ui-kit/Rate/Rate.tsx +2 -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;
|
|
@@ -13982,9 +13982,8 @@
|
|
|
13982
13982
|
const TariffsTableRowContainer = JSX(({ children, tableInner, onClick }) => (jsxs("div", { className: style('self-start flex flex-col gap-xl', DIVIDER_STYLE), role: "row", children: [jsx("div", { className: style('flex flex-col lg:flex-row gap-x-5xl gap-y-xs'), children: children }), tableInner ? (jsx("div", { className: "origin-top animate-expansion", children: jsx(InnerTable, { ...tableInner, onClick: onClick }) })) : null] })));
|
|
13983
13983
|
|
|
13984
13984
|
const RATES_COLUMN_STYLE = `grid grid-cols-3 gap-s`;
|
|
13985
|
-
const Rate = UniBlock(({ currencyPair = '', buyRate = 0, sellRate = 0 }) => (jsxs("div", { className: style('mb-s', RATES_COLUMN_STYLE, DIVIDER_STYLE), children: [jsx("div", { children: formatCurrencyPair(currencyPair) }), jsx("div", { children:
|
|
13985
|
+
const Rate = UniBlock(({ currencyPair = '', buyRate = 0, sellRate = 0 }) => (jsxs("div", { className: style('mb-s', RATES_COLUMN_STYLE, DIVIDER_STYLE), children: [jsx("div", { children: formatCurrencyPair(currencyPair) }), jsx("div", { children: buyRate }), jsx("div", { children: sellRate })] })));
|
|
13986
13986
|
const formatCurrencyPair = (currency) => currency.replace('_TOD', '');
|
|
13987
|
-
const formatRate = (rate) => rate.toFixed(4);
|
|
13988
13987
|
|
|
13989
13988
|
const TIMEZONE = 'МСК';
|
|
13990
13989
|
const renderDate = ({ dateString, isArchive = false }) => {
|
|
@@ -14040,12 +14039,7 @@
|
|
|
14040
14039
|
|
|
14041
14040
|
const renderSections = (sections, field) => sections.map((_, i) => (jsxs("div", { className: style(inputColumnStyles(_.columns), 'grid'), children: [renderTitle(_.title), (_?.inputs || [])?.map(getField(field))] }, `section-${i}`)));
|
|
14042
14041
|
|
|
14043
|
-
const
|
|
14044
|
-
src: 'CopyIcon.svg',
|
|
14045
|
-
iconVersion: 'normal',
|
|
14046
|
-
size: { width: 20 },
|
|
14047
|
-
};
|
|
14048
|
-
const renderLinkInput = JSX(({ className, value = '' }) => {
|
|
14042
|
+
const renderLinkInput = JSX(({ className, value = '', copyIcon }) => {
|
|
14049
14043
|
const onClick = useCallback(async () => {
|
|
14050
14044
|
try {
|
|
14051
14045
|
await globalThis.navigator.clipboard.writeText(value);
|
|
@@ -14054,16 +14048,17 @@
|
|
|
14054
14048
|
console.log('Ошибка копирования');
|
|
14055
14049
|
}
|
|
14056
14050
|
}, []);
|
|
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:
|
|
14051
|
+
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
14052
|
});
|
|
14059
14053
|
|
|
14060
|
-
const ResultLink = JSX(({ link }) => {
|
|
14054
|
+
const ResultLink = JSX(({ link, copyIcon }) => {
|
|
14061
14055
|
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
14056
|
value: link,
|
|
14057
|
+
copyIcon,
|
|
14063
14058
|
})] }));
|
|
14064
14059
|
});
|
|
14065
14060
|
|
|
14066
|
-
const ReferalForm = UniBlock(({ link = '', button, ...rest }) => {
|
|
14061
|
+
const ReferalForm = UniBlock(({ link = '', button, copyIcon, ...rest }) => {
|
|
14067
14062
|
const [isShowResultLink, setIsShowResultLink] = useState(false);
|
|
14068
14063
|
const [referalLink, setReferalLink] = useState('');
|
|
14069
14064
|
const inputs = useMemo(() => (sections?.flatMap((_) => _?.inputs) || []), [sections]);
|
|
@@ -14077,7 +14072,7 @@
|
|
|
14077
14072
|
formValidator,
|
|
14078
14073
|
onSubmit: handleSubmit,
|
|
14079
14074
|
});
|
|
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 ?? 'Получить ссылку' })] })) }));
|
|
14075
|
+
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
14076
|
});
|
|
14082
14077
|
const getTitle = (isShowResultLink = false) => isShowResultLink ? 'Ваша личная ссылка' : 'Как получить бесплатное обслуживание счёта';
|
|
14083
14078
|
|
|
@@ -14621,7 +14616,7 @@
|
|
|
14621
14616
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
14622
14617
|
});
|
|
14623
14618
|
|
|
14624
|
-
const packageVersion = "0.14.
|
|
14619
|
+
const packageVersion = "0.14.1031";
|
|
14625
14620
|
|
|
14626
14621
|
exports.Blocks = Blocks;
|
|
14627
14622
|
exports.ContentPage = ContentPage;
|