ordering-ui-external 1.7.2 → 1.8.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 (171) hide show
  1. package/_bundles/{0.ordering-ui.f9c3deec77a8e21645ed.js → 0.ordering-ui.a7de4e953ec3c5879d9b.js} +1 -1
  2. package/_bundles/{1.ordering-ui.f9c3deec77a8e21645ed.js → 1.ordering-ui.a7de4e953ec3c5879d9b.js} +1 -1
  3. package/_bundles/2.ordering-ui.a7de4e953ec3c5879d9b.js +1 -0
  4. package/_bundles/{4.ordering-ui.f9c3deec77a8e21645ed.js → 4.ordering-ui.a7de4e953ec3c5879d9b.js} +1 -1
  5. package/_bundles/{5.ordering-ui.f9c3deec77a8e21645ed.js → 5.ordering-ui.a7de4e953ec3c5879d9b.js} +1 -1
  6. package/_bundles/{6.ordering-ui.f9c3deec77a8e21645ed.js → 6.ordering-ui.a7de4e953ec3c5879d9b.js} +1 -1
  7. package/_bundles/{7.ordering-ui.f9c3deec77a8e21645ed.js → 7.ordering-ui.a7de4e953ec3c5879d9b.js} +2 -2
  8. package/_bundles/{7.ordering-ui.f9c3deec77a8e21645ed.js.LICENSE.txt → 7.ordering-ui.a7de4e953ec3c5879d9b.js.LICENSE.txt} +0 -0
  9. package/_bundles/{8.ordering-ui.f9c3deec77a8e21645ed.js → 8.ordering-ui.a7de4e953ec3c5879d9b.js} +1 -1
  10. package/_bundles/{9.ordering-ui.f9c3deec77a8e21645ed.js → 9.ordering-ui.a7de4e953ec3c5879d9b.js} +1 -1
  11. package/_bundles/ordering-ui.a7de4e953ec3c5879d9b.js +2 -0
  12. package/_bundles/{ordering-ui.f9c3deec77a8e21645ed.js.LICENSE.txt → ordering-ui.a7de4e953ec3c5879d9b.js.LICENSE.txt} +0 -0
  13. package/_modules/components/BusinessInformation/index.js +4 -8
  14. package/_modules/components/OrdersOption/styles.js +4 -2
  15. package/_modules/components/Pagination/index.js +100 -0
  16. package/_modules/components/Pagination/styles.js +56 -0
  17. package/_modules/components/SmartAppBanner/index.js +2 -1
  18. package/_modules/components/VerticalOrdersLayout/SingleOrderCard/index.js +92 -0
  19. package/_modules/components/VerticalOrdersLayout/index.js +115 -41
  20. package/_modules/components/VerticalOrdersLayout/styles.js +25 -11
  21. package/_modules/index.js +7 -0
  22. package/_modules/themes/five/src/components/AccordionDropdown/index.js +15 -4
  23. package/_modules/themes/five/src/components/AccordionDropdown/styles.js +14 -4
  24. package/_modules/themes/five/src/components/AddressList/styles.js +2 -2
  25. package/_modules/themes/five/src/components/BusinessBasicInformation/index.js +17 -10
  26. package/_modules/themes/five/src/components/BusinessBasicInformation/styles.js +48 -42
  27. package/_modules/themes/five/src/components/BusinessListingSearch/index.js +5 -1
  28. package/_modules/themes/five/src/components/BusinessProductsCategories/index.js +0 -3
  29. package/_modules/themes/five/src/components/BusinessProductsCategories/layouts/groceries/index.js +22 -13
  30. package/_modules/themes/five/src/components/BusinessProductsCategories/layouts/groceries/styles.js +15 -7
  31. package/_modules/themes/five/src/components/BusinessProductsListing/index.js +3 -0
  32. package/_modules/themes/five/src/components/BusinessTypeFilter/index.js +15 -5
  33. package/_modules/themes/five/src/components/BusinessesListing/index.js +6 -13
  34. package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +66 -40
  35. package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/styles.js +13 -7
  36. package/_modules/themes/five/src/components/BusinessesListing/layouts/StarbucksBusinessesListing/index.js +16 -7
  37. package/_modules/themes/five/src/components/BusinessesListing/layouts/StarbucksBusinessesListing/styles.js +21 -15
  38. package/_modules/themes/five/src/components/CardForm/index.js +17 -3
  39. package/_modules/themes/five/src/components/CardForm/styles.js +14 -6
  40. package/_modules/themes/five/src/components/CartPopover/index.js +6 -4
  41. package/_modules/themes/five/src/components/CartPopover/styles.js +4 -2
  42. package/_modules/themes/five/src/components/Footer/index.js +16 -6
  43. package/_modules/themes/five/src/components/Footer/styles.js +11 -9
  44. package/_modules/themes/five/src/components/Header/index.js +14 -9
  45. package/_modules/themes/five/src/components/Header/styles.js +64 -44
  46. package/_modules/themes/five/src/components/HeaderOption/index.js +9 -2
  47. package/_modules/themes/five/src/components/HeaderOption/styles.js +8 -2
  48. package/_modules/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/index.js +9 -3
  49. package/_modules/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/styles.js +5 -3
  50. package/_modules/themes/five/src/components/HorizontalOrdersLayout/index.js +9 -19
  51. package/_modules/themes/five/src/components/HorizontalOrdersLayout/styles.js +23 -19
  52. package/_modules/themes/five/src/components/InputPhoneNumber/index.js +1 -0
  53. package/_modules/themes/five/src/components/LoginForm/index.js +3 -2
  54. package/_modules/themes/five/src/components/MyOrders/index.js +24 -56
  55. package/_modules/themes/five/src/components/MyOrders/styles.js +1 -1
  56. package/_modules/themes/five/src/components/OrderDetails/index.js +5 -2
  57. package/_modules/themes/five/src/components/OrderDetails/styles.js +24 -24
  58. package/_modules/themes/five/src/components/OrderItAgain/styles.js +6 -2
  59. package/_modules/themes/five/src/components/OrdersOption/index.js +18 -18
  60. package/_modules/themes/five/src/components/OrdersOption/styles.js +2 -2
  61. package/_modules/themes/five/src/components/PageBanner/index.js +50 -0
  62. package/_modules/themes/five/src/components/PageBanner/styles.js +18 -0
  63. package/_modules/themes/five/src/components/Pagination/index.js +99 -0
  64. package/_modules/themes/five/src/components/Pagination/styles.js +56 -0
  65. package/_modules/themes/five/src/components/ProductForm/index.js +39 -23
  66. package/_modules/themes/five/src/components/ProductForm/styles.js +74 -38
  67. package/_modules/themes/five/src/components/Promotions/index.js +7 -2
  68. package/_modules/themes/five/src/components/Promotions/styles.js +16 -14
  69. package/_modules/themes/five/src/components/RenderProductsLayout/index.js +31 -10
  70. package/_modules/themes/five/src/components/RenderProductsLayout/styles.js +19 -11
  71. package/_modules/themes/five/src/components/SidebarMenu/styles.js +1 -1
  72. package/_modules/themes/five/src/components/SignUpForm/index.js +3 -2
  73. package/_modules/themes/five/src/components/SingleOrderCard/index.js +7 -17
  74. package/_modules/themes/five/src/components/SingleProductCard/index.js +7 -298
  75. package/_modules/themes/five/src/components/SingleProductCard/layouts/original/index.js +310 -0
  76. package/_modules/themes/five/src/components/SingleProductCard/{styles.js → layouts/original/styles.js} +36 -32
  77. package/_modules/themes/five/src/components/SingleProductCard/layouts/starbucks/index.js +305 -0
  78. package/_modules/themes/five/src/components/SingleProductCard/layouts/starbucks/styles.js +143 -0
  79. package/_modules/themes/five/src/components/StripeElementsForm/index.js +1 -0
  80. package/_modules/themes/five/src/components/UserPopover/index.js +3 -1
  81. package/_modules/themes/five/src/components/UserPopover/styles.js +4 -3
  82. package/_modules/themes/five/src/components/UserProfileForm/styles.js +5 -8
  83. package/_modules/themes/six/src/components/BusinessController/index.js +81 -15
  84. package/_modules/themes/six/src/components/BusinessController/styles.js +58 -30
  85. package/_modules/themes/six/src/components/BusinessProductsListing/SearchProducts/index.js +5 -3
  86. package/_modules/themes/six/src/components/BusinessesMap/styles.js +1 -1
  87. package/_modules/themes/six/src/components/SearchBar/index.js +19 -10
  88. package/_modules/themes/six/src/components/SearchBar/styles.js +44 -16
  89. package/index-template.js +3 -1
  90. package/package.json +2 -2
  91. package/src/components/BusinessInformation/index.js +3 -8
  92. package/src/components/OrdersOption/styles.js +5 -5
  93. package/src/components/Pagination/index.js +107 -0
  94. package/src/components/Pagination/styles.js +106 -0
  95. package/src/components/SmartAppBanner/index.js +1 -0
  96. package/src/components/VerticalOrdersLayout/SingleOrderCard/index.js +89 -0
  97. package/src/components/VerticalOrdersLayout/index.js +86 -48
  98. package/src/components/VerticalOrdersLayout/styles.js +66 -22
  99. package/src/index.js +2 -0
  100. package/src/themes/five/src/components/AccordionDropdown/index.js +19 -6
  101. package/src/themes/five/src/components/AccordionDropdown/styles.js +25 -1
  102. package/src/themes/five/src/components/AddressList/styles.js +2 -0
  103. package/src/themes/five/src/components/BusinessBasicInformation/index.js +21 -11
  104. package/src/themes/five/src/components/BusinessBasicInformation/styles.js +9 -3
  105. package/src/themes/five/src/components/BusinessListingSearch/index.js +1 -0
  106. package/src/themes/five/src/components/BusinessProductsCategories/index.js +0 -2
  107. package/src/themes/five/src/components/BusinessProductsCategories/layouts/groceries/index.js +23 -12
  108. package/src/themes/five/src/components/BusinessProductsCategories/layouts/groceries/styles.js +12 -4
  109. package/src/themes/five/src/components/BusinessProductsListing/index.js +3 -0
  110. package/src/themes/five/src/components/BusinessTypeFilter/index.js +15 -5
  111. package/src/themes/five/src/components/BusinessesListing/index.js +5 -5
  112. package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +54 -25
  113. package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/styles.js +40 -26
  114. package/src/themes/five/src/components/BusinessesListing/layouts/StarbucksBusinessesListing/index.js +19 -6
  115. package/src/themes/five/src/components/BusinessesListing/layouts/StarbucksBusinessesListing/styles.js +38 -3
  116. package/src/themes/five/src/components/CardForm/index.js +49 -8
  117. package/src/themes/five/src/components/CardForm/styles.js +20 -2
  118. package/src/themes/five/src/components/CartPopover/index.js +2 -1
  119. package/src/themes/five/src/components/CartPopover/styles.js +3 -3
  120. package/src/themes/five/src/components/Footer/index.js +15 -6
  121. package/src/themes/five/src/components/Footer/styles.js +15 -14
  122. package/src/themes/five/src/components/Header/index.js +6 -4
  123. package/src/themes/five/src/components/Header/styles.js +14 -11
  124. package/src/themes/five/src/components/HeaderOption/index.js +13 -10
  125. package/src/themes/five/src/components/HeaderOption/styles.js +2 -2
  126. package/src/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/index.js +22 -10
  127. package/src/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/styles.js +8 -0
  128. package/src/themes/five/src/components/HorizontalOrdersLayout/index.js +24 -36
  129. package/src/themes/five/src/components/HorizontalOrdersLayout/styles.js +12 -1
  130. package/src/themes/five/src/components/InputPhoneNumber/index.js +1 -0
  131. package/src/themes/five/src/components/LoginForm/index.js +2 -1
  132. package/src/themes/five/src/components/MyOrders/index.js +20 -62
  133. package/src/themes/five/src/components/MyOrders/styles.js +1 -2
  134. package/src/themes/five/src/components/OrderDetails/index.js +9 -0
  135. package/src/themes/five/src/components/OrderDetails/styles.js +0 -55
  136. package/src/themes/five/src/components/OrderItAgain/styles.js +18 -0
  137. package/src/themes/five/src/components/OrdersOption/index.js +10 -16
  138. package/src/themes/five/src/components/OrdersOption/styles.js +1 -3
  139. package/src/themes/five/src/components/PageBanner/index.js +58 -0
  140. package/src/themes/five/src/components/PageBanner/styles.js +58 -0
  141. package/src/themes/five/src/components/Pagination/index.js +106 -0
  142. package/src/themes/five/src/components/Pagination/styles.js +106 -0
  143. package/src/themes/five/src/components/ProductForm/index.js +108 -84
  144. package/src/themes/five/src/components/ProductForm/styles.js +94 -12
  145. package/src/themes/five/src/components/Promotions/index.js +22 -16
  146. package/src/themes/five/src/components/Promotions/styles.js +10 -4
  147. package/src/themes/five/src/components/RenderProductsLayout/index.js +94 -66
  148. package/src/themes/five/src/components/RenderProductsLayout/styles.js +23 -22
  149. package/src/themes/five/src/components/SidebarMenu/styles.js +1 -1
  150. package/src/themes/five/src/components/SignUpForm/index.js +2 -1
  151. package/src/themes/five/src/components/SingleOrderCard/index.js +0 -21
  152. package/src/themes/five/src/components/SingleProductCard/index.js +7 -300
  153. package/src/themes/five/src/components/SingleProductCard/layouts/original/index.js +312 -0
  154. package/src/themes/five/src/components/SingleProductCard/{styles.js → layouts/original/styles.js} +9 -5
  155. package/src/themes/five/src/components/SingleProductCard/layouts/starbucks/index.js +313 -0
  156. package/src/themes/five/src/components/SingleProductCard/layouts/starbucks/styles.js +353 -0
  157. package/src/themes/five/src/components/StripeElementsForm/index.js +1 -0
  158. package/src/themes/five/src/components/UserPopover/index.js +2 -0
  159. package/src/themes/five/src/components/UserPopover/styles.js +2 -2
  160. package/src/themes/five/src/components/UserProfileForm/styles.js +3 -11
  161. package/src/themes/six/src/components/BusinessController/index.js +163 -62
  162. package/src/themes/six/src/components/BusinessController/styles.js +53 -14
  163. package/src/themes/six/src/components/BusinessProductsListing/SearchProducts/index.js +3 -1
  164. package/src/themes/six/src/components/BusinessesMap/styles.js +1 -1
  165. package/src/themes/six/src/components/SearchBar/index.js +27 -8
  166. package/src/themes/six/src/components/SearchBar/styles.js +33 -2
  167. package/template/app.js +364 -364
  168. package/template/assets/images/chew_logo.png +0 -0
  169. package/template/components/HelmetTags/index.js +5 -4
  170. package/_bundles/2.ordering-ui.f9c3deec77a8e21645ed.js +0 -1
  171. package/_bundles/ordering-ui.f9c3deec77a8e21645ed.js +0 -2
