ordering-ui-external 10.1.0 → 10.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. package/_bundles/{0.ordering-ui.e9827c5566d8cce0eaa4.js → 0.ordering-ui.8384f3801abcc340af2a.js} +1 -1
  2. package/_bundles/{1.ordering-ui.e9827c5566d8cce0eaa4.js → 1.ordering-ui.8384f3801abcc340af2a.js} +1 -1
  3. package/_bundles/{2.ordering-ui.e9827c5566d8cce0eaa4.js → 2.ordering-ui.8384f3801abcc340af2a.js} +1 -1
  4. package/_bundles/{4.ordering-ui.e9827c5566d8cce0eaa4.js → 4.ordering-ui.8384f3801abcc340af2a.js} +1 -1
  5. package/_bundles/{5.ordering-ui.e9827c5566d8cce0eaa4.js → 5.ordering-ui.8384f3801abcc340af2a.js} +1 -1
  6. package/_bundles/{6.ordering-ui.e9827c5566d8cce0eaa4.js → 6.ordering-ui.8384f3801abcc340af2a.js} +1 -1
  7. package/_bundles/{7.ordering-ui.e9827c5566d8cce0eaa4.js → 7.ordering-ui.8384f3801abcc340af2a.js} +2 -2
  8. package/_bundles/{8.ordering-ui.e9827c5566d8cce0eaa4.js → 8.ordering-ui.8384f3801abcc340af2a.js} +1 -1
  9. package/_bundles/{9.ordering-ui.e9827c5566d8cce0eaa4.js → 9.ordering-ui.8384f3801abcc340af2a.js} +1 -1
  10. package/_bundles/ordering-ui.8384f3801abcc340af2a.js +2 -0
  11. package/_modules/components/BusinessBasicInformation/index.js +7 -10
  12. package/_modules/components/OrderDetails/index.js +14 -17
  13. package/_modules/components/ProductItemAccordion/index.js +4 -5
  14. package/_modules/components/RenderProductsLayout/SearchProducts/index.js +2 -5
  15. package/_modules/components/UserFormDetails/index.js +7 -8
  16. package/_modules/components/UserProfileForm/ProfileOptions/index.js +4 -5
  17. package/_modules/components/UserProfileForm/index.js +10 -11
  18. package/_modules/contexts/ThemeContext/index.js +1 -1
  19. package/_modules/themes/five/src/components/AddressList/index.js +0 -3
  20. package/_modules/themes/five/src/components/BusinessController/index.js +11 -14
  21. package/_modules/themes/five/src/components/BusinessInformation/styles.js +19 -14
  22. package/_modules/themes/five/src/components/BusinessPreorder/index.js +51 -10
  23. package/_modules/themes/five/src/components/BusinessPreorder/styles.js +32 -25
  24. package/_modules/themes/five/src/components/BusinessProductsCategories/index.js +2 -5
  25. package/_modules/themes/five/src/components/BusinessProductsListing/index.js +11 -4
  26. package/_modules/themes/five/src/components/BusinessProductsListing/styles.js +11 -12
  27. package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +5 -10
  28. package/_modules/themes/five/src/components/Cart/index.js +17 -9
  29. package/_modules/themes/five/src/components/CartPopover/index.js +4 -7
  30. package/_modules/themes/five/src/components/CartPopover/styles.js +4 -1
  31. package/_modules/themes/five/src/components/Checkout/index.js +3 -6
  32. package/_modules/themes/five/src/components/Confirm/styles.js +16 -13
  33. package/_modules/themes/five/src/components/DatePicker/index.js +2 -1
  34. package/_modules/themes/five/src/components/Favorite/index.js +4 -5
  35. package/_modules/themes/five/src/components/Footer/index.js +2 -3
  36. package/_modules/themes/five/src/components/Header/index.js +5 -8
  37. package/_modules/themes/five/src/components/HeaderOption/index.js +4 -5
  38. package/_modules/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/index.js +7 -10
  39. package/_modules/themes/five/src/components/HorizontalOrdersLayout/styles.js +1 -1
  40. package/_modules/themes/five/src/components/Modal/styles.js +4 -2
  41. package/_modules/themes/five/src/components/MomentContent/index.js +16 -6
  42. package/_modules/themes/five/src/components/MomentControl/index.js +44 -34
  43. package/_modules/themes/five/src/components/MomentControl/styles.js +49 -27
  44. package/_modules/themes/five/src/components/OrderDetails/index.js +31 -24
  45. package/_modules/themes/five/src/components/OrderDetails/layouts/Kiosk/index.js +4 -7
  46. package/_modules/themes/five/src/components/OrderTypeSelectorContent/index.js +11 -1
  47. package/_modules/themes/five/src/components/OrdersOption/PreviousBusinessOrdered/index.js +4 -5
  48. package/_modules/themes/five/src/components/PageBanner/index.js +75 -54
  49. package/_modules/themes/five/src/components/ProductForm/styles.js +12 -9
  50. package/_modules/themes/five/src/components/ProductItemAccordion/index.js +0 -3
  51. package/_modules/themes/five/src/components/ProductOption/styles.js +4 -1
  52. package/_modules/themes/five/src/components/RenderProductsLayout/index.js +8 -9
  53. package/_modules/themes/five/src/components/SingleProductCard/layouts/starbucks/index.js +0 -3
  54. package/_modules/themes/five/src/components/UserFormDetails/index.js +3 -6
  55. package/_modules/themes/five/src/components/UserPopover/index.js +3 -6
  56. package/_modules/themes/five/src/components/UserPopover/styles.js +8 -5
  57. package/_modules/themes/five/src/components/UserProfileForm/ProfileOptions/index.js +4 -5
  58. package/_modules/themes/five/src/components/UserProfileForm/index.js +2 -5
  59. package/_modules/themes/six/src/components/BusinessBasicInformation/index.js +8 -9
  60. package/_modules/themes/six/src/components/BusinessProductsListing/SearchProducts/index.js +3 -6
  61. package/package.json +2 -2
  62. package/src/components/BusinessBasicInformation/index.js +7 -8
  63. package/src/components/OrderDetails/index.js +14 -16
  64. package/src/components/ProductItemAccordion/index.js +4 -3
  65. package/src/components/RenderProductsLayout/SearchProducts/index.js +2 -3
  66. package/src/components/UserFormDetails/index.js +6 -5
  67. package/src/components/UserProfileForm/ProfileOptions/index.js +4 -4
  68. package/src/components/UserProfileForm/index.js +10 -10
  69. package/src/contexts/ThemeContext/index.js +1 -1
  70. package/src/themes/five/src/components/AddressForm/index.js +1 -2
  71. package/src/themes/five/src/components/AddressList/index.js +1 -3
  72. package/src/themes/five/src/components/BusinessController/index.js +2 -4
  73. package/src/themes/five/src/components/BusinessInformation/index.js +1 -2
  74. package/src/themes/five/src/components/BusinessInformation/styles.js +2 -2
  75. package/src/themes/five/src/components/BusinessPreorder/index.js +61 -10
  76. package/src/themes/five/src/components/BusinessPreorder/styles.js +93 -43
  77. package/src/themes/five/src/components/BusinessProductsCategories/index.js +2 -3
  78. package/src/themes/five/src/components/BusinessProductsList/index.js +1 -2
  79. package/src/themes/five/src/components/BusinessProductsListing/index.js +10 -3
  80. package/src/themes/five/src/components/BusinessProductsListing/styles.js +1 -1
  81. package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +6 -7
  82. package/src/themes/five/src/components/Cart/index.js +11 -4
  83. package/src/themes/five/src/components/CartPopover/index.js +2 -3
  84. package/src/themes/five/src/components/CartPopover/styles.js +1 -1
  85. package/src/themes/five/src/components/Checkout/index.js +2 -4
  86. package/src/themes/five/src/components/Confirm/styles.js +1 -1
  87. package/src/themes/five/src/components/DatePicker/index.js +1 -0
  88. package/src/themes/five/src/components/Favorite/index.js +4 -3
  89. package/src/themes/five/src/components/Footer/index.js +3 -2
  90. package/src/themes/five/src/components/Header/index.js +4 -5
  91. package/src/themes/five/src/components/HeaderOption/index.js +4 -3
  92. package/src/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/index.js +7 -8
  93. package/src/themes/five/src/components/HorizontalOrdersLayout/styles.js +1 -0
  94. package/src/themes/five/src/components/Modal/styles.js +1 -1
  95. package/src/themes/five/src/components/MomentContent/index.js +17 -8
  96. package/src/themes/five/src/components/MomentControl/index.js +83 -45
  97. package/src/themes/five/src/components/MomentControl/styles.js +137 -34
  98. package/src/themes/five/src/components/MyOrders/index.js +1 -1
  99. package/src/themes/five/src/components/OrderDetails/index.js +50 -21
  100. package/src/themes/five/src/components/OrderDetails/layouts/Kiosk/index.js +4 -6
  101. package/src/themes/five/src/components/OrderTypeSelectorContent/index.js +13 -1
  102. package/src/themes/five/src/components/OrdersOption/PreviousBusinessOrdered/index.js +4 -3
  103. package/src/themes/five/src/components/PageBanner/index.js +64 -50
  104. package/src/themes/five/src/components/ProductForm/styles.js +1 -1
  105. package/src/themes/five/src/components/ProductItemAccordion/index.js +1 -2
  106. package/src/themes/five/src/components/ProductOption/styles.js +1 -1
  107. package/src/themes/five/src/components/RenderProductsLayout/index.js +9 -6
  108. package/src/themes/five/src/components/SingleProductCard/layouts/starbucks/index.js +1 -2
  109. package/src/themes/five/src/components/UserFormDetails/index.js +3 -4
  110. package/src/themes/five/src/components/UserPopover/index.js +3 -4
  111. package/src/themes/five/src/components/UserPopover/styles.js +1 -1
  112. package/src/themes/five/src/components/UserProfileForm/ProfileOptions/index.js +4 -3
  113. package/src/themes/five/src/components/UserProfileForm/index.js +2 -4
  114. package/src/themes/six/src/components/BusinessBasicInformation/index.js +8 -7
  115. package/src/themes/six/src/components/BusinessProductsListing/SearchProducts/index.js +2 -3
  116. package/template/app.js +15 -10
  117. package/template/components/HelmetTags/index.js +3 -2
  118. package/template/pages/AddressList/index.js +4 -3
  119. package/template/pages/BusinessProductsList/index.js +5 -4
  120. package/template/pages/BusinessesList/index.js +6 -6
  121. package/template/pages/Checkout/index.js +6 -4
  122. package/template/pages/Home/index.js +4 -2
  123. package/template/pages/MessagesList/index.js +5 -4
  124. package/template/pages/MyOrders/index.js +6 -5
  125. package/template/pages/OrderDetails/index.js +4 -3
  126. package/_bundles/ordering-ui.e9827c5566d8cce0eaa4.js +0 -2
  127. package/template/components/OrderingThemeUpdated/index.js +0 -41
  128. /package/_bundles/{7.ordering-ui.e9827c5566d8cce0eaa4.js.LICENSE.txt → 7.ordering-ui.8384f3801abcc340af2a.js.LICENSE.txt} +0 -0
  129. /package/_bundles/{ordering-ui.e9827c5566d8cce0eaa4.js.LICENSE.txt → ordering-ui.8384f3801abcc340af2a.js.LICENSE.txt} +0 -0
