@redneckz/wildless-cms-uni-blocks 0.14.1 → 0.14.2

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 (121) hide show
  1. package/bundle/bundle.umd.js +11 -11
  2. package/bundle/bundle.umd.min.js +1 -1
  3. package/bundle/components/MobileAppTile/MobileAppTileContent.d.ts +1 -1
  4. package/dist/components/CarouselLinks/CarouselLinkButton.js +2 -2
  5. package/dist/components/CarouselLinks/CarouselLinkButton.js.map +1 -1
  6. package/dist/components/Header/HeaderSubMenu.js +2 -1
  7. package/dist/components/Header/HeaderSubMenu.js.map +1 -1
  8. package/dist/components/MobileAppTile/MobileAppTile.js +3 -2
  9. package/dist/components/MobileAppTile/MobileAppTile.js.map +1 -1
  10. package/dist/components/MobileAppTile/MobileAppTileContent.d.ts +1 -1
  11. package/dist/ui-kit/InnerTable/renderInnerTableRow.js +1 -1
  12. package/dist/ui-kit/InnerTable/renderInnerTableRow.js.map +1 -1
  13. package/dist/ui-kit/Sitemap/Sitemap.js +4 -4
  14. package/dist/ui-kit/Sitemap/Sitemap.js.map +1 -1
  15. package/lib/common.css +1 -1
  16. package/lib/components/CarouselLinks/CarouselLinkButton.js +2 -2
  17. package/lib/components/CarouselLinks/CarouselLinkButton.js.map +1 -1
  18. package/lib/components/Header/HeaderSubMenu.js +2 -1
  19. package/lib/components/Header/HeaderSubMenu.js.map +1 -1
  20. package/lib/components/MobileAppTile/MobileAppTile.js +3 -2
  21. package/lib/components/MobileAppTile/MobileAppTile.js.map +1 -1
  22. package/lib/components/MobileAppTile/MobileAppTileContent.d.ts +1 -1
  23. package/lib/ui-kit/InnerTable/renderInnerTableRow.js +1 -1
  24. package/lib/ui-kit/InnerTable/renderInnerTableRow.js.map +1 -1
  25. package/lib/ui-kit/Sitemap/Sitemap.js +4 -4
  26. package/lib/ui-kit/Sitemap/Sitemap.js.map +1 -1
  27. package/mobile/bundle/bundle.umd.js +9 -16
  28. package/mobile/bundle/bundle.umd.min.js +1 -1
  29. package/mobile/bundle/components/MobileAppTile/MobileAppTileContent.d.ts +1 -1
  30. package/mobile/dist/components/CarouselLinks/CarouselLinkButton.js +2 -2
  31. package/mobile/dist/components/CarouselLinks/CarouselLinkButton.js.map +1 -1
  32. package/mobile/dist/components/Header/HeaderSubMenu.js +2 -1
  33. package/mobile/dist/components/Header/HeaderSubMenu.js.map +1 -1
  34. package/mobile/dist/components/MobileAppTile/MobileAppTile.js +3 -2
  35. package/mobile/dist/components/MobileAppTile/MobileAppTile.js.map +1 -1
  36. package/mobile/dist/components/MobileAppTile/MobileAppTileContent.d.ts +1 -1
  37. package/mobile/dist/ui-kit/InnerTable/renderInnerTableRow.js +1 -1
  38. package/mobile/dist/ui-kit/InnerTable/renderInnerTableRow.js.map +1 -1
  39. package/mobile/dist/ui-kit/Sitemap/Sitemap.js +4 -4
  40. package/mobile/dist/ui-kit/Sitemap/Sitemap.js.map +1 -1
  41. package/mobile/lib/common.css +1 -1
  42. package/mobile/lib/components/CarouselLinks/CarouselLinkButton.js +2 -2
  43. package/mobile/lib/components/CarouselLinks/CarouselLinkButton.js.map +1 -1
  44. package/mobile/lib/components/Header/HeaderSubMenu.js +2 -1
  45. package/mobile/lib/components/Header/HeaderSubMenu.js.map +1 -1
  46. package/mobile/lib/components/MobileAppTile/MobileAppTile.js +3 -2
  47. package/mobile/lib/components/MobileAppTile/MobileAppTile.js.map +1 -1
  48. package/mobile/lib/components/MobileAppTile/MobileAppTileContent.d.ts +1 -1
  49. package/mobile/lib/ui-kit/InnerTable/renderInnerTableRow.js +1 -1
  50. package/mobile/lib/ui-kit/InnerTable/renderInnerTableRow.js.map +1 -1
  51. package/mobile/lib/ui-kit/Sitemap/Sitemap.js +4 -4
  52. package/mobile/lib/ui-kit/Sitemap/Sitemap.js.map +1 -1
  53. package/mobile/src/components/CarouselLinks/CarouselLinkButton.tsx +2 -2
  54. package/mobile/src/components/Header/HeaderSubMenu.tsx +6 -1
  55. package/mobile/src/components/MobileAppTile/MobileAppTile.tsx +19 -6
  56. package/mobile/src/components/MobileAppTile/MobileAppTileContent.ts +1 -1
  57. package/mobile/src/ui-kit/InnerTable/renderInnerTableRow.tsx +2 -2
  58. package/mobile/src/ui-kit/Sitemap/Sitemap.tsx +10 -6
  59. package/package.json +1 -1
  60. package/src/components/CarouselLinks/CarouselLinkButton.tsx +2 -2
  61. package/src/components/Header/HeaderSubMenu.tsx +6 -1
  62. package/src/components/MobileAppTile/MobileAppTile.tsx +19 -6
  63. package/src/components/MobileAppTile/MobileAppTileContent.ts +1 -1
  64. package/src/ui-kit/InnerTable/renderInnerTableRow.tsx +2 -2
  65. package/src/ui-kit/Sitemap/Sitemap.tsx +10 -6
  66. package/bundle/components/MobileAppTile/buttonsConditionStyle.d.ts +0 -3
  67. package/bundle/components/MobileAppTile/buttonsConditionStyle.mobile.d.ts +0 -3
  68. package/bundle/components/OfficesAtmsMap/renderCurrentDaySchedule.d.ts +0 -1
  69. package/bundle/components/OfficesAtmsMap/renderDay.d.ts +0 -1
  70. package/dist/components/MobileAppTile/buttonsConditionStyle.d.ts +0 -3
  71. package/dist/components/MobileAppTile/buttonsConditionStyle.js +0 -6
  72. package/dist/components/MobileAppTile/buttonsConditionStyle.js.map +0 -1
  73. package/dist/components/MobileAppTile/buttonsConditionStyle.mobile.d.ts +0 -3
  74. package/dist/components/MobileAppTile/buttonsConditionStyle.mobile.js +0 -13
  75. package/dist/components/MobileAppTile/buttonsConditionStyle.mobile.js.map +0 -1
  76. package/dist/components/OfficesAtmsMap/renderCurrentDaySchedule.d.ts +0 -1
  77. package/dist/components/OfficesAtmsMap/renderCurrentDaySchedule.js +0 -2
  78. package/dist/components/OfficesAtmsMap/renderCurrentDaySchedule.js.map +0 -1
  79. package/dist/components/OfficesAtmsMap/renderDay.d.ts +0 -1
  80. package/dist/components/OfficesAtmsMap/renderDay.js +0 -2
  81. package/dist/components/OfficesAtmsMap/renderDay.js.map +0 -1
  82. package/lib/components/MobileAppTile/buttonsConditionStyle.d.ts +0 -3
  83. package/lib/components/MobileAppTile/buttonsConditionStyle.js +0 -3
  84. package/lib/components/MobileAppTile/buttonsConditionStyle.js.map +0 -1
  85. package/lib/components/MobileAppTile/buttonsConditionStyle.mobile.d.ts +0 -2
  86. package/lib/components/MobileAppTile/buttonsConditionStyle.mobile.js +0 -10
  87. package/lib/components/MobileAppTile/buttonsConditionStyle.mobile.js.map +0 -1
  88. package/lib/components/OfficesAtmsMap/renderCurrentDaySchedule.d.ts +0 -1
  89. package/lib/components/OfficesAtmsMap/renderCurrentDaySchedule.js +0 -2
  90. package/lib/components/OfficesAtmsMap/renderCurrentDaySchedule.js.map +0 -1
  91. package/lib/components/OfficesAtmsMap/renderDay.d.ts +0 -1
  92. package/lib/components/OfficesAtmsMap/renderDay.js +0 -2
  93. package/lib/components/OfficesAtmsMap/renderDay.js.map +0 -1
  94. package/mobile/bundle/components/MobileAppTile/buttonsConditionStyle.d.ts +0 -3
  95. package/mobile/bundle/components/OfficesAtmsMap/renderCurrentDaySchedule.d.ts +0 -1
  96. package/mobile/bundle/components/OfficesAtmsMap/renderDay.d.ts +0 -1
  97. package/mobile/dist/components/MobileAppTile/buttonsConditionStyle.d.ts +0 -3
  98. package/mobile/dist/components/MobileAppTile/buttonsConditionStyle.js +0 -13
  99. package/mobile/dist/components/MobileAppTile/buttonsConditionStyle.js.map +0 -1
  100. package/mobile/dist/components/OfficesAtmsMap/renderCurrentDaySchedule.d.ts +0 -1
  101. package/mobile/dist/components/OfficesAtmsMap/renderCurrentDaySchedule.js +0 -2
  102. package/mobile/dist/components/OfficesAtmsMap/renderCurrentDaySchedule.js.map +0 -1
  103. package/mobile/dist/components/OfficesAtmsMap/renderDay.d.ts +0 -1
  104. package/mobile/dist/components/OfficesAtmsMap/renderDay.js +0 -2
  105. package/mobile/dist/components/OfficesAtmsMap/renderDay.js.map +0 -1
  106. package/mobile/lib/components/MobileAppTile/buttonsConditionStyle.d.ts +0 -3
  107. package/mobile/lib/components/MobileAppTile/buttonsConditionStyle.js +0 -10
  108. package/mobile/lib/components/MobileAppTile/buttonsConditionStyle.js.map +0 -1
  109. package/mobile/lib/components/OfficesAtmsMap/renderCurrentDaySchedule.d.ts +0 -1
  110. package/mobile/lib/components/OfficesAtmsMap/renderCurrentDaySchedule.js +0 -2
  111. package/mobile/lib/components/OfficesAtmsMap/renderCurrentDaySchedule.js.map +0 -1
  112. package/mobile/lib/components/OfficesAtmsMap/renderDay.d.ts +0 -1
  113. package/mobile/lib/components/OfficesAtmsMap/renderDay.js +0 -2
  114. package/mobile/lib/components/OfficesAtmsMap/renderDay.js.map +0 -1
  115. package/mobile/src/components/MobileAppTile/buttonsConditionStyle.tsx +0 -12
  116. package/mobile/src/components/OfficesAtmsMap/renderCurrentDaySchedule.tsx +0 -2
  117. package/mobile/src/components/OfficesAtmsMap/renderDay.tsx +0 -2
  118. package/src/components/MobileAppTile/buttonsConditionStyle.mobile.tsx +0 -12
  119. package/src/components/MobileAppTile/buttonsConditionStyle.tsx +0 -5
  120. package/src/components/OfficesAtmsMap/renderCurrentDaySchedule.tsx +0 -2
  121. package/src/components/OfficesAtmsMap/renderDay.tsx +0 -2