@@ -4,27 +4,35 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.CategoryTab = exports.CategoriesWrap = exports.CategoriesContainer = void 0;
7
+ exports.IterateCategoriesContainer = exports.CategoryTab = exports.CategoriesWrap = exports.CategoriesContainer = void 0;
8
8
  var _styledComponents = _interopRequireWildcard(require("styled-components"));
9
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
9
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
10
10
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
11
11
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
12
12
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
13
- var CategoriesWrap = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n width: 100%;\n @media (min-width: 933px){\n width: calc(100% - 40px);\n }\n"])));
13
+ var CategoriesWrap = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n width: 100%;\n border: 1px solid #ccc;\n border-radius: 7.6px;\n @media (min-width: 993){\n width: calc(100% - 40px);\n border: 0;\n padding: 0;\n }\n"])));
14
14
  exports.CategoriesWrap = CategoriesWrap;
15
- var CategoriesContainer = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n overflow-x: auto;\n padding: 5px;\n padding-bottom: 0;\n background: ", ";\n z-index: 1000;\n text-align: center;\n width: 100%;\n top: 45px;\n position: sticky;\n\n div.category {\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n }\n\n div.special{\n ", "\n }\n\n @media (min-width: 381px) {\n padding: 15px 15px 0 0;\n }\n"])), function (props) {
15
+ var CategoriesContainer = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n overflow-x: auto;\n padding: 5px;\n padding-bottom: 0;\n background: ", ";\n z-index: 1000;\n text-align: center;\n width: 100%;\n top: 45px;\n position: sticky;\n div.category {\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n }\n\n div.special{\n ", "\n }\n\n @media (min-width: 381px) {\n padding: 15px 15px 0 0;\n }\n"])), function (props) {
16
16
  return props.theme.colors.backgroundPage;
