@orderingstack/front-components-product-configurator 1.7.0-beta.2 → 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.
Files changed (128) hide show
  1. package/dist/components/Counter/Counter.d.ts +0 -1
  2. package/dist/components/Counter/index.d.ts +0 -1
  3. package/dist/components/DisplayState/DisplayState.d.ts +0 -1
  4. package/dist/components/DisplayState/index.d.ts +0 -1
  5. package/dist/components/GroupStateInfo/GroupStateInfo.d.ts +0 -1
  6. package/dist/components/GroupStateInfo/index.d.ts +0 -1
  7. package/dist/components/InfoLine/InfoLine.d.ts +0 -1
  8. package/dist/components/InfoLine/index.d.ts +0 -1
  9. package/dist/components/MenuItemsDispatcher/MenuItemsDispatcher.d.ts +1 -1
  10. package/dist/components/MenuItemsDispatcher/index.d.ts +0 -1
  11. package/dist/components/MenuItemsDispatcher/useMenuItemsDispatcher.d.ts +0 -1
  12. package/dist/components/MenuOptions/MenuOptions.d.ts +0 -1
  13. package/dist/components/MenuOptions/MenuOptionsDefaultUI.d.ts +0 -1
  14. package/dist/components/MenuOptions/index.d.ts +0 -1
  15. package/dist/components/MenuOptions/useMenuOptions.d.ts +0 -1
  16. package/dist/components/MenuProduct/MenuProduct.d.ts +2 -3
  17. package/dist/components/MenuProduct/index.d.ts +0 -1
  18. package/dist/components/MenuProduct/useMenuProduct.d.ts +2 -3
  19. package/dist/components/MenuProductRoot/MenuProductRoot.d.ts +3 -2
  20. package/dist/components/MenuProductRoot/MenuProductRootDefaultUI.d.ts +0 -1
  21. package/dist/components/MenuProductRoot/MenuProductRootDefaultUIModal.d.ts +0 -1
  22. package/dist/components/MenuProductRoot/index.d.ts +0 -1
  23. package/dist/components/Price/Price.d.ts +0 -1
  24. package/dist/components/Price/index.d.ts +0 -1
  25. package/dist/components/ProductConfigurator/ProductConfigurator.d.ts +5 -2
  26. package/dist/components/ProductConfigurator/index.d.ts +0 -1
  27. package/dist/components/ProductConfigurator/useProductConfigurator.d.ts +0 -1
  28. package/dist/components/SimpleCheckbox/SimpleCheckbox.d.ts +0 -1
  29. package/dist/components/SimpleCheckbox/index.d.ts +0 -1
  30. package/dist/components/SimpleRadio/SimpleRadio.d.ts +0 -1
  31. package/dist/components/SimpleRadio/index.d.ts +0 -1
  32. package/dist/components/SubmitRow/SubmitRow.d.ts +0 -1
  33. package/dist/components/SubmitRow/index.d.ts +0 -1
  34. package/dist/context/Components.d.ts +0 -1
  35. package/dist/context/GroupsValidation.d.ts +0 -1
  36. package/dist/context/ProductData.d.ts +0 -1
  37. package/dist/hooks/useEmitFilter.d.ts +0 -1
  38. package/dist/hooks/useExpand.d.ts +0 -1
  39. package/dist/hooks/useValidate.d.ts +0 -1
  40. package/dist/hooks/useWindow.d.ts +0 -1
  41. package/dist/index.cjs.js +5 -6
  42. package/dist/index.es.js +273 -203
  43. package/dist/state/expandedItems.d.ts +0 -1
  44. package/dist/state/filter.d.ts +0 -1
  45. package/dist/state/index.d.ts +0 -1
  46. package/dist/state/validate.d.ts +0 -1
  47. package/dist/style.css +1 -1
  48. package/dist/translations/dictionary.d.ts +0 -1
  49. package/dist/types/index.d.ts +2 -1
  50. package/dist/utils/cleanSelected.d.ts +0 -1
  51. package/dist/utils/countPrice.d.ts +0 -1
  52. package/dist/utils/filter.d.ts +0 -1
  53. package/dist/utils/formatPrice.d.ts +0 -1
  54. package/dist/utils/formatValues.d.ts +0 -1
  55. package/dist/utils/getContext.d.ts +4 -4
  56. package/dist/utils/getProduct.d.ts +0 -1
  57. package/dist/utils/getSelCtxCntFromSelectedState.d.ts +0 -1
  58. package/dist/utils/getValidSelectedState.d.ts +0 -1
  59. package/dist/utils/groupsValidation.d.ts +0 -1
  60. package/dist/utils/index.d.ts +2 -3
  61. package/dist/utils/setSelected.d.ts +0 -1
  62. package/dist/utils/validate.d.ts +0 -1
  63. package/dist/utils/validationMessagesToRefactor.d.ts +0 -1
  64. package/package.json +118 -91
  65. package/dist/components/Counter/Counter.d.ts.map +0 -1
  66. package/dist/components/Counter/index.d.ts.map +0 -1
  67. package/dist/components/DisplayState/DisplayState.d.ts.map +0 -1
  68. package/dist/components/DisplayState/index.d.ts.map +0 -1
  69. package/dist/components/GroupStateInfo/GroupStateInfo.d.ts.map +0 -1
  70. package/dist/components/GroupStateInfo/index.d.ts.map +0 -1
  71. package/dist/components/InfoLine/InfoLine.d.ts.map +0 -1
  72. package/dist/components/InfoLine/index.d.ts.map +0 -1
  73. package/dist/components/MenuItemsDispatcher/MenuItemsDispatcher.d.ts.map +0 -1
  74. package/dist/components/MenuItemsDispatcher/index.d.ts.map +0 -1
  75. package/dist/components/MenuItemsDispatcher/useMenuItemsDispatcher.d.ts.map +0 -1
  76. package/dist/components/MenuOptions/MenuOptions.d.ts.map +0 -1
  77. package/dist/components/MenuOptions/MenuOptionsDefaultUI.d.ts.map +0 -1
  78. package/dist/components/MenuOptions/index.d.ts.map +0 -1
  79. package/dist/components/MenuOptions/useMenuOptions.d.ts.map +0 -1
  80. package/dist/components/MenuProduct/MenuProduct.d.ts.map +0 -1
  81. package/dist/components/MenuProduct/index.d.ts.map +0 -1
  82. package/dist/components/MenuProduct/useMenuProduct.d.ts.map +0 -1
  83. package/dist/components/MenuProductRoot/MenuProductRoot.d.ts.map +0 -1
  84. package/dist/components/MenuProductRoot/MenuProductRootDefaultUI.d.ts.map +0 -1
  85. package/dist/components/MenuProductRoot/MenuProductRootDefaultUIModal.d.ts.map +0 -1
  86. package/dist/components/MenuProductRoot/index.d.ts.map +0 -1
  87. package/dist/components/Price/Price.d.ts.map +0 -1
  88. package/dist/components/Price/index.d.ts.map +0 -1
  89. package/dist/components/ProductConfigurator/ProductConfigurator.d.ts.map +0 -1
  90. package/dist/components/ProductConfigurator/index.d.ts.map +0 -1
  91. package/dist/components/ProductConfigurator/useProductConfigurator.d.ts.map +0 -1
  92. package/dist/components/SimpleCheckbox/SimpleCheckbox.d.ts.map +0 -1
  93. package/dist/components/SimpleCheckbox/index.d.ts.map +0 -1
  94. package/dist/components/SimpleRadio/SimpleRadio.d.ts.map +0 -1
  95. package/dist/components/SimpleRadio/index.d.ts.map +0 -1
  96. package/dist/components/SubmitRow/SubmitRow.d.ts.map +0 -1
  97. package/dist/components/SubmitRow/index.d.ts.map +0 -1
  98. package/dist/context/Components.d.ts.map +0 -1
  99. package/dist/context/GroupsValidation.d.ts.map +0 -1
  100. package/dist/context/ProductData.d.ts.map +0 -1
  101. package/dist/hooks/useEmitFilter.d.ts.map +0 -1
  102. package/dist/hooks/useExpand.d.ts.map +0 -1
  103. package/dist/hooks/useValidate.d.ts.map +0 -1
  104. package/dist/hooks/useWindow.d.ts.map +0 -1
  105. package/dist/index.cjs.js.map +0 -1
  106. package/dist/index.es.js.map +0 -1
  107. package/dist/state/expandedItems.d.ts.map +0 -1
  108. package/dist/state/filter.d.ts.map +0 -1
  109. package/dist/state/index.d.ts.map +0 -1
  110. package/dist/state/validate.d.ts.map +0 -1
  111. package/dist/translations/dictionary.d.ts.map +0 -1
  112. package/dist/translations/i18n.d.ts +0 -2
  113. package/dist/translations/i18n.d.ts.map +0 -1
  114. package/dist/types/index.d.ts.map +0 -1
  115. package/dist/utils/cleanSelected.d.ts.map +0 -1
  116. package/dist/utils/countPrice.d.ts.map +0 -1
  117. package/dist/utils/filter.d.ts.map +0 -1
  118. package/dist/utils/formatPrice.d.ts.map +0 -1
  119. package/dist/utils/formatValues.d.ts.map +0 -1
  120. package/dist/utils/getContext.d.ts.map +0 -1
  121. package/dist/utils/getProduct.d.ts.map +0 -1
  122. package/dist/utils/getSelCtxCntFromSelectedState.d.ts.map +0 -1
  123. package/dist/utils/getValidSelectedState.d.ts.map +0 -1
  124. package/dist/utils/groupsValidation.d.ts.map +0 -1
  125. package/dist/utils/index.d.ts.map +0 -1
  126. package/dist/utils/setSelected.d.ts.map +0 -1
  127. package/dist/utils/validate.d.ts.map +0 -1
  128. package/dist/utils/validationMessagesToRefactor.d.ts.map +0 -1
