@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
|
@@ -19,39 +19,60 @@ const LEFT_COL_WIDTH = 'w-52';
|
|
|
19
19
|
export const Footer = UniBlock<FooterProps>(({ className, footer, ...rest }) => {
|
|
20
20
|
const sitemap = rest.options?.page?.sitemap ?? {};
|
|
21
21
|
const { logo } = sitemap;
|
|
22
|
-
const {
|
|
22
|
+
const { dataFooter, ...logoProps } = logo ?? {};
|
|
23
|
+
const {
|
|
24
|
+
documents,
|
|
25
|
+
relatedEnterprises,
|
|
26
|
+
contacts,
|
|
27
|
+
socialMedia,
|
|
28
|
+
mobileApps,
|
|
29
|
+
feedbackButton,
|
|
30
|
+
isOldVersionButton,
|
|
31
|
+
license,
|
|
32
|
+
otherLinks = [],
|
|
33
|
+
} = footer ?? {};
|
|
23
34
|
|
|
24
35
|
const handleOnClick = useCallback(() => {
|
|
25
36
|
const [name, oldValue, newValue] = COOKIE_REPLACE;
|
|
26
37
|
mapCookie(name, (value) => value?.replace(oldValue, newValue));
|
|
27
38
|
}, []);
|
|
28
39
|
|
|
40
|
+
const linkStyle = '!text-left text-s font-light';
|
|
41
|
+
|
|
29
42
|
return (
|
|
30
43
|
<BlockWrapper tag="footer" className={className} {...rest}>
|
|
31
|
-
<div className="flex items-stretch gap-3xl pb-3xl
|
|
32
|
-
<Logo className={LEFT_COL_WIDTH} logo={
|
|
44
|
+
<div className="flex items-stretch gap-3xl pb-3xl">
|
|
45
|
+
<Logo className={LEFT_COL_WIDTH} logo={logoProps} data={dataFooter} />
|
|
33
46
|
<SearchBar className="grow" {...sitemap} />
|
|
34
47
|
</div>
|
|
35
|
-
<div className="flex items-stretch gap-6xl">
|
|
48
|
+
<div className="flex items-center @lg:items-stretch gap-6xl flex-col @lg:flex-row">
|
|
36
49
|
<div className={style(LEFT_COL_WIDTH, 'flex flex-col shrink-0 overflow-hidden space-y-xl')}>
|
|
37
50
|
<Contacts items={contacts} />
|
|
51
|
+
{feedbackButton ? <LinkButton className="w-full mt-xs" {...feedbackButton} /> : null}
|
|
38
52
|
<SocialMedia media={socialMedia}>Соцсети</SocialMedia>
|
|
39
53
|
<SocialMedia media={mobileApps} showButtonText={false}>
|
|
40
54
|
Мобильное приложение
|
|
41
55
|
</SocialMedia>
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
56
|
+
{isOldVersionButton ? (
|
|
57
|
+
<LinkButton
|
|
58
|
+
version="link"
|
|
59
|
+
href="https://old.rshb.ru"
|
|
60
|
+
className={linkStyle}
|
|
61
|
+
onClick={handleOnClick}
|
|
62
|
+
>
|
|
63
|
+
Вернуться на прежнюю версию сайта
|
|
64
|
+
</LinkButton>
|
|
65
|
+
) : null}
|
|
66
|
+
{otherLinks.map((_, i) => (
|
|
67
|
+
<LinkButton key={String(i)} className={linkStyle} version="link" {..._}>
|
|
68
|
+
{_?.text}
|
|
69
|
+
</LinkButton>
|
|
70
|
+
))}
|
|
50
71
|
</div>
|
|
51
|
-
<Sitemap className="flex-grow" {...sitemap} />
|
|
72
|
+
<Sitemap className="flex-grow flex-wrap" {...sitemap} />
|
|
52
73
|
</div>
|
|
53
74
|
<HorizontalNavigation className="mt-xl" links={relatedEnterprises} />
|
|
54
|
-
<TextInformation links={documents} />
|
|
75
|
+
<TextInformation links={documents} license={license} />
|
|
55
76
|
</BlockWrapper>
|
|
56
77
|
);
|
|
57
78
|
});
|
|
@@ -8,7 +8,7 @@ export interface HorizontalNavigationProps extends FooterLink, TitleProps {}
|
|
|
8
8
|
export const HorizontalNavigation = JSX<HorizontalNavigationProps>(({ className = '', links }) => (
|
|
9
9
|
<div className={className}>
|
|
10
10
|
{links?.length ? (
|
|
11
|
-
<div className="flex justify-between items-center gap-lg py-lg border-solid border-x-0 border-y border-y-main-divider">
|
|
11
|
+
<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">
|
|
12
12
|
{links.map((_, i) => (
|
|
13
13
|
<HorizontalNavigationLink
|
|
14
14
|
key={String(i)}
|
|
@@ -18,6 +18,10 @@ export interface SocialMediaProps {
|
|
|
18
18
|
|
|
19
19
|
export const SocialMedia = JSX<SocialMediaProps>(
|
|
20
20
|
({ className = '', media, showButtonText, stretched, version = 'white', children }) => {
|
|
21
|
+
if (!media?.length) {
|
|
22
|
+
return null;
|
|
23
|
+
}
|
|
24
|
+
|
|
21
25
|
const [hasText, setHasText] = useState<boolean | undefined>();
|
|
22
26
|
const buttons: LinkButtonContent[] | undefined = media?.map((_) => {
|
|
23
27
|
const { href, icon, text } = _;
|
|
@@ -40,7 +44,7 @@ export const SocialMedia = JSX<SocialMediaProps>(
|
|
|
40
44
|
const buttonClassName = style(
|
|
41
45
|
'border border-solid hover:border-transparent group-data-primary:border-main-divider border-main-divider group-data-gray:border-green group/media',
|
|
42
46
|
showButtonText && hasText ? '' : 'basis-auto',
|
|
43
|
-
stretched
|
|
47
|
+
getStretchedStyle(stretched),
|
|
44
48
|
);
|
|
45
49
|
|
|
46
50
|
return (
|
|
@@ -60,3 +64,5 @@ export const SocialMedia = JSX<SocialMediaProps>(
|
|
|
60
64
|
);
|
|
61
65
|
},
|
|
62
66
|
);
|
|
67
|
+
|
|
68
|
+
const getStretchedStyle = (stretched?: boolean) => (stretched ? 'flex-1 justify-center' : '');
|
|
@@ -4,11 +4,11 @@ import { style } from '../../utils/style';
|
|
|
4
4
|
import { type FooterLink } from './FooterLink';
|
|
5
5
|
import { TextInformationLink } from './TextInformationLink';
|
|
6
6
|
|
|
7
|
-
export const TextInformation = JSX<FooterLink>(({ className = '', links }) => (
|
|
7
|
+
export const TextInformation = JSX<FooterLink>(({ className = '', links, license }) => (
|
|
8
8
|
<div className={style('@container', className)}>
|
|
9
9
|
<div className="pt-lg">
|
|
10
10
|
<Text size="text-xs" font="font-light" color="text-secondary-text">
|
|
11
|
-
{`\u00a9\u00A02000-${new Date().getFullYear()}\u00A0
|
|
11
|
+
{`\u00a9\u00A02000-${new Date().getFullYear()}\u00A0${license}`}
|
|
12
12
|
</Text>
|
|
13
13
|
</div>
|
|
14
14
|
{links?.length ? (
|
|
@@ -27,6 +27,7 @@ export const Header = UniBlock<HeaderProps>(
|
|
|
27
27
|
}) => {
|
|
28
28
|
const sitemap = rest.options?.page?.sitemap ?? {};
|
|
29
29
|
const { topItems, logo } = sitemap;
|
|
30
|
+
const { dataFooter, ...logoProps } = logo ?? {};
|
|
30
31
|
const [, activeTopItem] = useActiveRoute(topItems);
|
|
31
32
|
const { internetBankUrl } = portal || {};
|
|
32
33
|
|
|
@@ -44,18 +45,18 @@ export const Header = UniBlock<HeaderProps>(
|
|
|
44
45
|
>
|
|
45
46
|
<div className="container">
|
|
46
47
|
<div className="flex items-center">
|
|
47
|
-
<Logo
|
|
48
|
+
<Logo
|
|
49
|
+
className="mr-3xl"
|
|
50
|
+
bgColor={bgColor}
|
|
51
|
+
logo={customLogo ?? logoProps}
|
|
52
|
+
data={dataFooter}
|
|
53
|
+
/>
|
|
48
54
|
{topItems?.filter(isVisibleItem).map((_, i) => (
|
|
49
55
|
<TopItem key={String(i)} active={_ === activeTopItem} data={_.dataHeader} {..._} />
|
|
50
56
|
))}
|
|
51
57
|
<HeaderSecondaryMenu version={version} className="ml-auto" {...sitemap} />
|
|
52
58
|
</div>
|
|
53
|
-
<div
|
|
54
|
-
className={style(
|
|
55
|
-
'mt-xl h-px bg-main-divider',
|
|
56
|
-
version === 'transparent' ? 'opacity-30' : '',
|
|
57
|
-
)}
|
|
58
|
-
/>
|
|
59
|
+
<div className={style('mt-xl h-px bg-main-divider', getVersionStyle(version))} />
|
|
59
60
|
{activeTopItem?.items?.length ? (
|
|
60
61
|
<HeaderSubMenu
|
|
61
62
|
subItems={activeTopItem.items}
|
|
@@ -68,3 +69,5 @@ export const Header = UniBlock<HeaderProps>(
|
|
|
68
69
|
);
|
|
69
70
|
},
|
|
70
71
|
);
|
|
72
|
+
|
|
73
|
+
const getVersionStyle = (version: BlockVersion) => (version === 'transparent' ? 'opacity-30' : '');
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
2
|
import { useCallback } from '@redneckz/uni-jsx/lib/hooks';
|
|
3
3
|
import { type SitemapData } from '../../data/SitemapData';
|
|
4
|
+
import { getAspectsWithInclude } from '../../hooks/useAspects/aspects/getAspectsWithInclude';
|
|
4
5
|
import { useLocation } from '../../hooks/useLocation';
|
|
5
6
|
import { type BlockVersion } from '../../model/BlockVersion';
|
|
6
7
|
import { type IconVersion } from '../../model/IconVersion';
|
|
@@ -10,11 +11,6 @@ import { TopItem } from '../../ui-kit/TopItem/TopItem';
|
|
|
10
11
|
import { style } from '../../utils/style';
|
|
11
12
|
import { HeaderSecondaryMenuButton } from './HeaderSecondaryMenuButton';
|
|
12
13
|
|
|
13
|
-
const MINDBOX_ASPECT = 'mindboxEvent';
|
|
14
|
-
const MINDBOX_CATEGORY = 'header';
|
|
15
|
-
const MINDBOX_EVENT_REGION_CLICK = 'headerRegionClick';
|
|
16
|
-
const MINDBOX_EVENT_SEARCH_CLICK = 'headerSearchClick';
|
|
17
|
-
|
|
18
14
|
interface HeaderSecondaryMenuContent extends SitemapData {
|
|
19
15
|
version?: BlockVersion;
|
|
20
16
|
}
|
|
@@ -42,16 +38,7 @@ export const HeaderSecondaryMenu = JSX<HeaderSecondaryMenuProps>(
|
|
|
42
38
|
flat={true}
|
|
43
39
|
href="#"
|
|
44
40
|
text={currentLocation?.name}
|
|
45
|
-
data={
|
|
46
|
-
{
|
|
47
|
-
aspectName: MINDBOX_ASPECT,
|
|
48
|
-
params: {
|
|
49
|
-
eventAction: MINDBOX_EVENT_REGION_CLICK,
|
|
50
|
-
eventCategory: MINDBOX_CATEGORY,
|
|
51
|
-
eventValueText: currentLocation?.name ?? '',
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
]}
|
|
41
|
+
data={getAspectsWithInclude(rest?.branches?.dataClick, currentLocation?.name ?? '')}
|
|
55
42
|
onClick={openLocationDialog}
|
|
56
43
|
/>
|
|
57
44
|
) : null}
|
|
@@ -60,15 +47,7 @@ export const HeaderSecondaryMenu = JSX<HeaderSecondaryMenuProps>(
|
|
|
60
47
|
image={{ icon: 'LoupeIcon', iconVersion }}
|
|
61
48
|
ariaLabel="Поиск"
|
|
62
49
|
onClick={openSearchDialog}
|
|
63
|
-
data={
|
|
64
|
-
{
|
|
65
|
-
aspectName: MINDBOX_ASPECT,
|
|
66
|
-
params: {
|
|
67
|
-
eventAction: MINDBOX_EVENT_SEARCH_CLICK,
|
|
68
|
-
eventCategory: MINDBOX_CATEGORY,
|
|
69
|
-
},
|
|
70
|
-
},
|
|
71
|
-
]}
|
|
50
|
+
data={rest?.search?.data}
|
|
72
51
|
/>
|
|
73
52
|
</div>
|
|
74
53
|
);
|
package/src/data/FooterData.ts
CHANGED
|
@@ -34,5 +34,9 @@ export interface FooterData {
|
|
|
34
34
|
contacts?: ContactGroup[];
|
|
35
35
|
socialMedia?: LinkButtonContent[];
|
|
36
36
|
mobileApps?: LinkButtonContent[];
|
|
37
|
+
feedbackButton?: LinkButtonContent;
|
|
38
|
+
otherLinks?: LinkProps[];
|
|
39
|
+
isOldVersionButton?: boolean;
|
|
40
|
+
license?: string;
|
|
37
41
|
horizontalNavigationTitle?: string; // TODO: для мобильной версии
|
|
38
42
|
}
|
package/src/data/SitemapData.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type AspectsDef } from '../model/AspectsProps';
|
|
1
|
+
import { type AspectsDef, type AspectsProps } from '../model/AspectsProps';
|
|
2
2
|
import { type LinkProps } from '../model/LinkProps';
|
|
3
3
|
import { type LogoType } from '../model/LogoType';
|
|
4
4
|
import { type IconProps, type Picture } from '../model/Picture';
|
|
@@ -6,7 +6,6 @@ import { type IconProps, type Picture } from '../model/Picture';
|
|
|
6
6
|
export interface SitemapLinkProps extends LinkProps {
|
|
7
7
|
displayArea?: string;
|
|
8
8
|
dataHeader?: AspectsDef[];
|
|
9
|
-
dataFooter?: AspectsDef[];
|
|
10
9
|
}
|
|
11
10
|
|
|
12
11
|
/**
|
|
@@ -47,6 +46,10 @@ export type BranchesSitemap = {
|
|
|
47
46
|
default?: string;
|
|
48
47
|
/** @title Отображать выбор филиалов */
|
|
49
48
|
visible?: boolean;
|
|
49
|
+
/** @title Дополнительные атрибуты для слика по региону*/
|
|
50
|
+
dataClick?: AspectsDef[];
|
|
51
|
+
/** @title Дополнительные атрибуты для выбора региона*/
|
|
52
|
+
dataSelect?: AspectsDef[];
|
|
50
53
|
};
|
|
51
54
|
|
|
52
55
|
export interface SitemapData {
|
|
@@ -56,4 +59,5 @@ export interface SitemapData {
|
|
|
56
59
|
foreignOffices?: ForeignOfficeProps[];
|
|
57
60
|
branches?: BranchesSitemap;
|
|
58
61
|
officesAtms?: LinkProps;
|
|
62
|
+
search?: AspectsProps & { placeholder: string };
|
|
59
63
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type AspectsDef } from '../../../model/AspectsProps';
|
|
2
|
+
import { type AspectsAttribute } from '../useAspects';
|
|
3
|
+
|
|
4
|
+
export const getAspectsWithInclude = (data?: AspectsDef[], include?: string): AspectsDef[] =>
|
|
5
|
+
data?.map(({ aspectName, params }: AspectsAttribute) => ({
|
|
6
|
+
aspectName,
|
|
7
|
+
params: aspectName === 'mindboxEvent' ? { ...params, eventValueText: include } : params,
|
|
8
|
+
})) as AspectsDef[];
|
package/src/model/LogoType.ts
CHANGED
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import { type ImageContent } from '../ui-kit/Img/ImgProps';
|
|
2
|
-
import { type
|
|
2
|
+
import { type AspectsDef } from './AspectsProps';
|
|
3
3
|
import { type TitleProps } from './HeadlineType';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* @title Логотип
|
|
7
7
|
*/
|
|
8
|
-
export type LogoType = ImageContent &
|
|
8
|
+
export type LogoType = ImageContent &
|
|
9
|
+
TitleProps & {
|
|
10
|
+
/** @title Дополнительные атрибуты для шапки */
|
|
11
|
+
dataHeader?: AspectsDef[];
|
|
12
|
+
/** @title Дополнительные атрибуты для подвала */
|
|
13
|
+
dataFooter?: AspectsDef[];
|
|
14
|
+
};
|
|
@@ -72,11 +72,13 @@ export const LocationDialog = JSX<LocationDialogProps>(({ foreignOffices, branch
|
|
|
72
72
|
({ name }) =>
|
|
73
73
|
name && jaroWinklerDistance(name.toLowerCase())(query.toLowerCase()) >= 0.8,
|
|
74
74
|
)
|
|
75
|
-
.map(renderRegion(handleChangeLocation))}
|
|
75
|
+
.map(renderRegion(branches?.dataSelect, handleChangeLocation))}
|
|
76
76
|
</div>
|
|
77
77
|
) : (
|
|
78
78
|
<div className="columns-1 sm:columns-5">
|
|
79
|
-
{Array.from(regionsGroupByLetter.entries()).map(
|
|
79
|
+
{Array.from(regionsGroupByLetter.entries()).map(
|
|
80
|
+
renderRegionGroup(handleChangeLocation, branches?.dataSelect),
|
|
81
|
+
)}
|
|
80
82
|
</div>
|
|
81
83
|
)}
|
|
82
84
|
{renderForeignOffices(foreignOffices)}
|
|
@@ -1,34 +1,26 @@
|
|
|
1
|
+
import { getAspectsWithInclude } from '../../hooks/useAspects/aspects/getAspectsWithInclude';
|
|
1
2
|
import { type Region } from '../../hooks/useRegions';
|
|
3
|
+
import { type AspectsDef } from '../../model/AspectsProps';
|
|
2
4
|
import { LinkWrapper } from '../LinkWrapper/LinkWrapper';
|
|
3
5
|
import { Text } from '../Text/Text';
|
|
4
6
|
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
eventValueText: region.name,
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
]}
|
|
29
|
-
>
|
|
30
|
-
<Text size="text-l" font="font-light">
|
|
31
|
-
{region.name}
|
|
32
|
-
</Text>
|
|
33
|
-
</LinkWrapper>
|
|
34
|
-
) : null;
|
|
7
|
+
export const renderRegion =
|
|
8
|
+
(data: AspectsDef[] | undefined, onChangeLocation?: (region: Region) => void) =>
|
|
9
|
+
(region: Region) => {
|
|
10
|
+
return region.name ? (
|
|
11
|
+
<LinkWrapper
|
|
12
|
+
key={String(region.id)}
|
|
13
|
+
isRemote
|
|
14
|
+
href={`/branches/${region.slug}`}
|
|
15
|
+
className="mb-xs sm:mb-2xs hover:text-primary-hover"
|
|
16
|
+
onClick={() => {
|
|
17
|
+
onChangeLocation && onChangeLocation(region);
|
|
18
|
+
}}
|
|
19
|
+
data={getAspectsWithInclude(data, region.name)}
|
|
20
|
+
>
|
|
21
|
+
<Text size="text-l" font="font-light">
|
|
22
|
+
{region.name}
|
|
23
|
+
</Text>
|
|
24
|
+
</LinkWrapper>
|
|
25
|
+
) : null;
|
|
26
|
+
};
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { type Region } from '../../hooks/useRegions';
|
|
2
|
+
import { type AspectsDef } from '../../model/AspectsProps';
|
|
2
3
|
import { Text } from '../Text/Text';
|
|
3
4
|
import { renderRegion } from './renderRegion';
|
|
4
5
|
|
|
5
6
|
export const renderRegionGroup =
|
|
6
|
-
(onChangeLocation?: (region: Region) => void) =>
|
|
7
|
+
(onChangeLocation?: (region: Region) => void, data?: AspectsDef[]) =>
|
|
7
8
|
([letter, regions]: [string, Region[]]) =>
|
|
8
9
|
(
|
|
9
10
|
<div key={letter} className="break-inside-avoid mb-2xl w-56">
|
|
10
11
|
<div className="mb-s">
|
|
11
12
|
<Text size="text-h6">{letter}</Text>
|
|
12
13
|
</div>
|
|
13
|
-
{regions.map(renderRegion(onChangeLocation))}
|
|
14
|
+
{regions.map(renderRegion(data, onChangeLocation))}
|
|
14
15
|
</div>
|
|
15
16
|
);
|
package/src/ui-kit/Logo/Logo.tsx
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import { type AspectsDef } from '../../model/AspectsProps';
|
|
2
3
|
import { type BgColorVersion } from '../../model/BgColorVersion';
|
|
3
4
|
import { type LogoType } from '../../model/LogoType';
|
|
4
5
|
import { getAspectsAttributes } from '../../utils/dataAttributes';
|
|
@@ -16,6 +17,7 @@ export interface LogoProps {
|
|
|
16
17
|
bgColor?: string;
|
|
17
18
|
showTitle?: boolean;
|
|
18
19
|
logo?: LogoType;
|
|
20
|
+
data?: AspectsDef[];
|
|
19
21
|
}
|
|
20
22
|
|
|
21
23
|
const TEXT_COLOR: Record<BgColorVersion, TextColor> = {
|
|
@@ -32,6 +34,7 @@ export const Logo = JSX<Partial<LogoProps>>(
|
|
|
32
34
|
targetBlank,
|
|
33
35
|
bgColor = 'bg-white',
|
|
34
36
|
showTitle = true,
|
|
37
|
+
data,
|
|
35
38
|
}) => (
|
|
36
39
|
<a
|
|
37
40
|
className={style('inline-flex items-center font-sans no-underline', className)}
|
|
@@ -39,7 +42,7 @@ export const Logo = JSX<Partial<LogoProps>>(
|
|
|
39
42
|
target={targetBlank ? '_blank' : '_self'}
|
|
40
43
|
aria-label={logo?.title ?? 'Россельхозбанк'}
|
|
41
44
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
42
|
-
{...getAspectsAttributes(
|
|
45
|
+
{...getAspectsAttributes(data)}
|
|
43
46
|
>
|
|
44
47
|
{renderImage(bgColor, logo?.image, ICON_SIZE)}
|
|
45
48
|
{showTitle
|
|
@@ -12,7 +12,7 @@ interface SearchBarProps extends SitemapData {
|
|
|
12
12
|
|
|
13
13
|
const MIN_QUERY_LEN = 3;
|
|
14
14
|
|
|
15
|
-
export const SearchBar = JSX<SearchBarProps>(({ className, ...rest }) => {
|
|
15
|
+
export const SearchBar = JSX<SearchBarProps>(({ className, search, ...rest }) => {
|
|
16
16
|
const [value, setValue] = useState('');
|
|
17
17
|
|
|
18
18
|
const resetQueryOnDialogClose = useCallback(() => setValue(''), []);
|
|
@@ -30,7 +30,11 @@ export const SearchBar = JSX<SearchBarProps>(({ className, ...rest }) => {
|
|
|
30
30
|
|
|
31
31
|
return (
|
|
32
32
|
<div className={style('relative', className)} role="search">
|
|
33
|
-
<SearchInput
|
|
33
|
+
<SearchInput
|
|
34
|
+
value={value}
|
|
35
|
+
placeholder={search?.placeholder}
|
|
36
|
+
onChange={handleInitialInputChange}
|
|
37
|
+
/>
|
|
34
38
|
<CloseButton className="absolute top-0 right-0 sm:hidden" onClose={resetQueryOnDialogClose} />
|
|
35
39
|
</div>
|
|
36
40
|
);
|
|
@@ -29,7 +29,7 @@ const renderColumn = (menuItem: TopMenuItemProps & { onClick: () => void }, inde
|
|
|
29
29
|
const visibleSubItems = items.filter(isVisibleItem);
|
|
30
30
|
|
|
31
31
|
return (
|
|
32
|
-
<div key={String(index)} className="flex flex-col gap-s w-1/4">
|
|
32
|
+
<div key={String(index)} className="flex flex-col gap-s @sm:w-full @md:w-1/4">
|
|
33
33
|
<a
|
|
34
34
|
className="leading-5 text-l text-primary-text hover:text-primary-main no-underline"
|
|
35
35
|
href={href}
|