@redneckz/wildless-cms-uni-blocks 0.14.267 → 0.14.269
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/bundle.umd.js +10 -7
- package/bundle/bundle.umd.min.js +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/TabsLayout/TabsLayout.js +1 -0
- package/dist/components/TabsLayout/TabsLayout.js.map +1 -1
- package/lib/common.css +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/TabsLayout/TabsLayout.js +1 -0
- package/lib/components/TabsLayout/TabsLayout.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +10 -7
- package/mobile/bundle/bundle.umd.min.js +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/TabsLayout/TabsLayout.js +1 -0
- package/mobile/dist/components/TabsLayout/TabsLayout.js.map +1 -1
- package/mobile/lib/common.css +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/TabsLayout/TabsLayout.js +1 -0
- package/mobile/lib/components/TabsLayout/TabsLayout.js.map +1 -1
- 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/TabsLayout/TabsLayout.tsx +1 -0
- package/package.json +1 -1
- 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/TabsLayout/TabsLayout.tsx +1 -0
package/bundle/bundle.umd.js
CHANGED
|
@@ -3655,21 +3655,23 @@
|
|
|
3655
3655
|
});
|
|
3656
3656
|
const formatCurrency = (value) => (value ? currencyNumberFormat.format(value) : '');
|
|
3657
3657
|
|
|
3658
|
-
const
|
|
3659
|
-
const
|
|
3658
|
+
const TABLE_STYLE_BASE = 'text-m font-light text-secondary-text ';
|
|
3659
|
+
const TABLE_HEAD_STYLE = `${TABLE_STYLE_BASE} text-left`;
|
|
3660
|
+
const TABLE_HEAD_STYLE_CENTER = `${TABLE_STYLE_BASE} pl-5xl text-center`;
|
|
3661
|
+
const TABLE_HEAD_STYLE_RIGHT = `${TABLE_STYLE_BASE} pl-5xl text-right`;
|
|
3660
3662
|
const CURRENCY_ICONS_MAP = {
|
|
3661
3663
|
USD: 'DollarIcon',
|
|
3662
3664
|
EUR: 'EuroIcon',
|
|
3663
3665
|
CNY: 'ChineseYuanRenminbiIcon',
|
|
3664
3666
|
};
|
|
3665
|
-
const CurrencyTable = JSX(({ className, exchangeCurrencyItems }) => (jsxs("table", { className:
|
|
3667
|
+
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
3668
|
const renderCurrencyRow = (exchangeCurrencyItem) => {
|
|
3667
3669
|
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));
|
|
3670
|
+
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
3671
|
};
|
|
3670
3672
|
|
|
3671
3673
|
const icon = { icon: 'GpsIcon' };
|
|
3672
|
-
const CurrentLocation = JSX(({ className = '', address }) => (jsxs("div", { className:
|
|
3674
|
+
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
3675
|
|
|
3674
3676
|
const roundTo = (value, precision = 2) => {
|
|
3675
3677
|
const factor = 10 ** precision;
|
|
@@ -3791,7 +3793,7 @@
|
|
|
3791
3793
|
currencyRatesBuy.unshift({ currency: { currency: Currency.RUB } });
|
|
3792
3794
|
const currencyRatesSell = currencyRates.filter((_) => _.saleExchangeRate);
|
|
3793
3795
|
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
|
|
3796
|
+
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
3797
|
});
|
|
3796
3798
|
const getCurrencyRates = (currencies) => {
|
|
3797
3799
|
return currencies?.filter((_) => [1, 2, 3].includes(_?.currency?.id)) || [];
|
|
@@ -5619,6 +5621,7 @@
|
|
|
5619
5621
|
const [containerRef, scroll] = useSwipeListScroll({ itemCount });
|
|
5620
5622
|
return (jsxs(BlockWrapper, { className: style(className), defaultPadding: "p-0", ...rest, children: [jsxs("div", { className: "relative border-b-8 border-primary-main", children: [jsx(SwipeListContainer, { itemClassName: "flex", containerRef: containerRef, snapAlign: "snap-end", gap: 8, onVisibleIndicesChange: scroll.handleVisibleIndicesChange, children: tabs.map(renderTabButton(activeTabIndex, setActiveTabIndex, tabAlign)) }), jsx(CarouselScrollButtons, { scroll: scroll, arrowsPadded: true, onScrollLeft: decActiveSlideIndex, onScrollRight: incActiveSlideIndex, activeIndex: activeSlideIndex, itemCount: itemCount })] }), jsx("div", { className: "space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs", children: tabs[activeTabIndex]?.href ? (jsx(TabsLayoutRedirectSection, { tab: tabs[activeTabIndex] })) : (renderBlocksList(block?.slots?.[slotName], {
|
|
5621
5623
|
...rest?.options,
|
|
5624
|
+
key: `${slotName}-${block?.type}`,
|
|
5622
5625
|
slotName,
|
|
5623
5626
|
parent: block,
|
|
5624
5627
|
})) })] }));
|
|
@@ -6110,7 +6113,7 @@
|
|
|
6110
6113
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
6111
6114
|
});
|
|
6112
6115
|
|
|
6113
|
-
const packageVersion = "0.14.
|
|
6116
|
+
const packageVersion = "0.14.268";
|
|
6114
6117
|
|
|
6115
6118
|
exports.Blocks = Blocks;
|
|
6116
6119
|
exports.ContentPage = ContentPage;
|