17
17
  }, function (props) {
18
18
  return !props.featured && (0, _styledComponents.css)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: none;\n "])));
19
19
  });
20
20
  exports.CategoriesContainer = CategoriesContainer;
21
- var CategoryTab = _styledComponents.default.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n padding: 10px 15px;\n cursor: pointer;\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-left: ", "px;\n border-radius: 8px;\n text-align: left;\n\n span {\n width: 90%;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n }\n\n ", "\n"])), function (props) {
21
+ var CategoryTab = _styledComponents.default.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n padding: 10px 15px;\n cursor: pointer;\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-left: ", "px;\n text-align: left;\n border-bottom: ", ";\n span {\n width: 90%;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n }\n\n ", "\n"])), function (props) {
22
22
  var _props$categorySpace;
23
23
  return (_props$categorySpace = props.categorySpace) !== null && _props$categorySpace !== void 0 ? _props$categorySpace : 0;
24
24
  }, function (_ref) {
25
- var active = _ref.active;
25
+ var isSub = _ref.isSub;
26
+ return !isSub ? '1px solid #ccc' : '';
27
+ }, function (_ref2) {
28
+ var active = _ref2.active;
26
29
  return active && (0, _styledComponents.css)(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n background-color: ", ";\n "])), function (props) {
27
30
  return props.theme.colors.primaryContrast;
28
31
  });
29
32
  });
