@orderingstack/front-components-product-configurator 1.8.0 → 2.0.0-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/MenuItemsDispatcher/MenuItemsDispatcher.d.ts +1 -0
- package/dist/components/MenuProductRoot/MenuProductRoot.d.ts +3 -1
- package/dist/components/ProductConfigurator/ProductConfigurator.d.ts +5 -1
- package/dist/index.cjs.js +6 -6
- package/dist/index.es.js +15 -7
- package/package.json +2 -1
package/dist/index.es.js
CHANGED
|
@@ -8515,7 +8515,7 @@ const MenuOptions = (props) => {
|
|
|
8515
8515
|
const {
|
|
8516
8516
|
MenuOptionsUI
|
|
8517
8517
|
} = useComponents();
|
|
8518
|
-
if (!isFilterValidated) {
|
|
8518
|
+
if (!isFilterValidated || (optionsItem == null ? void 0 : optionsItem.outsideAvailabilitySlot) === true) {
|
|
8519
8519
|
return null;
|
|
8520
8520
|
}
|
|
8521
8521
|
const MenuItemsDispatcherWrapper = /* @__PURE__ */ jsx(MenuItemsDispatcher, {
|
|
@@ -9242,6 +9242,9 @@ const MenuProduct = (props) => {
|
|
|
9242
9242
|
const {
|
|
9243
9243
|
MenuProductUI
|
|
9244
9244
|
} = useComponents();
|
|
9245
|
+
if (product == null ? void 0 : product.outsideAvailabilitySlot) {
|
|
9246
|
+
return /* @__PURE__ */ jsx(Fragment, {});
|
|
9247
|
+
}
|
|
9245
9248
|
const menuProductProps = {
|
|
9246
9249
|
product,
|
|
9247
9250
|
nestedLvl,
|
|
@@ -9363,7 +9366,8 @@ function MenuItemsDispatcher(props) {
|
|
|
9363
9366
|
productItems,
|
|
9364
9367
|
nestedLvl = 1,
|
|
9365
9368
|
parentProduct,
|
|
9366
|
-
rootProduct
|
|
9369
|
+
rootProduct,
|
|
9370
|
+
showOutsideAvailabilitySlotItems
|
|
9367
9371
|
} = props;
|
|
9368
9372
|
const {
|
|
9369
9373
|
attrs: parentAttrs = {},
|
|
@@ -9379,7 +9383,7 @@ function MenuItemsDispatcher(props) {
|
|
|
9379
9383
|
} = useComponents();
|
|
9380
9384
|
const renderMenuItem = (productItem) => {
|
|
9381
9385
|
var _a;
|
|
9382
|
-
if (isAnyGroupOptionKind(productItem.kind) && !((_a = productItem == null ? void 0 : productItem.items) == null ? void 0 : _a.find((x2) => {
|
|
9386
|
+
if (showOutsideAvailabilitySlotItems !== true && (productItem == null ? void 0 : productItem.outsideAvailabilitySlot) === true || isAnyGroupOptionKind(productItem.kind) && !((_a = productItem == null ? void 0 : productItem.items) == null ? void 0 : _a.find((x2) => {
|
|
9383
9387
|
var _a2, _b;
|
|
9384
9388
|
return ((_a2 = x2 == null ? void 0 : x2.attrs) == null ? void 0 : _a2.hidden) !== true && ((_b = x2 == null ? void 0 : x2._) == null ? void 0 : _b.hidden) !== "true";
|
|
9385
9389
|
}))) {
|
|
@@ -10885,7 +10889,8 @@ function useGroupsValidation(product) {
|
|
|
10885
10889
|
}
|
|
10886
10890
|
const MenuProductRoot = (props) => {
|
|
10887
10891
|
const {
|
|
10888
|
-
product
|
|
10892
|
+
product,
|
|
10893
|
+
showOutsideAvailabilitySlotItems
|
|
10889
10894
|
} = props;
|
|
10890
10895
|
const {
|
|
10891
10896
|
MenuProductRootUI
|
|
@@ -10896,7 +10901,8 @@ const MenuProductRoot = (props) => {
|
|
|
10896
10901
|
const MenuItemsDispatcherWrapper = !isEmpty(product.items) ? /* @__PURE__ */ jsx(MenuItemsDispatcher, {
|
|
10897
10902
|
productItems: product.items,
|
|
10898
10903
|
parentProduct: product,
|
|
10899
|
-
rootProduct: product
|
|
10904
|
+
rootProduct: product,
|
|
10905
|
+
showOutsideAvailabilitySlotItems
|
|
10900
10906
|
}) : /* @__PURE__ */ jsx(Fragment, {});
|
|
10901
10907
|
if (MenuProductRootUI) {
|
|
10902
10908
|
return /* @__PURE__ */ jsx(MenuProductRootUI, {
|
|
@@ -10940,7 +10946,8 @@ function ProductConfigurator(props) {
|
|
|
10940
10946
|
isOpen,
|
|
10941
10947
|
handleClose,
|
|
10942
10948
|
currency,
|
|
10943
|
-
showDebugState = false
|
|
10949
|
+
showDebugState = false,
|
|
10950
|
+
showOutsideAvailabilitySlotItems
|
|
10944
10951
|
} = props;
|
|
10945
10952
|
const {
|
|
10946
10953
|
price
|
|
@@ -11029,7 +11036,8 @@ function ProductConfigurator(props) {
|
|
|
11029
11036
|
countedProductTotalPrice: countedProductPrice * productQuantity,
|
|
11030
11037
|
increaseProductQuantity,
|
|
11031
11038
|
decreaseProductQuantity,
|
|
11032
|
-
currency
|
|
11039
|
+
currency,
|
|
11040
|
+
showOutsideAvailabilitySlotItems
|
|
11033
11041
|
})
|
|
11034
11042
|
})]
|
|
11035
11043
|
})
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orderingstack/front-components-product-configurator",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0-beta.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.es.js",
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
"test": "vitest",
|
|
18
18
|
"test:cov": "vitest run --coverage --silent",
|
|
19
19
|
"lint": "eslint src --max-warnings=0",
|
|
20
|
+
"lint:fix": "eslint --fix --debug --ext .js,.jsx,.ts,.tsx ./src",
|
|
20
21
|
"storybook": "start-storybook -p 6006",
|
|
21
22
|
"build-storybook": "build-storybook",
|
|
22
23
|
"typecheck": "tsc --project tsconfig.json --noEmit"
|