ordering-ui-external 1.9.1 → 1.9.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/_bundles/0.ordering-ui.ea0875b41af5b7f1d809.js +1 -0
  2. package/_bundles/{1.ordering-ui.a97bdaf67c563ada4c74.js → 1.ordering-ui.ea0875b41af5b7f1d809.js} +1 -1
  3. package/_bundles/{2.ordering-ui.a97bdaf67c563ada4c74.js → 2.ordering-ui.ea0875b41af5b7f1d809.js} +1 -1
  4. package/_bundles/{4.ordering-ui.a97bdaf67c563ada4c74.js → 4.ordering-ui.ea0875b41af5b7f1d809.js} +1 -1
  5. package/_bundles/{5.ordering-ui.a97bdaf67c563ada4c74.js → 5.ordering-ui.ea0875b41af5b7f1d809.js} +1 -1
  6. package/_bundles/{6.ordering-ui.a97bdaf67c563ada4c74.js → 6.ordering-ui.ea0875b41af5b7f1d809.js} +1 -1
  7. package/_bundles/{7.ordering-ui.a97bdaf67c563ada4c74.js → 7.ordering-ui.ea0875b41af5b7f1d809.js} +2 -2
  8. package/_bundles/{7.ordering-ui.a97bdaf67c563ada4c74.js.LICENSE.txt → 7.ordering-ui.ea0875b41af5b7f1d809.js.LICENSE.txt} +0 -0
  9. package/_bundles/{8.ordering-ui.a97bdaf67c563ada4c74.js → 8.ordering-ui.ea0875b41af5b7f1d809.js} +1 -1
  10. package/_bundles/{9.ordering-ui.a97bdaf67c563ada4c74.js → 9.ordering-ui.ea0875b41af5b7f1d809.js} +1 -1
  11. package/_bundles/ordering-ui.ea0875b41af5b7f1d809.js +2 -0
  12. package/_bundles/{ordering-ui.a97bdaf67c563ada4c74.js.LICENSE.txt → ordering-ui.ea0875b41af5b7f1d809.js.LICENSE.txt} +0 -0
  13. package/_modules/components/VerticalOrdersLayout/SingleOrderCard/index.js +9 -10
  14. package/_modules/themes/five/index.js +7 -0
  15. package/_modules/themes/five/src/components/AddressList/index.js +3 -2
  16. package/_modules/themes/five/src/components/BusinessItemAccordion/index.js +3 -2
  17. package/_modules/themes/five/src/components/BusinessProductsCategories/index.js +8 -3
  18. package/_modules/themes/five/src/components/BusinessProductsList/index.js +50 -14
  19. package/_modules/themes/five/src/components/BusinessProductsListing/index.js +9 -2
  20. package/_modules/themes/five/src/components/BusinessProductsListing/styles.js +10 -6
  21. package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +34 -129
  22. package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/styles.js +29 -40
  23. package/_modules/themes/five/src/components/Cart/index.js +6 -3
  24. package/_modules/themes/five/src/components/CartContent/index.js +97 -2
  25. package/_modules/themes/five/src/components/CartContent/styles.js +6 -4
  26. package/_modules/themes/five/src/components/Checkout/index.js +8 -2
  27. package/_modules/themes/five/src/components/Checkout/styles.js +10 -4
  28. package/_modules/themes/five/src/components/Header/index.js +26 -34
  29. package/_modules/themes/five/src/components/Header/styles.js +46 -35
  30. package/_modules/themes/five/src/components/HeaderOption/index.js +3 -2
  31. package/_modules/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/index.js +3 -2
  32. package/_modules/themes/five/src/components/MultiCheckout/index.js +20 -10
  33. package/_modules/themes/five/src/components/MultiCheckout/styles.js +11 -8
  34. package/_modules/themes/five/src/components/MultiOrdersDetails/index.js +2 -0
  35. package/_modules/themes/five/src/components/OrderContextUI/index.js +192 -0
  36. package/_modules/themes/five/src/components/OrderContextUI/styles.js +41 -0
  37. package/_modules/themes/five/src/components/OrderDetails/index.js +5 -2
  38. package/_modules/themes/five/src/components/OrdersOption/PreviousBusinessOrdered/index.js +8 -2
  39. package/_modules/themes/five/src/components/OrdersOption/PreviousBusinessOrdered/styles.js +8 -2
  40. package/_modules/themes/five/src/components/ProductItemAccordion/index.js +17 -8
  41. package/_modules/themes/five/src/components/ProductItemAccordion/styles.js +27 -27
  42. package/_modules/themes/five/src/components/ProductOptionSubOption/index.js +7 -2
  43. package/_modules/themes/five/src/components/ProductOptionSubOption/styles.js +17 -14
  44. package/_modules/themes/five/src/components/SingleOrderCard/index.js +16 -16
  45. package/_modules/themes/five/src/components/SingleOrderCard/styles.js +49 -41
  46. package/package.json +2 -1
  47. package/src/components/VerticalOrdersLayout/SingleOrderCard/index.js +12 -12
  48. package/src/themes/five/index.js +2 -0
  49. package/src/themes/five/src/components/AddressList/index.js +3 -2
  50. package/src/themes/five/src/components/BusinessItemAccordion/index.js +2 -1
  51. package/src/themes/five/src/components/BusinessProductsCategories/index.js +8 -3
  52. package/src/themes/five/src/components/BusinessProductsList/index.js +54 -18
  53. package/src/themes/five/src/components/BusinessProductsListing/index.js +14 -2
  54. package/src/themes/five/src/components/BusinessProductsListing/styles.js +18 -6
  55. package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +2 -85
  56. package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/styles.js +2 -77
  57. package/src/themes/five/src/components/Cart/index.js +6 -3
  58. package/src/themes/five/src/components/CartContent/index.js +61 -3
  59. package/src/themes/five/src/components/CartContent/styles.js +6 -0
  60. package/src/themes/five/src/components/Checkout/index.js +16 -2
  61. package/src/themes/five/src/components/Checkout/styles.js +19 -6
  62. package/src/themes/five/src/components/Header/index.js +281 -277
  63. package/src/themes/five/src/components/Header/styles.js +20 -51
  64. package/src/themes/five/src/components/HeaderOption/index.js +3 -2
  65. package/src/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/index.js +2 -1
  66. package/src/themes/five/src/components/MultiCheckout/index.js +26 -6
  67. package/src/themes/five/src/components/MultiCheckout/styles.js +8 -13
  68. package/src/themes/five/src/components/MultiOrdersDetails/index.js +2 -0
  69. package/src/themes/five/src/components/OrderContextUI/index.js +133 -0
  70. package/src/themes/five/src/components/OrderContextUI/styles.js +86 -0
  71. package/src/themes/five/src/components/OrderDetails/index.js +6 -2
  72. package/src/themes/five/src/components/OrdersOption/PreviousBusinessOrdered/index.js +5 -2
  73. package/src/themes/five/src/components/OrdersOption/PreviousBusinessOrdered/styles.js +4 -0
  74. package/src/themes/five/src/components/ProductItemAccordion/index.js +58 -40
  75. package/src/themes/five/src/components/ProductItemAccordion/styles.js +4 -3
  76. package/src/themes/five/src/components/ProductOptionSubOption/index.js +8 -1
  77. package/src/themes/five/src/components/ProductOptionSubOption/styles.js +6 -0
  78. package/src/themes/five/src/components/SingleOrderCard/index.js +12 -13
  79. package/src/themes/five/src/components/SingleOrderCard/styles.js +26 -7
  80. package/template/app.js +1 -1
  81. package/template/components/ListenPageChanges/index.js +3 -2
  82. package/template/components/OrderingThemeUpdated/index.js +41 -0
  83. package/template/helmetdata.json +7 -0
  84. package/template/pages/MessagesList/index.js +2 -0
  85. package/template/pages/MultiCart/index.js +24 -0
  86. package/template/pages/MultiCheckout/index.js +86 -10
  87. package/template/pages/MultiOrdersDetails/index.js +9 -4
  88. package/_bundles/0.ordering-ui.a97bdaf67c563ada4c74.js +0 -1
  89. package/_bundles/ordering-ui.a97bdaf67c563ada4c74.js +0 -2
