@orderingstack/front-components-product-configurator 1.5.2-beta.0 → 1.5.3-beta.0
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/components/MenuOptions/MenuOptions.d.ts.map +1 -1
- package/dist/components/MenuProduct/useMenuProduct.d.ts.map +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +11 -10
- package/dist/index.es.js.map +1 -1
- package/dist/utils/filter.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/index.es.js
CHANGED
|
@@ -6699,9 +6699,7 @@ const validateProductFilter = (product, stateFilter) => {
|
|
|
6699
6699
|
const commonFilters = (_a = Object.keys(stateFiltersWithFltCtx)) == null ? void 0 : _a.filter(
|
|
6700
6700
|
(filterName) => {
|
|
6701
6701
|
var _a2;
|
|
6702
|
-
const matchingFilters = (_a2 = Object.keys(
|
|
6703
|
-
(productFilters == null ? void 0 : productFilters[filterName]) || {}
|
|
6704
|
-
)) == null ? void 0 : _a2.filter((x2) => {
|
|
6702
|
+
const matchingFilters = (_a2 = Object.keys((productFilters == null ? void 0 : productFilters[filterName]) || {})) == null ? void 0 : _a2.filter((x2) => {
|
|
6705
6703
|
var _a3;
|
|
6706
6704
|
if (((_a3 = productFilters == null ? void 0 : productFilters[filterName]) == null ? void 0 : _a3[x2]) === (stateFiltersWithFltCtx == null ? void 0 : stateFiltersWithFltCtx[filterName])) {
|
|
6707
6705
|
return true;
|
|
@@ -8434,7 +8432,6 @@ const MenuOptions = (props) => {
|
|
|
8434
8432
|
currency,
|
|
8435
8433
|
nestedLvl
|
|
8436
8434
|
};
|
|
8437
|
-
console.log("prod conf nestedLvl new", nestedLvl);
|
|
8438
8435
|
if (MenuOptionsUI) {
|
|
8439
8436
|
return /* @__PURE__ */ jsx(MenuOptionsUI, {
|
|
8440
8437
|
...menuOptionsProps,
|
|
@@ -8878,9 +8875,11 @@ function useMenuProduct(product, parentAttrs, nestedLvl, parentPriduct) {
|
|
|
8878
8875
|
var _a3;
|
|
8879
8876
|
return { key: y2, subProductId: (_a3 = findProductInParentProductBySelCtx(product, y2)) == null ? void 0 : _a3.id };
|
|
8880
8877
|
})) == null ? void 0 : _b.filter((x2) => !!x2.subProductId);
|
|
8881
|
-
|
|
8882
|
-
|
|
8883
|
-
|
|
8878
|
+
if (valueNumber === 0) {
|
|
8879
|
+
importantSubProductsInState == null ? void 0 : importantSubProductsInState.forEach((x2) => {
|
|
8880
|
+
setValue(`selected.${x2.key}.${x2.subProductId}`, `${valueNumber + 1}`);
|
|
8881
|
+
});
|
|
8882
|
+
}
|
|
8884
8883
|
};
|
|
8885
8884
|
const handleCounterDecrementQty = () => {
|
|
8886
8885
|
var _a2, _b, _c, _d;
|
|
@@ -8890,9 +8889,11 @@ function useMenuProduct(product, parentAttrs, nestedLvl, parentPriduct) {
|
|
|
8890
8889
|
var _a3;
|
|
8891
8890
|
return { key: y2, subProductId: (_a3 = findProductInParentProductBySelCtx(product, y2)) == null ? void 0 : _a3.id };
|
|
8892
8891
|
})) == null ? void 0 : _b.filter((x2) => !!x2.subProductId);
|
|
8893
|
-
|
|
8894
|
-
|
|
8895
|
-
|
|
8892
|
+
if (decrementedValue === 0) {
|
|
8893
|
+
importantSubProductsInState == null ? void 0 : importantSubProductsInState.forEach((x2) => {
|
|
8894
|
+
setValue(`selected.${x2.key}.${x2.subProductId}`, `${decrementedValue}`);
|
|
8895
|
+
});
|
|
8896
|
+
}
|
|
8896
8897
|
if (isCheckbox && decrementedValue === 0) {
|
|
8897
8898
|
setValue(`selected.${selCtx}.${id}`, false);
|
|
8898
8899
|
(_c = Object.keys(emit)) == null ? void 0 : _c.forEach((x2) => {
|