@plasmicpkgs/commerce 0.0.15 → 0.0.16

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.
@@ -1561,13 +1561,6 @@ var useCategories = function useCategories(input) {
1561
1561
  }, hook))(input);
1562
1562
  };
1563
1563
 
1564
- var useCommerceExtraFeatures = function useCommerceExtraFeatures() {
1565
- var _useCommerce = useCommerce(),
1566
- providerRef = _useCommerce.providerRef;
1567
-
1568
- return providerRef.current.extraFeatures;
1569
- };
1570
-
1571
1564
  var categoryCollectionMeta = {
1572
1565
  name: "plasmic-commerce-category-collection",
1573
1566
  displayName: "Category Collection",
@@ -1615,8 +1608,10 @@ var categoryCollectionMeta = {
1615
1608
  var _ctx$categories$map;
1616
1609
 
1617
1610
  return (_ctx$categories$map = ctx == null ? void 0 : ctx.categories.map(function (category) {
1611
+ var _category$depth;
1612
+
1618
1613
  return {
1619
- label: category.name,
1614
+ label: "" + " ".repeat((_category$depth = category.depth) != null ? _category$depth : 0) + category.name,
1620
1615
  value: category.id
1621
1616
  };
1622
1617
  })) != null ? _ctx$categories$map : [];
@@ -1641,7 +1636,6 @@ function CategoryCollection(props) {
1641
1636
  emptyMessage = props.emptyMessage,
1642
1637
  selectedCategory = props.category,
1643
1638
  setControlContextData = props.setControlContextData;
1644
- var features = useCommerceExtraFeatures();
1645
1639
  var inEditor = React__default.useContext(host.PlasmicCanvasContext);
1646
1640
 
1647
1641
  var _useCategories = useCategories(),
@@ -1650,7 +1644,6 @@ function CategoryCollection(props) {
1650
1644
 
1651
1645
  var _useCategories2 = useCategories({
1652
1646
  categoryId: selectedCategory,
1653
- topologicalSort: !selectedCategory && (features == null ? void 0 : features.includeSubCategories),
1654
1647
  addIsEmptyField: !!inEditor
1655
1648
  }),
1656
1649
  categories = _useCategories2.data,
@@ -1969,6 +1962,13 @@ var useBrands = function useBrands(input) {
1969
1962
  }, hook))(input);
1970
1963
  };
1971
1964
 
1965
+ var useCommerceExtraFeatures = function useCommerceExtraFeatures() {
1966
+ var _useCommerce = useCommerce(),
1967
+ providerRef = _useCommerce.providerRef;
1968
+
1969
+ return providerRef.current.extraFeatures;
1970
+ };
1971
+
1972
1972
  var productCollectionMeta = {
1973
1973
  name: "plasmic-commerce-product-collection",
1974
1974
  displayName: "Product Collection",
@@ -2014,8 +2014,10 @@ var productCollectionMeta = {
2014
2014
  var _ctx$categories$map;
2015
2015
 
2016
2016
  return (_ctx$categories$map = ctx == null ? void 0 : ctx.categories.map(function (category) {
2017
+ var _category$depth;
2018
+
2017
2019
  return {
2018
- label: category.name,
2020
+ label: "" + " ".repeat((_category$depth = category.depth) != null ? _category$depth : 0) + category.name,
2019
2021
  value: category.id
2020
2022
  };
2021
2023
  })) != null ? _ctx$categories$map : [];
@@ -2582,7 +2584,7 @@ var product = {
2582
2584
 
2583
2585
  /*
2584
2586
  Forked from https://github.com/vercel/commerce/tree/main/packages/commerce/src
2585
- Changes: Added CategoryImage
2587
+ Changes: Added CategoryImage and depth/children/parent_id to Category
2586
2588
  */
2587
2589
 
2588
2590
  var site = {