ordering-ui-external 2.5.2 → 2.5.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.
Files changed (17) hide show
  1. package/_bundles/{7.ordering-ui.cf22ed960e0a8685bf74.js → 7.ordering-ui.b041abea697214292027.js} +1 -1
  2. package/_bundles/{ordering-ui.cf22ed960e0a8685bf74.js → ordering-ui.b041abea697214292027.js} +2 -2
  3. package/_modules/themes/five/src/components/CartContent/index.js +1 -1
  4. package/_modules/themes/five/src/components/Header/index.js +4 -3
  5. package/package.json +1 -1
  6. package/src/themes/five/src/components/CartContent/index.js +3 -0
  7. package/src/themes/five/src/components/Header/index.js +16 -10
  8. /package/_bundles/{0.ordering-ui.cf22ed960e0a8685bf74.js → 0.ordering-ui.b041abea697214292027.js} +0 -0
  9. /package/_bundles/{1.ordering-ui.cf22ed960e0a8685bf74.js → 1.ordering-ui.b041abea697214292027.js} +0 -0
  10. /package/_bundles/{2.ordering-ui.cf22ed960e0a8685bf74.js → 2.ordering-ui.b041abea697214292027.js} +0 -0
  11. /package/_bundles/{4.ordering-ui.cf22ed960e0a8685bf74.js → 4.ordering-ui.b041abea697214292027.js} +0 -0
  12. /package/_bundles/{5.ordering-ui.cf22ed960e0a8685bf74.js → 5.ordering-ui.b041abea697214292027.js} +0 -0
  13. /package/_bundles/{6.ordering-ui.cf22ed960e0a8685bf74.js → 6.ordering-ui.b041abea697214292027.js} +0 -0
  14. /package/_bundles/{7.ordering-ui.cf22ed960e0a8685bf74.js.LICENSE.txt → 7.ordering-ui.b041abea697214292027.js.LICENSE.txt} +0 -0
  15. /package/_bundles/{8.ordering-ui.cf22ed960e0a8685bf74.js → 8.ordering-ui.b041abea697214292027.js} +0 -0
  16. /package/_bundles/{9.ordering-ui.cf22ed960e0a8685bf74.js → 9.ordering-ui.b041abea697214292027.js} +0 -0
  17. /package/_bundles/{ordering-ui.cf22ed960e0a8685bf74.js.LICENSE.txt → ordering-ui.b041abea697214292027.js.LICENSE.txt} +0 -0
