@orderingstack/front-components-product-configurator 1.3.1 → 1.3.3
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/Counter/Counter.d.ts +1 -0
- package/dist/components/Counter/Counter.d.ts.map +1 -1
- package/dist/components/DisplayState/DisplayState.d.ts +1 -0
- package/dist/components/DisplayState/DisplayState.d.ts.map +1 -1
- package/dist/components/GroupStateInfo/GroupStateInfo.d.ts +1 -0
- package/dist/components/GroupStateInfo/GroupStateInfo.d.ts.map +1 -1
- package/dist/components/InfoLine/InfoLine.d.ts +1 -0
- package/dist/components/InfoLine/InfoLine.d.ts.map +1 -1
- package/dist/components/MenuItemsDispatcher/MenuItemsDispatcher.d.ts +1 -0
- package/dist/components/MenuItemsDispatcher/MenuItemsDispatcher.d.ts.map +1 -1
- package/dist/components/MenuOptions/MenuOptions.d.ts +1 -0
- package/dist/components/MenuOptions/MenuOptions.d.ts.map +1 -1
- package/dist/components/MenuOptions/MenuOptionsDefaultUI.d.ts +1 -0
- package/dist/components/MenuOptions/MenuOptionsDefaultUI.d.ts.map +1 -1
- package/dist/components/MenuProduct/MenuProduct.d.ts +1 -0
- package/dist/components/MenuProduct/MenuProduct.d.ts.map +1 -1
- package/dist/components/MenuProductRoot/MenuProductRoot.d.ts +1 -0
- package/dist/components/MenuProductRoot/MenuProductRoot.d.ts.map +1 -1
- package/dist/components/MenuProductRoot/MenuProductRootDefaultUI.d.ts +1 -0
- package/dist/components/MenuProductRoot/MenuProductRootDefaultUI.d.ts.map +1 -1
- package/dist/components/MenuProductRoot/MenuProductRootDefaultUIModal.d.ts +1 -0
- package/dist/components/MenuProductRoot/MenuProductRootDefaultUIModal.d.ts.map +1 -1
- package/dist/components/Price/Price.d.ts +1 -0
- package/dist/components/Price/Price.d.ts.map +1 -1
- package/dist/components/ProductConfigurator/ProductConfigurator.d.ts +1 -0
- package/dist/components/ProductConfigurator/ProductConfigurator.d.ts.map +1 -1
- package/dist/components/SimpleCheckbox/SimpleCheckbox.d.ts +1 -0
- package/dist/components/SimpleCheckbox/SimpleCheckbox.d.ts.map +1 -1
- package/dist/components/SimpleRadio/SimpleRadio.d.ts +1 -0
- package/dist/components/SimpleRadio/SimpleRadio.d.ts.map +1 -1
- package/dist/components/SubmitRow/SubmitRow.d.ts +1 -0
- package/dist/components/SubmitRow/SubmitRow.d.ts.map +1 -1
- package/dist/index.cjs.js +6 -6
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +2 -9
- package/dist/index.es.js.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/utils/validate.d.ts.map +1 -1
- package/package.json +2 -1
package/dist/index.es.js
CHANGED
|
@@ -6256,14 +6256,7 @@ const createFilterSlice = (set2) => ({
|
|
|
6256
6256
|
}
|
|
6257
6257
|
});
|
|
6258
6258
|
const isInputEnabled = (item, validationMap) => {
|
|
6259
|
-
|
|
6260
|
-
const { selCtx } = item;
|
|
6261
|
-
const isParentProductKind = ((_a = validationMap == null ? void 0 : validationMap[selCtx]) == null ? void 0 : _a.parentKind) === ProductKinds.PRODUCT;
|
|
6262
|
-
if (isParentProductKind) {
|
|
6263
|
-
return checkSelCtxParam(item, validationMap, "isSelCntAllowedToIncrement");
|
|
6264
|
-
} else {
|
|
6265
|
-
return checkSelCtxParam(item, validationMap, "isSelCntAllowedToIncrement") && checkParentSelCtxParam(item, validationMap, "isSelCntAllowedToIncrement");
|
|
6266
|
-
}
|
|
6259
|
+
return checkSelCtxParam(item, validationMap, "isSelCntAllowedToIncrement") && checkSelCtxParam(item, validationMap, "isQtyCntAllowedToIncrement") && checkParentSelCtxParam(item, validationMap, "isQtyCntAllowedToIncrement") && checkParentSelCtxParam(item, validationMap, "isQtyCntAllowedToIncrement");
|
|
6267
6260
|
};
|
|
6268
6261
|
const isInputCounterIncrementEnabled = (item, itemActualQty, validationMap) => {
|
|
6269
6262
|
var _a;
|
|
@@ -6477,7 +6470,7 @@ function getValidSelectedState(product, selected) {
|
|
|
6477
6470
|
}
|
|
6478
6471
|
function useProductConfigurator(product) {
|
|
6479
6472
|
var _a;
|
|
6480
|
-
const [productQuantity, setProductQuantity] = useState(1);
|
|
6473
|
+
const [productQuantity, setProductQuantity] = useState(Number(product.quantity) || 1);
|
|
6481
6474
|
const encodedProduct = encodeProduct(product);
|
|
6482
6475
|
const { state: { filter: initFilter = {} } = {} } = encodedProduct;
|
|
6483
6476
|
const initSelected = getValidSelectedState(
|