ordering-ui-external 2.4.6 → 2.5.1

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 (147) hide show
  1. package/_bundles/{0.ordering-ui.038c4b4d536032472bc7.js → 0.ordering-ui.5488030edb520175432d.js} +1 -1
  2. package/_bundles/{1.ordering-ui.038c4b4d536032472bc7.js → 1.ordering-ui.5488030edb520175432d.js} +1 -1
  3. package/_bundles/{2.ordering-ui.038c4b4d536032472bc7.js → 2.ordering-ui.5488030edb520175432d.js} +1 -1
  4. package/_bundles/{4.ordering-ui.038c4b4d536032472bc7.js → 4.ordering-ui.5488030edb520175432d.js} +1 -1
  5. package/_bundles/{5.ordering-ui.038c4b4d536032472bc7.js → 5.ordering-ui.5488030edb520175432d.js} +1 -1
  6. package/_bundles/{6.ordering-ui.038c4b4d536032472bc7.js → 6.ordering-ui.5488030edb520175432d.js} +1 -1
  7. package/_bundles/{7.ordering-ui.038c4b4d536032472bc7.js → 7.ordering-ui.5488030edb520175432d.js} +2 -2
  8. package/_bundles/{8.ordering-ui.038c4b4d536032472bc7.js → 8.ordering-ui.5488030edb520175432d.js} +1 -1
  9. package/_bundles/{9.ordering-ui.038c4b4d536032472bc7.js → 9.ordering-ui.5488030edb520175432d.js} +1 -1
  10. package/_bundles/ordering-ui.5488030edb520175432d.js +2 -0
  11. package/_modules/components/OrdersOption/styles.js +1 -1
  12. package/_modules/components/StripeMethodForm/index.js +26 -11
  13. package/_modules/components/VerticalOrdersLayout/SingleOrderCard/index.js +15 -8
  14. package/_modules/components/VerticalOrdersLayout/styles.js +2 -2
  15. package/_modules/contexts/ThemeContext/index.js +1 -0
  16. package/_modules/themes/five/src/components/AddressList/index.js +8 -7
  17. package/_modules/themes/five/src/components/BusinessBasicInformation/index.js +28 -22
  18. package/_modules/themes/five/src/components/BusinessBasicInformation/styles.js +22 -21
  19. package/_modules/themes/five/src/components/BusinessController/index.js +5 -3
  20. package/_modules/themes/five/src/components/BusinessInformation/index.js +16 -10
  21. package/_modules/themes/five/src/components/BusinessItemAccordion/index.js +5 -8
  22. package/_modules/themes/five/src/components/BusinessListingSearch/index.js +93 -74
  23. package/_modules/themes/five/src/components/BusinessListingSearch/styles.js +10 -4
  24. package/_modules/themes/five/src/components/BusinessProductsCategories/index.js +7 -2
  25. package/_modules/themes/five/src/components/BusinessProductsCategories/styles.js +1 -1
  26. package/_modules/themes/five/src/components/BusinessProductsList/index.js +1 -1
  27. package/_modules/themes/five/src/components/BusinessProductsListing/index.js +38 -13
  28. package/_modules/themes/five/src/components/BusinessProductsListing/styles.js +20 -9
  29. package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +35 -23
  30. package/_modules/themes/five/src/components/Cart/index.js +7 -3
  31. package/_modules/themes/five/src/components/Checkout/index.js +12 -11
  32. package/_modules/themes/five/src/components/Checkout/styles.js +8 -4
  33. package/_modules/themes/five/src/components/CitiesControl/index.js +1 -1
  34. package/_modules/themes/five/src/components/GiftCard/GiftCardUI/index.js +1 -0
  35. package/_modules/themes/five/src/components/GiftCard/PurchaseGiftCard/index.js +4 -3
  36. package/_modules/themes/five/src/components/GiftCard/PurchaseGiftCard/styles.js +14 -8
  37. package/_modules/themes/five/src/components/GiftCard/RedeemGiftCard/index.js +1 -1
  38. package/_modules/themes/five/src/components/Header/index.js +29 -21
  39. package/_modules/themes/five/src/components/Header/styles.js +44 -40
  40. package/_modules/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/index.js +1 -1
  41. package/_modules/themes/five/src/components/MultiCartsPaymethodsAndWallets/index.js +36 -5
  42. package/_modules/themes/five/src/components/MultiCheckout/index.js +35 -6
  43. package/_modules/themes/five/src/components/MultiOrdersDetails/SingleOrderCard.js +6 -4
  44. package/_modules/themes/five/src/components/MyOrders/index.js +16 -10
  45. package/_modules/themes/five/src/components/MyOrders/styles.js +15 -12
  46. package/_modules/themes/five/src/components/OrderDetails/OrderEta.js +4 -3
  47. package/_modules/themes/five/src/components/OrderDetails/OrderHistory.js +2 -2
  48. package/_modules/themes/five/src/components/OrderDetails/index.js +2 -2
  49. package/_modules/themes/five/src/components/OrderItAgain/styles.js +1 -1
  50. package/_modules/themes/five/src/components/OrderProgress/index.js +15 -4
  51. package/_modules/themes/five/src/components/OrderTypeSelectorContent/index.js +16 -4
  52. package/_modules/themes/five/src/components/PageBanner/styles.js +1 -1
  53. package/_modules/themes/five/src/components/PaymentOptions/index.js +8 -5
  54. package/_modules/themes/five/src/components/ProductForm/index.js +27 -7
  55. package/_modules/themes/five/src/components/ProductForm/styles.js +40 -31
  56. package/_modules/themes/five/src/components/ProductItemAccordion/index.js +6 -6
  57. package/_modules/themes/five/src/components/RenderProductsLayout/index.js +3 -3
  58. package/_modules/themes/five/src/components/ReviewProduct/index.js +9 -4
  59. package/_modules/themes/five/src/components/ServiceForm/index.js +22 -3
  60. package/_modules/themes/five/src/components/ServiceForm/styles.js +9 -3
  61. package/_modules/themes/five/src/components/SidebarMenu/index.js +19 -10
  62. package/_modules/themes/five/src/components/SignUpForm/index.js +56 -29
  63. package/_modules/themes/five/src/components/SingleOrderCard/index.js +1 -1
  64. package/_modules/themes/five/src/components/SingleOrderCard/styles.js +26 -24
  65. package/_modules/themes/five/src/components/SingleProductCard/layouts/original/index.js +9 -5
  66. package/_modules/themes/five/src/components/SingleProductCard/layouts/original/styles.js +2 -2
  67. package/_modules/themes/five/src/components/StripeElementsForm/index.js +3 -1
  68. package/_modules/themes/five/src/components/UpsellingPage/index.js +2 -1
  69. package/_modules/themes/five/src/components/UserFormDetails/index.js +58 -18
  70. package/_modules/themes/five/src/components/UserFormDetails/styles.js +7 -3
  71. package/_modules/themes/five/src/components/UserPopover/index.js +41 -25
  72. package/_modules/themes/five/src/components/UserProfileForm/index.js +19 -11
  73. package/_modules/themes/five/src/styles/Buttons/index.js +68 -58
  74. package/_modules/themes/five/src/styles/Inputs/index.js +40 -16
  75. package/_modules/utils/index.js +8 -2
  76. package/index.html +1 -1
  77. package/package.json +3 -2
  78. package/src/components/OrdersOption/styles.js +1 -0
  79. package/src/components/StripeMethodForm/index.js +22 -10
  80. package/src/components/VerticalOrdersLayout/SingleOrderCard/index.js +35 -17
  81. package/src/components/VerticalOrdersLayout/styles.js +9 -0
  82. package/src/contexts/ThemeContext/index.js +1 -0
  83. package/src/themes/five/src/components/AddressList/index.js +6 -6
  84. package/src/themes/five/src/components/BusinessBasicInformation/index.js +24 -22
  85. package/src/themes/five/src/components/BusinessBasicInformation/styles.js +24 -3
  86. package/src/themes/five/src/components/BusinessController/index.js +4 -2
  87. package/src/themes/five/src/components/BusinessInformation/index.js +24 -12
  88. package/src/themes/five/src/components/BusinessItemAccordion/index.js +5 -6
  89. package/src/themes/five/src/components/BusinessListingSearch/index.js +127 -101
  90. package/src/themes/five/src/components/BusinessListingSearch/styles.js +15 -0
  91. package/src/themes/five/src/components/BusinessProductsCategories/index.js +7 -2
  92. package/src/themes/five/src/components/BusinessProductsCategories/styles.js +1 -1
  93. package/src/themes/five/src/components/BusinessProductsList/index.js +1 -1
  94. package/src/themes/five/src/components/BusinessProductsListing/index.js +34 -9
  95. package/src/themes/five/src/components/BusinessProductsListing/styles.js +26 -0
  96. package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +9 -2
  97. package/src/themes/five/src/components/Cart/index.js +3 -4
  98. package/src/themes/five/src/components/Checkout/index.js +18 -4
  99. package/src/themes/five/src/components/Checkout/styles.js +22 -0
  100. package/src/themes/five/src/components/CitiesControl/index.js +1 -1
  101. package/src/themes/five/src/components/GiftCard/GiftCardUI/index.js +1 -0
  102. package/src/themes/five/src/components/GiftCard/PurchaseGiftCard/index.js +41 -31
  103. package/src/themes/five/src/components/GiftCard/PurchaseGiftCard/styles.js +15 -4
  104. package/src/themes/five/src/components/GiftCard/RedeemGiftCard/index.js +2 -2
  105. package/src/themes/five/src/components/Header/index.js +17 -5
  106. package/src/themes/five/src/components/Header/styles.js +9 -6
  107. package/src/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/index.js +1 -1
  108. package/src/themes/five/src/components/MultiCartsPaymethodsAndWallets/index.js +83 -51
  109. package/src/themes/five/src/components/MultiCheckout/index.js +21 -6
  110. package/src/themes/five/src/components/MultiOrdersDetails/SingleOrderCard.js +8 -5
  111. package/src/themes/five/src/components/MyOrders/index.js +13 -9
  112. package/src/themes/five/src/components/MyOrders/styles.js +3 -1
  113. package/src/themes/five/src/components/OrderDetails/OrderEta.js +6 -3
  114. package/src/themes/five/src/components/OrderDetails/OrderHistory.js +8 -2
  115. package/src/themes/five/src/components/OrderDetails/index.js +2 -2
  116. package/src/themes/five/src/components/OrderItAgain/styles.js +1 -1
  117. package/src/themes/five/src/components/OrderProgress/index.js +16 -5
  118. package/src/themes/five/src/components/OrderTypeSelectorContent/index.js +7 -4
  119. package/src/themes/five/src/components/PageBanner/styles.js +1 -4
  120. package/src/themes/five/src/components/PaymentOptions/index.js +7 -4
  121. package/src/themes/five/src/components/ProductForm/index.js +23 -5
  122. package/src/themes/five/src/components/ProductForm/styles.js +36 -1
  123. package/src/themes/five/src/components/ProductItemAccordion/index.js +37 -29
  124. package/src/themes/five/src/components/RenderProductsLayout/index.js +3 -3
  125. package/src/themes/five/src/components/ReviewProduct/index.js +14 -6
  126. package/src/themes/five/src/components/ServiceForm/index.js +22 -4
  127. package/src/themes/five/src/components/ServiceForm/styles.js +16 -0
  128. package/src/themes/five/src/components/SidebarMenu/index.js +162 -144
  129. package/src/themes/five/src/components/SignUpForm/index.js +4 -3
  130. package/src/themes/five/src/components/SingleOrderCard/index.js +1 -1
  131. package/src/themes/five/src/components/SingleOrderCard/styles.js +9 -1
  132. package/src/themes/five/src/components/SingleProductCard/layouts/original/index.js +13 -3
  133. package/src/themes/five/src/components/SingleProductCard/layouts/original/styles.js +2 -2
  134. package/src/themes/five/src/components/StripeElementsForm/index.js +3 -1
  135. package/src/themes/five/src/components/UpsellingPage/index.js +1 -1
  136. package/src/themes/five/src/components/UserFormDetails/index.js +58 -14
  137. package/src/themes/five/src/components/UserFormDetails/styles.js +16 -0
  138. package/src/themes/five/src/components/UserPopover/index.js +26 -15
  139. package/src/themes/five/src/components/UserProfileForm/index.js +18 -9
  140. package/src/themes/five/src/styles/Buttons/index.js +11 -0
  141. package/src/themes/five/src/styles/Inputs/index.js +34 -0
  142. package/src/utils/index.js +5 -0
  143. package/template/app.js +5 -3
  144. package/template/theme.json +335 -24
  145. package/_bundles/ordering-ui.038c4b4d536032472bc7.js +0 -2
  146. /package/_bundles/{7.ordering-ui.038c4b4d536032472bc7.js.LICENSE.txt → 7.ordering-ui.5488030edb520175432d.js.LICENSE.txt} +0 -0
  147. /package/_bundles/{ordering-ui.038c4b4d536032472bc7.js.LICENSE.txt → ordering-ui.5488030edb520175432d.js.LICENSE.txt} +0 -0