@@ -37,7 +37,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
37
37
  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; } }
38
38
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
39
39
  var BusinessControllerUI = function BusinessControllerUI(props) {
40
- var _orderingTheme$theme, _orderingTheme$theme$, _orderingTheme$theme$2, _orderingTheme$theme$3, _theme$business_listi, _theme$business_listi2, _theme$business_listi3, _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, _theme$business_listi22, _theme$business_listi23, _theme$business_listi24, _theme$business_listi25, _theme$business_listi26, _theme$business_listi27, _theme$business_listi28, _theme$business_listi29, _theme$business_listi30, _theme$business_listi31, _theme$business_listi32, _theme$business_listi33, _theme$business_listi34, _theme$business_listi35, _theme$business_listi36, _theme$business_listi37, _theme$business_listi38, _theme$business_listi39, _theme$business_listi40, _theme$business_listi41, _theme$business_listi42, _theme$business_listi43, _theme$business_listi44, _theme$business_listi45, _business$ribbon, _business$ribbon2, _business$ribbon3, _business$ribbon4, _business$ribbon5, _business$ribbon6, _business$ribbon7, _theme$images, _theme$images$dummies, _configState$configs, _configState$configs$, _orderState$options, _theme$images2, _theme$images2$dummie, _theme$images3, _theme$images3$dummie, _business$reviews, _business$reviews2, _businessState$busine2, _orderState$options2, _theme$defaultLanguag, _theme$defaultLanguag2, _theme$defaultLanguag3, _theme$defaultLanguag4;
40
+ var _theme$business_listi, _theme$business_listi2, _theme$business_listi3, _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, _theme$business_listi22, _theme$business_listi23, _theme$business_listi24, _theme$business_listi25, _theme$business_listi26, _theme$business_listi27, _theme$business_listi28, _theme$business_listi29, _theme$business_listi30, _theme$business_listi31, _theme$business_listi32, _theme$business_listi33, _theme$business_listi34, _theme$business_listi35, _theme$business_listi36, _theme$business_listi37, _theme$business_listi38, _theme$business_listi39, _theme$business_listi40, _theme$business_listi41, _theme$business_listi42, _theme$business_listi43, _theme$business_listi44, _theme$business_listi45, _theme$business_listi46, _theme$business_listi47, _theme$business_listi48, _business$ribbon, _business$ribbon2, _business$ribbon3, _business$ribbon4, _business$ribbon5, _business$ribbon6, _business$ribbon7, _theme$images, _theme$images$dummies, _configState$configs, _configState$configs$, _orderState$options, _theme$images2, _theme$images2$dummie, _theme$images3, _theme$images3$dummie, _business$reviews, _business$reviews2, _businessState$busine2, _orderState$options2, _theme$defaultLanguag, _theme$defaultLanguag2, _theme$defaultLanguag3, _theme$defaultLanguag4;
41
41
  var isSkeleton = props.isSkeleton,
42
42
  business = props.business,
43
43
  getBusinessOffer = props.getBusinessOffer,
@@ -83,9 +83,6 @@ var BusinessControllerUI = function BusinessControllerUI(props) {
83
83
  var _useOrder = (0, _orderingComponentsExternal.useOrder)(),
84
84
  _useOrder2 = _slicedToArray(_useOrder, 1),
85
85
  orderState = _useOrder2[0];
86
- var _useOrderingTheme = (0, _orderingComponentsExternal.useOrderingTheme)(),
87
- _useOrderingTheme2 = _slicedToArray(_useOrderingTheme, 1),
88
- orderingTheme = _useOrderingTheme2[0];
89
86
  var _useState = (0, _react.useState)({
90
87
  open: false,
91
88
  content: []
@@ -102,16 +99,16 @@ var BusinessControllerUI = function BusinessControllerUI(props) {
102
99
  modalPageToShow = _useState6[0],
103
100
  setModalPageToShow = _useState6[1];
104
101
  var favoriteRef = (0, _react.useRef)(null);
105
- var businessRows = orderingTheme === null || orderingTheme === void 0 ? void 0 : (_orderingTheme$theme = orderingTheme.theme) === null || _orderingTheme$theme === void 0 ? void 0 : (_orderingTheme$theme$ = _orderingTheme$theme.business_listing_view) === null || _orderingTheme$theme$ === void 0 ? void 0 : (_orderingTheme$theme$2 = _orderingTheme$theme$.components) === null || _orderingTheme$theme$2 === void 0 ? void 0 : (_orderingTheme$theme$3 = _orderingTheme$theme$2.layout) === null || _orderingTheme$theme$3 === void 0 ? void 0 : _orderingTheme$theme$3.rows;
106
- var hideBusinessLogo = 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.business) === null || _theme$business_listi3 === void 0 ? void 0 : (_theme$business_listi4 = _theme$business_listi3.components) === null || _theme$business_listi4 === void 0 ? void 0 : (_theme$business_listi5 = _theme$business_listi4.logo) === null || _theme$business_listi5 === void 0 ? void 0 : _theme$business_listi5.hidden;
107
- var hideBusinessFee = theme === null || theme === void 0 ? void 0 : (_theme$business_listi6 = theme.business_listing_view) === null || _theme$business_listi6 === void 0 ? void 0 : (_theme$business_listi7 = _theme$business_listi6.components) === null || _theme$business_listi7 === void 0 ? void 0 : (_theme$business_listi8 = _theme$business_listi7.business) === null || _theme$business_listi8 === void 0 ? void 0 : (_theme$business_listi9 = _theme$business_listi8.components) === null || _theme$business_listi9 === void 0 ? void 0 : (_theme$business_listi10 = _theme$business_listi9.fee) === null || _theme$business_listi10 === void 0 ? void 0 : _theme$business_listi10.hidden;
108
- var hideBusinessTime = theme === null || theme === void 0 ? void 0 : (_theme$business_listi11 = theme.business_listing_view) === null || _theme$business_listi11 === void 0 ? void 0 : (_theme$business_listi12 = _theme$business_listi11.components) === null || _theme$business_listi12 === void 0 ? void 0 : (_theme$business_listi13 = _theme$business_listi12.business) === null || _theme$business_listi13 === void 0 ? void 0 : (_theme$business_listi14 = _theme$business_listi13.components) === null || _theme$business_listi14 === void 0 ? void 0 : (_theme$business_listi15 = _theme$business_listi14.time) === null || _theme$business_listi15 === void 0 ? void 0 : _theme$business_listi15.hidden;
109
- var hideBusinessDistance = theme === null || theme === void 0 ? void 0 : (_theme$business_listi16 = theme.business_listing_view) === null || _theme$business_listi16 === void 0 ? void 0 : (_theme$business_listi17 = _theme$business_listi16.components) === null || _theme$business_listi17 === void 0 ? void 0 : (_theme$business_listi18 = _theme$business_listi17.business) === null || _theme$business_listi18 === void 0 ? void 0 : (_theme$business_listi19 = _theme$business_listi18.components) === null || _theme$business_listi19 === void 0 ? void 0 : (_theme$business_listi20 = _theme$business_listi19.distance) === null || _theme$business_listi20 === void 0 ? void 0 : _theme$business_listi20.hidden;
110
- var hideBusinessReviews = theme === null || theme === void 0 ? void 0 : (_theme$business_listi21 = theme.business_listing_view) === null || _theme$business_listi21 === void 0 ? void 0 : (_theme$business_listi22 = _theme$business_listi21.components) === null || _theme$business_listi22 === void 0 ? void 0 : (_theme$business_listi23 = _theme$business_listi22.business) === null || _theme$business_listi23 === void 0 ? void 0 : (_theme$business_listi24 = _theme$business_listi23.components) === null || _theme$business_listi24 === void 0 ? void 0 : (_theme$business_listi25 = _theme$business_listi24.reviews) === null || _theme$business_listi25 === void 0 ? void 0 : _theme$business_listi25.hidden;
111
- var hideBusinessFavorite = 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) === null || _theme$business_listi28 === void 0 ? void 0 : (_theme$business_listi29 = _theme$business_listi28.components) === null || _theme$business_listi29 === void 0 ? void 0 : (_theme$business_listi30 = _theme$business_listi29.favorite) === null || _theme$business_listi30 === void 0 ? void 0 : _theme$business_listi30.hidden;
112
- var hideBusinessOffer = theme === null || theme === void 0 ? void 0 : (_theme$business_listi31 = theme.business_listing_view) === null || _theme$business_listi31 === void 0 ? void 0 : (_theme$business_listi32 = _theme$business_listi31.components) === null || _theme$business_listi32 === void 0 ? void 0 : (_theme$business_listi33 = _theme$business_listi32.business) === null || _theme$business_listi33 === void 0 ? void 0 : (_theme$business_listi34 = _theme$business_listi33.components) === null || _theme$business_listi34 === void 0 ? void 0 : (_theme$business_listi35 = _theme$business_listi34.offer) === null || _theme$business_listi35 === void 0 ? void 0 : _theme$business_listi35.hidden;
113
- var hideBusinessHeader = theme === null || theme === void 0 ? void 0 : (_theme$business_listi36 = theme.business_listing_view) === null || _theme$business_listi36 === void 0 ? void 0 : (_theme$business_listi37 = _theme$business_listi36.components) === null || _theme$business_listi37 === void 0 ? void 0 : (_theme$business_listi38 = _theme$business_listi37.business) === null || _theme$business_listi38 === void 0 ? void 0 : (_theme$business_listi39 = _theme$business_listi38.components) === null || _theme$business_listi39 === void 0 ? void 0 : (_theme$business_listi40 = _theme$business_listi39.header) === null || _theme$business_listi40 === void 0 ? void 0 : _theme$business_listi40.hidden;
114
- var hideBusinessFavoriteBadge = theme === null || theme === void 0 ? void 0 : (_theme$business_listi41 = theme.business_listing_view) === null || _theme$business_listi41 === void 0 ? void 0 : (_theme$business_listi42 = _theme$business_listi41.components) === null || _theme$business_listi42 === void 0 ? void 0 : (_theme$business_listi43 = _theme$business_listi42.business) === null || _theme$business_listi43 === void 0 ? void 0 : (_theme$business_listi44 = _theme$business_listi43.components) === null || _theme$business_listi44 === void 0 ? void 0 : (_theme$business_listi45 = _theme$business_listi44.featured_badge) === null || _theme$business_listi45 === void 0 ? void 0 : _theme$business_listi45.hidden;
102
+ var businessRows = 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.layout) === null || _theme$business_listi3 === void 0 ? void 0 : _theme$business_listi3.rows;
103
+ var hideBusinessLogo = 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.business) === null || _theme$business_listi6 === void 0 ? void 0 : (_theme$business_listi7 = _theme$business_listi6.components) === null || _theme$business_listi7 === void 0 ? void 0 : (_theme$business_listi8 = _theme$business_listi7.logo) === null || _theme$business_listi8 === void 0 ? void 0 : _theme$business_listi8.hidden;
104
+ var hideBusinessFee = theme === null || theme === void 0 ? void 0 : (_theme$business_listi9 = theme.business_listing_view) === null || _theme$business_listi9 === void 0 ? void 0 : (_theme$business_listi10 = _theme$business_listi9.components) === null || _theme$business_listi10 === void 0 ? void 0 : (_theme$business_listi11 = _theme$business_listi10.business) === null || _theme$business_listi11 === void 0 ? void 0 : (_theme$business_listi12 = _theme$business_listi11.components) === null || _theme$business_listi12 === void 0 ? void 0 : (_theme$business_listi13 = _theme$business_listi12.fee) === null || _theme$business_listi13 === void 0 ? void 0 : _theme$business_listi13.hidden;
105
+ var hideBusinessTime = theme === null || theme === void 0 ? void 0 : (_theme$business_listi14 = theme.business_listing_view) === null || _theme$business_listi14 === void 0 ? void 0 : (_theme$business_listi15 = _theme$business_listi14.components) === null || _theme$business_listi15 === void 0 ? void 0 : (_theme$business_listi16 = _theme$business_listi15.business) === null || _theme$business_listi16 === void 0 ? void 0 : (_theme$business_listi17 = _theme$business_listi16.components) === null || _theme$business_listi17 === void 0 ? void 0 : (_theme$business_listi18 = _theme$business_listi17.time) === null || _theme$business_listi18 === void 0 ? void 0 : _theme$business_listi18.hidden;
106
+ var hideBusinessDistance = theme === null || theme === void 0 ? void 0 : (_theme$business_listi19 = theme.business_listing_view) === null || _theme$business_listi19 === void 0 ? void 0 : (_theme$business_listi20 = _theme$business_listi19.components) === null || _theme$business_listi20 === void 0 ? void 0 : (_theme$business_listi21 = _theme$business_listi20.business) === null || _theme$business_listi21 === void 0 ? void 0 : (_theme$business_listi22 = _theme$business_listi21.components) === null || _theme$business_listi22 === void 0 ? void 0 : (_theme$business_listi23 = _theme$business_listi22.distance) === null || _theme$business_listi23 === void 0 ? void 0 : _theme$business_listi23.hidden;
107
+ var hideBusinessReviews = theme === null || theme === void 0 ? void 0 : (_theme$business_listi24 = theme.business_listing_view) === null || _theme$business_listi24 === void 0 ? void 0 : (_theme$business_listi25 = _theme$business_listi24.components) === null || _theme$business_listi25 === void 0 ? void 0 : (_theme$business_listi26 = _theme$business_listi25.business) === 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.reviews) === null || _theme$business_listi28 === void 0 ? void 0 : _theme$business_listi28.hidden;
108
+ var hideBusinessFavorite = theme === null || theme === void 0 ? void 0 : (_theme$business_listi29 = theme.business_listing_view) === null || _theme$business_listi29 === void 0 ? void 0 : (_theme$business_listi30 = _theme$business_listi29.components) === null || _theme$business_listi30 === void 0 ? void 0 : (_theme$business_listi31 = _theme$business_listi30.business) === null || _theme$business_listi31 === void 0 ? void 0 : (_theme$business_listi32 = _theme$business_listi31.components) === null || _theme$business_listi32 === void 0 ? void 0 : (_theme$business_listi33 = _theme$business_listi32.favorite) === null || _theme$business_listi33 === void 0 ? void 0 : _theme$business_listi33.hidden;
109
+ var hideBusinessOffer = theme === null || theme === void 0 ? void 0 : (_theme$business_listi34 = theme.business_listing_view) === null || _theme$business_listi34 === void 0 ? void 0 : (_theme$business_listi35 = _theme$business_listi34.components) === null || _theme$business_listi35 === void 0 ? void 0 : (_theme$business_listi36 = _theme$business_listi35.business) === null || _theme$business_listi36 === void 0 ? void 0 : (_theme$business_listi37 = _theme$business_listi36.components) === null || _theme$business_listi37 === void 0 ? void 0 : (_theme$business_listi38 = _theme$business_listi37.offer) === null || _theme$business_listi38 === void 0 ? void 0 : _theme$business_listi38.hidden;
110
+ var hideBusinessHeader = theme === null || theme === void 0 ? void 0 : (_theme$business_listi39 = theme.business_listing_view) === null || _theme$business_listi39 === void 0 ? void 0 : (_theme$business_listi40 = _theme$business_listi39.components) === null || _theme$business_listi40 === void 0 ? void 0 : (_theme$business_listi41 = _theme$business_listi40.business) === null || _theme$business_listi41 === void 0 ? void 0 : (_theme$business_listi42 = _theme$business_listi41.components) === null || _theme$business_listi42 === void 0 ? void 0 : (_theme$business_listi43 = _theme$business_listi42.header) === null || _theme$business_listi43 === void 0 ? void 0 : _theme$business_listi43.hidden;
111
+ var hideBusinessFavoriteBadge = theme === null || theme === void 0 ? void 0 : (_theme$business_listi44 = theme.business_listing_view) === null || _theme$business_listi44 === void 0 ? void 0 : (_theme$business_listi45 = _theme$business_listi44.components) === null || _theme$business_listi45 === void 0 ? void 0 : (_theme$business_listi46 = _theme$business_listi45.business) === null || _theme$business_listi46 === void 0 ? void 0 : (_theme$business_listi47 = _theme$business_listi46.components) === null || _theme$business_listi47 === void 0 ? void 0 : (_theme$business_listi48 = _theme$business_listi47.featured_badge) === null || _theme$business_listi48 === void 0 ? void 0 : _theme$business_listi48.hidden;
115
112
 