30
- exports.CategoryTab = CategoryTab;
33
+ exports.CategoryTab = CategoryTab;
34
+ var IterateCategoriesContainer = _styledComponents.default.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n div.level-1 {\n border-bottom: ", " !important;\n }\n"])), function (_ref3) {
35
+ var isSub = _ref3.isSub;
36
+ return !isSub ? '1px solid #ccc' : '';
37
+ });
38
+ exports.IterateCategoriesContainer = IterateCategoriesContainer;
@@ -458,6 +458,9 @@ var BusinessProductsListingUI = function BusinessProductsListingUI(props) {
458
458
  useKioskApp: props.useKioskApp,
459
459
  product: productModal.product || curProduct,
460
460
  businessId: business === null || business === void 0 ? void 0 : business.id,
461
+ categoryId: curProduct === null || curProduct === void 0 ? void 0 : curProduct.category_id,
462
+ productId: curProduct === null || curProduct === void 0 ? void 0 : curProduct.id,
463
+ handleUpdateProducts: handleUpdateProducts,
461
464
  onSave: handlerProductAction,
462
465
  productAddedToCartLength: (currentCart === null || currentCart === void 0 ? void 0 : (_currentCart$products7 = currentCart.products) === null || _currentCart$products7 === void 0 ? void 0 : _currentCart$products7.reduce(function (productsLength, Cproduct) {
463
466
  var _ref3;
@@ -9,6 +9,7 @@ var _react = _interopRequireWildcard(require("react"));
9
9
  var _reactLoadingSkeleton = _interopRequireDefault(require("react-loading-skeleton"));
10
10
  var _reactBootstrapIcons = require("react-bootstrap-icons");
11
11
  var _orderingComponentsExternal = require("ordering-components-external");
12
+ var _styledComponents = require("styled-components");
12
13
  var _Tabs = require("../../styles/Tabs");
13
14
  var _styles = require("./styles");
14
15
  var _AutoScroll = require("../../../../../components/AutoScroll");
@@ -33,7 +34,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
33
34
  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
35
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
35
36
  var BusinessTypeFilterUI = function BusinessTypeFilterUI(props) {
36
- var _props$beforeElements, _props$beforeComponen, _props$afterComponent, _props$afterElements;
37
+ var _theme$business_listi, _theme$business_listi2, _theme$business_listi3, _theme$business_listi4, _theme$business_listi5, _props$beforeElements, _props$beforeComponen, _props$afterComponent, _props$afterElements;
37
38
  var typesState = props.typesState,
38
39
  currentTypeSelected = props.currentTypeSelected,
39
40
  handleChangeBusinessType = props.handleChangeBusinessType,
@@ -51,8 +52,10 @@ var BusinessTypeFilterUI = function BusinessTypeFilterUI(props) {
51
52
  _useState2 = _slicedToArray(_useState, 2),
52
53
  load = _useState2[0],
53
54
  setLoad = _useState2[1];
55
+ var theme = (0, _styledComponents.useTheme)();
56
+ var isCategoriesHidden = 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.categories) === 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.all) === null || _theme$business_listi5 === void 0 ? void 0 : _theme$business_listi5.hidden;
54
57
  var handleChangeCategory = function handleChangeCategory(category) {
55
- if (isAppoint && category === currentTypeSelected) {
58
+ if (isAppoint && category === currentTypeSelected && !isCategoriesHidden) {
56
59
  handleChangeBusinessType(null);
57
60
  return;
58
61
  }
@@ -73,6 +76,14 @@ var BusinessTypeFilterUI = function BusinessTypeFilterUI(props) {
73
76
  handleChangeFilters('business_types', [].concat(_toConsumableArray(filters === null || filters === void 0 ? void 0 : filters.business_types), [type === null || type === void 0 ? void 0 : type.id]));
74
77
  }
75
78
  };
79
+ (0, _react.useEffect)(function () {
80
+ if (isCategoriesHidden && currentTypeSelected === null) {
81
+ if (types && (types === null || types === void 0 ? void 0 : types.length) > 0) {
82
+ var _types$;
83
+ !isSearchMode && !isAppoint && handleChangeCategory((_types$ = types[1]) === null || _types$ === void 0 ? void 0 : _types$.id);
84
+ }
85
+ }
86
+ }, [types, currentTypeSelected]);
76
87
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, (_props$beforeElements = props.beforeElements) === null || _props$beforeElements === void 0 ? void 0 : _props$beforeElements.map(function (BeforeElement, i) {
77
88
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
78
89
  key: i
@@ -126,10 +137,9 @@ var BusinessTypeFilterUI = function BusinessTypeFilterUI(props) {
126
137
  })))), !loading && !error && types && types.length > 0 && /*#__PURE__*/_react.default.createElement(_Tabs.Tabs, {
127
138
  variant: "primary"
128
139
  }, /*#__PURE__*/_react.default.createElement(_AutoScroll.AutoScroll, null, types.map(function (type, i) {
129
- return type.enabled && /*#__PURE__*/_react.default.createElement(_Tabs.Tab, {
140
+ return (isCategoriesHidden ? type.enabled && type.name !== 'All' : type.enabled) && /*#__PURE__*/_react.default.createElement(_Tabs.Tab, {
130
141
  key: type.id,
131
- active: type.id === currentTypeSelected,
132
- className: "category"
142
+ active: type.id === currentTypeSelected || i === 0
133
143
  }, /*#__PURE__*/_react.default.createElement(_styles.BusinessCategoryTitle, {
134
144
  active: type.id === currentTypeSelected,
135
145
  load: load,
@@ -9,21 +9,14 @@ var _OriginalBusinessesListing = require("./layouts/OriginalBusinessesListing");
9
9
  var _RedBusinessesListing = require("./layouts/RedBusinessesListing");
10
10
  var _StarbucksBusinessesListing = require("./layouts/StarbucksBusinessesListing");
11
11
  var _AppointmentsBusinessListing = require("./layouts/AppointmentsBusinessListing");
12
- var _orderingComponentsExternal = require("ordering-components-external");
12
+ var _styledComponents = require("styled-components");
13
13
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
15
- function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
16
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
17
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
18
- 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; } }
19
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
20
14
  var BusinessesListing = function BusinessesListing(props) {
21
- var _orderingTheme$theme, _orderingTheme$theme$, _orderingTheme$theme$2, _orderingTheme$theme$3;
15
+ var _theme$business_listi, _theme$business_listi2, _theme$business_listi3;
22
16
  var logosLayout = props.logosLayout;
23
- var _useOrderingTheme = (0, _orderingComponentsExternal.useOrderingTheme)(),
24
- _useOrderingTheme2 = _slicedToArray(_useOrderingTheme, 1),
25
- orderingTheme = _useOrderingTheme2[0];
26
- var layout = (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.type) || 'original';
27
- return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, (layout === 'original' || logosLayout) && /*#__PURE__*/_react.default.createElement(_OriginalBusinessesListing.OriginalBusinessesListing, props), layout === 'starbucks' && !logosLayout && /*#__PURE__*/_react.default.createElement(_StarbucksBusinessesListing.StarbucksBusinessesListing, props), layout === 'red' && !logosLayout && /*#__PURE__*/_react.default.createElement(_RedBusinessesListing.RedBusinessesListing, props), layout === 'appointments' && !logosLayout && /*#__PURE__*/_react.default.createElement(_AppointmentsBusinessListing.BusinessListing, props));
17
+ var theme = (0, _styledComponents.useTheme)();
18
+ var layout = (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.type) || 'original';
19
+ var isStarbucksLayout = ['starbucks', 'mapview'].includes(layout);
20
+ return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, (layout === 'original' || logosLayout) && /*#__PURE__*/_react.default.createElement(_OriginalBusinessesListing.OriginalBusinessesListing, props), isStarbucksLayout && !logosLayout && /*#__PURE__*/_react.default.createElement(_StarbucksBusinessesListing.StarbucksBusinessesListing, props), layout === 'red' && !logosLayout && /*#__PURE__*/_react.default.createElement(_RedBusinessesListing.RedBusinessesListing, props), layout === 'appointments' && !logosLayout && /*#__PURE__*/_react.default.createElement(_AppointmentsBusinessListing.BusinessListing, props));
28
21
  };
29
22
  exports.BusinessesListing = BusinessesListing;
@@ -29,9 +29,12 @@ var _BusinessesMap = require("../../../../../../../components/BusinessesMap");
29
29
  var _HighestRated = require("../../../HighestRated");
30
30
  var _BusinessPreorder = require("../../../BusinessPreorder");
31
31
  var _OrderProgress = require("../../../OrderProgress");
32
+ var _PageBanner = require("../../../PageBanner");
32
33
  var _reactLoadingSkeleton = _interopRequireDefault(require("react-loading-skeleton"));
33
34
  var _MomentPopover = require("../../../../../../pwa/src/components/MomentPopover");
34
35
  var _OrderTypeSelectorHeader = require("../../../../../../../components/OrderTypeSelectorHeader");
36
+ var _BsArrowRight = _interopRequireDefault(require("@meronex/icons/bs/BsArrowRight"));
37
+ var _AutoScroll = require("../../../AutoScroll");
35
38
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
36
39
  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); }
37
40
  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; }
@@ -53,7 +56,7 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
53
56
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
54
57
  var PIXELS_TO_SCROLL = 300;
55
58
  var BusinessesListingUI = function BusinessesListingUI(props) {
56
- 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, _businessesList$busin, _configState$configs, _configState$configs$, _businessesList$busin3, _props$beforeElements, _props$beforeComponen, _orderState$options3, _orderState$options3$, _configs$business_lis, _theme$images2, _theme$images2$genera, _theme$business_listi11, _theme$business_listi12, _theme$business_listi13, _theme$business_listi14, _Object$values, _citiesState$cities2, _citiesState$cities3, _citiesState$cities3$, _configs$advanced_bus, _orderState$options5, _orderState$options5$, _configs$advanced_bus2, _orderState$options6, _orderState$options6$, _businessesList$busin6, _businessesList$busin7, _orderState$options9, _citiesState$cities4, _props$afterComponent, _props$afterElements;
59
+ var _orderState$options, _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, _businessesList$busin, _configState$configs, _configState$configs$, _orderingTheme$theme, _orderingTheme$theme$, _orderingTheme$theme$2, _orderingTheme$theme$3, _businessesList$busin3, _props$beforeElements, _props$beforeComponen, _orderState$options4, _orderState$options4$, _configs$business_lis, _theme$images2, _theme$images2$genera, _theme$business_listi14, _theme$business_listi15, _theme$business_listi16, _theme$business_listi17, _Object$values, _configs$business_lis2, _theme$images3, _theme$images3$genera, _theme$business_listi18, _theme$business_listi19, _theme$business_listi20, _theme$business_listi21, _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, _citiesState$cities4, _props$afterComponent, _props$afterElements;
57
60
  var businessesList = props.businessesList,
58
61
  paginationProps = props.paginationProps,
59
62
  searchValue = props.searchValue,
@@ -87,6 +90,9 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
87
90
  _useConfig4 = _slicedToArray(_useConfig3, 1),
88
91
  configs = _useConfig4[0].configs;
89
92
  var windowSize = (0, _useWindowSize.useWindowSize)();
93
+ var _useOrderingTheme = (0, _orderingComponentsExternal.useOrderingTheme)(),
94
+ _useOrderingTheme2 = _slicedToArray(_useOrderingTheme, 1),
95
+ orderingTheme = _useOrderingTheme2[0].theme;
90
96
  var theme = (0, _styledComponents.useTheme)();
91
97
  var _useState = (0, _react.useState)({
92
98
  listOpen: false,
@@ -115,33 +121,39 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
115
121
  _useState10 = _slicedToArray(_useState9, 2),
116
122
  mapErrors = _useState10[0],
117
123
  setMapErrors = _useState10[1];
118
- var _useState11 = (0, _react.useState)(false),
124
+ var _useState11 = (0, _react.useState)(orderState === null || orderState === void 0 ? void 0 : (_orderState$options = orderState.options) === null || _orderState$options === void 0 ? void 0 : _orderState$options.city_id),
119
125
  _useState12 = _slicedToArray(_useState11, 2),
120
- isPreorder = _useState12[0],
121
- setIsPreorder = _useState12[1];
122
- var _useState13 = (0, _react.useState)(null),
126
+ actualCity = _useState12[0],
127
+ setActualCity = _useState12[1];
128
+ var _useState13 = (0, _react.useState)(false),
123
129
  _useState14 = _slicedToArray(_useState13, 2),
124
- preorderBusiness = _useState14[0],
125
- setPreorderBusiness = _useState14[1];
126
- var _useState15 = (0, _react.useState)(true),
130
+ isPreorder = _useState14[0],
131
+ setIsPreorder = _useState14[1];
132
+ var _useState15 = (0, _react.useState)(null),
127
133
  _useState16 = _slicedToArray(_useState15, 2),
128
- hasHighRatedBusiness = _useState16[0],
129
- setHasHighRatedBusiness = _useState16[1];
130
- var userCustomer = JSON.parse(window.localStorage.getItem('user-customer'));
131
- var _useState17 = (0, _react.useState)([]),
134
+ preorderBusiness = _useState16[0],
135
+ setPreorderBusiness = _useState16[1];
136
+ var _useState17 = (0, _react.useState)(true),
132
137
  _useState18 = _slicedToArray(_useState17, 2),
133
- favoriteIds = _useState18[0],
134
- setFavoriteIds = _useState18[1];
138
+ hasHighRatedBusiness = _useState18[0],
139
+ setHasHighRatedBusiness = _useState18[1];
140
+ var userCustomer = JSON.parse(window.localStorage.getItem('user-customer'));
141
+ var _useState19 = (0, _react.useState)([]),
142
+ _useState20 = _slicedToArray(_useState19, 2),
143
+ favoriteIds = _useState20[0],
144
+ setFavoriteIds = _useState20[1];
135
145
  var hideCities = (_theme$business_listi = theme === null || theme === void 0 ? void 0 : (_theme$business_listi2 = theme.business_listing_view) === null || _theme$business_listi2 === void 0 ? void 0 : (_theme$business_listi3 = _theme$business_listi2.components) === null || _theme$business_listi3 === void 0 ? void 0 : (_theme$business_listi4 = _theme$business_listi3.cities) === null || _theme$business_listi4 === void 0 ? void 0 : _theme$business_listi4.hidden) !== null && _theme$business_listi !== void 0 ? _theme$business_listi : true;
136
146
  var hideSearch = theme === null || theme === void 0 ? void 0 : (_theme$business_listi5 = theme.business_listing_view) === null || _theme$business_listi5 === void 0 ? void 0 : (_theme$business_listi6 = _theme$business_listi5.components) === null || _theme$business_listi6 === void 0 ? void 0 : (_theme$business_listi7 = _theme$business_listi6.search) === null || _theme$business_listi7 === void 0 ? void 0 : _theme$business_listi7.hidden;
137
147
  var hideFilter = theme === null || theme === void 0 ? void 0 : (_theme$business_listi8 = theme.business_listing_view) === 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.filter) === null || _theme$business_listi10 === void 0 ? void 0 : _theme$business_listi10.hidden;
138
148
  var hideSearchSection = hideCities && hideSearch && hideFilter;
149
+ var isAllCategoriesHidden = 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.categories) === null || _theme$business_listi13 === void 0 ? void 0 : _theme$business_listi13.hidden;
139
150
  var businessesIds = isCustomLayout && businessesList.businesses && ((_businessesList$busin = businessesList.businesses) === null || _businessesList$busin === void 0 ? void 0 : _businessesList$busin.map(function (business) {
140
151
  return business.id;
141
152
  }));
142
153
  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) {
143
154
  return Number(value);
144
155
  })) || [];
156
+ 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$3.type) === 'Chew';
145
157
  var handleScroll = (0, _react.useCallback)(function () {
146
158
  var _document$documentEle, _document$documentEle2, _businessesList$error;
147
159
  var innerHeightScrolltop = window.innerHeight + ((_document$documentEle = document.documentElement) === null || _document$documentEle === void 0 ? void 0 : _document$documentEle.scrollTop) + PIXELS_TO_SCROLL;
@@ -174,8 +186,8 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
174
186
  setOpenPopover(_objectSpread(_objectSpread({}, openPopover), {}, _defineProperty({}, type, false)));
175
187
  };
176
188
  var handleFindBusinesses = function handleFindBusinesses() {
177
- var _orderState$options, _orderState$options$a;
178
- if (!(orderState !== null && orderState !== void 0 && (_orderState$options = orderState.options) !== null && _orderState$options !== void 0 && (_orderState$options$a = _orderState$options.address) !== null && _orderState$options$a !== void 0 && _orderState$options$a.location)) {
189
+ var _orderState$options2, _orderState$options2$;
190
+ 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)) {
179
191
  setAlertState({
180
192
  open: true,
181
193
  content: [t('SELECT_AN_ADDRESS_TO_SEARCH', 'Select or add an address to search')]
@@ -227,8 +239,8 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
227
239
  }));
228
240
  };
229
241
  var handleChangeCity = function handleChangeCity(cityId) {
230
- var _orderState$options2;
231
- 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);
242
+ var _orderState$options3;
243
+ 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);
232
244
  };