@@ -45,7 +45,7 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
45
45
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
46
46
  var PIXELS_TO_SCROLL = 300;
47
47
  var BusinessProductsListingUI = function BusinessProductsListingUI(props) {
48
- var _configs$add_product_, _configs$checkout_mul, _Object$values$find, _businessState$busine, _orderingTheme$theme, _orderingTheme$theme$, _orderingTheme$theme$2, _orderingTheme$theme$3, _theme$defaultLanguag, _theme$defaultLanguag2, _theme$defaultLanguag3, _theme$defaultLanguag4, _theme$defaultLanguag5, _theme$defaultLanguag6, _currentCart$products2, _theme$defaultLanguag7, _theme$defaultLanguag8, _theme$defaultLanguag9, _theme$defaultLanguag10, _error$, _theme$defaultLanguag11, _currentCart$products3, _theme$defaultLanguag12, _theme$defaultLanguag13, _theme$defaultLanguag14, _theme$defaultLanguag15, _currentCart$products4, _currentCart$products5, _currentCart$products6, _productModal$error$, _theme$defaultLanguag16, _productModal$product2, _business$professiona2, _currentCart$products7, _currentCart$products8;
48
+ var _configs$add_product_, _configs$checkout_mul, _Object$values$find, _businessState$busine, _theme$business_view, _theme$business_view$, _theme$business_view$2, _theme$defaultLanguag, _theme$defaultLanguag2, _theme$defaultLanguag3, _theme$defaultLanguag4, _theme$defaultLanguag5, _theme$defaultLanguag6, _currentCart$products2, _theme$defaultLanguag7, _theme$defaultLanguag8, _theme$defaultLanguag9, _theme$defaultLanguag10, _error$, _theme$defaultLanguag11, _currentCart$products3, _theme$defaultLanguag12, _theme$defaultLanguag13, _theme$defaultLanguag14, _theme$defaultLanguag15, _currentCart$products4, _currentCart$products5, _currentCart$products6, _productModal$error$, _theme$defaultLanguag16, _productModal$product2, _business$professiona2, _currentCart$products7, _currentCart$products8;
49
49
  var errors = props.errors,
50
50
  openCategories = props.openCategories,
51
51
  isInitialRender = props.isInitialRender,
@@ -92,10 +92,12 @@ var BusinessProductsListingUI = function BusinessProductsListingUI(props) {
92
92
  t = _useLanguage2[1];
93
93
  var _useOrder = (0, _orderingComponentsExternal.useOrder)(),
94
94
  _useOrder2 = _slicedToArray(_useOrder, 2),
95
- carts = _useOrder2[0].carts,
96
- _useOrder2$ = _useOrder2[1],
97
- addProduct = _useOrder2$.addProduct,
98
- updateProduct = _useOrder2$.updateProduct;
95
+ _useOrder2$ = _useOrder2[0],
96
+ carts = _useOrder2$.carts,
97
+ options = _useOrder2$.options,
98
+ _useOrder2$2 = _useOrder2[1],
99
+ addProduct = _useOrder2$2.addProduct,
100
+ updateProduct = _useOrder2$2.updateProduct;
99
101
  var _useUtils = (0, _orderingComponentsExternal.useUtils)(),
100
102
  _useUtils2 = _slicedToArray(_useUtils, 1),
101
103
  parsePrice = _useUtils2[0].parsePrice;
@@ -110,9 +112,9 @@ var BusinessProductsListingUI = function BusinessProductsListingUI(props) {
110
112
  var _useSite = (0, _orderingComponentsExternal.useSite)(),
111
113
  _useSite2 = _slicedToArray(_useSite, 1),
112
114
  site = _useSite2[0].site;
113
- var _useOrderingTheme = (0, _orderingComponentsExternal.useOrderingTheme)(),
114
- _useOrderingTheme2 = _slicedToArray(_useOrderingTheme, 1),
115
- orderingTheme = _useOrderingTheme2[0];
115
+ var _useBusiness = (0, _orderingComponentsExternal.useBusiness)(),
116
+ _useBusiness2 = _slicedToArray(_useBusiness, 2),
117
+ setBusiness = _useBusiness2[1].setBusiness;
116
118
  var _useState = (0, _react.useState)(false),
117
119
  _useState2 = _slicedToArray(_useState, 2),
118
120
  openProduct = _useState2[0],
@@ -157,7 +159,9 @@ var BusinessProductsListingUI = function BusinessProductsListingUI(props) {
157
159
  return (cart === null || cart === void 0 ? void 0 : (_cart$business = cart.business) === null || _cart$business === void 0 ? void 0 : _cart$business.slug) === (business === null || business === void 0 ? void 0 : business.slug);
158
160
  })) !== null && _Object$values$find !== void 0 ? _Object$values$find : {};
159
161
  var isLazy = businessState === null || businessState === void 0 ? void 0 : (_businessState$busine = businessState.business) === null || _businessState$busine === void 0 ? void 0 : _businessState$busine.lazy_load_products_recommended;
160
- var showViewOrderButton = !(orderingTheme !== null && orderingTheme !== void 0 && (_orderingTheme$theme = orderingTheme.theme) !== null && _orderingTheme$theme !== void 0 && (_orderingTheme$theme$ = _orderingTheme$theme.business_view) !== null && _orderingTheme$theme$ !== void 0 && (_orderingTheme$theme$2 = _orderingTheme$theme$.components) !== null && _orderingTheme$theme$2 !== void 0 && (_orderingTheme$theme$3 = _orderingTheme$theme$2.order_view_button) !== null && _orderingTheme$theme$3 !== void 0 && _orderingTheme$theme$3.hidden);
162
+ var showViewOrderButton = !(theme !== null && theme !== void 0 && (_theme$business_view = theme.business_view) !== null && _theme$business_view !== void 0 && (_theme$business_view$ = _theme$business_view.components) !== null && _theme$business_view$ !== void 0 && (_theme$business_view$2 = _theme$business_view$.order_view_button) !== null && _theme$business_view$2 !== void 0 && _theme$business_view$2.hidden);
163
+ var cateringTypes = [7, 8];
164
+ var cateringPreorder = cateringTypes.includes(options === null || options === void 0 ? void 0 : options.type);
161
165
  var sortByOptions = [{
162
166
  value: null,
163
167
  content: t('SORT_BY', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag = theme.defaultLanguages) === null || _theme$defaultLanguag === void 0 ? void 0 : _theme$defaultLanguag.SORT_BY) || 'Sort By'),
@@ -264,6 +268,16 @@ var BusinessProductsListingUI = function BusinessProductsListingUI(props) {
264
268
  };
265
269
  var handleScroll = (0, _react.useCallback)(function () {
266
270
  var _document$documentEle, _document$documentEle2;
271
+ var backArrowElement = document.getElementById('back-arrow');
272
+ if (backArrowElement) {
273
+ var limit = window.pageYOffset >= (backArrowElement === null || backArrowElement === void 0 ? void 0 : backArrowElement.offsetTop) && window.pageYOffset > 0;
274
+ if (limit && windowSize.width < 993) {
275
+ var classAdded = backArrowElement.classList.contains('fixed-arrow');
276
+ !classAdded && backArrowElement.classList.add('fixed-arrow');
277
+ } else {
278
+ backArrowElement && backArrowElement.classList.remove('fixed-arrow');
279
+ }
280
+ }
267
281
  var innerHeightScrolltop = window.innerHeight + ((_document$documentEle = document.documentElement) === null || _document$documentEle === void 0 ? void 0 : _document$documentEle.scrollTop) + PIXELS_TO_SCROLL;
268
282
  var badScrollPosition = innerHeightScrolltop < ((_document$documentEle2 = document.documentElement) === null || _document$documentEle2 === void 0 ? void 0 : _document$documentEle2.offsetHeight);
269
283
  var hasMore = !(categoryState.pagination.totalPages === categoryState.pagination.currentPage);
@@ -271,7 +285,7 @@ var BusinessProductsListingUI = function BusinessProductsListingUI(props) {
271
285
  getNextProducts({
272
286
  isNextPage: true
273
287
  });
274
- }, [categoryState]);
288
+ }, [categoryState, windowSize.width]);
275
289
  var handleChangePage = function handleChangePage(data) {
276
290
  if (Object.entries(data.query).length === 0 && openProduct) {
277
291
  setModalIsOpen(false);
@@ -400,12 +414,22 @@ var BusinessProductsListingUI = function BusinessProductsListingUI(props) {
400
414
  adjustBusiness(adjustBusinessId);
401
415
  }
402
416
  }, [currentCart]);