package/dist/index.es.js CHANGED
@@ -3,146 +3,115 @@ import { useTransition, animated } from "react-spring";
3
3
  import { createPortal } from "react-dom";
4
4
  var tailwind = "";
5
5
  var main = "";
6
- function _typeof$1(obj) {
6
+ function _typeof$1(o2) {
7
7
  "@babel/helpers - typeof";
8
- return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(obj2) {
9
- return typeof obj2;
10
- } : function(obj2) {
11
- return obj2 && "function" == typeof Symbol && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
12
- }, _typeof$1(obj);
13
- }
14
- function _classCallCheck(instance2, Constructor) {
15
- if (!(instance2 instanceof Constructor)) {
8
+ return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o3) {
9
+ return typeof o3;
10
+ } : function(o3) {
11
+ return o3 && "function" == typeof Symbol && o3.constructor === Symbol && o3 !== Symbol.prototype ? "symbol" : typeof o3;
12
+ }, _typeof$1(o2);
13
+ }
14
+ function _classCallCheck(a2, n2) {
15
+ if (!(a2 instanceof n2))
16
16
  throw new TypeError("Cannot call a class as a function");
17
- }
18
17
  }
19
- function _toPrimitive(input, hint) {
20
- if (_typeof$1(input) !== "object" || input === null)
21
- return input;
22
- var prim = input[Symbol.toPrimitive];
23
- if (prim !== void 0) {
24
- var res = prim.call(input, hint || "default");
25
- if (_typeof$1(res) !== "object")
26
- return res;
18
+ function toPrimitive(t2, r2) {
19
+ if ("object" != _typeof$1(t2) || !t2)
20
+ return t2;
21
+ var e2 = t2[Symbol.toPrimitive];
22
+ if (void 0 !== e2) {
23
+ var i2 = e2.call(t2, r2 || "default");
24
+ if ("object" != _typeof$1(i2))
25
+ return i2;
27
26
  throw new TypeError("@@toPrimitive must return a primitive value.");
28
27
  }
29
- return (hint === "string" ? String : Number)(input);
28
+ return ("string" === r2 ? String : Number)(t2);
30
29
  }
31
- function _toPropertyKey(arg) {
32
- var key = _toPrimitive(arg, "string");
33
- return _typeof$1(key) === "symbol" ? key : String(key);
30
+ function toPropertyKey(t2) {
31
+ var i2 = toPrimitive(t2, "string");
32
+ return "symbol" == _typeof$1(i2) ? i2 : i2 + "";
34
33
  }
35
- function _defineProperties(target, props) {
36
- for (var i2 = 0; i2 < props.length; i2++) {
37
- var descriptor = props[i2];
38
- descriptor.enumerable = descriptor.enumerable || false;
39
- descriptor.configurable = true;
40
- if ("value" in descriptor)
41
- descriptor.writable = true;
42
- Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
34
+ function _defineProperties(e2, r2) {
35
+ for (var t2 = 0; t2 < r2.length; t2++) {
36
+ var o2 = r2[t2];
37
+ o2.enumerable = o2.enumerable || false, o2.configurable = true, "value" in o2 && (o2.writable = true), Object.defineProperty(e2, toPropertyKey(o2.key), o2);
43
38
  }
44
39
  }
45
- function _createClass(Constructor, protoProps, staticProps) {
46
- if (protoProps)
47
- _defineProperties(Constructor.prototype, protoProps);
48
- if (staticProps)
49
- _defineProperties(Constructor, staticProps);
50
- Object.defineProperty(Constructor, "prototype", {
40
+ function _createClass(e2, r2, t2) {
41
+ return r2 && _defineProperties(e2.prototype, r2), t2 && _defineProperties(e2, t2), Object.defineProperty(e2, "prototype", {
51
42
  writable: false
52
- });
53
- return Constructor;
43
+ }), e2;
54
44
  }
55
- function _assertThisInitialized(self2) {
56
- if (self2 === void 0) {
45
+ function _assertThisInitialized(e2) {
46
+ if (void 0 === e2)
57
47
  throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
58
- }
59
- return self2;
48
+ return e2;
60
49
  }
61
- function _setPrototypeOf(o2, p2) {
62
- _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf2(o3, p3) {
63
- o3.__proto__ = p3;
64
- return o3;
65
- };
66
- return _setPrototypeOf(o2, p2);
50
+ function _setPrototypeOf(t2, e2) {
51
+ return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t3, e3) {
52
+ return t3.__proto__ = e3, t3;
53
+ }, _setPrototypeOf(t2, e2);
67
54
  }
68
- function _inherits(subClass, superClass) {
69
- if (typeof superClass !== "function" && superClass !== null) {
55
+ function _inherits(t2, e2) {
56
+ if ("function" != typeof e2 && null !== e2)
70
57
  throw new TypeError("Super expression must either be null or a function");
71
- }
72
- subClass.prototype = Object.create(superClass && superClass.prototype, {
58
+ t2.prototype = Object.create(e2 && e2.prototype, {
73
59
  constructor: {
74
- value: subClass,
60
+ value: t2,
75
61
  writable: true,
76
62
  configurable: true
77
63
  }
78
- });
79
- Object.defineProperty(subClass, "prototype", {
64
+ }), Object.defineProperty(t2, "prototype", {
80
65
  writable: false
81
- });
82
- if (superClass)
83
- _setPrototypeOf(subClass, superClass);
66
+ }), e2 && _setPrototypeOf(t2, e2);
84
67
  }
85
- function _possibleConstructorReturn(self2, call) {
86
- if (call && (_typeof$1(call) === "object" || typeof call === "function")) {
87
- return call;
88
- } else if (call !== void 0) {
68
+ function _possibleConstructorReturn(t2, e2) {
69
+ if (e2 && ("object" == _typeof$1(e2) || "function" == typeof e2))
70
+ return e2;
71
+ if (void 0 !== e2)
89
72
  throw new TypeError("Derived constructors may only return object or undefined");
90
- }
91
- return _assertThisInitialized(self2);
92
- }
93
- function _getPrototypeOf(o2) {
94
- _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf2(o3) {
95
- return o3.__proto__ || Object.getPrototypeOf(o3);
96
- };
97
- return _getPrototypeOf(o2);
98
- }
99
- function _defineProperty(obj, key, value) {
100
- key = _toPropertyKey(key);
101
- if (key in obj) {
102
- Object.defineProperty(obj, key, {
103
- value,
104
- enumerable: true,
105
- configurable: true,
106
- writable: true
107
- });
108
- } else {
109
- obj[key] = value;
110
- }
111
- return obj;
73
+ return _assertThisInitialized(t2);
74
+ }
75
+ function _getPrototypeOf(t2) {
76
+ return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t3) {
77
+ return t3.__proto__ || Object.getPrototypeOf(t3);
78
+ }, _getPrototypeOf(t2);
79
+ }
80
+ function _defineProperty(e2, r2, t2) {
81
+ return (r2 = toPropertyKey(r2)) in e2 ? Object.defineProperty(e2, r2, {
82
+ value: t2,
83
+ enumerable: true,
84
+ configurable: true,
85
+ writable: true
86
+ }) : e2[r2] = t2, e2;
87
+ }
88
+ function _arrayWithHoles$1(r2) {
89
+ if (Array.isArray(r2))
90
+ return r2;
112
91
  }
113
- function _arrayWithHoles$1(arr2) {
114
- if (Array.isArray(arr2))
115
- return arr2;
92
+ function _iterableToArray$1(r2) {
93
+ if ("undefined" != typeof Symbol && null != r2[Symbol.iterator] || null != r2["@@iterator"])
94
+ return Array.from(r2);
116
95
  }
117
- function _iterableToArray$1(iter) {
118
- if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null)
119
- return Array.from(iter);
120
- }
121
- function _arrayLikeToArray$1(arr2, len) {
122
- if (len == null || len > arr2.length)
123
- len = arr2.length;
124
- for (var i2 = 0, arr22 = new Array(len); i2 < len; i2++)
125
- arr22[i2] = arr2[i2];
126
- return arr22;
96
+ function _arrayLikeToArray$1(r2, a2) {
97
+ (null == a2 || a2 > r2.length) && (a2 = r2.length);
98
+ for (var e2 = 0, n2 = Array(a2); e2 < a2; e2++)
99
+ n2[e2] = r2[e2];
100
+ return n2;
127
101
  }
128
- function _unsupportedIterableToArray$1(o2, minLen) {
129
- if (!o2)
130
- return;
131
- if (typeof o2 === "string")
132
- return _arrayLikeToArray$1(o2, minLen);
133
- var n2 = Object.prototype.toString.call(o2).slice(8, -1);
134
- if (n2 === "Object" && o2.constructor)
135
- n2 = o2.constructor.name;
136
- if (n2 === "Map" || n2 === "Set")
137
- return Array.from(o2);
138
- if (n2 === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n2))
139
- return _arrayLikeToArray$1(o2, minLen);
102
+ function _unsupportedIterableToArray$1(r2, a2) {
103
+ if (r2) {
104
+ if ("string" == typeof r2)
105
+ return _arrayLikeToArray$1(r2, a2);
106
+ var t2 = {}.toString.call(r2).slice(8, -1);
107
+ return "Object" === t2 && r2.constructor && (t2 = r2.constructor.name), "Map" === t2 || "Set" === t2 ? Array.from(r2) : "Arguments" === t2 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t2) ? _arrayLikeToArray$1(r2, a2) : void 0;
108
+ }
140
109
  }
141
110
  function _nonIterableRest$1() {
142
111
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
143
112
  }
144
- function _toArray$1(arr2) {
145
- return _arrayWithHoles$1(arr2) || _iterableToArray$1(arr2) || _unsupportedIterableToArray$1(arr2) || _nonIterableRest$1();
113
+ function _toArray$1(r2) {
114
+ return _arrayWithHoles$1(r2) || _iterableToArray$1(r2) || _unsupportedIterableToArray$1(r2) || _nonIterableRest$1();
146
115
  }
147
116
  function ownKeys$2(object, enumerableOnly) {
148
117
  var keys2 = Object.keys(object);
@@ -4753,17 +4722,26 @@ var SelMinSelMaxStatus = /* @__PURE__ */ ((SelMinSelMaxStatus2) => {
4753
4722
  return SelMinSelMaxStatus2;
4754
4723
  })(SelMinSelMaxStatus || {});
4755
4724
  const getContexts = (contextName, contextType, product) => {
4725
+ var _a, _b;
4756
4726
  if (contextName === "selected" || contextName === "filter") {
4757
4727
  return [];
4758
4728
  }
4759
4729
  if (product[contextType] === contextName) {
4760
4730
  return [product];
4761
4731
  }
4762
- let contexts = findContextByName(contextName, contextType, product.items);
4732
+ let contexts = findContextByName(
4733
+ contextName,
4734
+ contextType,
4735
+ (_a = product.items) != null ? _a : []
4736
+ );
4763
4737
  if (contexts == null ? void 0 : contexts.length) {
4764
4738
  return contexts;
4765
4739
  }
4766
- contexts = findContextInNestedLvl(contextName, contextType, product.items);
4740
+ contexts = findContextInNestedLvl(
4741
+ contextName,
4742
+ contextType,
4743
+ (_b = product.items) != null ? _b : []
4744
+ );
4767
4745
  if (contexts.length === 0)
4768
4746
  ;
4769
4747
  return contexts;
@@ -6328,7 +6306,7 @@ const getGroupBucketSecondChildrenValuesInputChange = (group, clickedProductId,
6328
6306
  secondProduct
6329
6307
  };
6330
6308
  }
6331
- const isSecondProductInState = !!((_c = selected == null ? void 0 : selected[secondProduct == null ? void 0 : secondProduct.selCtx]) == null ? void 0 : _c[secondProduct == null ? void 0 : secondProduct.id]) && ((_d = selected == null ? void 0 : selected[secondProduct == null ? void 0 : secondProduct.selCtx]) == null ? void 0 : _d[secondProduct == null ? void 0 : secondProduct.id]) !== false;
6309
+ const isSecondProductInState = !!secondProduct && !!((_c = selected == null ? void 0 : selected[secondProduct.selCtx]) == null ? void 0 : _c[secondProduct.id]) && ((_d = selected == null ? void 0 : selected[secondProduct.selCtx]) == null ? void 0 : _d[secondProduct.id]) !== false;
6332
6310
  if (isSecondProductInState) {
6333
6311
  return {
6334
6312
  clickedProductValue: "1",
@@ -6748,7 +6726,9 @@ const validateProductFilter = (product, stateFilter) => {
6748
6726
  const commonFilters = (_a = Object.keys(stateFiltersWithFltCtx)) == null ? void 0 : _a.filter(
6749
6727
  (filterName) => {
6750
6728
  var _a2;
6751
- const matchingFilters = (_a2 = Object.keys((productFilters == null ? void 0 : productFilters[filterName]) || {})) == null ? void 0 : _a2.filter((x2) => {
6729
+ const matchingFilters = (_a2 = Object.keys(
6730
+ (productFilters == null ? void 0 : productFilters[filterName]) || {}
6731
+ )) == null ? void 0 : _a2.filter((x2) => {
6752
6732
  var _a3;
6753
6733
  if (((_a3 = productFilters == null ? void 0 : productFilters[filterName]) == null ? void 0 : _a3[x2]) === (stateFiltersWithFltCtx == null ? void 0 : stateFiltersWithFltCtx[filterName])) {
6754
6734
  return true;
@@ -6956,7 +6936,7 @@ function InfoLine(props) {
6956
6936
  });
6957
6937
  }
6958
6938
  const checkMarkSVG = /* @__PURE__ */ jsx("svg", {
6959
- className: "w-6 h-6 text-green-600",
6939
+ className: "size-6 text-green-600",
6960
6940
  viewBox: "0 0 24 24",
6961
6941
  fill: "none",
6962
6942
  stroke: "currentColor",
@@ -6969,7 +6949,7 @@ const checkMarkSVG = /* @__PURE__ */ jsx("svg", {
6969
6949
  })
6970
6950
  });
6971
6951
  const exclamationMarkSVG = /* @__PURE__ */ jsx("svg", {
6972
- className: "w-6 h-6 text-red-500",
6952
+ className: "size-6 text-red-500",
6973
6953
  fill: "none",
6974
6954
  viewBox: "0 0 24 24",
6975
6955
  stroke: "currentColor",
@@ -7755,34 +7735,34 @@ function hasLoadedNamespace(ns, i18n) {
7755
7735
  }
7756
7736
  });
7757
7737
  }
7758
- function _iterableToArrayLimit(arr2, i2) {
7759
- var _i = null == arr2 ? null : "undefined" != typeof Symbol && arr2[Symbol.iterator] || arr2["@@iterator"];
7760
- if (null != _i) {
7761
- var _s, _e2, _x, _r, _arr = [], _n = true, _d = false;
7738
+ function _iterableToArrayLimit(r2, l2) {
7739
+ var t2 = null == r2 ? null : "undefined" != typeof Symbol && r2[Symbol.iterator] || r2["@@iterator"];
7740
+ if (null != t2) {
7741
+ var e2, n2, i2, u2, a2 = [], f2 = true, o2 = false;
7762
7742
  try {
7763
- if (_x = (_i = _i.call(arr2)).next, 0 === i2) {
7764
- if (Object(_i) !== _i)
7743
+ if (i2 = (t2 = t2.call(r2)).next, 0 === l2) {
7744
+ if (Object(t2) !== t2)
7765
7745
  return;
7766
- _n = false;
7746
+ f2 = false;
7767
7747
  } else
7768
- for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i2); _n = true)
7748
+ for (; !(f2 = (e2 = i2.call(t2)).done) && (a2.push(e2.value), a2.length !== l2); f2 = true)
7769
7749
  ;
7770
- } catch (err) {
7771
- _d = true, _e2 = err;
7750
+ } catch (r3) {
7751
+ o2 = true, n2 = r3;
7772
7752
  } finally {
7773
7753
  try {
7774
- if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r))
7754
+ if (!f2 && null != t2["return"] && (u2 = t2["return"](), Object(u2) !== u2))
7775
7755
  return;
7776
7756
  } finally {
7777
- if (_d)
7778
- throw _e2;
7757
+ if (o2)
7758
+ throw n2;
7779
7759
  }
7780
7760
  }
7781
- return _arr;
7761
+ return a2;
7782
7762
  }
7783
7763
  }
7784
- function _slicedToArray(arr2, i2) {
7785
- return _arrayWithHoles$1(arr2) || _iterableToArrayLimit(arr2, i2) || _unsupportedIterableToArray$1(arr2, i2) || _nonIterableRest$1();
7764
+ function _slicedToArray(r2, e2) {
7765
+ return _arrayWithHoles$1(r2) || _iterableToArrayLimit(r2, e2) || _unsupportedIterableToArray$1(r2, e2) || _nonIterableRest$1();
7786
7766
  }
7787
7767
  function ownKeys(object, enumerableOnly) {
7788
7768
  var keys2 = Object.keys(object);
@@ -8473,7 +8453,7 @@ const MenuOptionsDefaultUI = (props) => {
8473
8453
  price: countPrice(selected, optionsItem)
8474
8454
  })
8475
8455
  }), /* @__PURE__ */ jsx("svg", {
8476
- className: `w-8 h-8 ml-2 text-black cursor-pointer ${!isExpanded && "rotate-180"}`,
8456
+ className: `size-8 ml-2 text-black cursor-pointer ${!isExpanded && "rotate-180"}`,
8477
8457
  viewBox: "0 0 24 24",
8478
8458
  fill: "none",
8479
8459
  stroke: "currentColor",
@@ -8535,7 +8515,7 @@ const MenuOptions = (props) => {
8535
8515
  const {
8536
8516
  MenuOptionsUI
8537
8517
  } = useComponents();
8538
- if (!isFilterValidated) {
8518
+ if (!isFilterValidated || (optionsItem == null ? void 0 : optionsItem.outsideAvailabilitySlot) === true) {
8539
8519
  return null;
8540
8520
  }
8541
8521
  const MenuItemsDispatcherWrapper = /* @__PURE__ */ jsx(MenuItemsDispatcher, {
@@ -8641,7 +8621,7 @@ const SimpleCheckbox = (props) => {
8641
8621
  }), /* @__PURE__ */ jsx("label", {
8642
8622
  htmlFor: inputId,
8643
8623
  children: /* @__PURE__ */ jsx(Price, {
8644
- price: parseFloat(price),
8624
+ price: parseFloat(price || "0"),
8645
8625
  addPlusBefore: true,
8646
8626
  showIfPriceZero: true,
8647
8627
  hiddenIfPriceZero: true
@@ -8723,14 +8703,14 @@ function Counter(props) {
8723
8703
  size = "md"
8724
8704
  } = props;
8725
8705
  return /* @__PURE__ */ jsxs("div", {
8726
- className: `counter counter-${size} flex flex-row justify-center items-center p-1 border-[1px] rounded-md border-[rgba(229,231,235,255)] product-quantity`,
8706
+ className: `counter counter-${size} flex flex-row justify-center items-center p-1 border rounded-md border-[rgba(229,231,235,255)] product-quantity`,
8727
8707
  children: [/* @__PURE__ */ jsx("button", {
8728
8708
  type: "button",
8729
8709
  className: "quantity-button small",
8730
8710
  onClick: subtract,
8731
8711
  disabled: disabledSubtract,
8732
8712
  children: /* @__PURE__ */ jsxs("svg", {
8733
- className: "w-4 h-4 text-black",
8713
+ className: "size-4 text-black",
8734
8714
  width: "24",
8735
8715
  height: "24",
8736
8716
  viewBox: "0 0 24 24",
@@ -8758,7 +8738,7 @@ function Counter(props) {
8758
8738
  onClick: add,
8759
8739
  disabled: disabledAdd,
8760
8740
  children: /* @__PURE__ */ jsxs("svg", {
8761
- className: "w-4 h-4 text-green-600 ",
8741
+ className: "size-4 text-green-600 ",
8762
8742
  width: "24",
8763
8743
  height: "24",
8764
8744
  viewBox: "0 0 24 24",
@@ -8819,12 +8799,14 @@ function useEmitFilter(product, isRadio, nestedLvl) {
8819
8799
  const groupsCntKeys = getValues(groupsPath);
8820
8800
  (_b = Object.keys(emit)) == null ? void 0 : _b.forEach((x2) => {
8821
8801
  var _a2;
8822
- (_a2 = Object.keys(productGroupCntKeys || {})) == null ? void 0 : _a2.forEach((productGroupCntKey) => {
8823
- if (!emit[productGroupCntKey]) {
8824
- unregister(`${fltCtxPath}.${productGroupCntKey}`);
8825
- unregister(`${groupCntPath}.${productGroupCntKey}`);
8802
+ (_a2 = Object.keys(productGroupCntKeys || {})) == null ? void 0 : _a2.forEach(
8803
+ (productGroupCntKey) => {
8804
+ if (!emit[productGroupCntKey]) {
8805
+ unregister(`${fltCtxPath}.${productGroupCntKey}`);
8806
+ unregister(`${groupCntPath}.${productGroupCntKey}`);
8807
+ }
8826
8808
  }
8827
- });
8809
+ );
8828
8810
  Object.keys(groupsCntKeys || {}).forEach((groupSelCtx) => {
8829
8811
  if (groupSelCtx !== selCtx && x2 in getValues(groupsPath == null ? void 0 : groupsPath[groupSelCtx])) {
8830
8812
  unregister(`${groupsPath}.${groupSelCtx}.${x2}`);
@@ -8840,7 +8822,10 @@ function useEmitFilter(product, isRadio, nestedLvl) {
8840
8822
  (_c = Object.keys(emit)) == null ? void 0 : _c.forEach((x2) => {
8841
8823
  setValue(`filter.${fltCtx}.${x2}`, emit[x2]);
8842
8824
  const groupKeyCnt = getValues(`${groupCntPath}.${x2}.cnt`) || 0;
8843
- setValue(`${groupCntPath}.${x2}`, { cnt: groupKeyCnt + 1, value: emit[x2] });
8825
+ setValue(`${groupCntPath}.${x2}`, {
8826
+ cnt: groupKeyCnt + 1,
8827
+ value: emit[x2]
8828
+ });
8844
8829
  });
8845
8830
  }
8846
8831
  }, [value]);
@@ -8939,14 +8924,18 @@ const selectUnselectProduct = (setValue, getValues, product, isChecked, unregist
8939
8924
  } else {
8940
8925
  unregister(`${groupCntPath}.${emitKey}`);
8941
8926
  const groupKeysObj = getValues(groupsPath) || {};
8942
- const otherGroupsCntKeys = (_a2 = Object.keys(groupKeysObj)) == null ? void 0 : _a2.filter((x2) => x2 !== selCtx);
8927
+ const otherGroupsCntKeys = (_a2 = Object.keys(groupKeysObj)) == null ? void 0 : _a2.filter(
8928
+ (x2) => x2 !== selCtx
8929
+ );
8943
8930
  if (!otherGroupsCntKeys) {
8944
8931
  unregister(`${fltCtxPath}.${emitKey}`);
8945
8932
  } else {
8946
- const sameKeyOtherGroup = otherGroupsCntKeys == null ? void 0 : otherGroupsCntKeys.find((groupSelCtx) => {
8947
- var _a3;
8948
- return !!((_a3 = groupKeysObj == null ? void 0 : groupKeysObj[`${groupSelCtx}`]) == null ? void 0 : _a3[`${emitKey}`]);
8949
- });
8933
+ const sameKeyOtherGroup = otherGroupsCntKeys == null ? void 0 : otherGroupsCntKeys.find(
8934
+ (groupSelCtx) => {
8935
+ var _a3;
8936
+ return !!((_a3 = groupKeysObj == null ? void 0 : groupKeysObj[`${groupSelCtx}`]) == null ? void 0 : _a3[`${emitKey}`]);
8937
+ }
8938
+ );
8950
8939
  if (!sameKeyOtherGroup) {
8951
8940
  unregister(`${fltCtxPath}.${emitKey}`);
8952
8941
  } else {
@@ -8982,7 +8971,7 @@ const findProductInParentProductBySelCtx = (parent, selCtx) => {
8982
8971
  return null;
8983
8972
  };
8984
8973
  function useMenuProduct(product, parentAttrs, nestedLvl, parentPriduct) {
8985
- var _a, _b;
8974
+ var _a, _b, _c;
8986
8975
  const { id, selCtx, emit = {}, fltCtx } = product;
8987
8976
  const {
8988
8977
  allowMultiple: parentAllowMultiple,
@@ -9002,8 +8991,8 @@ function useMenuProduct(product, parentAttrs, nestedLvl, parentPriduct) {
9002
8991
  const isBucketCase = isGroupBucketCase(parentPriduct);
9003
8992
  const isCounter = isApiBooleanTrue(parentAllowMultiple);
9004
8993
  const isDecrementEnabled = isBucketCase && valueNumber > 0 || valueNumber > (isRadio ? 1 : 0);
9005
- const isIncrementEnabled = isBucketCase && valueNumber < ((_a = parentPriduct == null ? void 0 : parentPriduct.attrs) == null ? void 0 : _a.qtyMax) || isInputCounterIncrementEnabled2(product, selected) && (isInputEnabled2(product) || valueNumber);
9006
- const isChecked = Number(((_b = selected == null ? void 0 : selected[selCtx]) == null ? void 0 : _b[id]) || 0) > 0;
8994
+ const isIncrementEnabled = isBucketCase && valueNumber < Number((_b = (_a = parentPriduct == null ? void 0 : parentPriduct.attrs) == null ? void 0 : _a.qtyMax) != null ? _b : 0) || isInputCounterIncrementEnabled2(product, selected) && (isInputEnabled2(product) || valueNumber);
8995
+ const isChecked = Number(((_c = selected == null ? void 0 : selected[selCtx]) == null ? void 0 : _c[id]) || 0) > 0;
9007
8996
  const isCheckboxEnabled = isBucketCase || isInputEnabled2(product) || valueNumber;
9008
8997
  const registerId = `${isRadio ? "radio" : "selected"}.${selCtx}.${id}`;
9009
8998
  const registerProps = register(registerId, {
@@ -9017,14 +9006,27 @@ function useMenuProduct(product, parentAttrs, nestedLvl, parentPriduct) {
9017
9006
  const isBucketCase2 = isGroupBucketCase(parentPriduct);
9018
9007
  if (isBucketCase2) {
9019
9008
  const { product: secondProduct, value: secondProductValue } = getGroupBucketSecondChildrenValues(parentPriduct, id, valueNumber + 1);
9020
- setValue(`selected.${secondProduct == null ? void 0 : secondProduct.selCtx}.${secondProduct == null ? void 0 : secondProduct.id}`, secondProductValue);
9009
+ setValue(
9010
+ `selected.${secondProduct == null ? void 0 : secondProduct.selCtx}.${secondProduct == null ? void 0 : secondProduct.id}`,
9011
+ secondProductValue
9012
+ );
9021
9013
  if (secondProductValue === "0" || secondProductValue === false) {
9022
- selectUnselectProduct(setValue, getValues, secondProduct, false, unregister, nestedLvl);
9014
+ selectUnselectProduct(
9015
+ setValue,
9016
+ getValues,
9017
+ secondProduct,
9018
+ false,
9019
+ unregister,
9020
+ nestedLvl
9021
+ );
9023
9022
  }
9024
9023
  }
9025
9024
  const importantSubProductsInState = (_b2 = (_a2 = Object.keys(selected)) == null ? void 0 : _a2.map((y2) => {
9026
9025
  var _a3;
9027
- return { key: y2, subProductId: (_a3 = findProductInParentProductBySelCtx(product, y2)) == null ? void 0 : _a3.id };
9026
+ return {
9027
+ key: y2,
9028
+ subProductId: (_a3 = findProductInParentProductBySelCtx(product, y2)) == null ? void 0 : _a3.id
9029
+ };
9028
9030
  })) == null ? void 0 : _b2.filter((x2) => !!x2.subProductId);
9029
9031
  if (valueNumber === 0) {
9030
9032
  importantSubProductsInState == null ? void 0 : importantSubProductsInState.forEach((x2) => {
@@ -9033,19 +9035,32 @@ function useMenuProduct(product, parentAttrs, nestedLvl, parentPriduct) {
9033
9035
  }
9034
9036
  };
9035
9037
  const handleCounterDecrementQty = () => {
9036
- var _a2, _b2, _c, _d;
9038
+ var _a2, _b2, _c2, _d;
9037
9039
  const decrementedValue = valueNumber - 1;
9038
9040
  setValue(`selected.${selCtx}.${id}`, `${decrementedValue}`);
9039
9041
  if (isBucketCase) {
9040
9042
  const { product: secondProduct, value: secondProductValue } = getGroupBucketSecondChildrenValues(parentPriduct, id, decrementedValue);
9041
- setValue(`selected.${secondProduct == null ? void 0 : secondProduct.selCtx}.${secondProduct == null ? void 0 : secondProduct.id}`, secondProductValue);
9043
+ setValue(
9044
+ `selected.${secondProduct == null ? void 0 : secondProduct.selCtx}.${secondProduct == null ? void 0 : secondProduct.id}`,
9045
+ secondProductValue
9046
+ );
9042
9047
  if (secondProductValue === "1") {
9043
- selectUnselectProduct(setValue, getValues, secondProduct, true, unregister, nestedLvl);
9048
+ selectUnselectProduct(
9049
+ setValue,
9050
+ getValues,
9051
+ secondProduct,
9052
+ true,
9053
+ unregister,
9054
+ nestedLvl
9055
+ );
9044
9056
  }
9045
9057
  }
9046
9058
  const importantSubProductsInState = (_b2 = (_a2 = Object.keys(selected)) == null ? void 0 : _a2.map((y2) => {
9047
9059
  var _a3;
9048
- return { key: y2, subProductId: (_a3 = findProductInParentProductBySelCtx(product, y2)) == null ? void 0 : _a3.id };
9060
+ return {
9061
+ key: y2,
9062
+ subProductId: (_a3 = findProductInParentProductBySelCtx(product, y2)) == null ? void 0 : _a3.id
9063
+ };
9049
9064
  })) == null ? void 0 : _b2.filter((x2) => !!x2.subProductId);
9050
9065
  if (decrementedValue === 0) {
9051
9066
  importantSubProductsInState == null ? void 0 : importantSubProductsInState.forEach((x2) => {
@@ -9054,7 +9069,7 @@ function useMenuProduct(product, parentAttrs, nestedLvl, parentPriduct) {
9054
9069
  }
9055
9070
  if (isCheckbox && decrementedValue === 0) {
9056
9071
  setValue(`selected.${selCtx}.${id}`, false);
9057
- (_c = Object.keys(emit)) == null ? void 0 : _c.forEach((x2) => {
9072
+ (_c2 = Object.keys(emit)) == null ? void 0 : _c2.forEach((x2) => {
9058
9073
  const formPath = `filterWithCnt.${fltCtx}.${x2}.${emit[x2]}`;
9059
9074
  const cnt = getValues(formPath) || 0;
9060
9075
  if (cnt < 2) {
@@ -9081,7 +9096,7 @@ function useMenuProduct(product, parentAttrs, nestedLvl, parentPriduct) {
9081
9096
  const groupCntPath = `filterWithCnt.${fltCtx}.${selCtx}`;
9082
9097
  const fltCtxPath = `filter.${fltCtx}`;
9083
9098
  (_d = Object.keys(emit)) == null ? void 0 : _d.forEach((emitKey) => {
9084
- var _a3, _b3, _c2;
9099
+ var _a3, _b3, _c3;
9085
9100
  const groupValue = getValues(`${groupCntPath}.${emitKey}`) || 0;
9086
9101
  if (groupValue) {
9087
9102
  if (groupValue > 1) {
@@ -9089,18 +9104,22 @@ function useMenuProduct(product, parentAttrs, nestedLvl, parentPriduct) {
9089
9104
  } else {
9090
9105
  unregister(`${groupCntPath}.${emitKey}`);
9091
9106
  const groupKeysObj = getValues(groupsPath) || {};
9092
- const otherGroupsCntKeys = (_a3 = Object.keys(groupKeysObj)) == null ? void 0 : _a3.filter((x2) => x2 !== selCtx);
9107
+ const otherGroupsCntKeys = (_a3 = Object.keys(groupKeysObj)) == null ? void 0 : _a3.filter(
9108
+ (x2) => x2 !== selCtx
9109
+ );
9093
9110
  if (!otherGroupsCntKeys) {
9094
9111
  unregister(`${fltCtxPath}.${emitKey}`);
9095
9112
  } else {
9096
- const sameKeyOtherGroup = otherGroupsCntKeys == null ? void 0 : otherGroupsCntKeys.find((groupSelCtx) => {
9097
- var _a4;
9098
- return !!((_a4 = groupKeysObj == null ? void 0 : groupKeysObj[`${groupSelCtx}`]) == null ? void 0 : _a4[`${emitKey}`]);
9099
- });
9113
+ const sameKeyOtherGroup = otherGroupsCntKeys == null ? void 0 : otherGroupsCntKeys.find(
9114
+ (groupSelCtx) => {
9115
+ var _a4;
9116
+ return !!((_a4 = groupKeysObj == null ? void 0 : groupKeysObj[`${groupSelCtx}`]) == null ? void 0 : _a4[`${emitKey}`]);
9117
+ }
9118
+ );
9100
9119
  if (!sameKeyOtherGroup) {
9101
9120
  unregister(`${fltCtxPath}.${emitKey}`);
9102
9121
  } else {
9103
- const newValue = (_c2 = (_b3 = groupKeysObj == null ? void 0 : groupKeysObj[`${sameKeyOtherGroup}`]) == null ? void 0 : _b3[`${emitKey}`]) == null ? void 0 : _c2.value;
9122
+ const newValue = (_c3 = (_b3 = groupKeysObj == null ? void 0 : groupKeysObj[`${sameKeyOtherGroup}`]) == null ? void 0 : _b3[`${emitKey}`]) == null ? void 0 : _c3.value;
9104
9123
  setValue(`${fltCtxPath}.${emitKey}`, newValue);
9105
9124
  }
9106
9125
  }
@@ -9116,19 +9135,59 @@ function useMenuProduct(product, parentAttrs, nestedLvl, parentPriduct) {
9116
9135
  target: { checked, name: selCtx2, defaultValue: productId }
9117
9136
  } = e2;
9118
9137
  if (isBucketCase) {
9119
- const { clickedProductValue, secondProductValue, secondProduct } = getGroupBucketSecondChildrenValuesInputChange(parentPriduct, id, checked, selected);
9120
- console.log("handleOnInputChange clickedProductValue", clickedProductValue, secondProductValue);
9121
- setValue(`selected.${product == null ? void 0 : product.selCtx}.${product == null ? void 0 : product.id}`, clickedProductValue);
9122
- setValue(`selected.${secondProduct == null ? void 0 : secondProduct.selCtx}.${secondProduct == null ? void 0 : secondProduct.id}`, secondProductValue);
9123
- selectUnselectProduct(setValue, getValues, product, checked, unregister, nestedLvl);
9124
- selectUnselectProduct(setValue, getValues, secondProduct, secondProductValue !== false, unregister, nestedLvl);
9138
+ const { clickedProductValue, secondProductValue, secondProduct } = getGroupBucketSecondChildrenValuesInputChange(
9139
+ parentPriduct,
9140
+ id,
9141
+ checked,
9142
+ selected
9143
+ );
9144
+ console.log(
9145
+ "handleOnInputChange clickedProductValue",
9146
+ clickedProductValue,
9147
+ secondProductValue
9148
+ );
9149
+ setValue(
9150
+ `selected.${product == null ? void 0 : product.selCtx}.${product == null ? void 0 : product.id}`,
9151
+ clickedProductValue
9152
+ );
9153
+ setValue(
9154
+ `selected.${secondProduct == null ? void 0 : secondProduct.selCtx}.${secondProduct == null ? void 0 : secondProduct.id}`,
9155
+ secondProductValue
9156
+ );
9157
+ selectUnselectProduct(
9158
+ setValue,
9159
+ getValues,
9160
+ product,
9161
+ checked,
9162
+ unregister,
9163
+ nestedLvl
9164
+ );
9165
+ selectUnselectProduct(
9166
+ setValue,
9167
+ getValues,
9168
+ secondProduct,
9169
+ secondProductValue !== false,
9170
+ unregister,
9171
+ nestedLvl
9172
+ );
9125
9173
  return;
9126
9174
  }
9127
- selectUnselectProduct(setValue, getValues, product, checked, unregister, nestedLvl);
9175
+ selectUnselectProduct(
9176
+ setValue,
9177
+ getValues,
9178
+ product,
9179
+ checked,
9180
+ unregister,
9181
+ nestedLvl
9182
+ );
9128
9183
  if (isRadio) {
9129
- const otherGroupItems = (_a2 = parentPriduct == null ? void 0 : parentPriduct.items) == null ? void 0 : _a2.filter((x2) => x2.id !== product.id);
9184
+ const otherGroupItems = (_a2 = parentPriduct == null ? void 0 : parentPriduct.items) == null ? void 0 : _a2.filter(
9185
+ (x2) => x2.id !== product.id
9186
+ );
9130
9187
  for (const key of Object.keys(selected || {})) {
9131
- const isItemToClear = (otherGroupItems == null ? void 0 : otherGroupItems.some((x2) => !!findProductInParentProductBySelCtx(x2, key))) ? key : false;
9188
+ const isItemToClear = (otherGroupItems == null ? void 0 : otherGroupItems.some(
9189
+ (x2) => !!findProductInParentProductBySelCtx(x2, key)
9190
+ )) ? key : false;
9132
9191
  if (isItemToClear) {
9133
9192
  setValue(`selected.${key}`, false);
9134
9193
  }
@@ -9183,6 +9242,9 @@ const MenuProduct = (props) => {
9183
9242
  const {
9184
9243
  MenuProductUI
9185
9244
  } = useComponents();
9245
+ if (product == null ? void 0 : product.outsideAvailabilitySlot) {
9246
+ return /* @__PURE__ */ jsx(Fragment, {});
9247
+ }
9186
9248
  const menuProductProps = {
9187
9249
  product,
9188
9250
  nestedLvl,
@@ -9284,7 +9346,7 @@ const MenuProductDefaultUI = (props) => {
9284
9346
  });
9285
9347
  return /* @__PURE__ */ jsxs("div", {
9286
9348
  children: [renderInput(), showProductItems ? transitions((styles, item) => item && /* @__PURE__ */ jsx(animated.div, {
9287
- className: `border-l-[2px] border-gray-300 ${nestedLvl >= 1 && "ml-4 pl-4"}`,
9349
+ className: `border-l-2 border-gray-300 ${nestedLvl >= 1 && "ml-4 pl-4"}`,
9288
9350
  style: styles,
9289
9351
  children
9290
9352
  }, nestedLvl + 1)) : null]
@@ -9304,7 +9366,8 @@ function MenuItemsDispatcher(props) {
9304
9366
  productItems,
9305
9367
  nestedLvl = 1,
9306
9368
  parentProduct,
9307
- rootProduct
9369
+ rootProduct,
9370
+ showOutsideAvailabilitySlotItems
9308
9371
  } = props;
9309
9372
  const {
9310
9373
  attrs: parentAttrs = {},
@@ -9320,7 +9383,7 @@ function MenuItemsDispatcher(props) {
9320
9383
  } = useComponents();
9321
9384
  const renderMenuItem = (productItem) => {
9322
9385
  var _a;
9323
- 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) => {
9324
9387
  var _a2, _b;
9325
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";
9326
9389
  }))) {
@@ -9398,7 +9461,7 @@ const showMoreLessButton = (text, handleClick, isShowMore) => {
9398
9461
  className: "flex px-2 text-lg font-semibold text-black",
9399
9462
  onClick: handleClick,
9400
9463
  children: [text, /* @__PURE__ */ jsxs("svg", {
9401
- className: `-mr-2 w-7 h-7 ${!isShowMore && "rotate-180"}`,
9464
+ className: `-mr-2 size-7 ${!isShowMore && "rotate-180"}`,
9402
9465
  width: "24",
9403
9466
  height: "24",
9404
9467
  viewBox: "0 0 24 24",
@@ -9472,7 +9535,7 @@ function SubmitRow(props) {
9472
9535
  className: "inline-flex items-center px-2 py-1 font-bold text-red-600 border-2 border-red-600 border-solid rounded hover:bg-red-200",
9473
9536
  onClick: handleGoBack,
9474
9537
  children: [/* @__PURE__ */ jsxs("svg", {
9475
- className: "w-5 h-5 text-red-600",
9538
+ className: "size-5 text-red-600",
9476
9539
  width: "24",
9477
9540
  height: "24",
9478
9541
  viewBox: "0 0 24 24",
@@ -9522,7 +9585,7 @@ function SubmitRow(props) {
9522
9585
  disabled: displayPriceFrom,
9523
9586
  onClick: handleOnSubmit,
9524
9587
  children: [/* @__PURE__ */ jsxs("svg", {
9525
- className: "w-5 h-5 mr-2 text-white",
9588
+ className: "size-5 mr-2 text-white",
9526
9589
  viewBox: "0 0 24 24",
9527
9590
  fill: "none",
9528
9591
  stroke: "currentColor",
@@ -10554,13 +10617,13 @@ function Modal(props) {
10554
10617
  leaveTo: "opacity-0 scale-95",
10555
10618
  children: /* @__PURE__ */ jsxs("div", {
10556
10619
  id: "modal-content",
10557
- className: `inline-block overflow-hidden sm:rounded-2xl align-middle transition-all bg-white sm:shadow-xl h-[100vh] sm:h-auto sm:max-h-[90vh] w-full sm:w-[640px]`,
10620
+ className: `inline-block overflow-hidden sm:rounded-2xl align-middle transition-all bg-white sm:shadow-xl h-screen sm:h-auto sm:max-h-[90vh] w-full sm:w-[640px]`,
10558
10621
  children: [/* @__PURE__ */ jsx("div", {
10559
10622
  className: "sticky top-0 z-10 flex items-center w-full px-3 text-lg font-medium leading-6 text-gray-900 bg-white h-14 modal-header",
10560
10623
  children: /* @__PURE__ */ jsx("div", {
10561
10624
  className: "",
10562
10625
  children: /* @__PURE__ */ jsxs("svg", {
10563
- className: "w-8 h-8 text-black cursor-pointer",
10626
+ className: "size-8 text-black cursor-pointer",
10564
10627
  width: "24",
10565
10628
  height: "24",
10566
10629
  viewBox: "0 0 24 24",
@@ -10606,7 +10669,7 @@ function Modal(props) {
10606
10669
  });
10607
10670
  }
10608
10671
  function MenuProductRootDefaultUI(props) {
10609
- var _a, _b, _c, _d;
10672
+ var _a, _b, _c, _d, _e2, _f, _g, _h, _i, _j;
10610
10673
  const {
10611
10674
  product,
10612
10675
  isOpen,
@@ -10639,8 +10702,8 @@ function MenuProductRootDefaultUI(props) {
10639
10702
  displayPriceFrom,
10640
10703
  formattedEndPrice
10641
10704
  } = formatPriceWithMinPrice(countedProductPrice, minPrice, productQuantity);
10642
- const formContentRef1 = useRef();
10643
- const formContentRef2 = useRef();
10705
+ const formContentRef1 = useRef(null);
10706
+ const formContentRef2 = useRef(null);
10644
10707
  const {
10645
10708
  isSm,
10646
10709
  isMobile,
@@ -10652,10 +10715,10 @@ function MenuProductRootDefaultUI(props) {
10652
10715
  children: [/* @__PURE__ */ jsxs("div", {
10653
10716
  className: clsx("px-4 w-full", isSm && "sm:sticky sm:top-0 sm:w-2/5"),
10654
10717
  ref: formContentRef1,
10655
- children: [product.details.media && product.details.media[0].url && /* @__PURE__ */ jsx("img", {
10718
+ children: [((_a = product.details) == null ? void 0 : _a.media) && product.details.media[0].url && /* @__PURE__ */ jsx("img", {
10656
10719
  className: clsx("mx-auto mt-2 mb-6 max-h-[250px]", isSm && "max-h-[450px]"),
10657
- alt: product.details.literals.name,
10658
- src: (_a = product.details) == null ? void 0 : _a.media[0].url
10720
+ alt: (_c = (_b = product.details) == null ? void 0 : _b.literals) == null ? void 0 : _c.name,
10721
+ src: (_d = product.details) == null ? void 0 : _d.media[0].url
10659
10722
  }), /* @__PURE__ */ jsx("div", {
10660
10723
  className: clsx(!showDebugState && "hidden"),
10661
10724
  children: /* @__PURE__ */ jsx(DisplayState, {})
@@ -10669,14 +10732,14 @@ function MenuProductRootDefaultUI(props) {
10669
10732
  className: "flex justify-between w-full mb-4 text-2xl font-semibold",
10670
10733
  children: [/* @__PURE__ */ jsxs("span", {
10671
10734
  className: "",
10672
- children: [product.details.literals.name, " "]
10735
+ children: [(_f = (_e2 = product.details) == null ? void 0 : _e2.literals) == null ? void 0 : _f.name, " "]
10673
10736
  }), /* @__PURE__ */ jsx(Price, {
10674
10737
  price: props.countedProductPrice,
10675
10738
  minPrice
10676
10739
  })]
10677
10740
  }), /* @__PURE__ */ jsx("span", {
10678
10741
  className: "text-gray-600",
10679
- children: (_b = product.details.literals) == null ? void 0 : _b.description
10742
+ children: (_h = (_g = product.details) == null ? void 0 : _g.literals) == null ? void 0 : _h.description
10680
10743
  })]
10681
10744
  }), /* @__PURE__ */ jsxs("div", {
10682
10745
  className: `items-center justify-center w-full px-4 product-configuration ${(product == null ? void 0 : product.items) && "py-2 bg-gray-100"}`,
@@ -10689,14 +10752,18 @@ function MenuProductRootDefaultUI(props) {
10689
10752
  finalPrice: formattedEndPrice,
10690
10753
  isBackIcon: false,
10691
10754
  handleGoBack,
10692
- displayPriceFrom
10755
+ displayPriceFrom,
10756
+ productQuantity,
10757
+ increaseProductQuantity,
10758
+ decreaseProductQuantity,
10759
+ handleOnSubmit
10693
10760
  })
10694
10761
  })]
10695
10762
  })]
10696
10763
  });
10697
- const height = (_c = formContentRef1 == null ? void 0 : formContentRef1.current) == null ? void 0 : _c.clientHeight;
10698
- const height2 = (_d = formContentRef2 == null ? void 0 : formContentRef2.current) == null ? void 0 : _d.clientHeight;
10699
- const modalContentHeight = height + height2;
10764
+ const height = (_i = formContentRef1 == null ? void 0 : formContentRef1.current) == null ? void 0 : _i.clientHeight;
10765
+ const height2 = (_j = formContentRef2 == null ? void 0 : formContentRef2.current) == null ? void 0 : _j.clientHeight;
10766
+ const modalContentHeight = Number(height) + Number(height2);
10700
10767
  if (modalContentHeight > window.innerHeight * 0.8 || isNaN(modalContentHeight)) {
10701
10768
  if (formBodyHeight !== "80vh") {
10702
10769
  setFormBodyHeight("80vh");
@@ -10716,7 +10783,7 @@ function MenuProductRootDefaultUI(props) {
10716
10783
  handleClose: handleGoBack,
10717
10784
  children: /* @__PURE__ */ jsxs("div", {
10718
10785
  id: "product-configurator-view",
10719
- className: "w-full h-full",
10786
+ className: "size-full",
10720
10787
  style: {
10721
10788
  overflow: "hidden",
10722
10789
  textAlign: "left"
@@ -10822,7 +10889,8 @@ function useGroupsValidation(product) {
10822
10889
  }
10823
10890
  const MenuProductRoot = (props) => {
10824
10891
  const {
10825
- product
10892
+ product,
10893
+ showOutsideAvailabilitySlotItems
10826
10894
  } = props;
10827
10895
  const {
10828
10896
  MenuProductRootUI
@@ -10833,7 +10901,8 @@ const MenuProductRoot = (props) => {
10833
10901
  const MenuItemsDispatcherWrapper = !isEmpty(product.items) ? /* @__PURE__ */ jsx(MenuItemsDispatcher, {
10834
10902
  productItems: product.items,
10835
10903
  parentProduct: product,
10836
- rootProduct: product
10904
+ rootProduct: product,
10905
+ showOutsideAvailabilitySlotItems
10837
10906
  }) : /* @__PURE__ */ jsx(Fragment, {});
10838
10907
  if (MenuProductRootUI) {
10839
10908
  return /* @__PURE__ */ jsx(MenuProductRootUI, {
@@ -10877,7 +10946,8 @@ function ProductConfigurator(props) {
10877
10946
  isOpen,
10878
10947
  handleClose,
10879
10948
  currency,
10880
- showDebugState = false
10949
+ showDebugState = false,
10950
+ showOutsideAvailabilitySlotItems
10881
10951
  } = props;
10882
10952
  const {
10883
10953
  price
@@ -10966,7 +11036,8 @@ function ProductConfigurator(props) {
10966
11036
  countedProductTotalPrice: countedProductPrice * productQuantity,
10967
11037
  increaseProductQuantity,
10968
11038
  decreaseProductQuantity,
10969
- currency
11039
+ currency,
11040
+ showOutsideAvailabilitySlotItems
10970
11041
  })
10971
11042
  })]
10972
11043
  })
@@ -10976,4 +11047,3 @@ function ProductConfigurator(props) {
10976
11047
  });
10977
11048
  }
10978
11049
  export { ContextType, MainView, ProductConfigurator, ProductKinds, ProductTypes, SelMinSelMaxStatus, getProductToChangeInForm, index_esm as hookForm, selectProductsInForm, unselectProductsInForm, useMenuOptions, useProductData, useStore, validateProductFilter };
10979
- //# sourceMappingURL=index.es.js.map