@@ -9,7 +9,6 @@ var _react = _interopRequireWildcard(require("react"));
9
9
  var _styledComponents = require("styled-components");
10
10
  var _FiMap = _interopRequireDefault(require("@meronex/icons/fi/FiMap"));
11
11
  var _FiFilter = _interopRequireDefault(require("@meronex/icons/fi/FiFilter"));
12
- var _FaMapMarkerAlt = _interopRequireDefault(require("@meronex/icons/fa/FaMapMarkerAlt"));
13
12
  var _orderingComponentsExternal = require("ordering-components-external");
14
13
  var _styles = require("./styles");
15
14
  var _useWindowSize = require("../../../../../../../hooks/useWindowSize");
@@ -17,8 +16,6 @@ var _Buttons = require("../../../../styles/Buttons");
17
16
  var _NotFoundSource = require("../../../NotFoundSource");
18
17
  var _Modal = require("../../../Modal");
19
18
  var _Confirm = require("../../../Confirm");
20
- var _AddressForm = require("../../../AddressForm");
21
- var _AddressList = require("../../../AddressList");
22
19
  var _SearchBar = require("../../../SearchBar");
23
20
  var _BusinessTypeFilter = require("../../../BusinessTypeFilter");
24
21
  var _BusinessController = require("../../../BusinessController");
@@ -29,10 +26,9 @@ var _BusinessPreorder = require("../../../BusinessPreorder");
29
26
  var _OrderProgress = require("../../../OrderProgress");
30
27
  var _PageBanner = require("../../../PageBanner");
31
28
  var _reactLoadingSkeleton = _interopRequireDefault(require("react-loading-skeleton"));
32
- var _MomentPopover = require("../../../../../../pwa/src/components/MomentPopover");
33
- var _OrderTypeSelectorHeader = require("../../../../../../../components/OrderTypeSelectorHeader");
34
29
  var _AutoScroll = require("../../../AutoScroll");
35
30
  var _CitiesControl = require("../../../CitiesControl");
31
+ var _OrderContextUI = require("../../../OrderContextUI");
36
32
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
37
33
  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); }
38
34
  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; }
@@ -54,7 +50,7 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
54
50
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
55
51
  var PIXELS_TO_SCROLL = 300;