403
- return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_styles.ProductsContainer, null, !props.useKioskApp && /*#__PURE__*/_react.default.createElement(_styles.HeaderContent, null, !location.pathname.includes('/marketplace') && /*#__PURE__*/_react.default.createElement(_reactBootstrapIcons.ArrowLeft, {
417
+ (0, _react.useEffect)(function () {
418
+ if (cateringPreorder) {
419
+ setBusiness(business);
420
+ }
421
+ return function () {
422
+ setBusiness({});
423
+ };
424
+ }, [cateringPreorder, business]);
425
+ return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_styles.ProductsContainer, null, !props.useKioskApp && /*#__PURE__*/_react.default.createElement(_styles.HeaderContent, null, !location.pathname.includes('/marketplace') && /*#__PURE__*/_react.default.createElement("div", {
426
+ id: "back-arrow"
427
+ }, /*#__PURE__*/_react.default.createElement(_reactBootstrapIcons.ArrowLeft, {
404
428
  className: "back-arrow",
405
429
  onClick: function onClick() {
406
430
  return handleGoToBusinessList();
407
431
  }
408
- }), (windowSize === null || windowSize === void 0 ? void 0 : windowSize.width) < 576 && /*#__PURE__*/_react.default.createElement(_styles.OrderContextUIWrapper, null, /*#__PURE__*/_react.default.createElement(_OrderContextUI.OrderContextUI, {
432
+ })), (windowSize === null || windowSize === void 0 ? void 0 : windowSize.width) < 576 && /*#__PURE__*/_react.default.createElement(_styles.OrderContextUIWrapper, null, /*#__PURE__*/_react.default.createElement(_OrderContextUI.OrderContextUI, {
409
433
  isCheckOut: true
410
434
  }))), /*#__PURE__*/_react.default.createElement(_RenderProductsLayout.RenderProductsLayout, {
411
435
  errors: errors,
@@ -501,7 +525,8 @@ var BusinessProductsListingUI = function BusinessProductsListingUI(props) {
501
525
  isCartOnProductsList: isCartOnProductsList,
502
526
  handleCartOpen: function handleCartOpen(val) {
503
527
  return setIsCartOpen(val);
504
- }
528
+ },
529
+ businessConfigs: business === null || business === void 0 ? void 0 : business.configs
505
530
  })) : /*#__PURE__*/_react.default.createElement(_styles.EmptyCart, null, /*#__PURE__*/_react.default.createElement("div", {
506
531
  className: "empty-content"
507
532
  }, /*#__PURE__*/_react.default.createElement(_reactBootstrapIcons.Cart3, null), /*#__PURE__*/_react.default.createElement("p", null, t('ADD_PRODUCTS_IN_YOUR_CART', 'Add products in your cart'))), /*#__PURE__*/_react.default.createElement(_styles.EmptyBtnWrapper, null, /*#__PURE__*/_react.default.createElement("span", null, parsePrice(0)), /*#__PURE__*/_react.default.createElement(_Buttons.Button, null, t('EMPTY_CART', 'Empty cart')))))), /*#__PURE__*/_react.default.createElement(_Modal.Modal, {
@@ -6,11 +6,17 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.Title = exports.SkeletonItem = exports.ProductsContainer = exports.ProductLoading = exports.OrderContextUIWrapper = exports.MobileCartViewWrapper = exports.HeaderContent = exports.EmptyCart = exports.EmptyBtnWrapper = exports.BusinessCartContent = void 0;
8
8
  var _styledComponents = _interopRequireWildcard(require("styled-components"));
9
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12;
9
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14;
10
10
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
11
11
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
12
12
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
13
- var ProductsContainer = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 95%;\n margin: 20px auto 0px;\n"])));
13
+ var ProductsContainer = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 95%;\n margin: 20px auto 0px;\n > svg {\n color: ", ";\n font-size: 24px;\n cursor: pointer;\n margin-bottom: 5px;\n }\n > div {\n background-color: ", ";\n }\n\n"])), function (props) {
14
+ return props.theme.colors.headingColor;
15
+ }, function (_ref) {
16
+ var _theme$business_view, _theme$business_view$, _theme$business_view$2;
17
+ var theme = _ref.theme;
18
+ return theme === null || theme === void 0 ? void 0 : (_theme$business_view = theme.business_view) === null || _theme$business_view === void 0 ? void 0 : (_theme$business_view$ = _theme$business_view.components) === null || _theme$business_view$ === void 0 ? void 0 : (_theme$business_view$2 = _theme$business_view$.style) === null || _theme$business_view$2 === void 0 ? void 0 : _theme$business_view$2.backgroundColor;
19
+ });
14
20
  exports.ProductsContainer = ProductsContainer;
15
21
  var ProductLoading = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n width: 100%;\n display: flex;\n flex-direction: column;\n"])));
16
22
  exports.ProductLoading = ProductLoading;
@@ -18,11 +24,11 @@ var SkeletonItem = _styledComponents.default.div(_templateObject3 || (_templateO
18
24
  exports.SkeletonItem = SkeletonItem;
19
25
  var MobileCartViewWrapper = _styledComponents.default.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n position: fixed;\n width: 100vw;\n left: 0;\n bottom: 0;\n background-color: white;\n padding: 15px 25px;\n display: flex;\n align-items: center;\n justify-content: space-between;\n box-sizing: border-box;\n z-index: 1006;\n box-shadow: 0px 4px 10px rgb(0 0 0 / 12%);\n\n span {\n font-weight: 600;\n font-size: 16px;\n\n @media (min-width: 1200px) {\n font-size: 18px;\n padding-left: 20px;\n }\n }\n\n button {\n height: 44px;\n border-radius: 7.6px;\n }\n"])));
20
26
  exports.MobileCartViewWrapper = MobileCartViewWrapper;
21
- var BusinessCartContent = _styledComponents.default.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n background: white;\n padding: 30px;\n position: relative;\n margin-bottom: 30px;\n max-height: ", ";\n overflow: auto;\n\n .product.accordion {\n margin: 0;\n }\n\n /* .accordion.active {\n padding-bottom: 10px;\n } */\n\n ", "\n\n @media (min-width: 1200px) {\n position: sticky;\n top: 0;\n }\n\n @media (min-width: 768px) {\n padding: 35px 30px;\n }\n"])), function (_ref) {
22
- var maxHeight = _ref.maxHeight;
27
+ var BusinessCartContent = _styledComponents.default.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n background: white;\n padding: 30px;\n position: relative;\n margin-bottom: 30px;\n max-height: ", ";\n overflow: auto;\n\n .product.accordion {\n margin: 0;\n }\n\n /* .accordion.active {\n padding-bottom: 10px;\n } */\n\n ", "\n\n @media (min-width: 1200px) {\n position: sticky;\n top: 0;\n }\n\n @media (min-width: 768px) {\n padding: 35px 30px;\n }\n"])), function (_ref2) {
28
+ var maxHeight = _ref2.maxHeight;
23
29
  return "".concat(maxHeight, "px");
24
- }, function (_ref2) {
25
- var isModal = _ref2.isModal;
30
+ }, function (_ref3) {
31
+ var isModal = _ref3.isModal;
26
32
  return !isModal && (0, _styledComponents.css)(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n border: 1px solid #E9ECEF;\n box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.12);\n border-radius: 7.6px;\n "])));
27
33
  });
28
34
  exports.BusinessCartContent = BusinessCartContent;
@@ -36,9 +42,14 @@ var EmptyBtnWrapper = _styledComponents.default.div(_templateObject9 || (_templa
36
42
  return props.theme.colors.darkTextColor;
37
43
  });
38
44
  exports.EmptyBtnWrapper = EmptyBtnWrapper;
39
- var HeaderContent = _styledComponents.default.div(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n margin-bottom: 10px;\n .back-arrow {\n font-size: 24px;\n cursor: pointer;\n }\n"])));
45
+ var HeaderContent = _styledComponents.default.div(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n margin-bottom: 10px;\n .back-arrow {\n font-size: 24px;\n cursor: pointer;\n }\n .fixed-arrow {\n position: fixed;\n top: 0;\n left: 0;\n z-index: 1001;\n width: 100vw;\n background-color: ", ";\n height: 56px;\n display: flex;\n align-items: center;\n ", "\n }\n"])), function (props) {
46
+ return props.theme.colors.backgroundPage;
47
+ }, function (props) {
48
+ var _props$theme;
49
+ return (_props$theme = props.theme) !== null && _props$theme !== void 0 && _props$theme.rtl ? (0, _styledComponents.css)(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n padding-right: 10px;\n "]))) : (0, _styledComponents.css)(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n padding-left: 10px;\n "])));
50
+ });
40
51
  exports.HeaderContent = HeaderContent;