116
113
  // const handleShowAlert = () => {
117
114
  // setAlertState({ open: true, content: [t('ERROR_ADD_PRODUCT_BUSINESS_CLOSED', 'The Business is closed at the moment')] })
@@ -15,9 +15,12 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
15
15
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
16
16
  var BusinessInformationContainer = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 100%;\n position: relative;\n overflow: auto;\n"])));
17
17
  exports.BusinessInformationContainer = BusinessInformationContainer;
18
- var BussinessTitle = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n z-index: 1000;\n display: inline-flex;\n width: 50%;\n background: #ffffff;\n align-items: center;\n margin-left: 10px;\n margin-bottom: 10px;\n border-radius: 16px;\n padding: 10px;\n ", "\n"])), function (props) {
19
- var _props$theme;
20
- return ((_props$theme = props.theme) === null || _props$theme === void 0 ? void 0 : _props$theme.rtl) && (0, _styledComponents.css)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n margin-right: 10px;\n margin-left: 0px;\n "])));
18
+ var BussinessTitle = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n z-index: 1000;\n display: inline-flex;\n width: 50%;\n background: ", ";\n align-items: center;\n margin-left: 10px;\n margin-bottom: 10px;\n border-radius: 16px;\n padding: 10px;\n ", "\n"])), function (props) {
19
+ var _props$theme, _props$theme$colors;
20
+ return (_props$theme = props.theme) === null || _props$theme === void 0 ? void 0 : (_props$theme$colors = _props$theme.colors) === null || _props$theme$colors === void 0 ? void 0 : _props$theme$colors.backgroundPage;
21
+ }, function (props) {
22
+ var _props$theme2;
23
+ return ((_props$theme2 = props.theme) === null || _props$theme2 === void 0 ? void 0 : _props$theme2.rtl) && (0, _styledComponents.css)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n margin-right: 10px;\n margin-left: 0px;\n "])));
21
24
  });
