ordering-ui-external 14.1.92 → 14.1.94

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 (21) hide show
  1. package/_bundles/{0.ordering-ui.892c096c695e1bed3c0b.js → 0.ordering-ui.a674c3773782d2efd895.js} +1 -1
  2. package/_bundles/{5.ordering-ui.892c096c695e1bed3c0b.js → 5.ordering-ui.a674c3773782d2efd895.js} +1 -1
  3. package/_bundles/{7.ordering-ui.892c096c695e1bed3c0b.js → 7.ordering-ui.a674c3773782d2efd895.js} +1 -1
  4. package/_bundles/ordering-ui.a674c3773782d2efd895.js +2 -0
  5. package/_bundles/{ordering-ui.892c096c695e1bed3c0b.js.LICENSE.txt → ordering-ui.a674c3773782d2efd895.js.LICENSE.txt} +2 -2
  6. package/_modules/contexts/ThemeContext/index.js +2 -2
  7. package/_modules/themes/five/src/components/Header/index.js +2 -2
  8. package/_modules/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/index.js +4 -5
  9. package/_modules/themes/five/src/components/ProductOptionSubOption/index.js +8 -5
  10. package/package.json +2 -2
  11. package/src/themes/five/src/components/Header/index.js +8 -1
  12. package/src/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/index.js +1 -2
  13. package/src/themes/five/src/components/ProductOptionSubOption/index.js +13 -1
  14. package/_bundles/ordering-ui.892c096c695e1bed3c0b.js +0 -2
  15. /package/_bundles/{1.ordering-ui.892c096c695e1bed3c0b.js → 1.ordering-ui.a674c3773782d2efd895.js} +0 -0
  16. /package/_bundles/{2.ordering-ui.892c096c695e1bed3c0b.js → 2.ordering-ui.a674c3773782d2efd895.js} +0 -0
  17. /package/_bundles/{4.ordering-ui.892c096c695e1bed3c0b.js → 4.ordering-ui.a674c3773782d2efd895.js} +0 -0
  18. /package/_bundles/{6.ordering-ui.892c096c695e1bed3c0b.js → 6.ordering-ui.a674c3773782d2efd895.js} +0 -0
  19. /package/_bundles/{7.ordering-ui.892c096c695e1bed3c0b.js.LICENSE.txt → 7.ordering-ui.a674c3773782d2efd895.js.LICENSE.txt} +0 -0
  20. /package/_bundles/{8.ordering-ui.892c096c695e1bed3c0b.js → 8.ordering-ui.a674c3773782d2efd895.js} +0 -0
  21. /package/_bundles/{9.ordering-ui.892c096c695e1bed3c0b.js → 9.ordering-ui.a674c3773782d2efd895.js} +0 -0
@@ -5,10 +5,10 @@
5
5
  */
6
6
 
7
7
  /*!
8
- * decimal.js v10.4.3
8
+ * decimal.js v10.5.0
9
9
  * An arbitrary-precision Decimal type for JavaScript.
10
10
  * https://github.com/MikeMcl/decimal.js
11
- * Copyright (c) 2022 Michael Mclaughlin <M8ch88l@gmail.com>
11
+ * Copyright (c) 2025 Michael Mclaughlin <M8ch88l@gmail.com>
12
12
  * MIT Licence
13
13
  */
14
14
 
@@ -23,8 +23,8 @@ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r)
23
23
  function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
24
24
  function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
25
25
  function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