41
- var OrderContextUIWrapper = _styledComponents.default.div(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n flex: 1;\n width: 100%;\n ", "\n"])), function (props) {
42
- return props.theme.rtl && (0, _styledComponents.css)(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n margin-left: 0px;\n margin-right: 15px;\n "])));
52
+ var OrderContextUIWrapper = _styledComponents.default.div(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n flex: 1;\n width: 100%;\n ", "\n"])), function (props) {
53
+ return props.theme.rtl && (0, _styledComponents.css)(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n margin-left: 0px;\n margin-right: 15px;\n "])));
43
54
  });
44
55
  exports.OrderContextUIWrapper = OrderContextUIWrapper;
@@ -51,7 +51,7 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
51
51
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
52
52
  var PIXELS_TO_SCROLL = 300;
53
53
  var BusinessesListingUI = function BusinessesListingUI(props) {
54
- var _ref, _theme$business_listi, _theme$business_listi2, _theme$business_listi3, _orderState$options, _theme$business_listi4, _theme$business_listi5, _theme$business_listi6, _theme$business_listi7, _theme$business_listi8, _theme$business_listi9, _theme$business_listi10, _theme$business_listi11, _theme$business_listi12, _theme$business_listi13, _theme$business_listi14, _theme$business_listi15, _theme$business_listi16, _theme$business_listi17, _theme$business_listi18, _theme$business_listi19, _theme$business_listi20, _theme$business_listi21, _businessesList$busin, _orderingTheme$theme, _orderingTheme$theme$, _orderingTheme$theme$2, _orderingTheme$theme$3, _orderingTheme$theme$4, _orderState$options2, _orderState$options3, _businessesList$busin3, _configs$business_lis, _configs$business_lis2, _theme$images2, _theme$images2$genera, _theme$business_listi22, _theme$business_listi23, _theme$business_listi24, _theme$business_listi25, _Object$values, _configs$business_lis3, _theme$images3, _theme$images3$genera, _theme$business_listi26, _theme$business_listi27, _theme$business_listi28, _theme$business_listi29, _citiesState$cities2, _citiesState$cities3, _citiesState$cities3$, _configs$advanced_bus, _orderState$options6, _orderState$options6$, _configs$advanced_bus2, _citiesState$cities4, _citiesState$cities5, _citiesState$cities5$, _orderState$options8, _orderState$options8$, _businessesList$busin6, _businessesList$busin7;
54
+ var _citiesState$cities, _ref, _theme$business_listi, _theme$business_listi2, _theme$business_listi3, _orderState$options, _theme$business_listi4, _theme$business_listi5, _theme$business_listi6, _theme$business_listi7, _theme$business_listi8, _theme$business_listi9, _theme$business_listi10, _theme$business_listi11, _theme$business_listi12, _theme$business_listi13, _theme$business_listi14, _theme$business_listi15, _theme$business_listi16, _theme$business_listi17, _theme$business_listi18, _theme$business_listi19, _theme$business_listi20, _theme$business_listi21, _businessesList$busin, _orderingTheme$theme, _orderingTheme$theme$, _orderingTheme$theme$2, _orderingTheme$theme$3, _orderingTheme$theme$4, _orderState$options2, _orderState$options3, _businessesList$busin3, _orderState$options7, _configs$business_lis, _configs$business_lis2, _configs$business_lis3, _theme$images2, _theme$images2$genera, _theme$business_listi22, _theme$business_listi23, _theme$business_listi24, _theme$business_listi25, _Object$values, _configs$business_lis4, _theme$images3, _theme$images3$genera, _theme$business_listi26, _theme$business_listi27, _theme$business_listi28, _theme$business_listi29, _citiesState$cities5, _citiesState$cities6, _citiesState$cities6$, _configs$advanced_bus, _orderState$options9, _orderState$options9$, _configs$advanced_bus2, _citiesState$cities7, _citiesState$cities8, _citiesState$cities8$, _orderState$options11, _orderState$options12, _businessesList$busin6, _businessesList$busin7;
55
55
  var businessesList = props.businessesList,
56
56
  paginationProps = props.paginationProps,
57
57
  searchValue = props.searchValue,
@@ -126,7 +126,10 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
126
126
  _useState16 = _slicedToArray(_useState15, 2),
127
127
  favoriteIds = _useState16[0],
128
128
  setFavoriteIds = _useState16[1];
129
- var hideCities = (_ref = (theme === null || theme === void 0 ? void 0 : (_theme$business_listi = theme.business_listing_view) === null || _theme$business_listi === void 0 ? void 0 : (_theme$business_listi2 = _theme$business_listi.components) === null || _theme$business_listi2 === void 0 ? void 0 : (_theme$business_listi3 = _theme$business_listi2.cities) === null || _theme$business_listi3 === void 0 ? void 0 : _theme$business_listi3.hidden) || (orderState === null || orderState === void 0 ? void 0 : (_orderState$options = orderState.options) === null || _orderState$options === void 0 ? void 0 : _orderState$options.type) !== 2) !== null && _ref !== void 0 ? _ref : true;
129
+ var allCitiesDisabled = citiesState === null || citiesState === void 0 ? void 0 : (_citiesState$cities = citiesState.cities) === null || _citiesState$cities === void 0 ? void 0 : _citiesState$cities.every(function (city) {
130
+ return !city.enabled;
131
+ });
132
+ var hideCities = (_ref = (theme === null || theme === void 0 ? void 0 : (_theme$business_listi = theme.business_listing_view) === null || _theme$business_listi === void 0 ? void 0 : (_theme$business_listi2 = _theme$business_listi.components) === null || _theme$business_listi2 === void 0 ? void 0 : (_theme$business_listi3 = _theme$business_listi2.cities) === null || _theme$business_listi3 === void 0 ? void 0 : _theme$business_listi3.hidden) || (orderState === null || orderState === void 0 ? void 0 : (_orderState$options = orderState.options) === null || _orderState$options === void 0 ? void 0 : _orderState$options.type) !== 2 || allCitiesDisabled) !== null && _ref !== void 0 ? _ref : true;
130
133
  var hideSearch = theme === null || theme === void 0 ? void 0 : (_theme$business_listi4 = theme.business_listing_view) === null || _theme$business_listi4 === void 0 ? void 0 : (_theme$business_listi5 = _theme$business_listi4.components) === null || _theme$business_listi5 === void 0 ? void 0 : (_theme$business_listi6 = _theme$business_listi5.search) === null || _theme$business_listi6 === void 0 ? void 0 : _theme$business_listi6.hidden;
131
134
  var hideFilter = (theme === null || theme === void 0 ? void 0 : (_theme$business_listi7 = theme.business_listing_view) === null || _theme$business_listi7 === void 0 ? void 0 : (_theme$business_listi8 = _theme$business_listi7.components) === null || _theme$business_listi8 === void 0 ? void 0 : (_theme$business_listi9 = _theme$business_listi8.filter) === null || _theme$business_listi9 === void 0 ? void 0 : _theme$business_listi9.hidden) || hideSearch;
132
135
  var hideHero = theme === null || theme === void 0 ? void 0 : (_theme$business_listi10 = theme.business_listing_view) === null || _theme$business_listi10 === void 0 ? void 0 : (_theme$business_listi11 = _theme$business_listi10.components) === null || _theme$business_listi11 === void 0 ? void 0 : (_theme$business_listi12 = _theme$business_listi11.business_hero) === null || _theme$business_listi12 === void 0 ? void 0 : _theme$business_listi12.hidden;
@@ -196,8 +199,8 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
196
199
  setPreorderBusiness(null);
197
200
  };
198
201
  var handleOpenCities = function handleOpenCities() {
199
- var _citiesState$cities;
200
- if (!(citiesState !== null && citiesState !== void 0 && (_citiesState$cities = citiesState.cities) !== null && _citiesState$cities !== void 0 && _citiesState$cities.length)) {
202
+ var _citiesState$cities2;
203
+ if (!(citiesState !== null && citiesState !== void 0 && (_citiesState$cities2 = citiesState.cities) !== null && _citiesState$cities2 !== void 0 && _citiesState$cities2.length)) {
201
204
  getCities();
202
205
  }
203
206
  setModals(_objectSpread(_objectSpread({}, modals), {}, {
@@ -222,6 +225,15 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
222
225
  });
223
226
  setFavoriteIds(_toConsumableArray(new Set(ids)));
224
227
  }, [businessesList === null || businessesList === void 0 ? void 0 : (_businessesList$busin3 = businessesList.businesses) === null || _businessesList$busin3 === void 0 ? void 0 : _businessesList$busin3.length]);
228
+ (0, _react.useEffect)(function () {
229
+ var _citiesState$cities3, _orderState$options5, _citiesState$cities4;
230
+ if (!(citiesState !== null && citiesState !== void 0 && (_citiesState$cities3 = citiesState.cities) !== null && _citiesState$cities3 !== void 0 && _citiesState$cities3.length) || !(orderState !== null && orderState !== void 0 && (_orderState$options5 = orderState.options) !== null && _orderState$options5 !== void 0 && _orderState$options5.city_id)) return;
231
+ var selectedCity = citiesState === null || citiesState === void 0 ? void 0 : (_citiesState$cities4 = citiesState.cities) === null || _citiesState$cities4 === void 0 ? void 0 : _citiesState$cities4.find(function (city) {
232
+ var _orderState$options6;
233
+ return (city === null || city === void 0 ? void 0 : city.id) === (orderState === null || orderState === void 0 ? void 0 : (_orderState$options6 = orderState.options) === null || _orderState$options6 === void 0 ? void 0 : _orderState$options6.city_id);
234
+ });
235
+ if (!selectedCity || !(selectedCity !== null && selectedCity !== void 0 && selectedCity.enabled)) changeCityFilter(null);
236
+ }, [citiesState, orderState === null || orderState === void 0 ? void 0 : (_orderState$options7 = orderState.options) === null || _orderState$options7 === void 0 ? void 0 : _orderState$options7.city_id]);
225
237
  if (logosLayout) {
226
238
  var _businessesList$busin4, _businessesList$busin5;
227
239
  return /*#__PURE__*/_react.default.createElement(_styles.BusinessLogosWrapper, null, /*#__PURE__*/_react.default.createElement(_styles.BusinessLogosContainer, null, /*#__PURE__*/_react.default.createElement(_AutoScroll.AutoScroll, {
@@ -246,8 +258,8 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
246
258
  }
247
259
  return /*#__PURE__*/_react.default.createElement(_styles.BusinessContainer, null, (windowSize.width < 576 || (configs === null || configs === void 0 ? void 0 : (_configs$business_lis = configs.business_listing_hide_image) === null || _configs$business_lis === void 0 ? void 0 : _configs$business_lis.value) !== '1' && !isChew) && /*#__PURE__*/_react.default.createElement(_styles.BusinessBanner, null, windowSize.width < 576 && /*#__PURE__*/_react.default.createElement(_OrderContextUI.OrderContextUI, {
248
260
  isBusinessList: true,
249
- hideHero: !hideHero
250
- }), (configs === null || configs === void 0 ? void 0 : (_configs$business_lis2 = configs.business_listing_hide_image) === null || _configs$business_lis2 === void 0 ? void 0 : _configs$business_lis2.value) !== '1' && !isChew && !hideHero && /*#__PURE__*/_react.default.createElement(_styles.BusinessHeroImg, {
261
+ hideHero: !!(configs !== null && configs !== void 0 && (_configs$business_lis2 = configs.business_listing_hide_image) !== null && _configs$business_lis2 !== void 0 && _configs$business_lis2.value) && !hideHero
262
+ }), (configs === null || configs === void 0 ? void 0 : (_configs$business_lis3 = configs.business_listing_hide_image) === null || _configs$business_lis3 === void 0 ? void 0 : _configs$business_lis3.value) !== '1' && !isChew && !hideHero && /*#__PURE__*/_react.default.createElement(_styles.BusinessHeroImg, {
251
263
  bgimage: (_theme$images2 = theme.images) === null || _theme$images2 === void 0 ? void 0 : (_theme$images2$genera = _theme$images2.general) === null || _theme$images2$genera === void 0 ? void 0 : _theme$images2$genera.businessHero,
252
264
  height: theme === null || theme === void 0 ? void 0 : (_theme$business_listi22 = theme.business_listing_view) === null || _theme$business_listi22 === void 0 ? void 0 : (_theme$business_listi23 = _theme$business_listi22.components) === null || _theme$business_listi23 === void 0 ? void 0 : (_theme$business_listi24 = _theme$business_listi23.business_hero) === null || _theme$business_listi24 === void 0 ? void 0 : (_theme$business_listi25 = _theme$business_listi24.style) === null || _theme$business_listi25 === void 0 ? void 0 : _theme$business_listi25.height
253
265
  })), !!((_Object$values = Object.values(orderState === null || orderState === void 0 ? void 0 : orderState.carts)) !== null && _Object$values !== void 0 && _Object$values.length) && /*#__PURE__*/_react.default.createElement(_OrderProgress.OrderProgress, {
@@ -256,7 +268,7 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
256
268
  userCustomerId: userCustomer === null || userCustomer === void 0 ? void 0 : userCustomer.id,
257
269
  asDashboard: isCustomerMode,
258
270
  isCustomerMode: isCustomerMode
259
- }), (configs === null || configs === void 0 ? void 0 : (_configs$business_lis3 = configs.business_listing_hide_image) === null || _configs$business_lis3 === void 0 ? void 0 : _configs$business_lis3.value) !== '1' && isChew && /*#__PURE__*/_react.default.createElement(_styles.BusinessHeroImg, {
271
+ }), (configs === null || configs === void 0 ? void 0 : (_configs$business_lis4 = configs.business_listing_hide_image) === null || _configs$business_lis4 === void 0 ? void 0 : _configs$business_lis4.value) !== '1' && isChew && /*#__PURE__*/_react.default.createElement(_styles.BusinessHeroImg, {
260
272
  bgimage: (_theme$images3 = theme.images) === null || _theme$images3 === void 0 ? void 0 : (_theme$images3$genera = _theme$images3.general) === null || _theme$images3$genera === void 0 ? void 0 : _theme$images3$genera.businessHero,
261
273
  height: theme === null || theme === void 0 ? void 0 : (_theme$business_listi26 = theme.business_listing_view) === null || _theme$business_listi26 === void 0 ? void 0 : (_theme$business_listi27 = _theme$business_listi26.components) === null || _theme$business_listi27 === void 0 ? void 0 : (_theme$business_listi28 = _theme$business_listi27.business_hero) === null || _theme$business_listi28 === void 0 ? void 0 : (_theme$business_listi29 = _theme$business_listi28.style) === null || _theme$business_listi29 === void 0 ? void 0 : _theme$business_listi29.height
262
274
  }), isCustomerMode && !hidePreviousOrders && !businessesList.loading && /*#__PURE__*/_react.default.createElement(_OrdersSection.OrdersSection, {
@@ -281,13 +293,13 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
281
293
  page: 'business_search'
282
294
  });
283
295
  }
284
- }), !hideCities && (citiesState === null || citiesState === void 0 ? void 0 : (_citiesState$cities2 = citiesState.cities) === null || _citiesState$cities2 === void 0 ? void 0 : _citiesState$cities2.length) > 0 && /*#__PURE__*/_react.default.createElement(_Buttons.Button, {
296
+ }), !hideCities && (citiesState === null || citiesState === void 0 ? void 0 : (_citiesState$cities5 = citiesState.cities) === null || _citiesState$cities5 === void 0 ? void 0 : _citiesState$cities5.length) > 0 && /*#__PURE__*/_react.default.createElement(_Buttons.Button, {
285
297
  color: "primary",
286
298
  onClick: handleOpenCities
287
- }, (citiesState === null || citiesState === void 0 ? void 0 : (_citiesState$cities3 = citiesState.cities) === null || _citiesState$cities3 === void 0 ? void 0 : (_citiesState$cities3$ = _citiesState$cities3.find(function (city) {
288
- var _orderState$options5;
289
- return (city === null || city === void 0 ? void 0 : city.id) === (orderState === null || orderState === void 0 ? void 0 : (_orderState$options5 = orderState.options) === null || _orderState$options5 === void 0 ? void 0 : _orderState$options5.city_id);
290
- })) === null || _citiesState$cities3$ === void 0 ? void 0 : _citiesState$cities3$.name) || t('SELECT_A_CITY', 'Select a city')), !hideFilter && (configs === null || configs === void 0 ? void 0 : (_configs$advanced_bus = configs.advanced_business_search_enabled) === null || _configs$advanced_bus === void 0 ? void 0 : _configs$advanced_bus.value) === '1' && /*#__PURE__*/_react.default.createElement(_FiFilter.default, {
299
+ }, (citiesState === null || citiesState === void 0 ? void 0 : (_citiesState$cities6 = citiesState.cities) === null || _citiesState$cities6 === void 0 ? void 0 : (_citiesState$cities6$ = _citiesState$cities6.find(function (city) {
300
+ var _orderState$options8;
301
+ return (city === null || city === void 0 ? void 0 : city.id) === (orderState === null || orderState === void 0 ? void 0 : (_orderState$options8 = orderState.options) === null || _orderState$options8 === void 0 ? void 0 : _orderState$options8.city_id);
302
+ })) === null || _citiesState$cities6$ === void 0 ? void 0 : _citiesState$cities6$.name) || t('SELECT_A_CITY', 'Select a city')), !hideFilter && (configs === null || configs === void 0 ? void 0 : (_configs$advanced_bus = configs.advanced_business_search_enabled) === null || _configs$advanced_bus === void 0 ? void 0 : _configs$advanced_bus.value) === '1' && /*#__PURE__*/_react.default.createElement(_FiFilter.default, {
291
303
  onClick: function onClick() {
292
304
  return onRedirectPage({
293
305
  page: 'business_search'
@@ -297,7 +309,7 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
297
309
  onClick: toggleMap
298
310
  })), activeMap && /*#__PURE__*/_react.default.createElement(_BusinessesMap.BusinessesMap, {
299
311
  businessList: businessesList.businesses,
300
- userLocation: orderState === null || orderState === void 0 ? void 0 : (_orderState$options6 = orderState.options) === null || _orderState$options6 === void 0 ? void 0 : (_orderState$options6$ = _orderState$options6.address) === null || _orderState$options6$ === void 0 ? void 0 : _orderState$options6$.location,
312
+ userLocation: orderState === null || orderState === void 0 ? void 0 : (_orderState$options9 = orderState.options) === null || _orderState$options9 === void 0 ? void 0 : (_orderState$options9$ = _orderState$options9.address) === null || _orderState$options9$ === void 0 ? void 0 : _orderState$options9$.location,
301
313
  setErrors: setMapErrors
302
314
  })), !isChew && hasHighRatedBusiness && !props.franchiseId && !hideHighestBusiness && /*#__PURE__*/_react.default.createElement(_styles.HightestRatedWrapper, null, /*#__PURE__*/_react.default.createElement(_styles.Divider, null), /*#__PURE__*/_react.default.createElement(_HighestRated.HighestRated, {
303
315
  handleClickAddress: handleClickAddress,
@@ -333,15 +345,15 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
333
345
  }
334
346
  }), isCustomLayout && /*#__PURE__*/_react.default.createElement(_FiMap.default, {
335
347
  onClick: toggleMap
336
- }), !hideCities && (citiesState === null || citiesState === void 0 ? void 0 : (_citiesState$cities4 = citiesState.cities) === null || _citiesState$cities4 === void 0 ? void 0 : _citiesState$cities4.length) > 0 && /*#__PURE__*/_react.default.createElement(_Buttons.Button, {
348
+ }), !hideCities && (citiesState === null || citiesState === void 0 ? void 0 : (_citiesState$cities7 = citiesState.cities) === null || _citiesState$cities7 === void 0 ? void 0 : _citiesState$cities7.length) > 0 && /*#__PURE__*/_react.default.createElement(_Buttons.Button, {
337
349
  color: "primary",
338
350
  onClick: handleOpenCities
339
- }, (citiesState === null || citiesState === void 0 ? void 0 : (_citiesState$cities5 = citiesState.cities) === null || _citiesState$cities5 === void 0 ? void 0 : (_citiesState$cities5$ = _citiesState$cities5.find(function (city) {
340
- var _orderState$options7;
341
- return (city === null || city === void 0 ? void 0 : city.id) === (orderState === null || orderState === void 0 ? void 0 : (_orderState$options7 = orderState.options) === null || _orderState$options7 === void 0 ? void 0 : _orderState$options7.city_id);
342
- })) === null || _citiesState$cities5$ === void 0 ? void 0 : _citiesState$cities5$.name) || t('SELECT_A_CITY', 'Select a city')))), isCustomerMode && activeMap && /*#__PURE__*/_react.default.createElement(_BusinessesMap.BusinessesMap, {
351
+ }, (citiesState === null || citiesState === void 0 ? void 0 : (_citiesState$cities8 = citiesState.cities) === null || _citiesState$cities8 === void 0 ? void 0 : (_citiesState$cities8$ = _citiesState$cities8.find(function (city) {
352
+ var _orderState$options10;
353
+ return (city === null || city === void 0 ? void 0 : city.id) === (orderState === null || orderState === void 0 ? void 0 : (_orderState$options10 = orderState.options) === null || _orderState$options10 === void 0 ? void 0 : _orderState$options10.city_id);
354
+ })) === null || _citiesState$cities8$ === void 0 ? void 0 : _citiesState$cities8$.name) || t('SELECT_A_CITY', 'Select a city')))), isCustomerMode && activeMap && /*#__PURE__*/_react.default.createElement(_BusinessesMap.BusinessesMap, {
343
355
  businessList: businessesList.businesses,
344
- userLocation: orderState === null || orderState === void 0 ? void 0 : (_orderState$options8 = orderState.options) === null || _orderState$options8 === void 0 ? void 0 : (_orderState$options8$ = _orderState$options8.address) === null || _orderState$options8$ === void 0 ? void 0 : _orderState$options8$.location,
356
+ userLocation: orderState === null || orderState === void 0 ? void 0 : (_orderState$options11 = orderState.options) === null || _orderState$options11 === void 0 ? void 0 : (_orderState$options12 = _orderState$options11.address) === null || _orderState$options12 === void 0 ? void 0 : _orderState$options12.location,
345
357
  setErrors: setMapErrors
346
358
  }), /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, (!isCustomLayout && isCustomerMode && (businessesList === null || businessesList === void 0 ? void 0 : (_businessesList$busin6 = businessesList.businesses) === null || _businessesList$busin6 === void 0 ? void 0 : _businessesList$busin6.length) > 0 || isChew) && /*#__PURE__*/_react.default.createElement(_styles.BusinessesTitle, null, t('BUSINESSES', 'Businesses')), /*#__PURE__*/_react.default.createElement(_styles.BusinessList, null, !businessesList.loading && businessesList.businesses.length === 0 && (businessesList === null || businessesList === void 0 ? void 0 : businessesList.fetched) && /*#__PURE__*/_react.default.createElement(_NotFoundSource.NotFoundSource, {
347
359
  content: t('NOT_FOUND_BUSINESSES', 'No businesses to delivery / pick up at this address, please change filters or change address.')
@@ -355,14 +367,14 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
355
367
  height: '44px'
356
368
  }
357
369
  }, t('CHANGE_ADDRESS', 'Select other Address'))), (_businessesList$busin7 = businessesList.businesses) === null || _businessesList$busin7 === void 0 ? void 0 : _businessesList$busin7.map(function (business) {
358
- var _orderState$options9, _business$reviews;
370
+ var _orderState$options13, _business$reviews;
359
371
  return /*#__PURE__*/_react.default.createElement(_BusinessController.BusinessController, {
360
372
  key: business.id,
361
373
  className: "card",
362
374
  business: business,
363
375
  isBusinessOpen: business.open,
364
376
  handleCustomClick: handleBusinessClick,
365
- orderType: orderState === null || orderState === void 0 ? void 0 : (_orderState$options9 = orderState.options) === null || _orderState$options9 === void 0 ? void 0 : _orderState$options9.type,
377
+ orderType: orderState === null || orderState === void 0 ? void 0 : (_orderState$options13 = orderState.options) === null || _orderState$options13 === void 0 ? void 0 : _orderState$options13.type,
366
378
  isCustomLayout: isCustomLayout,
367
379
  isCustomerMode: isCustomerMode,
368
380
  onPreorderBusiness: setPreorderBusiness,
@@ -380,13 +392,13 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
380
392
  setFavoriteIds: setFavoriteIds
381
393
  });
382
394
  }), (businessesList.loading || !(businessesList !== null && businessesList !== void 0 && businessesList.fetched)) && _toConsumableArray(Array((paginationProps === null || paginationProps === void 0 ? void 0 : paginationProps.nextPageItems) > 4 ? paginationProps.nextPageItems : 8).keys()).map(function (i) {
383
- var _orderState$options10;
395
+ var _orderState$options14;
384
396
  return /*#__PURE__*/_react.default.createElement(_BusinessController.BusinessController, {
385
397
  key: i,
386
398
  className: "card",
387
399
  business: {},
388
400
  isSkeleton: true,
389
- orderType: orderState === null || orderState === void 0 ? void 0 : (_orderState$options10 = orderState.options) === null || _orderState$options10 === void 0 ? void 0 : _orderState$options10.type
401
+ orderType: orderState === null || orderState === void 0 ? void 0 : (_orderState$options14 = orderState.options) === null || _orderState$options14 === void 0 ? void 0 : _orderState$options14.type
390
402
  });
391
403
  }))), /*#__PURE__*/_react.default.createElement(_Modal.Modal, {
392
404
  open: isPreorder,
@@ -44,7 +44,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
44
44
  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; } }