22
25
  exports.BussinessTitle = BussinessTitle;
23
26
  var HeaderImage = _styledComponents.default.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n width: 20%;\n margin-top: auto;\n > img {\n width: 100%;\n height: 100%;\n }\n"])));
@@ -35,7 +38,9 @@ var BusinessLogo = function BusinessLogo(props) {
35
38
  exports.BusinessLogo = BusinessLogo;
36
39
  var Information = _styledComponents.default.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n display: inline-flex;\n flex-direction: column;\n flex: 1;\n > h5 {\n margin-block-end: 0.8em;\n margin-block-start: 0.8em;\n }\n > p {\n margin-block-end: 0;\n margin-block-start: 0.3em;\n > svg {\n vertical-align: middle;\n }\n }\n"])));
37
40
  exports.Information = Information;
38
- var BusinessContent = _styledComponents.default.div(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n padding: 0 10px;\n background: #FFF;\n @media(min-width: 768px){\n padding: 0 20px;\n padding-top: 30px;\n }\n"])));
41
+ var BusinessContent = _styledComponents.default.div(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n padding: 0 10px;\n background: ", ";\n @media(min-width: 768px){\n padding: 0 20px;\n padding-top: 30px;\n }\n"])), function (props) {
42
+ return props.theme.colors.backgroundPage;
43
+ });
39
44
  exports.BusinessContent = BusinessContent;
40
45
  var SectionTitle = _styledComponents.default.h3(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n font-weight: 500;\n font-size: 16px;\n color: ", ";\n margin: 10px 0 10px 0;\n"])), function (props) {
41
46
  return props.theme.colors.darkTextColor;
@@ -52,8 +57,8 @@ var ScheduleBlock = _styledComponents.default.div(_templateObject12 || (_templat
52
57
  }, function (props) {
53
58
  return props.theme.colors.darkTextColor;
54
59
  }, function (props) {
55
- var _props$theme2;
56
- return ((_props$theme2 = props.theme) === null || _props$theme2 === void 0 ? void 0 : _props$theme2.rtl) && (0, _styledComponents.css)(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n margin-left: 20px;\n margin-left: 0;\n "])));
60
+ var _props$theme3;
61
+ return ((_props$theme3 = props.theme) === null || _props$theme3 === void 0 ? void 0 : _props$theme3.rtl) && (0, _styledComponents.css)(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n margin-left: 20px;\n margin-left: 0;\n "])));
57
62
  });
58
63
  exports.ScheduleBlock = ScheduleBlock;
59
64
  var DeliveryInfo = _styledComponents.default.div(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n display: flex;\n flex-wrap: wrap;\n justify-content: flex-start;\n margin-top: 10px;\n\n h5 {\n font-size: 16px;\n }\n\n div {\n width: 100%;\n &:last-child {\n h5:not(:last-child) {\n margin-top: 0px;\n }\n }\n }\n\n @media (min-width: 769px) {\n flex-wrap: nowrap;\n div {\n width: 50%;\n &:last-child {\n h5:not(:last-child) {\n margin-top: 22.1776px;\n }\n }\n }\n }\n"])));
@@ -61,17 +66,17 @@ exports.DeliveryInfo = DeliveryInfo;
61
66
  var BusinessMediaContent = _styledComponents.default.div(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n padding-bottom: 20px;\n > div {\n display: flex;\n justify-content: flex-start;\n flex-wrap: wrap;\n\n > img,\n > iframe {\n object-fit: cover;\n border-radius: 10px;\n margin: 10px 10px;\n width: calc(100% - 12px);\n cursor: pointer;\n\n @media (min-width: 681px) {\n width: calc(50% - 20px);\n }\n\n @media (min-width: 993px) {\n width: calc(25% - 20px);\n }\n }\n }\n"])));
62
67
  exports.BusinessMediaContent = BusinessMediaContent;
63
68
  var ModalIcon = _styledComponents.default.span(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n display: flex;\n position: absolute;\n width: 30px;\n height: 30px;\n font-size: 30px;\n cursor: pointer;\n color: ", ";\n border-radius: 50%;\n left: 5px;\n top: 5px;\n z-index: 1;\n ", "\n @media (min-width: 578px){\n right: 10px;\n ", "\n }\n @media (min-width: 768px){\n left: 25px;\n top: 30px;\n ", "\n }\n"])), function (props) {
64
- var _props$theme3;
65
- return (_props$theme3 = props.theme) === null || _props$theme3 === void 0 ? void 0 : _props$theme3.colors.headingColor;
66
- }, function (props) {
67
69
  var _props$theme4;
68
- return ((_props$theme4 = props.theme) === null || _props$theme4 === void 0 ? void 0 : _props$theme4.rtl) && (0, _styledComponents.css)(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n left: 5px;\n right: initial;\n "])));
70
+ return (_props$theme4 = props.theme) === null || _props$theme4 === void 0 ? void 0 : _props$theme4.colors.headingColor;
69
71
  }, function (props) {
70
72
  var _props$theme5;
71
- return ((_props$theme5 = props.theme) === null || _props$theme5 === void 0 ? void 0 : _props$theme5.rtl) && (0, _styledComponents.css)(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["\n left: 10px;\n right: initial;\n "])));
73
+ return ((_props$theme5 = props.theme) === null || _props$theme5 === void 0 ? void 0 : _props$theme5.rtl) && (0, _styledComponents.css)(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n left: 5px;\n right: initial;\n "])));
72
74
  }, function (props) {
73
75
  var _props$theme6;
74
- return ((_props$theme6 = props.theme) === null || _props$theme6 === void 0 ? void 0 : _props$theme6.rtl) && (0, _styledComponents.css)(_templateObject19 || (_templateObject19 = _taggedTemplateLiteral(["\n right: 25px;\n left: initial;\n "])));
76
+ return ((_props$theme6 = props.theme) === null || _props$theme6 === void 0 ? void 0 : _props$theme6.rtl) && (0, _styledComponents.css)(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["\n left: 10px;\n right: initial;\n "])));
77
+ }, function (props) {
78
+ var _props$theme7;
79
+ return ((_props$theme7 = props.theme) === null || _props$theme7 === void 0 ? void 0 : _props$theme7.rtl) && (0, _styledComponents.css)(_templateObject19 || (_templateObject19 = _taggedTemplateLiteral(["\n right: 25px;\n left: initial;\n "])));
75
80
  });
76
81
  exports.ModalIcon = ModalIcon;
77
82
  var Description = _styledComponents.default.p(_templateObject20 || (_templateObject20 = _taggedTemplateLiteral(["\n margin: 0 10px;\n"])));
@@ -81,8 +86,8 @@ exports.ImageContainer = ImageContainer;
81
86
  var BusinessTitle = _styledComponents.default.h2(_templateObject22 || (_templateObject22 = _taggedTemplateLiteral(["\n font-weight: 600;\n font-size: 24px;\n color: ", ";\n text-align: center;\n margin-top: 0;\n margin-bottom: 0;\n padding-left: 30px;\n padding-top: 25px;\n ", "\n"])), function (props) {
82
87
  return props.theme.colors.darkTextColor;
83
88
  }, function (props) {
84
- var _props$theme7;
85
- return ((_props$theme7 = props.theme) === null || _props$theme7 === void 0 ? void 0 : _props$theme7.rtl) && (0, _styledComponents.css)(_templateObject23 || (_templateObject23 = _taggedTemplateLiteral(["\n padding-right: 30px;\n padding-left: 0;\n "])));
89
+ var _props$theme8;
90
+ return ((_props$theme8 = props.theme) === null || _props$theme8 === void 0 ? void 0 : _props$theme8.rtl) && (0, _styledComponents.css)(_templateObject23 || (_templateObject23 = _taggedTemplateLiteral(["\n padding-right: 30px;\n padding-left: 0;\n "])));
86
91
  });
87
92
  exports.BusinessTitle = BusinessTitle;
88
93
  var BusinessAddress = _styledComponents.default.p(_templateObject24 || (_templateObject24 = _taggedTemplateLiteral(["\n font-size: 14px;\n color: ", ";\n margin: 15px 0;\n"])), function (props) {
@@ -23,6 +23,7 @@ var _swiper = _interopRequireWildcard(require("swiper"));
23
23
  require("swiper/swiper-bundle.min.css");
24
24
  require("swiper/swiper.min.css");
25
25
  var _utils = require("../../../../../utils");
26
+ var _CgRadioCheck = _interopRequireDefault(require("@meronex/icons/cg/CgRadioCheck"));
26
27
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
27
28
  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); }
28
29
  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; }
@@ -52,12 +53,18 @@ var BusinessPreorderUI = function BusinessPreorderUI(props) {
52
53
  handleAsap = props.handleAsap,
53
54
  isProfessional = props.isProfessional,
54
55
  isDisabled = props.isDisabled,
55
- maxDays = props.maxDays;
56
+ maxDays = props.maxDays,
57
+ hoursList = props.hoursList,
58
+ cateringPreorder = props.cateringPreorder,
59
+ preorderLeadTime = props.preorderLeadTime,
60
+ getActualSchedule = props.getActualSchedule;
56
61
  var _useLocation = (0, _reactRouterDom.useLocation)(),
57
62
  pathname = _useLocation.pathname;
58
63
  var _useUtils = (0, _orderingComponentsExternal.useUtils)(),
59
64
  _useUtils2 = _slicedToArray(_useUtils, 1),
60
- optimizeImage = _useUtils2[0].optimizeImage;
65
+ _useUtils2$ = _useUtils2[0],
66
+ optimizeImage = _useUtils2$.optimizeImage,
67
+ parseTime = _useUtils2$.parseTime;
61
68
  var theme = (0, _styledComponents.useTheme)();
62
69
  var _useConfig = (0, _orderingComponentsExternal.useConfig)(),
63
70
  _useConfig2 = _slicedToArray(_useConfig, 1),
@@ -126,20 +133,51 @@ var BusinessPreorderUI = function BusinessPreorderUI(props) {
126
133
  return times;
127
134
  };
128
135
  (0, _react.useEffect)(function () {
129
- var selectedMenu = menu ? menu !== null && menu !== void 0 && menu.use_business_schedule ? business : menu : business;
130
- var _times = getTimeList(dateSelected, selectedMenu);
131
- setTimeList(_times);
132
- }, [dateSelected, menu, business]);
136
+ if (cateringPreorder) {
137
+ var _Object$keys;
138
+ var schedule = business && getActualSchedule();
139
+ if (!schedule && cateringPreorder && ((_Object$keys = Object.keys(business)) === null || _Object$keys === void 0 ? void 0 : _Object$keys.length) > 0) {
140
+ setIsEnabled(false);
141
+ return;
142
+ }
143
+ var _timeLists = hoursList.filter(function (hour) {
144
+ var _Object$keys2, _schedule$lapses;
145
+ return (((_Object$keys2 = Object.keys(business || {})) === null || _Object$keys2 === void 0 ? void 0 : _Object$keys2.length) === 0 || (schedule === null || schedule === void 0 ? void 0 : (_schedule$lapses = schedule.lapses) === null || _schedule$lapses === void 0 ? void 0 : _schedule$lapses.some(function (lapse) {
146
+ return (0, _moment2.default)(dateSelected + " ".concat(hour.startTime)) >= (0, _moment2.default)(dateSelected + " ".concat(lapse.open.hour, ":").concat(lapse.open.minute)).add(preorderLeadTime, 'minutes') && (0, _moment2.default)(dateSelected + " ".concat(hour.endTime)) <= (0, _moment2.default)(dateSelected + " ".concat(lapse.close.hour, ":").concat(lapse.close.minute));
147
+ }))) && (0, _moment2.default)(dateSelected + " ".concat(hour.startTime)) < (0, _moment2.default)(dateSelected + " ".concat(hour.endTime)) && ((0, _moment2.default)().add(preorderLeadTime, 'minutes') < (0, _moment2.default)(dateSelected + " ".concat(hour.startTime)) || !cateringPreorder);
148
+ }).map(function (hour) {
149
+ return {
150
+ value: hour.startTime,
151
+ text: is12Hours ? hour.startTime.includes('12') ? "".concat(hour.startTime, "PM") : parseTime((0, _moment2.default)(hour.startTime, 'HH:mm'), {
152
+ outputFormat: 'hh:mma'
153
+ }) : parseTime((0, _moment2.default)(hour.startTime, 'HH:mm'), {
154
+ outputFormat: 'HH:mm'
155
+ }),
156
+ endText: is12Hours ? hour.endTime.includes('12') ? "".concat(hour.endTime, "PM") : parseTime((0, _moment2.default)(hour.endTime, 'HH:mm'), {
157
+ outputFormat: 'hh:mma'
158
+ }) : parseTime((0, _moment2.default)(hour.endTime, 'HH:mm'), {
159
+ outputFormat: 'HH:mm'
160
+ })
161
+ };
162
+ });
163
+ setIsEnabled(true);
164
+ setTimeList(_timeLists);
165
+ } else {
166
+ var selectedMenu = menu ? menu !== null && menu !== void 0 && menu.use_business_schedule ? business : menu : business;
167
+ var _times = getTimeList(dateSelected, selectedMenu);
168
+ setTimeList(_times);
169
+ }
170
+ }, [dateSelected, menu, business, cateringPreorder, hoursList]);
133
171
  (0, _react.useEffect)(function () {
134
172
  if (type === 'business_hours') setMenu(null);
135
173
  }, [type]);
136
174
  (0, _react.useEffect)(function () {
137
- if (pathname.includes('store') || isProfessional) return;
175
+ if (pathname.includes('store') || isProfessional || cateringPreorder) return;
138
176
  handleAsap && handleAsap();
139
177
  }, []);
140
178
  return /*#__PURE__*/_react.default.createElement(_styles.BusinessPreorderContainer, null, !isProfessional && /*#__PURE__*/_react.default.createElement(_styles.Title, null, t('PREORDER', 'Preorder')), !isProfessional && /*#__PURE__*/_react.default.createElement(_styles.LogoWrapper, null, /*#__PURE__*/_react.default.createElement(_styles.BusinessLogo, {
141
179
  bgimage: optimizeImage((business === null || business === void 0 ? void 0 : business.logo) || ((_theme$images = theme.images) === null || _theme$images === void 0 ? void 0 : (_theme$images$dummies = _theme$images.dummies) === null || _theme$images$dummies === void 0 ? void 0 : _theme$images$dummies.businessLogo), 'h_200,c_limit')
142
- }), /*#__PURE__*/_react.default.createElement("p", null, business.name)), !isProfessional && isPreOrderSetting && /*#__PURE__*/_react.default.createElement(_styles.PreorderTypeWrapper, null, /*#__PURE__*/_react.default.createElement("p", null, t('PREORDER_TYPE', 'Preorder type')), /*#__PURE__*/_react.default.createElement(_styles.SelectWrapper, null, /*#__PURE__*/_react.default.createElement(_Select.Select, {
180
+ }), /*#__PURE__*/_react.default.createElement("p", null, business.name)), !isProfessional && isPreOrderSetting && !cateringPreorder && /*#__PURE__*/_react.default.createElement(_styles.PreorderTypeWrapper, null, /*#__PURE__*/_react.default.createElement("p", null, t('PREORDER_TYPE', 'Preorder type')), /*#__PURE__*/_react.default.createElement(_styles.SelectWrapper, null, /*#__PURE__*/_react.default.createElement(_Select.Select, {
143
181
  defaultValue: type,
144
182
  options: preOrderType,
145
183
  placeholder: t('SELECT_A_TYPE', 'Select a type'),
@@ -198,8 +236,11 @@ var BusinessPreorderUI = function BusinessPreorderUI(props) {
198
236
  },
199
237
  isDisabled: isDisabled,
200
238
  isProfessional: isProfessional,
201
- busyTime: isProfessional && isBusyTime(business, getMomentTime(time.value))
202
- }, /*#__PURE__*/_react.default.createElement("span", null, time.text));
239
+ busyTime: isProfessional && isBusyTime(business, getMomentTime(time.value)),
240
+ cateringPreorder: cateringPreorder
241
+ }, /*#__PURE__*/_react.default.createElement("span", null, cateringPreorder && /*#__PURE__*/_react.default.createElement(_styles.CheckIcon, null, timeSelected === time.value ? /*#__PURE__*/_react.default.createElement(_styles.CheckedIcon, {
242
+ cateringPreorder: cateringPreorder
243
+ }) : /*#__PURE__*/_react.default.createElement(_CgRadioCheck.default, null)), /*#__PURE__*/_react.default.createElement("p", null, time.text, " ", cateringPreorder && "- ".concat(time.endText))));
203
244
  })) : /*#__PURE__*/_react.default.createElement(_styles.ClosedBusinessMsg, null, !isProfessional ? t('ERROR_ADD_PRODUCT_BUSINESS_CLOSED', 'The business is closed at the moment') : t('PROFESSIONAL_NOT_AVAILABLE', 'Professional is not available at the moment')))), !isPreOrderSetting && !isProfessional && /*#__PURE__*/_react.default.createElement(_styles.ClosedBusinessMsg, null, t('ERROR_ADD_PRODUCT_BUSINESS_CLOSED', 'The business is closed at the moment')), showButton && /*#__PURE__*/_react.default.createElement(_styles.ButtonWrapper, null, /*#__PURE__*/_react.default.createElement(_Buttons.Button, {
204
245
  color: "primary",
205
246
  onClick: goToBusinessPage,
@@ -4,10 +4,10 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.TypeContent = exports.Title = exports.TimeListWrapper = exports.TimeItem = exports.SelectWrapper = exports.PreorderTypeWrapper = exports.OrderTimeWrapper = exports.MonthYearLayer = exports.LogoWrapper = exports.Layer = exports.DaysSwiper = exports.DayNumber = exports.DayName = exports.Day = exports.DateWrapper = exports.ClosedBusinessMsg = exports.ButtonWrapper = exports.BusinessPreorderContainer = exports.BusinessLogo = void 0;
7
+ exports.TypeContent = exports.Title = exports.TimeListWrapper = exports.TimeItem = exports.SelectWrapper = exports.PreorderTypeWrapper = exports.OrderTimeWrapper = exports.MonthYearLayer = exports.LogoWrapper = exports.Layer = exports.DaysSwiper = exports.DayNumber = exports.DayName = exports.Day = exports.DateWrapper = exports.ClosedBusinessMsg = exports.CheckedIcon = exports.CheckIcon = exports.ButtonWrapper = exports.BusinessPreorderContainer = exports.BusinessLogo = void 0;
8
8
  var _styledComponents = _interopRequireWildcard(require("styled-components"));
9
9
  var _react = _interopRequireDefault(require("react"));
10
- 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
+ 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, _templateObject31, _templateObject32, _templateObject33, _templateObject34;
11
11
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
12
  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); }
13
13
  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; }
