@redneckz/wildless-cms-uni-blocks 0.14.301 → 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 +34 -52
- 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/HorizontalNavigation.js +1 -1
- package/dist/components/Footer/HorizontalNavigation.js.map +1 -1
- 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/dist/ui-kit/Sitemap/Sitemap.js +1 -1
- package/dist/ui-kit/Sitemap/Sitemap.js.map +1 -1
- package/lib/common.css +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/HorizontalNavigation.js +1 -1
- package/lib/components/Footer/HorizontalNavigation.js.map +1 -1
- 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/lib/ui-kit/Sitemap/Sitemap.js +1 -1
- package/lib/ui-kit/Sitemap/Sitemap.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/dist/ui-kit/Sitemap/Sitemap.js +1 -1
- package/mobile/dist/ui-kit/Sitemap/Sitemap.js.map +1 -1
- package/mobile/lib/common.css +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/lib/ui-kit/Sitemap/Sitemap.js +1 -1
- package/mobile/lib/ui-kit/Sitemap/Sitemap.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/mobile/src/ui-kit/Sitemap/Sitemap.tsx +1 -1
- 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 +35 -14
- package/src/components/Footer/FooterLink.ts +1 -0
- package/src/components/Footer/HorizontalNavigation.tsx +1 -1
- 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
- package/src/ui-kit/Sitemap/Sitemap.tsx +1 -1
package/bundle/bundle.umd.js
CHANGED
|
@@ -3396,6 +3396,9 @@
|
|
|
3396
3396
|
const findIconByHref = (href) => ICONS_MAP.find(({ origins }) => origins?.some((_) => href?.includes(_))) || {};
|
|
3397
3397
|
|
|
3398
3398
|
const SocialMedia = JSX(({ className = '', media, showButtonText, stretched, version = 'white', children }) => {
|
|
3399
|
+
if (!media?.length) {
|
|
3400
|
+
return null;
|
|
3401
|
+
}
|
|
3399
3402
|
const [hasText, setHasText] = useState();
|
|
3400
3403
|
const buttons = media?.map((_) => {
|
|
3401
3404
|
const { href, icon, text } = _;
|
|
@@ -3412,12 +3415,13 @@
|
|
|
3412
3415
|
version: _?.version ?? version,
|
|
3413
3416
|
};
|
|
3414
3417
|
});
|
|
3415
|
-
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
|
|
3418
|
+
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));
|
|
3416
3419
|
return (jsxs("div", { className: style('flex flex-col gap-xs', className), children: [jsx("div", { className: "flex gap-xs", children: renderButtonsSection(buttons, {
|
|
3417
3420
|
className: style(stretched || hasText ? 'basis-full' : ''),
|
|
3418
3421
|
buttonClassName,
|
|
3419
3422
|
}) }), children ? (jsx(Text, { size: "text-s", font: "font-light", color: "text-secondary-text", children: children })) : null] }));
|
|
3420
3423
|
});
|
|
3424
|
+
const getStretchedStyle = (stretched) => (stretched ? 'flex-1 justify-center' : '');
|
|
3421
3425
|
|
|
3422
3426
|
const ImageAlwaysOnRight = true;
|
|
3423
3427
|
|
|
@@ -3905,7 +3909,7 @@
|
|
|
3905
3909
|
'bg-white': 'text-primary-text',
|
|
3906
3910
|
transparent: 'text-white',
|
|
3907
3911
|
};
|
|
3908
|
-
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(
|
|
3912
|
+
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
|
|
3909
3913
|
? children ?? (jsx("div", { className: "ml-s", children: jsx(Text, { font: "font-medium", color: TEXT_COLOR[bgColor], size: logoTitleSizeStyle, children: logo?.title ?? 'Россельхозбанк' }) }))
|
|
3910
3914
|
: null] })));
|
|
3911
3915
|
|
|
@@ -4073,7 +4077,7 @@
|
|
|
4073
4077
|
const renderColumn = (menuItem, index) => {
|
|
4074
4078
|
const { text, items = [], href, target, onClick } = menuItem;
|
|
4075
4079
|
const visibleSubItems = items.filter(isVisibleItem$1);
|
|
4076
|
-
return (jsxs("div", { className: "flex flex-col gap-s w-1/4", children: [jsx("a", { className: "leading-5 text-l text-primary-text hover:text-primary-main no-underline", href: href, target: target || '_self', onClick: onClick, children: text || `Раздел ${index}` }), visibleSubItems.map((_, i) => (jsx(ColumnItem, { ..._, basePath: appendSlash(href), index: i }, String(i))))] }, String(index)));
|
|
4080
|
+
return (jsxs("div", { className: "flex flex-col gap-s @sm:w-full @md:w-1/4", children: [jsx("a", { className: "leading-5 text-l text-primary-text hover:text-primary-main no-underline", href: href, target: target || '_self', onClick: onClick, children: text || `Раздел ${index}` }), visibleSubItems.map((_, i) => (jsx(ColumnItem, { ..._, basePath: appendSlash(href), index: i }, String(i))))] }, String(index)));
|
|
4077
4081
|
};
|
|
4078
4082
|
const ColumnItem = JSX(({ text, index, basePath, ...rest }) => {
|
|
4079
4083
|
const isAnotherPortal = projectSettings.BASE_PATH && basePath ? !projectSettings.BASE_PATH.startsWith(basePath) : false;
|
|
@@ -4108,7 +4112,7 @@
|
|
|
4108
4112
|
};
|
|
4109
4113
|
|
|
4110
4114
|
const MIN_QUERY_LEN = 3;
|
|
4111
|
-
const SearchBar$1 = JSX(({ className, ...rest }) => {
|
|
4115
|
+
const SearchBar$1 = JSX(({ className, search, ...rest }) => {
|
|
4112
4116
|
const [value, setValue] = useState('');
|
|
4113
4117
|
const resetQueryOnDialogClose = useCallback(() => setValue(''), []);
|
|
4114
4118
|
const searchDialog = useSearchDialog(rest);
|
|
@@ -4118,7 +4122,7 @@
|
|
|
4118
4122
|
searchDialog.open({ initialQuery: _ }, { onClose: resetQueryOnDialogClose });
|
|
4119
4123
|
}
|
|
4120
4124
|
}, [resetQueryOnDialogClose, searchDialog]);
|
|
4121
|
-
return (jsxs("div", { className: style('relative', className), role: "search", children: [jsx(SearchInput, { value: value, onChange: handleInitialInputChange }), jsx(CloseButton, { className: "absolute top-0 right-0 sm:hidden", onClose: resetQueryOnDialogClose })] }));
|
|
4125
|
+
return (jsxs("div", { className: style('relative', className), role: "search", children: [jsx(SearchInput, { value: value, placeholder: search?.placeholder, onChange: handleInitialInputChange }), jsx(CloseButton, { className: "absolute top-0 right-0 sm:hidden", onClose: resetQueryOnDialogClose })] }));
|
|
4122
4126
|
});
|
|
4123
4127
|
const isQueryLongEnough = (_) => _ && _.length >= MIN_QUERY_LEN;
|
|
4124
4128
|
|
|
@@ -4130,8 +4134,8 @@
|
|
|
4130
4134
|
}
|
|
4131
4135
|
};
|
|
4132
4136
|
|
|
4133
|
-
const Contacts = JSX(({ className = '', items }) => (
|
|
4134
|
-
const renderContactsGroup = (item, i) => (jsxs("div", { className: "
|
|
4137
|
+
const Contacts = JSX(({ className = '', items = [] }) => items?.length ? jsx("div", { className: className, children: items.map(renderContactsGroup) }) : null);
|
|
4138
|
+
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)));
|
|
4135
4139
|
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)));
|
|
4136
4140
|
const renderText = (type, text = '') => {
|
|
4137
4141
|
switch (type) {
|
|
@@ -4155,7 +4159,7 @@
|
|
|
4155
4159
|
return (jsx("a", { className: style(horizontalNavigationLinkStyles, className), href: href, target: target, onClick: onClick, children: text || `Документ ${index}` }));
|
|
4156
4160
|
});
|
|
4157
4161
|
|
|
4158
|
-
const HorizontalNavigation = JSX(({ className = '', links }) => (jsx("div", { className: className, children: links?.length ? (jsx("div", { className: "flex justify-between items-center gap-lg py-lg border-solid border-x-0 border-y border-y-main-divider", children: links.map((_, i) => (jsx(HorizontalNavigationLink, { index: i, className: "text-l font-light max-w-[292px]", ..._ }, String(i)))) })) : null })));
|
|
4162
|
+
const HorizontalNavigation = JSX(({ className = '', links }) => (jsx("div", { className: className, children: links?.length ? (jsx("div", { className: "flex justify-between items-center gap-lg py-lg border-solid border-x-0 border-y border-y-main-divider flex-col @sm:flex-row", children: links.map((_, i) => (jsx(HorizontalNavigationLink, { index: i, className: "text-l font-light max-w-[292px]", ..._ }, String(i)))) })) : null })));
|
|
4159
4163
|
|
|
4160
4164
|
const TextInformationLink = JSX(({ className = '', index, ...rest }) => {
|
|
4161
4165
|
const link = useLink({ isRemote: true });
|
|
@@ -4163,18 +4167,20 @@
|
|
|
4163
4167
|
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}` }));
|
|
4164
4168
|
});
|
|
4165
4169
|
|
|
4166
|
-
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
|
|
4170
|
+
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] })));
|
|
4167
4171
|
|
|
4168
4172
|
const LEFT_COL_WIDTH = 'w-52';
|
|
4169
4173
|
const Footer = UniBlock(({ className, footer, ...rest }) => {
|
|
4170
4174
|
const sitemap = rest.options?.page?.sitemap ?? {};
|
|
4171
4175
|
const { logo } = sitemap;
|
|
4172
|
-
const {
|
|
4176
|
+
const { dataFooter, ...logoProps } = logo ?? {};
|
|
4177
|
+
const { documents, relatedEnterprises, contacts, socialMedia, mobileApps, feedbackButton, isOldVersionButton, license, otherLinks = [], } = footer ?? {};
|
|
4173
4178
|
const handleOnClick = useCallback(() => {
|
|
4174
4179
|
const [name, oldValue, newValue] = COOKIE_REPLACE;
|
|
4175
4180
|
mapCookie(name, (value) => value?.replace(oldValue, newValue));
|
|
4176
4181
|
}, []);
|
|
4177
|
-
|
|
4182
|
+
const linkStyle = '!text-left text-s font-light';
|
|
4183
|
+
return (jsxs(BlockWrapper, { tag: "footer", className: className, ...rest, children: [jsxs("div", { className: "flex items-stretch gap-3xl pb-3xl", children: [jsx(Logo, { className: LEFT_COL_WIDTH, logo: logoProps, data: dataFooter }), jsx(SearchBar$1, { className: "grow", ...sitemap })] }), jsxs("div", { className: "flex items-center @lg:items-stretch gap-6xl flex-col @lg:flex-row", children: [jsxs("div", { className: style(LEFT_COL_WIDTH, 'flex flex-col shrink-0 overflow-hidden space-y-xl'), children: [jsx(Contacts, { items: contacts }), feedbackButton ? jsx(LinkButton, { className: "w-full mt-xs", ...feedbackButton }) : null, jsx(SocialMedia, { media: socialMedia, children: "\u0421\u043E\u0446\u0441\u0435\u0442\u0438" }), jsx(SocialMedia, { media: mobileApps, showButtonText: false, children: "\u041C\u043E\u0431\u0438\u043B\u044C\u043D\u043E\u0435 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435" }), isOldVersionButton ? (jsx(LinkButton, { version: "link", href: "https://old.rshb.ru", className: linkStyle, onClick: handleOnClick, children: "\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" })) : null, otherLinks.map((_, i) => (jsx(LinkButton, { className: linkStyle, version: "link", ..._, children: _?.text }, String(i))))] }), jsx(Sitemap, { className: "flex-grow flex-wrap", ...sitemap })] }), jsx(HorizontalNavigation, { className: "mt-xl", links: relatedEnterprises }), jsx(TextInformation, { links: documents, license: license })] }));
|
|
4178
4184
|
});
|
|
4179
4185
|
|
|
4180
4186
|
const GracePeriod = JSX(({ className = '', title, description, calendar, ...rest }) => (jsxs(BlockWrapper, { className: style('space-y-m', className), defaultPadding: "p-6xl", ...rest, children: [jsx(Headline, { title: title, description: description, headlineVersion: "M", isEmbedded: true }), calendar ? renderCalendar(calendar) : null] })));
|
|
@@ -4228,6 +4234,11 @@
|
|
|
4228
4234
|
? 'text-primary-main'
|
|
4229
4235
|
: style(flat ? 'text-primary-text' : 'text-secondary-text', 'hover:text-primary-main'), 'group-data-transparent:text-white group-data-transparent:hover:text-primary-hover');
|
|
4230
4236
|
|
|
4237
|
+
const getAspectsWithInclude = (data, include) => data?.map(({ aspectName, params }) => ({
|
|
4238
|
+
aspectName,
|
|
4239
|
+
params: aspectName === 'mindboxEvent' ? { ...params, eventValueText: include } : params,
|
|
4240
|
+
}));
|
|
4241
|
+
|
|
4231
4242
|
const groupBy = (list, keyGetter) => {
|
|
4232
4243
|
const result = new Map();
|
|
4233
4244
|
for (const item of list) {
|
|
@@ -4245,23 +4256,13 @@
|
|
|
4245
4256
|
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] }));
|
|
4246
4257
|
});
|
|
4247
4258
|
|
|
4248
|
-
const
|
|
4249
|
-
|
|
4250
|
-
|
|
4251
|
-
|
|
4252
|
-
|
|
4253
|
-
}, data: [
|
|
4254
|
-
{
|
|
4255
|
-
aspectName: MINDBOX_ASPECT$1,
|
|
4256
|
-
params: {
|
|
4257
|
-
eventAction: MINDBOX_EVENT_REGION_NEW_CLICK,
|
|
4258
|
-
eventCategory: MINDBOX_CATEGORY$1,
|
|
4259
|
-
eventValueText: region.name,
|
|
4260
|
-
},
|
|
4261
|
-
},
|
|
4262
|
-
], children: jsx(Text, { size: "text-l", font: "font-light", children: region.name }) }, String(region.id))) : null;
|
|
4259
|
+
const renderRegion = (data, onChangeLocation) => (region) => {
|
|
4260
|
+
return region.name ? (jsx(LinkWrapper, { isRemote: true, href: `/branches/${region.slug}`, className: "mb-xs sm:mb-2xs hover:text-primary-hover", onClick: () => {
|
|
4261
|
+
onChangeLocation && onChangeLocation(region);
|
|
4262
|
+
}, data: getAspectsWithInclude(data, region.name), children: jsx(Text, { size: "text-l", font: "font-light", children: region.name }) }, String(region.id))) : null;
|
|
4263
|
+
};
|
|
4263
4264
|
|
|
4264
|
-
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));
|
|
4265
|
+
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));
|
|
4265
4266
|
|
|
4266
4267
|
const SearchBar = JSX(({ className, searchTerm, onSearch }) => {
|
|
4267
4268
|
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
|
|
@@ -4283,7 +4284,7 @@
|
|
|
4283
4284
|
}, []);
|
|
4284
4285
|
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
|
|
4285
4286
|
.filter(({ name }) => name && jaroWinklerDistance(name.toLowerCase())(query.toLowerCase()) >= 0.8)
|
|
4286
|
-
.map(renderRegion(handleChangeLocation)) })) : (jsx("div", { className: "columns-1 sm:columns-5", children: Array.from(regionsGroupByLetter.entries()).map(renderRegionGroup(handleChangeLocation)) })), renderForeignOffices(foreignOffices)] }));
|
|
4287
|
+
.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)] }));
|
|
4287
4288
|
});
|
|
4288
4289
|
const regionFirstLetter = (region) => region.name?.charAt(0) || '';
|
|
4289
4290
|
const cleanUpRegions = (regions) => regions.map((region) => ({
|
|
@@ -4307,10 +4308,6 @@
|
|
|
4307
4308
|
? 'w-8 h-8 text-secondary-light hover:text-secondary-hove'
|
|
4308
4309
|
: `${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" }) })));
|
|
4309
4310
|
|
|
4310
|
-
const MINDBOX_ASPECT = 'mindboxEvent';
|
|
4311
|
-
const MINDBOX_CATEGORY = 'header';
|
|
4312
|
-
const MINDBOX_EVENT_REGION_CLICK = 'headerRegionClick';
|
|
4313
|
-
const MINDBOX_EVENT_SEARCH_CLICK = 'headerSearchClick';
|
|
4314
4311
|
const HeaderSecondaryMenu = JSX(({ className, version, ...rest }) => {
|
|
4315
4312
|
const iconVersion = version === 'transparent' ? 'white' : 'black';
|
|
4316
4313
|
const [currentLocation] = useLocation(rest?.branches?.default);
|
|
@@ -4318,24 +4315,7 @@
|
|
|
4318
4315
|
const locationDialog = useLocationDialog(rest);
|
|
4319
4316
|
const openSearchDialog = useCallback(() => searchDialog.open(), [searchDialog]);
|
|
4320
4317
|
const openLocationDialog = useCallback(() => locationDialog.open(), [locationDialog]);
|
|
4321
|
-
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:
|
|
4322
|
-
{
|
|
4323
|
-
aspectName: MINDBOX_ASPECT,
|
|
4324
|
-
params: {
|
|
4325
|
-
eventAction: MINDBOX_EVENT_REGION_CLICK,
|
|
4326
|
-
eventCategory: MINDBOX_CATEGORY,
|
|
4327
|
-
eventValueText: currentLocation?.name ?? '',
|
|
4328
|
-
},
|
|
4329
|
-
},
|
|
4330
|
-
], onClick: openLocationDialog })) : null, rest?.officesAtms?.href ? jsx(TopItem, { flat: true, ...rest.officesAtms }) : null, jsx(HeaderSecondaryMenuButton, { image: { icon: 'LoupeIcon', iconVersion }, ariaLabel: "\u041F\u043E\u0438\u0441\u043A", onClick: openSearchDialog, data: [
|
|
4331
|
-
{
|
|
4332
|
-
aspectName: MINDBOX_ASPECT,
|
|
4333
|
-
params: {
|
|
4334
|
-
eventAction: MINDBOX_EVENT_SEARCH_CLICK,
|
|
4335
|
-
eventCategory: MINDBOX_CATEGORY,
|
|
4336
|
-
},
|
|
4337
|
-
},
|
|
4338
|
-
] })] }));
|
|
4318
|
+
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: "\u041F\u043E\u0438\u0441\u043A", onClick: openSearchDialog, data: rest?.search?.data })] }));
|
|
4339
4319
|
});
|
|
4340
4320
|
|
|
4341
4321
|
const DropdownMenu = JSX(({ className = '', items, activeItem }) => {
|
|
@@ -4510,10 +4490,12 @@
|
|
|
4510
4490
|
const Header = UniBlock(({ className, bgColor = 'bg-white', logo: customLogo, version = BG_COLOR_TO_BLOCK_VERSION[bgColor], portal, ...rest }) => {
|
|
4511
4491
|
const sitemap = rest.options?.page?.sitemap ?? {};
|
|
4512
4492
|
const { topItems, logo } = sitemap;
|
|
4493
|
+
const { dataFooter, ...logoProps } = logo ?? {};
|
|
4513
4494
|
const [, activeTopItem] = useActiveRoute(topItems);
|
|
4514
4495
|
const { internetBankUrl } = portal || {};
|
|
4515
|
-
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: [jsxs("div", { className: "flex items-center", children: [jsx(Logo, { className: "mr-3xl", bgColor: bgColor, logo: customLogo ??
|
|
4496
|
+
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: [jsxs("div", { className: "flex items-center", children: [jsx(Logo, { className: "mr-3xl", bgColor: bgColor, logo: customLogo ?? logoProps, data: dataFooter }), topItems?.filter(isVisibleItem).map((_, i) => (jsx(TopItem, { active: _ === activeTopItem, data: _.dataHeader, ..._ }, String(i)))), jsx(HeaderSecondaryMenu, { version: version, className: "ml-auto", ...sitemap })] }), jsx("div", { className: style('mt-xl h-px bg-main-divider', getVersionStyle(version)) }), activeTopItem?.items?.length ? (jsx(HeaderSubMenu, { subItems: activeTopItem.items, version: version, internetBankUrl: internetBankUrl })) : null] }) }));
|
|
4516
4497
|
});
|
|
4498
|
+
const getVersionStyle = (version) => (version === 'transparent' ? 'opacity-30' : '');
|
|
4517
4499
|
|
|
4518
4500
|
const getInnerPadding = (isPadding = false) => isPadding ? {} : { padding: 'p-0' };
|
|
4519
4501
|
|
|
@@ -6205,7 +6187,7 @@
|
|
|
6205
6187
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
6206
6188
|
});
|
|
6207
6189
|
|
|
6208
|
-
const packageVersion = "0.14.
|
|
6190
|
+
const packageVersion = "0.14.302";
|
|
6209
6191
|
|
|
6210
6192
|
exports.Blocks = Blocks;
|
|
6211
6193
|
exports.ContentPage = ContentPage;
|