233
245
  (0, _react.useEffect)(function () {
234
246
  if (preorderBusiness) setIsPreorder(true);
@@ -276,7 +288,9 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
276
288
  };
277
289
  if (logosLayout) {
278
290
  var _businessesList$busin4, _businessesList$busin5;
279
- return /*#__PURE__*/_react.default.createElement(_styles.BusinessLogosContainer, null, businessesList !== null && businessesList !== void 0 && businessesList.loading ? /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
291
+ return /*#__PURE__*/_react.default.createElement(_styles.BusinessLogosWrapper, null, /*#__PURE__*/_react.default.createElement(_styles.BusinessLogosContainer, null, /*#__PURE__*/_react.default.createElement(_AutoScroll.AutoScroll, {
292
+ scrollId: "businessLogos"
293
+ }, businessesList !== null && businessesList !== void 0 && businessesList.loading ? /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
280
294
  count: 12,
281
295
  height: 75,
282
296
  width: 75
@@ -291,7 +305,7 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
291
305
  return onBusinessClick(business);
292
306
  }
293
307
  });
294
- })));
308
+ })))));
295
309
  }
296
310
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, (_props$beforeElements = props.beforeElements) === null || _props$beforeElements === void 0 ? void 0 : _props$beforeElements.map(function (BeforeElement, i) {
297
311
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
@@ -305,7 +319,7 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
305
319
  onClick: function onClick() {
306
320
  return handleClickAddress();
307
321
  }
308
- }, /*#__PURE__*/_react.default.createElement(_FaMapMarkerAlt.default, null), /*#__PURE__*/_react.default.createElement("span", null, ((_orderState$options3 = orderState.options) === null || _orderState$options3 === void 0 ? void 0 : (_orderState$options3$ = _orderState$options3.address) === null || _orderState$options3$ === void 0 ? void 0 : _orderState$options3$.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, {
322
+ }, /*#__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, {
309
323
  configTypes: configTypes
310
324
  })), /*#__PURE__*/_react.default.createElement(_styles.ItemInline, null, /*#__PURE__*/_react.default.createElement(_MomentPopover.MomentPopover, {
311
325
  open: openPopover.moment,
@@ -316,15 +330,20 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
316
330
  return handleClosePopover('moment');
317
331
  },
318
332
  isBanner: true
319
- })))), (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' && /*#__PURE__*/_react.default.createElement(_styles.BusinessHeroImg, {
333
+ })))), (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.BusinessHeroImg, {
320
334
  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,
321
- height: 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_hero) === null || _theme$business_listi13 === void 0 ? void 0 : (_theme$business_listi14 = _theme$business_listi13.style) === null || _theme$business_listi14 === void 0 ? void 0 : _theme$business_listi14.height
322
- })), !!((_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(_styles.OrderProgressWrapper, null, /*#__PURE__*/_react.default.createElement(_OrderProgress.OrderProgress, {
335
+ height: 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_hero) === null || _theme$business_listi16 === void 0 ? void 0 : (_theme$business_listi17 = _theme$business_listi16.style) === null || _theme$business_listi17 === void 0 ? void 0 : _theme$business_listi17.height
336
+ })), !!((_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(_styles.OrderProgressWrapper, {
337
+ isChew: isChew
338
+ }, /*#__PURE__*/_react.default.createElement(_OrderProgress.OrderProgress, {
323
339
  franchiseId: props.franchiseId,
324
340
  userCustomerId: userCustomer === null || userCustomer === void 0 ? void 0 : userCustomer.id,
325
341
  asDashboard: isCustomerMode,
326
342
  isCustomerMode: isCustomerMode
327
- })), isCustomerMode && /*#__PURE__*/_react.default.createElement(OrdersSection, {
343
+ })), (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, {
344
+ bgimage: (_theme$images3 = theme.images) === null || _theme$images3 === void 0 ? void 0 : (_theme$images3$genera = _theme$images3.general) === null || _theme$images3$genera === void 0 ? void 0 : _theme$images3$genera.businessHero,
345
+ height: theme === null || theme === void 0 ? void 0 : (_theme$business_listi18 = theme.business_listing_view) === 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.business_hero) === null || _theme$business_listi20 === void 0 ? void 0 : (_theme$business_listi21 = _theme$business_listi20.style) === null || _theme$business_listi21 === void 0 ? void 0 : _theme$business_listi21.height
346
+ }), isCustomerMode && /*#__PURE__*/_react.default.createElement(OrdersSection, {
328
347
  titleContent: t('PREVIOUS_ORDERS', 'Previous orders')
329
348
  }), !isCustomerMode && !hideSearchSection && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_styles.WrapperSearch, {
330
349
  isCustomLayout: isCustomLayout,
@@ -344,8 +363,8 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
344
363
  color: "primary",
345
364
  onClick: handleOpenCities
346
365
  }, (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) {
347
- var _orderState$options4;
348
- return (city === null || city === void 0 ? void 0 : city.id) === (orderState === null || orderState === void 0 ? void 0 : (_orderState$options4 = orderState.options) === null || _orderState$options4 === void 0 ? void 0 : _orderState$options4.city_id);
366
+ var _orderState$options5;
367
+ 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);
349
368
  })) === 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, {
350
369
  onClick: function onClick() {
351
370
  return onRedirectPage({
@@ -356,7 +375,7 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
356
375
  onClick: toggleMap
357
376
  })), activeMap && /*#__PURE__*/_react.default.createElement(_BusinessesMap.BusinessesMap, {
358
377
  businessList: businessesList.businesses,
359
- 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,
378
+ 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,
360
379
  setErrors: setMapErrors
361
380
  })), hasHighRatedBusiness && !props.franchiseId && /*#__PURE__*/_react.default.createElement(_styles.HightestRatedWrapper, null, /*#__PURE__*/_react.default.createElement(_styles.Divider, null), /*#__PURE__*/_react.default.createElement(_HighestRated.HighestRated, {
362
381
  handleClickAddress: handleClickAddress,
@@ -365,7 +384,9 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
365
384
  isCustomerMode: isCustomerMode,
366
385
  favoriteIds: favoriteIds,
367
386
  setFavoriteIds: setFavoriteIds
368
- }), /*#__PURE__*/_react.default.createElement(_styles.Divider, null)), (configs && (configs === null || configs === void 0 ? void 0 : configs.business_listing_categories) !== false || !isCustomLayout) && /*#__PURE__*/_react.default.createElement(_BusinessTypeFilter.BusinessTypeFilter, {
387
+ }), /*#__PURE__*/_react.default.createElement(_styles.Divider, null)), /*#__PURE__*/_react.default.createElement(_PageBanner.PageBanner, {
388
+ position: "web_business_listing"
389
+ }), (configs && (configs === null || configs === void 0 ? void 0 : configs.business_listing_categories) !== false || !isCustomLayout) && !isAllCategoriesHidden && /*#__PURE__*/_react.default.createElement(_BusinessTypeFilter.BusinessTypeFilter, {
369
390
  images: props.images,
370
391
  businessTypes: props.businessTypes,
371
392
  defaultBusinessType: props.defaultBusinessType,
@@ -391,7 +412,7 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
391
412
  onClick: toggleMap
392
413
  }))), isCustomerMode && activeMap && /*#__PURE__*/_react.default.createElement(_BusinessesMap.BusinessesMap, {
393
414
  businessList: businessesList.businesses,
394
- 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,
415
+ 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,
395
416
  setErrors: setMapErrors
396
417
  }), !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 && /*#__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, {
397
418
  content: t('NOT_FOUND_BUSINESSES', 'No businesses to delivery / pick up at this address, please change filters or change address.')
@@ -405,14 +426,14 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
405
426
  height: '44px'
406
427
  }
407
428
  }, t('CHANGE_ADDRESS', 'Select other Address'))), (_businessesList$busin7 = businessesList.businesses) === null || _businessesList$busin7 === void 0 ? void 0 : _businessesList$busin7.map(function (business) {
408
- var _orderState$options7, _business$reviews;
429
+ var _orderState$options8, _business$reviews;
409
430
  return /*#__PURE__*/_react.default.createElement(_BusinessController.BusinessController, {
410
431
  key: business.id,
411
432
  className: "card",
412
433
  business: business,
413
434
  isBusinessOpen: business.open,
414
435
  handleCustomClick: handleBusinessClick,
415
- orderType: orderState === null || orderState === void 0 ? void 0 : (_orderState$options7 = orderState.options) === null || _orderState$options7 === void 0 ? void 0 : _orderState$options7.type,
436
+ orderType: orderState === null || orderState === void 0 ? void 0 : (_orderState$options8 = orderState.options) === null || _orderState$options8 === void 0 ? void 0 : _orderState$options8.type,
416
437
  isCustomLayout: isCustomLayout,
417
438
  isCustomerMode: isCustomerMode,
418
439
  onPreorderBusiness: setPreorderBusiness,
@@ -430,13 +451,13 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
430
451
  setFavoriteIds: setFavoriteIds
431
452
  });
