@plasmicpkgs/commerce 0.0.42 → 0.0.43

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.
@@ -1640,6 +1640,8 @@ var categoryCollectionMeta = {
1640
1640
  importName: "CategoryCollection"
1641
1641
  };
1642
1642
  function CategoryCollection(props) {
1643
+ var _categories$findIndex;
1644
+
1643
1645
  var children = props.children,
1644
1646
  noLayout = props.noLayout,
1645
1647
  className = props.className,
@@ -1669,11 +1671,14 @@ function CategoryCollection(props) {
1669
1671
  var firstCategoryNotEmpty = categories == null ? void 0 : categories.find(function (category) {
1670
1672
  return !category.isEmpty;
1671
1673
  });
1674
+ var firstCategoryNotEmptyIndex = (_categories$findIndex = categories == null ? void 0 : categories.findIndex(function (category) {
1675
+ return !category.isEmpty;
1676
+ })) != null ? _categories$findIndex : -1;
1672
1677
  var renderedData = categories == null ? void 0 : categories.map(function (category, i) {
1673
1678
  return React__default.createElement(CategoryProvider, {
1674
1679
  category: category,
1675
1680
  key: category.id
1676
- }, host.repeatedElement(firstCategoryNotEmpty ? category === firstCategoryNotEmpty : i === 0, children));
1681
+ }, host.repeatedElement(i < firstCategoryNotEmptyIndex ? i + 1 : i === firstCategoryNotEmptyIndex ? 0 : i, children));
1677
1682
  });
1678
1683
 
1679
1684
  if ([isAllCategoriesLoading, isLoading].includes(true)) {
@@ -2129,7 +2134,7 @@ function ProductCollection(props) {
2129
2134
  return React__default.createElement(ProductProvider, {
2130
2135
  product: product,
2131
2136
  key: product.id
2132
- }, host.repeatedElement(i === 0, children));
2137
+ }, host.repeatedElement(i, children));
2133
2138
  });
2134
2139
 
2135
2140
  if ([isSearchLoading, isBrandsLoading, isCategoriesLoading].includes(true)) {
@@ -2291,7 +2296,7 @@ function ProductMediaCollection(props) {
2291
2296
  return React__default.createElement("div", {
2292
2297
  className: className
2293
2298
  }, product == null ? void 0 : product.images.map(function (image, i) {
2294
- return host.repeatedElement(i === 0, React__default.createElement(ProductMediaProvider, {
2299
+ return host.repeatedElement(i, React__default.createElement(ProductMediaProvider, {
2295
2300
  mediaIndex: i,
2296
2301
  children: media
2297
2302
  }));
@@ -2456,7 +2461,7 @@ function ProductSlider(props) {
2456
2461
  gridTemplateColumns: "repeat(" + thumbsVisible + ", 1fr)"
2457
2462
  }
2458
2463
  }, product.images.slice(leftIndex, leftIndex + thumbsVisible).map(function (image, i) {
2459
- return host.repeatedElement(i === 0, React__default.createElement(ProductMediaProvider, {
2464
+ return host.repeatedElement(i, React__default.createElement(ProductMediaProvider, {
2460
2465
  mediaIndex: leftIndex + i,
2461
2466
  children: thumbsContainer,
2462
2467
  onClick: function onClick() {