@@ -22,6 +22,8 @@ export interface HeaderSubMenuProps {
22
22
  internetBankUrl?: string;
23
23
  }
24
24
 
25
+ const HEADER_AREA_KEY = 'header';
26
+
25
27
  export const HeaderSubMenu = JSX<HeaderSubMenuProps>(
26
28
  ({ subItems = [], version, internetBankUrl }) => {
27
29
  const iconVersion: IconVersion = version === 'transparent' ? 'white' : 'black';
@@ -29,7 +31,10 @@ export const HeaderSubMenu = JSX<HeaderSubMenuProps>(
29
31
  const router = useRouter();
30
32
 
31
33
  const visibleSubItems = useMemo(
32
- () => subItems.filter((item) => !item.displayArea || item.displayArea === 'Header'),
34
+ () =>
35
+ subItems.filter(
36
+ (item) => !item.displayArea || item.displayArea.toLowerCase() === HEADER_AREA_KEY,
37
+ ),
33
38
  [subItems],
34
39
  );
35
40
  const activeSubItem = findActiveSubItem(router)(subItems);
@@ -2,13 +2,13 @@ import { JSX } from '@redneckz/uni-jsx';
2
2
  import type { UniBlockProps } from '../../model/JSXBlock';
3
3
  import { BaseTile } from '../../ui-kit/BaseTile/BaseTile';
4
4
  import { BlockWrapper } from '../../ui-kit/BlockWrapper';
5
+ import { renderButtonsSection } from '../../ui-kit/Button/renderButtonsSection';
5
6
  import { Heading } from '../../ui-kit/Heading/Heading';
6
7
  import { Img } from '../../ui-kit/Img/Img';
7
8
  import { style } from '../../utils/style';
8
9
  import type { MobileAppTileContent } from './MobileAppTileContent';
9
10
  import { renderDescription } from './renderDescription';
10
11
  import { renderList } from './renderList';
11
- import { buttonsConditionStyle } from './buttonsConditionStyle';
12
12
 
13
13
  export interface MobileAppTileProps extends MobileAppTileContent, UniBlockProps {}
14
14
 
@@ -30,6 +30,8 @@ export const MobileAppTile = JSX<MobileAppTileProps>(
30
30
  }) => {
31
31
  const containerStyle = version === 'secondary' ? 'p-m min-w-32' : 'min-w-24';
32
32
 
33
+ const img = image?.src ? <Img className="hidden lg:block" image={image} /> : null;
34
+
33
35
  return (
34
36
  <BlockWrapper
35
37
  className={style('min-h-80', className)}
@@ -50,17 +52,28 @@ export const MobileAppTile = JSX<MobileAppTileProps>(
50
52
  />
51
53
  ) : null
52
54
  }
53
- rightImage={image?.src ? <Img className="hidden lg:block" image={image} /> : null}
54
- buttons={buttonsConditionStyle(buttons)}
55
+ rightImage={img}
56
+ buttons={renderButtonsSection(buttons)}
55
57
  >
56
58
  {renderDescription(description)}
57
- <div className="flex flex-1 flex-wrap gap-m items-center">
59
+ <div
60
+ className={style(
61
+ 'gap-m',
62
+ 'flex flex-1 flex-col',
63
+ 'flex-col items-start @4xl:flex-row @4xl:items-center',
64
+ )}
65
+ >
66
+ {renderList(items, listItemSize)}
58
67
  {qr?.src ? (
59
- <div className={style('flex justify-center bg-white rounded-md', containerStyle)}>
68
+ <div
69
+ className={style(
70
+ 'flex justify-center bg-white rounded-md @4xl:-order-1',
71
+ containerStyle,
72
+ )}
73
+ >
60
74
  <Img className="w-fit" image={qr} />
61
75
  </div>
62
76
  ) : null}
63
- {renderList(items, listItemSize)}
64
77
  {image?.src ? <Img className="lg:hidden" image={image} /> : null}
65
78
  </div>
66
79
  </BaseTile>
@@ -1,10 +1,10 @@
1
1
  import type { HeadlineCommonProps } from '../../model/HeadlineType';
2
2
  import type { UniBlockContent } from '../../model/JSXBlock';
3
3
  import type { Picture } from '../../model/Picture';
4
+ import type { ButtonsSectionContent } from '../../ui-kit/Button/ButtonsSectionContent';
4
5
  import type { HeadingCommonProps } from '../../ui-kit/Heading/HeadingProps';
5
6
  import type { ImageContent } from '../../ui-kit/Img/ImgProps';
6
7
  import type { ListContent } from '../../ui-kit/List/ListContent';
7
- import type { ButtonsSectionContent } from '../../ui-kit/Button/ButtonsSectionContent';
8
8
 
9
9
  /**
10
10
  * @title Мобильное приложение
@@ -1,6 +1,6 @@
1
- import type { RowsData } from './InnerTableProps';
2
1
  import { style } from '../../utils/style';
3
2
  import { getHorizontalShift } from './getHorizontalShift';
3
+ import type { RowsData } from './InnerTableProps';
4
4
 
5
5
  export const renderInnerTableRow =
6
6
  (activeColumnIndex: number) => (rowData: RowsData[], rowIdx: number) => {
@@ -18,7 +18,7 @@ export const renderInnerTableRow =
18
18
  return (
19
19
  <div key={String(rowIdx)} className="flex border-main-divider border-b border-solid h-full">
20
20
  {headerColumn?.data ? (
21
- <div className="text-xl font-light min-w-56 py-lg">{headerColumn.data}</div>
21
+ <div className="text-xl font-light w-56 min-w-56 py-lg">{headerColumn.data}</div>
22
22
  ) : null}
23
23
  <div className="flex flex-grow overflow-hidden">
24
24
  <div
@@ -21,8 +21,14 @@ export const Sitemap = JSX<SitemapProps>(({ className, topItems }) => {
21
21
  );
22
22
  });
23
23
 
24
+ const FOOTER_AREA_KEY = 'footer';
25
+
24
26
  const renderColumn = (menuItem: TopMenuItemProps & { onClick: () => void }, index: number) => {
25
- const { text, items, href, target, onClick } = menuItem;
27
+ const { text, items = [], href, target, onClick } = menuItem;
28
+
29
+ const visibleSubItems = items.filter(
30
+ (_) => !_.displayArea || _.displayArea.toLowerCase() === FOOTER_AREA_KEY,
31
+ );
26
32
 
27
33
  return (
28
34
  <div key={String(index)} className="flex flex-col gap-s w-1/4">
@@ -34,11 +40,9 @@ const renderColumn = (menuItem: TopMenuItemProps & { onClick: () => void }, inde
34
40
  >
35
41
  {text || `Раздел ${index}`}
36
42
  </a>
37
- {items
38
- ?.filter((_) => !_.displayArea || _.displayArea === 'Footer')
39
- .map((_, i) => (
40
- <ColumnItem key={String(i)} {..._} basePath={appendSlash(href)} index={i} />
41
- ))}
43
+ {visibleSubItems.map((_, i) => (
44
+ <ColumnItem key={String(i)} {..._} basePath={appendSlash(href)} index={i} />
45
+ ))}
42
46
  </div>
43
47
  );
44
48
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redneckz/wildless-cms-uni-blocks",
3
- "version": "0.14.1",
3
+ "version": "0.14.2",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "author": "ЦК",
@@ -2,8 +2,8 @@ import { JSX } from '@redneckz/uni-jsx';
2
2
  import { useLink } from '../../hooks/useLink';
3
3
  import type { LinkProps } from '../../model/LinkProps';
4
4
  import { Img } from '../../ui-kit/Img/Img';
5
- import { style } from '../../utils/style';
6
5
  import { Text } from '../../ui-kit/Text/Text';
6
+ import { style } from '../../utils/style';
7
7
 
8
8
  const LINK_CLASS_NAME = `absolute border
9
9
  bg-white flex justify-between group-hover/link:text-primary-main`;
@@ -30,7 +30,7 @@ export const CarouselLinkButton = JSX<CarouselLinkButtonProps>(
30
30
  <a
31
31
  className={style(
32
32
  LINK_CLASS_NAME,
33
- 'sm:rounded-md rounded-none w-full px-xl py-lg whitespace-nowrap',
33
+ 'sm:rounded-md rounded-none w-full px-xl py-lg whitespace-nowrap z-10',
34
34
  )}
35
35
  role="link"
36
36
  {...adjustedProps}
@@ -22,6 +22,8 @@ export interface HeaderSubMenuProps {
22
22
  internetBankUrl?: string;
23
23
  }
24
24
 
25
+ const HEADER_AREA_KEY = 'header';
26
+
25
27
  export const HeaderSubMenu = JSX<HeaderSubMenuProps>(
26
28
  ({ subItems = [], version, internetBankUrl }) => {
27
29
  const iconVersion: IconVersion = version === 'transparent' ? 'white' : 'black';
@@ -29,7 +31,10 @@ export const HeaderSubMenu = JSX<HeaderSubMenuProps>(
29
31
  const router = useRouter();
30
32
 
31
33
  const visibleSubItems = useMemo(
32
- () => subItems.filter((item) => !item.displayArea || item.displayArea === 'Header'),
34
+ () =>
35
+ subItems.filter(
36
+ (item) => !item.displayArea || item.displayArea.toLowerCase() === HEADER_AREA_KEY,
37
+ ),
33
38
  [subItems],
34
39
  );
35
40
  const activeSubItem = findActiveSubItem(router)(subItems);
@@ -2,13 +2,13 @@ import { JSX } from '@redneckz/uni-jsx';
2
2
  import type { UniBlockProps } from '../../model/JSXBlock';
3
3
  import { BaseTile } from '../../ui-kit/BaseTile/BaseTile';
4
4
  import { BlockWrapper } from '../../ui-kit/BlockWrapper';
5
+ import { renderButtonsSection } from '../../ui-kit/Button/renderButtonsSection';
5
6
  import { Heading } from '../../ui-kit/Heading/Heading';
6
7
  import { Img } from '../../ui-kit/Img/Img';
7
8
  import { style } from '../../utils/style';
8
9
  import type { MobileAppTileContent } from './MobileAppTileContent';
9
10
  import { renderDescription } from './renderDescription';
10
11
  import { renderList } from './renderList';
11
- import { buttonsConditionStyle } from './buttonsConditionStyle';
12
12
 
13
13
  export interface MobileAppTileProps extends MobileAppTileContent, UniBlockProps {}
14
14
 
@@ -30,6 +30,8 @@ export const MobileAppTile = JSX<MobileAppTileProps>(
30
30
  }) => {
31
31
  const containerStyle = version === 'secondary' ? 'p-m min-w-32' : 'min-w-24';
32
32
 
33
+ const img = image?.src ? <Img className="hidden lg:block" image={image} /> : null;
34
+
33
35
  return (
34
36
  <BlockWrapper
35
37
  className={style('min-h-80', className)}
@@ -50,17 +52,28 @@ export const MobileAppTile = JSX<MobileAppTileProps>(
50
52
  />
51
53
  ) : null
52
54
  }
53
- rightImage={image?.src ? <Img className="hidden lg:block" image={image} /> : null}
54
- buttons={buttonsConditionStyle(buttons)}
55
+ rightImage={img}
56
+ buttons={renderButtonsSection(buttons)}
55
57
  >
56
58
  {renderDescription(description)}
57
- <div className="flex flex-1 flex-wrap gap-m items-center">
59
+ <div
60
+ className={style(
61
+ 'gap-m',
62
+ 'flex flex-1 flex-col',
63
+ 'flex-col items-start @4xl:flex-row @4xl:items-center',
64
+ )}
65
+ >
66
+ {renderList(items, listItemSize)}
58
67
  {qr?.src ? (
59
- <div className={style('flex justify-center bg-white rounded-md', containerStyle)}>
68
+ <div
69
+ className={style(
70
+ 'flex justify-center bg-white rounded-md @4xl:-order-1',
71
+ containerStyle,
72
+ )}
73
+ >
60
74
  <Img className="w-fit" image={qr} />
61
75
  </div>
62
76
  ) : null}
63
- {renderList(items, listItemSize)}
64
77
  {image?.src ? <Img className="lg:hidden" image={image} /> : null}
65
78
  </div>
66
79
  </BaseTile>
@@ -1,10 +1,10 @@
1
1
  import type { HeadlineCommonProps } from '../../model/HeadlineType';
2
2
  import type { UniBlockContent } from '../../model/JSXBlock';
3
3
  import type { Picture } from '../../model/Picture';
4
+ import type { ButtonsSectionContent } from '../../ui-kit/Button/ButtonsSectionContent';
4
5
  import type { HeadingCommonProps } from '../../ui-kit/Heading/HeadingProps';
5
6
  import type { ImageContent } from '../../ui-kit/Img/ImgProps';
6
7
  import type { ListContent } from '../../ui-kit/List/ListContent';
7
- import type { ButtonsSectionContent } from '../../ui-kit/Button/ButtonsSectionContent';
8
8
 
9
9
  /**
10
10
  * @title Мобильное приложение
@@ -1,6 +1,6 @@
1
- import type { RowsData } from './InnerTableProps';
2
1
  import { style } from '../../utils/style';
3
2
  import { getHorizontalShift } from './getHorizontalShift';
3
+ import type { RowsData } from './InnerTableProps';
4
4
 
5
5
  export const renderInnerTableRow =
6
6
  (activeColumnIndex: number) => (rowData: RowsData[], rowIdx: number) => {
@@ -18,7 +18,7 @@ export const renderInnerTableRow =
18
18
  return (
19
19
  <div key={String(rowIdx)} className="flex border-main-divider border-b border-solid h-full">
20
20
  {headerColumn?.data ? (
21
- <div className="text-xl font-light min-w-56 py-lg">{headerColumn.data}</div>
21
+ <div className="text-xl font-light w-56 min-w-56 py-lg">{headerColumn.data}</div>
22
22
  ) : null}
23
23
  <div className="flex flex-grow overflow-hidden">
24
24
  <div
@@ -21,8 +21,14 @@ export const Sitemap = JSX<SitemapProps>(({ className, topItems }) => {
21
21
  );
22
22
  });
23
23
 
24
+ const FOOTER_AREA_KEY = 'footer';
25
+
24
26
  const renderColumn = (menuItem: TopMenuItemProps & { onClick: () => void }, index: number) => {
25
- const { text, items, href, target, onClick } = menuItem;
27
+ const { text, items = [], href, target, onClick } = menuItem;
28
+
29
+ const visibleSubItems = items.filter(
30
+ (_) => !_.displayArea || _.displayArea.toLowerCase() === FOOTER_AREA_KEY,
31
+ );
26
32
 
27
33
  return (
28
34
  <div key={String(index)} className="flex flex-col gap-s w-1/4">
@@ -34,11 +40,9 @@ const renderColumn = (menuItem: TopMenuItemProps & { onClick: () => void }, inde
34
40
  >
35
41
  {text || `Раздел ${index}`}
36
42
  </a>
37
- {items
38
- ?.filter((_) => !_.displayArea || _.displayArea === 'Footer')
39
- .map((_, i) => (
40
- <ColumnItem key={String(i)} {..._} basePath={appendSlash(href)} index={i} />
41
- ))}
43
+ {visibleSubItems.map((_, i) => (
44
+ <ColumnItem key={String(i)} {..._} basePath={appendSlash(href)} index={i} />
45
+ ))}
42
46
  </div>
43
47
  );
44
48
  };
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- import type { ButtonProps } from '../../ui-kit/Button/ButtonProps';
3
- export declare const buttonsConditionStyle: (buttons: ButtonProps[]) => JSX.Element | null;
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- import type { ButtonProps } from '../../ui-kit/Button/ButtonProps';
3
- export declare const buttonsConditionStyle: (buttons: ButtonProps[]) => JSX.Element | null;
@@ -1 +0,0 @@
1
- export {};
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- import type { ButtonProps } from '../../ui-kit/Button/ButtonProps';
3
- export declare const buttonsConditionStyle: (buttons: ButtonProps[]) => JSX.Element | null;
@@ -1,6 +0,0 @@
1
- Object.defineProperty(exports, "__esModule", { value: true });
2
- exports.buttonsConditionStyle = void 0;
3
- const renderButtonsSection_1 = require("../../ui-kit/Button/renderButtonsSection");
4
- const buttonsConditionStyle = (buttons) => (0, renderButtonsSection_1.renderButtonsSection)(buttons, { isVertical: false });
5
- exports.buttonsConditionStyle = buttonsConditionStyle;
6
- //# sourceMappingURL=buttonsConditionStyle.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"buttonsConditionStyle.js","sourceRoot":"","sources":["../../../src/components/MobileAppTile/buttonsConditionStyle.tsx"],"names":[],"mappings":";;AAAA,mFAAgF;AAGzE,MAAM,qBAAqB,GAAG,CAAC,OAAsB,EAAE,EAAE,CAC9D,IAAA,2CAAoB,EAAC,OAAO,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC,CAAC;AAD1C,QAAA,qBAAqB,yBACqB"}
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- import type { ButtonProps } from '../../ui-kit/Button/ButtonProps';
3
- export declare const buttonsConditionStyle: (buttons: ButtonProps[]) => JSX.Element | null;
@@ -1,13 +0,0 @@
1
- Object.defineProperty(exports, "__esModule", { value: true });
2
- exports.buttonsConditionStyle = void 0;
3
- const renderButtonsSection_1 = require("../../ui-kit/Button/renderButtonsSection");
4
- const style_1 = require("../../utils/style");
5
- const buttonsConditionStyle = (buttons) => {
6
- const buttonsLengthMoreThanTwo = buttons.length > 2;
7
- return (0, renderButtonsSection_1.renderButtonsSection)(buttons, {
8
- className: (0, style_1.style)(buttonsLengthMoreThanTwo ? 'w-full' : 'flex-nowrap'),
9
- isVertical: buttonsLengthMoreThanTwo,
10
- });
11
- };
12
- exports.buttonsConditionStyle = buttonsConditionStyle;
13
- //# sourceMappingURL=buttonsConditionStyle.mobile.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"buttonsConditionStyle.mobile.js","sourceRoot":"","sources":["../../../src/components/MobileAppTile/buttonsConditionStyle.mobile.tsx"],"names":[],"mappings":";;AAAA,mFAAgF;AAEhF,6CAA0C;AAEnC,MAAM,qBAAqB,GAAG,CAAC,OAAsB,EAAE,EAAE;IAC9D,MAAM,wBAAwB,GAAG,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC;IAEpD,OAAO,IAAA,2CAAoB,EAAC,OAAO,EAAE;QACnC,SAAS,EAAE,IAAA,aAAK,EAAC,wBAAwB,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,aAAa,CAAC;QACrE,UAAU,EAAE,wBAAwB;KACrC,CAAC,CAAC;AACL,CAAC,CAAC;AAPW,QAAA,qBAAqB,yBAOhC"}
@@ -1,2 +0,0 @@
1
- Object.defineProperty(exports, "__esModule", { value: true });
2
- //# sourceMappingURL=renderCurrentDaySchedule.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"renderCurrentDaySchedule.js","sourceRoot":"","sources":["../../../src/components/OfficesAtmsMap/renderCurrentDaySchedule.tsx"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- export {};
@@ -1,2 +0,0 @@
1
- Object.defineProperty(exports, "__esModule", { value: true });
2
- //# sourceMappingURL=renderDay.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"renderDay.js","sourceRoot":"","sources":["../../../src/components/OfficesAtmsMap/renderDay.tsx"],"names":[],"mappings":""}
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- import type { ButtonProps } from '../../ui-kit/Button/ButtonProps';
3
- export declare const buttonsConditionStyle: (buttons: ButtonProps[]) => JSX.Element | null;
@@ -1,3 +0,0 @@
1
- import { renderButtonsSection } from '../../ui-kit/Button/renderButtonsSection.js';
2
- export const buttonsConditionStyle = (buttons) => renderButtonsSection(buttons, { isVertical: false });
3
- //# sourceMappingURL=buttonsConditionStyle.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"buttonsConditionStyle.js","sourceRoot":"","sources":["../../../src/components/MobileAppTile/buttonsConditionStyle.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAGhF,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,OAAsB,EAAE,EAAE,CAC9D,oBAAoB,CAAC,OAAO,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- import type { ButtonProps } from '../../ui-kit/Button/ButtonProps';
2
- export declare const buttonsConditionStyle: (buttons: ButtonProps[]) => JSX.Element | null;
@@ -1,10 +0,0 @@
1
- import { renderButtonsSection } from '../../ui-kit/Button/renderButtonsSection.js';
2
- import { style } from '../../utils/style.js';
3
- export const buttonsConditionStyle = (buttons) => {
4
- const buttonsLengthMoreThanTwo = buttons.length > 2;
5
- return renderButtonsSection(buttons, {
6
- className: style(buttonsLengthMoreThanTwo ? 'w-full' : 'flex-nowrap'),
7
- isVertical: buttonsLengthMoreThanTwo,
8
- });
9
- };
10
- //# sourceMappingURL=buttonsConditionStyle.mobile.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"buttonsConditionStyle.mobile.js","sourceRoot":"","sources":["../../../src/components/MobileAppTile/buttonsConditionStyle.mobile.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAEhF,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE1C,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,OAAsB,EAAE,EAAE;IAC9D,MAAM,wBAAwB,GAAG,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC;IAEpD,OAAO,oBAAoB,CAAC,OAAO,EAAE;QACnC,SAAS,EAAE,KAAK,CAAC,wBAAwB,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,aAAa,CAAC;QACrE,UAAU,EAAE,wBAAwB;KACrC,CAAC,CAAC;AACL,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=renderCurrentDaySchedule.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"renderCurrentDaySchedule.js","sourceRoot":"","sources":["../../../src/components/OfficesAtmsMap/renderCurrentDaySchedule.tsx"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- export {};
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=renderDay.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"renderDay.js","sourceRoot":"","sources":["../../../src/components/OfficesAtmsMap/renderDay.tsx"],"names":[],"mappings":""}
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- import type { ButtonProps } from '../../ui-kit/Button/ButtonProps';
3
- export declare const buttonsConditionStyle: (buttons: ButtonProps[]) => JSX.Element | null;
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- import type { ButtonProps } from '../../ui-kit/Button/ButtonProps';
3
- export declare const buttonsConditionStyle: (buttons: ButtonProps[]) => JSX.Element | null;
@@ -1,13 +0,0 @@
1
- Object.defineProperty(exports, "__esModule", { value: true });
2
- exports.buttonsConditionStyle = void 0;
3
- const renderButtonsSection_1 = require("../../ui-kit/Button/renderButtonsSection");
4
- const style_1 = require("../../utils/style");
5
- const buttonsConditionStyle = (buttons) => {
6
- const buttonsLengthMoreThanTwo = buttons.length > 2;
7
- return (0, renderButtonsSection_1.renderButtonsSection)(buttons, {
8
- className: (0, style_1.style)(buttonsLengthMoreThanTwo ? 'w-full' : 'flex-nowrap'),
9
- isVertical: buttonsLengthMoreThanTwo,
10
- });
11
- };
12
- exports.buttonsConditionStyle = buttonsConditionStyle;
13
- //# sourceMappingURL=buttonsConditionStyle.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"buttonsConditionStyle.js","sourceRoot":"","sources":["../../../src/components/MobileAppTile/buttonsConditionStyle.tsx"],"names":[],"mappings":";;AAAA,mFAAgF;AAEhF,6CAA0C;AAEnC,MAAM,qBAAqB,GAAG,CAAC,OAAsB,EAAE,EAAE;IAC9D,MAAM,wBAAwB,GAAG,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC;IAEpD,OAAO,IAAA,2CAAoB,EAAC,OAAO,EAAE;QACnC,SAAS,EAAE,IAAA,aAAK,EAAC,wBAAwB,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,aAAa,CAAC;QACrE,UAAU,EAAE,wBAAwB;KACrC,CAAC,CAAC;AACL,CAAC,CAAC;AAPW,QAAA,qBAAqB,yBAOhC"}
@@ -1,2 +0,0 @@
1
- Object.defineProperty(exports, "__esModule", { value: true });
2
- //# sourceMappingURL=renderCurrentDaySchedule.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"renderCurrentDaySchedule.js","sourceRoot":"","sources":["../../../src/components/OfficesAtmsMap/renderCurrentDaySchedule.tsx"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- export {};
@@ -1,2 +0,0 @@
1
- Object.defineProperty(exports, "__esModule", { value: true });
2
- //# sourceMappingURL=renderDay.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"renderDay.js","sourceRoot":"","sources":["../../../src/components/OfficesAtmsMap/renderDay.tsx"],"names":[],"mappings":""}
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- import type { ButtonProps } from '../../ui-kit/Button/ButtonProps';
3
- export declare const buttonsConditionStyle: (buttons: ButtonProps[]) => JSX.Element | null;
@@ -1,10 +0,0 @@
1
- import { renderButtonsSection } from '../../ui-kit/Button/renderButtonsSection.js';
2
- import { style } from '../../utils/style.js';
3
- export const buttonsConditionStyle = (buttons) => {
4
- const buttonsLengthMoreThanTwo = buttons.length > 2;
5
- return renderButtonsSection(buttons, {
6
- className: style(buttonsLengthMoreThanTwo ? 'w-full' : 'flex-nowrap'),
7
- isVertical: buttonsLengthMoreThanTwo,
8
- });
9
- };
10
- //# sourceMappingURL=buttonsConditionStyle.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"buttonsConditionStyle.js","sourceRoot":"","sources":["../../../src/components/MobileAppTile/buttonsConditionStyle.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAEhF,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE1C,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,OAAsB,EAAE,EAAE;IAC9D,MAAM,wBAAwB,GAAG,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC;IAEpD,OAAO,oBAAoB,CAAC,OAAO,EAAE;QACnC,SAAS,EAAE,KAAK,CAAC,wBAAwB,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,aAAa,CAAC;QACrE,UAAU,EAAE,wBAAwB;KACrC,CAAC,CAAC;AACL,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=renderCurrentDaySchedule.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"renderCurrentDaySchedule.js","sourceRoot":"","sources":["../../../src/components/OfficesAtmsMap/renderCurrentDaySchedule.tsx"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- export {};
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=renderDay.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"renderDay.js","sourceRoot":"","sources":["../../../src/components/OfficesAtmsMap/renderDay.tsx"],"names":[],"mappings":""}
@@ -1,12 +0,0 @@
1
- import { renderButtonsSection } from '../../ui-kit/Button/renderButtonsSection';
2
- import type { ButtonProps } from '../../ui-kit/Button/ButtonProps';
3
- import { style } from '../../utils/style';
4
-
5
- export const buttonsConditionStyle = (buttons: ButtonProps[]) => {
6
- const buttonsLengthMoreThanTwo = buttons.length > 2;
7
-
8
- return renderButtonsSection(buttons, {
9
- className: style(buttonsLengthMoreThanTwo ? 'w-full' : 'flex-nowrap'),
10
- isVertical: buttonsLengthMoreThanTwo,
11
- });
12
- };
@@ -1,2 +0,0 @@
1
- import { Badge } from './Badge';
2
- import type { WorkScheduleWeek } from './useOfficesAtmsMap';
@@ -1,2 +0,0 @@
1
- import { CardCell } from './CardCell';
2
- import type { WorkScheduleWeek } from './useOfficesAtmsMap';
@@ -1,12 +0,0 @@
1
- import { renderButtonsSection } from '../../ui-kit/Button/renderButtonsSection';
2
- import type { ButtonProps } from '../../ui-kit/Button/ButtonProps';
3
- import { style } from '../../utils/style';
4
-
5
- export const buttonsConditionStyle = (buttons: ButtonProps[]) => {
6
- const buttonsLengthMoreThanTwo = buttons.length > 2;
7
-
8
- return renderButtonsSection(buttons, {
9
- className: style(buttonsLengthMoreThanTwo ? 'w-full' : 'flex-nowrap'),
10
- isVertical: buttonsLengthMoreThanTwo,
11
- });
12
- };
@@ -1,5 +0,0 @@
1
- import { renderButtonsSection } from '../../ui-kit/Button/renderButtonsSection';
2
- import type { ButtonProps } from '../../ui-kit/Button/ButtonProps';
3
-
4
- export const buttonsConditionStyle = (buttons: ButtonProps[]) =>
5
- renderButtonsSection(buttons, { isVertical: false });
@@ -1,2 +0,0 @@
1
- import { Badge } from './Badge';
2
- import type { WorkScheduleWeek } from './useOfficesAtmsMap';
@@ -1,2 +0,0 @@
1
- import { CardCell } from './CardCell';
2
- import type { WorkScheduleWeek } from './useOfficesAtmsMap';