432
453
  }), businessesList.loading && _toConsumableArray(Array((paginationProps === null || paginationProps === void 0 ? void 0 : paginationProps.nextPageItems) > 4 ? paginationProps.nextPageItems : 8).keys()).map(function (i) {
433
- var _orderState$options8;
454
+ var _orderState$options9;
434
455
  return /*#__PURE__*/_react.default.createElement(_BusinessController.BusinessController, {
435
456
  key: i,
436
457
  className: "card",
437
458
  business: {},
438
459
  isSkeleton: true,
439
- orderType: orderState === null || orderState === void 0 ? void 0 : (_orderState$options8 = orderState.options) === null || _orderState$options8 === void 0 ? void 0 : _orderState$options8.type
460
+ orderType: orderState === null || orderState === void 0 ? void 0 : (_orderState$options9 = orderState.options) === null || _orderState$options9 === void 0 ? void 0 : _orderState$options9.type
440
461
  });
441
462
  }))), /*#__PURE__*/_react.default.createElement(_Modal.Modal, {
442
463
  open: isPreorder,
@@ -458,7 +479,7 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
458
479
  }
459
480
  }, /*#__PURE__*/_react.default.createElement(_AddressForm.AddressForm, {
460
481
  useValidationFileds: true,
461
- address: (orderState === null || orderState === void 0 ? void 0 : (_orderState$options9 = orderState.options) === null || _orderState$options9 === void 0 ? void 0 : _orderState$options9.address) || {},
482
+ address: (orderState === null || orderState === void 0 ? void 0 : (_orderState$options10 = orderState.options) === null || _orderState$options10 === void 0 ? void 0 : _orderState$options10.address) || {},
462
483
  onClose: function onClose() {
463
484
  return setModals(_objectSpread(_objectSpread({}, modals), {}, {
464
485
  formOpen: false
@@ -497,7 +518,7 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
497
518
  },
498
519
  isCustomerMode: isCustomerMode
499
520
  })), /*#__PURE__*/_react.default.createElement(_Modal.Modal, {
500
- title: t('FILTER_BUSINESS_BY_CITY', 'Filter business by city'),
521
+ title: t('SELECT_A_STORE', 'Select a store'),
501
522
  open: modals.citiesOpen,
502
523
  width: "70%",
503
524
  onClose: function onClose() {
@@ -512,18 +533,23 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
512
533
  marginBottom: '10px'
513
534
  }
514
535
  }) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, citiesState === null || citiesState === void 0 ? void 0 : (_citiesState$cities4 = citiesState.cities) === null || _citiesState$cities4 === void 0 ? void 0 : _citiesState$cities4.map(function (city) {
515
- var _orderState$options10;
516
536
  return /*#__PURE__*/_react.default.createElement(_styles.CityItem, {
517
537
  key: city === null || city === void 0 ? void 0 : city.id,
518
538
  onClick: function onClick() {
519
- return handleChangeCity(city === null || city === void 0 ? void 0 : city.id);
539
+ return setActualCity(city === null || city === void 0 ? void 0 : city.id);
520
540
  }
521
541
  }, /*#__PURE__*/_react.default.createElement("span", {
522
542
  className: "radio"
523
- }, (city === null || city === void 0 ? void 0 : city.id) === (orderState === null || orderState === void 0 ? void 0 : (_orderState$options10 = orderState.options) === null || _orderState$options10 === void 0 ? void 0 : _orderState$options10.city_id) ? /*#__PURE__*/_react.default.createElement(_RiRadioButtonFill.default, {
543
+ }, (city === null || city === void 0 ? void 0 : city.id) === actualCity ? /*#__PURE__*/_react.default.createElement(_RiRadioButtonFill.default, {
524
544
  className: "city-checked"
525
545
  }) : /*#__PURE__*/_react.default.createElement(_IosRadioButtonOff.default, null)), city === null || city === void 0 ? void 0 : city.name);
526
- })))), /*#__PURE__*/_react.default.createElement(_Confirm.Alert, {
546
+ }), /*#__PURE__*/_react.default.createElement(_styles.ButtonWrapper, null, /*#__PURE__*/_react.default.createElement(_Buttons.Button, {
547
+ color: "primary",
548
+ disabled: actualCity === null,
549
+ onClick: function onClick() {
550
+ return handleChangeCity(actualCity);
551
+ }
552
+ }, t('CONTINUE', 'Continue')), /*#__PURE__*/_react.default.createElement(_BsArrowRight.default, null))))), /*#__PURE__*/_react.default.createElement(_Confirm.Alert, {
527
553
  title: !mapErrors ? t('SEARCH', 'Search') : t('BUSINESSES_MAP', 'Businesses Map'),
528
554
  content: alertState.content,
529
555
  acceptText: t('ACCEPT', 'Accept'),
@@ -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.OrderProgressWrapper = exports.ItemInline = exports.HightestRatedWrapper = exports.FeatureItems = exports.ErrorMessage = exports.Divider = exports.CityItem = exports.BusinessesTitle = exports.BusinessSearch = exports.BusinessLogosContainer = exports.BusinessLogo = exports.BusinessList = exports.BusinessHeroImgStyled = exports.BusinessHeroImg = exports.BusinessFeatures = exports.BusinessContainer = exports.BusinessCityList = exports.BusinessBanner = exports.AddressMenu = void 0;
7
+ exports.WrapperSearch = exports.SearchContainer = exports.PreviousOrders = exports.OrderProgressWrapper = exports.ItemInline = exports.HightestRatedWrapper = exports.FeatureItems = exports.ErrorMessage = exports.Divider = exports.CityItem = exports.ButtonWrapper = exports.BusinessesTitle = exports.BusinessSearch = exports.BusinessLogosWrapper = exports.BusinessLogosContainer = exports.BusinessLogo = exports.BusinessList = exports.BusinessHeroImgStyled = exports.BusinessHeroImg = exports.BusinessFeatures = exports.BusinessContainer = exports.BusinessCityList = exports.BusinessBanner = exports.AddressMenu = 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, _templateObject24, _templateObject25, _templateObject26, _templateObject27, _templateObject28, _templateObject29, _templateObject30, _templateObject31;
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; }
@@ -75,17 +75,23 @@ var HightestRatedWrapper = _styledComponents.default.div(_templateObject22 || (_
75
75
  exports.HightestRatedWrapper = HightestRatedWrapper;
76
76
  var Divider = _styledComponents.default.div(_templateObject23 || (_templateObject23 = _taggedTemplateLiteral(["\n background: #F8F9FA;\n height: 8px;\n width: 100%;\n"])));
77
77
  exports.Divider = Divider;
78
- var OrderProgressWrapper = _styledComponents.default.div(_templateObject24 || (_templateObject24 = _taggedTemplateLiteral(["\n padding: 45px 20px;\n"])));
78
+ var OrderProgressWrapper = _styledComponents.default.div(_templateObject24 || (_templateObject24 = _taggedTemplateLiteral(["\n padding: ", ";\n margin: 0px;\n @media (min-width: 768px) {\n margin: 0 35px;\n padding: 45px 20px;\n }\n"])), function (props) {
79
+ return props.isChew ? '110px 20px 45px' : '45px 20px';
80
+ });
79
81
  exports.OrderProgressWrapper = OrderProgressWrapper;
80
82
  var SearchContainer = _styledComponents.default.div(_templateObject25 || (_templateObject25 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n"])));
81
83
  exports.SearchContainer = SearchContainer;
82
- var BusinessCityList = _styledComponents.default.div(_templateObject26 || (_templateObject26 = _taggedTemplateLiteral(["\n \n"])));
84
+ var BusinessCityList = _styledComponents.default.div(_templateObject26 || (_templateObject26 = _taggedTemplateLiteral(["\n\n"])));
83
85
  exports.BusinessCityList = BusinessCityList;
84
- var CityItem = _styledComponents.default.div(_templateObject27 || (_templateObject27 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: flex-start;\n align-items: center;\n padding: 15px 0px;\n border-top: 1px solid #E9ECEF;\n cursor: pointer;\n span {\n margin-right: 15px;\n }\n .city-checked{\n color: ", ";\n }\n"])), function (props) {
86
+ var ButtonWrapper = _styledComponents.default.div(_templateObject27 || (_templateObject27 = _taggedTemplateLiteral(["\n position: relative;\n svg {\n position: absolute;\n right: 10px;\n top: 8px;\n font-size: 25px;\n color: #ffffff;\n }\n button {\n width: 100%;\n padding: 5px;\n }\n"])));
87
+ exports.ButtonWrapper = ButtonWrapper;
88
+ var CityItem = _styledComponents.default.div(_templateObject28 || (_templateObject28 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: flex-start;\n align-items: center;\n padding: 15px 0px;\n cursor: pointer;\n span {\n margin-right: 15px;\n }\n .city-checked{\n color: ", ";\n }\n"])), function (props) {
85
89
  return props.theme.colors.primary;
86
90
  });
87
91
  exports.CityItem = CityItem;
88
- var BusinessLogoStyled = _styledComponents.default.div(_templateObject28 || (_templateObject28 = _taggedTemplateLiteral(["\n display: flex;\n min-width: 75px;\n min-height: 75px;\n height: 75px;\n width: 75px;\n box-sizing: border-box;\n position: relative;\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"])));
92
+ var BusinessLogosWrapper = _styledComponents.default.div(_templateObject29 || (_templateObject29 = _taggedTemplateLiteral(["\n overflow: scroll hidden;\n width: 100%;\n"])));
93
+ exports.BusinessLogosWrapper = BusinessLogosWrapper;
94
+ var BusinessLogoStyled = _styledComponents.default.div(_templateObject30 || (_templateObject30 = _taggedTemplateLiteral(["\nmin-width: 100px;\nmin-height: 100px;\nheight: 100px;\nwidth: 100px;\nbox-sizing: border-box;\nbackground-repeat: no-repeat, repeat;\nbackground-size: cover;\nobject-fit: cover;\nbackground-position: center;\nborder-radius: 7.6px;\nmargin-right: 15px;\ncursor: pointer;\n"])));
89
95
  var BusinessLogo = function BusinessLogo(props) {
90
96
  var style = {};
91
97
  if (props.bgimage) {
@@ -96,5 +102,5 @@ var BusinessLogo = function BusinessLogo(props) {
96
102
  }), props.children);
97
103
  };
98
104
  exports.BusinessLogo = BusinessLogo;
99
- var BusinessLogosContainer = _styledComponents.default.div(_templateObject29 || (_templateObject29 = _taggedTemplateLiteral(["\n display: flex;\n overflow: auto;\n padding-bottom: 10px;\n span {\n margin-right: 15px;\n }\n ::-webkit-scrollbar {\n width: 6px;\n height: 6px;\n }\n"])));
105
+ var BusinessLogosContainer = _styledComponents.default.div(_templateObject31 || (_templateObject31 = _taggedTemplateLiteral(["\n display: flex;\n padding-bottom: 10px;\n"])));
100
106
  exports.BusinessLogosContainer = BusinessLogosContainer;
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.StarbucksBusinessesListing = void 0;
8
8
  var _react = _interopRequireWildcard(require("react"));
9
9
  var _FiMap = _interopRequireDefault(require("@meronex/icons/fi/FiMap"));
10
+ var _FiFilter = _interopRequireDefault(require("@meronex/icons/fi/FiFilter"));
10
11
  var _reactLoadingSkeleton = _interopRequireDefault(require("react-loading-skeleton"));
11
12
  var _orderingComponentsExternal = require("ordering-components-external");
12
13
  var _Buttons = require("../../../../../../../styles/Buttons");
@@ -21,6 +22,7 @@ var _SearchBar = require("../../../../../../six/src/components/SearchBar");
21
22
  var _AddressList = require("../../../../../../six/src/components/AddressList");
22
23
  var _AddressForm = require("../../../../../../six/src/components/AddressForm");
23
24
  var _BusinessInformation = require("../../../../../../six/src/components/BusinessInformation");
25
+ var _EiLocation = _interopRequireDefault(require("@meronex/icons/ei/EiLocation"));
24
26
  var _styles = require("./styles");
25
27
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
26
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); }
@@ -43,7 +45,7 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
43
45
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
44
46
  var PIXELS_TO_SCROLL = 500;
45
47
  var BusinessesListingUI = function BusinessesListingUI(props) {
46
- var _businessesList$busin, _props$beforeElements, _props$beforeComponen, _businessesList$busin2, _configs$google_maps_, _businessesList$busin3, _orderState$options4, _orderState$options4$, _getCustomArray, _businessesList$busin4, _orderState$options5, _props$afterComponent, _props$afterElements;
48
+ var _businessesList$busin, _props$beforeElements, _props$beforeComponen, _configs$advanced_bus2, _businessesList$busin2, _orderState$options4, _orderState$options4$, _orderState$options5, _orderState$options5$, _configs$google_maps_, _businessesList$busin3, _orderState$options6, _orderState$options6$, _getCustomArray, _businessesList$busin4, _orderState$options7, _props$afterComponent, _props$afterElements;
47
49
  var businessesList = props.businessesList,
48
50
  paginationProps = props.paginationProps,
49
51
  searchValue = props.searchValue,
@@ -210,6 +212,13 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
210
212
  page: (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' && 'business_search',
211
213
  search: "?term=".concat(term)
212
214
  });
215
+ },
216
+ isHome: true
217
+ }), (configs === null || configs === void 0 ? void 0 : (_configs$advanced_bus2 = configs.advanced_business_search_enabled) === null || _configs$advanced_bus2 === void 0 ? void 0 : _configs$advanced_bus2.value) === '1' && /*#__PURE__*/_react.default.createElement(_FiFilter.default, {
218
+ onClick: function onClick() {
219
+ return onRedirectPage({
220
+ page: 'business_search'
221
+ });
213
222
  }
214
223
  }), isCustomLayout && /*#__PURE__*/_react.default.createElement(_FiMap.default, {
215
224
  onClick: toggleMap
@@ -250,7 +259,9 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
250
259
  }, t('ERROR', 'ERROR'), ": [", (e === null || e === void 0 ? void 0 : e.message) || e, "]");
251
260
  })))), /*#__PURE__*/_react.default.createElement(_styles.MapWrapper, {
252
261
  className: "map-wrapper"
253
- }, windowSize.width < 850 && /*#__PURE__*/_react.default.createElement(_styles.WrapperSearch, {
262
+ }, windowSize.width < 576 && ((_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) && /*#__PURE__*/_react.default.createElement(_styles.AddressInput, {
263
+ onClick: handleClickAddress
264
+ }, /*#__PURE__*/_react.default.createElement(_EiLocation.default, null), /*#__PURE__*/_react.default.createElement("p", null, (_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$.address)), windowSize.width < 850 && /*#__PURE__*/_react.default.createElement(_styles.WrapperSearch, {
254
265
  isCustomLayout: isCustomLayout
255
266
  }, /*#__PURE__*/_react.default.createElement(_SearchBar.SearchBar, {
256
267
  lazyLoad: true,
@@ -260,12 +271,10 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
260
271
  onSearch: handleChangeSearch
261
272
  }), isCustomLayout && /*#__PURE__*/_react.default.createElement(_FiMap.default, {
262
273
  onClick: toggleMap
263
- })), configs !== null && configs !== void 0 && (_configs$google_maps_ = configs.google_maps_api_key) !== null && _configs$google_maps_ !== void 0 && _configs$google_maps_.value && (businessesList === null || businessesList === void 0 ? void 0 : (_businessesList$busin3 = businessesList.businesses) === null || _businessesList$busin3 === void 0 ? void 0 : _businessesList$busin3.length) > 0 ? /*#__PURE__*/_react.default.createElement(_BusinessesMap.BusinessesMap, {
274
+ })), (configs === null || configs === void 0 ? void 0 : (_configs$google_maps_ = configs.google_maps_api_key) === null || _configs$google_maps_ === void 0 ? void 0 : _configs$google_maps_.value) && (businessesList === null || businessesList === void 0 ? void 0 : (_businessesList$busin3 = businessesList.businesses) === null || _businessesList$busin3 === void 0 ? void 0 : _businessesList$busin3.length) > 0 && /*#__PURE__*/_react.default.createElement(_BusinessesMap.BusinessesMap, {
264
275
  businessList: businessesList.businesses,
265
- 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,
276
+ 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,
266
277
  setErrors: setMapErrors
267
- }) : /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
268
- width: 70
269
278
  }))) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, businessInfoById && /*#__PURE__*/_react.default.createElement(_BusinessInformation.BusinessInformation, {
270
279
  business: businessInfoById,
271
280
  getBusinessType: getBusinessType,
@@ -304,7 +313,7 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
304
313
  }
305
314
  }, /*#__PURE__*/_react.default.createElement(_AddressForm.AddressForm, {
306
315
  useValidationFileds: true,
307
- address: (orderState === null || orderState === void 0 ? void 0 : (_orderState$options5 = orderState.options) === null || _orderState$options5 === void 0 ? void 0 : _orderState$options5.address) || {},
316
+ address: (orderState === null || orderState === void 0 ? void 0 : (_orderState$options7 = orderState.options) === null || _orderState$options7 === void 0 ? void 0 : _orderState$options7.address) || {},
308
317
  onClose: function onClose() {
309
318
  return setModals(_objectSpread(_objectSpread({}, modals), {}, {
310
319
  formOpen: false