56
52
  var BusinessesListingUI = function BusinessesListingUI(props) {
57
- 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, _businessesList$busin, _configState$configs, _configState$configs$, _orderingTheme$theme, _orderingTheme$theme$, _orderingTheme$theme$2, _orderingTheme$theme$3, _orderingTheme$theme$4, _businessesList$busin3, _props$beforeElements, _props$beforeComponen, _configs$business_lis, _orderState$options4, _orderState$options4$, _configs$business_lis2, _theme$images2, _theme$images2$genera, _theme$business_listi13, _theme$business_listi14, _theme$business_listi15, _theme$business_listi16, _Object$values, _configs$business_lis3, _theme$images3, _theme$images3$genera, _theme$business_listi17, _theme$business_listi18, _theme$business_listi19, _theme$business_listi20, _citiesState$cities2, _citiesState$cities3, _citiesState$cities3$, _configs$advanced_bus, _orderState$options6, _orderState$options6$, _configs$advanced_bus2, _orderState$options7, _orderState$options7$, _businessesList$busin6, _businessesList$busin7, _orderState$options10, _props$afterComponent, _props$afterElements;
53
+ 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, _businessesList$busin, _orderingTheme$theme, _orderingTheme$theme$, _orderingTheme$theme$2, _orderingTheme$theme$3, _orderingTheme$theme$4, _businessesList$busin3, _props$beforeElements, _props$beforeComponen, _configs$business_lis, _configs$business_lis2, _theme$images2, _theme$images2$genera, _theme$business_listi13, _theme$business_listi14, _theme$business_listi15, _theme$business_listi16, _Object$values, _configs$business_lis3, _theme$images3, _theme$images3$genera, _theme$business_listi17, _theme$business_listi18, _theme$business_listi19, _theme$business_listi20, _citiesState$cities2, _citiesState$cities3, _citiesState$cities3$, _configs$advanced_bus, _orderState$options4, _orderState$options4$, _configs$advanced_bus2, _orderState$options5, _orderState$options5$, _businessesList$busin6, _businessesList$busin7, _props$afterComponent, _props$afterElements;
58
54
  var businessesList = props.businessesList,
59
55
  paginationProps = props.paginationProps,
60
56
  searchValue = props.searchValue,
@@ -78,15 +74,12 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
78
74
  _useOrder2 = _slicedToArray(_useOrder, 2),
79
75
  orderState = _useOrder2[0],
80
76
  changeCityFilter = _useOrder2[1].changeCityFilter;
81
- var _useConfig = (0, _orderingComponentsExternal.useConfig)(),
82
- _useConfig2 = _slicedToArray(_useConfig, 1),
83
- configState = _useConfig2[0];
84
77
  var _useSession = (0, _orderingComponentsExternal.useSession)(),
85
78
  _useSession2 = _slicedToArray(_useSession, 1),
86
79
  auth = _useSession2[0].auth;
87
- var _useConfig3 = (0, _orderingComponentsExternal.useConfig)(),
88
- _useConfig4 = _slicedToArray(_useConfig3, 1),
89
- configs = _useConfig4[0].configs;
80
+ var _useConfig = (0, _orderingComponentsExternal.useConfig)(),
81
+ _useConfig2 = _slicedToArray(_useConfig, 1),
82
+ configs = _useConfig2[0].configs;
90
83
  var windowSize = (0, _useWindowSize.useWindowSize)();
91
84
  var _useOrderingTheme = (0, _orderingComponentsExternal.useOrderingTheme)(),
92
85
  _useOrderingTheme2 = _slicedToArray(_useOrderingTheme, 1),
@@ -111,31 +104,27 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
111
104
  _useState6 = _slicedToArray(_useState5, 2),
112
105
  activeMap = _useState6[0],
113
106
  setActiveMap = _useState6[1];
114
- var _useState7 = (0, _react.useState)({}),
107
+ var _useState7 = (0, _react.useState)(''),
115
108
  _useState8 = _slicedToArray(_useState7, 2),
116
- openPopover = _useState8[0],
117
- setOpenPopover = _useState8[1];
118
- var _useState9 = (0, _react.useState)(''),
109
+ mapErrors = _useState8[0],
110
+ setMapErrors = _useState8[1];
111
+ var _useState9 = (0, _react.useState)(false),
119
112
  _useState10 = _slicedToArray(_useState9, 2),
120
- mapErrors = _useState10[0],
121
- setMapErrors = _useState10[1];
122
- var _useState11 = (0, _react.useState)(false),
113
+ isPreorder = _useState10[0],
114
+ setIsPreorder = _useState10[1];
115
+ var _useState11 = (0, _react.useState)(null),
123
116
  _useState12 = _slicedToArray(_useState11, 2),
124
- isPreorder = _useState12[0],
125
- setIsPreorder = _useState12[1];
126
- var _useState13 = (0, _react.useState)(null),
117
+ preorderBusiness = _useState12[0],
118
+ setPreorderBusiness = _useState12[1];
119
+ var _useState13 = (0, _react.useState)(true),
127
120
  _useState14 = _slicedToArray(_useState13, 2),
128
- preorderBusiness = _useState14[0],
129
- setPreorderBusiness = _useState14[1];
130
- var _useState15 = (0, _react.useState)(true),
131
- _useState16 = _slicedToArray(_useState15, 2),
132
- hasHighRatedBusiness = _useState16[0],
133
- setHasHighRatedBusiness = _useState16[1];
121
+ hasHighRatedBusiness = _useState14[0],
122
+ setHasHighRatedBusiness = _useState14[1];
134
123
  var userCustomer = JSON.parse(window.localStorage.getItem('user-customer'));
135
- var _useState17 = (0, _react.useState)([]),
136
- _useState18 = _slicedToArray(_useState17, 2),
137
- favoriteIds = _useState18[0],
138
- setFavoriteIds = _useState18[1];
124
+ var _useState15 = (0, _react.useState)([]),
125
+ _useState16 = _slicedToArray(_useState15, 2),
126
+ favoriteIds = _useState16[0],
127
+ setFavoriteIds = _useState16[1];
139
128
  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;
140
129
  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;
141
130
  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;
@@ -144,9 +133,6 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
144
133
  var businessesIds = isCustomLayout && businessesList.businesses && ((_businessesList$busin = businessesList.businesses) === null || _businessesList$busin === void 0 ? void 0 : _businessesList$busin.map(function (business) {
145
134
  return business.id;
146
135
  }));
147
- var configTypes = (configState === null || configState === void 0 ? void 0 : (_configState$configs = configState.configs) === null || _configState$configs === void 0 ? void 0 : (_configState$configs$ = _configState$configs.order_types_allowed) === null || _configState$configs$ === void 0 ? void 0 : _configState$configs$.value.split('|').map(function (value) {
148
- return Number(value);
149
- })) || [];
150
136
  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';
151
137
  var handleScroll = (0, _react.useCallback)(function () {
152
138
  var _document$documentEle, _document$documentEle2, _businessesList$error;
@@ -173,26 +159,6 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
173
159
  }));
174
160
  }
175
161
  };
176
- var handleTogglePopover = function handleTogglePopover(type) {
177
- setOpenPopover(_objectSpread(_objectSpread({}, openPopover), {}, _defineProperty({}, type, !openPopover[type])));
178
- };
179
- var handleClosePopover = function handleClosePopover(type) {
180
- setOpenPopover(_objectSpread(_objectSpread({}, openPopover), {}, _defineProperty({}, type, false)));
181
- };
182
- var handleFindBusinesses = function handleFindBusinesses() {
183
- var _orderState$options2, _orderState$options2$;
184
- if (!(orderState !== null && orderState !== void 0 && (_orderState$options2 = orderState.options) !== null && _orderState$options2 !== void 0 && (_orderState$options2$ = _orderState$options2.address) !== null && _orderState$options2$ !== void 0 && _orderState$options2$.location)) {
185
- setAlertState({
186
- open: true,
187
- content: [t('SELECT_AN_ADDRESS_TO_SEARCH', 'Select or add an address to search')]
188
- });
189
- return;
190
- }
191
- setModals({
192
- listOpen: false,
193
- formOpen: false
194
- });
195
- };
196
162
  var toggleMap = function toggleMap() {
197
163
  setActiveMap(!activeMap);
198
164
  };
@@ -233,8 +199,8 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
233
199
  }));
234
200
  };
235
201
  var handleChangeCity = function handleChangeCity(cityId) {
236
- var _orderState$options3;
237
- changeCityFilter(cityId === (orderState === null || orderState === void 0 ? void 0 : (_orderState$options3 = orderState.options) === null || _orderState$options3 === void 0 ? void 0 : _orderState$options3.city_id) ? null : cityId);
202
+ var _orderState$options2;
203
+ changeCityFilter(cityId === (orderState === null || orderState === void 0 ? void 0 : (_orderState$options2 = orderState.options) === null || _orderState$options2 === void 0 ? void 0 : _orderState$options2.city_id) ? null : cityId);
238
204
  };