@@ -52,29 +52,24 @@ var ButtonWrapper = _styledComponents.default.div(_templateObject9 || (_template
52
52
  exports.ButtonWrapper = ButtonWrapper;
53
53
  var TimeListWrapper = _styledComponents.default.div(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n display: flex;\n flex-wrap: wrap;\n margin-left: -12px;\n width: calc(100% + 24px);\n margin-top: 30px;\n max-height: 250px;\n overflow: auto;\n"])));
54
54
  exports.TimeListWrapper = TimeListWrapper;
55
- var TimeItem = _styledComponents.default.div(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n cursor: pointer;\n display: flex;\n justify-content: center;\n align-items: center;\n ", "\n border-radius: 7.6px;\n padding: 5px 15px;\n margin: 12px;\n width: calc(50% - 24px);\n min-width: calc(50% - 24px);\n box-sizing: border-box;\n user-select: none;\n\n ", "\n\n ", "\n \n ", "\n\n span {\n font-size: 14px;\n }\n\n @media (min-width: 400px) {\n width: calc(33.33% - 24px);\n min-width: calc(33.33% - 24px);\n }\n\n @media (min-width: 576px) {\n width: calc(25% - 24px);\n min-width: calc(25% - 24px);\n }\n\n @media (min-width: 769px) {\n width: calc(16.66% - 24px);\n min-width: calc(16.66% - 24px);\n }\n"])), function (_ref) {
56
- var isProfessional = _ref.isProfessional;
57
- return isProfessional ? (0, _styledComponents.css)(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n background: ", ";\n color: ", ";\n "])), function (props) {
58
- return props.theme.colors.primaryContrast;
59
- }, function (props) {
55
+ var TimeItem = _styledComponents.default.div(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n cursor: pointer;\n display: flex;\n span {\n font-size: 14px;\n white-space: nowrap;\n }\n ", "\n", "\n"])), function (_ref) {
56
+ var active = _ref.active;
57
+ return active && (0, _styledComponents.css)(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n background: #F5F9FF;\n color: ", ";\n "])), function (props) {
60
58
  return props.theme.colors.primary;
61
- }) : (0, _styledComponents.css)(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n background: ", ";\n "])), function (props) {
62
- return props.theme.colors.gray200;
63
59
  });
64
60
  }, function (_ref2) {
65
- var active = _ref2.active;
66
- return active && (0, _styledComponents.css)(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n background: #F5F9FF;\n color: ", ";\n "])), function (props) {
67
- return props.theme.colors.primary;
68
- });
69
- }, function (_ref3) {
70
- var isDisabled = _ref3.isDisabled;
71
- return isDisabled && (0, _styledComponents.css)(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n pointer-events: none;\n "])));
72
- }, function (_ref4) {
73
- var busyTime = _ref4.busyTime;
74
- return busyTime && (0, _styledComponents.css)(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n background: ", ";\n color: ", ";\n "])), function (props) {
75
- return props.theme.colors.gray200;
76
- }, function (props) {
77
- return props.theme.colors.lightGray;
61
+ var cateringPreorder = _ref2.cateringPreorder;
62
+ return cateringPreorder ? (0, _styledComponents.css)(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n background: ", ";\n width: 100%;\n min-width: 100%;\n height: 50px;\n \n span {\n font-size: 18px;\n display: flex;\n align-items: center;\n margin: 10px 0;\n margin-left: 15px;\n p{\n position: relative;\n bottom: 2px;\n }\n }\n ", "\n "])), function (props) {
63
+ var _props$theme, _props$theme$colors;
64
+ return (_props$theme = props.theme) === null || _props$theme === void 0 ? void 0 : (_props$theme$colors = _props$theme.colors) === null || _props$theme$colors === void 0 ? void 0 : _props$theme$colors.backgroundPage;
65
+ }, function (_ref3) {
66
+ var active = _ref3.active;
67
+ return active && (0, _styledComponents.css)(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n background: #F5F9FF;\n color: ", ";\n span {\n p{\n bottom: 0;\n margin-left: 2px;\n }\n }\n "])), function (props) {
68
+ return props.theme.colors.primary;
69
+ });
70
+ }) : (0, _styledComponents.css)(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n justify-content: center;\n align-items: center;\n background: #E9ECEF;\n border-radius: 7.6px;\n padding: 5px 15px;\n margin: 12px;\n width: calc(50% - 24px);\n min-width: calc(50% - 24px);\n box-sizing: border-box;\n user-select: none;\n \n @media (min-width: 400px) {\n width: calc(33.33% - 24px);\n min-width: calc(33.33% - 24px);\n }\n \n @media (min-width: 576px) {\n width: calc(25% - 24px);\n min-width: calc(25% - 24px);\n }\n \n @media (min-width: 769px) {\n width: calc(33.33% - 24px);\n min-width: calc(33.33% - 24px);\n ", "\n }\n "])), function (_ref4) {
71
+ var isAppoint = _ref4.isAppoint;
72
+ return isAppoint && (0, _styledComponents.css)(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n width: calc(33.33% - 24px);\n min-width: calc(33.33% - 24px);\n span {\n font-size: 12px;\n }\n "])));
78
73
  });
79
74
  });
80
75
  exports.TimeItem = TimeItem;
@@ -93,8 +88,8 @@ var Layer = _styledComponents.default.div(_templateObject22 || (_templateObject2
93
88
  var height = _ref6.height;
94
89
  return height || '100vh';
95
90
  }, function (props) {
96
- var _props$theme;
97
- return (_props$theme = props.theme) !== null && _props$theme !== void 0 && _props$theme.rtl ? (0, _styledComponents.css)(_templateObject24 || (_templateObject24 = _taggedTemplateLiteral(["\n right: 0;\n "]))) : (0, _styledComponents.css)(_templateObject25 || (_templateObject25 = _taggedTemplateLiteral(["\n left: 0;\n "])));
91
+ var _props$theme2;
92
+ return (_props$theme2 = props.theme) !== null && _props$theme2 !== void 0 && _props$theme2.rtl ? (0, _styledComponents.css)(_templateObject24 || (_templateObject24 = _taggedTemplateLiteral(["\n right: 0;\n "]))) : (0, _styledComponents.css)(_templateObject25 || (_templateObject25 = _taggedTemplateLiteral(["\n left: 0;\n "])));
98
93
  });
99
94
  exports.Layer = Layer;
100
95
  var Day = _styledComponents.default.div(_templateObject26 || (_templateObject26 = _taggedTemplateLiteral(["\n display: flex;\n flex-grow: 1;\n color: #B1BCCC;\n cursor: pointer;\n padding: 14px 0 13px 0;\n flex-direction: column;\n align-items: center;\n transition: background-color .16s ease -0.01s;\n\n ", "\n\n :hover {\n background-color: #e9ecef;\n }\n"])), function (_ref7) {
@@ -107,4 +102,16 @@ exports.DayName = DayName;
107
102
  var DayNumber = _styledComponents.default.div(_templateObject29 || (_templateObject29 = _taggedTemplateLiteral(["\n display: flex;\n font-weight: 500;\n font-size: 20px;\n line-height: 30px;\n"])));
108
103
  exports.DayNumber = DayNumber;
109
104
  var ClosedBusinessMsg = _styledComponents.default.div(_templateObject30 || (_templateObject30 = _taggedTemplateLiteral(["\n text-align: center;\n font-size: 16px;\n width: 100%;\n"])));
110
- exports.ClosedBusinessMsg = ClosedBusinessMsg;
105
+ exports.ClosedBusinessMsg = ClosedBusinessMsg;
106
+ var CheckIcon = _styledComponents.default.div(_templateObject31 || (_templateObject31 = _taggedTemplateLiteral(["\n margin-right: 20px;\n svg {\n width: 24px;\n height: 24px;\n }\n"])));
107
+ exports.CheckIcon = CheckIcon;
108
+ var CheckedIcon = _styledComponents.default.div(_templateObject32 || (_templateObject32 = _taggedTemplateLiteral(["\n border-radius: 50%;\n width: 20px;\n min-width: 20px;\n height: 20px;\n box-sizing: border-box;\n border: 6px solid ", ";\n margin: 2px 12px 2px 2px;\n ", "\n ", "\n"])), function (props) {
109
+ var _props$theme$colors2;
110
+ return (_props$theme$colors2 = props.theme.colors) === null || _props$theme$colors2 === void 0 ? void 0 : _props$theme$colors2.primary;
111
+ }, function (props) {
112
+ return props.theme.rtl && (0, _styledComponents.css)(_templateObject33 || (_templateObject33 = _taggedTemplateLiteral(["\n margin: 2px 2px 2px 12px;\n "])));
113
+ }, function (_ref8) {
114
+ var cateringPreorder = _ref8.cateringPreorder;
115
+ return cateringPreorder && (0, _styledComponents.css)(_templateObject34 || (_templateObject34 = _taggedTemplateLiteral(["\n width: 21px;\n min-width: 21px;\n height: 21px;\n margin: 0;\n margin-left: 1px;\n "])));
116
+ });
117
+ exports.CheckedIcon = CheckedIcon;
@@ -33,7 +33,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
33
33
  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; } }
34
34
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
35
35
  var BusinessProductsCategoriesUI = function BusinessProductsCategoriesUI(props) {
36
- var _orderingTheme$theme, _orderingTheme$theme$, _orderingTheme$theme$2, _orderingTheme$theme$3, _orderingTheme$theme$4, _props$beforeElements, _props$beforeComponen, _props$afterComponent, _props$afterElements;
36
+ var _theme$header, _theme$header$compone, _theme$header$compone2, _theme$header$compone3, _props$beforeElements, _props$beforeComponen, _props$afterComponent, _props$afterElements;
37
37
  var isSkeleton = props.isSkeleton,
38
38
  categories = props.categories,
39
39
  featured = props.featured,
@@ -45,9 +45,6 @@ var BusinessProductsCategoriesUI = function BusinessProductsCategoriesUI(props)
45
45
  isProfessional = props.isProfessional;
46
46
  var theme = (0, _styledComponents.useTheme)();
47
47
  var windowSize = (0, _useWindowSize.useWindowSize)();
48
- var _useOrderingTheme = (0, _orderingComponentsExternal.useOrderingTheme)(),
49
- _useOrderingTheme2 = _slicedToArray(_useOrderingTheme, 1),
50
- orderingTheme = _useOrderingTheme2[0];
51
48
  var _useState = (0, _react.useState)({
52
49
  id: null
53
50
  }),
@@ -55,7 +52,7 @@ var BusinessProductsCategoriesUI = function BusinessProductsCategoriesUI(props)
55
52
  selectedCategory = _useState2[0],
56
53
  setSelectedCateogry = _useState2[1];
57
54
  var scrollTopSpan = 60;
58
- var isChew = (orderingTheme === null || orderingTheme === void 0 ? void 0 : (_orderingTheme$theme = orderingTheme.theme) === null || _orderingTheme$theme === void 0 ? void 0 : (_orderingTheme$theme$ = _orderingTheme$theme.header) === null || _orderingTheme$theme$ === void 0 ? void 0 : (_orderingTheme$theme$2 = _orderingTheme$theme$.components) === null || _orderingTheme$theme$2 === void 0 ? void 0 : (_orderingTheme$theme$3 = _orderingTheme$theme$2.layout) === null || _orderingTheme$theme$3 === void 0 ? void 0 : (_orderingTheme$theme$4 = _orderingTheme$theme$3.type) === null || _orderingTheme$theme$4 === void 0 ? void 0 : _orderingTheme$theme$4.toLowerCase()) === 'chew';
55
+ var isChew = (theme === null || theme === void 0 ? void 0 : (_theme$header = theme.header) === null || _theme$header === void 0 ? void 0 : (_theme$header$compone = _theme$header.components) === null || _theme$header$compone === void 0 ? void 0 : (_theme$header$compone2 = _theme$header$compone.layout) === null || _theme$header$compone2 === void 0 ? void 0 : (_theme$header$compone3 = _theme$header$compone2.type) === null || _theme$header$compone3 === void 0 ? void 0 : _theme$header$compone3.toLowerCase()) === 'chew';
59
56
  var handleChangeCategory = function handleChangeCategory(category) {
60
57
  var _document$getElementB, _document$getElementB2;
61
58
  var isBlockScroll = window.location.search.includes('category') && window.location.search.includes('product');
@@ -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, _theme$business_view, _theme$business_view$, _theme$business_view$2, _theme$business_view2, _theme$business_view3, _theme$business_view4, _theme$business_view5, _theme$business_view6, _theme$business_view7, _theme$business_view8, _theme$business_view9, _theme$business_view10, _theme$business_view11, _theme$header, _theme$header$compone, _theme$header$compone2, _theme$header$compone3, _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$business_view2, _theme$business_view3, _theme$business_view4, _theme$business_view5, _theme$business_view6, _theme$business_view7, _theme$business_view8, _theme$business_view9, _theme$business_view10, _theme$business_view11, _theme$header, _theme$header$compone, _theme$header$compone2, _theme$header$compone3, _theme$defaultLanguag, _theme$defaultLanguag2, _theme$defaultLanguag3, _theme$defaultLanguag4, _theme$defaultLanguag5, _theme$defaultLanguag6, _currentCart$taxes, _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,
@@ -183,6 +183,13 @@ var BusinessProductsListingUI = function BusinessProductsListingUI(props) {
183
183
  content: t('A_to_Z', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag5 = theme.defaultLanguages) === null || _theme$defaultLanguag5 === void 0 ? void 0 : _theme$defaultLanguag5.A_to_Z) || 'A-Z'),
184
184
  showOnSelected: t('A_to_Z', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag6 = theme.defaultLanguages) === null || _theme$defaultLanguag6 === void 0 ? void 0 : _theme$defaultLanguag6.A_to_Z) || 'A-Z')