26
- function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
27
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
26
+ function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
27
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
28
28
  /**
29
29
  * Create ThemeContext
30
30
  * Context to use theme on the app
@@ -52,7 +52,7 @@ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length)
52
52
  function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
53
53
  function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
54
54
  var Header = exports.Header = function Header(props) {
55
- var _window$location$path, _configState$configs, _configState$configs2, _theme$header, _theme$header2, _orderState$options, _orderState$options2, _theme$my_products, _Object$keys, _customerState$user, _orderState$options5, _theme$images, _theme$my_products2, _theme$images2, _theme$images3, _theme$images4, _theme$my_products3, _theme$images5, _orderState$options7, _orderState$options8, _configState$configs3, _configState$configs4, _configState$configs5, _orderState$options9, _orderState$options10, _configState$configs6, _theme$defaultLanguag2, _theme$defaultLanguag3, _orderState$options11, _configState$configs8, _orderState$options12, _configState$configs9, _configState$configs10, _orderState$options13, _configState$configs11, _orderState$options14, _configState$configs12, _configState$configs13, _orderState$options15, _orderState$options16, _customerState$user2, _customerState$user3, _theme$defaultLanguag4, _theme$defaultLanguag5, _theme$defaultLanguag6, _theme$defaultLanguag7, _theme$defaultLanguag8, _theme$defaultLanguag9;
55
+ var _window$location$path, _configState$configs, _configState$configs2, _theme$header, _theme$header2, _orderState$options, _orderState$options2, _theme$my_products, _Object$keys, _customerState$user, _orderState$options5, _theme$images, _theme$my_products2, _theme$images2, _theme$images3, _theme$my_products3, _theme$images4, _theme$my_products4, _theme$images5, _orderState$options7, _orderState$options8, _configState$configs3, _configState$configs4, _configState$configs5, _orderState$options9, _orderState$options10, _configState$configs6, _theme$defaultLanguag2, _theme$defaultLanguag3, _orderState$options11, _configState$configs8, _orderState$options12, _configState$configs9, _configState$configs10, _orderState$options13, _configState$configs11, _orderState$options14, _configState$configs12, _configState$configs13, _orderState$options15, _orderState$options16, _customerState$user2, _customerState$user3, _theme$defaultLanguag4, _theme$defaultLanguag5, _theme$defaultLanguag6, _theme$defaultLanguag7, _theme$defaultLanguag8, _theme$defaultLanguag9;
56
56
  var location = props.location,
57
57
  isShowOrderOptions = props.isShowOrderOptions,
58
58
  isHideSignup = props.isHideSignup,
@@ -297,7 +297,7 @@ var Header = exports.Header = function Header(props) {
297
297
  alt: "Isotype",
298
298
  width: isChew ? '70px' : '35px',
299
299
  height: isChew ? '20px' : '45px',
300
- src: isChew ? theme === null || theme === void 0 || (_theme$images3 = theme.images) === null || _theme$images3 === void 0 || (_theme$images3 = _theme$images3.logos) === null || _theme$images3 === void 0 ? void 0 : _theme$images3.chewLogo : windowSize.width <= 768 ? theme === null || theme === void 0 || (_theme$images4 = theme.images) === null || _theme$images4 === void 0 || (_theme$images4 = _theme$images4.logos) === null || _theme$images4 === void 0 ? void 0 : _theme$images4.isotypeInvert : (theme === null || theme === void 0 || (_theme$my_products3 = theme.my_products) === null || _theme$my_products3 === void 0 || (_theme$my_products3 = _theme$my_products3.components) === null || _theme$my_products3 === void 0 || (_theme$my_products3 = _theme$my_products3.images) === null || _theme$my_products3 === void 0 || (_theme$my_products3 = _theme$my_products3.components) === null || _theme$my_products3 === void 0 || (_theme$my_products3 = _theme$my_products3.logo) === null || _theme$my_products3 === void 0 || (_theme$my_products3 = _theme$my_products3.components) === null || _theme$my_products3 === void 0 ? void 0 : _theme$my_products3.image) || (theme === null || theme === void 0 || (_theme$images5 = theme.images) === null || _theme$images5 === void 0 || (_theme$images5 = _theme$images5.logos) === null || _theme$images5 === void 0 ? void 0 : _theme$images5.isotype),
300
+ src: isChew ? theme === null || theme === void 0 || (_theme$images3 = theme.images) === null || _theme$images3 === void 0 || (_theme$images3 = _theme$images3.logos) === null || _theme$images3 === void 0 ? void 0 : _theme$images3.chewLogo : windowSize.width <= 768 ? (theme === null || theme === void 0 || (_theme$my_products3 = theme.my_products) === null || _theme$my_products3 === void 0 || (_theme$my_products3 = _theme$my_products3.components) === null || _theme$my_products3 === void 0 || (_theme$my_products3 = _theme$my_products3.images) === null || _theme$my_products3 === void 0 || (_theme$my_products3 = _theme$my_products3.components) === null || _theme$my_products3 === void 0 || (_theme$my_products3 = _theme$my_products3.logo_mobile) === null || _theme$my_products3 === void 0 || (_theme$my_products3 = _theme$my_products3.components) === null || _theme$my_products3 === void 0 ? void 0 : _theme$my_products3.image) || (theme === null || theme === void 0 || (_theme$images4 = theme.images) === null || _theme$images4 === void 0 || (_theme$images4 = _theme$images4.logos) === null || _theme$images4 === void 0 ? void 0 : _theme$images4.isotypeInvert) : (theme === null || theme === void 0 || (_theme$my_products4 = theme.my_products) === null || _theme$my_products4 === void 0 || (_theme$my_products4 = _theme$my_products4.components) === null || _theme$my_products4 === void 0 || (_theme$my_products4 = _theme$my_products4.images) === null || _theme$my_products4 === void 0 || (_theme$my_products4 = _theme$my_products4.components) === null || _theme$my_products4 === void 0 || (_theme$my_products4 = _theme$my_products4.logo) === null || _theme$my_products4 === void 0 || (_theme$my_products4 = _theme$my_products4.components) === null || _theme$my_products4 === void 0 ? void 0 : _theme$my_products4.image) || (theme === null || theme === void 0 || (_theme$images5 = theme.images) === null || _theme$images5 === void 0 || (_theme$images5 = _theme$images5.logos) === null || _theme$images5 === void 0 ? void 0 : _theme$images5.isotype),
301
301
  loading: "lazy"
302
302
  }))), isShowOrderOptions && windowSize.width >= 576 && /*#__PURE__*/_react.default.createElement(_styles.Menu, {
303
303
  id: "center-side",
@@ -33,7 +33,7 @@ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length)
33
33
  function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
34
34
  function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
35
35
  var OriginalHomeHero = exports.OriginalHomeHero = function OriginalHomeHero(props) {
36
- var _theme$mobile_view_we, _theme$my_products, _theme$my_products2, _theme$my_products3, _theme$my_products4, _theme$header, _configs$powered_by_o, _theme$images, _theme$images2, _theme$images3, _theme$defaultLanguag, _theme$defaultLanguag2, _orderState$options3, _theme$defaultLanguag3, _theme$defaultLanguag4, _theme$defaultLanguag5, _orderState$options4, _theme$defaultLanguag6, _theme$defaultLanguag7, _theme$defaultLanguag8, _theme$defaultLanguag9, _theme$defaultLanguag10;
36
+ var _theme$mobile_view_we, _theme$my_products, _theme$my_products2, _theme$my_products3, _theme$header, _configs$powered_by_o, _theme$images, _theme$images2, _theme$my_products4, _theme$images3, _theme$defaultLanguag, _theme$defaultLanguag2, _orderState$options3, _theme$defaultLanguag3, _theme$defaultLanguag4, _theme$defaultLanguag5, _orderState$options4, _theme$defaultLanguag6, _theme$defaultLanguag7, _theme$defaultLanguag8, _theme$defaultLanguag9, _theme$defaultLanguag10;
37
37
  var onFindBusiness = props.onFindBusiness,
38
38
  notificationState = props.notificationState;
39
39
  var _useSession = (0, _orderingComponentsExternal.useSession)(),
@@ -73,9 +73,8 @@ var OriginalHomeHero = exports.OriginalHomeHero = function OriginalHomeHero(prop
73
73
  setNewAddressModalOpened = _useState8[1];
74
74
  var isShowLoginAccount = !(theme !== null && theme !== void 0 && (_theme$mobile_view_we = theme.mobile_view_web) !== null && _theme$mobile_view_we !== void 0 && (_theme$mobile_view_we = _theme$mobile_view_we.components) !== null && _theme$mobile_view_we !== void 0 && (_theme$mobile_view_we = _theme$mobile_view_we.home) !== null && _theme$mobile_view_we !== void 0 && (_theme$mobile_view_we = _theme$mobile_view_we.components) !== null && _theme$mobile_view_we !== void 0 && (_theme$mobile_view_we = _theme$mobile_view_we.login_account) !== null && _theme$mobile_view_we !== void 0 && _theme$mobile_view_we.hidden);
75
75
  var bgImg = theme === null || theme === void 0 || (_theme$my_products = theme.my_products) === null || _theme$my_products === void 0 || (_theme$my_products = _theme$my_products.components) === null || _theme$my_products === void 0 || (_theme$my_products = _theme$my_products.images) === null || _theme$my_products === void 0 || (_theme$my_products = _theme$my_products.components) === null || _theme$my_products === void 0 || (_theme$my_products = _theme$my_products.homepage_background) === null || _theme$my_products === void 0 || (_theme$my_products = _theme$my_products.components) === null || _theme$my_products === void 0 ? void 0 : _theme$my_products.image;
76
- var logo = theme === null || theme === void 0 || (_theme$my_products2 = theme.my_products) === null || _theme$my_products2 === void 0 || (_theme$my_products2 = _theme$my_products2.components) === null || _theme$my_products2 === void 0 || (_theme$my_products2 = _theme$my_products2.images) === null || _theme$my_products2 === void 0 || (_theme$my_products2 = _theme$my_products2.components) === null || _theme$my_products2 === void 0 || (_theme$my_products2 = _theme$my_products2.logo) === null || _theme$my_products2 === void 0 || (_theme$my_products2 = _theme$my_products2.components) === null || _theme$my_products2 === void 0 ? void 0 : _theme$my_products2.image;
77
- var mobileBgImg = theme === null || theme === void 0 || (_theme$my_products3 = theme.my_products) === null || _theme$my_products3 === void 0 || (_theme$my_products3 = _theme$my_products3.components) === null || _theme$my_products3 === void 0 || (_theme$my_products3 = _theme$my_products3.images) === null || _theme$my_products3 === void 0 || (_theme$my_products3 = _theme$my_products3.components) === null || _theme$my_products3 === void 0 || (_theme$my_products3 = _theme$my_products3.homepage_mobile_background) === null || _theme$my_products3 === void 0 || (_theme$my_products3 = _theme$my_products3.components) === null || _theme$my_products3 === void 0 ? void 0 : _theme$my_products3.image;
78
- var isFullScreen = theme === null || theme === void 0 || (_theme$my_products4 = theme.my_products) === null || _theme$my_products4 === void 0 || (_theme$my_products4 = _theme$my_products4.components) === null || _theme$my_products4 === void 0 || (_theme$my_products4 = _theme$my_products4.images) === null || _theme$my_products4 === void 0 || (_theme$my_products4 = _theme$my_products4.components) === null || _theme$my_products4 === void 0 ? void 0 : _theme$my_products4.homepage_image_fullscreen;
76
+ var mobileBgImg = theme === null || theme === void 0 || (_theme$my_products2 = theme.my_products) === null || _theme$my_products2 === void 0 || (_theme$my_products2 = _theme$my_products2.components) === null || _theme$my_products2 === void 0 || (_theme$my_products2 = _theme$my_products2.images) === null || _theme$my_products2 === void 0 || (_theme$my_products2 = _theme$my_products2.components) === null || _theme$my_products2 === void 0 || (_theme$my_products2 = _theme$my_products2.homepage_mobile_background) === null || _theme$my_products2 === void 0 || (_theme$my_products2 = _theme$my_products2.components) === null || _theme$my_products2 === void 0 ? void 0 : _theme$my_products2.image;
77
+ var isFullScreen = theme === null || theme === void 0 || (_theme$my_products3 = theme.my_products) === null || _theme$my_products3 === void 0 || (_theme$my_products3 = _theme$my_products3.components) === null || _theme$my_products3 === void 0 || (_theme$my_products3 = _theme$my_products3.images) === null || _theme$my_products3 === void 0 || (_theme$my_products3 = _theme$my_products3.components) === null || _theme$my_products3 === void 0 ? void 0 : _theme$my_products3.homepage_image_fullscreen;
79
78
  var isChew = (theme === null || theme === void 0 || (_theme$header = theme.header) === null || _theme$header === void 0 || (_theme$header = _theme$header.components) === null || _theme$header === void 0 || (_theme$header = _theme$header.layout) === null || _theme$header === void 0 || (_theme$header = _theme$header.type) === null || _theme$header === void 0 ? void 0 : _theme$header.toLowerCase()) === 'chew';
80
79
  var enabledPoweredByOrdering = configs === null || configs === void 0 || (_configs$powered_by_o = configs.powered_by_ordering_module) === null || _configs$powered_by_o === void 0 ? void 0 : _configs$powered_by_o.value;
81
80
  var handleFindBusinesses = function handleFindBusinesses() {
@@ -152,7 +151,7 @@ var OriginalHomeHero = exports.OriginalHomeHero = function OriginalHomeHero(prop
152
151
  isFullScreen: isFullScreen
153
152
  }, /*#__PURE__*/_react.default.createElement(_styles.ContentWrapper, null, windowSize.width < 576 && !isChew && /*#__PURE__*/_react.default.createElement(_styles.LogoWrapper, null, /*#__PURE__*/_react.default.createElement("img", {
154
153
  alt: "Logotype",
155
- src: theme === null || theme === void 0 || (_theme$images3 = theme.images) === null || _theme$images3 === void 0 || (_theme$images3 = _theme$images3.logos) === null || _theme$images3 === void 0 ? void 0 : _theme$images3.logotypeInvert,
154
+ src: (theme === null || theme === void 0 || (_theme$my_products4 = theme.my_products) === null || _theme$my_products4 === void 0 || (_theme$my_products4 = _theme$my_products4.components) === null || _theme$my_products4 === void 0 || (_theme$my_products4 = _theme$my_products4.images) === null || _theme$my_products4 === void 0 || (_theme$my_products4 = _theme$my_products4.components) === null || _theme$my_products4 === void 0 || (_theme$my_products4 = _theme$my_products4.logo) === null || _theme$my_products4 === void 0 || (_theme$my_products4 = _theme$my_products4.components) === null || _theme$my_products4 === void 0 ? void 0 : _theme$my_products4.image) || (theme === null || theme === void 0 || (_theme$images3 = theme.images) === null || _theme$images3 === void 0 || (_theme$images3 = _theme$images3.logos) === null || _theme$images3 === void 0 ? void 0 : _theme$images3.logotypeInvert),
156
155
  loading: "lazy"
157
156
  })), /*#__PURE__*/_react.default.createElement(_styles.HeroContent, null, /*#__PURE__*/_react.default.createElement(_styles.Title, null, t('TITLE_HOME', (theme === null || theme === void 0 || (_theme$defaultLanguag = theme.defaultLanguages) === null || _theme$defaultLanguag === void 0 ? void 0 : _theme$defaultLanguag.TITLE_HOME) || 'All We need is Food.')), /*#__PURE__*/_react.default.createElement(_styles.Slogan, null, t('SUBTITLE_HOME', (theme === null || theme === void 0 || (_theme$defaultLanguag2 = theme.defaultLanguages) === null || _theme$defaultLanguag2 === void 0 ? void 0 : _theme$defaultLanguag2.SUBTITLE_HOME) || 'Let\'s start to order food now')), /*#__PURE__*/_react.default.createElement(_styles.WrapInput, {
158
157
  onClick: handleAddressInput,
@@ -36,7 +36,7 @@ var ProductOptionSubOptionPropsAreEqual = function ProductOptionSubOptionPropsAr
36
36
  return JSON.stringify(prevProps.state) === JSON.stringify(nextProps.state) && JSON.stringify(prevProps.pizzaState) === JSON.stringify(nextProps.pizzaState) && prevProps.balance === nextProps.balance && JSON.stringify(prevProps.productCart) === JSON.stringify(nextProps.productCart);
37
37
  };
38
38
  var ProductOptionSubOptionUI = /*#__PURE__*/_react.default.memo(function (props) {
39
- var _pizzaState, _option$name, _option$name$toLowerC, _pizzaState2, _props$beforeElements, _props$beforeComponen, _pizzaState3, _pizzaState4, _props$afterComponent, _props$afterElements;
39
+ var _pizzaState, _pizzaState2, _option$name, _option$name$toLowerC, _pizzaState3, _props$beforeElements, _props$beforeComponen, _pizzaState4, _pizzaState5, _props$afterComponent, _props$afterElements;
40
40
  var state = props.state,
41
41
  increment = props.increment,
42
42
  decrement = props.decrement,
@@ -52,7 +52,10 @@ var ProductOptionSubOptionUI = /*#__PURE__*/_react.default.memo(function (props)
52
52
  changeQuantity = props.changeQuantity,
53
53
  isAlsea = props.isAlsea,
54
54
  quesoYSalsaOptions = props.quesoYSalsaOptions;
55
- var disableIncrement = option !== null && option !== void 0 && option.with_half_option ? (pizzaState === null || pizzaState === void 0 || (_pizzaState = pizzaState["option:".concat(option === null || option === void 0 ? void 0 : option.id)]) === null || _pizzaState === void 0 ? void 0 : _pizzaState.value) >= (option === null || option === void 0 ? void 0 : option.max) : option !== null && option !== void 0 && option.limit_suboptions_by_max ? balance === (option === null || option === void 0 ? void 0 : option.max) || state.quantity === suboption.max : state.quantity === (suboption === null || suboption === void 0 ? void 0 : suboption.max) || !state.selected && balance === (option === null || option === void 0 ? void 0 : option.max);
55
+ var maxByPosition = state.position === 'whole' ? suboption === null || suboption === void 0 ? void 0 : suboption.max : (suboption === null || suboption === void 0 ? void 0 : suboption.max) * 2;
56
+ var shouldApplyHalfLogic = (option === null || option === void 0 ? void 0 : option.with_half_option) && (option === null || option === void 0 ? void 0 : option.allow_suboption_quantity) && (option === null || option === void 0 ? void 0 : option.limit_suboptions_by_max);
57
+ var wouldExceedMaxInWhole = shouldApplyHalfLogic && state.position === 'whole' ? balance - state.quantity + (state.quantity + 1) > (option === null || option === void 0 ? void 0 : option.max) : false;
58
+ var disableIncrement = option !== null && option !== void 0 && option.with_half_option ? shouldApplyHalfLogic ? state.quantity === maxByPosition || (pizzaState === null || pizzaState === void 0 || (_pizzaState = pizzaState["option:".concat(option === null || option === void 0 ? void 0 : option.id)]) === null || _pizzaState === void 0 ? void 0 : _pizzaState.value) >= (option === null || option === void 0 ? void 0 : option.max) || wouldExceedMaxInWhole : (pizzaState === null || pizzaState === void 0 || (_pizzaState2 = pizzaState["option:".concat(option === null || option === void 0 ? void 0 : option.id)]) === null || _pizzaState2 === void 0 ? void 0 : _pizzaState2.value) >= (option === null || option === void 0 ? void 0 : option.max) : option !== null && option !== void 0 && option.limit_suboptions_by_max ? balance === (option === null || option === void 0 ? void 0 : option.max) || state.quantity === suboption.max : state.quantity === (suboption === null || suboption === void 0 ? void 0 : suboption.max) || !state.selected && balance === (option === null || option === void 0 ? void 0 : option.max);
56
59
  var quesoYSalsa = quesoYSalsaOptions.includes(option === null || option === void 0 || (_option$name = option.name) === null || _option$name === void 0 || (_option$name$toLowerC = _option$name.toLowerCase) === null || _option$name$toLowerC === void 0 ? void 0 : _option$name$toLowerC.call(_option$name));
57
60
  var price = option !== null && option !== void 0 && option.with_half_option && suboption !== null && suboption !== void 0 && suboption.half_price && state.position !== 'whole' ? suboption === null || suboption === void 0 ? void 0 : suboption.half_price : suboption === null || suboption === void 0 ? void 0 : suboption.price;
58
61
  var _useLanguage = (0, _orderingComponentsExternal.useLanguage)(),
@@ -102,7 +105,7 @@ var ProductOptionSubOptionUI = /*#__PURE__*/_react.default.memo(function (props)
102
105
  if (!minMaxValidation) {
103
106
  setShowMessage(false);
104
107
  }
105
- }, [balance, pizzaState === null || pizzaState === void 0 || (_pizzaState2 = pizzaState["option:".concat(option === null || option === void 0 ? void 0 : option.id)]) === null || _pizzaState2 === void 0 ? void 0 : _pizzaState2.value]);
108
+ }, [balance, pizzaState === null || pizzaState === void 0 || (_pizzaState3 = pizzaState["option:".concat(option === null || option === void 0 ? void 0 : option.id)]) === null || _pizzaState3 === void 0 ? void 0 : _pizzaState3.value]);
106
109
  (0, _react.useEffect)(function () {
107
110
  if (balance === (option === null || option === void 0 ? void 0 : option.max) && state !== null && state !== void 0 && state.selected && dirtyRef) {
108
111
  if ((dirtyRef === null || dirtyRef === void 0 ? void 0 : dirtyRef.current) !== null) {
@@ -143,7 +146,7 @@ var ProductOptionSubOptionUI = /*#__PURE__*/_react.default.memo(function (props)
143
146
  return handlePosition(e, 'left');
144
147
  }
145
148
  }), /*#__PURE__*/_react.default.createElement(_BsCircleFill.default, {
146
- className: [(pizzaState === null || pizzaState === void 0 || (_pizzaState3 = pizzaState["option:".concat(option === null || option === void 0 ? void 0 : option.id)]) === null || _pizzaState3 === void 0 ? void 0 : _pizzaState3.value) >= (option === null || option === void 0 ? void 0 : option.max) && !((option === null || option === void 0 ? void 0 : option.max) === 1 && (option === null || option === void 0 ? void 0 : option.min) === 1) ? 'disabled' : '', state.selected && state.position === 'whole' ? 'selected' : null].filter(function (classname) {
149
+ className: [(pizzaState === null || pizzaState === void 0 || (_pizzaState4 = pizzaState["option:".concat(option === null || option === void 0 ? void 0 : option.id)]) === null || _pizzaState4 === void 0 ? void 0 : _pizzaState4.value) >= (option === null || option === void 0 ? void 0 : option.max) && !((option === null || option === void 0 ? void 0 : option.max) === 1 && (option === null || option === void 0 ? void 0 : option.min) === 1) ? 'disabled' : '', state.selected && state.position === 'whole' ? 'selected' : null].filter(function (classname) {
147
150
  return classname;
148
151
  }).join(' '),
149
152
  onClick: function onClick(e) {
@@ -164,7 +167,7 @@ var ProductOptionSubOptionUI = /*#__PURE__*/_react.default.memo(function (props)
164
167
  onClick: function onClick(e) {
165
168
  return handleChangeQuantity(e, 2);
166
169
  },
167
- className: (pizzaState === null || pizzaState === void 0 || (_pizzaState4 = pizzaState["option:".concat(option === null || option === void 0 ? void 0 : option.id)]) === null || _pizzaState4 === void 0 ? void 0 : _pizzaState4.value) >= (option === null || option === void 0 ? void 0 : option.max) && !((option === null || option === void 0 ? void 0 : option.max) === 1 && (option === null || option === void 0 ? void 0 : option.min) === 1) ? 'disabled' : ''
170
+ className: (pizzaState === null || pizzaState === void 0 || (_pizzaState5 = pizzaState["option:".concat(option === null || option === void 0 ? void 0 : option.id)]) === null || _pizzaState5 === void 0 ? void 0 : _pizzaState5.value) >= (option === null || option === void 0 ? void 0 : option.max) && !((option === null || option === void 0 ? void 0 : option.max) === 1 && (option === null || option === void 0 ? void 0 : option.min) === 1) ? 'disabled' : ''
168
171
  }, /*#__PURE__*/_react.default.createElement(_styles.Text, null, /*#__PURE__*/_react.default.createElement("div", null, t('EXTRA', 'Extra'))), " ", /*#__PURE__*/_react.default.createElement(_MdCheckBoxOutlineBlank.default, {
169
172
  disabled: true
170
173
  })))), /*#__PURE__*/_react.default.createElement(_styles.SuboptionPrice, null, price > 0 && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, "+ ", parsePrice(price)))), showMessage && /*#__PURE__*/_react.default.createElement(_styles.Text, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ordering-ui-external",
3
- "version": "14.1.92",
3
+ "version": "14.1.94",
4
4
  "description": "Ordering UI Components",
5
5
  "main": "./_modules/index.js",
6
6
  "exports": {
@@ -88,7 +88,7 @@
88
88
  "lodash": "^4.17.19",
89
89
  "moment": "^2.29.4",
90
90
  "nanoid": "^4.0.0",
91
- "ordering-components-external": "13.2.24",
91
+ "ordering-components-external": "13.2.25",
92
92
  "payment": "^2.4.6",
93
93
  "polished": "^3.6.6",
94
94
  "react-bootstrap-icons": "^1.7.2",
@@ -243,7 +243,14 @@ export const Header = (props) => {
243
243
  isChew={isChew}
244
244
  >
245
245
  <img alt='Logotype' width='170px' height={isChew ? '35px' : '45px'} src={isChew ? theme?.images?.logos?.chewLogo : theme?.my_products?.components?.images?.components?.logo?.components?.image || theme?.images?.logos?.logotype} loading='lazy' />
246
- <img alt='Isotype' width={isChew ? '70px' : '35px'} height={isChew ? '20px' : '45px'} src={isChew ? theme?.images?.logos?.chewLogo : (windowSize.width <= 768 ? theme?.images?.logos?.isotypeInvert : theme?.my_products?.components?.images?.components?.logo?.components?.image || theme?.images?.logos?.isotype)} loading='lazy' />
246
+ <img
247
+ alt='Isotype'
248
+ width={isChew ? '70px' : '35px'}
249
+ height={isChew ? '20px' : '45px'}
250
+ src={isChew ? theme?.images?.logos?.chewLogo : (windowSize.width <= 768
251
+ ? theme?.my_products?.components?.images?.components?.logo_mobile?.components?.image || theme?.images?.logos?.isotypeInvert
252
+ : theme?.my_products?.components?.images?.components?.logo?.components?.image || theme?.images?.logos?.isotype)} loading='lazy'
253
+ />
247
254
  </LogoHeader>
248
255
  </LeftHeader>
249
256
  {isShowOrderOptions && windowSize.width >= 576 && (
@@ -41,7 +41,6 @@ export const OriginalHomeHero = (props) => {
41
41
 
42
42
  const isShowLoginAccount = !theme?.mobile_view_web?.components?.home?.components?.login_account?.hidden
43
43
  const bgImg = theme?.my_products?.components?.images?.components?.homepage_background?.components?.image
44
- const logo = theme?.my_products?.components?.images?.components?.logo?.components?.image
45
44
  const mobileBgImg = theme?.my_products?.components?.images?.components?.homepage_mobile_background?.components?.image
46
45
  const isFullScreen = theme?.my_products?.components?.images?.components?.homepage_image_fullscreen
47
46
  const isChew = theme?.header?.components?.layout?.type?.toLowerCase() === 'chew'
@@ -114,7 +113,7 @@ export const OriginalHomeHero = (props) => {
114
113
  <ContentWrapper>
115
114
  {windowSize.width < 576 && !isChew && (
116
115
  <LogoWrapper>
117
- <img alt='Logotype' src={theme?.images?.logos?.logotypeInvert} loading='lazy' />
116
+ <img alt='Logotype' src={theme?.my_products?.components?.images?.components?.logo?.components?.image || theme?.images?.logos?.logotypeInvert} loading='lazy' />
118
117
  </LogoWrapper>
119
118
  )}
120
119
  <HeroContent>
@@ -54,9 +54,21 @@ const ProductOptionSubOptionUI = React.memo((props) => {
54
54
  quesoYSalsaOptions
55
55
  } = props
56
56
 
57
+ const maxByPosition = state.position === 'whole'
58
+ ? suboption?.max
59
+ : suboption?.max * 2
60
+
61
+ const shouldApplyHalfLogic = option?.with_half_option && option?.allow_suboption_quantity && option?.limit_suboptions_by_max
62
+
63
+ const wouldExceedMaxInWhole = shouldApplyHalfLogic && state.position === 'whole'
64
+ ? (balance - state.quantity + (state.quantity + 1)) > option?.max
65
+ : false
66
+
57
67
  const disableIncrement =
58
68
  option?.with_half_option
59
- ? pizzaState?.[`option:${option?.id}`]?.value >= option?.max
69
+ ? shouldApplyHalfLogic
70
+ ? state.quantity === maxByPosition || pizzaState?.[`option:${option?.id}`]?.value >= option?.max || wouldExceedMaxInWhole
71
+ : pizzaState?.[`option:${option?.id}`]?.value >= option?.max
60
72
  : option?.limit_suboptions_by_max
61
73
  ? (balance === option?.max || state.quantity === suboption.max)
62
74
  : state.quantity === suboption?.max || (!state.selected && balance === option?.max)