45
45
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
46
46
  var CartUI = function CartUI(props) {
47
- var _configs$driver_tip_o, _configs$driver_tip_o2, _configs$driver_tip_o3, _validationFields$fie, _validationFields$fie2, _validationFields$fie3, _configs$checkout_mul, _orderState$carts, _props$cart, _theme$viewString, _theme$viewString$com, _theme$viewString$com2, _theme$viewString$com3, _theme$viewString$com4, _validationFields$fie4, _validationFields$fie5, _validationFields$fie6, _theme$viewString2, _theme$viewString2$co, _theme$viewString2$co2, _theme$viewString2$co3, _theme$viewString2$co4, _orderState$options, _orderState$options2, _configs$format_numbe, _configs$format_numbe2, _orderState$option, _orderState$option2, _props$beforeElements, _props$beforeComponen, _cart$products, _cart$offers, _cart$offers2, _cart$offers3, _cart$offers3$filter, _cart$offers4, _cart$offers4$filter, _cart$business, _ref, _cart$subtotal_with_d, _cart$taxes2, _cart$taxes3, _cart$fees, _cart$fees2, _cart$offers5, _cart$offers6, _cart$offers6$filter, _orderState$options3, _cart$offers7, _cart$offers8, _cart$offers8$filter, _configs$driver_tip_t, _configs$driver_tip_u, _orderState$options4, _validationFields$fie7, _validationFields$fie8, _validationFields$fie9, _configs$driver_tip_t2, _configs$driver_tip_u2, _configs$driver_tip_t3, _cart$payment_events, _cart$payment_events2, _orderState$options5, _cart$business2, _cart$business3, _curProduct$calendar_, _openTaxModal$data, _openTaxModal$data2, _openTaxModal$data3, _openTaxModal$data4, _openTaxModal$data$fi, _openTaxModal$data5, _openTaxModal$data6, _props$afterComponent, _props$afterElements;
47
+ var _configs$driver_tip_o, _configs$driver_tip_o2, _configs$driver_tip_o3, _validationFields$fie, _validationFields$fie2, _validationFields$fie3, _configs$checkout_mul, _orderState$carts, _props$cart, _theme$viewString, _theme$viewString$com, _theme$viewString$com2, _theme$viewString$com3, _theme$viewString$com4, _validationFields$fie4, _validationFields$fie5, _validationFields$fie6, _theme$viewString2, _theme$viewString2$co, _theme$viewString2$co2, _theme$viewString2$co3, _theme$viewString2$co4, _orderState$options, _orderState$options2, _orderState$option, _orderState$option2, _props$beforeElements, _props$beforeComponen, _cart$products, _cart$offers, _cart$offers2, _cart$offers3, _cart$offers3$filter, _cart$offers4, _cart$offers4$filter, _cart$business, _ref, _cart$subtotal_with_d, _cart$taxes2, _cart$taxes3, _cart$fees, _cart$fees2, _cart$offers5, _cart$offers6, _cart$offers6$filter, _orderState$options3, _cart$offers7, _cart$offers8, _cart$offers8$filter, _configs$driver_tip_t, _configs$driver_tip_u, _orderState$options4, _validationFields$fie7, _validationFields$fie8, _validationFields$fie9, _configs$driver_tip_t2, _configs$driver_tip_u2, _configs$driver_tip_t3, _cart$payment_events, _cart$payment_events2, _orderState$options5, _cart$business2, _cart$business3, _curProduct$calendar_, _openTaxModal$data, _openTaxModal$data2, _openTaxModal$data3, _openTaxModal$data4, _openTaxModal$data$fi, _openTaxModal$data5, _openTaxModal$data6, _props$afterComponent, _props$afterElements;
48
48
  var currentCartUuid = props.currentCartUuid,
49
49
  clearCart = props.clearCart,
50
50
  isProducts = props.isProducts,
@@ -169,7 +169,11 @@ var CartUI = function CartUI(props) {
169
169
  }, 0);
170
170
  }
171
171
  };
172
- var loyaltyRewardValue = ((Math.trunc(((cart === null || cart === void 0 ? void 0 : cart.subtotal) + getIncludedTaxes()) * loyaltyRewardRate * 100) / 100).toFixed((_configs$format_numbe = (_configs$format_numbe2 = configs.format_number_decimal_length) === null || _configs$format_numbe2 === void 0 ? void 0 : _configs$format_numbe2.value) !== null && _configs$format_numbe !== void 0 ? _configs$format_numbe : 2), 10);
172
+ var clearAmount = function clearAmount(value) {
173
+ var _configs$format_numbe, _configs$format_numbe2;
174
+ return parseFloat((Math.trunc(value * 100) / 100).toFixed((_configs$format_numbe = (_configs$format_numbe2 = configs.format_number_decimal_length) === null || _configs$format_numbe2 === void 0 ? void 0 : _configs$format_numbe2.value) !== null && _configs$format_numbe !== void 0 ? _configs$format_numbe : 2));
175
+ };
176
+ var loyaltyRewardValue = clearAmount(((cart === null || cart === void 0 ? void 0 : cart.subtotal) + getIncludedTaxes()) * loyaltyRewardRate);
173
177
  var momentFormatted = !(orderState !== null && orderState !== void 0 && (_orderState$option = orderState.option) !== null && _orderState$option !== void 0 && _orderState$option.moment) ? t('RIGHT_NOW', 'Right Now') : parseDate(orderState === null || orderState === void 0 ? void 0 : (_orderState$option2 = orderState.option) === null || _orderState$option2 === void 0 ? void 0 : _orderState$option2.moment, {
174
178
  outputFormat: 'YYYY-MM-DD HH:mm'
175
179
  });