185
185
  }];
186
+ var subtotalWithTaxes = currentCart === null || currentCart === void 0 ? void 0 : (_currentCart$taxes = currentCart.taxes) === null || _currentCart$taxes === void 0 ? void 0 : _currentCart$taxes.reduce(function (acc, item) {
187
+ if ((item === null || item === void 0 ? void 0 : item.type) === 1) {
188
+ var _item$summary;
189
+ return acc = acc + (item === null || item === void 0 ? void 0 : (_item$summary = item.summary) === null || _item$summary === void 0 ? void 0 : _item$summary.tax);
190
+ }
191
+ return acc = acc;
192
+ }, currentCart === null || currentCart === void 0 ? void 0 : currentCart.subtotal);
186
193
  var handler = function handler() {
187
194
  setOpenBusinessInformation(true);
188
195
  };
@@ -512,13 +519,13 @@ var BusinessProductsListingUI = function BusinessProductsListingUI(props) {
512
519
  btnTitle: t('SEARCH_REDIRECT', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag11 = theme.defaultLanguages) === null || _theme$defaultLanguag11 === void 0 ? void 0 : _theme$defaultLanguag11.SEARCH_REDIRECT) || 'Go to Businesses'),
513
520
  onClickButton: handleSearchRedirect
514
521
  })), (currentCart === null || currentCart === void 0 ? void 0 : (_currentCart$products3 = currentCart.products) === null || _currentCart$products3 === void 0 ? void 0 : _currentCart$products3.length) > 0 && auth && !isCartOpen && showViewOrderButton && !checkoutMultiBusinessEnabled && /*#__PURE__*/_react.default.createElement(_FloatingButton.FloatingButton, {
515
- btnText: !(currentCart !== null && currentCart !== void 0 && currentCart.valid_maximum) ? "".concat(t('MAXIMUM_SUBTOTAL_ORDER', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag12 = theme.defaultLanguages) === null || _theme$defaultLanguag12 === void 0 ? void 0 : _theme$defaultLanguag12.MAXIMUM_SUBTOTAL_ORDER) || 'Maximum subtotal order'), ": ").concat(parsePrice(currentCart === null || currentCart === void 0 ? void 0 : currentCart.maximum)) : !(currentCart !== null && currentCart !== void 0 && currentCart.valid_minimum) && !((currentCart === null || currentCart === void 0 ? void 0 : currentCart.discount_type) === 1 && (currentCart === null || currentCart === void 0 ? void 0 : currentCart.discount_rate) === 100) ? "".concat(t('MINIMUN_SUBTOTAL_ORDER', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag13 = theme.defaultLanguages) === null || _theme$defaultLanguag13 === void 0 ? void 0 : _theme$defaultLanguag13.MINIMUN_SUBTOTAL_ORDER) || 'Minimum subtotal order:'), " ").concat(parsePrice(currentCart === null || currentCart === void 0 ? void 0 : currentCart.minimum)) : !openUpselling !== canOpenUpselling ? t('VIEW_ORDER', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag14 = theme.defaultLanguages) === null || _theme$defaultLanguag14 === void 0 ? void 0 : _theme$defaultLanguag14.VIEW_ORDER) || 'View Order') : t('LOADING', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag15 = theme.defaultLanguages) === null || _theme$defaultLanguag15 === void 0 ? void 0 : _theme$defaultLanguag15.LOADING) || 'Loading'),
516
- isSecondaryBtn: !(currentCart !== null && currentCart !== void 0 && currentCart.valid_maximum) || !(currentCart !== null && currentCart !== void 0 && currentCart.valid_minimum) && !((currentCart === null || currentCart === void 0 ? void 0 : currentCart.discount_type) === 1 && (currentCart === null || currentCart === void 0 ? void 0 : currentCart.discount_rate) === 100),
522
+ btnText: !(currentCart !== null && currentCart !== void 0 && currentCart.valid_maximum) ? "".concat(t('MAXIMUM_SUBTOTAL_ORDER', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag12 = theme.defaultLanguages) === null || _theme$defaultLanguag12 === void 0 ? void 0 : _theme$defaultLanguag12.MAXIMUM_SUBTOTAL_ORDER) || 'Maximum subtotal order'), ": ").concat(parsePrice(currentCart === null || currentCart === void 0 ? void 0 : currentCart.maximum)) : subtotalWithTaxes < (currentCart === null || currentCart === void 0 ? void 0 : currentCart.minimum) ? "".concat(t('MINIMUN_SUBTOTAL_ORDER', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag13 = theme.defaultLanguages) === null || _theme$defaultLanguag13 === void 0 ? void 0 : _theme$defaultLanguag13.MINIMUN_SUBTOTAL_ORDER) || 'Minimum subtotal order:'), " ").concat(parsePrice(currentCart === null || currentCart === void 0 ? void 0 : currentCart.minimum)) : !openUpselling !== canOpenUpselling ? t('VIEW_ORDER', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag14 = theme.defaultLanguages) === null || _theme$defaultLanguag14 === void 0 ? void 0 : _theme$defaultLanguag14.VIEW_ORDER) || 'View Order') : t('LOADING', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag15 = theme.defaultLanguages) === null || _theme$defaultLanguag15 === void 0 ? void 0 : _theme$defaultLanguag15.LOADING) || 'Loading'),
523
+ isSecondaryBtn: !(currentCart !== null && currentCart !== void 0 && currentCart.valid_maximum) || subtotalWithTaxes < (currentCart === null || currentCart === void 0 ? void 0 : currentCart.minimum),
517
524
  btnValue: currentCart === null || currentCart === void 0 ? void 0 : (_currentCart$products4 = currentCart.products) === null || _currentCart$products4 === void 0 ? void 0 : _currentCart$products4.length,
