@redneckz/wildless-cms-uni-blocks 0.14.335 → 0.14.337

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 (123) hide show
  1. package/bin/migration-scripts/0.14.213.js +1 -1
  2. package/bundle/blocks.schema.json +1 -1
  3. package/bundle/bundle.umd.js +57 -42
  4. package/bundle/bundle.umd.min.js +1 -1
  5. package/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +4 -1
  6. package/bundle/ui-kit/TabsControl/TabItem.d.ts +1 -2
  7. package/bundle/ui-kit/TabsControl/TabItemInner.d.ts +1 -0
  8. package/bundle/utils/getVersion.d.ts +1 -0
  9. package/dist/components/ApplicationForm/ApplicationFormContent.d.ts +4 -1
  10. package/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +3 -2
  11. package/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
  12. package/dist/components/TabsLayout/TabsLayout.js +16 -10
  13. package/dist/components/TabsLayout/TabsLayout.js.map +1 -1
  14. package/dist/components/TabsLayout/renderTabsLayout.js +14 -12
  15. package/dist/components/TabsLayout/renderTabsLayout.js.map +1 -1
  16. package/dist/ui-kit/Badge/Badge.js +1 -3
  17. package/dist/ui-kit/Badge/Badge.js.map +1 -1
  18. package/dist/ui-kit/BaseFiltration/useHotFilters.js +3 -3
  19. package/dist/ui-kit/BaseFiltration/useHotFilters.js.map +1 -1
  20. package/dist/ui-kit/TabsControl/ScrollableTabsControl.js +9 -4
  21. package/dist/ui-kit/TabsControl/ScrollableTabsControl.js.map +1 -1
  22. package/dist/ui-kit/TabsControl/TabItem.d.ts +1 -2
  23. package/dist/ui-kit/TabsControl/TabItem.js.map +1 -1
  24. package/dist/ui-kit/TabsControl/TabItemInner.d.ts +1 -0
  25. package/dist/ui-kit/TabsControl/TabItemInner.js +4 -2
  26. package/dist/ui-kit/TabsControl/TabItemInner.js.map +1 -1
  27. package/dist/utils/getVersion.d.ts +1 -0
  28. package/dist/utils/getVersion.js +5 -0
  29. package/dist/utils/getVersion.js.map +1 -0
  30. package/lib/components/ApplicationForm/ApplicationFormContent.d.ts +4 -1
  31. package/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +3 -2
  32. package/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
  33. package/lib/components/TabsLayout/TabsLayout.fixture.d.ts +4 -3
  34. package/lib/components/TabsLayout/TabsLayout.fixture.mobile.d.ts +4 -2
  35. package/lib/components/TabsLayout/TabsLayout.js +16 -10
  36. package/lib/components/TabsLayout/TabsLayout.js.map +1 -1
  37. package/lib/components/TabsLayout/renderTabsLayout.js +14 -12
  38. package/lib/components/TabsLayout/renderTabsLayout.js.map +1 -1
  39. package/lib/ui-kit/Badge/Badge.js +1 -3
  40. package/lib/ui-kit/Badge/Badge.js.map +1 -1
  41. package/lib/ui-kit/BaseFiltration/useHotFilters.js +3 -3
  42. package/lib/ui-kit/BaseFiltration/useHotFilters.js.map +1 -1
  43. package/lib/ui-kit/TabsControl/ScrollableTabsControl.js +9 -4
  44. package/lib/ui-kit/TabsControl/ScrollableTabsControl.js.map +1 -1
  45. package/lib/ui-kit/TabsControl/TabItem.d.ts +1 -2
  46. package/lib/ui-kit/TabsControl/TabItem.js.map +1 -1
  47. package/lib/ui-kit/TabsControl/TabItemInner.d.ts +1 -0
  48. package/lib/ui-kit/TabsControl/TabItemInner.js +4 -2
  49. package/lib/ui-kit/TabsControl/TabItemInner.js.map +1 -1
  50. package/lib/utils/getVersion.d.ts +1 -0
  51. package/lib/utils/getVersion.js +2 -0
  52. package/lib/utils/getVersion.js.map +1 -0
  53. package/mobile/bundle/bundle.umd.js +57 -42
  54. package/mobile/bundle/bundle.umd.min.js +1 -1
  55. package/mobile/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +4 -1
  56. package/mobile/bundle/ui-kit/TabsControl/TabItem.d.ts +1 -2
  57. package/mobile/bundle/ui-kit/TabsControl/TabItemInner.d.ts +1 -0
  58. package/mobile/bundle/utils/getVersion.d.ts +1 -0
  59. package/mobile/dist/components/ApplicationForm/ApplicationFormContent.d.ts +4 -1
  60. package/mobile/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +3 -2
  61. package/mobile/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
  62. package/mobile/dist/components/TabsLayout/TabsLayout.js +16 -10
  63. package/mobile/dist/components/TabsLayout/TabsLayout.js.map +1 -1
  64. package/mobile/dist/components/TabsLayout/renderTabsLayout.js +14 -12
  65. package/mobile/dist/components/TabsLayout/renderTabsLayout.js.map +1 -1
  66. package/mobile/dist/ui-kit/Badge/Badge.js +1 -3
  67. package/mobile/dist/ui-kit/Badge/Badge.js.map +1 -1
  68. package/mobile/dist/ui-kit/BaseFiltration/useHotFilters.js +3 -3
  69. package/mobile/dist/ui-kit/BaseFiltration/useHotFilters.js.map +1 -1
  70. package/mobile/dist/ui-kit/TabsControl/ScrollableTabsControl.js +9 -4
  71. package/mobile/dist/ui-kit/TabsControl/ScrollableTabsControl.js.map +1 -1
  72. package/mobile/dist/ui-kit/TabsControl/TabItem.d.ts +1 -2
  73. package/mobile/dist/ui-kit/TabsControl/TabItem.js.map +1 -1
  74. package/mobile/dist/ui-kit/TabsControl/TabItemInner.d.ts +1 -0
  75. package/mobile/dist/ui-kit/TabsControl/TabItemInner.js +4 -2
  76. package/mobile/dist/ui-kit/TabsControl/TabItemInner.js.map +1 -1
  77. package/mobile/dist/utils/getVersion.d.ts +1 -0
  78. package/mobile/dist/utils/getVersion.js +5 -0
  79. package/mobile/dist/utils/getVersion.js.map +1 -0
  80. package/mobile/lib/components/ApplicationForm/ApplicationFormContent.d.ts +4 -1
  81. package/mobile/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +3 -2
  82. package/mobile/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
  83. package/mobile/lib/components/TabsLayout/TabsLayout.js +16 -10
  84. package/mobile/lib/components/TabsLayout/TabsLayout.js.map +1 -1
  85. package/mobile/lib/components/TabsLayout/renderTabsLayout.js +14 -12
  86. package/mobile/lib/components/TabsLayout/renderTabsLayout.js.map +1 -1
  87. package/mobile/lib/ui-kit/Badge/Badge.js +1 -3
  88. package/mobile/lib/ui-kit/Badge/Badge.js.map +1 -1
  89. package/mobile/lib/ui-kit/BaseFiltration/useHotFilters.js +3 -3
  90. package/mobile/lib/ui-kit/BaseFiltration/useHotFilters.js.map +1 -1
  91. package/mobile/lib/ui-kit/TabsControl/ScrollableTabsControl.js +9 -4
  92. package/mobile/lib/ui-kit/TabsControl/ScrollableTabsControl.js.map +1 -1
  93. package/mobile/lib/ui-kit/TabsControl/TabItem.d.ts +1 -2
  94. package/mobile/lib/ui-kit/TabsControl/TabItem.js.map +1 -1
  95. package/mobile/lib/ui-kit/TabsControl/TabItemInner.d.ts +1 -0
  96. package/mobile/lib/ui-kit/TabsControl/TabItemInner.js +4 -2
  97. package/mobile/lib/ui-kit/TabsControl/TabItemInner.js.map +1 -1
  98. package/mobile/lib/utils/getVersion.d.ts +1 -0
  99. package/mobile/lib/utils/getVersion.js +2 -0
  100. package/mobile/lib/utils/getVersion.js.map +1 -0
  101. package/mobile/src/components/ApplicationForm/ApplicationFormContent.ts +4 -1
  102. package/mobile/src/components/OfficesAtmsMap/OfficesAtmsMapLayout.tsx +3 -2
  103. package/mobile/src/components/TabsLayout/TabsLayout.tsx +20 -10
  104. package/mobile/src/components/TabsLayout/renderTabsLayout.tsx +24 -20
  105. package/mobile/src/ui-kit/Badge/Badge.tsx +13 -15
  106. package/mobile/src/ui-kit/BaseFiltration/useHotFilters.tsx +3 -7
  107. package/mobile/src/ui-kit/TabsControl/ScrollableTabsControl.tsx +13 -16
  108. package/mobile/src/ui-kit/TabsControl/TabItem.tsx +1 -2
  109. package/mobile/src/ui-kit/TabsControl/TabItemInner.tsx +9 -2
  110. package/mobile/src/utils/getVersion.ts +1 -0
  111. package/package.json +1 -1
  112. package/src/components/ApplicationForm/ApplicationFormContent.ts +4 -1
  113. package/src/components/OfficesAtmsMap/OfficesAtmsMapLayout.tsx +3 -2
  114. package/src/components/TabsLayout/TabsLayout.fixture.mobile.tsx +70 -24
  115. package/src/components/TabsLayout/TabsLayout.fixture.tsx +33 -29
  116. package/src/components/TabsLayout/TabsLayout.tsx +20 -10
  117. package/src/components/TabsLayout/renderTabsLayout.tsx +24 -20
  118. package/src/ui-kit/Badge/Badge.tsx +13 -15
  119. package/src/ui-kit/BaseFiltration/useHotFilters.tsx +3 -7
  120. package/src/ui-kit/TabsControl/ScrollableTabsControl.tsx +13 -16
  121. package/src/ui-kit/TabsControl/TabItem.tsx +1 -2
  122. package/src/ui-kit/TabsControl/TabItemInner.tsx +9 -2
  123. package/src/utils/getVersion.ts +1 -0