239
205
  (0, _react.useEffect)(function () {
240
206
  if (preorderBusiness) setIsPreorder(true);
@@ -310,22 +276,9 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
310
276
  return /*#__PURE__*/_react.default.createElement(BeforeComponent, _extends({
311
277
  key: i
312
278
  }, props));
313
- }), /*#__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(_styles.BusinessFeatures, null, /*#__PURE__*/_react.default.createElement(_styles.AddressMenu, {
314
- onClick: function onClick() {
315
- return handleClickAddress();
316
- }
317
- }, /*#__PURE__*/_react.default.createElement(_FaMapMarkerAlt.default, null), /*#__PURE__*/_react.default.createElement("span", null, ((_orderState$options4 = orderState.options) === null || _orderState$options4 === void 0 ? void 0 : (_orderState$options4$ = _orderState$options4.address) === null || _orderState$options4$ === void 0 ? void 0 : _orderState$options4$.address) || t('WHERE_DO_WE_DELIVERY', 'Where do we delivery?'))), /*#__PURE__*/_react.default.createElement(_styles.FeatureItems, null, /*#__PURE__*/_react.default.createElement(_styles.ItemInline, null, /*#__PURE__*/_react.default.createElement(_OrderTypeSelectorHeader.OrderTypeSelectorHeader, {
318
- configTypes: configTypes
319
- })), /*#__PURE__*/_react.default.createElement(_styles.ItemInline, null, /*#__PURE__*/_react.default.createElement(_MomentPopover.MomentPopover, {
320
- open: openPopover.moment,
321
- onClick: function onClick() {
322
- return handleTogglePopover('moment');
323
- },
324
- onClose: function onClose() {
325
- return handleClosePopover('moment');
326
- },
327
- isBanner: true
328
- })))), (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 && /*#__PURE__*/_react.default.createElement(_styles.BusinessHeroImg, {
279
+ }), /*#__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, {
280
+ isBusinessList: true
281
+ }), (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 && /*#__PURE__*/_react.default.createElement(_styles.BusinessHeroImg, {
329
282
  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,
330
283
  height: theme === null || theme === void 0 ? void 0 : (_theme$business_listi13 = theme.business_listing_view) === 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.business_hero) === null || _theme$business_listi15 === void 0 ? void 0 : (_theme$business_listi16 = _theme$business_listi15.style) === null || _theme$business_listi16 === void 0 ? void 0 : _theme$business_listi16.height
331
284
  })), !!((_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, {
@@ -357,8 +310,8 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
357
310
  color: "primary",
358
311
  onClick: handleOpenCities
359
312
  }, (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) {
360
- var _orderState$options5;
361
- 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);
313
+ var _orderState$options3;
314
+ return (city === null || city === void 0 ? void 0 : city.id) === (orderState === null || orderState === void 0 ? void 0 : (_orderState$options3 = orderState.options) === null || _orderState$options3 === void 0 ? void 0 : _orderState$options3.city_id);
362
315
  })) === 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, {
363
316
  onClick: function onClick() {
364
317
  return onRedirectPage({
@@ -369,7 +322,7 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
369
322
  onClick: toggleMap
370
323
  })), activeMap && /*#__PURE__*/_react.default.createElement(_BusinessesMap.BusinessesMap, {
371
324
  businessList: businessesList.businesses,
372
- 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,
325
+ userLocation: orderState === null || orderState === void 0 ? void 0 : (_orderState$options4 = orderState.options) === null || _orderState$options4 === void 0 ? void 0 : (_orderState$options4$ = _orderState$options4.address) === null || _orderState$options4$ === void 0 ? void 0 : _orderState$options4$.location,
373
326
  setErrors: setMapErrors
374
327
  })), !isChew && hasHighRatedBusiness && !props.franchiseId && /*#__PURE__*/_react.default.createElement(_styles.HightestRatedWrapper, null, /*#__PURE__*/_react.default.createElement(_styles.Divider, null), /*#__PURE__*/_react.default.createElement(_HighestRated.HighestRated, {
375
328
  handleClickAddress: handleClickAddress,
@@ -406,7 +359,7 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
406
359
  onClick: toggleMap
407
360
  }))), isCustomerMode && activeMap && /*#__PURE__*/_react.default.createElement(_BusinessesMap.BusinessesMap, {
408
361
  businessList: businessesList.businesses,
409
- userLocation: orderState === null || orderState === void 0 ? void 0 : (_orderState$options7 = orderState.options) === null || _orderState$options7 === void 0 ? void 0 : (_orderState$options7$ = _orderState$options7.address) === null || _orderState$options7$ === void 0 ? void 0 : _orderState$options7$.location,
362
+ userLocation: orderState === null || orderState === void 0 ? void 0 : (_orderState$options5 = orderState.options) === null || _orderState$options5 === void 0 ? void 0 : (_orderState$options5$ = _orderState$options5.address) === null || _orderState$options5$ === void 0 ? void 0 : _orderState$options5$.location,
410
363
  setErrors: setMapErrors
411
364
  }), !isCustomerMode && /*#__PURE__*/_react.default.createElement(OrdersSection, null), /*#__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 && /*#__PURE__*/_react.default.createElement(_NotFoundSource.NotFoundSource, {
412
365
  content: t('NOT_FOUND_BUSINESSES', 'No businesses to delivery / pick up at this address, please change filters or change address.')
@@ -420,14 +373,14 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
420
373
  height: '44px'
421
374
  }
422
375
  }, t('CHANGE_ADDRESS', 'Select other Address'))), (_businessesList$busin7 = businessesList.businesses) === null || _businessesList$busin7 === void 0 ? void 0 : _businessesList$busin7.map(function (business) {
423
- var _orderState$options8, _business$reviews;
376
+ var _orderState$options6, _business$reviews;
424
377
  return /*#__PURE__*/_react.default.createElement(_BusinessController.BusinessController, {
425
378
  key: business.id,
426
379
  className: "card",
427
380
  business: business,
428
381
  isBusinessOpen: business.open,
429
382
  handleCustomClick: handleBusinessClick,
430
- orderType: orderState === null || orderState === void 0 ? void 0 : (_orderState$options8 = orderState.options) === null || _orderState$options8 === void 0 ? void 0 : _orderState$options8.type,
383
+ orderType: orderState === null || orderState === void 0 ? void 0 : (_orderState$options6 = orderState.options) === null || _orderState$options6 === void 0 ? void 0 : _orderState$options6.type,
431
384
  isCustomLayout: isCustomLayout,
432
385
  isCustomerMode: isCustomerMode,
433
386
  onPreorderBusiness: setPreorderBusiness,
@@ -445,13 +398,13 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
445
398
  setFavoriteIds: setFavoriteIds
446
399
  });
447
400
  }), businessesList.loading && _toConsumableArray(Array((paginationProps === null || paginationProps === void 0 ? void 0 : paginationProps.nextPageItems) > 4 ? paginationProps.nextPageItems : 8).keys()).map(function (i) {
448
- var _orderState$options9;
401
+ var _orderState$options7;
449
402
  return /*#__PURE__*/_react.default.createElement(_BusinessController.BusinessController, {
450
403
  key: i,
451
404
  className: "card",
452
405
  business: {},
453
406
  isSkeleton: true,
454
- orderType: orderState === null || orderState === void 0 ? void 0 : (_orderState$options9 = orderState.options) === null || _orderState$options9 === void 0 ? void 0 : _orderState$options9.type
407
+ orderType: orderState === null || orderState === void 0 ? void 0 : (_orderState$options7 = orderState.options) === null || _orderState$options7 === void 0 ? void 0 : _orderState$options7.type
455
408
  });
456
409
  }))), /*#__PURE__*/_react.default.createElement(_Modal.Modal, {
457
410
  open: isPreorder,
@@ -463,54 +416,6 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
463
416
  business: preorderBusiness,
464
417
  handleClick: handleBusinessClick,
465
418
  showButton: true
466
- })), /*#__PURE__*/_react.default.createElement(_Modal.Modal, {
467
- title: t('ADDRESS_FORM', 'Address Form'),
468
- open: modals.formOpen,
469
- onClose: function onClose() {
470
- return setModals(_objectSpread(_objectSpread({}, modals), {}, {
471
- formOpen: false
472
- }));
473
- }
474
- }, /*#__PURE__*/_react.default.createElement(_AddressForm.AddressForm, {
475
- useValidationFileds: true,
476
- address: (orderState === null || orderState === void 0 ? void 0 : (_orderState$options10 = orderState.options) === null || _orderState$options10 === void 0 ? void 0 : _orderState$options10.address) || {},
477
- onClose: function onClose() {
478
- return setModals(_objectSpread(_objectSpread({}, modals), {}, {
479
- formOpen: false
480
- }));
481
- },
482
- onCancel: function onCancel() {
483
- return setModals(_objectSpread(_objectSpread({}, modals), {}, {
484
- formOpen: false
485
- }));
486
- },
487
- onSaveAddress: function onSaveAddress() {
488
- return setModals(_objectSpread(_objectSpread({}, modals), {}, {
489
- formOpen: false
490
- }));
491
- }
492
- })), /*#__PURE__*/_react.default.createElement(_Modal.Modal, {
493
- title: t('ADDRESSES', 'Address List'),
494
- open: modals.listOpen,
495
- width: "70%",
496
- onClose: function onClose() {
497
- return setModals(_objectSpread(_objectSpread({}, modals), {}, {
498
- listOpen: false
499
- }));
500
- }
501
- }, /*#__PURE__*/_react.default.createElement(_AddressList.AddressList, {
502
- isModal: true,
503
- changeOrderAddressWithDefault: true,
504
- userId: isNaN(userCustomer === null || userCustomer === void 0 ? void 0 : userCustomer.id) ? null : userCustomer === null || userCustomer === void 0 ? void 0 : userCustomer.id,
505
- onCancel: function onCancel() {
506
- return setModals(_objectSpread(_objectSpread({}, modals), {}, {
507
- listOpen: false
508
- }));
509
- },
510
- onAccept: function onAccept() {
511
- return handleFindBusinesses();
512
- },
513
- isCustomerMode: isCustomerMode
514
419
  })), /*#__PURE__*/_react.default.createElement(_Modal.Modal, {
515
420
  title: t('SELECT_A_STORE', 'Select a store'),
516
421
  open: modals.citiesOpen,
@@ -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.WrapperSearch = exports.SearchContainer = exports.PreviousOrders = exports.ItemInline = exports.HightestRatedWrapper = exports.HeaderSearchMode = exports.FeatureItems = exports.ErrorMessage = exports.Divider = exports.BusinessesTitle = exports.BusinessSearch = exports.BusinessLogosWrapper = exports.BusinessLogosContainer = exports.BusinessLogo = exports.BusinessList = exports.BusinessHeroImgStyled = exports.BusinessHeroImg = exports.BusinessFeatures = exports.BusinessContainer = exports.BusinessBanner = exports.AddressMenu = void 0;
7
+ exports.WrapperSearch = exports.SearchContainer = exports.PreviousOrders = exports.HightestRatedWrapper = exports.HeaderSearchMode = exports.ErrorMessage = exports.Divider = exports.BusinessesTitle = exports.BusinessSearch = exports.BusinessLogosWrapper = exports.BusinessLogosContainer = exports.BusinessLogo = exports.BusinessList = exports.BusinessHeroImgStyled = exports.BusinessHeroImg = exports.BusinessContainer = exports.BusinessBanner = 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;
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;
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; }
@@ -15,52 +15,41 @@ 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 BusinessContainer = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n width: 100%;\n"])));
17
17
  exports.BusinessContainer = BusinessContainer;
18
- var BusinessBanner = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: center;\n align-items: center;\n margin-bottom: 30px;\n position: relative;\n @media (max-width: 481px) {\n margin-bottom: 0px;\n }\n"])));
18
+ var BusinessBanner = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: center;\n align-items: center;\n margin-bottom: 30px;\n position: relative;\n @media (max-width: 576px) {\n margin-bottom: 0px;\n }\n"])));
19
19
  exports.BusinessBanner = BusinessBanner;
20
- var BusinessFeatures = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n position: absolute;\n top: 10%;\n width: 100%;\n padding: 0 15px;\n box-sizing: border-box;\n"])));
21
- exports.BusinessFeatures = BusinessFeatures;
22
- var AddressMenu = _styledComponents.default.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n cursor: pointer;\n font-size: 14px;\n display: flex;\n align-items: center;\n background-color: #fff;\n color: #344050;\n font-weight: 600;\n border-radius: 50px;\n padding: 13px 19px;\n margin-bottom: 10px;\n span {\n width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n svg {\n margin-right: 5px;\n color: #B1BCCC;\n ", "\n }\n"])), function (props) {
23
- var _props$theme;
24
- return ((_props$theme = props.theme) === null || _props$theme === void 0 ? void 0 : _props$theme.rtl) && (0, _styledComponents.css)(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n margin-left: 5px;\n margin-right: 0;\n "])));
25
- });
26
- exports.AddressMenu = AddressMenu;
27
- var FeatureItems = _styledComponents.default.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n width: 100%;\n display: flex;\n justify-content: space-between;\n"])));
28
- exports.FeatureItems = FeatureItems;
29
- var ItemInline = _styledComponents.default.div(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n > span #select-input {\n background-color: #F8F9FA !important;\n border: none;\n border-radius: 7.6px;\n svg {\n font-size: 14px;\n }\n #list {\n background-color: #fff;\n border: none;\n border-radius: 7.6px;\n left: 0px;\n right: initial;\n ", "\n }\n > div:first-child {\n font-size: 11px;\n }\n }\n .moment-popover {\n > div:first-child {\n font-size: 11px;\n padding: 4px 7px;\n svg {\n font-size: 14px;\n }\n }\n }\n"])), function (props) {
30
- return props.theme.rtl && (0, _styledComponents.css)(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n left: initial;\n right: 0px;\n "])));
31
- });
32
- exports.ItemInline = ItemInline;
33
- var BusinessSearch = _styledComponents.default.div(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n display: flex;\n background-color: #f8f9fa;\n align-items: center;\n padding: 7px;\n border-radius: 7px;\n font-size: 11px;\n svg {\n font-size: 15px;\n }\n"])));
20
+ var BusinessSearch = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex;\n background-color: #f8f9fa;\n align-items: center;\n padding: 7px;\n border-radius: 7px;\n font-size: 11px;\n svg {\n font-size: 15px;\n }\n"])));
34
21
  exports.BusinessSearch = BusinessSearch;
35
- var BusinessList = _styledComponents.default.div(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n display: flex;\n flex-wrap: wrap;\n"])));
22
+ var BusinessList = _styledComponents.default.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: flex;\n flex-wrap: wrap;\n"])));
36
23
  exports.BusinessList = BusinessList;
37
- var WrapperSearch = _styledComponents.default.div(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n margin: 10px 20px 0px;\n display: flex;\n justify-content: flex-end;\n svg{\n align-self: center;\n cursor: pointer;\n font-size: 26px;\n color: ", ";\n margin-left: 10px;\n }\n button {\n width: 250px;\n margin-left: 10px;\n }\n ", "\n"])), function (props) {
38
- var _props$theme2, _props$theme2$colors;
39
- return (_props$theme2 = props.theme) === null || _props$theme2 === void 0 ? void 0 : (_props$theme2$colors = _props$theme2.colors) === null || _props$theme2$colors === void 0 ? void 0 : _props$theme2$colors.primary;
24
+ var WrapperSearch = _styledComponents.default.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n margin: 10px 20px 0px;\n display: flex;\n justify-content: flex-end;\n svg{\n align-self: center;\n cursor: pointer;\n font-size: 26px;\n color: ", ";\n margin-left: 10px;\n }\n button {\n width: 250px;\n margin-left: 10px;\n }\n ", "\n"])), function (props) {
25
+ var _props$theme, _props$theme$colors;
26
+ 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.primary;
40
27
  }, function (_ref) {
41
28
  var isCustomLayout = _ref.isCustomLayout,
42
29
  isCustomerMode = _ref.isCustomerMode;
43
- return isCustomLayout && (0, _styledComponents.css)(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n box-sizing: border-box;\n display: flex;\n justify-content: center;\n align-items: center;\n position: relative;\n margin: 0;\n margin-top: 10px;\n margin-bottom: 20px;\n width: 100%; \n padding: 0 20px;\n ", "\n svg {\n align-self: auto;\n }\n \n @media(min-width: 681px){\n width: 75%;\n padding: 0;\n }\n @media(min-width: 1201px){\n width: 50%;\n }\n "])), isCustomerMode ? (0, _styledComponents.css)(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n margin-right: 20px;\n "]))) : (0, _styledComponents.css)(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n margin: 0 auto;\n "]))));
30
+ return isCustomLayout && (0, _styledComponents.css)(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n box-sizing: border-box;\n display: flex;\n justify-content: center;\n align-items: center;\n position: relative;\n margin: 0;\n margin-top: 10px;\n margin-bottom: 20px;\n width: 100%; \n padding: 0 20px;\n ", "\n svg {\n align-self: auto;\n }\n \n @media(min-width: 681px){\n width: 75%;\n padding: 0;\n }\n @media(min-width: 1201px){\n width: 50%;\n }\n "])), isCustomerMode ? (0, _styledComponents.css)(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n margin-right: 20px;\n "]))) : (0, _styledComponents.css)(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n margin: 0 auto;\n "]))));
44
31
  });
