@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.
Files changed (201) hide show
  1. package/bundle/blocks.schema.json +1 -1
  2. package/bundle/bundle.umd.js +34 -52
  3. package/bundle/bundle.umd.min.js +1 -1
  4. package/bundle/components/Footer/FooterLink.d.ts +1 -0
  5. package/bundle/data/FooterData.d.ts +4 -0
  6. package/bundle/data/SitemapData.d.ts +8 -2
  7. package/bundle/hooks/useAspects/aspects/getAspectsWithInclude.d.ts +2 -0
  8. package/bundle/model/LogoType.d.ts +7 -2
  9. package/bundle/ui-kit/LocationDialog/renderRegion.d.ts +2 -1
  10. package/bundle/ui-kit/LocationDialog/renderRegionGroup.d.ts +2 -1
  11. package/bundle/ui-kit/Logo/Logo.d.ts +2 -0
  12. package/dist/components/Footer/Contacts.js +2 -3
  13. package/dist/components/Footer/Contacts.js.map +1 -1
  14. package/dist/components/Footer/Footer.js +4 -2
  15. package/dist/components/Footer/Footer.js.map +1 -1
  16. package/dist/components/Footer/Footer.mobile.js +3 -3
  17. package/dist/components/Footer/Footer.mobile.js.map +1 -1
  18. package/dist/components/Footer/FooterLink.d.ts +1 -0
  19. package/dist/components/Footer/HorizontalNavigation.js +1 -1
  20. package/dist/components/Footer/HorizontalNavigation.js.map +1 -1
  21. package/dist/components/Footer/SocialMedia.js +5 -1
  22. package/dist/components/Footer/SocialMedia.js.map +1 -1
  23. package/dist/components/Footer/TextInformation.js +1 -1
  24. package/dist/components/Footer/TextInformation.js.map +1 -1
  25. package/dist/components/Header/Header.js +3 -1
  26. package/dist/components/Header/Header.js.map +1 -1
  27. package/dist/components/Header/HeaderSecondaryMenu.js +2 -22
  28. package/dist/components/Header/HeaderSecondaryMenu.js.map +1 -1
  29. package/dist/data/FooterData.d.ts +4 -0
  30. package/dist/data/SitemapData.d.ts +8 -2
  31. package/dist/hooks/useAspects/aspects/getAspectsWithInclude.d.ts +2 -0
  32. package/dist/hooks/useAspects/aspects/getAspectsWithInclude.js +8 -0
  33. package/dist/hooks/useAspects/aspects/getAspectsWithInclude.js.map +1 -0
  34. package/dist/model/LogoType.d.ts +7 -2
  35. package/dist/ui-kit/LocationDialog/LocationDialog.js +1 -1
  36. package/dist/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
  37. package/dist/ui-kit/LocationDialog/renderRegion.d.ts +2 -1
  38. package/dist/ui-kit/LocationDialog/renderRegion.js +6 -15
  39. package/dist/ui-kit/LocationDialog/renderRegion.js.map +1 -1
  40. package/dist/ui-kit/LocationDialog/renderRegionGroup.d.ts +2 -1
  41. package/dist/ui-kit/LocationDialog/renderRegionGroup.js +1 -1
  42. package/dist/ui-kit/LocationDialog/renderRegionGroup.js.map +1 -1
  43. package/dist/ui-kit/Logo/Logo.d.ts +2 -0
  44. package/dist/ui-kit/Logo/Logo.js +1 -1
  45. package/dist/ui-kit/Logo/Logo.js.map +1 -1
  46. package/dist/ui-kit/SearchBar/SearchBar.js +2 -2
  47. package/dist/ui-kit/SearchBar/SearchBar.js.map +1 -1
  48. package/dist/ui-kit/Sitemap/Sitemap.js +1 -1
  49. package/dist/ui-kit/Sitemap/Sitemap.js.map +1 -1
  50. package/lib/common.css +1 -1
  51. package/lib/components/Footer/Contacts.js +2 -3
  52. package/lib/components/Footer/Contacts.js.map +1 -1
  53. package/lib/components/Footer/Footer.js +4 -2
  54. package/lib/components/Footer/Footer.js.map +1 -1
  55. package/lib/components/Footer/Footer.mobile.js +3 -3
  56. package/lib/components/Footer/Footer.mobile.js.map +1 -1
  57. package/lib/components/Footer/FooterLink.d.ts +1 -0
  58. package/lib/components/Footer/HorizontalNavigation.js +1 -1
  59. package/lib/components/Footer/HorizontalNavigation.js.map +1 -1
  60. package/lib/components/Footer/SocialMedia.js +5 -1
  61. package/lib/components/Footer/SocialMedia.js.map +1 -1
  62. package/lib/components/Footer/TextInformation.js +1 -1
  63. package/lib/components/Footer/TextInformation.js.map +1 -1
  64. package/lib/components/Header/Header.js +3 -1
  65. package/lib/components/Header/Header.js.map +1 -1
  66. package/lib/components/Header/HeaderSecondaryMenu.js +2 -22
  67. package/lib/components/Header/HeaderSecondaryMenu.js.map +1 -1
  68. package/lib/data/FooterData.d.ts +4 -0
  69. package/lib/data/SitemapData.d.ts +8 -2
  70. package/lib/hooks/useAspects/aspects/getAspectsWithInclude.d.ts +2 -0
  71. package/lib/hooks/useAspects/aspects/getAspectsWithInclude.js +5 -0
  72. package/lib/hooks/useAspects/aspects/getAspectsWithInclude.js.map +1 -0
  73. package/lib/model/LogoType.d.ts +7 -2
  74. package/lib/ui-kit/LocationDialog/LocationDialog.js +1 -1
  75. package/lib/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
  76. package/lib/ui-kit/LocationDialog/renderRegion.d.ts +2 -1
  77. package/lib/ui-kit/LocationDialog/renderRegion.js +6 -15
  78. package/lib/ui-kit/LocationDialog/renderRegion.js.map +1 -1
  79. package/lib/ui-kit/LocationDialog/renderRegionGroup.d.ts +2 -1
  80. package/lib/ui-kit/LocationDialog/renderRegionGroup.js +1 -1
  81. package/lib/ui-kit/LocationDialog/renderRegionGroup.js.map +1 -1
  82. package/lib/ui-kit/Logo/Logo.d.ts +2 -0
  83. package/lib/ui-kit/Logo/Logo.js +1 -1
  84. package/lib/ui-kit/Logo/Logo.js.map +1 -1
  85. package/lib/ui-kit/SearchBar/SearchBar.js +2 -2
  86. package/lib/ui-kit/SearchBar/SearchBar.js.map +1 -1
  87. package/lib/ui-kit/Sitemap/Sitemap.js +1 -1
  88. package/lib/ui-kit/Sitemap/Sitemap.js.map +1 -1
  89. package/mobile/bundle/bundle.umd.js +24 -25
  90. package/mobile/bundle/bundle.umd.min.js +1 -1
  91. package/mobile/bundle/components/Footer/FooterLink.d.ts +1 -0
  92. package/mobile/bundle/data/FooterData.d.ts +4 -0
  93. package/mobile/bundle/data/SitemapData.d.ts +8 -2
  94. package/mobile/bundle/hooks/useAspects/aspects/getAspectsWithInclude.d.ts +2 -0
  95. package/mobile/bundle/model/LogoType.d.ts +7 -2
  96. package/mobile/bundle/ui-kit/LocationDialog/renderRegion.d.ts +2 -1
  97. package/mobile/bundle/ui-kit/LocationDialog/renderRegionGroup.d.ts +2 -1
  98. package/mobile/bundle/ui-kit/Logo/Logo.d.ts +2 -0
  99. package/mobile/dist/components/Footer/Contacts.js +2 -3
  100. package/mobile/dist/components/Footer/Contacts.js.map +1 -1
  101. package/mobile/dist/components/Footer/Footer.js +3 -3
  102. package/mobile/dist/components/Footer/Footer.js.map +1 -1
  103. package/mobile/dist/components/Footer/FooterLink.d.ts +1 -0
  104. package/mobile/dist/components/Footer/SocialMedia.js +5 -1
  105. package/mobile/dist/components/Footer/SocialMedia.js.map +1 -1
  106. package/mobile/dist/components/Footer/TextInformation.js +1 -1
  107. package/mobile/dist/components/Footer/TextInformation.js.map +1 -1
  108. package/mobile/dist/components/Header/HeaderSecondaryMenu.js +2 -22
  109. package/mobile/dist/components/Header/HeaderSecondaryMenu.js.map +1 -1
  110. package/mobile/dist/data/FooterData.d.ts +4 -0
  111. package/mobile/dist/data/SitemapData.d.ts +8 -2
  112. package/mobile/dist/hooks/useAspects/aspects/getAspectsWithInclude.d.ts +2 -0
  113. package/mobile/dist/hooks/useAspects/aspects/getAspectsWithInclude.js +8 -0
  114. package/mobile/dist/hooks/useAspects/aspects/getAspectsWithInclude.js.map +1 -0
  115. package/mobile/dist/model/LogoType.d.ts +7 -2
  116. package/mobile/dist/ui-kit/LocationDialog/LocationDialog.js +1 -1
  117. package/mobile/dist/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
  118. package/mobile/dist/ui-kit/LocationDialog/renderRegion.d.ts +2 -1
  119. package/mobile/dist/ui-kit/LocationDialog/renderRegion.js +6 -15
  120. package/mobile/dist/ui-kit/LocationDialog/renderRegion.js.map +1 -1
  121. package/mobile/dist/ui-kit/LocationDialog/renderRegionGroup.d.ts +2 -1
  122. package/mobile/dist/ui-kit/LocationDialog/renderRegionGroup.js +1 -1
  123. package/mobile/dist/ui-kit/LocationDialog/renderRegionGroup.js.map +1 -1
  124. package/mobile/dist/ui-kit/Logo/Logo.d.ts +2 -0
  125. package/mobile/dist/ui-kit/Logo/Logo.js +1 -1
  126. package/mobile/dist/ui-kit/Logo/Logo.js.map +1 -1
  127. package/mobile/dist/ui-kit/SearchBar/SearchBar.js +2 -2
  128. package/mobile/dist/ui-kit/SearchBar/SearchBar.js.map +1 -1
  129. package/mobile/dist/ui-kit/Sitemap/Sitemap.js +1 -1
  130. package/mobile/dist/ui-kit/Sitemap/Sitemap.js.map +1 -1
  131. package/mobile/lib/common.css +1 -1
  132. package/mobile/lib/components/Footer/Contacts.js +2 -3
  133. package/mobile/lib/components/Footer/Contacts.js.map +1 -1
  134. package/mobile/lib/components/Footer/Footer.js +3 -3
  135. package/mobile/lib/components/Footer/Footer.js.map +1 -1
  136. package/mobile/lib/components/Footer/FooterLink.d.ts +1 -0
  137. package/mobile/lib/components/Footer/SocialMedia.js +5 -1
  138. package/mobile/lib/components/Footer/SocialMedia.js.map +1 -1
  139. package/mobile/lib/components/Footer/TextInformation.js +1 -1
  140. package/mobile/lib/components/Footer/TextInformation.js.map +1 -1
  141. package/mobile/lib/components/Header/HeaderSecondaryMenu.js +2 -22
  142. package/mobile/lib/components/Header/HeaderSecondaryMenu.js.map +1 -1
  143. package/mobile/lib/data/FooterData.d.ts +4 -0
  144. package/mobile/lib/data/SitemapData.d.ts +8 -2
  145. package/mobile/lib/hooks/useAspects/aspects/getAspectsWithInclude.d.ts +2 -0
  146. package/mobile/lib/hooks/useAspects/aspects/getAspectsWithInclude.js +5 -0
  147. package/mobile/lib/hooks/useAspects/aspects/getAspectsWithInclude.js.map +1 -0
  148. package/mobile/lib/model/LogoType.d.ts +7 -2
  149. package/mobile/lib/ui-kit/LocationDialog/LocationDialog.js +1 -1
  150. package/mobile/lib/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
  151. package/mobile/lib/ui-kit/LocationDialog/renderRegion.d.ts +2 -1
  152. package/mobile/lib/ui-kit/LocationDialog/renderRegion.js +6 -15
  153. package/mobile/lib/ui-kit/LocationDialog/renderRegion.js.map +1 -1
  154. package/mobile/lib/ui-kit/LocationDialog/renderRegionGroup.d.ts +2 -1
  155. package/mobile/lib/ui-kit/LocationDialog/renderRegionGroup.js +1 -1
  156. package/mobile/lib/ui-kit/LocationDialog/renderRegionGroup.js.map +1 -1
  157. package/mobile/lib/ui-kit/Logo/Logo.d.ts +2 -0
  158. package/mobile/lib/ui-kit/Logo/Logo.js +1 -1
  159. package/mobile/lib/ui-kit/Logo/Logo.js.map +1 -1
  160. package/mobile/lib/ui-kit/SearchBar/SearchBar.js +2 -2
  161. package/mobile/lib/ui-kit/SearchBar/SearchBar.js.map +1 -1
  162. package/mobile/lib/ui-kit/Sitemap/Sitemap.js +1 -1
  163. package/mobile/lib/ui-kit/Sitemap/Sitemap.js.map +1 -1
  164. package/mobile/src/components/ApplicationForm/ApplicationForm.ui.json +7 -0
  165. package/mobile/src/components/Footer/Contacts.tsx +4 -15
  166. package/mobile/src/components/Footer/Footer.tsx +6 -5
  167. package/mobile/src/components/Footer/FooterLink.ts +1 -0
  168. package/mobile/src/components/Footer/SocialMedia.tsx +7 -1
  169. package/mobile/src/components/Footer/TextInformation.tsx +2 -2
  170. package/mobile/src/components/Header/HeaderSecondaryMenu.tsx +3 -24
  171. package/mobile/src/data/FooterData.ts +4 -0
  172. package/mobile/src/data/SitemapData.ts +6 -2
  173. package/mobile/src/hooks/useAspects/aspects/getAspectsWithInclude.tsx +8 -0
  174. package/mobile/src/model/LogoType.ts +8 -2
  175. package/mobile/src/ui-kit/LocationDialog/LocationDialog.tsx +4 -2
  176. package/mobile/src/ui-kit/LocationDialog/renderRegion.tsx +22 -30
  177. package/mobile/src/ui-kit/LocationDialog/renderRegionGroup.tsx +3 -2
  178. package/mobile/src/ui-kit/Logo/Logo.tsx +4 -1
  179. package/mobile/src/ui-kit/SearchBar/SearchBar.tsx +6 -2
  180. package/mobile/src/ui-kit/Sitemap/Sitemap.tsx +1 -1
  181. package/package.json +1 -1
  182. package/src/components/ApplicationForm/ApplicationForm.ui.json +7 -0
  183. package/src/components/Footer/Contacts.tsx +4 -15
  184. package/src/components/Footer/Footer.mobile.tsx +6 -5
  185. package/src/components/Footer/Footer.tsx +35 -14
  186. package/src/components/Footer/FooterLink.ts +1 -0
  187. package/src/components/Footer/HorizontalNavigation.tsx +1 -1
  188. package/src/components/Footer/SocialMedia.tsx +7 -1
  189. package/src/components/Footer/TextInformation.tsx +2 -2
  190. package/src/components/Header/Header.tsx +10 -7
  191. package/src/components/Header/HeaderSecondaryMenu.tsx +3 -24
  192. package/src/data/FooterData.ts +4 -0
  193. package/src/data/SitemapData.ts +6 -2
  194. package/src/hooks/useAspects/aspects/getAspectsWithInclude.tsx +8 -0
  195. package/src/model/LogoType.ts +8 -2
  196. package/src/ui-kit/LocationDialog/LocationDialog.tsx +4 -2
  197. package/src/ui-kit/LocationDialog/renderRegion.tsx +22 -30
  198. package/src/ui-kit/LocationDialog/renderRegionGroup.tsx +3 -2
  199. package/src/ui-kit/Logo/Logo.tsx +4 -1
  200. package/src/ui-kit/SearchBar/SearchBar.tsx +6 -2
  201. 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 { documents, relatedEnterprises, contacts, socialMedia, mobileApps } = footer ?? {};
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={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
- <LinkButton
43
- version="link"
44
- href="https://old.rshb.ru"
45
- className="!text-left text-s font-light"
46
- onClick={handleOnClick}
47
- >
48
- Вернуться на прежнюю версию сайта
49
- </LinkButton>
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
  });