@@ -1 +1 @@
1
- {"version":3,"file":"renderTabsLayout.js","sourceRoot":"","sources":["../../../src/components/TabsLayout/renderTabsLayout.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,gDAAgD,CAAC;AAEvF,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AAUnE,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,EAAE,QAAQ,GAAG,UAAU,EAAE,GAAG,KAAK,EAAmB,EAAE,EAAE;IACvF,QAAQ,QAAQ,EAAE;QAChB,KAAK,SAAS;YACZ,OAAO,KAAC,WAAW,OAAK,KAAK,GAAI,CAAC;QACpC,KAAK,YAAY;YACf,OAAO,CACL,cAAK,SAAS,EAAC,MAAM,YACnB,KAAC,WAAW,IAAC,SAAS,EAAC,QAAQ,EAAC,QAAQ,EAAC,YAAY,KAAK,KAAK,GAAI,GAC/D,CACP,CAAC;QACJ,KAAK,UAAU;YACb,OAAO,CACL,cAAK,SAAS,EAAC,gCAAgC,YAC7C,KAAC,qBAAqB,IAAC,SAAS,EAAC,QAAQ,KAAK,KAAK,EAAE,QAAQ,EAAC,UAAU,GAAG,GACvE,CACP,CAAC;QACJ;YACE,OAAO,IAAI,CAAC;KACf;AACH,CAAC,CAAC"}
1
+ {"version":3,"file":"renderTabsLayout.js","sourceRoot":"","sources":["../../../src/components/TabsLayout/renderTabsLayout.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,gDAAgD,CAAC;AAWvF,MAAM,SAAS,GAA6D;IAC1E,OAAO,EAAE;QACP,OAAO,EAAE,EAAE;QACX,SAAS,EAAE,EAAE;KACd;IACD,QAAQ,EAAE;QACR,OAAO,EAAE,yCAAyC;QAClD,SAAS,EAAE,QAAQ;KACpB;IACD,UAAU,EAAE;QACV,OAAO,EAAE,MAAM;QACf,SAAS,EAAE,QAAQ;KACpB;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,EAAE,QAAQ,GAAG,UAAU,EAAE,GAAG,KAAK,EAAmB,EAAE,EAAE,CACvF,QAAQ,CAAC,CAAC,CAAC,CACT,cAAK,SAAS,EAAE,SAAS,CAAC,QAAQ,CAAC,CAAC,OAAO,YACzC,KAAC,qBAAqB,IACpB,SAAS,EAAE,SAAS,CAAC,QAAQ,CAAC,CAAC,SAAS,EACxC,QAAQ,EAAE,QAAQ,KACd,KAAK,GACT,GACE,CACP,CAAC,CAAC,CAAC,IAAI,CAAC"}
@@ -10,7 +10,5 @@ const badgeTextColorStyleMap = {
10
10
  primary: 'text-white',
11
11
  secondary: 'text-secondary-text',
12
12
  };
13
- export const Badge = JSX(({ count, version = 'secondary' }) => {
14
- return (_jsx("div", { className: style('w-6 h-6 rounded-full flex items-center justify-center', badgeBgStyleMap[version]), role: "status", children: _jsx(Text, { size: "text-xs", color: badgeTextColorStyleMap[version], children: count }) }));
15
- });
13
+ export const Badge = JSX(({ count, version = 'secondary' }) => (_jsx("div", { className: style('w-6 h-6 rounded-full flex items-center justify-center', badgeBgStyleMap[version]), role: "status", children: _jsx(Text, { size: "text-xs", color: badgeTextColorStyleMap[version], children: count }) })));
16
14
  //# sourceMappingURL=Badge.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Badge.js","sourceRoot":"","sources":["../../../src/ui-kit/Badge/Badge.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAQpC,MAAM,eAAe,GAA2B;IAC9C,OAAO,EAAE,aAAa;IACtB,SAAS,EAAE,iBAAiB;CAC7B,CAAC;AAEF,MAAM,sBAAsB,GAA8B;IACxD,OAAO,EAAE,YAAY;IACrB,SAAS,EAAE,qBAAqB;CACjC,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAG,GAAG,CAAa,CAAC,EAAE,KAAK,EAAE,OAAO,GAAG,WAAW,EAAE,EAAE,EAAE;IACxE,OAAO,CACL,cACE,SAAS,EAAE,KAAK,CACd,uDAAuD,EACvD,eAAe,CAAC,OAAO,CAAC,CACzB,EACD,IAAI,EAAC,QAAQ,YAEb,KAAC,IAAI,IAAC,IAAI,EAAC,SAAS,EAAC,KAAK,EAAE,sBAAsB,CAAC,OAAO,CAAC,YACxD,KAAK,GACD,GACH,CACP,CAAC;AACJ,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"Badge.js","sourceRoot":"","sources":["../../../src/ui-kit/Badge/Badge.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAQpC,MAAM,eAAe,GAA2B;IAC9C,OAAO,EAAE,aAAa;IACtB,SAAS,EAAE,iBAAiB;CAC7B,CAAC;AAEF,MAAM,sBAAsB,GAA8B;IACxD,OAAO,EAAE,YAAY;IACrB,SAAS,EAAE,qBAAqB;CACjC,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAG,GAAG,CAAa,CAAC,EAAE,KAAK,EAAE,OAAO,GAAG,WAAW,EAAE,EAAE,EAAE,CAAC,CACzE,cACE,SAAS,EAAE,KAAK,CACd,uDAAuD,EACvD,eAAe,CAAC,OAAO,CAAC,CACzB,EACD,IAAI,EAAC,QAAQ,YAEb,KAAC,IAAI,IAAC,IAAI,EAAC,SAAS,EAAC,KAAK,EAAE,sBAAsB,CAAC,OAAO,CAAC,YACxD,KAAK,GACD,GACH,CACP,CAAC,CAAC"}
@@ -1,6 +1,5 @@
1
- import { jsx as _jsx } from "@redneckz/uni-jsx/jsx-runtime";
2
1
  import { useCallback, useMemo } from '@redneckz/uni-jsx/lib/hooks';
3
- import { Badge } from '../Badge/Badge.js';
2
+ import { getVersion } from '../../utils/getVersion.js';
4
3
  import { getBadgeCount } from './getBadgeCount.js';
5
4
  import { hotFilterRecordCmp } from './hotFilterRecordCmp.js';
6
5
  const EMPTY_ARR = [];
@@ -9,7 +8,8 @@ export const useHotFilters = ({ hotFilters = EMPTY_ARR, filtrationState = EMPTY_
9
8
  const activeItemIndex = useMemo(() => Math.max(0, hotFilters.findIndex((_) => hotFilterRecordCmp(_.filter, filtrationState))), [hotFilters, filtrationState]);
10
9
  const items = useMemo(() => hotFilters.map((_) => ({
11
10
  text: _.text,
12
- appendRight: (_jsx(Badge, { version: _ === hotFilters[activeItemIndex] ? 'primary' : 'secondary', count: getBadgeCount(blocks, _.filter) })),
11
+ count: getBadgeCount(blocks, _.filter),
12
+ version: getVersion(_ === hotFilters[activeItemIndex]),
13
13
  })), [hotFilters, blocks, activeItemIndex]);
14
14
  const handleChange = useCallback((_) => {
15
15
  onFiltrationStateChange(hotFilters[items.indexOf(_)].filter);
@@ -1 +1 @@
1
- {"version":3,"file":"useHotFilters.js","sourceRoot":"","sources":["../../../src/ui-kit/BaseFiltration/useHotFilters.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,6BAA6B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,UAAU,CAAC,CAAC,KAAK,UAAU,CAAC,eAAe,CAAC,CAAC;KACvD,CAAC,CAAC,EACL,CAAC,UAAU,EAAE,MAAM,EAAE,eAAe,CAAC,CACtC,CAAC;IAEF,MAAM,YAAY,GAAG,WAAW,CAC9B,CAAC,CAAc,EAAE,EAAE;QACjB,uBAAuB,CAAC,UAAU,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;IAC/D,CAAC,EACD,CAAC,UAAU,EAAE,KAAK,CAAC,CACpB,CAAC;IAEF,OAAO;QACL,KAAK,EAAE,KAAK,CAAC,eAAe,CAAC;QAC7B,KAAK,EAAE,KAAK;QACZ,QAAQ,EAAE,YAAY;KACvB,CAAC;AACJ,CAAC,CAAC"}
@@ -6,14 +6,19 @@ import { SwipeListContainer } from '../SwipeListControl/SwipeListContainer.js';
6
6
  import { useSwipeListScroll } from '../SwipeListControl/useSwipeListScroll.js';
7
7
  import { renderTab } from './renderTab.js';
8
8
  const scrollButtonStyle = 'hidden sm:flex absolute z-40';
9
- const scrollStyleType = {
9
+ const scrollStyle = {
10
+ default: {
11
+ item: 'flex-1',
12
+ gap: 0,
13
+ buttonTop: 'top-0',
14
+ },
10
15
  animated: {
11
- itemClassName: 'flex',
16
+ item: 'flex',
12
17
  gap: 8,
13
18
  buttonTop: 'top-5',
14
19
  },
15
20
  underlined: {
16
- itemClassName: '',
21
+ item: '',
17
22
  gap: 0,
18
23
  buttonTop: 'top-0',
19
24
  },
@@ -22,6 +27,6 @@ export const ScrollableTabsControl = JSX(({ className, items = [], value, onChan
22
27
  const [containerRef, scroll] = useSwipeListScroll({
23
28
  itemCount: items?.length || 0,
24
29
  });
25
- return (_jsxs("div", { className: style('relative overflow-x-auto no-scrollbar', className), children: [_jsx(SwipeListContainer, { containerRef: containerRef, snapAlign: "snap-start", onVisibleIndicesChange: scroll.handleVisibleIndicesChange, itemClassName: scrollStyleType[tabsType].itemClassName, gap: scrollStyleType[tabsType].gap, children: items.map(renderTab(value, onChange, tabsType)) }), scroll.canScrollLeft ? (_jsx(ScrollLeftButton, { className: style('left-6', scrollButtonStyle, scrollStyleType[tabsType].buttonTop), onClick: scroll.scrollLeft })) : null, scroll.canScrollRight ? (_jsx(ScrollRightButton, { className: style('right-6', scrollButtonStyle, scrollStyleType[tabsType].buttonTop), onClick: scroll.scrollRight })) : null] }));
30
+ return (_jsxs("div", { className: style('relative overflow-x-auto no-scrollbar', className), children: [_jsx(SwipeListContainer, { containerRef: containerRef, snapAlign: "snap-start", onVisibleIndicesChange: scroll.handleVisibleIndicesChange, itemClassName: scrollStyle[tabsType].item, gap: scrollStyle[tabsType].gap, children: items.map(renderTab(value, onChange, tabsType)) }), scroll.canScrollLeft ? (_jsx(ScrollLeftButton, { className: style('left-6', scrollButtonStyle, scrollStyle[tabsType].buttonTop), onClick: scroll.scrollLeft })) : null, scroll.canScrollRight ? (_jsx(ScrollRightButton, { className: style('right-6', scrollButtonStyle, scrollStyle[tabsType].buttonTop), onClick: scroll.scrollRight })) : null] }));
26
31
  });
27
32
  //# sourceMappingURL=ScrollableTabsControl.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ScrollableTabsControl.js","sourceRoot":"","sources":["../../../src/ui-kit/TabsControl/ScrollableTabsControl.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAChF,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAGxC,MAAM,iBAAiB,GAAG,8BAA8B,CAAC;AAEzD,MAAM,eAAe,GAAG;IACtB,QAAQ,EAAE;QAC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AK,SAAS,EAAE,KAAK,CAAC,uCAAuC,EAAE,SAAS,CAAC,aACvE,KAAC,kBAAkB,IACjB,YAAY,EAAE,YAAY,EAC1B,SAAS,EAAC,YAAY,EACtB,sBAAsB,EAAE,MAAM,CAAC,0BAA0B,EACzD,aAAa,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC,IAAI,EACzC,GAAG,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC,GAAG,YAE7B,KAAK,CAAC,GAAG,CAAC,SAAS,CAAC,KAAK,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC,GAC7B,EACpB,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,CACtB,KAAC,gBAAgB,IACf,SAAS,EAAE,KAAK,CAAC,QAAQ,EAAE,iBAAiB,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC,SAAS,CAAC,EAC9E,OAAO,EAAE,MAAM,CAAC,UAAU,GAC1B,CACH,CAAC,CAAC,CAAC,IAAI,EACP,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,CACvB,KAAC,iBAAiB,IAChB,SAAS,EAAE,KAAK,CAAC,SAAS,EAAE,iBAAiB,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC,SAAS,CAAC,EAC/E,OAAO,EAAE,MAAM,CAAC,WAAW,GAC3B,CACH,CAAC,CAAC,CAAC,IAAI,IACJ,CACP,CAAC;AACJ,CAAC,CACF,CAAC"}
@@ -1,11 +1,10 @@
1
1
  import { type DescriptionProps, type TitleProps } from '../../model/HeadlineType';
2
2
  import { type LinkProps } from '../../model/LinkProps';
3
3
  import { type IconProps } from '../../model/Picture';
4
- import { type VNode } from '../../model/VNode';
5
4
  import { type TabsControlProps, type TabsType } from './TabsControlProps';
6
5
  export interface TabItemBase extends LinkProps, TitleProps, DescriptionProps, IconProps {
7
6
  name?: string;
8
- appendRight?: VNode;
7
+ count?: number;
9
8
  }
10
9
  export interface TabItemProps {
11
10
  item?: TabItemBase;
@@ -1 +1 @@
1
- {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CAAC,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,CAAC,CAAC;IAE3E,OAAO,KAAC,YAAY,OAAK,KAAK,EAAE,GAAG,EAAC,GAAG,EAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,GAAI,CAAC;AAC3E,CAAC,CAAC,CAAC;AAEH,mDAAmD;AACnD,MAAM,aAAa,GAAG,GAAG,CAAe,CAAC,EAAE,IAAI,GAAG,EAAE,EAAE,OAAO,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE;IAC1E,MAAM,WAAW,GAAG,WAAW,CAAC,GAAG,EAAE;QACnC,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3B,CAAC,EAAE,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC;IAEpB,OAAO,KAAC,YAAY,IAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,KAAM,IAAI,GAAI,CAAC;AACtE,CAAC,CAAC,CAAC"}
@@ -1,6 +1,7 @@
1
1
  import { type TabItemProps } from './TabItem';
2
2
  interface TabItemInnerProps extends TabItemProps {
3
3
  tag?: string;
4
+ count?: number;
4
5
  }
5
6
  export declare const TabItemInner: import("@redneckz/uni-jsx").UNIComponent<TabItemInnerProps, any, any>;
6
7
  export {};
@@ -1,6 +1,8 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
2
2
  import { JSX } from '@redneckz/uni-jsx';
3
+ import { getVersion } from '../../utils/getVersion.js';
3
4
  import { style } from '../../utils/style.js';
5
+ import { Badge } from '../Badge/Badge.js';
4
6
  import { renderTabItemInner } from './renderTabItemInner.js';
5
7
  const tabPaddingStyleMap = {
6
8
  default: 'px-xs',
@@ -25,13 +27,13 @@ const activeTabBgStyleMap = {
25
27
  };
26
28
  export const TabItemInner = JSX(({ tag = 'div', item = {}, isActive = false, type = 'default', onClick }) => {
27
29
  const Tag = tag;
28
- const { text, description, icon, appendRight, ...link } = item;
30
+ const { text, description, icon, count, ...link } = item;
29
31
  return (_jsx(Tag, { className: style('h-12', 'block flex-1', 'cursor-pointer', tabPaddingStyleMap[type], isActive ? activeTabBgStyleMap[type] : tabBgStyleMap[type]), role: "tablist", onClick: onClick, ...link, children: _jsxs("div", { className: style('h-full', 'flex justify-center items-center', 'text-center whitespace-nowrap', isActive ? activeTabTextStyleMap[type] : tabTextStyle), children: [renderTabItemInner({
30
32
  text,
31
33
  description,
32
34
  icon,
33
35
  isActive,
34
36
  type,
35
- }), appendRight ? _jsx("div", { className: "ml-xs", children: appendRight }) : null] }) }));
37
+ }), Number.isInteger(count) ? (_jsx("div", { className: "ml-xs", children: _jsx(Badge, { count: count, version: getVersion(isActive) }) })) : null] }) }));
36
38
  });
37
39
  //# sourceMappingURL=TabItemInner.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TabItemInner.js","sourceRoot":"","sources":["../../../src/ui-kit/TabsControl/TabItemInner.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAI1D,MAAM,kBAAkB,GAA6B;IACnD,OAAO,EAAE,OAAO;IAChB,UAAU,EAAE,MAAM;IAClB,QAAQ,EAAE,kFAAkF;CAC7F,CAAC;AAEF,MAAM,YAAY,GAAG,6CAA6C,CAAC;AAEnE,MAAM,qBAAqB,GAA6B;IACtD,OAAO,EAAE,0BAA0B;IACnC,UAAU,EAAE,8BAA8B;IAC1C,QAAQ,EAAE,0BAA0B;CACrC,CAAC;AAEF,MAAM,aAAa,GAA6B;IAC9C,OAAO,EAAE,UAAU;IACnB,UAAU,EAAE,UAAU;IACtB,QAAQ,EAAE,mEAAmE;CAC9E,CAAC;AAEF,MAAM,mBAAmB,GAA6B;IACpD,OAAO,EAAE,oBAAoB;IAC7B,UAAU,EAAE,UAA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,IAAI,EAAC,SAAS,EACd,OAAO,EAAE,OAAO,KACZ,IAAI,YAER,eACE,SAAS,EAAE,KAAK,CACd,QAAQ,EACR,kCAAkC,EAClC,+BAA+B,EAC/B,QAAQ,CAAC,CAAC,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,YAAY,CACtD,aAEA,kBAAkB,CAAC;oBAClB,IAAI;oBACJ,WAAW;oBACX,IAAI;oBACJ,QAAQ;oBACR,IAAI;iBACL,CAAC,EACD,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CACzB,cAAK,SAAS,EAAC,OAAO,YACpB,KAAC,KAAK,IAAC,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,CAAC,QAAQ,CAAC,GAAI,GAClD,CACP,CAAC,CAAC,CAAC,IAAI,IACJ,GACF,CACP,CAAC;AACJ,CAAC,CACF,CAAC"}
@@ -0,0 +1 @@
1
+ export declare const getVersion: (isPrimary: boolean) => "primary" | "secondary";
@@ -0,0 +1,2 @@
1
+ export const getVersion = (isPrimary) => (isPrimary ? 'primary' : 'secondary');
2
+ //# sourceMappingURL=getVersion.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getVersion.js","sourceRoot":"","sources":["../../src/utils/getVersion.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,SAAkB,EAAE,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC"}
@@ -3990,17 +3990,7 @@
3990
3990
  return (jsx(BlockWrapper, { className: style('min-h-80', className), padding: "p-0", version: version, ...rest, children: jsxs(BaseTile, { className: "h-full", padding: padding, defaultPadding: "p-6xl", title: jsx(Heading, { headingType: headingType, title: title, className: style('whitespace-pre-wrap', align) }), rightImage: img, buttons: renderButtonsSection(buttons, { className: 'flex-wrap' }), children: [description ? (jsx(Text, { size: "text-xl", "font-weight": "font-light", children: description })) : null, jsxs("div", { className: style('gap-m', 'flex flex-1 flex-col', 'flex-col items-start @xl:flex-row @xl:items-center'), children: [jsx(List, { items: items, listItemSize: "M" }), jsx(Text, { size: "text-m", "font-weight": "font-light", color: "text-secondary-text", children: additionalDescription }), qr?.src ? (jsx("div", { className: style('flex justify-center bg-white rounded-md @xl:-order-1', containerStyle), children: jsx(Img, { className: "w-fit", image: qr }) })) : null, image?.src ? jsx(Img, { className: "lg:hidden", image: image }) : null] })] }) }));
3991
3991
  });
3992
3992
 
3993
- const badgeBgStyleMap = {
3994
- primary: 'bg-white/30',
3995
- secondary: 'bg-main-divider',
3996
- };
3997
- const badgeTextColorStyleMap = {
3998
- primary: 'text-white',
3999
- secondary: 'text-secondary-text',
4000
- };
4001
- const Badge$1 = JSX(({ count, version = 'secondary' }) => {
4002
- return (jsx("div", { className: style('w-6 h-6 rounded-full flex items-center justify-center', badgeBgStyleMap[version]), role: "status", children: jsx(Text, { size: "text-xs", color: badgeTextColorStyleMap[version], children: count }) }));
4003
- });
3993
+ const getVersion = (isPrimary) => (isPrimary ? 'primary' : 'secondary');
4004
3994
 
4005
3995
  const getBadgeCount = (blocks = [], filter = {}) => blocks.filter(({ content = {} }) => targetMatchPattern(filter, content)).length;
4006
3996
 
@@ -4023,7 +4013,8 @@
4023
4013
  const activeItemIndex = useMemo(() => Math.max(0, hotFilters.findIndex((_) => hotFilterRecordCmp(_.filter, filtrationState))), [hotFilters, filtrationState]);
4024
4014
  const items = useMemo(() => hotFilters.map((_) => ({
4025
4015
  text: _.text,
4026
- appendRight: (jsx(Badge$1, { version: _ === hotFilters[activeItemIndex] ? 'primary' : 'secondary', count: getBadgeCount(blocks, _.filter) })),
4016
+ count: getBadgeCount(blocks, _.filter),
4017
+ version: getVersion(_ === hotFilters[activeItemIndex]),
4027
4018
  })), [hotFilters, blocks, activeItemIndex]);
4028
4019
  const handleChange = useCallback((_) => {
4029
4020
  onFiltrationStateChange(hotFilters[items.indexOf(_)].filter);
@@ -4035,6 +4026,16 @@
4035
4026
  };
4036
4027
  };
4037
4028
 
4029
+ const badgeBgStyleMap = {
4030
+ primary: 'bg-white/30',
4031
+ secondary: 'bg-main-divider',
4032
+ };
4033
+ const badgeTextColorStyleMap = {
4034
+ primary: 'text-white',
4035
+ secondary: 'text-secondary-text',
4036
+ };
4037
+ const Badge$1 = JSX(({ count, version = 'secondary' }) => (jsx("div", { className: style('w-6 h-6 rounded-full flex items-center justify-center', badgeBgStyleMap[version]), role: "status", children: jsx(Text, { size: "text-xs", color: badgeTextColorStyleMap[version], children: count }) })));
4038
+
4038
4039
  const getButtonClassNames = (isActive) => ({
4039
4040
  btn: `w-96 ${isActive ? 'p-m border-none bg-primary-main text-white' : 'p-s ease-in duration-300 bg-white'}`,
4040
4041
  text: isActive ? 'mb-xs text-xl' : 'mb-2xs text-l text-primary-text',
@@ -4075,14 +4076,14 @@
4075
4076
  };
4076
4077
  const TabItemInner = JSX(({ tag = 'div', item = {}, isActive = false, type = 'default', onClick }) => {
4077
4078
  const Tag = tag;
4078
- const { text, description, icon, appendRight, ...link } = item;
4079
+ const { text, description, icon, count, ...link } = item;
4079
4080
  return (jsx(Tag, { className: style('h-12', 'block flex-1', 'cursor-pointer', tabPaddingStyleMap[type], isActive ? activeTabBgStyleMap[type] : tabBgStyleMap[type]), role: "tablist", onClick: onClick, ...link, children: jsxs("div", { className: style('h-full', 'flex justify-center items-center', 'text-center whitespace-nowrap', isActive ? activeTabTextStyleMap[type] : tabTextStyle), children: [renderTabItemInner({
4080
4081
  text,
4081
4082
  description,
4082
4083
  icon,
4083
4084
  isActive,
4084
4085
  type,
4085
- }), appendRight ? jsx("div", { className: "ml-xs", children: appendRight }) : null] }) }));
4086
+ }), Number.isInteger(count) ? (jsx("div", { className: "ml-xs", children: jsx(Badge$1, { count: count, version: getVersion(isActive) }) })) : null] }) }));
4086
4087
  });