@@ -488,7 +492,7 @@ var CartUI = function CartUI(props) {
488
492
  useOrderContext: true
489
493
  }))), /*#__PURE__*/_react.default.createElement("table", {
490
494
  className: "total"
491
- }, /*#__PURE__*/_react.default.createElement("tbody", null, /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", null, t('TOTAL', 'Total')), /*#__PURE__*/_react.default.createElement("td", null, parsePrice((cart === null || cart === void 0 ? void 0 : cart.total) >= 0 ? cart === null || cart === void 0 ? void 0 : cart.total : 0))), !!loyaltyRewardValue && isFinite(loyaltyRewardValue) && !isMultiCheckout && /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", null, "\xA0"), /*#__PURE__*/_react.default.createElement("td", {
495
+ }, /*#__PURE__*/_react.default.createElement("tbody", null, /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", null, t('TOTAL', 'Total')), /*#__PURE__*/_react.default.createElement("td", null, parsePrice((cart === null || cart === void 0 ? void 0 : cart.total) >= 0 ? cart === null || cart === void 0 ? void 0 : cart.total : 0))), !!loyaltyRewardValue && isFinite(loyaltyRewardValue) && isCheckout && /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", null, "\xA0"), /*#__PURE__*/_react.default.createElement("td", {
492
496
  id: "loyalty"
493
497
  }, t('REWARD_LOYALTY_POINT', 'Reward :amount: on loyalty points').replace(':amount:', loyaltyRewardValue))))), (cart === null || cart === void 0 ? void 0 : cart.status) !== 2 && !hideCartComments && /*#__PURE__*/_react.default.createElement("table", {
494
498
  className: "comments"
@@ -62,7 +62,7 @@ var mapConfigs = {
62
62
  }
63
63
  };
64
64
  var CheckoutUI = function CheckoutUI(props) {
65
- var _businessDetails$busi, _businessDetails$busi2, _configs$table_numer_, _businessConfigs$find, _businessConfigs$find2, _configs$cash_wallet, _configs$wallet_enabl, _orderingTheme$theme, _orderingTheme$theme$, _orderingTheme$theme$2, _orderingTheme$theme$3, _orderingTheme$theme$4, _cardList$cards, _cartState$cart, _validationFields$fie, _validationFields$fie2, _validationFields$fie3, _validationFields$fie4, _validationFields$fie5, _validationFields$fie6, _configs$driver_tip_o, _configs$driver_tip_o2, _configs$driver_tip_o3, _instructionsOptions$, _instructionsOptions$2, _theme$checkout, _theme$checkout$compo, _theme$checkout$compo2, _theme$checkout$compo3, _theme$checkout$compo4, _theme$checkout2, _theme$checkout2$comp, _theme$checkout2$comp2, _theme$checkout3, _theme$checkout3$comp, _theme$checkout3$comp2, _theme$checkout3$comp3, _theme$checkout3$comp4, _theme$checkout4, _theme$checkout4$comp, _theme$checkout4$comp2, _validationFields$fie7, _validationFields$fie8, _validationFields$fie9, _loyaltyPlansState$re, _creditPointPlan$busi, _options$address, _businessDetails$busi3, _theme$images, _theme$images$dummies, _configs$google_maps_, _customerState$user, _customerState$user2, _Object$values, _businessDetails$busi4, _businessDetails$busi5, _businessDetails$busi6, _businessDetails$busi7, _businessDetails$erro, _businessDetails$erro2, _businessDetails$busi8, _businessDetails$busi9, _businessDetails$busi10, _configs$driver_tip_t, _configs$driver_tip_u, _configs$driver_tip_t2, _cartState$cart$spot_, _cartState$cart2, _cart$business3, _cart$products2, _ref, _creditPointPlanOnBus, _configs$driver_tip_t3, _configs$driver_tip_u2, _configs$driver_tip_t4, _validationFields$fie18, _validationFields$fie19, _validationFields$fie20, _validationFields$fie21, _validationFields$fie22, _validationFields$fie23, _customerState$user3;
65
+ var _businessDetails$busi, _businessDetails$busi2, _configs$table_numer_, _businessConfigs$find, _businessConfigs$find2, _configs$cash_wallet, _configs$wallet_enabl, _orderingTheme$theme, _orderingTheme$theme$, _orderingTheme$theme$2, _orderingTheme$theme$3, _orderingTheme$theme$4, _validationFields$fie, _validationFields$fie2, _validationFields$fie3, _validationFields$fie4, _validationFields$fie5, _validationFields$fie6, _cart$comment, _cardList$cards, _cartState$cart, _validationFields$fie7, _validationFields$fie8, _validationFields$fie9, _validationFields$fie10, _validationFields$fie11, _validationFields$fie12, _configs$driver_tip_o, _configs$driver_tip_o2, _configs$driver_tip_o3, _instructionsOptions$, _instructionsOptions$2, _theme$checkout, _theme$checkout$compo, _theme$checkout$compo2, _theme$checkout$compo3, _theme$checkout$compo4, _theme$checkout2, _theme$checkout2$comp, _theme$checkout2$comp2, _theme$checkout3, _theme$checkout3$comp, _theme$checkout3$comp2, _theme$checkout4, _theme$checkout4$comp, _theme$checkout4$comp2, _validationFields$fie13, _validationFields$fie14, _validationFields$fie15, _loyaltyPlansState$re, _creditPointPlan$busi, _options$address, _businessDetails$busi3, _theme$images, _theme$images$dummies, _configs$google_maps_, _customerState$user, _customerState$user2, _Object$values, _businessDetails$busi4, _businessDetails$busi5, _businessDetails$busi6, _businessDetails$busi7, _businessDetails$erro, _businessDetails$erro2, _businessDetails$busi8, _businessDetails$busi9, _businessDetails$busi10, _configs$driver_tip_t, _configs$driver_tip_u, _configs$driver_tip_t2, _cartState$cart$spot_, _cartState$cart2, _cart$business3, _cart$products2, _ref, _creditPointPlanOnBus, _configs$driver_tip_t3, _configs$driver_tip_u2, _configs$driver_tip_t4, _validationFields$fie24, _validationFields$fie25, _validationFields$fie26, _validationFields$fie27, _validationFields$fie28, _validationFields$fie29, _customerState$user3;
66
66
  var cart = props.cart,
67
67
  errors = props.errors,
68
68
  placing = props.placing,
@@ -182,9 +182,10 @@ var CheckoutUI = function CheckoutUI(props) {
182
182
  var isGiftCardCart = !(cart !== null && cart !== void 0 && cart.business_id);
183
183
  // const [hasBusinessPlaces, setHasBusinessPlaces] = useState(null)
184
184
 
185
+ var validateCommentsCartField = (validationFields === null || validationFields === void 0 ? void 0 : (_validationFields$fie = validationFields.fields) === null || _validationFields$fie === void 0 ? void 0 : (_validationFields$fie2 = _validationFields$fie.checkout) === null || _validationFields$fie2 === void 0 ? void 0 : (_validationFields$fie3 = _validationFields$fie2.comments) === null || _validationFields$fie3 === void 0 ? void 0 : _validationFields$fie3.enabled) && (validationFields === null || validationFields === void 0 ? void 0 : (_validationFields$fie4 = validationFields.fields) === null || _validationFields$fie4 === void 0 ? void 0 : (_validationFields$fie5 = _validationFields$fie4.checkout) === null || _validationFields$fie5 === void 0 ? void 0 : (_validationFields$fie6 = _validationFields$fie5.comments) === null || _validationFields$fie6 === void 0 ? void 0 : _validationFields$fie6.required) && ((cart === null || cart === void 0 ? void 0 : cart.comment) === null || (cart === null || cart === void 0 ? void 0 : (_cart$comment = cart.comment) === null || _cart$comment === void 0 ? void 0 : _cart$comment.trim().length) === 0);
185
186
  var isDisablePlaceOrderButton = !(cart !== null && cart !== void 0 && cart.valid) || !paymethodSelected && (cart === null || cart === void 0 ? void 0 : cart.balance) > 0 || (paymethodSelected === null || paymethodSelected === void 0 ? void 0 : paymethodSelected.gateway) === 'stripe' && (cardList === null || cardList === void 0 ? void 0 : (_cardList$cards = cardList.cards) === null || _cardList$cards === void 0 ? void 0 : _cardList$cards.length) === 0 || placing || errorCash || loading || isTableNumberEnabled === '1' && (options === null || options === void 0 ? void 0 : options.type) === 3 && !(cartState !== null && cartState !== void 0 && (_cartState$cart = cartState.cart) !== null && _cartState$cart !== void 0 && _cartState$cart.spot_number || cart !== null && cart !== void 0 && cart.spot_number || placeSpotNumber) || !(cart !== null && cart !== void 0 && cart.valid_maximum) || !(cart !== null && cart !== void 0 && cart.valid_minimum) && !((cart === null || cart === void 0 ? void 0 : cart.discount_type) === 1 && (cart === null || cart === void 0 ? void 0 : cart.discount_rate) === 100) ||
186
187
  // (((placeSpotTypes.includes(options?.type) && !cart?.place) && hasBusinessPlaces)) ||
187
- options.type === 1 && (validationFields === null || validationFields === void 0 ? void 0 : (_validationFields$fie = validationFields.fields) === null || _validationFields$fie === void 0 ? void 0 : (_validationFields$fie2 = _validationFields$fie.checkout) === null || _validationFields$fie2 === void 0 ? void 0 : (_validationFields$fie3 = _validationFields$fie2.driver_tip) === null || _validationFields$fie3 === void 0 ? void 0 : _validationFields$fie3.enabled) && (validationFields === null || validationFields === void 0 ? void 0 : (_validationFields$fie4 = validationFields.fields) === null || _validationFields$fie4 === void 0 ? void 0 : (_validationFields$fie5 = _validationFields$fie4.checkout) === null || _validationFields$fie5 === void 0 ? void 0 : (_validationFields$fie6 = _validationFields$fie5.driver_tip) === null || _validationFields$fie6 === void 0 ? void 0 : _validationFields$fie6.required) && Number(cart === null || cart === void 0 ? void 0 : cart.driver_tip) <= 0;
188
+ options.type === 1 && (validationFields === null || validationFields === void 0 ? void 0 : (_validationFields$fie7 = validationFields.fields) === null || _validationFields$fie7 === void 0 ? void 0 : (_validationFields$fie8 = _validationFields$fie7.checkout) === null || _validationFields$fie8 === void 0 ? void 0 : (_validationFields$fie9 = _validationFields$fie8.driver_tip) === null || _validationFields$fie9 === void 0 ? void 0 : _validationFields$fie9.enabled) && (validationFields === null || validationFields === void 0 ? void 0 : (_validationFields$fie10 = validationFields.fields) === null || _validationFields$fie10 === void 0 ? void 0 : (_validationFields$fie11 = _validationFields$fie10.checkout) === null || _validationFields$fie11 === void 0 ? void 0 : (_validationFields$fie12 = _validationFields$fie11.driver_tip) === null || _validationFields$fie12 === void 0 ? void 0 : _validationFields$fie12.required) && Number(cart === null || cart === void 0 ? void 0 : cart.driver_tip) <= 0 || validateCommentsCartField;
188
189
  var driverTipsOptions = typeof (configs === null || configs === void 0 ? void 0 : (_configs$driver_tip_o = configs.driver_tip_options) === null || _configs$driver_tip_o === void 0 ? void 0 : _configs$driver_tip_o.value) === 'string' ? JSON.parse(configs === null || configs === void 0 ? void 0 : (_configs$driver_tip_o2 = configs.driver_tip_options) === null || _configs$driver_tip_o2 === void 0 ? void 0 : _configs$driver_tip_o2.value) || [] : (configs === null || configs === void 0 ? void 0 : (_configs$driver_tip_o3 = configs.driver_tip_options) === null || _configs$driver_tip_o3 === void 0 ? void 0 : _configs$driver_tip_o3.value) || [];
189
190
  var deliveryOptions = (instructionsOptions === null || instructionsOptions === void 0 ? void 0 : instructionsOptions.result) && (instructionsOptions === null || instructionsOptions === void 0 ? void 0 : (_instructionsOptions$ = instructionsOptions.result) === null || _instructionsOptions$ === void 0 ? void 0 : (_instructionsOptions$2 = _instructionsOptions$.filter(function (option) {
190
191
  return option === null || option === void 0 ? void 0 : option.enabled;
@@ -197,9 +198,9 @@ var CheckoutUI = function CheckoutUI(props) {
197
198
  }));
198
199
  var hideBusinessAddress = theme === null || theme === void 0 ? void 0 : (_theme$checkout = theme.checkout) === null || _theme$checkout === void 0 ? void 0 : (_theme$checkout$compo = _theme$checkout.components) === null || _theme$checkout$compo === void 0 ? void 0 : (_theme$checkout$compo2 = _theme$checkout$compo.business) === null || _theme$checkout$compo2 === void 0 ? void 0 : (_theme$checkout$compo3 = _theme$checkout$compo2.components) === null || _theme$checkout$compo3 === void 0 ? void 0 : (_theme$checkout$compo4 = _theme$checkout$compo3.address) === null || _theme$checkout$compo4 === void 0 ? void 0 : _theme$checkout$compo4.hidden;
199
200
  var hideBusinessDetails = theme === null || theme === void 0 ? void 0 : (_theme$checkout2 = theme.checkout) === null || _theme$checkout2 === void 0 ? void 0 : (_theme$checkout2$comp = _theme$checkout2.components) === null || _theme$checkout2$comp === void 0 ? void 0 : (_theme$checkout2$comp2 = _theme$checkout2$comp.business) === null || _theme$checkout2$comp2 === void 0 ? void 0 : _theme$checkout2$comp2.hidden;
200
- var hideBusinessMap = theme === null || theme === void 0 ? void 0 : (_theme$checkout3 = theme.checkout) === null || _theme$checkout3 === void 0 ? void 0 : (_theme$checkout3$comp = _theme$checkout3.components) === null || _theme$checkout3$comp === void 0 ? void 0 : (_theme$checkout3$comp2 = _theme$checkout3$comp.business) === null || _theme$checkout3$comp2 === void 0 ? void 0 : (_theme$checkout3$comp3 = _theme$checkout3$comp2.components) === null || _theme$checkout3$comp3 === void 0 ? void 0 : (_theme$checkout3$comp4 = _theme$checkout3$comp3.map) === null || _theme$checkout3$comp4 === void 0 ? void 0 : _theme$checkout3$comp4.hidden;
201
+ var hideBusinessMap = theme === null || theme === void 0 ? void 0 : (_theme$checkout3 = theme.checkout) === null || _theme$checkout3 === void 0 ? void 0 : (_theme$checkout3$comp = _theme$checkout3.components) === null || _theme$checkout3$comp === void 0 ? void 0 : (_theme$checkout3$comp2 = _theme$checkout3$comp.map) === null || _theme$checkout3$comp2 === void 0 ? void 0 : _theme$checkout3$comp2.hidden;
201
202
  var hideCustomerDetails = theme === null || theme === void 0 ? void 0 : (_theme$checkout4 = theme.checkout) === null || _theme$checkout4 === void 0 ? void 0 : (_theme$checkout4$comp = _theme$checkout4.components) === null || _theme$checkout4$comp === void 0 ? void 0 : (_theme$checkout4$comp2 = _theme$checkout4$comp.customer) === null || _theme$checkout4$comp2 === void 0 ? void 0 : _theme$checkout4$comp2.hidden;
202
- var driverTipsField = !cartState.loading && cart && (cart === null || cart === void 0 ? void 0 : cart.business_id) && options.type === 1 && (cart === null || cart === void 0 ? void 0 : cart.status) !== 2 && (validationFields === null || validationFields === void 0 ? void 0 : (_validationFields$fie7 = validationFields.fields) === null || _validationFields$fie7 === void 0 ? void 0 : (_validationFields$fie8 = _validationFields$fie7.checkout) === null || _validationFields$fie8 === void 0 ? void 0 : (_validationFields$fie9 = _validationFields$fie8.driver_tip) === null || _validationFields$fie9 === void 0 ? void 0 : _validationFields$fie9.enabled) && driverTipsOptions.length > 0 && !useKioskApp;
203
+ var driverTipsField = !cartState.loading && cart && (cart === null || cart === void 0 ? void 0 : cart.business_id) && options.type === 1 && (cart === null || cart === void 0 ? void 0 : cart.status) !== 2 && (validationFields === null || validationFields === void 0 ? void 0 : (_validationFields$fie13 = validationFields.fields) === null || _validationFields$fie13 === void 0 ? void 0 : (_validationFields$fie14 = _validationFields$fie13.checkout) === null || _validationFields$fie14 === void 0 ? void 0 : (_validationFields$fie15 = _validationFields$fie14.driver_tip) === null || _validationFields$fie15 === void 0 ? void 0 : _validationFields$fie15.enabled) && driverTipsOptions.length > 0 && !useKioskApp;
203
204
  var creditPointPlan = loyaltyPlansState === null || loyaltyPlansState === void 0 ? void 0 : (_loyaltyPlansState$re = loyaltyPlansState.result) === null || _loyaltyPlansState$re === void 0 ? void 0 : _loyaltyPlansState$re.find(function (loyal) {
204
205
  return loyal.type === 'credit_point';
205
206
  });
@@ -243,20 +244,20 @@ var CheckoutUI = function CheckoutUI(props) {
243
244
  setIsUserDetailsEdit(false);
244
245
  };
245
246
  var checkValidationFields = function checkValidationFields() {
246
- var _validationFields$fie10, _validationFields$fie11, _validationFields$fie12, _validationFields$fie13, _validationFields$fie14, _validationFields$fie15, _validationFields$fie16, _configs$verification;
247
+ var _validationFields$fie16, _validationFields$fie17, _validationFields$fie18, _validationFields$fie19, _validationFields$fie20, _validationFields$fie21, _validationFields$fie22, _configs$verification;
247
248
  setUserErrors([]);
248
249
  var errors = [];
249
250
  var notFields = ['coupon', 'driver_tip', 'mobile_phone', 'address', 'zipcode', 'address_notes'];
250
251
  var userSelected = isCustomerMode ? customerState.user : user;
251
252
  var _requiredFields = [];
252
- Object.values(validationFields === null || validationFields === void 0 ? void 0 : (_validationFields$fie10 = validationFields.fields) === null || _validationFields$fie10 === void 0 ? void 0 : _validationFields$fie10.checkout).map(function (field) {
253
+ Object.values(validationFields === null || validationFields === void 0 ? void 0 : (_validationFields$fie16 = validationFields.fields) === null || _validationFields$fie16 === void 0 ? void 0 : _validationFields$fie16.checkout).map(function (field) {
253
254
  if (field !== null && field !== void 0 && field.enabled && field !== null && field !== void 0 && field.required && !notFields.includes(field.code)) {
254
255
  if (userSelected && !userSelected[field === null || field === void 0 ? void 0 : field.code]) {
255
256
  _requiredFields.push(field === null || field === void 0 ? void 0 : field.code);
256
257
  }
257
258
  }
258
259
  });
259
- if (userSelected && !(userSelected !== null && userSelected !== void 0 && userSelected.cellphone) && (validationFields !== null && validationFields !== void 0 && (_validationFields$fie11 = validationFields.fields) !== null && _validationFields$fie11 !== void 0 && (_validationFields$fie12 = _validationFields$fie11.checkout) !== null && _validationFields$fie12 !== void 0 && (_validationFields$fie13 = _validationFields$fie12.cellphone) !== null && _validationFields$fie13 !== void 0 && _validationFields$fie13.enabled && validationFields !== null && validationFields !== void 0 && (_validationFields$fie14 = validationFields.fields) !== null && _validationFields$fie14 !== void 0 && (_validationFields$fie15 = _validationFields$fie14.checkout) !== null && _validationFields$fie15 !== void 0 && (_validationFields$fie16 = _validationFields$fie15.cellphone) !== null && _validationFields$fie16 !== void 0 && _validationFields$fie16.required || (configs === null || configs === void 0 ? void 0 : (_configs$verification = configs.verification_phone_required) === null || _configs$verification === void 0 ? void 0 : _configs$verification.value) === '1')) {
260
+ if (userSelected && !(userSelected !== null && userSelected !== void 0 && userSelected.cellphone) && (validationFields !== null && validationFields !== void 0 && (_validationFields$fie17 = validationFields.fields) !== null && _validationFields$fie17 !== void 0 && (_validationFields$fie18 = _validationFields$fie17.checkout) !== null && _validationFields$fie18 !== void 0 && (_validationFields$fie19 = _validationFields$fie18.cellphone) !== null && _validationFields$fie19 !== void 0 && _validationFields$fie19.enabled && validationFields !== null && validationFields !== void 0 && (_validationFields$fie20 = validationFields.fields) !== null && _validationFields$fie20 !== void 0 && (_validationFields$fie21 = _validationFields$fie20.checkout) !== null && _validationFields$fie21 !== void 0 && (_validationFields$fie22 = _validationFields$fie21.cellphone) !== null && _validationFields$fie22 !== void 0 && _validationFields$fie22.required || (configs === null || configs === void 0 ? void 0 : (_configs$verification = configs.verification_phone_required) === null || _configs$verification === void 0 ? void 0 : _configs$verification.value) === '1')) {
260
261
  _requiredFields.push('cellphone');
261
262
  }
262
263
  setRequiredFields(_requiredFields);
@@ -295,8 +296,8 @@ var CheckoutUI = function CheckoutUI(props) {
295
296
  window.scrollTo(0, scrollElement.offsetTop - 20);
296
297
  };
297
298
  (0, _react.useEffect)(function () {
298
- var _validationFields$fie17;
299
- if (validationFields && validationFields !== null && validationFields !== void 0 && (_validationFields$fie17 = validationFields.fields) !== null && _validationFields$fie17 !== void 0 && _validationFields$fie17.checkout) {
299
+ var _validationFields$fie23;
300
+ if (validationFields && validationFields !== null && validationFields !== void 0 && (_validationFields$fie23 = validationFields.fields) !== null && _validationFields$fie23 !== void 0 && _validationFields$fie23.checkout) {
300
301
  checkValidationFields();
301
302
  }
302
303
  }, [validationFields, user, customerState]);
@@ -469,7 +470,7 @@ var CheckoutUI = function CheckoutUI(props) {
469
470
  }
470
471
  })), /*#__PURE__*/_react.default.createElement(_styles.CheckOutDivider, null)), !cartState.loading && cart && /*#__PURE__*/_react.default.createElement(_styles.PaymentMethodContainer, {
471
472
  className: "paymentsContainer"
472
- }, /*#__PURE__*/_react.default.createElement("h1", null, t('PAYMENT_METHODS', 'Payment Methods')), !cartState.loading && (cart === null || cart === void 0 ? void 0 : cart.status) === 4 && /*#__PURE__*/_react.default.createElement(_styles.WarningMessage, {
473
+ }, /*#__PURE__*/_react.default.createElement(_styles.SectionTitleContainer, null, /*#__PURE__*/_react.default.createElement("h1", null, t('PAYMENT_METHODS', 'Payment Methods')), /*#__PURE__*/_react.default.createElement(_styles.Flag, null, t('REQUIRED', 'Required'))), !cartState.loading && (cart === null || cart === void 0 ? void 0 : cart.status) === 4 && /*#__PURE__*/_react.default.createElement(_styles.WarningMessage, {
473
474
  style: {
474
475
  marginTop: 20
475
476
  }
@@ -537,7 +538,7 @@ var CheckoutUI = function CheckoutUI(props) {
537
538
  onClick: function onClick() {
538
539
  return handlePlaceOrder();
539
540
  }
540
- }, !(cart !== null && cart !== void 0 && cart.valid_maximum) ? "".concat(t('MAXIMUM_SUBTOTAL_ORDER', 'Maximum subtotal order'), ": ").concat(parsePrice(cart === null || cart === void 0 ? void 0 : cart.maximum)) : !(cart !== null && cart !== void 0 && cart.valid_minimum) && !((cart === null || cart === void 0 ? void 0 : cart.discount_type) === 1 && (cart === null || cart === void 0 ? void 0 : cart.discount_rate) === 100) ? "".concat(t('MINIMUN_SUBTOTAL_ORDER', 'Minimum subtotal order:'), " ").concat(parsePrice(cart === null || cart === void 0 ? void 0 : cart.minimum)) : placing ? t('PLACING', 'Placing') : t('PLACE_ORDER', 'Place Order'))), !(cart !== null && cart !== void 0 && cart.valid_address) && (cart === null || cart === void 0 ? void 0 : cart.status) !== 2 && /*#__PURE__*/_react.default.createElement(_styles.WarningText, null, t('INVALID_CART_ADDRESS', 'Selected address is invalid, please select a closer address.')), !paymethodSelected && (cart === null || cart === void 0 ? void 0 : cart.balance) > 0 && (cart === null || cart === void 0 ? void 0 : cart.status) !== 2 && /*#__PURE__*/_react.default.createElement(_styles.WarningText, null, t('WARNING_NOT_PAYMENT_SELECTED', 'Please, select a payment method to place order.')), !(cart !== null && cart !== void 0 && cart.valid_products) && (cart === null || cart === void 0 ? void 0 : cart.status) !== 2 && /*#__PURE__*/_react.default.createElement(_styles.WarningText, null, t('WARNING_INVALID_PRODUCTS', 'Some products are invalid, please check them.')), isTableNumberEnabled === '1' && (options === null || options === void 0 ? void 0 : options.type) === 3 && !(cart !== null && cart !== void 0 && cart.spot_number || placeSpotNumber) && /*#__PURE__*/_react.default.createElement(_styles.WarningText, null, t('WARNING_PLACE_SPOT', 'Please, select your spot to place order.')), options.type === 1 && (validationFields === null || validationFields === void 0 ? void 0 : (_validationFields$fie18 = validationFields.fields) === null || _validationFields$fie18 === void 0 ? void 0 : (_validationFields$fie19 = _validationFields$fie18.checkout) === null || _validationFields$fie19 === void 0 ? void 0 : (_validationFields$fie20 = _validationFields$fie19.driver_tip) === null || _validationFields$fie20 === void 0 ? void 0 : _validationFields$fie20.enabled) && (validationFields === null || validationFields === void 0 ? void 0 : (_validationFields$fie21 = validationFields.fields) === null || _validationFields$fie21 === void 0 ? void 0 : (_validationFields$fie22 = _validationFields$fie21.checkout) === null || _validationFields$fie22 === void 0 ? void 0 : (_validationFields$fie23 = _validationFields$fie22.driver_tip) === null || _validationFields$fie23 === void 0 ? void 0 : _validationFields$fie23.required) && Number(cart === null || cart === void 0 ? void 0 : cart.driver_tip) <= 0 && /*#__PURE__*/_react.default.createElement(_styles.WarningText, null, t('WARNING_INVALID_DRIVER_TIP', 'Driver Tip is required.')), (cart === null || cart === void 0 ? void 0 : cart.valid_preorder) !== undefined && !(cart !== null && cart !== void 0 && cart.valid_preorder) && /*#__PURE__*/_react.default.createElement(_styles.WarningText, null, t('INVALID_CART_MOMENT', 'Selected schedule time is invalid, please select a schedule into the business schedule interval.'))), windowSize.width < 576 && !cartState.loading && cart && (cart === null || cart === void 0 ? void 0 : cart.status) !== 2 && /*#__PURE__*/_react.default.createElement(_styles.MobileWrapperPlaceOrderButton, null, /*#__PURE__*/_react.default.createElement("span", null, parsePrice(cart === null || cart === void 0 ? void 0 : cart.total)), /*#__PURE__*/_react.default.createElement(_Buttons.Button, {
541
+ }, !(cart !== null && cart !== void 0 && cart.valid_maximum) ? "".concat(t('MAXIMUM_SUBTOTAL_ORDER', 'Maximum subtotal order'), ": ").concat(parsePrice(cart === null || cart === void 0 ? void 0 : cart.maximum)) : !(cart !== null && cart !== void 0 && cart.valid_minimum) && !((cart === null || cart === void 0 ? void 0 : cart.discount_type) === 1 && (cart === null || cart === void 0 ? void 0 : cart.discount_rate) === 100) ? "".concat(t('MINIMUN_SUBTOTAL_ORDER', 'Minimum subtotal order:'), " ").concat(parsePrice(cart === null || cart === void 0 ? void 0 : cart.minimum)) : placing ? t('PLACING', 'Placing') : t('PLACE_ORDER', 'Place Order'))), !(cart !== null && cart !== void 0 && cart.valid_address) && (cart === null || cart === void 0 ? void 0 : cart.status) !== 2 && /*#__PURE__*/_react.default.createElement(_styles.WarningText, null, t('INVALID_CART_ADDRESS', 'Selected address is invalid, please select a closer address.')), !paymethodSelected && (cart === null || cart === void 0 ? void 0 : cart.balance) > 0 && (cart === null || cart === void 0 ? void 0 : cart.status) !== 2 && /*#__PURE__*/_react.default.createElement(_styles.WarningText, null, t('WARNING_NOT_PAYMENT_SELECTED', 'Please, select a payment method to place order.')), !(cart !== null && cart !== void 0 && cart.valid_products) && (cart === null || cart === void 0 ? void 0 : cart.status) !== 2 && /*#__PURE__*/_react.default.createElement(_styles.WarningText, null, t('WARNING_INVALID_PRODUCTS', 'Some products are invalid, please check them.')), isTableNumberEnabled === '1' && (options === null || options === void 0 ? void 0 : options.type) === 3 && !(cart !== null && cart !== void 0 && cart.spot_number || placeSpotNumber) && /*#__PURE__*/_react.default.createElement(_styles.WarningText, null, t('WARNING_PLACE_SPOT', 'Please, select your spot to place order.')), options.type === 1 && (validationFields === null || validationFields === void 0 ? void 0 : (_validationFields$fie24 = validationFields.fields) === null || _validationFields$fie24 === void 0 ? void 0 : (_validationFields$fie25 = _validationFields$fie24.checkout) === null || _validationFields$fie25 === void 0 ? void 0 : (_validationFields$fie26 = _validationFields$fie25.driver_tip) === null || _validationFields$fie26 === void 0 ? void 0 : _validationFields$fie26.enabled) && (validationFields === null || validationFields === void 0 ? void 0 : (_validationFields$fie27 = validationFields.fields) === null || _validationFields$fie27 === void 0 ? void 0 : (_validationFields$fie28 = _validationFields$fie27.checkout) === null || _validationFields$fie28 === void 0 ? void 0 : (_validationFields$fie29 = _validationFields$fie28.driver_tip) === null || _validationFields$fie29 === void 0 ? void 0 : _validationFields$fie29.required) && Number(cart === null || cart === void 0 ? void 0 : cart.driver_tip) <= 0 && /*#__PURE__*/_react.default.createElement(_styles.WarningText, null, t('WARNING_INVALID_DRIVER_TIP', 'Driver Tip is required.')), validateCommentsCartField && /*#__PURE__*/_react.default.createElement(_styles.WarningText, null, t('WARNING_INVALID_CART_COMMENTS', 'Cart comments is required.')), (cart === null || cart === void 0 ? void 0 : cart.valid_preorder) !== undefined && !(cart !== null && cart !== void 0 && cart.valid_preorder) && /*#__PURE__*/_react.default.createElement(_styles.WarningText, null, t('INVALID_CART_MOMENT', 'Selected schedule time is invalid, please select a schedule into the business schedule interval.'))), windowSize.width < 576 && !cartState.loading && cart && (cart === null || cart === void 0 ? void 0 : cart.status) !== 2 && /*#__PURE__*/_react.default.createElement(_styles.MobileWrapperPlaceOrderButton, null, /*#__PURE__*/_react.default.createElement("span", null, parsePrice(cart === null || cart === void 0 ? void 0 : cart.total)), /*#__PURE__*/_react.default.createElement(_Buttons.Button, {
541
542
  color: !(cart !== null && cart !== void 0 && cart.valid_maximum) || !(cart !== null && cart !== void 0 && cart.valid_minimum) && !((cart === null || cart === void 0 ? void 0 : cart.discount_type) === 1 && (cart === null || cart === void 0 ? void 0 : cart.discount_rate) === 100) ? 'secundary' : 'primary',
542
543
  disabled: isDisablePlaceOrderButton,
543
544
  onClick: function onClick() {
@@ -4,9 +4,9 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.WrapperUserDetails = exports.WrapperRightContainer = exports.WrapperPlaceOrderButton = exports.WrapperLeftContent = exports.WrapperLeftContainer = exports.WrapperActionsInput = exports.WarningText = exports.WarningMessage = exports.WalletPaymentOptionContainer = exports.UserDetailsContainer = exports.SelectSpotContainer = exports.PaymentMethodContainer = exports.OrderContextUIWrapper = exports.NotFoundImage = exports.MobileWrapperPlaceOrderButton = exports.HeaderContent = exports.DriverTipDivider = exports.DriverTipContainer = exports.DeliveryOptionsContainer = exports.Container = exports.CheckOutDivider = exports.CartsList = exports.CartHeader = exports.CartContainer = exports.BusinessDetailsContainer = exports.AuthButtonList = void 0;
7
+ exports.WrapperUserDetails = exports.WrapperRightContainer = exports.WrapperPlaceOrderButton = exports.WrapperLeftContent = exports.WrapperLeftContainer = exports.WrapperActionsInput = exports.WarningText = exports.WarningMessage = exports.WalletPaymentOptionContainer = exports.UserDetailsContainer = exports.SelectSpotContainer = exports.SectionTitleContainer = exports.PaymentMethodContainer = exports.OrderContextUIWrapper = exports.NotFoundImage = exports.MobileWrapperPlaceOrderButton = exports.HeaderContent = exports.Flag = exports.DriverTipDivider = exports.DriverTipContainer = exports.DeliveryOptionsContainer = exports.Container = exports.CheckOutDivider = exports.CartsList = exports.CartHeader = exports.CartContainer = exports.BusinessDetailsContainer = exports.AuthButtonList = void 0;
8
8
  var _styledComponents = _interopRequireWildcard(require("styled-components"));
9
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22, _templateObject23, _templateObject24, _templateObject25, _templateObject26, _templateObject27, _templateObject28;
9
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22, _templateObject23, _templateObject24, _templateObject25, _templateObject26, _templateObject27, _templateObject28, _templateObject29, _templateObject30;
10
10
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
11
11
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
12
12
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
@@ -70,11 +70,15 @@ var WrapperActionsInput = _styledComponents.default.div(_templateObject23 || (_t
70
70
  exports.WrapperActionsInput = WrapperActionsInput;
71
71
  var MobileWrapperPlaceOrderButton = _styledComponents.default.div(_templateObject24 || (_templateObject24 = _taggedTemplateLiteral(["\n position: fixed;\n width: 100vw;\n left: 0;\n bottom: 0;\n background-color: white;\n padding: 15px 25px;\n display: flex;\n align-items: center;\n justify-content: space-between;\n box-sizing: border-box;\n z-index: 1006;\n box-shadow: 0px 4px 10px rgb(0 0 0 / 12%);\n\n span {\n font-weight: 600;\n font-size: 16px;\n\n @media (min-width: 1200px) {\n font-size: 18px;\n padding-left: 20px;\n }\n }\n\n button {\n min-height: 44px;\n border-radius: 7.6px;\n }\n"])));
72
72
  exports.MobileWrapperPlaceOrderButton = MobileWrapperPlaceOrderButton;
73
- var OrderContextUIWrapper = _styledComponents.default.div(_templateObject25 || (_templateObject25 = _taggedTemplateLiteral(["\n flex: 1;\n margin-left: 15px;\n ", "\n"])), function (props) {
73
+ var OrderContextUIWrapper = _styledComponents.default.div(_templateObject25 || (_templateObject25 = _taggedTemplateLiteral(["\n flex: 1;\n margin-left: 15px;\n max-width: 85%;\n\n ", "\n\n @media (min-width: 480px) {\n max-width: 90%;\n }\n"])), function (props) {
74
74
  return props.theme.rtl && (0, _styledComponents.css)(_templateObject26 || (_templateObject26 = _taggedTemplateLiteral(["\n margin-left: 0px;\n margin-right: 15px;\n "])));
75
75
  });
76
76
  exports.OrderContextUIWrapper = OrderContextUIWrapper;
77
77
  var HeaderContent = _styledComponents.default.div(_templateObject27 || (_templateObject27 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n margin-bottom: 10px;\n .back-arrow {\n font-size: 24px;\n cursor: pointer;\n }\n"])));
78
78
  exports.HeaderContent = HeaderContent;
79
79
  var AuthButtonList = _styledComponents.default.div(_templateObject28 || (_templateObject28 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n h2 {\n font-weight: 600;\n font-size: 20px;\n margin-bottom: 3px;\n }\n button {\n width: 100%;\n height: 44px;\n margin-top: 22px;\n }\n"])));
80
- exports.AuthButtonList = AuthButtonList;
80
+ exports.AuthButtonList = AuthButtonList;
81
+ var Flag = _styledComponents.default.span(_templateObject29 || (_templateObject29 = _taggedTemplateLiteral(["\n font-size: 13px;\n margin: 0px;\n text-transform: capitalize;\n color: #E63757;\n font-weight: 500;\n\n @media (min-width: 381px) {\n font-size: 14px;\n }\n"])));
82
+ exports.Flag = Flag;
83
+ var SectionTitleContainer = _styledComponents.default.div(_templateObject30 || (_templateObject30 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n"])));
84
+ exports.SectionTitleContainer = SectionTitleContainer;
@@ -49,7 +49,7 @@ var CitiesControl = function CitiesControl(props) {
49
49
  marginBottom: '10px'
50
50
  }
51
51
  }) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, cities === null || cities === void 0 ? void 0 : cities.map(function (city) {
52
- return /*#__PURE__*/_react.default.createElement(_styles.CityItem, {
52
+ return (city === null || city === void 0 ? void 0 : city.enabled) && /*#__PURE__*/_react.default.createElement(_styles.CityItem, {
53
53
  key: city === null || city === void 0 ? void 0 : city.id,
54
54
  onClick: function onClick() {
55
55
  return setCityState((city === null || city === void 0 ? void 0 : city.id) === cityState ? null : city === null || city === void 0 ? void 0 : city.id);
@@ -44,6 +44,7 @@ var GiftCardUI = function GiftCardUI(props) {
44
44
  }
45
45
  }, t('REDEEM_GIFT_CARD', 'Redeem gift card'))), /*#__PURE__*/_react.default.createElement(_Modal.Modal, {
46
46
  width: "700px",
47
+ padding: "0px",
47
48
  open: openModal === 'purchase',
48
49
  onClose: function onClose() {
49
50
  return setOpenModal(null);