518
525
  handleClick: function handleClick() {
519
526
  return setOpenUpselling(true);
520
527
  },
521
- disabled: openUpselling || !(currentCart !== null && currentCart !== void 0 && currentCart.valid_maximum) || !(currentCart !== null && currentCart !== void 0 && currentCart.valid_minimum) && !((currentCart === null || currentCart === void 0 ? void 0 : currentCart.discount_type) === 1 && (currentCart === null || currentCart === void 0 ? void 0 : currentCart.discount_rate) === 100)
528
+ disabled: openUpselling || !(currentCart !== null && currentCart !== void 0 && currentCart.valid_maximum) || subtotalWithTaxes < (currentCart === null || currentCart === void 0 ? void 0 : currentCart.minimum)
522
529
  }), (windowSize.width < 1000 || windowSize.height < 600) && (currentCart === null || currentCart === void 0 ? void 0 : (_currentCart$products5 = currentCart.products) === null || _currentCart$products5 === void 0 ? void 0 : _currentCart$products5.length) > 0 && /*#__PURE__*/_react.default.createElement(_styles.MobileCartViewWrapper, null, /*#__PURE__*/_react.default.createElement("span", null, parsePrice(currentCart === null || currentCart === void 0 ? void 0 : currentCart.total)), /*#__PURE__*/_react.default.createElement(_Buttons.Button, {
523
530
  color: "primary",
524
531
  onClick: function onClick() {
@@ -12,10 +12,9 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
12
12
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
13
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
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;
15
+ }, function (props) {
16
+ var _props$theme, _props$theme$colors;
17
+ return (_props$theme = props.theme) === null || _props$theme === void 0 ? void 0 : (_props$theme$colors = _props$theme.colors) === null || _props$theme$colors === void 0 ? void 0 : _props$theme$colors.backgroundPage;
19
18
  });
20
19
  exports.ProductsContainer = ProductsContainer;
21
20
  var ProductLoading = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n width: 100%;\n display: flex;\n flex-direction: column;\n"])));
@@ -24,11 +23,11 @@ var SkeletonItem = _styledComponents.default.div(_templateObject3 || (_templateO
24
23
  exports.SkeletonItem = SkeletonItem;
25
24
  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"])));
26
25
  exports.MobileCartViewWrapper = MobileCartViewWrapper;
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;
26
+ 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) {
27
+ var maxHeight = _ref.maxHeight;
29
28
  return "".concat(maxHeight, "px");
30
- }, function (_ref3) {
31
- var isModal = _ref3.isModal;
29
+ }, function (_ref2) {
30
+ var isModal = _ref2.isModal;
32
31
  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 "])));
33
32
  });
34
33
  exports.BusinessCartContent = BusinessCartContent;
@@ -45,10 +44,10 @@ exports.EmptyBtnWrapper = EmptyBtnWrapper;
45
44
  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: 10001;\n width: 100vw;\n background-color: ", ";\n height: 56px;\n display: flex;\n align-items: center;\n ", "\n @media (min-width: 993px){\n width: 100px;\n ", "\n }\n }\n .fixed-arrow-width{\n width: 100vw; \n }\n"])), function (props) {
46
45
  return props.theme.colors.backgroundPage;
47
46
  }, 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