45
32
  exports.WrapperSearch = WrapperSearch;
46
- var ErrorMessage = _styledComponents.default.span(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n padding: 20px;\n width: 100%;\n background-color: #CCCCCC;\n margin: 0px 15px;\n color: #D81313;\n font-weight: bold;\n"])));
33
+ var ErrorMessage = _styledComponents.default.span(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n padding: 20px;\n width: 100%;\n background-color: #CCCCCC;\n margin: 0px 15px;\n color: #D81313;\n font-weight: bold;\n"])));
47
34
  exports.ErrorMessage = ErrorMessage;
48
- var PreviousOrders = _styledComponents.default.div(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n display: flex;\n flex-wrap: wrap;\n margin: 10px 20px 0px;\n"])));
35
+ var PreviousOrders = _styledComponents.default.div(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n display: flex;\n flex-wrap: wrap;\n margin: 10px 20px 0px;\n"])));
49
36
  exports.PreviousOrders = PreviousOrders;
50
- var BusinessesTitle = _styledComponents.default.h1(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n ", "\n"])), function (_ref2) {
37
+ var BusinessesTitle = _styledComponents.default.h1(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n ", "\n"])), function (_ref2) {
51
38
  var isCustomerMode = _ref2.isCustomerMode;
52
- return isCustomerMode ? (0, _styledComponents.css)(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["\n font-size: 18px;\n margin: 0px 20px;\n "]))) : (0, _styledComponents.css)(_templateObject19 || (_templateObject19 = _taggedTemplateLiteral(["\n font-weight: 600;\n font-size: 24px;\n color: ", ";\n margin: 42px 20px 5px 20px;\n "])), function (props) {
53
- var _props$theme3;
54
- return (_props$theme3 = props.theme) === null || _props$theme3 === void 0 ? void 0 : _props$theme3.colors.headingColor;
39
+ return isCustomerMode ? (0, _styledComponents.css)(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n font-size: 18px;\n margin: 0px 20px;\n "]))) : (0, _styledComponents.css)(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n font-weight: 600;\n font-size: 24px;\n color: ", ";\n margin: 42px 20px 5px 20px;\n "])), function (props) {
40
+ var _props$theme2;
41
+ return (_props$theme2 = props.theme) === null || _props$theme2 === void 0 ? void 0 : _props$theme2.colors.headingColor;
55
42
  });
56
43
  });
57
44
  exports.BusinessesTitle = BusinessesTitle;
58
- var BusinessHeroImgStyled = _styledComponents.default.div(_templateObject20 || (_templateObject20 = _taggedTemplateLiteral(["\n margin-bottom: 30px;\n width: 100%;\n height: calc(65vh - 98px);\n ", "\n @media (min-width: 450px) {\n height: 370px;\n }\n @media (min-width: 821px) {\n height: ", ";\n }\n"])), function (_ref3) {
45
+ var BusinessHeroImgStyled = _styledComponents.default.div(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n margin-bottom: 30px;\n width: 100%;\n height: calc(65vh - 98px);\n ", "\n @media (min-width: 450px) {\n height: 370px;\n }\n @media (min-width: 821px) {\n height: ", ";\n }\n"])), function (_ref3) {
59
46
  var bgimage = _ref3.bgimage;
60
- return bgimage && (0, _styledComponents.css)(_templateObject21 || (_templateObject21 = _taggedTemplateLiteral(["\n background-repeat: no-repeat, repeat;\n background-size: cover;\n object-fit: cover;\n background-position: center;\n "])));
47
+ return bgimage && (0, _styledComponents.css)(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n background-repeat: no-repeat, repeat;\n background-size: cover;\n object-fit: cover;\n background-position: center;\n "])));
61
48
  }, function (_ref4) {
62
- var height = _ref4.height;
63
- return height || '650px';
49
+ var _theme$business_listi, _theme$business_listi2, _theme$business_listi3, _theme$business_listi4, _theme$business_listi5;
50
+ var height = _ref4.height,
51
+ theme = _ref4.theme;
52
+ return (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_hero) === 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.styles) === null || _theme$business_listi5 === void 0 ? void 0 : _theme$business_listi5.height) || height || '650px';
64
53
  });
65
54
  exports.BusinessHeroImgStyled = BusinessHeroImgStyled;
66
55
  var BusinessHeroImg = function BusinessHeroImg(props) {
@@ -71,16 +60,16 @@ var BusinessHeroImg = function BusinessHeroImg(props) {
71
60
  }), props.children);