4087
4088
 
4088
4089
  const TabItem = JSX((props) => props?.item?.href ? jsx(LinkTabItem, { ...props }) : jsx(ButtonTabItem, { ...props }));
@@ -4400,8 +4401,8 @@
4400
4401
  return (jsxs("div", { className: style('space-y-1', className), children: [jsxs("div", { className: "bg-white", children: [jsxs("div", { className: "p-6xl pb-0", children: [jsx("div", { className: "flex flex-col sm:flex-row gap-xs mb-2xl", children: jsxs(Heading, { headingType: "h2", children: [title, lengthItems ? (jsx(Text, { size: "text-h2", color: "text-secondary-text", children: ` (${lengthItems})` })) : null] }) }), descriptionData ? renderDescriptionBlock$1(descriptionData) : null, onlyOffice && renderButtonsGroup(data, activeButton, setActiveButton), jsx("div", { className: style('pb-2xl', filtersVisibleStyles(activeButton)), children: renderFiltrationForm(Object.keys(initFilterState), { field, reset }, onlyOffice) })] }), jsx("div", { className: "h-[600px]", children: jsx(ClientOnly, { children: jsx(YandexMap, { points: points, className: "h-full" }) }) })] }), filteredItems.map(renderCard), filteredRemoteWorkplaces.map(renderRemoteWorkplaceCard)] }));
