@redneckz/wildless-cms-uni-blocks 0.14.393 → 0.14.395
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 +136 -107
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/Header/HeaderTopMenu.d.ts +22 -0
- package/bundle/components/Header/HeaderTopMenuItem.d.ts +9 -0
- package/bundle/ui-kit/Calculator/CalculatorValueBlock.d.ts +2 -0
- package/bundle/ui-kit/Calculator/Rate.d.ts +2 -0
- package/bundle/ui-kit/Calculator/renderRate.d.ts +1 -1
- package/dist/components/CalculatorBonus/CalculatorBonus.js +10 -9
- package/dist/components/CalculatorBonus/CalculatorBonus.js.map +1 -1
- package/dist/components/Header/DropdownMenu.js +1 -1
- package/dist/components/Header/DropdownMenu.js.map +1 -1
- package/dist/components/Header/Header.js +2 -4
- package/dist/components/Header/Header.js.map +1 -1
- package/dist/components/Header/HeaderSecondaryMenu.js +1 -1
- package/dist/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/dist/components/Header/HeaderSubMenu.js +1 -1
- package/dist/components/Header/HeaderSubMenu.js.map +1 -1
- package/dist/components/Header/HeaderTopMenu.d.ts +22 -0
- package/dist/components/Header/HeaderTopMenu.js +24 -0
- package/dist/components/Header/HeaderTopMenu.js.map +1 -0
- package/dist/components/Header/HeaderTopMenuItem.d.ts +9 -0
- package/dist/components/Header/HeaderTopMenuItem.js +20 -0
- package/dist/components/Header/HeaderTopMenuItem.js.map +1 -0
- package/dist/ui-kit/Calculator/CalculatorValueBlock.d.ts +2 -0
- package/dist/ui-kit/Calculator/CalculatorValueBlock.js +1 -1
- package/dist/ui-kit/Calculator/CalculatorValueBlock.js.map +1 -1
- package/dist/ui-kit/Calculator/Rate.d.ts +2 -0
- package/dist/ui-kit/Calculator/Rate.js +1 -1
- package/dist/ui-kit/Calculator/Rate.js.map +1 -1
- package/dist/ui-kit/Calculator/renderFootnote.js +1 -1
- package/dist/ui-kit/Calculator/renderFootnote.js.map +1 -1
- package/dist/ui-kit/Calculator/renderRate.d.ts +1 -1
- package/dist/ui-kit/Calculator/renderRate.js +1 -1
- package/dist/ui-kit/Calculator/renderRate.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/CalculatorBonus/CalculatorBonus.js +10 -9
- package/lib/components/CalculatorBonus/CalculatorBonus.js.map +1 -1
- package/lib/components/Header/DropdownMenu.js +1 -1
- package/lib/components/Header/DropdownMenu.js.map +1 -1
- package/lib/components/Header/Header.js +2 -4
- package/lib/components/Header/Header.js.map +1 -1
- package/lib/components/Header/HeaderSecondaryMenu.js +1 -1
- package/lib/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/lib/components/Header/HeaderSubMenu.js +1 -1
- package/lib/components/Header/HeaderSubMenu.js.map +1 -1
- package/lib/components/Header/HeaderTopMenu.d.ts +22 -0
- package/lib/components/Header/HeaderTopMenu.js +22 -0
- package/lib/components/Header/HeaderTopMenu.js.map +1 -0
- package/lib/components/Header/HeaderTopMenuItem.d.ts +9 -0
- package/lib/components/Header/HeaderTopMenuItem.js +18 -0
- package/lib/components/Header/HeaderTopMenuItem.js.map +1 -0
- package/lib/ui-kit/Calculator/CalculatorValueBlock.d.ts +2 -0
- package/lib/ui-kit/Calculator/CalculatorValueBlock.js +1 -1
- package/lib/ui-kit/Calculator/CalculatorValueBlock.js.map +1 -1
- package/lib/ui-kit/Calculator/Rate.d.ts +2 -0
- package/lib/ui-kit/Calculator/Rate.js +1 -1
- package/lib/ui-kit/Calculator/Rate.js.map +1 -1
- package/lib/ui-kit/Calculator/renderFootnote.js +1 -1
- package/lib/ui-kit/Calculator/renderFootnote.js.map +1 -1
- package/lib/ui-kit/Calculator/renderRate.d.ts +1 -1
- package/lib/ui-kit/Calculator/renderRate.js +1 -1
- package/lib/ui-kit/Calculator/renderRate.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +15 -14
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/Header/HeaderTopMenu.d.ts +22 -0
- package/mobile/bundle/components/Header/HeaderTopMenuItem.d.ts +9 -0
- package/mobile/bundle/ui-kit/Calculator/CalculatorValueBlock.d.ts +2 -0
- package/mobile/bundle/ui-kit/Calculator/Rate.d.ts +2 -0
- package/mobile/bundle/ui-kit/Calculator/renderRate.d.ts +1 -1
- package/mobile/dist/components/CalculatorBonus/CalculatorBonus.js +10 -9
- package/mobile/dist/components/CalculatorBonus/CalculatorBonus.js.map +1 -1
- package/mobile/dist/components/Header/DropdownMenu.js +1 -1
- package/mobile/dist/components/Header/DropdownMenu.js.map +1 -1
- package/mobile/dist/components/Header/HeaderSecondaryMenu.js +1 -1
- package/mobile/dist/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/mobile/dist/components/Header/HeaderSubMenu.js +1 -1
- package/mobile/dist/components/Header/HeaderSubMenu.js.map +1 -1
- package/mobile/dist/components/Header/HeaderTopMenu.d.ts +22 -0
- package/mobile/dist/components/Header/HeaderTopMenu.js +24 -0
- package/mobile/dist/components/Header/HeaderTopMenu.js.map +1 -0
- package/mobile/dist/components/Header/HeaderTopMenuItem.d.ts +9 -0
- package/mobile/dist/components/Header/HeaderTopMenuItem.js +20 -0
- package/mobile/dist/components/Header/HeaderTopMenuItem.js.map +1 -0
- package/mobile/dist/ui-kit/Calculator/CalculatorValueBlock.d.ts +2 -0
- package/mobile/dist/ui-kit/Calculator/CalculatorValueBlock.js +1 -1
- package/mobile/dist/ui-kit/Calculator/CalculatorValueBlock.js.map +1 -1
- package/mobile/dist/ui-kit/Calculator/Rate.d.ts +2 -0
- package/mobile/dist/ui-kit/Calculator/Rate.js +1 -1
- package/mobile/dist/ui-kit/Calculator/Rate.js.map +1 -1
- package/mobile/dist/ui-kit/Calculator/renderFootnote.js +1 -1
- package/mobile/dist/ui-kit/Calculator/renderFootnote.js.map +1 -1
- package/mobile/dist/ui-kit/Calculator/renderRate.d.ts +1 -1
- package/mobile/dist/ui-kit/Calculator/renderRate.js +1 -1
- package/mobile/dist/ui-kit/Calculator/renderRate.js.map +1 -1
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/CalculatorBonus/CalculatorBonus.js +10 -9
- package/mobile/lib/components/CalculatorBonus/CalculatorBonus.js.map +1 -1
- package/mobile/lib/components/Header/DropdownMenu.js +1 -1
- package/mobile/lib/components/Header/DropdownMenu.js.map +1 -1
- package/mobile/lib/components/Header/HeaderSecondaryMenu.js +1 -1
- package/mobile/lib/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/mobile/lib/components/Header/HeaderSubMenu.js +1 -1
- package/mobile/lib/components/Header/HeaderSubMenu.js.map +1 -1
- package/mobile/lib/components/Header/HeaderTopMenu.d.ts +22 -0
- package/mobile/lib/components/Header/HeaderTopMenu.js +22 -0
- package/mobile/lib/components/Header/HeaderTopMenu.js.map +1 -0
- package/mobile/lib/components/Header/HeaderTopMenuItem.d.ts +9 -0
- package/mobile/lib/components/Header/HeaderTopMenuItem.js +18 -0
- package/mobile/lib/components/Header/HeaderTopMenuItem.js.map +1 -0
- package/mobile/lib/ui-kit/Calculator/CalculatorValueBlock.d.ts +2 -0
- package/mobile/lib/ui-kit/Calculator/CalculatorValueBlock.js +1 -1
- package/mobile/lib/ui-kit/Calculator/CalculatorValueBlock.js.map +1 -1
- package/mobile/lib/ui-kit/Calculator/Rate.d.ts +2 -0
- package/mobile/lib/ui-kit/Calculator/Rate.js +1 -1
- package/mobile/lib/ui-kit/Calculator/Rate.js.map +1 -1
- package/mobile/lib/ui-kit/Calculator/renderFootnote.js +1 -1
- package/mobile/lib/ui-kit/Calculator/renderFootnote.js.map +1 -1
- package/mobile/lib/ui-kit/Calculator/renderRate.d.ts +1 -1
- package/mobile/lib/ui-kit/Calculator/renderRate.js +1 -1
- package/mobile/lib/ui-kit/Calculator/renderRate.js.map +1 -1
- package/mobile/src/components/CalculatorBonus/CalculatorBonus.tsx +17 -10
- package/mobile/src/components/Header/DropdownMenu.tsx +1 -1
- package/mobile/src/components/Header/HeaderSecondaryMenu.tsx +8 -2
- package/mobile/src/components/Header/HeaderSubMenu.tsx +0 -1
- package/mobile/src/components/Header/HeaderTopMenu.tsx +96 -0
- package/mobile/src/components/Header/HeaderTopMenuItem.tsx +40 -0
- package/mobile/src/ui-kit/Calculator/CalculatorValueBlock.tsx +13 -2
- package/mobile/src/ui-kit/Calculator/Rate.tsx +12 -2
- package/mobile/src/ui-kit/Calculator/renderFootnote.tsx +1 -1
- package/mobile/src/ui-kit/Calculator/renderRate.tsx +10 -1
- package/package.json +1 -1
- package/src/components/CalculatorBonus/CalculatorBonus.tsx +17 -10
- package/src/components/Header/DropdownMenu.tsx +1 -1
- package/src/components/Header/Header.tsx +7 -10
- package/src/components/Header/HeaderSecondaryMenu.tsx +8 -2
- package/src/components/Header/HeaderSubMenu.tsx +0 -1
- package/src/components/Header/HeaderTopMenu.tsx +96 -0
- package/src/components/Header/HeaderTopMenuItem.tsx +40 -0
- package/src/ui-kit/Calculator/CalculatorValueBlock.tsx +13 -2
- package/src/ui-kit/Calculator/Rate.tsx +12 -2
- package/src/ui-kit/Calculator/renderFootnote.tsx +1 -1
- package/src/ui-kit/Calculator/renderRate.tsx +10 -1
package/bundle/bundle.umd.js
CHANGED
|
@@ -2509,17 +2509,17 @@
|
|
|
2509
2509
|
};
|
|
2510
2510
|
|
|
2511
2511
|
const calculatorValueBlockStyle = 'flex justify-between @xl:flex-col';
|
|
2512
|
-
const CalculatorValueBlock = JSX(({ className, title, value, fractionDigits, fixed, prefix, postfix }) => (jsxs("div", { className: style(calculatorValueBlockStyle, className), children: [title ? (jsx(Text, { size: "text-l", font: "font-light", color:
|
|
2512
|
+
const CalculatorValueBlock = JSX(({ className, title, value, fractionDigits, fixed, prefix, postfix, color = 'text-secondary-text', }) => (jsxs("div", { className: style(calculatorValueBlockStyle, className), children: [title ? (jsx(Text, { size: "text-l", font: "font-light", color: color, children: title })) : null, value ? (jsx("div", { children: jsx(Text, { size: "text-h3", children: [prefix, toLocalNumberFormat(fractionDigits, { fixed })(value), postfix]
|
|
2513
2513
|
.filter(Boolean)
|
|
2514
2514
|
.join(' ') }) })) : (jsx("div", { children: jsx(Text, { size: "text-h3", children: "-" }) }))] })));
|
|
2515
2515
|
|
|
2516
|
-
const renderFootnote = (text, key) => text ? (jsx(Paragraph, { size: "text-
|
|
2516
|
+
const renderFootnote = (text, key) => text ? (jsx(Paragraph, { size: "text-xs", font: "font-light", color: "text-secondary-text", children: text }, String(key))) : null;
|
|
2517
2517
|
|
|
2518
|
-
const Rate = JSX(({ rate = 0, title = 'Ставка', unit, fractionDigits = 2, depositeName, isShowDepositeName }) => (jsxs("div", { children: [jsx(Text, { size: "text-l", font: "font-light", color:
|
|
2518
|
+
const Rate = JSX(({ rate = 0, title = 'Ставка', unit, fractionDigits = 2, depositeName, isShowDepositeName, color = 'text-secondary-text', }) => (jsxs("div", { children: [jsx(Text, { size: "text-l", font: "font-light", color: color, children: title }), jsxs("div", { className: "relative", children: [jsxs("div", { className: "flex justify-start gradient-color-text", children: [jsx("span", { className: "font-mohave text-title-huge -mt-m tracking-[-15px]", children: toLocalNumberFormat(fractionDigits, { fixed: true })(rate) }), unit ? jsx("span", { className: "text-7xl", children: unit }) : null] }), depositeName && isShowDepositeName ? (jsx("div", { className: "absolute bottom-2 w-full text-left whitespace-nowrap", children: depositeName })) : null] })] })));
|
|
2519
2519
|
|
|
2520
2520
|
const UnknownRate = JSX(({ title = 'Ставка', isUnavailableByTerm = false }) => (jsxs("div", { className: "space-y-s", children: [jsx(Text, { size: "text-l", font: "font-light", color: "text-secondary-text", children: title }), jsx(Icon, { className: "w-10 h-10 @5xl:h-auto @5xl:w-40", name: "PercentIcon" }), jsx("div", { className: "w-64", children: isUnavailableByTerm ? (jsxs(Paragraph, { size: "text-xl", font: "font-light", color: "text-primary-text", children: ["\u041F\u0440\u043E\u0446\u0435\u043D\u0442\u043D\u0430\u044F \u0441\u0442\u0430\u0432\u043A\u0430 \u0434\u043B\u044F \u0441\u0440\u043E\u043A\u0430 ", jsx("strong", { children: "1-30 \u0434\u043D\u0435\u0439" }), " \u0443\u0441\u0442\u0430\u043D\u0430\u0432\u043B\u0438\u0432\u0430\u0435\u0442\u0441\u044F \u043F\u0440\u0438 \u043E\u0431\u0440\u0430\u0449\u0435\u043D\u0438\u0438 \u0432 \u0411\u0430\u043D\u043A"] })) : (jsx(Paragraph, { size: "text-xl", font: "font-light", color: "text-primary-text", children: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0434\u0440\u0443\u0433\u0443\u044E \u0441\u0443\u043C\u043C\u0443 \u0438\u043B\u0438 \u0441\u0440\u043E\u043A" })) })] })));
|
|
2521
2521
|
|
|
2522
|
-
const renderRate = ({ title = 'Ставка', rate = 0, unit = '%', fractionDigits = 2, isUnknownRateShown = true, ...rest }) => isUnknownRateShown && rate === 0 ? (jsx(UnknownRate, { title: title, ...rest })) : (jsxs("div", { children: [jsx("div", { className: "hidden @xl:block", children: jsx(Rate, { title: title, rate: rate, unit: unit, fractionDigits: fractionDigits, ...rest }) }), jsx("div", { className: "@xl:hidden", children: jsx(CalculatorValueBlock, { title: title, value: rate, postfix: unit, fractionDigits: fractionDigits, fixed: true, ...rest }) })] }));
|
|
2522
|
+
const renderRate = ({ title = 'Ставка', rate = 0, unit = '%', fractionDigits = 2, isUnknownRateShown = true, color = 'text-secondary-text', ...rest }) => isUnknownRateShown && rate === 0 ? (jsx(UnknownRate, { title: title, ...rest })) : (jsxs("div", { children: [jsx("div", { className: "hidden @xl:block", children: jsx(Rate, { title: title, rate: rate, unit: unit, fractionDigits: fractionDigits, color: color, ...rest }) }), jsx("div", { className: "@xl:hidden", children: jsx(CalculatorValueBlock, { title: title, value: rate, postfix: unit, fractionDigits: fractionDigits, fixed: true, color: color, ...rest }) })] }));
|
|
2523
2523
|
|
|
2524
2524
|
const DEFAULT_MONEY_STEP = 1000;
|
|
2525
2525
|
function renderWantedSumInput({ isShowItems = true, step = DEFAULT_MONEY_STEP, ...rest }) {
|
|
@@ -2597,15 +2597,16 @@
|
|
|
2597
2597
|
step: 500,
|
|
2598
2598
|
isShowItems: false,
|
|
2599
2599
|
...field('restExpenseValue'),
|
|
2600
|
-
})] }), monthBonus >= 0
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2600
|
+
})] }), jsx("div", { className: "mb-s", children: monthBonus >= 0
|
|
2601
|
+
? renderRate({
|
|
2602
|
+
title: 'Баллов за месяц',
|
|
2603
|
+
rate: monthBonus,
|
|
2604
|
+
fractionDigits: 0,
|
|
2605
|
+
isUnknownRateShown: false,
|
|
2606
|
+
unit: '',
|
|
2607
|
+
color: 'text-primary-text',
|
|
2608
|
+
})
|
|
2609
|
+
: null }), jsxs("div", { className: CalculatorStyle.result, children: [yearBonus >= 0 ? (jsx(CalculatorValueBlock, { title: "\u0411\u0430\u043B\u043B\u043E\u0432 \u0437\u0430 \u0433\u043E\u0434", value: yearBonus, color: "text-primary-text" })) : null, renderButtonsSection(buttons, { isVertical: true }), renderFootnote(footnote)] })] }) }));
|
|
2609
2610
|
});
|
|
2610
2611
|
|
|
2611
2612
|
const MONTHS_IN_YEAR = 12;
|
|
@@ -4218,99 +4219,12 @@
|
|
|
4218
4219
|
return isURL(href) ? router.href : joinPath(basePath, router.pathname);
|
|
4219
4220
|
};
|
|
4220
4221
|
|
|
4221
|
-
const TopItem = JSX(({ className = '', active, flat, children, data, ...rest }) => {
|
|
4222
|
-
const link = useLink();
|
|
4223
|
-
const { href, target, text, onClick } = link(rest);
|
|
4224
|
-
return (jsx("a", { className: style(getLinkStyle(active, flat), className), href: href, target: target, onClick: onClick, rel: "noopener noreferrer", "aria-label": text, ...getAspectsAttributes(data), children: jsx("span", { suppressHydrationWarning: true, className: getTextStyle$1(active, flat), children: text || children }) }));
|
|
4225
|
-
});
|
|
4226
|
-
const getLinkStyle = (active = false, flat = false) => style('inline-block border border-solid bg-transparent text-center no-underline', active
|
|
4227
|
-
? 'rounded-md border-primary-main group-data-transparent:border-white'
|
|
4228
|
-
: 'border-transparent', flat ? '' : 'px-m py-xs');
|
|
4229
|
-
const getTextStyle$1 = (active = false, flat = false) => {
|
|
4230
|
-
const activeFlatStyle = flat ? 'text-primary-text' : 'text-secondary-text';
|
|
4231
|
-
return style('font-sans text-s font-light', active ? 'text-primary-main' : style(activeFlatStyle, 'hover:text-primary-main'), 'group-data-transparent:text-white group-data-transparent:hover:text-primary-hover');
|
|
4232
|
-
};
|
|
4233
|
-
|
|
4234
|
-
const groupBy = (list, keyGetter) => {
|
|
4235
|
-
const result = new Map();
|
|
4236
|
-
for (const item of list) {
|
|
4237
|
-
const key = keyGetter(item);
|
|
4238
|
-
const group = result.get(key) || [];
|
|
4239
|
-
result.set(key, [...group, item]);
|
|
4240
|
-
}
|
|
4241
|
-
return result;
|
|
4242
|
-
};
|
|
4243
|
-
|
|
4244
|
-
const renderForeignOffices = (foreignOffices) => foreignOffices?.length ? (jsxs("div", { className: "sm:border-t sm:border-main-divider mt-2xs pt-2xs", children: [jsx("div", { className: "mb-m", children: jsx(Text, { size: "text-m", font: "font-light", color: "text-secondary-text", children: "\u041F\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u0435\u043B\u044C\u0441\u0442\u0432\u0430 \u0437\u0430 \u0440\u0443\u0431\u0435\u0436\u043E\u043C:" }) }), jsx("div", { className: "flex flex-col sm:flex-row gap-5xl", children: foreignOffices.map((office, i) => (jsx(ForeignOffice, { ...office }, String(i)))) })] })) : null;
|
|
4245
|
-
const ForeignOffice = JSX(({ icon, ...rest }) => {
|
|
4246
|
-
const link = useLink();
|
|
4247
|
-
const { text, target, href, onClick } = link(rest);
|
|
4248
|
-
return (jsxs("div", { className: "flex gap-s items-center", children: [icon ? jsx(Img, { pathPrefix: "/wcms-resources/", image: icon }) : null, text ? (jsx("a", { className: "hover:text-primary-hover", href: href, target: target, onClick: onClick, children: jsx(Text, { size: "text-l", font: "font-light", color: "text-primary-text", children: text }) })) : null] }));
|
|
4249
|
-
});
|
|
4250
|
-
|
|
4251
|
-
const renderRegion = (data, onChangeLocation) => (region) => region.name ? (jsx(LinkWrapper, { href: `/branches/${region.slug}`, className: "mb-xs sm:mb-2xs hover:text-primary-hover", onClick: () => onChangeLocation?.(region), data: getAspectsWithInclude(data, region.name), children: jsx(Text, { size: "text-l", font: "font-light", children: region.name }) }, String(region.id))) : null;
|
|
4252
|
-
|
|
4253
|
-
const renderRegionGroup = (onChangeLocation, data) => ([letter, regions]) => (jsxs("div", { className: "break-inside-avoid mb-2xl w-56", children: [jsx("div", { className: "mb-s", children: jsx(Text, { size: "text-h6", children: letter }) }), regions.map(renderRegion(data, onChangeLocation))] }, letter));
|
|
4254
|
-
|
|
4255
|
-
const SearchBar = JSX(({ className, searchTerm, onSearch }) => {
|
|
4256
|
-
return (jsxs("form", { className: `font-sans relative ${className}`, children: [jsx("div", { className: "absolute rounded h-full flex items-center justify-center pl-m max-w-44 gap-s pointer-events-none", children: searchTerm ? null : (jsx("label", { htmlFor: "search-bar-input", className: `text-secondary-text `, children: "\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u0444\u0438\u043B\u0438\u0430\u043B\u0430\u043C" })) }), jsx("input", { id: "search-bar-input", className: style(inputValidStyle, `h-12 pl-m w-full peer text-l text-black rounded-md box-border`), value: searchTerm, onChange: (e) => onSearch(e.target.value.toLowerCase()), type: "text", name: "location-search-bar-input" })] }));
|
|
4257
|
-
});
|
|
4258
|
-
|
|
4259
|
-
const SEARCH_TERM_MIN_LENGTH = 3;
|
|
4260
|
-
const LocationDialog = JSX(({ foreignOffices, branches }) => {
|
|
4261
|
-
const [currentLocation, selectCurrentLocation] = useLocation(branches?.default);
|
|
4262
|
-
const link = useLink();
|
|
4263
|
-
const { href } = link({ href: `/branches/${currentLocation.slug}` });
|
|
4264
|
-
const [query, setQuery] = useState('');
|
|
4265
|
-
const regions = cleanUpRegions(useRegions()).sort((a, b) => a.name.localeCompare(b.name));
|
|
4266
|
-
const regionsGroupByLetter = groupBy(regions, regionFirstLetter);
|
|
4267
|
-
const { close } = useDialogManager();
|
|
4268
|
-
const handleChangeLocation = useCallback((region) => {
|
|
4269
|
-
selectCurrentLocation(region);
|
|
4270
|
-
close();
|
|
4271
|
-
}, []);
|
|
4272
|
-
return (jsxs(Dialog, { className: "pb-20", head: jsxs("div", { children: [jsx(Text, { size: "text-h4", color: "text-primary-text", children: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0444\u0438\u043B\u0438\u0430\u043B" }), currentLocation ? (jsx("div", { className: "mb-s", children: jsxs(Paragraph, { size: "text-l", color: "text-primary-text", children: ["\u0421\u0435\u0439\u0447\u0430\u0441 \u0432\u044B\u0431\u0440\u0430\u043D:", jsx(LinkWrapper, { href: href, className: "inline mx-2xs text-primary-main", children: currentLocation.name })] }) })) : null, jsx(SearchBar, { onSearch: setQuery, searchTerm: query })] }), children: [query && query.length >= SEARCH_TERM_MIN_LENGTH ? (jsx("div", { children: regions
|
|
4273
|
-
.filter(({ name }) => name && jaroWinklerDistance(name.toLowerCase())(query.toLowerCase()) >= 0.8)
|
|
4274
|
-
.map(renderRegion(branches?.dataSelect, handleChangeLocation)) })) : (jsx("div", { className: "columns-1 sm:columns-5", children: Array.from(regionsGroupByLetter.entries()).map(renderRegionGroup(handleChangeLocation, branches?.dataSelect)) })), renderForeignOffices(foreignOffices)] }));
|
|
4275
|
-
});
|
|
4276
|
-
const regionFirstLetter = (region) => region.name?.charAt(0) || '';
|
|
4277
|
-
const cleanUpRegions = (regions) => regions.map((region) => ({
|
|
4278
|
-
...region,
|
|
4279
|
-
name: region.name?.replace(/республика|область|край'/gi, '').trim() || '',
|
|
4280
|
-
}));
|
|
4281
|
-
|
|
4282
|
-
const useLocationDialog = (props) => {
|
|
4283
|
-
const { open, close } = useDialogManager();
|
|
4284
|
-
return {
|
|
4285
|
-
open: (options = {}) => open(jsx(LocationDialog, { ...props }), options),
|
|
4286
|
-
close,
|
|
4287
|
-
};
|
|
4288
|
-
};
|
|
4289
|
-
|
|
4290
|
-
const BUTTON_SIZE_STYLE = {
|
|
4291
|
-
default: 'w-6 h-6',
|
|
4292
|
-
large: 'w-12 h-12',
|
|
4293
|
-
};
|
|
4294
|
-
const HeaderSecondaryMenuButton = JSX(({ className, isRounded, buttonSize = 'default', isGrayBg = false, disabled, ariaLabel, image, data, onClick, }) => (jsx("button", { className: style('group/btn border-0 flex shrink-0 items-center', isGrayBg ? 'p-s rounded-full' : 'p-0 bg-inherit', isGrayBg && !isRounded ? 'bg-main-divider' : '', isRounded
|
|
4295
|
-
? 'w-8 h-8 text-secondary-light hover:text-secondary-hove'
|
|
4296
|
-
: `${BUTTON_SIZE_STYLE[buttonSize]} text-primary-text hover:text-primary-main`, 'group-data-transparent:text-white', className), type: "button", disabled: disabled, "aria-label": ariaLabel, onClick: onClick, ...getAspectsAttributes(data), children: jsx(Img, { image: image, className: style('h-full', isRounded ? 'bg-main-divider/20 rounded-full' : ''), imageClassName: "group-hover/btn:text-primary-hover group-hover/btn:invert-0" }) })));
|
|
4297
|
-
|
|
4298
|
-
const HeaderSecondaryMenu = JSX(({ className, version, ...rest }) => {
|
|
4299
|
-
const iconVersion = version === 'transparent' ? 'white' : 'black';
|
|
4300
|
-
const [currentLocation] = useLocation(rest?.branches?.default);
|
|
4301
|
-
const searchDialog = useSearchDialog(rest);
|
|
4302
|
-
const locationDialog = useLocationDialog(rest);
|
|
4303
|
-
const openSearchDialog = useCallback(() => searchDialog.open(), [searchDialog]);
|
|
4304
|
-
const openLocationDialog = useCallback(() => locationDialog.open(), [locationDialog]);
|
|
4305
|
-
return (jsxs("div", { className: style('flex items-center gap-lg', className), role: "navigation", children: [rest?.branches?.visible ? (jsx(TopItem, { flat: true, href: "#", text: currentLocation?.name, data: getAspectsWithInclude(rest?.branches?.dataClick, currentLocation?.name ?? ''), onClick: openLocationDialog })) : null, rest?.officesAtms?.href ? jsx(TopItem, { flat: true, ...rest.officesAtms }) : null, jsx(HeaderSecondaryMenuButton, { image: { icon: 'LoupeIcon', iconVersion }, ariaLabel: rest?.search?.ariaLabel ?? 'Поиск', onClick: openSearchDialog, data: rest?.search?.data })] }));
|
|
4306
|
-
});
|
|
4307
|
-
|
|
4308
4222
|
const DropdownMenu = JSX(({ className = '', items, activeItem, ariaLabel }) => {
|
|
4309
4223
|
const [isVisible, { setFalse, toggle }] = useBool(false);
|
|
4310
4224
|
const ref = useOutsideClick(setFalse);
|
|
4311
4225
|
return (jsxs("div", { className: style(isVisible ? 'bg-white rounded-md shadow-blue-gray' : '', className), ref: ref, role: "navigation", children: [jsx("button", { type: "button", className: "group/btn flex justify-between items-center h-6", "aria-label": ariaLabel, onClick: toggle, children: Array(3)
|
|
4312
4226
|
.fill(null)
|
|
4313
|
-
.map((_, i) => (jsx("div", { className: "w-[3px] h-[3px] rounded mr-2xs bg-primary-text group-hover/btn:bg-primary-hover group-data-transparent:bg-white" }, String(i)))) }), jsx("div", { className: style('absolute flex flex-col rounded-md bg-white p-xl pb-xs w-56', isVisible ? '' : 'hidden'), "aria-hidden": !isVisible, children: items?.map((item, i) => (jsx(DropdownMenuItem, { isActive: item === activeItem, ...item }, item?.text ?? String(i)))) })] }));
|
|
4227
|
+
.map((_, i) => (jsx("div", { className: "w-[3px] h-[3px] rounded mr-2xs bg-primary-text group-hover/btn:bg-primary-hover group-data-transparent:bg-white" }, String(i)))) }), jsx("div", { className: style('absolute flex flex-col rounded-md bg-white p-xl pb-xs w-56 z-40', isVisible ? '' : 'hidden'), "aria-hidden": !isVisible, children: items?.map((item, i) => (jsx(DropdownMenuItem, { isActive: item === activeItem, ...item }, item?.text ?? String(i)))) })] }));
|
|
4314
4228
|
});
|
|
4315
4229
|
const DropdownMenuItem = JSX(({ isActive, ...rest }) => {
|
|
4316
4230
|
const link = useLink();
|
|
@@ -4318,6 +4232,14 @@
|
|
|
4318
4232
|
return (jsx("a", { className: style('text-l font-light pb-m hover:text-primary-main', isActive ? 'text-primary-main' : ''), href: href, target: target, onClick: onClick, role: "menuitem", ...getAspectsAttributes(rest?.data), children: text }));
|
|
4319
4233
|
});
|
|
4320
4234
|
|
|
4235
|
+
const BUTTON_SIZE_STYLE = {
|
|
4236
|
+
default: 'w-6 h-6',
|
|
4237
|
+
large: 'w-12 h-12',
|
|
4238
|
+
};
|
|
4239
|
+
const HeaderSecondaryMenuButton = JSX(({ className, isRounded, buttonSize = 'default', isGrayBg = false, disabled, ariaLabel, image, data, onClick, }) => (jsx("button", { className: style('group/btn border-0 flex shrink-0 items-center', isGrayBg ? 'p-s rounded-full' : 'p-0 bg-inherit', isGrayBg && !isRounded ? 'bg-main-divider' : '', isRounded
|
|
4240
|
+
? 'w-8 h-8 text-secondary-light hover:text-secondary-hove'
|
|
4241
|
+
: `${BUTTON_SIZE_STYLE[buttonSize]} text-primary-text hover:text-primary-main`, 'group-data-transparent:text-white', className), type: "button", disabled: disabled, "aria-label": ariaLabel, onClick: onClick, ...getAspectsAttributes(data), children: jsx(Img, { image: image, className: style('h-full', isRounded ? 'bg-main-divider/20 rounded-full' : ''), imageClassName: "group-hover/btn:text-primary-hover group-hover/btn:invert-0" }) })));
|
|
4242
|
+
|
|
4321
4243
|
const getNS = (_) => globalThis[_];
|
|
4322
4244
|
const initializeExternalNS = (namespaceName, url) => {
|
|
4323
4245
|
const script = document.getElementById(url);
|
|
@@ -4416,9 +4338,9 @@
|
|
|
4416
4338
|
const HeaderItem = JSX(({ className = '', active, dataItemName, children, data, ...rest }) => {
|
|
4417
4339
|
const link = useLink();
|
|
4418
4340
|
const { href, target, text, onClick } = link(rest);
|
|
4419
|
-
return (jsxs("a", { className: style('relative inline-block bg-transparent text-center no-underline', className), href: href, target: target, "data-item-name": dataItemName, onClick: onClick, ...getAspectsAttributes(data), children: [jsx("span", { className: getTextStyle(active), children: text || children }), active ? (jsx("div", { className: "absolute left-0 right-0 -bottom-3 h-0.5 bg-primary-main group-data-transparent:bg-transparent" })) : null] }));
|
|
4341
|
+
return (jsxs("a", { className: style('relative inline-block bg-transparent text-center no-underline', className), href: href, target: target, "data-item-name": dataItemName, onClick: onClick, ...getAspectsAttributes(data), children: [jsx("span", { className: getTextStyle$1(active), children: text || children }), active ? (jsx("div", { className: "absolute left-0 right-0 -bottom-3 h-0.5 bg-primary-main group-data-transparent:bg-transparent" })) : null] }));
|
|
4420
4342
|
});
|
|
4421
|
-
const getTextStyle = (active = false) => style('font-sans text-l font-light', active ? 'text-primary-main' : 'text-primary-text hover:text-primary-main', 'group-data-transparent:text-white group-data-transparent:hover:text-primary-hover');
|
|
4343
|
+
const getTextStyle$1 = (active = false) => style('font-sans text-l font-light', active ? 'text-primary-main' : 'text-primary-text hover:text-primary-main', 'group-data-transparent:text-white group-data-transparent:hover:text-primary-hover');
|
|
4422
4344
|
|
|
4423
4345
|
const HeaderSubMenuItem = JSX(({ observerOptions, onVisibilityChange, children, className, ...rest }) => {
|
|
4424
4346
|
const observerCallback = useCallback((entries) => {
|
|
@@ -4452,11 +4374,118 @@
|
|
|
4452
4374
|
const subItemsListRef = useRef(null);
|
|
4453
4375
|
const observerOptions = { rootRef: subItemsListRef };
|
|
4454
4376
|
const subItemsVisibilityHandlers = useMemo(() => subItems.map((_, index) => (isIntersecting) => {
|
|
4377
|
+
setVisibleItemsCount(isIntersecting
|
|
4378
|
+
? handleIntersectionActivation$1(index)
|
|
4379
|
+
: handleIntersectionDeactivation$1(index));
|
|
4380
|
+
}), [subItems]);
|
|
4381
|
+
return (jsxs("nav", { className: "relative mt-s flex gap-s items-center justify-between", children: [jsx("div", { ref: subItemsListRef, className: "overflow-hidden whitespace-nowrap pb-s mt-xs space-x-3xl", role: "menu", children: subItems.map((_, i) => (jsx(HeaderSubMenuItem, { className: visibleItemsCount - 1 < i ? 'invisible' : '', active: _ === activeSubItem, observerOptions: observerOptions, onVisibilityChange: subItemsVisibilityHandlers[i], data: _.dataHeader, ..._ }, String(i)))) }), dropDownMenuItems.length ? (jsx(DropdownMenu, { items: dropDownMenuItems, activeItem: activeSubItem, ariaLabel: dropdownMenuAriaLabel })) : null, projectSettings.CHAT_BOT ? (jsx(HeaderChatBotButton, { iconVersion: iconVersion, chat: projectSettings.CHAT_BOT, ariaLabel: chatBotAriaLabel })) : null, jsx(InternetBankButton, { version: version, ...internetBankButton })] }));
|
|
4382
|
+
});
|
|
4383
|
+
const handleIntersectionActivation$1 = (index) => (prev) => Math.max(prev, index + 1);
|
|
4384
|
+
const handleIntersectionDeactivation$1 = (index) => (prev) => Math.min(prev, index);
|
|
4385
|
+
|
|
4386
|
+
const groupBy = (list, keyGetter) => {
|
|
4387
|
+
const result = new Map();
|
|
4388
|
+
for (const item of list) {
|
|
4389
|
+
const key = keyGetter(item);
|
|
4390
|
+
const group = result.get(key) || [];
|
|
4391
|
+
result.set(key, [...group, item]);
|
|
4392
|
+
}
|
|
4393
|
+
return result;
|
|
4394
|
+
};
|
|
4395
|
+
|
|
4396
|
+
const renderForeignOffices = (foreignOffices) => foreignOffices?.length ? (jsxs("div", { className: "sm:border-t sm:border-main-divider mt-2xs pt-2xs", children: [jsx("div", { className: "mb-m", children: jsx(Text, { size: "text-m", font: "font-light", color: "text-secondary-text", children: "\u041F\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u0435\u043B\u044C\u0441\u0442\u0432\u0430 \u0437\u0430 \u0440\u0443\u0431\u0435\u0436\u043E\u043C:" }) }), jsx("div", { className: "flex flex-col sm:flex-row gap-5xl", children: foreignOffices.map((office, i) => (jsx(ForeignOffice, { ...office }, String(i)))) })] })) : null;
|
|
4397
|
+
const ForeignOffice = JSX(({ icon, ...rest }) => {
|
|
4398
|
+
const link = useLink();
|
|
4399
|
+
const { text, target, href, onClick } = link(rest);
|
|
4400
|
+
return (jsxs("div", { className: "flex gap-s items-center", children: [icon ? jsx(Img, { pathPrefix: "/wcms-resources/", image: icon }) : null, text ? (jsx("a", { className: "hover:text-primary-hover", href: href, target: target, onClick: onClick, children: jsx(Text, { size: "text-l", font: "font-light", color: "text-primary-text", children: text }) })) : null] }));
|
|
4401
|
+
});
|
|
4402
|
+
|
|
4403
|
+
const renderRegion = (data, onChangeLocation) => (region) => region.name ? (jsx(LinkWrapper, { href: `/branches/${region.slug}`, className: "mb-xs sm:mb-2xs hover:text-primary-hover", onClick: () => onChangeLocation?.(region), data: getAspectsWithInclude(data, region.name), children: jsx(Text, { size: "text-l", font: "font-light", children: region.name }) }, String(region.id))) : null;
|
|
4404
|
+
|
|
4405
|
+
const renderRegionGroup = (onChangeLocation, data) => ([letter, regions]) => (jsxs("div", { className: "break-inside-avoid mb-2xl w-56", children: [jsx("div", { className: "mb-s", children: jsx(Text, { size: "text-h6", children: letter }) }), regions.map(renderRegion(data, onChangeLocation))] }, letter));
|
|
4406
|
+
|
|
4407
|
+
const SearchBar = JSX(({ className, searchTerm, onSearch }) => {
|
|
4408
|
+
return (jsxs("form", { className: `font-sans relative ${className}`, children: [jsx("div", { className: "absolute rounded h-full flex items-center justify-center pl-m max-w-44 gap-s pointer-events-none", children: searchTerm ? null : (jsx("label", { htmlFor: "search-bar-input", className: `text-secondary-text `, children: "\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u0444\u0438\u043B\u0438\u0430\u043B\u0430\u043C" })) }), jsx("input", { id: "search-bar-input", className: style(inputValidStyle, `h-12 pl-m w-full peer text-l text-black rounded-md box-border`), value: searchTerm, onChange: (e) => onSearch(e.target.value.toLowerCase()), type: "text", name: "location-search-bar-input" })] }));
|
|
4409
|
+
});
|
|
4410
|
+
|
|
4411
|
+
const SEARCH_TERM_MIN_LENGTH = 3;
|
|
4412
|
+
const LocationDialog = JSX(({ foreignOffices, branches }) => {
|
|
4413
|
+
const [currentLocation, selectCurrentLocation] = useLocation(branches?.default);
|
|
4414
|
+
const link = useLink();
|
|
4415
|
+
const { href } = link({ href: `/branches/${currentLocation.slug}` });
|
|
4416
|
+
const [query, setQuery] = useState('');
|
|
4417
|
+
const regions = cleanUpRegions(useRegions()).sort((a, b) => a.name.localeCompare(b.name));
|
|
4418
|
+
const regionsGroupByLetter = groupBy(regions, regionFirstLetter);
|
|
4419
|
+
const { close } = useDialogManager();
|
|
4420
|
+
const handleChangeLocation = useCallback((region) => {
|
|
4421
|
+
selectCurrentLocation(region);
|
|
4422
|
+
close();
|
|
4423
|
+
}, []);
|
|
4424
|
+
return (jsxs(Dialog, { className: "pb-20", head: jsxs("div", { children: [jsx(Text, { size: "text-h4", color: "text-primary-text", children: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0444\u0438\u043B\u0438\u0430\u043B" }), currentLocation ? (jsx("div", { className: "mb-s", children: jsxs(Paragraph, { size: "text-l", color: "text-primary-text", children: ["\u0421\u0435\u0439\u0447\u0430\u0441 \u0432\u044B\u0431\u0440\u0430\u043D:", jsx(LinkWrapper, { href: href, className: "inline mx-2xs text-primary-main", children: currentLocation.name })] }) })) : null, jsx(SearchBar, { onSearch: setQuery, searchTerm: query })] }), children: [query && query.length >= SEARCH_TERM_MIN_LENGTH ? (jsx("div", { children: regions
|
|
4425
|
+
.filter(({ name }) => name && jaroWinklerDistance(name.toLowerCase())(query.toLowerCase()) >= 0.8)
|
|
4426
|
+
.map(renderRegion(branches?.dataSelect, handleChangeLocation)) })) : (jsx("div", { className: "columns-1 sm:columns-5", children: Array.from(regionsGroupByLetter.entries()).map(renderRegionGroup(handleChangeLocation, branches?.dataSelect)) })), renderForeignOffices(foreignOffices)] }));
|
|
4427
|
+
});
|
|
4428
|
+
const regionFirstLetter = (region) => region.name?.charAt(0) || '';
|
|
4429
|
+
const cleanUpRegions = (regions) => regions.map((region) => ({
|
|
4430
|
+
...region,
|
|
4431
|
+
name: region.name?.replace(/республика|область|край'/gi, '').trim() || '',
|
|
4432
|
+
}));
|
|
4433
|
+
|
|
4434
|
+
const useLocationDialog = (props) => {
|
|
4435
|
+
const { open, close } = useDialogManager();
|
|
4436
|
+
return {
|
|
4437
|
+
open: (options = {}) => open(jsx(LocationDialog, { ...props }), options),
|
|
4438
|
+
close,
|
|
4439
|
+
};
|
|
4440
|
+
};
|
|
4441
|
+
|
|
4442
|
+
const TopItem = JSX(({ className = '', active, flat, children, data, ...rest }) => {
|
|
4443
|
+
const link = useLink();
|
|
4444
|
+
const { href, target, text, onClick } = link(rest);
|
|
4445
|
+
return (jsx("a", { className: style(getLinkStyle(active, flat), className), href: href, target: target, onClick: onClick, rel: "noopener noreferrer", "aria-label": text, ...getAspectsAttributes(data), children: jsx("span", { suppressHydrationWarning: true, className: getTextStyle(active, flat), children: text || children }) }));
|
|
4446
|
+
});
|
|
4447
|
+
const getLinkStyle = (active = false, flat = false) => style('inline-block border border-solid bg-transparent text-center no-underline', active
|
|
4448
|
+
? 'rounded-md border-primary-main group-data-transparent:border-white'
|
|
4449
|
+
: 'border-transparent', flat ? '' : 'px-m py-xs');
|
|
4450
|
+
const getTextStyle = (active = false, flat = false) => {
|
|
4451
|
+
const activeFlatStyle = flat ? 'text-primary-text' : 'text-secondary-text';
|
|
4452
|
+
return style('font-sans text-s font-light', active ? 'text-primary-main' : style(activeFlatStyle, 'hover:text-primary-main'), 'group-data-transparent:text-white group-data-transparent:hover:text-primary-hover');
|
|
4453
|
+
};
|
|
4454
|
+
|
|
4455
|
+
const HeaderSecondaryMenu = JSX(({ className, version, ...rest }) => {
|
|
4456
|
+
const iconVersion = version === 'transparent' ? 'white' : 'black';
|
|
4457
|
+
const [currentLocation] = useLocation(rest?.branches?.default);
|
|
4458
|
+
const searchDialog = useSearchDialog(rest);
|
|
4459
|
+
const locationDialog = useLocationDialog(rest);
|
|
4460
|
+
const openSearchDialog = useCallback(() => searchDialog.open(), [searchDialog]);
|
|
4461
|
+
const openLocationDialog = useCallback(() => locationDialog.open(), [locationDialog]);
|
|
4462
|
+
return (jsxs("div", { className: style('flex items-center ml-5 md:max-w-[300px] xl:max-w-full gap-lg', className), role: "navigation", children: [rest?.branches?.visible ? (jsx(TopItem, { className: "whitespace-nowrap text-ellipsis overflow-hidden", flat: true, href: "#", text: currentLocation?.name, data: getAspectsWithInclude(rest?.branches?.dataClick, currentLocation?.name ?? ''), onClick: openLocationDialog })) : null, rest?.officesAtms?.href ? (jsx(TopItem, { className: "whitespace-nowrap", flat: true, ...rest.officesAtms })) : null, jsx(HeaderSecondaryMenuButton, { image: { icon: 'LoupeIcon', iconVersion }, ariaLabel: rest?.search?.ariaLabel ?? 'Поиск', onClick: openSearchDialog, data: rest?.search?.data })] }));
|
|
4463
|
+
});
|
|
4464
|
+
|
|
4465
|
+
const HeaderTopMenuItem = JSX(({ observerOptions, onVisibilityChange, children, className, ...rest }) => {
|
|
4466
|
+
const observerCallback = useCallback((entries) => {
|
|
4467
|
+
if (!entries.length || !onVisibilityChange) {
|
|
4468
|
+
return;
|
|
4469
|
+
}
|
|
4470
|
+
// Assumption about entries order (by time)
|
|
4471
|
+
const entry = entries[entries.length - 1];
|
|
4472
|
+
onVisibilityChange(entry.isIntersecting);
|
|
4473
|
+
}, [onVisibilityChange]);
|
|
4474
|
+
const ref = useIntersectionObserver(observerCallback, observerOptions);
|
|
4475
|
+
return (jsx("span", { ref: ref, className: className, role: "menuitem", children: jsx(TopItem, { ...rest, children: children }) }));
|
|
4476
|
+
});
|
|
4477
|
+
|
|
4478
|
+
const HeaderTopMenu = JSX(({ topItems = [], activeTopItem, dropdownMenuAriaLabel, version, sitemap, bgColor, logo, data, }) => {
|
|
4479
|
+
const [visibleItemsCount, setVisibleItemsCount] = useState(topItems.length);
|
|
4480
|
+
const dropDownMenuItems = topItems.slice(visibleItemsCount);
|
|
4481
|
+
const topItemsListRef = useRef(null);
|
|
4482
|
+
const observerOptions = { rootRef: topItemsListRef };
|
|
4483
|
+
const topItemsVisibilityHandlers = useMemo(() => topItems.map((_, index) => (isIntersecting) => {
|
|
4455
4484
|
setVisibleItemsCount(isIntersecting
|
|
4456
4485
|
? handleIntersectionActivation(index)
|
|
4457
4486
|
: handleIntersectionDeactivation(index));
|
|
4458
|
-
}), [
|
|
4459
|
-
return (jsxs("
|
|
4487
|
+
}), [topItems]);
|
|
4488
|
+
return (jsxs("div", { className: "flex items-center justify-between", children: [jsx(Logo, { className: "mr-3xl", bgColor: bgColor, logo: logo, data: data }), jsx("div", { ref: topItemsListRef, className: "overflow-hidden min-w-[160px] pb-xs mt-xs", role: "menu", children: topItems.map((_, i) => (jsx(HeaderTopMenuItem, { className: visibleItemsCount - 1 < i ? 'invisible' : '', active: _ === activeTopItem, observerOptions: observerOptions, onVisibilityChange: topItemsVisibilityHandlers[i], data: _.dataHeader, ..._ }, String(i)))) }), dropDownMenuItems.length ? (jsx(DropdownMenu, { className: "mx-xs", items: dropDownMenuItems, activeItem: activeTopItem, ariaLabel: dropdownMenuAriaLabel })) : null, jsx(HeaderSecondaryMenu, { version: version, className: "ml-auto", ...sitemap })] }));
|
|
4460
4489
|
});
|
|
4461
4490
|
const handleIntersectionActivation = (index) => (prev) => Math.max(prev, index + 1);
|
|
4462
4491
|
const handleIntersectionDeactivation = (index) => (prev) => Math.min(prev, index);
|
|
@@ -4473,7 +4502,7 @@
|
|
|
4473
4502
|
const { dataFooter, dataHeader, ...logoProps } = logo ?? {};
|
|
4474
4503
|
const [, activeTopItem] = useActiveRoute(topItems);
|
|
4475
4504
|
const { internetBankButton } = portal || {};
|
|
4476
|
-
return (jsx(BlockWrapper, { tag: "header", className: style('pt-3xl px-20', activeTopItem?.items?.length ? 'pb-m' : 'pb-lg', className), defaultPadding: "", version: version, ...rest, children: jsxs("div", { className: "container", children: [
|
|
4505
|
+
return (jsx(BlockWrapper, { tag: "header", className: style('pt-3xl px-20', activeTopItem?.items?.length ? 'pb-m' : 'pb-lg', className), defaultPadding: "", version: version, ...rest, children: jsxs("div", { className: "container", children: [jsx("div", { className: "whitespace-nowrap", children: jsx(HeaderTopMenu, { activeTopItem: activeTopItem, topItems: topItems?.filter(isVisibleItem(HEADER_AREA_KEYS)), version: version, sitemap: sitemap, bgColor: bgColor, logo: customLogo ?? logoProps, data: dataHeader }) }), jsx("div", { className: style('mt-xl h-px bg-main-divider', getVersionStyle(version)) }), activeTopItem?.items?.length ? (jsx(HeaderSubMenu, { subItems: activeTopItem?.items?.filter(isVisibleItem(HEADER_AREA_KEYS)), version: version, internetBankButton: internetBankButton })) : null] }) }));
|
|
4477
4506
|
});
|
|
4478
4507
|
const getVersionStyle = (version) => (version === 'transparent' ? 'opacity-30' : '');
|
|
4479
4508
|
|
|
@@ -6273,7 +6302,7 @@
|
|
|
6273
6302
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
6274
6303
|
});
|
|
6275
6304
|
|
|
6276
|
-
const packageVersion = "0.14.
|
|
6305
|
+
const packageVersion = "0.14.394";
|
|
6277
6306
|
|
|
6278
6307
|
exports.Blocks = Blocks;
|
|
6279
6308
|
exports.ContentPage = ContentPage;
|