@redneckz/wildless-cms-uni-blocks 0.14.910 → 0.14.912
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/Env.d.ts +2 -0
- package/bundle/bundle.umd.js +15 -8
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/Footer/LinkList.d.ts +1 -0
- package/dist/Env.d.ts +2 -0
- package/dist/Env.js.map +1 -1
- package/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +2 -2
- package/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -1
- package/dist/components/Footer/LinkList.d.ts +1 -0
- package/dist/components/Footer/LinkList.js +2 -2
- package/dist/components/Footer/LinkList.js.map +1 -1
- package/dist/services/search/tokenize.js +4 -1
- package/dist/services/search/tokenize.js.map +1 -1
- package/dist/ui-kit/SearchDialog/SearchDialog.js +5 -1
- package/dist/ui-kit/SearchDialog/SearchDialog.js.map +1 -1
- package/dist/ui-kit/Sitemap/Sitemap.js +5 -1
- package/dist/ui-kit/Sitemap/Sitemap.js.map +1 -1
- package/lib/Env.d.ts +2 -0
- package/lib/Env.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +2 -2
- package/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -1
- package/lib/components/Footer/LinkList.d.ts +1 -0
- package/lib/components/Footer/LinkList.js +2 -2
- package/lib/components/Footer/LinkList.js.map +1 -1
- package/lib/services/search/tokenize.js +4 -1
- package/lib/services/search/tokenize.js.map +1 -1
- package/lib/ui-kit/SearchDialog/SearchDialog.fixture.d.ts +2 -0
- package/lib/ui-kit/SearchDialog/SearchDialog.js +5 -1
- package/lib/ui-kit/SearchDialog/SearchDialog.js.map +1 -1
- package/lib/ui-kit/Sitemap/Sitemap.js +5 -1
- package/lib/ui-kit/Sitemap/Sitemap.js.map +1 -1
- package/mobile/bundle/Env.d.ts +2 -0
- package/mobile/bundle/bundle.umd.js +5 -5
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/Footer/LinkList.d.ts +1 -0
- package/mobile/dist/Env.d.ts +2 -0
- package/mobile/dist/Env.js.map +1 -1
- package/mobile/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +2 -2
- package/mobile/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -1
- package/mobile/dist/components/Footer/LinkList.d.ts +1 -0
- package/mobile/dist/components/Footer/LinkList.js +2 -2
- package/mobile/dist/components/Footer/LinkList.js.map +1 -1
- package/mobile/dist/services/search/tokenize.js +4 -1
- package/mobile/dist/services/search/tokenize.js.map +1 -1
- package/mobile/dist/ui-kit/SearchDialog/SearchDialog.js +5 -1
- package/mobile/dist/ui-kit/SearchDialog/SearchDialog.js.map +1 -1
- package/mobile/lib/Env.d.ts +2 -0
- package/mobile/lib/Env.js.map +1 -1
- package/mobile/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +2 -2
- package/mobile/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -1
- package/mobile/lib/components/Footer/LinkList.d.ts +1 -0
- package/mobile/lib/components/Footer/LinkList.js +2 -2
- package/mobile/lib/components/Footer/LinkList.js.map +1 -1
- package/mobile/lib/services/search/tokenize.js +4 -1
- package/mobile/lib/services/search/tokenize.js.map +1 -1
- package/mobile/lib/ui-kit/SearchDialog/SearchDialog.js +5 -1
- package/mobile/lib/ui-kit/SearchDialog/SearchDialog.js.map +1 -1
- package/mobile/src/Env.ts +2 -0
- package/mobile/src/components/ExchangeRateTile/ExchangeCurrencyCalculator.tsx +2 -2
- package/mobile/src/components/Footer/LinkList.tsx +3 -2
- package/mobile/src/services/search/tokenize.ts +8 -1
- package/mobile/src/ui-kit/SearchDialog/SearchDialog.tsx +11 -1
- package/package.json +1 -1
- package/src/Env.ts +2 -0
- package/src/components/ExchangeRateTile/ExchangeCurrencyCalculator.tsx +2 -2
- package/src/components/Footer/LinkList.tsx +3 -2
- package/src/icons/IconName.ts +4 -4
- package/src/services/search/tokenize.ts +8 -1
- package/src/ui-kit/SearchDialog/SearchDialog.fixture.tsx +782 -0
- package/src/ui-kit/SearchDialog/SearchDialog.tsx +11 -1
- package/src/ui-kit/Sitemap/Sitemap.tsx +25 -7
package/bundle/Env.d.ts
CHANGED
package/bundle/bundle.umd.js
CHANGED
|
@@ -10381,7 +10381,7 @@
|
|
|
10381
10381
|
};
|
|
10382
10382
|
const handleInputSell = (setCalcState, currencyRatesSell) => (value, currencyFrom, currencyTo) => {
|
|
10383
10383
|
setCalcState({ inputSell: formatValue(value), selectBuy: currencyTo });
|
|
10384
|
-
const rate = currencyRatesSell.find((_) => _.currency?.currency === currencyTo)?.
|
|
10384
|
+
const rate = currencyRatesSell.find((_) => _.currency?.currency === currencyTo)?.saleExchangeRate ||
|
|
10385
10385
|
currencyRatesSell.find((_) => _.currency?.currency === currencyFrom)?.buyExchangeRate;
|
|
10386
10386
|
if (rate) {
|
|
10387
10387
|
setCalcState({
|
|
@@ -10391,7 +10391,7 @@
|
|
|
10391
10391
|
};
|
|
10392
10392
|
const handleInputBuy = (setCalcState, currencyRatesBuy) => (value, currencyTo, currencyFrom) => {
|
|
10393
10393
|
setCalcState({ inputBuy: formatValue(value), selectSell: currencyFrom });
|
|
10394
|
-
const rate = currencyRatesBuy.find((_) => _.currency?.currency === currencyFrom)?.
|
|
10394
|
+
const rate = currencyRatesBuy.find((_) => _.currency?.currency === currencyFrom)?.buyExchangeRate ||
|
|
10395
10395
|
currencyRatesBuy.find((_) => _.currency?.currency === currencyTo)?.saleExchangeRate;
|
|
10396
10396
|
if (rate) {
|
|
10397
10397
|
setCalcState({
|
|
@@ -10420,9 +10420,9 @@
|
|
|
10420
10420
|
});
|
|
10421
10421
|
const getCurrencyRates = (currencies) => currencies?.filter((_) => [1, 2, 3].includes(_?.currency?.id)) || [];
|
|
10422
10422
|
|
|
10423
|
-
const LinkList = JSX(({ className = '', items }) => {
|
|
10423
|
+
const LinkList = JSX(({ className = '', items, isFlex = true }) => {
|
|
10424
10424
|
const link = useLink();
|
|
10425
|
-
return (jsx("ul", { className: style('flex flex-col gap-s w-full', className), children: items?.map(renderLinkListItem(link)) }));
|
|
10425
|
+
return (jsx("ul", { className: style(isFlex ? 'flex flex-col gap-s' : 'block', 'w-full', className), children: items?.map(renderLinkListItem(link)) }));
|
|
10426
10426
|
});
|
|
10427
10427
|
const renderLinkListItem = (link) => ({ dataFooter, ...linkProps }, i) => {
|
|
10428
10428
|
const { text, href, target, onClick } = link(linkProps);
|
|
@@ -10435,9 +10435,12 @@
|
|
|
10435
10435
|
const isVisibleItem = (areaKeys) => (_) => !_.displayArea || areaKeys.includes(_.displayArea.toLowerCase());
|
|
10436
10436
|
|
|
10437
10437
|
const FOOTER_AREA_KEYS = ['all', 'footer'];
|
|
10438
|
+
const IS_SINGLE_SEARCH_INDEX$1 = Boolean(env.SINGLE_SEARCH_INDEX);
|
|
10438
10439
|
const Sitemap = JSX(({ className, navigationItems }) => {
|
|
10439
10440
|
const link = useLink();
|
|
10440
|
-
|
|
10441
|
+
const filteredItems = navigationItems?.filter(isVisibleItem(FOOTER_AREA_KEYS))?.map(link) ?? [];
|
|
10442
|
+
const [firstItem] = filteredItems;
|
|
10443
|
+
return (jsx("div", { className: "space-y-2", children: IS_SINGLE_SEARCH_INDEX$1 ? (jsx("div", { children: jsx(LinkList, { className: "columns-3 space-y-3 gap-x-6xl", items: firstItem?.items, isFlex: false }) })) : (jsx("div", { role: "menu", className: style('w-full flex items-start justify-between flex-col md:flex-row gap-y-m lg:order-2', className), children: filteredItems?.map(renderColumn) })) }));
|
|
10441
10444
|
});
|
|
10442
10445
|
const renderColumn = (menuItem, index) => {
|
|
10443
10446
|
const { text, items = [], href, target = '_self', onClick, dataFooter } = menuItem;
|
|
@@ -10556,10 +10559,12 @@
|
|
|
10556
10559
|
const sum = (list = []) => list.reduce((a, b) => a + b, 0);
|
|
10557
10560
|
|
|
10558
10561
|
const MIN_TERM_LEN = 3;
|
|
10562
|
+
const LANG = env.SEARCH_LANG;
|
|
10559
10563
|
const tokenize = (text) => text
|
|
10560
10564
|
.toLowerCase()
|
|
10561
10565
|
.split(/[^0-9a-zа-я-]+/)
|
|
10562
|
-
.filter((token) => token.length >= MIN_TERM_LEN &&
|
|
10566
|
+
.filter((token) => token.length >= MIN_TERM_LEN &&
|
|
10567
|
+
(LANG === 'en' ? !/[а-яА-ЯёЁ0-9]/.test(token) : !/[0-9a-z]/.test(token)));
|
|
10563
10568
|
|
|
10564
10569
|
const textRank = (queryTokens) => (text) => {
|
|
10565
10570
|
const textTokens = tokenize(text || '');
|
|
@@ -10642,8 +10647,10 @@
|
|
|
10642
10647
|
return (jsxs("div", { className: style('relative', className), role: "form", children: [jsx("div", { className: "absolute h-full flex items-center pl-m pointer-events-none", children: jsx(Img, { image: { icon: 'LoupeIcon', iconVersion: 'black' }, width: "24", height: "24" }) }), jsx("input", { className: style('h-14 w-full px-10 text-l text-black box-border rounded-md', inputValidStyle), value: value, type: "text", name: "search-bar-input", placeholder: placeholder, autoFocus: autoFocus, onChange: handleChange, onFocus: onFocus })] }));
|
|
10643
10648
|
});
|
|
10644
10649
|
|
|
10650
|
+
const IS_SINGLE_SEARCH_INDEX = Boolean(env.SINGLE_SEARCH_INDEX);
|
|
10645
10651
|
const SearchDialog = JSX(({ initialQuery, navigationItems, onClose }) => {
|
|
10646
|
-
const
|
|
10652
|
+
const basePath = getBasePath(env.SITE_URL);
|
|
10653
|
+
const basePathList = useMemo(() => (IS_SINGLE_SEARCH_INDEX ? [basePath] : navigationItems?.map((_) => _.href || '/')), [navigationItems]);
|
|
10647
10654
|
const [searchResult, searchInputProps] = useSearch({
|
|
10648
10655
|
basePathList,
|
|
10649
10656
|
initialQuery,
|
|
@@ -12014,7 +12021,7 @@
|
|
|
12014
12021
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
12015
12022
|
});
|
|
12016
12023
|
|
|
12017
|
-
const packageVersion = "0.14.
|
|
12024
|
+
const packageVersion = "0.14.911";
|
|
12018
12025
|
|
|
12019
12026
|
exports.Blocks = Blocks;
|
|
12020
12027
|
exports.ContentPage = ContentPage;
|