4401
4402
  });
4402
4403
  const renderButtonsGroup = (data, activeButton, onButtonClick) => {
4403
- const allButtonVersion = activeButton === 'all' ? 'primary' : 'secondary';
4404
- const businessButtonVersion = activeButton === 'business' ? 'primary' : 'secondary';
4404
+ const allButtonVersion = getVersion(activeButton === 'all');
4405
+ const businessButtonVersion = getVersion(activeButton === 'business');
4405
4406
  const handleClick = (e, key, branches) => {
4406
4407
  if (e.currentTarget === e.target && key === 'business') {
4407
4408
  branches.filter((branch) => branch.workSchedule &&
@@ -5268,14 +5269,19 @@
5268
5269
  };
5269
5270
 
5270
5271
  const scrollButtonStyle = 'hidden sm:flex absolute z-40';
5271
- const scrollStyleType = {
5272
+ const scrollStyle = {
5273
+ default: {
5274
+ item: 'flex-1',
5275
+ gap: 0,
5276
+ buttonTop: 'top-0',
5277
+ },
5272
5278
  animated: {
5273
- itemClassName: 'flex',
5279
+ item: 'flex',
5274
5280
  gap: 8,
5275
5281
  buttonTop: 'top-5',
5276
5282
  },
5277
5283
  underlined: {
5278
- itemClassName: '',
5284
+ item: '',
5279
5285
  gap: 0,
5280
5286
  buttonTop: 'top-0',
5281
5287
  },
@@ -5284,7 +5290,7 @@
5284
5290
  const [containerRef, scroll] = useSwipeListScroll({
5285
5291
  itemCount: items?.length || 0,
5286
5292
  });
5287
- return (jsxs("div", { className: style('relative overflow-x-auto no-scrollbar', className), children: [jsx(SwipeListContainer, { containerRef: containerRef, snapAlign: "snap-start", onVisibleIndicesChange: scroll.handleVisibleIndicesChange, itemClassName: scrollStyleType[tabsType].itemClassName, gap: scrollStyleType[tabsType].gap, children: items.map(renderTab(value, onChange, tabsType)) }), scroll.canScrollLeft ? (jsx(ScrollLeftButton, { className: style('left-6', scrollButtonStyle, scrollStyleType[tabsType].buttonTop), onClick: scroll.scrollLeft })) : null, scroll.canScrollRight ? (jsx(ScrollRightButton, { className: style('right-6', scrollButtonStyle, scrollStyleType[tabsType].buttonTop), onClick: scroll.scrollRight })) : null] }));
5293
+ return (jsxs("div", { className: style('relative overflow-x-auto no-scrollbar', className), children: [jsx(SwipeListContainer, { containerRef: containerRef, snapAlign: "snap-start", onVisibleIndicesChange: scroll.handleVisibleIndicesChange, itemClassName: scrollStyle[tabsType].item, gap: scrollStyle[tabsType].gap, children: items.map(renderTab(value, onChange, tabsType)) }), scroll.canScrollLeft ? (jsx(ScrollLeftButton, { className: style('left-6', scrollButtonStyle, scrollStyle[tabsType].buttonTop), onClick: scroll.scrollLeft })) : null, scroll.canScrollRight ? (jsx(ScrollRightButton, { className: style('right-6', scrollButtonStyle, scrollStyle[tabsType].buttonTop), onClick: scroll.scrollRight })) : null] }));
5288
5294
  });
5289
5295
 
5290
5296
  const renderTabs = ({ tabsMode, ...props }) => {
@@ -5361,32 +5367,41 @@
5361
5367
  };
5362
5368
  const normalizeTab = (_) => _?.type === 'group' ? { text: _.title, name: _.ref } : _;
5363
5369
 
5364
- const renderTabsLayout = ({ tabsType = 'animated', ...props }) => {
5365
- switch (tabsType) {
5366
- case 'default':
5367
- return jsx(TabsControl, { ...props });
5368
- case 'underlined':
5369
- return (jsx("div", { className: "flex", children: jsx(TabsControl, { className: "m-auto", tabsType: "underlined", ...props }) }));
5370
- case 'animated':
5371
- return (jsx("div", { className: "border-b-8 border-primary-main", children: jsx(ScrollableTabsControl, { className: "m-auto", ...props, tabsType: "animated" }) }));
5372
- default:
5373
- return null;
5374
- }
5370
+ const tabsStyle = {
5371
+ default: {
5372
+ wrapper: '',
5373
+ component: '',
5374
+ },
5375
+ animated: {
5376
+ wrapper: 'border-b-8 border-primary-main bg-white',
5377
+ component: 'm-auto',
5378
+ },
5379
+ underlined: {
5380
+ wrapper: 'flex',
5381
+ component: 'm-auto',
5382
+ },
5375
5383
  };
5384
+ const renderTabsLayout = ({ tabsType = 'animated', ...props }) => tabsType ? (jsx("div", { className: tabsStyle[tabsType].wrapper, children: jsx(ScrollableTabsControl, { className: tabsStyle[tabsType].component, tabsType: tabsType, ...props }) })) : null;
5376
5385
 
5377
5386
  const TAB_QUERY_PARAM_KEY = 'tab';
5378
- const TabsLayout = UniBlock(({ className = '', tabs = [], block, tabsType, ...rest }) => {
5387
+ const TabsLayout = UniBlock(({ className = '', tabs = [], block, tabsType, showCounter = false, ...rest }) => {
5379
5388
  const router = useRouter();
5389
+ const tabsCounted = showCounter
5390
+ ? tabs.map((_) => ({
5391
+ ..._,
5392
+ count: block?.slots?.[_?.text ?? '']?.length ?? 0,
5393
+ }))
5394
+ : tabs;
5380
5395
  const { isReady } = router;
5381
- const [activeTabIndex, setActiveTabIndex] = useState(getInitSelectedIndex(tabs));
5382
- const defaultSelectedTab = tabs.findIndex((_) => Boolean(_.selected));
5396
+ const [activeTabIndex, setActiveTabIndex] = useState(getInitSelectedIndex(tabsCounted));
5397
+ const defaultSelectedTab = tabsCounted.findIndex((_) => Boolean(_.selected));
5383
5398
  useEffect(() => {
5384
5399
  const defaultTabIndex = router.query[TAB_QUERY_PARAM_KEY]
5385
- ? tabs.findIndex((_, index) => _.type === 'group' && String(index) === router.query[TAB_QUERY_PARAM_KEY])
5400
+ ? tabsCounted.findIndex((_, index) => _.type === 'group' && String(index) === router.query[TAB_QUERY_PARAM_KEY])
5386
5401
  : defaultSelectedTab;
5387
5402
  setActiveTabIndex(defaultTabIndex === -1 ? 0 : defaultTabIndex);
5388
5403
  }, [isReady, defaultSelectedTab]);
5389
- const slotName = getSlotName(tabs[activeTabIndex], activeTabIndex);
5404
+ const slotName = getSlotName(tabsCounted[activeTabIndex], activeTabIndex);
5390
5405
  const updateUrlSearchTabParam = (_, index) => {
5391
5406
  const searchParams = new URLSearchParams(router.query);
5392
5407
  if (_.text) {
@@ -5398,16 +5413,16 @@
5398
5413
  router.replace(`${router.pathname}?${searchParams}`, '', { scroll: false });
5399
5414
  };
5400
5415
  const handleChange = useCallback((_) => {
5401
- const index = tabs.indexOf(_);
5402
- const tab = tabs[index];
5416
+ const index = tabsCounted.indexOf(_);
5417
+ const tab = tabsCounted[index];
5403
5418
  setActiveTabIndex(index);
5404
5419
  if (tab.type === 'group') {
5405
5420
  updateUrlSearchTabParam(_, index);
5406
5421
  }
5407
- }, [tabs]);
5422
+ }, [tabsCounted]);
5408
5423
  return (jsxs(BlockWrapper, { className: style(className), defaultPadding: "p-0", ...rest, children: [renderTabsLayout({
5409
- items: tabs,
5410
- value: tabs[activeTabIndex],
5424
+ items: tabsCounted,
5425
+ value: tabsCounted[activeTabIndex],
5411
5426
  tabsType,
5412
5427
  onChange: handleChange,
5413
5428
  }), jsx("div", { className: "space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs", children: renderBlocksList(block?.slots?.[slotName], {
@@ -5790,7 +5805,7 @@
5790
5805
  slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
5791
5806
  });
5792
5807
 
5793
- const packageVersion = "0.14.334";
5808
+ const packageVersion = "0.14.336";
5794
5809
 
5795
5810
  exports.Blocks = Blocks;
5796
5811
  exports.ContentPage = ContentPage;