72
61
  };
73
62
  exports.BusinessHeroImg = BusinessHeroImg;
74
- var HightestRatedWrapper = _styledComponents.default.div(_templateObject22 || (_templateObject22 = _taggedTemplateLiteral(["\n padding: 50px 0 30px 0;\n"])));
63
+ var HightestRatedWrapper = _styledComponents.default.div(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n padding: 50px 0 30px 0;\n"])));
75
64
  exports.HightestRatedWrapper = HightestRatedWrapper;
76
- var Divider = _styledComponents.default.div(_templateObject23 || (_templateObject23 = _taggedTemplateLiteral(["\n background: #F8F9FA;\n height: 8px;\n width: 100%;\n"])));
65
+ var Divider = _styledComponents.default.div(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n background: #F8F9FA;\n height: 8px;\n width: 100%;\n"])));
77
66
  exports.Divider = Divider;
78
- var SearchContainer = _styledComponents.default.div(_templateObject24 || (_templateObject24 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n"])));
67
+ var SearchContainer = _styledComponents.default.div(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n"])));
79
68
  exports.SearchContainer = SearchContainer;
80
- var BusinessLogosWrapper = _styledComponents.default.div(_templateObject25 || (_templateObject25 = _taggedTemplateLiteral(["\n overflow: scroll hidden;\n width: 100%;\n"])));
69
+ var BusinessLogosWrapper = _styledComponents.default.div(_templateObject19 || (_templateObject19 = _taggedTemplateLiteral(["\n overflow: scroll hidden;\n width: 100%;\n"])));
81
70
  exports.BusinessLogosWrapper = BusinessLogosWrapper;
82
- var BusinessLogoStyled = _styledComponents.default.div(_templateObject26 || (_templateObject26 = _taggedTemplateLiteral(["\n min-width: 100px;\n min-height: 100px;\n height: 100px;\n width: 100px;\n box-sizing: border-box;\n background-repeat: no-repeat, repeat;\n background-size: cover;\n object-fit: cover;\n background-position: center;\n border-radius: 7.6px;\n margin-right: 15px;\n cursor: pointer;\n ", ";\n"])), function (props) {
83
- return props.isActive && (0, _styledComponents.css)(_templateObject27 || (_templateObject27 = _taggedTemplateLiteral(["\n border: 2px solid ", ";\n "])), function (props) {
71
+ var BusinessLogoStyled = _styledComponents.default.div(_templateObject20 || (_templateObject20 = _taggedTemplateLiteral(["\n min-width: 100px;\n min-height: 100px;\n height: 100px;\n width: 100px;\n box-sizing: border-box;\n background-repeat: no-repeat, repeat;\n background-size: cover;\n object-fit: cover;\n background-position: center;\n border-radius: 7.6px;\n margin-right: 15px;\n cursor: pointer;\n ", ";\n"])), function (props) {
72
+ return props.isActive && (0, _styledComponents.css)(_templateObject21 || (_templateObject21 = _taggedTemplateLiteral(["\n border: 2px solid ", ";\n "])), function (props) {
84
73
  return props.theme.colors.primary;
85
74
  });
86
75
  });
@@ -94,7 +83,7 @@ var BusinessLogo = function BusinessLogo(props) {
94
83
  }), props.children);
95
84
  };
96
85
  exports.BusinessLogo = BusinessLogo;
97
- var BusinessLogosContainer = _styledComponents.default.div(_templateObject28 || (_templateObject28 = _taggedTemplateLiteral(["\n display: flex;\n padding-bottom: 10px;\n"])));
86
+ var BusinessLogosContainer = _styledComponents.default.div(_templateObject22 || (_templateObject22 = _taggedTemplateLiteral(["\n display: flex;\n padding-bottom: 10px;\n"])));
98
87
  exports.BusinessLogosContainer = BusinessLogosContainer;
99
- var HeaderSearchMode = _styledComponents.default.div(_templateObject29 || (_templateObject29 = _taggedTemplateLiteral(["\n position: absolute;\n width: 200px;\n"])));
88
+ var HeaderSearchMode = _styledComponents.default.div(_templateObject23 || (_templateObject23 = _taggedTemplateLiteral(["\n position: absolute;\n width: 200px;\n"])));
100
89
  exports.HeaderSearchMode = HeaderSearchMode;
@@ -69,7 +69,10 @@ var CartUI = function CartUI(props) {
69
69
  handleChangeComment = props.handleChangeComment,
70
70
  commentState = props.commentState,
71
71
  handleRemoveOfferClick = props.handleRemoveOfferClick,
72
- setPreorderBusiness = props.setPreorderBusiness;
72
+ setPreorderBusiness = props.setPreorderBusiness,
73
+ cartMulticart = props.cart,
74
+ hideDeliveryFee = props.hideDeliveryFee,
75
+ hideDriverTip = props.hideDriverTip;
73
76
  var theme = (0, _styledComponents.useTheme)();
74
77
  var _useLanguage = (0, _orderingComponentsExternal.useLanguage)(),
75
78
  _useLanguage2 = _slicedToArray(_useLanguage, 2),
@@ -484,7 +487,7 @@ var CartUI = function CartUI(props) {
484
487
  return onRemoveOffer(offer === null || offer === void 0 ? void 0 : offer.id);
485
488
  }
486
489
  }))), /*#__PURE__*/_react.default.createElement("td", null, "- ", parsePrice(offer === null || offer === void 0 ? void 0 : (_offer$summary2 = offer.summary) === null || _offer$summary2 === void 0 ? void 0 : _offer$summary2.discount)));
487
- })), (orderState === null || orderState === void 0 ? void 0 : (_orderState$options = orderState.options) === null || _orderState$options === void 0 ? void 0 : _orderState$options.type) === 1 && (cart === null || cart === void 0 ? void 0 : cart.delivery_price) > 0 && /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", null, t('DELIVERY_FEE', 'Delivery Fee')), /*#__PURE__*/_react.default.createElement("td", null, parsePrice(cart === null || cart === void 0 ? void 0 : cart.delivery_price))), (cart === null || cart === void 0 ? void 0 : (_cart$offers7 = cart.offers) === null || _cart$offers7 === void 0 ? void 0 : _cart$offers7.length) > 0 && (cart === null || cart === void 0 ? void 0 : (_cart$offers8 = cart.offers) === null || _cart$offers8 === void 0 ? void 0 : (_cart$offers8$filter = _cart$offers8.filter(function (offer) {
490
+ })), (orderState === null || orderState === void 0 ? void 0 : (_orderState$options = orderState.options) === null || _orderState$options === void 0 ? void 0 : _orderState$options.type) === 1 && (cart === null || cart === void 0 ? void 0 : cart.delivery_price) > 0 && !hideDeliveryFee && /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", null, t('DELIVERY_FEE', 'Delivery Fee')), /*#__PURE__*/_react.default.createElement("td", null, parsePrice(cart === null || cart === void 0 ? void 0 : cart.delivery_price))), (cart === null || cart === void 0 ? void 0 : (_cart$offers7 = cart.offers) === null || _cart$offers7 === void 0 ? void 0 : _cart$offers7.length) > 0 && (cart === null || cart === void 0 ? void 0 : (_cart$offers8 = cart.offers) === null || _cart$offers8 === void 0 ? void 0 : (_cart$offers8$filter = _cart$offers8.filter(function (offer) {
488
491
  return (offer === null || offer === void 0 ? void 0 : offer.target) === 2;