- }, function (_ref4) {
51
- var useFullWidth = _ref4.useFullWidth;
47
+ var _props$theme2;
48
+ return (_props$theme2 = props.theme) !== null && _props$theme2 !== void 0 && _props$theme2.rtl ? (0, _styledComponents.css)(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n padding-right: 10px;\n "]))) : (0, _styledComponents.css)(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n padding-left: 10px;\n "])));
49
+ }, function (_ref3) {
50
+ var useFullWidth = _ref3.useFullWidth;
52
51
  return useFullWidth && (0, _styledComponents.css)(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n width: 100vw;\n "])));
53
52
  });
54
53
  exports.HeaderContent = HeaderContent;
@@ -53,7 +53,7 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
53
53
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
54
54
  var PIXELS_TO_SCROLL = 300;
55
55
  var BusinessesListingUI = function BusinessesListingUI(props) {
56
- 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, _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$, _orderState$options9, _orderState$options9$, _configs$advanced_bus2, _citiesState$cities7, _citiesState$cities8, _citiesState$cities8$, _orderState$options11, _orderState$options12, _businessesList$busin6, _businessesList$busin7, _orderState$options15;
56
+ 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, _theme$header, _theme$header$compone, _theme$header$compone2, _theme$header$compone3, _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, _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$, _orderState$options9, _orderState$options9$, _configs$advanced_bus2, _citiesState$cities7, _citiesState$cities8, _citiesState$cities8$, _orderState$options11, _orderState$options12, _businessesList$busin6, _businessesList$busin7, _orderState$options15;
57
57
  var businessesList = props.businessesList,
58
58
  paginationProps = props.paginationProps,
59
59
  searchValue = props.searchValue,
@@ -84,9 +84,6 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
84
84
  _useConfig2 = _slicedToArray(_useConfig, 1),
85
85
  configs = _useConfig2[0].configs;
86
86
  var windowSize = (0, _useWindowSize.useWindowSize)();
87
- var _useOrderingTheme = (0, _orderingComponentsExternal.useOrderingTheme)(),
88
- _useOrderingTheme2 = _slicedToArray(_useOrderingTheme, 1),
89
- orderingTheme = _useOrderingTheme2[0];
90
87
  var theme = (0, _styledComponents.useTheme)();
91
88
  var _useState = (0, _react.useState)({
92
89
  listOpen: false,
@@ -142,7 +139,7 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
142
139
  var businessesIds = businessesList.businesses && ((_businessesList$busin = businessesList.businesses) === null || _businessesList$busin === void 0 ? void 0 : _businessesList$busin.map(function (business) {
143
140
  return business.id;
144
141
  }));
145
- var isChew = (orderingTheme === null || orderingTheme === void 0 ? void 0 : (_orderingTheme$theme = orderingTheme.theme) === null || _orderingTheme$theme === void 0 ? void 0 : (_orderingTheme$theme$ = _orderingTheme$theme.header) === null || _orderingTheme$theme$ === void 0 ? void 0 : (_orderingTheme$theme$2 = _orderingTheme$theme$.components) === null || _orderingTheme$theme$2 === void 0 ? void 0 : (_orderingTheme$theme$3 = _orderingTheme$theme$2.layout) === null || _orderingTheme$theme$3 === void 0 ? void 0 : (_orderingTheme$theme$4 = _orderingTheme$theme$3.type) === null || _orderingTheme$theme$4 === void 0 ? void 0 : _orderingTheme$theme$4.toLowerCase()) === 'chew';
142
+ var isChew = (theme === null || theme === void 0 ? void 0 : (_theme$header = theme.header) === null || _theme$header === void 0 ? void 0 : (_theme$header$compone = _theme$header.components) === null || _theme$header$compone === void 0 ? void 0 : (_theme$header$compone2 = _theme$header$compone.layout) === null || _theme$header$compone2 === void 0 ? void 0 : (_theme$header$compone3 = _theme$header$compone2.type) === null || _theme$header$compone3 === void 0 ? void 0 : _theme$header$compone3.toLowerCase()) === 'chew';
146
143
  var cateringTypeString = (orderState === null || orderState === void 0 ? void 0 : (_orderState$options2 = orderState.options) === null || _orderState$options2 === void 0 ? void 0 : _orderState$options2.type) === 7 ? 'catering_delivery' : (orderState === null || orderState === void 0 ? void 0 : (_orderState$options3 = orderState.options) === null || _orderState$options3 === void 0 ? void 0 : _orderState$options3.type) === 8 ? 'catering_pickup' : null;
147
144
  var cateringValues = (preorderBusiness === null || preorderBusiness === void 0 ? void 0 : preorderBusiness.configs) && (0, _utils.getCateringValues)(cateringTypeString, preorderBusiness === null || preorderBusiness === void 0 ? void 0 : preorderBusiness.configs);
148
145
  var handleScroll = (0, _react.useCallback)(function () {
@@ -259,11 +256,9 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
259
256
  });
260
257
  })))));
261
258
  }
262
- return /*#__PURE__*/_react.default.createElement(_styles.BusinessContainer, null, !isCustomerMode &&
263
- /*#__PURE__*/
264
- // Keep this banner at the top
265
- _react.default.createElement(_PageBanner.PageBanner, {
266
- position: "web_business_listing"
259
+ return /*#__PURE__*/_react.default.createElement(_styles.BusinessContainer, null, /*#__PURE__*/_react.default.createElement(_PageBanner.PageBanner, {
260
+ position: "web_business_listing",
261
+ isCustomerMode: isCustomerMode
267
262
  }), (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, {
268
263
  isBusinessList: true,
269
264
  hideHero: (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