@redneckz/wildless-cms-uni-blocks 0.8.3 → 0.8.4

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.
@@ -1944,7 +1944,7 @@
1944
1944
  itemCount: count,
1945
1945
  isCyclic,
1946
1946
  });
1947
- const isBankHistoryCarousel = childBlocks && childBlocks[0].type === 'CarouselBankHistoryCard';
1947
+ const isBankHistoryCarousel = childBlocks && childBlocks[0]?.type === 'CarouselBankHistoryCard';
1948
1948
  return (jsx(BlockWrapper, { className: style(getPaddingStyle(isPadding), className), ...rest, children: jsxs("div", { className: "relative max-w-full", children: [jsx(SwipeListContainer, { containerRef: containerRef, visibleItemCount: visibleItemCount, snapAlign: "snap-start", gap: ITEMS_GAP, onVisibleIndicesChange: scroll.handleVisibleIndicesChange, children: renderChildren({
1949
1949
  ...rest,
1950
1950
  block: { ...rest.block, blocks: buildBlocks(childBlocks, activeIndex) },
@@ -2640,7 +2640,11 @@
2640
2640
  const renderMonthNames = (item, colSize) => item.month?.map((_, i) => (jsx("div", { style: { flexBasis: `${colSize}%` }, children: _.text }, `monthName-${i}`)));
2641
2641
  const renderMonthImages = (item) => item.month?.map((_) => _.image?.src ? (jsx("div", { className: "h-[207px] border-r pr-3 mr-3 border-main-divider last:border-r-0 last:pr-0 last:mr-0", children: jsx(ImgInner, { image: _.image, className: "flex" }) }, `monthImage-${_.image.src}`)) : null);
2642
2642
 
2643
- const isHrefActive = (router) => ({ href }) => withoutQuery(isURL(href) ? router.href : router.pathname).startsWith(withoutQuery(href));
2643
+ const isHrefActive = (router) => ({ href }) => {
2644
+ const { BASE_PATH } = projectSettings;
2645
+ const relativeHref = BASE_PATH && href?.startsWith(BASE_PATH) ? href.substring(BASE_PATH.length) : href;
2646
+ return withoutQuery(isURL(href) ? router.href : router.pathname).startsWith(withoutQuery(relativeHref));
2647
+ };
2644
2648
 
2645
2649
  const isTopItemActive = (router) => (topItem) => topItem.items?.some(isHrefActive(router)) || isHrefActive(router)(topItem);
2646
2650
 
@@ -4558,7 +4562,7 @@
4558
4562
  return (jsx("div", { className: "flex items-end absolute bottom-0 right-0 h-full pointer-events-none", children: jsx(LikeControl, { className: "rounded-tl-lg sticky bottom-0 pointer-events-auto" }) }));
4559
4563
  }
4560
4564
 
4561
- const packageVersion = "0.8.3";
4565
+ const packageVersion = "0.8.4";
4562
4566
 
4563
4567
  exports.Blocks = Blocks;
4564
4568
  exports.ContentPage = ContentPage;