@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.
- package/dist/commerce.cjs.development.js +14 -12
- package/dist/commerce.cjs.development.js.map +1 -1
- package/dist/commerce.cjs.production.min.js +1 -1
- package/dist/commerce.cjs.production.min.js.map +1 -1
- package/dist/commerce.esm.js +14 -12
- package/dist/commerce.esm.js.map +1 -1
- package/dist/types/site.d.ts +3 -1
- package/package.json +2 -2
package/dist/commerce.esm.js
CHANGED
|
@@ -1554,13 +1554,6 @@ var useCategories = function useCategories(input) {
|
|
|
1554
1554
|
}, hook))(input);
|
|
1555
1555
|
};
|
|
1556
1556
|
|
|
1557
|
-
var useCommerceExtraFeatures = function useCommerceExtraFeatures() {
|
|
1558
|
-
var _useCommerce = useCommerce(),
|
|
1559
|
-
providerRef = _useCommerce.providerRef;
|
|
1560
|
-
|
|
1561
|
-
return providerRef.current.extraFeatures;
|
|
1562
|
-
};
|
|
1563
|
-
|
|
1564
1557
|
var categoryCollectionMeta = {
|
|
1565
1558
|
name: "plasmic-commerce-category-collection",
|
|
1566
1559
|
displayName: "Category Collection",
|
|
@@ -1608,8 +1601,10 @@ var categoryCollectionMeta = {
|
|
|
1608
1601
|
var _ctx$categories$map;
|
|
1609
1602
|
|
|
1610
1603
|
return (_ctx$categories$map = ctx == null ? void 0 : ctx.categories.map(function (category) {
|
|
1604
|
+
var _category$depth;
|
|
1605
|
+
|
|
1611
1606
|
return {
|
|
1612
|
-
label: category.name,
|
|
1607
|
+
label: "" + " ".repeat((_category$depth = category.depth) != null ? _category$depth : 0) + category.name,
|
|
1613
1608
|
value: category.id
|
|
1614
1609
|
};
|
|
1615
1610
|
})) != null ? _ctx$categories$map : [];
|
|
@@ -1634,7 +1629,6 @@ function CategoryCollection(props) {
|
|
|
1634
1629
|
emptyMessage = props.emptyMessage,
|
|
1635
1630
|
selectedCategory = props.category,
|
|
1636
1631
|
setControlContextData = props.setControlContextData;
|
|
1637
|
-
var features = useCommerceExtraFeatures();
|
|
1638
1632
|
var inEditor = React.useContext(PlasmicCanvasContext);
|
|
1639
1633
|
|
|
1640
1634
|
var _useCategories = useCategories(),
|
|
@@ -1643,7 +1637,6 @@ function CategoryCollection(props) {
|
|
|
1643
1637
|
|
|
1644
1638
|
var _useCategories2 = useCategories({
|
|
1645
1639
|
categoryId: selectedCategory,
|
|
1646
|
-
topologicalSort: !selectedCategory && (features == null ? void 0 : features.includeSubCategories),
|
|
1647
1640
|
addIsEmptyField: !!inEditor
|
|
1648
1641
|
}),
|
|
1649
1642
|
categories = _useCategories2.data,
|
|
@@ -1962,6 +1955,13 @@ var useBrands = function useBrands(input) {
|
|
|
1962
1955
|
}, hook))(input);
|
|
1963
1956
|
};
|
|
1964
1957
|
|
|
1958
|
+
var useCommerceExtraFeatures = function useCommerceExtraFeatures() {
|
|
1959
|
+
var _useCommerce = useCommerce(),
|
|
1960
|
+
providerRef = _useCommerce.providerRef;
|
|
1961
|
+
|
|
1962
|
+
return providerRef.current.extraFeatures;
|
|
1963
|
+
};
|
|
1964
|
+
|
|
1965
1965
|
var productCollectionMeta = {
|
|
1966
1966
|
name: "plasmic-commerce-product-collection",
|
|
1967
1967
|
displayName: "Product Collection",
|
|
@@ -2007,8 +2007,10 @@ var productCollectionMeta = {
|
|
|
2007
2007
|
var _ctx$categories$map;
|
|
2008
2008
|
|
|
2009
2009
|
return (_ctx$categories$map = ctx == null ? void 0 : ctx.categories.map(function (category) {
|
|
2010
|
+
var _category$depth;
|
|
2011
|
+
|
|
2010
2012
|
return {
|
|
2011
|
-
label: category.name,
|
|
2013
|
+
label: "" + " ".repeat((_category$depth = category.depth) != null ? _category$depth : 0) + category.name,
|
|
2012
2014
|
value: category.id
|
|
2013
2015
|
};
|
|
2014
2016
|
})) != null ? _ctx$categories$map : [];
|
|
@@ -2575,7 +2577,7 @@ var product = {
|
|
|
2575
2577
|
|
|
2576
2578
|
/*
|
|
2577
2579
|
Forked from https://github.com/vercel/commerce/tree/main/packages/commerce/src
|
|
2578
|
-
Changes: Added CategoryImage
|
|
2580
|
+
Changes: Added CategoryImage and depth/children/parent_id to Category
|
|
2579
2581
|
*/
|
|
2580
2582
|
|
|
2581
2583
|
var site = {
|