@redneckz/wildless-cms-uni-blocks 0.14.268 → 0.14.270
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/bin/migration-scripts/0.14.269.js +46 -0
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +61 -44
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/Header/HeaderChatBotButton.d.ts +2 -4
- package/bundle/components/Header/HeaderSecondaryMenuButton.d.ts +2 -4
- package/bundle/components/Header/useChatBot.d.ts +2 -4
- package/bundle/hooks/useAspects/applyAspects.d.ts +3 -0
- package/bundle/hooks/useAspects/aspects/forwardQuery.d.ts +2 -0
- package/bundle/hooks/useAspects/useAspects.d.ts +19 -0
- package/bundle/hooks/useClickHandler.d.ts +1 -0
- package/bundle/model/AspectsProps.d.ts +32 -0
- package/bundle/model/LinkProps.d.ts +2 -8
- package/bundle/ui-kit/LinkButton/LinkButtonContent.d.ts +1 -0
- package/bundle/utils/dataAttributes.d.ts +6 -2
- package/bundle/utils/getSessionQuery.d.ts +1 -1
- package/dist/components/ContentPage/ContentPage.js +2 -2
- package/dist/components/ContentPage/ContentPage.js.map +1 -1
- package/dist/components/ExchangeRateTile/CurrencyTable.js +7 -4
- package/dist/components/ExchangeRateTile/CurrencyTable.js.map +1 -1
- package/dist/components/ExchangeRateTile/CurrentLocation.js +2 -1
- package/dist/components/ExchangeRateTile/CurrentLocation.js.map +1 -1
- package/dist/components/ExchangeRateTile/ExchangeRateTile.js +1 -1
- package/dist/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
- package/dist/components/Header/HeaderChatBotButton.d.ts +2 -4
- package/dist/components/Header/HeaderSecondaryMenuButton.d.ts +2 -4
- package/dist/components/Header/useChatBot.d.ts +2 -4
- package/dist/components/Header/useChatBot.js.map +1 -1
- package/dist/hooks/useAspects/applyAspects.d.ts +3 -0
- package/dist/hooks/useAspects/applyAspects.js +18 -0
- package/dist/hooks/useAspects/applyAspects.js.map +1 -0
- package/dist/hooks/useAspects/aspects/forwardQuery.d.ts +2 -0
- package/dist/hooks/useAspects/aspects/forwardQuery.js +30 -0
- package/dist/hooks/useAspects/aspects/forwardQuery.js.map +1 -0
- package/dist/hooks/useAspects/useAspects.d.ts +19 -0
- package/dist/hooks/useAspects/useAspects.js +14 -0
- package/dist/hooks/useAspects/useAspects.js.map +1 -0
- package/dist/hooks/useClickHandler.d.ts +1 -0
- package/dist/hooks/useClickHandler.js +16 -0
- package/dist/hooks/useClickHandler.js.map +1 -0
- package/dist/model/AspectsProps.d.ts +32 -0
- package/dist/model/AspectsProps.js +2 -0
- package/dist/model/AspectsProps.js.map +1 -0
- package/dist/model/LinkProps.d.ts +2 -8
- package/dist/ui-kit/LinkButton/LinkButton.js +1 -1
- package/dist/ui-kit/LinkButton/LinkButton.js.map +1 -1
- package/dist/ui-kit/LinkButton/LinkButtonContent.d.ts +1 -0
- package/dist/utils/adjustSessionQuery.js +1 -1
- package/dist/utils/adjustSessionQuery.js.map +1 -1
- package/dist/utils/dataAttributes.d.ts +6 -2
- package/dist/utils/dataAttributes.js +12 -3
- package/dist/utils/dataAttributes.js.map +1 -1
- package/dist/utils/getSessionQuery.d.ts +1 -1
- package/dist/utils/getSessionQuery.js +3 -3
- package/dist/utils/getSessionQuery.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/ContentPage/ContentPage.js +2 -2
- package/lib/components/ContentPage/ContentPage.js.map +1 -1
- package/lib/components/ExchangeRateTile/CurrencyTable.js +7 -4
- package/lib/components/ExchangeRateTile/CurrencyTable.js.map +1 -1
- package/lib/components/ExchangeRateTile/CurrentLocation.js +2 -1
- package/lib/components/ExchangeRateTile/CurrentLocation.js.map +1 -1
- package/lib/components/ExchangeRateTile/ExchangeRateTile.js +1 -1
- package/lib/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
- package/lib/components/Header/HeaderChatBotButton.d.ts +2 -4
- package/lib/components/Header/HeaderSecondaryMenuButton.d.ts +2 -4
- package/lib/components/Header/useChatBot.d.ts +2 -4
- package/lib/components/Header/useChatBot.js.map +1 -1
- package/lib/hooks/useAspects/applyAspects.d.ts +3 -0
- package/lib/hooks/useAspects/applyAspects.js +15 -0
- package/lib/hooks/useAspects/applyAspects.js.map +1 -0
- package/lib/hooks/useAspects/aspects/forwardQuery.d.ts +2 -0
- package/lib/hooks/useAspects/aspects/forwardQuery.js +27 -0
- package/lib/hooks/useAspects/aspects/forwardQuery.js.map +1 -0
- package/lib/hooks/useAspects/useAspects.d.ts +19 -0
- package/lib/hooks/useAspects/useAspects.js +11 -0
- package/lib/hooks/useAspects/useAspects.js.map +1 -0
- package/lib/hooks/useClickHandler.d.ts +1 -0
- package/lib/hooks/useClickHandler.js +14 -0
- package/lib/hooks/useClickHandler.js.map +1 -0
- package/lib/model/AspectsProps.d.ts +32 -0
- package/lib/model/AspectsProps.js +2 -0
- package/lib/model/AspectsProps.js.map +1 -0
- package/lib/model/LinkProps.d.ts +2 -8
- package/lib/ui-kit/LinkButton/LinkButton.js +2 -2
- package/lib/ui-kit/LinkButton/LinkButton.js.map +1 -1
- package/lib/ui-kit/LinkButton/LinkButtonContent.d.ts +1 -0
- package/lib/utils/adjustSessionQuery.js +2 -2
- package/lib/utils/adjustSessionQuery.js.map +1 -1
- package/lib/utils/dataAttributes.d.ts +6 -2
- package/lib/utils/dataAttributes.js +10 -1
- package/lib/utils/dataAttributes.js.map +1 -1
- package/lib/utils/getSessionQuery.d.ts +1 -1
- package/lib/utils/getSessionQuery.js +1 -1
- package/lib/utils/getSessionQuery.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +61 -75
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/Header/HeaderChatBotButton.d.ts +2 -4
- package/mobile/bundle/components/Header/HeaderSecondaryMenuButton.d.ts +2 -4
- package/mobile/bundle/components/Header/useChatBot.d.ts +2 -4
- package/mobile/bundle/hooks/useAspects/applyAspects.d.ts +3 -0
- package/mobile/bundle/hooks/useAspects/aspects/forwardQuery.d.ts +2 -0
- package/mobile/bundle/hooks/useAspects/useAspects.d.ts +19 -0
- package/mobile/bundle/hooks/useClickHandler.d.ts +1 -0
- package/mobile/bundle/model/AspectsProps.d.ts +32 -0
- package/mobile/bundle/model/LinkProps.d.ts +2 -8
- package/mobile/bundle/ui-kit/LinkButton/LinkButtonContent.d.ts +1 -0
- package/mobile/bundle/utils/dataAttributes.d.ts +6 -2
- package/mobile/bundle/utils/getSessionQuery.d.ts +1 -1
- package/mobile/dist/components/ContentPage/ContentPage.js +2 -2
- package/mobile/dist/components/ContentPage/ContentPage.js.map +1 -1
- package/mobile/dist/components/ExchangeRateTile/CurrencyTable.js +7 -4
- package/mobile/dist/components/ExchangeRateTile/CurrencyTable.js.map +1 -1
- package/mobile/dist/components/ExchangeRateTile/CurrentLocation.js +2 -1
- package/mobile/dist/components/ExchangeRateTile/CurrentLocation.js.map +1 -1
- package/mobile/dist/components/ExchangeRateTile/ExchangeRateTile.js +1 -1
- package/mobile/dist/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
- package/mobile/dist/components/Header/HeaderChatBotButton.d.ts +2 -4
- package/mobile/dist/components/Header/HeaderSecondaryMenuButton.d.ts +2 -4
- package/mobile/dist/components/Header/useChatBot.d.ts +2 -4
- package/mobile/dist/components/Header/useChatBot.js.map +1 -1
- package/mobile/dist/hooks/useAspects/applyAspects.d.ts +3 -0
- package/mobile/dist/hooks/useAspects/applyAspects.js +18 -0
- package/mobile/dist/hooks/useAspects/applyAspects.js.map +1 -0
- package/mobile/dist/hooks/useAspects/aspects/forwardQuery.d.ts +2 -0
- package/mobile/dist/hooks/useAspects/aspects/forwardQuery.js +30 -0
- package/mobile/dist/hooks/useAspects/aspects/forwardQuery.js.map +1 -0
- package/mobile/dist/hooks/useAspects/useAspects.d.ts +19 -0
- package/mobile/dist/hooks/useAspects/useAspects.js +14 -0
- package/mobile/dist/hooks/useAspects/useAspects.js.map +1 -0
- package/mobile/dist/hooks/useClickHandler.d.ts +1 -0
- package/mobile/dist/hooks/useClickHandler.js +16 -0
- package/mobile/dist/hooks/useClickHandler.js.map +1 -0
- package/mobile/dist/model/AspectsProps.d.ts +32 -0
- package/mobile/dist/model/AspectsProps.js +2 -0
- package/mobile/dist/model/AspectsProps.js.map +1 -0
- package/mobile/dist/model/LinkProps.d.ts +2 -8
- package/mobile/dist/ui-kit/LinkButton/LinkButton.js +1 -1
- package/mobile/dist/ui-kit/LinkButton/LinkButton.js.map +1 -1
- package/mobile/dist/ui-kit/LinkButton/LinkButtonContent.d.ts +1 -0
- package/mobile/dist/utils/adjustSessionQuery.js +1 -1
- package/mobile/dist/utils/adjustSessionQuery.js.map +1 -1
- package/mobile/dist/utils/dataAttributes.d.ts +6 -2
- package/mobile/dist/utils/dataAttributes.js +12 -3
- package/mobile/dist/utils/dataAttributes.js.map +1 -1
- package/mobile/dist/utils/getSessionQuery.d.ts +1 -1
- package/mobile/dist/utils/getSessionQuery.js +3 -3
- package/mobile/dist/utils/getSessionQuery.js.map +1 -1
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/ContentPage/ContentPage.js +2 -2
- package/mobile/lib/components/ContentPage/ContentPage.js.map +1 -1
- package/mobile/lib/components/ExchangeRateTile/CurrencyTable.js +7 -4
- package/mobile/lib/components/ExchangeRateTile/CurrencyTable.js.map +1 -1
- package/mobile/lib/components/ExchangeRateTile/CurrentLocation.js +2 -1
- package/mobile/lib/components/ExchangeRateTile/CurrentLocation.js.map +1 -1
- package/mobile/lib/components/ExchangeRateTile/ExchangeRateTile.js +1 -1
- package/mobile/lib/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
- package/mobile/lib/components/Header/HeaderChatBotButton.d.ts +2 -4
- package/mobile/lib/components/Header/HeaderSecondaryMenuButton.d.ts +2 -4
- package/mobile/lib/components/Header/useChatBot.d.ts +2 -4
- package/mobile/lib/components/Header/useChatBot.js.map +1 -1
- package/mobile/lib/hooks/useAspects/applyAspects.d.ts +3 -0
- package/mobile/lib/hooks/useAspects/applyAspects.js +15 -0
- package/mobile/lib/hooks/useAspects/applyAspects.js.map +1 -0
- package/mobile/lib/hooks/useAspects/aspects/forwardQuery.d.ts +2 -0
- package/mobile/lib/hooks/useAspects/aspects/forwardQuery.js +27 -0
- package/mobile/lib/hooks/useAspects/aspects/forwardQuery.js.map +1 -0
- package/mobile/lib/hooks/useAspects/useAspects.d.ts +19 -0
- package/mobile/lib/hooks/useAspects/useAspects.js +11 -0
- package/mobile/lib/hooks/useAspects/useAspects.js.map +1 -0
- package/mobile/lib/hooks/useClickHandler.d.ts +1 -0
- package/mobile/lib/hooks/useClickHandler.js +14 -0
- package/mobile/lib/hooks/useClickHandler.js.map +1 -0
- package/mobile/lib/model/AspectsProps.d.ts +32 -0
- package/mobile/lib/model/AspectsProps.js +2 -0
- package/mobile/lib/model/AspectsProps.js.map +1 -0
- package/mobile/lib/model/LinkProps.d.ts +2 -8
- package/mobile/lib/ui-kit/LinkButton/LinkButton.js +2 -2
- package/mobile/lib/ui-kit/LinkButton/LinkButton.js.map +1 -1
- package/mobile/lib/ui-kit/LinkButton/LinkButtonContent.d.ts +1 -0
- package/mobile/lib/utils/adjustSessionQuery.js +2 -2
- package/mobile/lib/utils/adjustSessionQuery.js.map +1 -1
- package/mobile/lib/utils/dataAttributes.d.ts +6 -2
- package/mobile/lib/utils/dataAttributes.js +10 -1
- package/mobile/lib/utils/dataAttributes.js.map +1 -1
- package/mobile/lib/utils/getSessionQuery.d.ts +1 -1
- package/mobile/lib/utils/getSessionQuery.js +1 -1
- package/mobile/lib/utils/getSessionQuery.js.map +1 -1
- package/mobile/src/components/ContentPage/ContentPage.tsx +2 -2
- package/mobile/src/components/ExchangeRateTile/CurrencyTable.tsx +11 -8
- package/mobile/src/components/ExchangeRateTile/CurrentLocation.tsx +2 -1
- package/mobile/src/components/ExchangeRateTile/ExchangeRateTile.tsx +2 -2
- package/mobile/src/components/Header/HeaderChatBotButton.tsx +2 -2
- package/mobile/src/components/Header/HeaderSecondaryMenuButton.tsx +2 -2
- package/mobile/src/components/Header/useChatBot.ts +2 -2
- package/mobile/src/hooks/useAspects/applyAspects.ts +19 -0
- package/mobile/src/hooks/useAspects/aspects/forwardQuery.ts +32 -0
- package/mobile/src/hooks/useAspects/useAspects.ts +30 -0
- package/mobile/src/hooks/useClickHandler.ts +16 -0
- package/mobile/src/model/AspectsProps.ts +37 -0
- package/mobile/src/model/LinkProps.ts +2 -9
- package/mobile/src/ui-kit/LinkButton/LinkButton.tsx +2 -2
- package/mobile/src/ui-kit/LinkButton/LinkButtonContent.ts +1 -0
- package/mobile/src/utils/adjustSessionQuery.ts +2 -2
- package/mobile/src/utils/dataAttributes.ts +10 -3
- package/mobile/src/utils/getSessionQuery.ts +1 -1
- package/package.json +1 -1
- package/src/components/ContentPage/ContentPage.tsx +2 -2
- package/src/components/ExchangeRateTile/CurrencyTable.tsx +11 -8
- package/src/components/ExchangeRateTile/CurrentLocation.tsx +2 -1
- package/src/components/ExchangeRateTile/ExchangeRateTile.tsx +2 -2
- package/src/components/Header/HeaderChatBotButton.tsx +2 -2
- package/src/components/Header/HeaderSecondaryMenuButton.tsx +2 -2
- package/src/components/Header/useChatBot.ts +2 -2
- package/src/hooks/useAspects/applyAspects.ts +19 -0
- package/src/hooks/useAspects/aspects/forwardQuery.ts +32 -0
- package/src/hooks/useAspects/useAspects.ts +30 -0
- package/src/hooks/useClickHandler.ts +16 -0
- package/src/model/AspectsProps.ts +37 -0
- package/src/model/LinkProps.ts +2 -9
- package/src/ui-kit/LinkButton/LinkButton.tsx +2 -2
- package/src/ui-kit/LinkButton/LinkButtonContent.ts +1 -0
- package/src/utils/adjustSessionQuery.ts +2 -2
- package/src/utils/dataAttributes.ts +10 -3
- package/src/utils/getSessionQuery.ts +1 -1
- package/bundle/hooks/useNavigateHandler.d.ts +0 -3
- package/dist/hooks/useNavigateHandler.d.ts +0 -3
- package/dist/hooks/useNavigateHandler.js +0 -62
- package/dist/hooks/useNavigateHandler.js.map +0 -1
- package/lib/hooks/useNavigateHandler.d.ts +0 -3
- package/lib/hooks/useNavigateHandler.js +0 -60
- package/lib/hooks/useNavigateHandler.js.map +0 -1
- package/mobile/bundle/hooks/useNavigateHandler.d.ts +0 -3
- package/mobile/dist/hooks/useNavigateHandler.d.ts +0 -3
- package/mobile/dist/hooks/useNavigateHandler.js +0 -62
- package/mobile/dist/hooks/useNavigateHandler.js.map +0 -1
- package/mobile/lib/hooks/useNavigateHandler.d.ts +0 -3
- package/mobile/lib/hooks/useNavigateHandler.js +0 -60
- package/mobile/lib/hooks/useNavigateHandler.js.map +0 -1
- package/mobile/src/hooks/useNavigateHandler.ts +0 -78
- package/src/hooks/useNavigateHandler.ts +0 -78
package/bundle/bundle.umd.js
CHANGED
|
@@ -467,7 +467,16 @@
|
|
|
467
467
|
}
|
|
468
468
|
}
|
|
469
469
|
|
|
470
|
-
const
|
|
470
|
+
const getAspectsAttributes = (data) => {
|
|
471
|
+
try {
|
|
472
|
+
return {
|
|
473
|
+
'data-aspects': JSON.stringify(data),
|
|
474
|
+
};
|
|
475
|
+
}
|
|
476
|
+
catch (_) {
|
|
477
|
+
return {};
|
|
478
|
+
}
|
|
479
|
+
};
|
|
471
480
|
|
|
472
481
|
/** @deprecated */
|
|
473
482
|
const ButtonInner = JSX((props) => {
|
|
@@ -524,7 +533,7 @@
|
|
|
524
533
|
const buttonInner = children ?? jsx(ButtonInner, { ...adjustedProps });
|
|
525
534
|
return disabled ? (jsx(DisabledButton, { ...adjustedProps, children: buttonInner })) : (jsx(RegularButton, { ...adjustedProps, children: buttonInner }));
|
|
526
535
|
});
|
|
527
|
-
const RegularButton = JSX(({ className = '', href, rel, target, ariaLabel, version, rounded, onClick, type, data, children, }) => (jsx("a", { className: getRegularButtonClasses({ className, version, rounded }), href: href, rel: rel, target: target, "aria-label": ariaLabel, role: href ? 'link' : 'button', onClick: onClick, type: type, ...
|
|
536
|
+
const RegularButton = JSX(({ className = '', href, rel, target, ariaLabel, version, rounded, onClick, type, data, children, }) => (jsx("a", { className: getRegularButtonClasses({ className, version, rounded }), href: href, rel: rel, target: target, "aria-label": ariaLabel, role: href ? 'link' : 'button', onClick: onClick, type: type, ...getAspectsAttributes(data), children: children })));
|
|
528
537
|
const DisabledButton = JSX(({ className, ariaLabel, version, rounded, children }) => (jsx("button", { type: "button", "aria-disabled": "true", "aria-label": ariaLabel, tabIndex: -1, className: getDisabledButtonClasses({ className, rounded, version }), children: children })));
|
|
529
538
|
|
|
530
539
|
function renderBackwardButton(version, handleClick, alwaysVisible = false) {
|
|
@@ -3655,21 +3664,23 @@
|
|
|
3655
3664
|
});
|
|
3656
3665
|
const formatCurrency = (value) => (value ? currencyNumberFormat.format(value) : '');
|
|
3657
3666
|
|
|
3658
|
-
const
|
|
3659
|
-
const
|
|
3667
|
+
const TABLE_STYLE_BASE = 'text-m font-light text-secondary-text ';
|
|
3668
|
+
const TABLE_HEAD_STYLE = `${TABLE_STYLE_BASE} text-left`;
|
|
3669
|
+
const TABLE_HEAD_STYLE_CENTER = `${TABLE_STYLE_BASE} pl-5xl text-center`;
|
|
3670
|
+
const TABLE_HEAD_STYLE_RIGHT = `${TABLE_STYLE_BASE} pl-5xl text-right`;
|
|
3660
3671
|
const CURRENCY_ICONS_MAP = {
|
|
3661
3672
|
USD: 'DollarIcon',
|
|
3662
3673
|
EUR: 'EuroIcon',
|
|
3663
3674
|
CNY: 'ChineseYuanRenminbiIcon',
|
|
3664
3675
|
};
|
|
3665
|
-
const CurrencyTable = JSX(({ className, exchangeCurrencyItems }) => (jsxs("table", { className:
|
|
3676
|
+
const CurrencyTable = JSX(({ className, exchangeCurrencyItems }) => (jsxs("table", { className: style('h-fit w-full', className), children: [jsx("thead", { children: jsxs("tr", { children: [jsx("th", { className: TABLE_HEAD_STYLE, children: jsx(Text, { size: "text-m", children: "\u0412\u0430\u043B\u044E\u0442\u0430" }) }), jsx("th", { className: TABLE_HEAD_STYLE_CENTER, children: jsx(Text, { size: "text-m", children: "\u041A\u0443\u043F\u0438\u0442\u044C" }) }), jsx("th", { className: TABLE_HEAD_STYLE_RIGHT, children: jsx(Text, { size: "text-m", children: "\u041F\u0440\u043E\u0434\u0430\u0442\u044C" }) })] }) }), jsx("tbody", { children: exchangeCurrencyItems.map(renderCurrencyRow) })] })));
|
|
3666
3677
|
const renderCurrencyRow = (exchangeCurrencyItem) => {
|
|
3667
3678
|
const currency = exchangeCurrencyItem?.currency?.currency;
|
|
3668
|
-
return (jsxs("tr", { className: "pb-2xs text-h6", children: [jsx("td", { className: "pt-m", 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", children: jsx(Text, { size: "text-h6", children: formatCurrency(exchangeCurrencyItem?.saleExchangeRate) }) }), jsx("td", { className: "pt-m pl-5xl", children: jsx(Text, { size: "text-h6", children: formatCurrency(exchangeCurrencyItem?.buyExchangeRate) }) })] }, currency));
|
|
3679
|
+
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));
|
|
3669
3680
|
};
|
|
3670
3681
|
|
|
3671
3682
|
const icon = { icon: 'GpsIcon' };
|
|
3672
|
-
const CurrentLocation = JSX(({ className = '', address }) => (jsxs("div", { className:
|
|
3683
|
+
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" })] })] })));
|
|
3673
3684
|
|
|
3674
3685
|
const roundTo = (value, precision = 2) => {
|
|
3675
3686
|
const factor = 10 ** precision;
|
|
@@ -3791,7 +3802,7 @@
|
|
|
3791
3802
|
currencyRatesBuy.unshift({ currency: { currency: Currency.RUB } });
|
|
3792
3803
|
const currencyRatesSell = currencyRates.filter((_) => _.saleExchangeRate);
|
|
3793
3804
|
currencyRatesSell.push({ currency: { currency: Currency.RUB } });
|
|
3794
|
-
return (jsx(BlockWrapper, { className: style('box-border min-h-80', className), ...rest, children: jsx(BaseTile, { className: "h-full", title: jsx(Heading, { headingType: "h4", title: title, className: "whitespace-pre-wrap" }), children: jsxs("div", { className: "flex w-full gap-6xl flex-wrap
|
|
3805
|
+
return (jsx(BlockWrapper, { className: style('box-border min-h-80', className), ...rest, children: jsx(BaseTile, { className: "h-full", title: jsx(Heading, { headingType: "h4", title: title, className: "whitespace-pre-wrap" }), children: jsxs("div", { className: "flex w-full gap-6xl flex-wrap @lg:flex-nowrap", children: [jsxs("div", { className: "w-full @2xl:w-auto @5xl:w-1/2", children: [currencyRates ? (jsx(CurrencyTable, { className: "mb-xl", exchangeCurrencyItems: currencyRates })) : null, jsx(CurrentLocation, { address: exchangeRates?.address })] }), currencyRates.length && currencyRatesBuy.length && currencyRatesSell.length ? (jsx(ExchangeCurrencyCalculator, { className: "grow w-1/2", currencyRatesBuy: currencyRatesBuy, currencyRatesSell: currencyRatesSell, button: button })) : null] }) }) }));
|
|
3795
3806
|
});
|
|
3796
3807
|
const getCurrencyRates = (currencies) => {
|
|
3797
3808
|
return currencies?.filter((_) => [1, 2, 3].includes(_?.currency?.id)) || [];
|
|
@@ -5890,7 +5901,7 @@
|
|
|
5890
5901
|
};
|
|
5891
5902
|
|
|
5892
5903
|
const QUERY_STORAGE_KEY = 'rshb-query-params';
|
|
5893
|
-
function
|
|
5904
|
+
function saveSessionQuery() {
|
|
5894
5905
|
const result = globalThis.location?.search || globalThis.sessionStorage?.getItem(QUERY_STORAGE_KEY) || '';
|
|
5895
5906
|
if (result) {
|
|
5896
5907
|
globalThis.sessionStorage?.setItem(QUERY_STORAGE_KEY, result);
|
|
@@ -5898,8 +5909,23 @@
|
|
|
5898
5909
|
return result;
|
|
5899
5910
|
}
|
|
5900
5911
|
|
|
5912
|
+
const applyAspects = (aspects) => (ev) => {
|
|
5913
|
+
const element = ev.target?.closest('[data-aspects]');
|
|
5914
|
+
try {
|
|
5915
|
+
const aspectsAttributes = JSON.parse(element?.dataset?.aspects ?? '[]');
|
|
5916
|
+
for (const { aspectName, params } of aspectsAttributes) {
|
|
5917
|
+
aspects[aspectName ?? '']?.(ev, params);
|
|
5918
|
+
}
|
|
5919
|
+
}
|
|
5920
|
+
catch (_) {
|
|
5921
|
+
// Do nothing
|
|
5922
|
+
}
|
|
5923
|
+
// legal aspect, use always
|
|
5924
|
+
aspects.forwardQuery?.(ev);
|
|
5925
|
+
};
|
|
5926
|
+
|
|
5901
5927
|
const adjustSessionQuery = (href) => {
|
|
5902
|
-
const sessionQuery =
|
|
5928
|
+
const sessionQuery = saveSessionQuery();
|
|
5903
5929
|
if (!isURL(href) || !sessionQuery) {
|
|
5904
5930
|
return href;
|
|
5905
5931
|
}
|
|
@@ -5910,41 +5936,18 @@
|
|
|
5910
5936
|
return url.toString();
|
|
5911
5937
|
};
|
|
5912
5938
|
|
|
5913
|
-
const
|
|
5914
|
-
|
|
5915
|
-
|
|
5916
|
-
}, []);
|
|
5917
|
-
const loadBot = useChatBot(projectSettings.CHAT_BOT);
|
|
5918
|
-
const reachGoalYM = (targetName) => {
|
|
5919
|
-
const [ymID] = projectSettings.YANDEX_METRIKA_ID?.split(',').reverse() ?? [];
|
|
5920
|
-
if ([ymID, targetName, globalThis.ym].every(Boolean)) {
|
|
5921
|
-
globalThis.ym(ymID, 'reachGoal', targetName);
|
|
5922
|
-
}
|
|
5923
|
-
};
|
|
5924
|
-
useEventListener(globalThis, 'click', navigationHandler({ loadBot, reachGoalYM }));
|
|
5925
|
-
});
|
|
5926
|
-
const navigationHandler = (methods) => (ev) => {
|
|
5927
|
-
const element = getAnchorElement(ev.target);
|
|
5928
|
-
for (const key in element?.dataset) {
|
|
5929
|
-
getScenario(key)?.(element, methods);
|
|
5930
|
-
}
|
|
5931
|
-
if (isURL(element?.href) && !element?.href?.startsWith(globalThis.location?.origin)) {
|
|
5939
|
+
const forwardQuery = (ev) => {
|
|
5940
|
+
const anchor = ev.target?.closest('a');
|
|
5941
|
+
if (isURL(anchor?.href) && !anchor?.href?.startsWith(globalThis.location?.origin)) {
|
|
5932
5942
|
ev.preventDefault();
|
|
5933
5943
|
ev.stopPropagation();
|
|
5934
|
-
const url = adjustSessionQuery(
|
|
5944
|
+
const url = adjustSessionQuery(anchor?.href) || anchor?.href;
|
|
5935
5945
|
if (url) {
|
|
5936
|
-
const transition = getTransition(
|
|
5946
|
+
const transition = getTransition(anchor?.target);
|
|
5937
5947
|
transition?.(url);
|
|
5938
5948
|
}
|
|
5939
5949
|
}
|
|
5940
5950
|
};
|
|
5941
|
-
const getAnchorElement = (target) => {
|
|
5942
|
-
let _target = target;
|
|
5943
|
-
while (Boolean(_target) && _target.tagName !== 'A') {
|
|
5944
|
-
_target = _target?.parentNode;
|
|
5945
|
-
}
|
|
5946
|
-
return _target;
|
|
5947
|
-
};
|
|
5948
5951
|
const getTransition = tableFunc([
|
|
5949
5952
|
[(_) => _ === '_blank', (url) => globalThis.open(url, '_blank')],
|
|
5950
5953
|
[(_) => _ === '_parent', (url) => globalThis.parent && (globalThis.parent.location.href = url)],
|
|
@@ -5956,10 +5959,24 @@
|
|
|
5956
5959
|
],
|
|
5957
5960
|
[() => true, (url) => globalThis.location && (globalThis.location.href = url)],
|
|
5958
5961
|
]);
|
|
5959
|
-
|
|
5960
|
-
|
|
5961
|
-
|
|
5962
|
-
|
|
5962
|
+
|
|
5963
|
+
function useAspects() {
|
|
5964
|
+
return useAspects._impl();
|
|
5965
|
+
}
|
|
5966
|
+
useAspects._impl = () => ({
|
|
5967
|
+
forwardQuery,
|
|
5968
|
+
});
|
|
5969
|
+
useAspects.setup = (impl) => {
|
|
5970
|
+
useAspects._impl = impl;
|
|
5971
|
+
};
|
|
5972
|
+
|
|
5973
|
+
const useClickHandler = handlerDecorator(() => {
|
|
5974
|
+
useEffect(() => {
|
|
5975
|
+
saveSessionQuery(); //? Call first time for save query in sessionStorage
|
|
5976
|
+
}, []);
|
|
5977
|
+
const aspects = useAspects();
|
|
5978
|
+
useEventListener(globalThis, 'click', applyAspects(aspects));
|
|
5979
|
+
});
|
|
5963
5980
|
|
|
5964
5981
|
const COOKIE_DIALOG_ID = 'cookie';
|
|
5965
5982
|
const DIALOG_INITIAL_DELAY = 3 * 1000;
|
|
@@ -6089,7 +6106,7 @@
|
|
|
6089
6106
|
const ContentPage = JSX(({ className, data = EMPTY_DATA, blocksRegistry, blockDecorator }) => {
|
|
6090
6107
|
const { slots, blocks, fallback, ...pageContent } = data;
|
|
6091
6108
|
const resolvedPageContent = useJSONRef(pageContent, fallback);
|
|
6092
|
-
|
|
6109
|
+
useClickHandler();
|
|
6093
6110
|
const options = {
|
|
6094
6111
|
key: '',
|
|
6095
6112
|
page: { slots, blocks, fallback, ...resolvedPageContent },
|
|
@@ -6111,7 +6128,7 @@
|
|
|
6111
6128
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
6112
6129
|
});
|
|
6113
6130
|
|
|
6114
|
-
const packageVersion = "0.14.
|
|
6131
|
+
const packageVersion = "0.14.269";
|
|
6115
6132
|
|
|
6116
6133
|
exports.Blocks = Blocks;
|
|
6117
6134
|
exports.ContentPage = ContentPage;
|