@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.
- package/bin/migration-scripts/0.14.213.js +1 -1
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +57 -42
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +4 -1
- package/bundle/ui-kit/TabsControl/TabItem.d.ts +1 -2
- package/bundle/ui-kit/TabsControl/TabItemInner.d.ts +1 -0
- package/bundle/utils/getVersion.d.ts +1 -0
- package/dist/components/ApplicationForm/ApplicationFormContent.d.ts +4 -1
- package/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +3 -2
- package/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
- package/dist/components/TabsLayout/TabsLayout.js +16 -10
- package/dist/components/TabsLayout/TabsLayout.js.map +1 -1
- package/dist/components/TabsLayout/renderTabsLayout.js +14 -12
- package/dist/components/TabsLayout/renderTabsLayout.js.map +1 -1
- package/dist/ui-kit/Badge/Badge.js +1 -3
- package/dist/ui-kit/Badge/Badge.js.map +1 -1
- package/dist/ui-kit/BaseFiltration/useHotFilters.js +3 -3
- package/dist/ui-kit/BaseFiltration/useHotFilters.js.map +1 -1
- package/dist/ui-kit/TabsControl/ScrollableTabsControl.js +9 -4
- package/dist/ui-kit/TabsControl/ScrollableTabsControl.js.map +1 -1
- package/dist/ui-kit/TabsControl/TabItem.d.ts +1 -2
- package/dist/ui-kit/TabsControl/TabItem.js.map +1 -1
- package/dist/ui-kit/TabsControl/TabItemInner.d.ts +1 -0
- package/dist/ui-kit/TabsControl/TabItemInner.js +4 -2
- package/dist/ui-kit/TabsControl/TabItemInner.js.map +1 -1
- package/dist/utils/getVersion.d.ts +1 -0
- package/dist/utils/getVersion.js +5 -0
- package/dist/utils/getVersion.js.map +1 -0
- package/lib/components/ApplicationForm/ApplicationFormContent.d.ts +4 -1
- package/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +3 -2
- package/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
- package/lib/components/TabsLayout/TabsLayout.fixture.d.ts +4 -3
- package/lib/components/TabsLayout/TabsLayout.fixture.mobile.d.ts +4 -2
- package/lib/components/TabsLayout/TabsLayout.js +16 -10
- package/lib/components/TabsLayout/TabsLayout.js.map +1 -1
- package/lib/components/TabsLayout/renderTabsLayout.js +14 -12
- package/lib/components/TabsLayout/renderTabsLayout.js.map +1 -1
- package/lib/ui-kit/Badge/Badge.js +1 -3
- package/lib/ui-kit/Badge/Badge.js.map +1 -1
- package/lib/ui-kit/BaseFiltration/useHotFilters.js +3 -3
- package/lib/ui-kit/BaseFiltration/useHotFilters.js.map +1 -1
- package/lib/ui-kit/TabsControl/ScrollableTabsControl.js +9 -4
- package/lib/ui-kit/TabsControl/ScrollableTabsControl.js.map +1 -1
- package/lib/ui-kit/TabsControl/TabItem.d.ts +1 -2
- package/lib/ui-kit/TabsControl/TabItem.js.map +1 -1
- package/lib/ui-kit/TabsControl/TabItemInner.d.ts +1 -0
- package/lib/ui-kit/TabsControl/TabItemInner.js +4 -2
- package/lib/ui-kit/TabsControl/TabItemInner.js.map +1 -1
- package/lib/utils/getVersion.d.ts +1 -0
- package/lib/utils/getVersion.js +2 -0
- package/lib/utils/getVersion.js.map +1 -0
- package/mobile/bundle/bundle.umd.js +57 -42
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +4 -1
- package/mobile/bundle/ui-kit/TabsControl/TabItem.d.ts +1 -2
- package/mobile/bundle/ui-kit/TabsControl/TabItemInner.d.ts +1 -0
- package/mobile/bundle/utils/getVersion.d.ts +1 -0
- package/mobile/dist/components/ApplicationForm/ApplicationFormContent.d.ts +4 -1
- package/mobile/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +3 -2
- package/mobile/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
- package/mobile/dist/components/TabsLayout/TabsLayout.js +16 -10
- package/mobile/dist/components/TabsLayout/TabsLayout.js.map +1 -1
- package/mobile/dist/components/TabsLayout/renderTabsLayout.js +14 -12
- package/mobile/dist/components/TabsLayout/renderTabsLayout.js.map +1 -1
- package/mobile/dist/ui-kit/Badge/Badge.js +1 -3
- package/mobile/dist/ui-kit/Badge/Badge.js.map +1 -1
- package/mobile/dist/ui-kit/BaseFiltration/useHotFilters.js +3 -3
- package/mobile/dist/ui-kit/BaseFiltration/useHotFilters.js.map +1 -1
- package/mobile/dist/ui-kit/TabsControl/ScrollableTabsControl.js +9 -4
- package/mobile/dist/ui-kit/TabsControl/ScrollableTabsControl.js.map +1 -1
- package/mobile/dist/ui-kit/TabsControl/TabItem.d.ts +1 -2
- package/mobile/dist/ui-kit/TabsControl/TabItem.js.map +1 -1
- package/mobile/dist/ui-kit/TabsControl/TabItemInner.d.ts +1 -0
- package/mobile/dist/ui-kit/TabsControl/TabItemInner.js +4 -2
- package/mobile/dist/ui-kit/TabsControl/TabItemInner.js.map +1 -1
- package/mobile/dist/utils/getVersion.d.ts +1 -0
- package/mobile/dist/utils/getVersion.js +5 -0
- package/mobile/dist/utils/getVersion.js.map +1 -0
- package/mobile/lib/components/ApplicationForm/ApplicationFormContent.d.ts +4 -1
- package/mobile/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +3 -2
- package/mobile/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
- package/mobile/lib/components/TabsLayout/TabsLayout.js +16 -10
- package/mobile/lib/components/TabsLayout/TabsLayout.js.map +1 -1
- package/mobile/lib/components/TabsLayout/renderTabsLayout.js +14 -12
- package/mobile/lib/components/TabsLayout/renderTabsLayout.js.map +1 -1
- package/mobile/lib/ui-kit/Badge/Badge.js +1 -3
- package/mobile/lib/ui-kit/Badge/Badge.js.map +1 -1
- package/mobile/lib/ui-kit/BaseFiltration/useHotFilters.js +3 -3
- package/mobile/lib/ui-kit/BaseFiltration/useHotFilters.js.map +1 -1
- package/mobile/lib/ui-kit/TabsControl/ScrollableTabsControl.js +9 -4
- package/mobile/lib/ui-kit/TabsControl/ScrollableTabsControl.js.map +1 -1
- package/mobile/lib/ui-kit/TabsControl/TabItem.d.ts +1 -2
- package/mobile/lib/ui-kit/TabsControl/TabItem.js.map +1 -1
- package/mobile/lib/ui-kit/TabsControl/TabItemInner.d.ts +1 -0
- package/mobile/lib/ui-kit/TabsControl/TabItemInner.js +4 -2
- package/mobile/lib/ui-kit/TabsControl/TabItemInner.js.map +1 -1
- package/mobile/lib/utils/getVersion.d.ts +1 -0
- package/mobile/lib/utils/getVersion.js +2 -0
- package/mobile/lib/utils/getVersion.js.map +1 -0
- package/mobile/src/components/ApplicationForm/ApplicationFormContent.ts +4 -1
- package/mobile/src/components/OfficesAtmsMap/OfficesAtmsMapLayout.tsx +3 -2
- package/mobile/src/components/TabsLayout/TabsLayout.tsx +20 -10
- package/mobile/src/components/TabsLayout/renderTabsLayout.tsx +24 -20
- package/mobile/src/ui-kit/Badge/Badge.tsx +13 -15
- package/mobile/src/ui-kit/BaseFiltration/useHotFilters.tsx +3 -7
- package/mobile/src/ui-kit/TabsControl/ScrollableTabsControl.tsx +13 -16
- package/mobile/src/ui-kit/TabsControl/TabItem.tsx +1 -2
- package/mobile/src/ui-kit/TabsControl/TabItemInner.tsx +9 -2
- package/mobile/src/utils/getVersion.ts +1 -0
- package/package.json +1 -1
- package/src/components/ApplicationForm/ApplicationFormContent.ts +4 -1
- package/src/components/OfficesAtmsMap/OfficesAtmsMapLayout.tsx +3 -2
- package/src/components/TabsLayout/TabsLayout.fixture.mobile.tsx +70 -24
- package/src/components/TabsLayout/TabsLayout.fixture.tsx +33 -29
- package/src/components/TabsLayout/TabsLayout.tsx +20 -10
- package/src/components/TabsLayout/renderTabsLayout.tsx +24 -20
- package/src/ui-kit/Badge/Badge.tsx +13 -15
- package/src/ui-kit/BaseFiltration/useHotFilters.tsx +3 -7
- package/src/ui-kit/TabsControl/ScrollableTabsControl.tsx +13 -16
- package/src/ui-kit/TabsControl/TabItem.tsx +1 -2
- package/src/ui-kit/TabsControl/TabItemInner.tsx +9 -2
- package/src/utils/getVersion.ts +1 -0
package/bundle/bundle.umd.js
CHANGED
|
@@ -4677,17 +4677,7 @@
|
|
|
4677
4677
|
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] })] }) }));
|
|
4678
4678
|
});
|
|
4679
4679
|
|
|
4680
|
-
const
|
|
4681
|
-
primary: 'bg-white/30',
|
|
4682
|
-
secondary: 'bg-main-divider',
|
|
4683
|
-
};
|
|
4684
|
-
const badgeTextColorStyleMap = {
|
|
4685
|
-
primary: 'text-white',
|
|
4686
|
-
secondary: 'text-secondary-text',
|
|
4687
|
-
};
|
|
4688
|
-
const Badge$1 = JSX(({ count, version = 'secondary' }) => {
|
|
4689
|
-
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 }) }));
|
|
4690
|
-
});
|
|
4680
|
+
const getVersion = (isPrimary) => (isPrimary ? 'primary' : 'secondary');
|
|
4691
4681
|
|
|
4692
4682
|
const getBadgeCount = (blocks = [], filter = {}) => blocks.filter(({ content = {} }) => targetMatchPattern(filter, content)).length;
|
|
4693
4683
|
|
|
@@ -4710,7 +4700,8 @@
|
|
|
4710
4700
|
const activeItemIndex = useMemo(() => Math.max(0, hotFilters.findIndex((_) => hotFilterRecordCmp(_.filter, filtrationState))), [hotFilters, filtrationState]);
|
|
4711
4701
|
const items = useMemo(() => hotFilters.map((_) => ({
|
|
4712
4702
|
text: _.text,
|
|
4713
|
-
|
|
4703
|
+
count: getBadgeCount(blocks, _.filter),
|
|
4704
|
+
version: getVersion(_ === hotFilters[activeItemIndex]),
|
|
4714
4705
|
})), [hotFilters, blocks, activeItemIndex]);
|
|
4715
4706
|
const handleChange = useCallback((_) => {
|
|
4716
4707
|
onFiltrationStateChange(hotFilters[items.indexOf(_)].filter);
|
|
@@ -4722,6 +4713,16 @@
|
|
|
4722
4713
|
};
|
|
4723
4714
|
};
|
|
4724
4715
|
|
|
4716
|
+
const badgeBgStyleMap = {
|
|
4717
|
+
primary: 'bg-white/30',
|
|
4718
|
+
secondary: 'bg-main-divider',
|
|
4719
|
+
};
|
|
4720
|
+
const badgeTextColorStyleMap = {
|
|
4721
|
+
primary: 'text-white',
|
|
4722
|
+
secondary: 'text-secondary-text',
|
|
4723
|
+
};
|
|
4724
|
+
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 }) })));
|
|
4725
|
+
|
|
4725
4726
|
const getButtonClassNames = (isActive) => ({
|
|
4726
4727
|
btn: `w-96 ${isActive ? 'p-m border-none bg-primary-main text-white' : 'p-s ease-in duration-300 bg-white'}`,
|
|
4727
4728
|
text: isActive ? 'mb-xs text-xl' : 'mb-2xs text-l text-primary-text',
|
|
@@ -4762,14 +4763,14 @@
|
|
|
4762
4763
|
};
|
|
4763
4764
|
const TabItemInner = JSX(({ tag = 'div', item = {}, isActive = false, type = 'default', onClick }) => {
|
|
4764
4765
|
const Tag = tag;
|
|
4765
|
-
const { text, description, icon,
|
|
4766
|
+
const { text, description, icon, count, ...link } = item;
|
|
4766
4767
|
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({
|
|
4767
4768
|
text,
|
|
4768
4769
|
description,
|
|
4769
4770
|
icon,
|
|
4770
4771
|
isActive,
|
|
4771
4772
|
type,
|
|
4772
|
-
}),
|
|
4773
|
+
}), Number.isInteger(count) ? (jsx("div", { className: "ml-xs", children: jsx(Badge$1, { count: count, version: getVersion(isActive) }) })) : null] }) }));
|
|
4773
4774
|
});
|
|
4774
4775
|
|
|
4775
4776
|
const TabItem = JSX((props) => props?.item?.href ? jsx(LinkTabItem, { ...props }) : jsx(ButtonTabItem, { ...props }));
|
|
@@ -5028,8 +5029,8 @@
|
|
|
5028
5029
|
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)] }));
|
|
5029
5030
|
});
|
|
5030
5031
|
const renderButtonsGroup = (data, activeButton, onButtonClick) => {
|
|
5031
|
-
const allButtonVersion = activeButton === 'all'
|
|
5032
|
-
const businessButtonVersion = activeButton === 'business'
|
|
5032
|
+
const allButtonVersion = getVersion(activeButton === 'all');
|
|
5033
|
+
const businessButtonVersion = getVersion(activeButton === 'business');
|
|
5033
5034
|
const handleClick = (e, key, branches) => {
|
|
5034
5035
|
if (e.currentTarget === e.target && key === 'business') {
|
|
5035
5036
|
branches.filter((branch) => branch.workSchedule &&
|
|
@@ -5655,14 +5656,19 @@
|
|
|
5655
5656
|
const SwipeListControlBlock = UniBlock(({ listType, showDots, options, version, ...rest }) => (jsx(BlockWrapper, { version: version, defaultPadding: "p-0", ...rest, children: jsx(SwipeListControl, { listType: listType, showDots: showDots, version: version, children: renderChildren({ ...rest, options }) }) })), { childrenTypes: { exclude: ['SwipeListControlBlock'] } });
|
|
5656
5657
|
|
|
5657
5658
|
const scrollButtonStyle = 'hidden sm:flex absolute z-40';
|
|
5658
|
-
const
|
|
5659
|
+
const scrollStyle = {
|
|
5660
|
+
default: {
|
|
5661
|
+
item: 'flex-1',
|
|
5662
|
+
gap: 0,
|
|
5663
|
+
buttonTop: 'top-0',
|
|
5664
|
+
},
|
|
5659
5665
|
animated: {
|
|
5660
|
-
|
|
5666
|
+
item: 'flex',
|
|
5661
5667
|
gap: 8,
|
|
5662
5668
|
buttonTop: 'top-5',
|
|
5663
5669
|
},
|
|
5664
5670
|
underlined: {
|
|
5665
|
-
|
|
5671
|
+
item: '',
|
|
5666
5672
|
gap: 0,
|
|
5667
5673
|
buttonTop: 'top-0',
|
|
5668
5674
|
},
|
|
@@ -5671,7 +5677,7 @@
|
|
|
5671
5677
|
const [containerRef, scroll] = useSwipeListScroll({
|
|
5672
5678
|
itemCount: items?.length || 0,
|
|
5673
5679
|
});
|
|
5674
|
-
return (jsxs("div", { className: style('relative overflow-x-auto no-scrollbar', className), children: [jsx(SwipeListContainer, { containerRef: containerRef, snapAlign: "snap-start", onVisibleIndicesChange: scroll.handleVisibleIndicesChange, itemClassName:
|
|
5680
|
+
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] }));
|
|
5675
5681
|
});
|
|
5676
5682
|
|
|
5677
5683
|
const renderTabs = ({ tabsMode, ...props }) => {
|
|
@@ -5748,32 +5754,41 @@
|
|
|
5748
5754
|
};
|
|
5749
5755
|
const normalizeTab = (_) => _?.type === 'group' ? { text: _.title, name: _.ref } : _;
|
|
5750
5756
|
|
|
5751
|
-
const
|
|
5752
|
-
|
|
5753
|
-
|
|
5754
|
-
|
|
5755
|
-
|
|
5756
|
-
|
|
5757
|
-
|
|
5758
|
-
|
|
5759
|
-
|
|
5760
|
-
|
|
5761
|
-
|
|
5757
|
+
const tabsStyle = {
|
|
5758
|
+
default: {
|
|
5759
|
+
wrapper: '',
|
|
5760
|
+
component: '',
|
|
5761
|
+
},
|
|
5762
|
+
animated: {
|
|
5763
|
+
wrapper: 'border-b-8 border-primary-main bg-white',
|
|
5764
|
+
component: 'm-auto',
|
|
5765
|
+
},
|
|
5766
|
+
underlined: {
|
|
5767
|
+
wrapper: 'flex',
|
|
5768
|
+
component: 'm-auto',
|
|
5769
|
+
},
|
|
5762
5770
|
};
|
|
5771
|
+
const renderTabsLayout = ({ tabsType = 'animated', ...props }) => tabsType ? (jsx("div", { className: tabsStyle[tabsType].wrapper, children: jsx(ScrollableTabsControl, { className: tabsStyle[tabsType].component, tabsType: tabsType, ...props }) })) : null;
|
|
5763
5772
|
|
|
5764
5773
|
const TAB_QUERY_PARAM_KEY = 'tab';
|
|
5765
|
-
const TabsLayout = UniBlock(({ className = '', tabs = [], block, tabsType, ...rest }) => {
|
|
5774
|
+
const TabsLayout = UniBlock(({ className = '', tabs = [], block, tabsType, showCounter = false, ...rest }) => {
|
|
5766
5775
|
const router = useRouter();
|
|
5776
|
+
const tabsCounted = showCounter
|
|
5777
|
+
? tabs.map((_) => ({
|
|
5778
|
+
..._,
|
|
5779
|
+
count: block?.slots?.[_?.text ?? '']?.length ?? 0,
|
|
5780
|
+
}))
|
|
5781
|
+
: tabs;
|
|
5767
5782
|
const { isReady } = router;
|
|
5768
|
-
const [activeTabIndex, setActiveTabIndex] = useState(getInitSelectedIndex(
|
|
5769
|
-
const defaultSelectedTab =
|
|
5783
|
+
const [activeTabIndex, setActiveTabIndex] = useState(getInitSelectedIndex(tabsCounted));
|
|
5784
|
+
const defaultSelectedTab = tabsCounted.findIndex((_) => Boolean(_.selected));
|
|
5770
5785
|
useEffect(() => {
|
|
5771
5786
|
const defaultTabIndex = router.query[TAB_QUERY_PARAM_KEY]
|
|
5772
|
-
?
|
|
5787
|
+
? tabsCounted.findIndex((_, index) => _.type === 'group' && String(index) === router.query[TAB_QUERY_PARAM_KEY])
|
|
5773
5788
|
: defaultSelectedTab;
|
|
5774
5789
|
setActiveTabIndex(defaultTabIndex === -1 ? 0 : defaultTabIndex);
|
|
5775
5790
|
}, [isReady, defaultSelectedTab]);
|
|
5776
|
-
const slotName = getSlotName(
|
|
5791
|
+
const slotName = getSlotName(tabsCounted[activeTabIndex], activeTabIndex);
|
|
5777
5792
|
const updateUrlSearchTabParam = (_, index) => {
|
|
5778
5793
|
const searchParams = new URLSearchParams(router.query);
|
|
5779
5794
|
if (_.text) {
|
|
@@ -5785,16 +5800,16 @@
|
|
|
5785
5800
|
router.replace(`${router.pathname}?${searchParams}`, '', { scroll: false });
|
|
5786
5801
|
};
|
|
5787
5802
|
const handleChange = useCallback((_) => {
|
|
5788
|
-
const index =
|
|
5789
|
-
const tab =
|
|
5803
|
+
const index = tabsCounted.indexOf(_);
|
|
5804
|
+
const tab = tabsCounted[index];
|
|
5790
5805
|
setActiveTabIndex(index);
|
|
5791
5806
|
if (tab.type === 'group') {
|
|
5792
5807
|
updateUrlSearchTabParam(_, index);
|
|
5793
5808
|
}
|
|
5794
|
-
}, [
|
|
5809
|
+
}, [tabsCounted]);
|
|
5795
5810
|
return (jsxs(BlockWrapper, { className: style(className), defaultPadding: "p-0", ...rest, children: [renderTabsLayout({
|
|
5796
|
-
items:
|
|
5797
|
-
value:
|
|
5811
|
+
items: tabsCounted,
|
|
5812
|
+
value: tabsCounted[activeTabIndex],
|
|
5798
5813
|
tabsType,
|
|
5799
5814
|
onChange: handleChange,
|
|
5800
5815
|
}), jsx("div", { className: "space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs", children: renderBlocksList(block?.slots?.[slotName], {
|
|
@@ -6242,7 +6257,7 @@
|
|
|
6242
6257
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
6243
6258
|
});
|
|
6244
6259
|
|
|
6245
|
-
const packageVersion = "0.14.
|
|
6260
|
+
const packageVersion = "0.14.336";
|
|
6246
6261
|
|
|
6247
6262
|
exports.Blocks = Blocks;
|
|
6248
6263
|
exports.ContentPage = ContentPage;
|