@@ -3,4 +3,5 @@ import { type LinkProps } from '../../model/LinkProps';
3
3
  export interface FooterLink {
4
4
  className?: string;
5
5
  links?: LinkProps[];
6
+ license?: string;
6
7
  }
@@ -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 ? 'flex-1 justify-center' : '',
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АО \u00ABРоссельхозбанк\u00BB Генеральная лицензия Банка России \u2116\u00A03349 от\u00A012.08.2015\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 className="mr-3xl" bgColor={bgColor} logo={customLogo ?? 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
  );
@@ -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
  }
@@ -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[];
@@ -1,8 +1,14 @@
1
1
  import { type ImageContent } from '../ui-kit/Img/ImgProps';
2
- import { type AspectsProps } from './AspectsProps';
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 & TitleProps & AspectsProps;
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(renderRegionGroup(handleChangeLocation))}
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 MINDBOX_ASPECT = 'mindboxEvent';
6
- const MINDBOX_CATEGORY = 'header';
7
- const MINDBOX_EVENT_REGION_NEW_CLICK = 'headerRegionNewSelect';
8
-
9
- export const renderRegion = (onChangeLocation?: (region: Region) => void) => (region: Region) =>
10
- 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={[
20
- {
21
- aspectName: MINDBOX_ASPECT,
22
- params: {
23
- eventAction: MINDBOX_EVENT_REGION_NEW_CLICK,
24
- eventCategory: MINDBOX_CATEGORY,
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
  );
@@ -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(logo?.data)}
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 value={value} onChange={handleInitialInputChange} />
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}