@@ -135,7 +135,7 @@ var CartContent = function CartContent(props) {
135
135
  return sum + (cart === null || cart === void 0 ? void 0 : cart.driver_tip);
136
136
  }, 0) > 0 && (configs === null || configs === void 0 ? void 0 : (_configs$multi_busine5 = configs.multi_business_checkout_show_combined_driver_tip) === null || _configs$multi_busine5 === void 0 ? void 0 : _configs$multi_busine5.value) === '1' && /*#__PURE__*/_react.default.createElement("span", null, /*#__PURE__*/_react.default.createElement("p", null, t('DRIVER_TIP', 'Driver tip')), /*#__PURE__*/_react.default.createElement("p", null, parsePrice(carts.reduce(function (sum, cart) {
137
137
  return sum + (cart === null || cart === void 0 ? void 0 : cart.driver_tip);
138
- }, 0)))), /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("h4", null, t('TOTAL_FOR_ALL_CARTS', 'Total for all Carts')), /*#__PURE__*/_react.default.createElement("h4", null, parsePrice(totalCartsPrice))))), (!carts || (carts === null || carts === void 0 ? void 0 : carts.length) === 0) && /*#__PURE__*/_react.default.createElement(_styles.NotCarts, null, /*#__PURE__*/_react.default.createElement("img", {
138
+ }, 0)))), /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("h4", null, t('TOTAL_FOR_ALL_CARTS', 'Total for all Carts')), /*#__PURE__*/_react.default.createElement("h4", null, parsePrice(totalCartsPrice))), /*#__PURE__*/_react.default.createElement("span", null, /*#__PURE__*/_react.default.createElement("p", null, t('CART_GROUP_MESSAGE_ALERT', 'Discounts may be applied at the time of payment for this group.'))))), (!carts || (carts === null || carts === void 0 ? void 0 : carts.length) === 0) && /*#__PURE__*/_react.default.createElement(_styles.NotCarts, null, /*#__PURE__*/_react.default.createElement("img", {
139
139
  src: (_theme$images = theme.images) === null || _theme$images === void 0 ? void 0 : (_theme$images$general = _theme$images.general) === null || _theme$images$general === void 0 ? void 0 : _theme$images$general.notFound,
140
140
  alt: "Not Found",
141
141
  width: "200px",
@@ -51,7 +51,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
51
51
  function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
52
52
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
53
53
  var Header = function Header(props) {
54
- var _configState$configs, _configState$configs$, _configState$configs2, _configState$configs3, _orderingTheme$theme, _orderingTheme$theme$, _orderingTheme$theme$2, _orderingTheme$theme$3, _orderingTheme$theme$4, _theme$header, _theme$header$compone, _theme$header$compone2, _orderState$options, _orderState$options2, _Object$keys, _customerState$user, _orderState$options5, _orderState$options5$, _theme$images, _theme$images$logos, _orderingTheme$theme2, _orderingTheme$theme3, _orderingTheme$theme4, _orderingTheme$theme5, _orderingTheme$theme6, _orderingTheme$theme7, _orderingTheme$theme8, _theme$images2, _theme$images2$logos, _theme$images3, _theme$images3$logos, _theme$images4, _theme$images4$logos, _orderingTheme$theme9, _orderingTheme$theme10, _orderingTheme$theme11, _orderingTheme$theme12, _orderingTheme$theme13, _orderingTheme$theme14, _orderingTheme$theme15, _theme$images5, _theme$images5$logos, _orderState$options7, _orderState$options7$, _orderState$options8, _orderState$options8$, _configState$configs4, _configState$configs5, _configState$configs6, _configState$configs7, _configState$configs8, _configState$configs9, _orderState$options9, _orderState$options10, _configState$configs10, _configState$configs11, _theme$defaultLanguag2, _theme$defaultLanguag3, _orderState$options11, _orderState$options12, _configState$configs12, _configState$configs13, _orderState$options13, _configState$configs14, _configState$configs15, _configState$configs16, _configState$configs17, _orderState$options14, _orderState$options15, _configState$configs18, _configState$configs19, _orderState$options16, _configState$configs20, _configState$configs21, _configState$configs22, _configState$configs23, _orderState$options17, _orderState$options18, _customerState$user2, _customerState$user3, _theme$defaultLanguag4, _theme$defaultLanguag5, _theme$defaultLanguag6, _theme$defaultLanguag7, _theme$defaultLanguag8, _theme$defaultLanguag9;
54
+ var _window$location$path, _configState$configs, _configState$configs$, _configState$configs2, _configState$configs3, _orderingTheme$theme, _orderingTheme$theme$, _orderingTheme$theme$2, _orderingTheme$theme$3, _orderingTheme$theme$4, _theme$header, _theme$header$compone, _theme$header$compone2, _orderState$options, _orderState$options2, _Object$keys, _customerState$user, _orderState$options5, _orderState$options5$, _theme$images, _theme$images$logos, _orderingTheme$theme2, _orderingTheme$theme3, _orderingTheme$theme4, _orderingTheme$theme5, _orderingTheme$theme6, _orderingTheme$theme7, _orderingTheme$theme8, _theme$images2, _theme$images2$logos, _theme$images3, _theme$images3$logos, _theme$images4, _theme$images4$logos, _orderingTheme$theme9, _orderingTheme$theme10, _orderingTheme$theme11, _orderingTheme$theme12, _orderingTheme$theme13, _orderingTheme$theme14, _orderingTheme$theme15, _theme$images5, _theme$images5$logos, _orderState$options7, _orderState$options7$, _orderState$options8, _orderState$options8$, _configState$configs4, _configState$configs5, _configState$configs6, _configState$configs7, _configState$configs8, _configState$configs9, _orderState$options9, _orderState$options10, _configState$configs10, _configState$configs11, _theme$defaultLanguag2, _theme$defaultLanguag3, _orderState$options11, _orderState$options12, _configState$configs12, _configState$configs13, _orderState$options13, _configState$configs14, _configState$configs15, _configState$configs16, _configState$configs17, _orderState$options14, _orderState$options15, _configState$configs18, _configState$configs19, _orderState$options16, _configState$configs20, _configState$configs21, _configState$configs22, _configState$configs23, _orderState$options17, _orderState$options18, _customerState$user2, _customerState$user3, _theme$defaultLanguag4, _theme$defaultLanguag5, _theme$defaultLanguag6, _theme$defaultLanguag7, _theme$defaultLanguag8, _theme$defaultLanguag9;
55
55
  var isHome = props.isHome,
56
56
  location = props.location,
57
57
  isShowOrderOptions = props.isShowOrderOptions,
@@ -141,6 +141,7 @@ var Header = function Header(props) {
141
141
  _useState22 = _slicedToArray(_useState21, 2),
142
142
  isFarAway = _useState22[0],
143
143
  setIsFarAway = _useState22[1];
144
+ var isMulticheckoutPage = (_window$location$path = window.location.pathname) === null || _window$location$path === void 0 ? void 0 : _window$location$path.includes('/multi-checkout');
144
145
  var cartsWithProducts = (orderState === null || orderState === void 0 ? void 0 : orderState.carts) && Object.values(orderState === null || orderState === void 0 ? void 0 : orderState.carts).filter(function (cart) {
145
146
  var _cart$products;
146
147
  return cart.products && ((_cart$products = cart.products) === null || _cart$products === void 0 ? void 0 : _cart$products.length) > 0;
@@ -363,7 +364,7 @@ var Header = function Header(props) {
363
364
  onClick: function onClick() {
364
365
  return handleOpenLoginSignUp('signup');
365
366
  }
366
- }, t('SIGN_UP', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag3 = theme.defaultLanguages) === null || _theme$defaultLanguag3 === void 0 ? void 0 : _theme$defaultLanguag3.SIGN_UP) || 'Sign up'))), auth && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, isShowOrderOptions && (windowSize.width > 768 ? /*#__PURE__*/_react.default.createElement(_CartPopover.CartPopover, {
367
+ }, t('SIGN_UP', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag3 = theme.defaultLanguages) === null || _theme$defaultLanguag3 === void 0 ? void 0 : _theme$defaultLanguag3.SIGN_UP) || 'Sign up'))), auth && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, isShowOrderOptions && (windowSize.width > 768 ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, !isMulticheckoutPage ? /*#__PURE__*/_react.default.createElement(_CartPopover.CartPopover, {
367
368
  open: openPopover.cart,
368
369
  carts: cartsWithProducts,
369
370
  onClick: function onClick() {
@@ -376,7 +377,7 @@ var Header = function Header(props) {
376
377
  location: location,
377
378
  isCustomerMode: isCustomerMode,
378
379
  setPreorderBusiness: setPreorderBusiness
379
- }) : /*#__PURE__*/_react.default.createElement(_HeaderOption.HeaderOption, {
380
+ }) : null) : /*#__PURE__*/_react.default.createElement(_HeaderOption.HeaderOption, {
380
381
  variant: "cart",
381
382
  totalCarts: cartsWithProducts === null || cartsWithProducts === void 0 ? void 0 : cartsWithProducts.length,
382
383
  onClick: function onClick(variant) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ordering-ui-external",
3
- "version": "2.5.2",
3
+ "version": "2.5.3",
4
4
  "description": "Ordering UI Components",
5
5
  "main": "./_modules/index.js",
6
6
  "exports": {
@@ -137,6 +137,9 @@ export const CartContent = (props) => {
137
137
  <h4>{t('TOTAL_FOR_ALL_CARTS', 'Total for all Carts')}</h4>
138
138
  <h4>{parsePrice(totalCartsPrice)}</h4>
139
139
  </div>
140
+ <span>
141
+ <p>{t('CART_GROUP_MESSAGE_ALERT', 'Discounts may be applied at the time of payment for this group.')}</p>
142
+ </span>
140
143
  </MultiCartPriceContainer>
141
144
  )}
142
145
  </>
@@ -87,6 +87,8 @@ export const Header = (props) => {
87
87
  const [confirm, setConfirm] = useState({ open: false, content: null, handleOnAccept: null })
88
88
  const [isFarAway, setIsFarAway] = useState(false)
89
89
 
90
+ const isMulticheckoutPage = window.location.pathname?.includes('/multi-checkout')
91
+
90
92
  const cartsWithProducts = (orderState?.carts && Object.values(orderState?.carts).filter(cart => cart.products && cart.products?.length > 0)) || null
91
93
 
92
94
  const windowSize = useWindowSize()
@@ -361,16 +363,20 @@ export const Header = (props) => {
361
363
  <>
362
364
  {isShowOrderOptions && (
363
365
  windowSize.width > 768 ? (
364
- <CartPopover
365
- open={openPopover.cart}
366
- carts={cartsWithProducts}
367
- onClick={() => handleTogglePopover('cart')}
368
- onClose={() => handleClosePopover('cart')}
369
- auth={auth}
370
- location={location}
371
- isCustomerMode={isCustomerMode}
372
- setPreorderBusiness={setPreorderBusiness}
373
- />
366
+ <>
367
+ {!isMulticheckoutPage ? (
368
+ <CartPopover
369
+ open={openPopover.cart}
370
+ carts={cartsWithProducts}
371
+ onClick={() => handleTogglePopover('cart')}
372
+ onClose={() => handleClosePopover('cart')}
373
+ auth={auth}
374
+ location={location}
375
+ isCustomerMode={isCustomerMode}
376
+ setPreorderBusiness={setPreorderBusiness}
377
+ />
378
+ ) : null}
379
+ </>
374
380
  ) : (
375
381
  <HeaderOption
376
382
  variant='cart'