@redneckz/wildless-cms-uni-blocks 0.14.302 → 0.14.303
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 +32 -50
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/Footer/FooterLink.d.ts +1 -0
- package/bundle/data/FooterData.d.ts +4 -0
- package/bundle/data/SitemapData.d.ts +8 -2
- package/bundle/hooks/useAspects/aspects/getAspectsWithInclude.d.ts +2 -0
- package/bundle/model/LogoType.d.ts +7 -2
- package/bundle/ui-kit/LocationDialog/renderRegion.d.ts +2 -1
- package/bundle/ui-kit/LocationDialog/renderRegionGroup.d.ts +2 -1
- package/bundle/ui-kit/Logo/Logo.d.ts +2 -0
- package/dist/components/Footer/Contacts.js +2 -3
- package/dist/components/Footer/Contacts.js.map +1 -1
- package/dist/components/Footer/Footer.js +4 -2
- package/dist/components/Footer/Footer.js.map +1 -1
- package/dist/components/Footer/Footer.mobile.js +3 -3
- package/dist/components/Footer/Footer.mobile.js.map +1 -1
- package/dist/components/Footer/FooterLink.d.ts +1 -0
- package/dist/components/Footer/SocialMedia.js +5 -1
- package/dist/components/Footer/SocialMedia.js.map +1 -1
- package/dist/components/Footer/TextInformation.js +1 -1
- package/dist/components/Footer/TextInformation.js.map +1 -1
- package/dist/components/Header/Header.js +3 -1
- package/dist/components/Header/Header.js.map +1 -1
- package/dist/components/Header/HeaderSecondaryMenu.js +2 -22
- package/dist/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/dist/data/FooterData.d.ts +4 -0
- package/dist/data/SitemapData.d.ts +8 -2
- package/dist/hooks/useAspects/aspects/getAspectsWithInclude.d.ts +2 -0
- package/dist/hooks/useAspects/aspects/getAspectsWithInclude.js +8 -0
- package/dist/hooks/useAspects/aspects/getAspectsWithInclude.js.map +1 -0
- package/dist/model/LogoType.d.ts +7 -2
- package/dist/ui-kit/LocationDialog/LocationDialog.js +1 -1
- package/dist/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
- package/dist/ui-kit/LocationDialog/renderRegion.d.ts +2 -1
- package/dist/ui-kit/LocationDialog/renderRegion.js +6 -15
- package/dist/ui-kit/LocationDialog/renderRegion.js.map +1 -1
- package/dist/ui-kit/LocationDialog/renderRegionGroup.d.ts +2 -1
- package/dist/ui-kit/LocationDialog/renderRegionGroup.js +1 -1
- package/dist/ui-kit/LocationDialog/renderRegionGroup.js.map +1 -1
- package/dist/ui-kit/Logo/Logo.d.ts +2 -0
- package/dist/ui-kit/Logo/Logo.js +1 -1
- package/dist/ui-kit/Logo/Logo.js.map +1 -1
- package/dist/ui-kit/SearchBar/SearchBar.js +2 -2
- package/dist/ui-kit/SearchBar/SearchBar.js.map +1 -1
- package/lib/components/Footer/Contacts.js +2 -3
- package/lib/components/Footer/Contacts.js.map +1 -1
- package/lib/components/Footer/Footer.js +4 -2
- package/lib/components/Footer/Footer.js.map +1 -1
- package/lib/components/Footer/Footer.mobile.js +3 -3
- package/lib/components/Footer/Footer.mobile.js.map +1 -1
- package/lib/components/Footer/FooterLink.d.ts +1 -0
- package/lib/components/Footer/SocialMedia.js +5 -1
- package/lib/components/Footer/SocialMedia.js.map +1 -1
- package/lib/components/Footer/TextInformation.js +1 -1
- package/lib/components/Footer/TextInformation.js.map +1 -1
- package/lib/components/Header/Header.js +3 -1
- package/lib/components/Header/Header.js.map +1 -1
- package/lib/components/Header/HeaderSecondaryMenu.js +2 -22
- package/lib/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/lib/data/FooterData.d.ts +4 -0
- package/lib/data/SitemapData.d.ts +8 -2
- package/lib/hooks/useAspects/aspects/getAspectsWithInclude.d.ts +2 -0
- package/lib/hooks/useAspects/aspects/getAspectsWithInclude.js +5 -0
- package/lib/hooks/useAspects/aspects/getAspectsWithInclude.js.map +1 -0
- package/lib/model/LogoType.d.ts +7 -2
- package/lib/ui-kit/LocationDialog/LocationDialog.js +1 -1
- package/lib/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
- package/lib/ui-kit/LocationDialog/renderRegion.d.ts +2 -1
- package/lib/ui-kit/LocationDialog/renderRegion.js +6 -15
- package/lib/ui-kit/LocationDialog/renderRegion.js.map +1 -1
- package/lib/ui-kit/LocationDialog/renderRegionGroup.d.ts +2 -1
- package/lib/ui-kit/LocationDialog/renderRegionGroup.js +1 -1
- package/lib/ui-kit/LocationDialog/renderRegionGroup.js.map +1 -1
- package/lib/ui-kit/Logo/Logo.d.ts +2 -0
- package/lib/ui-kit/Logo/Logo.js +1 -1
- package/lib/ui-kit/Logo/Logo.js.map +1 -1
- package/lib/ui-kit/SearchBar/SearchBar.js +2 -2
- package/lib/ui-kit/SearchBar/SearchBar.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +24 -25
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/Footer/FooterLink.d.ts +1 -0
- package/mobile/bundle/data/FooterData.d.ts +4 -0
- package/mobile/bundle/data/SitemapData.d.ts +8 -2
- package/mobile/bundle/hooks/useAspects/aspects/getAspectsWithInclude.d.ts +2 -0
- package/mobile/bundle/model/LogoType.d.ts +7 -2
- package/mobile/bundle/ui-kit/LocationDialog/renderRegion.d.ts +2 -1
- package/mobile/bundle/ui-kit/LocationDialog/renderRegionGroup.d.ts +2 -1
- package/mobile/bundle/ui-kit/Logo/Logo.d.ts +2 -0
- package/mobile/dist/components/Footer/Contacts.js +2 -3
- package/mobile/dist/components/Footer/Contacts.js.map +1 -1
- package/mobile/dist/components/Footer/Footer.js +3 -3
- package/mobile/dist/components/Footer/Footer.js.map +1 -1
- package/mobile/dist/components/Footer/FooterLink.d.ts +1 -0
- package/mobile/dist/components/Footer/SocialMedia.js +5 -1
- package/mobile/dist/components/Footer/SocialMedia.js.map +1 -1
- package/mobile/dist/components/Footer/TextInformation.js +1 -1
- package/mobile/dist/components/Footer/TextInformation.js.map +1 -1
- package/mobile/dist/components/Header/HeaderSecondaryMenu.js +2 -22
- package/mobile/dist/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/mobile/dist/data/FooterData.d.ts +4 -0
- package/mobile/dist/data/SitemapData.d.ts +8 -2
- package/mobile/dist/hooks/useAspects/aspects/getAspectsWithInclude.d.ts +2 -0
- package/mobile/dist/hooks/useAspects/aspects/getAspectsWithInclude.js +8 -0
- package/mobile/dist/hooks/useAspects/aspects/getAspectsWithInclude.js.map +1 -0
- package/mobile/dist/model/LogoType.d.ts +7 -2
- package/mobile/dist/ui-kit/LocationDialog/LocationDialog.js +1 -1
- package/mobile/dist/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
- package/mobile/dist/ui-kit/LocationDialog/renderRegion.d.ts +2 -1
- package/mobile/dist/ui-kit/LocationDialog/renderRegion.js +6 -15
- package/mobile/dist/ui-kit/LocationDialog/renderRegion.js.map +1 -1
- package/mobile/dist/ui-kit/LocationDialog/renderRegionGroup.d.ts +2 -1
- package/mobile/dist/ui-kit/LocationDialog/renderRegionGroup.js +1 -1
- package/mobile/dist/ui-kit/LocationDialog/renderRegionGroup.js.map +1 -1
- package/mobile/dist/ui-kit/Logo/Logo.d.ts +2 -0
- package/mobile/dist/ui-kit/Logo/Logo.js +1 -1
- package/mobile/dist/ui-kit/Logo/Logo.js.map +1 -1
- package/mobile/dist/ui-kit/SearchBar/SearchBar.js +2 -2
- package/mobile/dist/ui-kit/SearchBar/SearchBar.js.map +1 -1
- package/mobile/lib/components/Footer/Contacts.js +2 -3
- package/mobile/lib/components/Footer/Contacts.js.map +1 -1
- package/mobile/lib/components/Footer/Footer.js +3 -3
- package/mobile/lib/components/Footer/Footer.js.map +1 -1
- package/mobile/lib/components/Footer/FooterLink.d.ts +1 -0
- package/mobile/lib/components/Footer/SocialMedia.js +5 -1
- package/mobile/lib/components/Footer/SocialMedia.js.map +1 -1
- package/mobile/lib/components/Footer/TextInformation.js +1 -1
- package/mobile/lib/components/Footer/TextInformation.js.map +1 -1
- package/mobile/lib/components/Header/HeaderSecondaryMenu.js +2 -22
- package/mobile/lib/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/mobile/lib/data/FooterData.d.ts +4 -0
- package/mobile/lib/data/SitemapData.d.ts +8 -2
- package/mobile/lib/hooks/useAspects/aspects/getAspectsWithInclude.d.ts +2 -0
- package/mobile/lib/hooks/useAspects/aspects/getAspectsWithInclude.js +5 -0
- package/mobile/lib/hooks/useAspects/aspects/getAspectsWithInclude.js.map +1 -0
- package/mobile/lib/model/LogoType.d.ts +7 -2
- package/mobile/lib/ui-kit/LocationDialog/LocationDialog.js +1 -1
- package/mobile/lib/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
- package/mobile/lib/ui-kit/LocationDialog/renderRegion.d.ts +2 -1
- package/mobile/lib/ui-kit/LocationDialog/renderRegion.js +6 -15
- package/mobile/lib/ui-kit/LocationDialog/renderRegion.js.map +1 -1
- package/mobile/lib/ui-kit/LocationDialog/renderRegionGroup.d.ts +2 -1
- package/mobile/lib/ui-kit/LocationDialog/renderRegionGroup.js +1 -1
- package/mobile/lib/ui-kit/LocationDialog/renderRegionGroup.js.map +1 -1
- package/mobile/lib/ui-kit/Logo/Logo.d.ts +2 -0
- package/mobile/lib/ui-kit/Logo/Logo.js +1 -1
- package/mobile/lib/ui-kit/Logo/Logo.js.map +1 -1
- package/mobile/lib/ui-kit/SearchBar/SearchBar.js +2 -2
- package/mobile/lib/ui-kit/SearchBar/SearchBar.js.map +1 -1
- package/mobile/src/components/ApplicationForm/ApplicationForm.ui.json +7 -0
- package/mobile/src/components/Footer/Contacts.tsx +4 -15
- package/mobile/src/components/Footer/Footer.tsx +6 -5
- package/mobile/src/components/Footer/FooterLink.ts +1 -0
- package/mobile/src/components/Footer/SocialMedia.tsx +7 -1
- package/mobile/src/components/Footer/TextInformation.tsx +2 -2
- package/mobile/src/components/Header/HeaderSecondaryMenu.tsx +3 -24
- package/mobile/src/data/FooterData.ts +4 -0
- package/mobile/src/data/SitemapData.ts +6 -2
- package/mobile/src/hooks/useAspects/aspects/getAspectsWithInclude.tsx +8 -0
- package/mobile/src/model/LogoType.ts +8 -2
- package/mobile/src/ui-kit/LocationDialog/LocationDialog.tsx +4 -2
- package/mobile/src/ui-kit/LocationDialog/renderRegion.tsx +22 -30
- package/mobile/src/ui-kit/LocationDialog/renderRegionGroup.tsx +3 -2
- package/mobile/src/ui-kit/Logo/Logo.tsx +4 -1
- package/mobile/src/ui-kit/SearchBar/SearchBar.tsx +6 -2
- package/package.json +1 -1
- package/src/components/ApplicationForm/ApplicationForm.ui.json +7 -0
- package/src/components/Footer/Contacts.tsx +4 -15
- package/src/components/Footer/Footer.mobile.tsx +6 -5
- package/src/components/Footer/Footer.tsx +32 -11
- package/src/components/Footer/FooterLink.ts +1 -0
- package/src/components/Footer/SocialMedia.tsx +7 -1
- package/src/components/Footer/TextInformation.tsx +2 -2
- package/src/components/Header/Header.tsx +10 -7
- package/src/components/Header/HeaderSecondaryMenu.tsx +3 -24
- package/src/data/FooterData.ts +4 -0
- package/src/data/SitemapData.ts +6 -2
- package/src/hooks/useAspects/aspects/getAspectsWithInclude.tsx +8 -0
- package/src/model/LogoType.ts +8 -2
- package/src/ui-kit/LocationDialog/LocationDialog.tsx +4 -2
- package/src/ui-kit/LocationDialog/renderRegion.tsx +22 -30
- package/src/ui-kit/LocationDialog/renderRegionGroup.tsx +3 -2
- package/src/ui-kit/Logo/Logo.tsx +4 -1
- package/src/ui-kit/SearchBar/SearchBar.tsx +6 -2
|
@@ -3359,6 +3359,9 @@
|
|
|
3359
3359
|
const findIconByHref = (href) => ICONS_MAP.find(({ origins }) => origins?.some((_) => href?.includes(_))) || {};
|
|
3360
3360
|
|
|
3361
3361
|
const SocialMedia = JSX(({ className = '', media, showButtonText, stretched, version = 'white', children }) => {
|
|
3362
|
+
if (!media?.length) {
|
|
3363
|
+
return null;
|
|
3364
|
+
}
|
|
3362
3365
|
const [hasText, setHasText] = useState();
|
|
3363
3366
|
const buttons = media?.map((_) => {
|
|
3364
3367
|
const { href, icon, text } = _;
|
|
@@ -3375,12 +3378,13 @@
|
|
|
3375
3378
|
version: _?.version ?? version,
|
|
3376
3379
|
};
|
|
3377
3380
|
});
|
|
3378
|
-
const buttonClassName = style('border border-solid hover:border-transparent group-data-primary:border-main-divider border-main-divider group-data-gray:border-green group/media', showButtonText && hasText ? '' : 'basis-auto', stretched
|
|
3381
|
+
const buttonClassName = style('border border-solid hover:border-transparent group-data-primary:border-main-divider border-main-divider group-data-gray:border-green group/media', showButtonText && hasText ? '' : 'basis-auto', getStretchedStyle(stretched));
|
|
3379
3382
|
return (jsxs("div", { className: style('flex flex-col gap-xs', className), children: [jsx("div", { className: "flex gap-xs", children: renderButtonsSection(buttons, {
|
|
3380
3383
|
className: style(stretched || hasText ? 'basis-full' : ''),
|
|
3381
3384
|
buttonClassName,
|
|
3382
3385
|
}) }), children ? (jsx(Text, { size: "text-s", font: "font-light", color: "text-secondary-text", children: children })) : null] }));
|
|
3383
3386
|
});
|
|
3387
|
+
const getStretchedStyle = (stretched) => (stretched ? 'flex-1 justify-center' : '');
|
|
3384
3388
|
|
|
3385
3389
|
const ImageAlwaysOnRight = false;
|
|
3386
3390
|
|
|
@@ -3743,8 +3747,8 @@
|
|
|
3743
3747
|
return foldButtonVersion === 'accordion' ? (jsx(AccordionFoldButton, { label: label, labelIcon: labelIcon, labelIconBgVersion: labelIconBgVersion, icon: icon, onToggle: onToggle })) : (jsx(DefaultFoldButton, { label: label, icon: isUnfolded ? 'ArrowUpIcon' : 'ArrowDownIcon', onClick: onToggle }));
|
|
3744
3748
|
};
|
|
3745
3749
|
|
|
3746
|
-
const Contacts = JSX(({ className = '', items }) => (
|
|
3747
|
-
const renderContactsGroup = (item, i) => (jsxs("div", { className: "
|
|
3750
|
+
const Contacts = JSX(({ className = '', items = [] }) => items?.length ? jsx("div", { className: className, children: items.map(renderContactsGroup) }) : null);
|
|
3751
|
+
const renderContactsGroup = (item, i) => (jsxs("div", { className: "space-y-m", children: [jsx("div", { children: jsx(Text, { size: "text-l", font: "font-medium", children: item?.title }) }), jsx("div", { className: "space-y-m", children: item.items?.map(renderContact) })] }, String(i)));
|
|
3748
3752
|
const renderContact = (item, index) => (jsxs("div", { className: "space-y-2xs", children: [jsx("div", { children: renderText(item.type, item.text) }), jsx(Paragraph, { size: "text-s", font: "font-light", color: "text-secondary-text", children: item.description })] }, String(index)));
|
|
3749
3753
|
const renderText = (type, text = '') => {
|
|
3750
3754
|
switch (type) {
|
|
@@ -3787,16 +3791,16 @@
|
|
|
3787
3791
|
return (jsx("a", { className: `text-xs font-light text-secondary-text visited:text-secondary-text hover:text-primary-main inline-block no-underline max-w-[292px] ${className}`, href: href, target: target, onClick: onClick, children: text || `Документ ${index}` }));
|
|
3788
3792
|
});
|
|
3789
3793
|
|
|
3790
|
-
const TextInformation = JSX(({ className = '', links }) => (jsxs("div", { className: style('@container', className), children: [jsx("div", { className: "pt-lg", children: jsx(Text, { size: "text-xs", font: "font-light", color: "text-secondary-text", children: `\u00a9\u00A02000-${new Date().getFullYear()}\u00A0
|
|
3794
|
+
const TextInformation = JSX(({ className = '', links, license }) => (jsxs("div", { className: style('@container', className), children: [jsx("div", { className: "pt-lg", children: jsx(Text, { size: "text-xs", font: "font-light", color: "text-secondary-text", children: `\u00a9\u00A02000-${new Date().getFullYear()}\u00A0${license}` }) }), links?.length ? (jsx("div", { className: "flex flex-col @5xl:flex-row justify-start items-start gap-x-lg gap-y-xs pt-lg", children: links.map((_, i) => (jsx(TextInformationLink, { index: i, ..._ }, String(i)))) })) : null] })));
|
|
3791
3795
|
|
|
3792
3796
|
const Footer = UniBlock(({ className, footer, ...rest }) => {
|
|
3793
3797
|
const { topItems } = rest.options?.page?.sitemap ?? {};
|
|
3794
|
-
const { relatedEnterprises, contacts, socialMedia, mobileApps, horizontalNavigationTitle, documents, } = footer || {};
|
|
3798
|
+
const { relatedEnterprises, contacts, socialMedia, mobileApps, horizontalNavigationTitle, documents, feedbackButton, license, } = footer || {};
|
|
3795
3799
|
const handleOnClick = useCallback(() => {
|
|
3796
3800
|
const [name, oldValue, newValue] = COOKIE_REPLACE;
|
|
3797
3801
|
mapCookie(name, (value) => value?.replace(oldValue, newValue));
|
|
3798
3802
|
}, []);
|
|
3799
|
-
return (jsxs(BlockWrapper, { tag: "footer", className: className, defaultPadding: "p-4xl pb-24", ...rest, children: [jsx("div", { className: "mb-lg pb-xs border-b border-main-divider", role: "menu", children: renderTopItems(topItems) }), jsx(Contacts, { className: "overflow-hidden", items: contacts }), jsxs("div", { className: "mt-xl", children: [jsx(SocialMedia, { className: "mb-xl", media: socialMedia, stretched: true, children: "\u0421\u043E\u0446\u0441\u0435\u0442\u0438" }), jsxs("div", { className: "mb-xl", children: [jsx(SocialMedia, { className: "mb-m", media: mobileApps, stretched: true, showButtonText: false }),
|
|
3803
|
+
return (jsxs(BlockWrapper, { tag: "footer", className: className, defaultPadding: "p-4xl pb-24", ...rest, children: [jsx("div", { className: "mb-lg pb-xs border-b border-main-divider", role: "menu", children: renderTopItems(topItems) }), jsx(Contacts, { className: "overflow-hidden", items: contacts }), feedbackButton ? jsx(LinkButton, { className: "w-full mt-xs", ...feedbackButton }) : null, jsxs("div", { className: "mt-xl", children: [jsx(SocialMedia, { className: "mb-xl", media: socialMedia, stretched: true, children: "\u0421\u043E\u0446\u0441\u0435\u0442\u0438" }), jsxs("div", { className: "mb-xl", children: [jsx(SocialMedia, { className: "mb-m", media: mobileApps, stretched: true, showButtonText: false }), "\u041C\u043E\u0431\u0438\u043B\u044C\u043D\u043E\u0435 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435"] })] }), jsx("div", { className: "py-lg border-t border-main-divider", children: jsx(HorizontalNavigationLink, { text: "\u0412\u0435\u0440\u043D\u0443\u0442\u044C\u0441\u044F \u043D\u0430 \u043F\u0440\u0435\u0436\u043D\u044E\u044E \u0432\u0435\u0440\u0441\u0438\u044E \u0441\u0430\u0439\u0442\u0430", className: "text-l font-light max-w-[292px]", href: "https://old.rshb.ru", onClick: handleOnClick }) }), jsx(HorizontalNavigation, { className: "py-lg border-y border-main-divider", title: horizontalNavigationTitle, links: relatedEnterprises }), jsx(TextInformation, { links: documents, license: license })] }));
|
|
3800
3804
|
});
|
|
3801
3805
|
const renderTopItems = (topItems) => topItems
|
|
3802
3806
|
?.filter((_) => _.icon?.icon)
|
|
@@ -3825,7 +3829,7 @@
|
|
|
3825
3829
|
'bg-white': 'text-primary-text',
|
|
3826
3830
|
transparent: 'text-white',
|
|
3827
3831
|
};
|
|
3828
|
-
const Logo = JSX(({ className, href = '/', logo, children, targetBlank, bgColor = 'bg-white', showTitle = true, }) => (jsxs("a", { className: style('inline-flex items-center font-sans no-underline', className), href: href, target: targetBlank ? '_blank' : '_self', "aria-label": logo?.title ?? 'Россельхозбанк', ...getAspectsAttributes(
|
|
3832
|
+
const Logo = JSX(({ className, href = '/', logo, children, targetBlank, bgColor = 'bg-white', showTitle = true, data, }) => (jsxs("a", { className: style('inline-flex items-center font-sans no-underline', className), href: href, target: targetBlank ? '_blank' : '_self', "aria-label": logo?.title ?? 'Россельхозбанк', ...getAspectsAttributes(data), children: [renderImage(bgColor, logo?.image, ICON_SIZE), showTitle
|
|
3829
3833
|
? children ?? (jsx("div", { className: "ml-s", children: jsx(Text, { font: "font-medium", color: TEXT_COLOR[bgColor], size: logoTitleSizeStyle, children: logo?.title ?? 'Россельхозбанк' }) }))
|
|
3830
3834
|
: null] })));
|
|
3831
3835
|
|
|
@@ -5022,23 +5026,18 @@
|
|
|
5022
5026
|
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] }));
|
|
5023
5027
|
});
|
|
5024
5028
|
|
|
5025
|
-
const
|
|
5026
|
-
|
|
5027
|
-
|
|
5028
|
-
|
|
5029
|
-
|
|
5030
|
-
|
|
5031
|
-
|
|
5032
|
-
|
|
5033
|
-
|
|
5034
|
-
|
|
5035
|
-
eventCategory: MINDBOX_CATEGORY,
|
|
5036
|
-
eventValueText: region.name,
|
|
5037
|
-
},
|
|
5038
|
-
},
|
|
5039
|
-
], children: jsx(Text, { size: "text-l", font: "font-light", children: region.name }) }, String(region.id))) : null;
|
|
5029
|
+
const getAspectsWithInclude = (data, include) => data?.map(({ aspectName, params }) => ({
|
|
5030
|
+
aspectName,
|
|
5031
|
+
params: aspectName === 'mindboxEvent' ? { ...params, eventValueText: include } : params,
|
|
5032
|
+
}));
|
|
5033
|
+
|
|
5034
|
+
const renderRegion = (data, onChangeLocation) => (region) => {
|
|
5035
|
+
return region.name ? (jsx(LinkWrapper, { isRemote: true, href: `/branches/${region.slug}`, className: "mb-xs sm:mb-2xs hover:text-primary-hover", onClick: () => {
|
|
5036
|
+
onChangeLocation && onChangeLocation(region);
|
|
5037
|
+
}, data: getAspectsWithInclude(data, region.name), children: jsx(Text, { size: "text-l", font: "font-light", children: region.name }) }, String(region.id))) : null;
|
|
5038
|
+
};
|
|
5040
5039
|
|
|
5041
|
-
const renderRegionGroup = (onChangeLocation) => ([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(onChangeLocation))] }, letter));
|
|
5040
|
+
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));
|
|
5042
5041
|
|
|
5043
5042
|
const SearchBar = JSX(({ className, searchTerm, onSearch }) => {
|
|
5044
5043
|
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: `h-12 pl-m w-full peer text-l text-black border border-solid rounded-md box-border
|
|
@@ -5060,7 +5059,7 @@
|
|
|
5060
5059
|
}, []);
|
|
5061
5060
|
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, { isRemote: true, 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
|
|
5062
5061
|
.filter(({ name }) => name && jaroWinklerDistance(name.toLowerCase())(query.toLowerCase()) >= 0.8)
|
|
5063
|
-
.map(renderRegion(handleChangeLocation)) })) : (jsx("div", { className: "columns-1 sm:columns-5", children: Array.from(regionsGroupByLetter.entries()).map(renderRegionGroup(handleChangeLocation)) })), renderForeignOffices(foreignOffices)] }));
|
|
5062
|
+
.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)] }));
|
|
5064
5063
|
});
|
|
5065
5064
|
const regionFirstLetter = (region) => region.name?.charAt(0) || '';
|
|
5066
5065
|
const cleanUpRegions = (regions) => regions.map((region) => ({
|
|
@@ -5701,7 +5700,7 @@
|
|
|
5701
5700
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
5702
5701
|
});
|
|
5703
5702
|
|
|
5704
|
-
const packageVersion = "0.14.
|
|
5703
|
+
const packageVersion = "0.14.302";
|
|
5705
5704
|
|
|
5706
5705
|
exports.Blocks = Blocks;
|
|
5707
5706
|
exports.ContentPage = ContentPage;
|