489
492
  })) === null || _cart$offers8$filter === void 0 ? void 0 : _cart$offers8$filter.map(function (offer) {
490
493
  var _offer$summary3;
@@ -509,7 +512,7 @@ var CartUI = function CartUI(props) {
509
512
  return onRemoveOffer(offer === null || offer === void 0 ? void 0 : offer.id);
510
513
  }
511
514
  }))), /*#__PURE__*/_react.default.createElement("td", null, "- ", parsePrice(offer === null || offer === void 0 ? void 0 : (_offer$summary3 = offer.summary) === null || _offer$summary3 === void 0 ? void 0 : _offer$summary3.discount)));
512
- })), (cart === null || cart === void 0 ? void 0 : cart.driver_tip) > 0 && /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", null, t('DRIVER_TIP', 'Driver tip'), ' ', (cart === null || cart === void 0 ? void 0 : cart.driver_tip_rate) > 0 && parseInt(configs === null || configs === void 0 ? void 0 : (_configs$driver_tip_t = configs.driver_tip_type) === null || _configs$driver_tip_t === void 0 ? void 0 : _configs$driver_tip_t.value, 10) === 2 && !parseInt(configs === null || configs === void 0 ? void 0 : (_configs$driver_tip_u = configs.driver_tip_use_custom) === null || _configs$driver_tip_u === void 0 ? void 0 : _configs$driver_tip_u.value, 10) && /*#__PURE__*/_react.default.createElement("span", null, "(".concat((0, _utils.verifyDecimals)(cart === null || cart === void 0 ? void 0 : cart.driver_tip_rate, parseNumber), "%)"))), /*#__PURE__*/_react.default.createElement("td", null, parsePrice(cart === null || cart === void 0 ? void 0 : cart.driver_tip))))), isCouponEnabled && !isCartPending && (isCheckout || isCartPopover || isMultiCheckout) && !(isCheckout && isCartPopover) && /*#__PURE__*/_react.default.createElement(_styles.CouponContainer, null, /*#__PURE__*/_react.default.createElement(_CouponControl.CouponControl, {
515
+ })), (cart === null || cart === void 0 ? void 0 : cart.driver_tip) > 0 && !hideDriverTip && /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", null, t('DRIVER_TIP', 'Driver tip'), ' ', (cart === null || cart === void 0 ? void 0 : cart.driver_tip_rate) > 0 && parseInt(configs === null || configs === void 0 ? void 0 : (_configs$driver_tip_t = configs.driver_tip_type) === null || _configs$driver_tip_t === void 0 ? void 0 : _configs$driver_tip_t.value, 10) === 2 && !parseInt(configs === null || configs === void 0 ? void 0 : (_configs$driver_tip_u = configs.driver_tip_use_custom) === null || _configs$driver_tip_u === void 0 ? void 0 : _configs$driver_tip_u.value, 10) && /*#__PURE__*/_react.default.createElement("span", null, "(".concat((0, _utils.verifyDecimals)(cart === null || cart === void 0 ? void 0 : cart.driver_tip_rate, parseNumber), "%)"))), /*#__PURE__*/_react.default.createElement("td", null, parsePrice(cart === null || cart === void 0 ? void 0 : cart.driver_tip))))), isCouponEnabled && !isCartPending && (isCheckout || isCartPopover || isMultiCheckout) && !(isCheckout && isCartPopover) && /*#__PURE__*/_react.default.createElement(_styles.CouponContainer, null, /*#__PURE__*/_react.default.createElement(_CouponControl.CouponControl, {
513
516
  businessId: cart.business_id,
514
517
  price: cart.total
515
518
  })), isMultiCheckout && cart && (cart === null || cart === void 0 ? void 0 : cart.business_id) && (orderState === null || orderState === void 0 ? void 0 : (_orderState$options2 = orderState.options) === null || _orderState$options2 === void 0 ? void 0 : _orderState$options2.type) === 1 && (cart === null || cart === void 0 ? void 0 : cart.status) !== 2 && (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.enabled) && driverTipsOptions.length > 0 && !useKioskApp && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_styles.DriverTipContainer, null, /*#__PURE__*/_react.default.createElement("h1", null, t('DRIVER_TIPS', 'Driver Tips')), /*#__PURE__*/_react.default.createElement("p", null, t('100%_OF_THE_TIP_YOUR_DRIVER', '100% of the tip goes to your driver')), /*#__PURE__*/_react.default.createElement(_DriverTips.DriverTips, {