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.
- package/_bundles/{0.ordering-ui.f9c3deec77a8e21645ed.js → 0.ordering-ui.a7de4e953ec3c5879d9b.js} +1 -1
- package/_bundles/{1.ordering-ui.f9c3deec77a8e21645ed.js → 1.ordering-ui.a7de4e953ec3c5879d9b.js} +1 -1
- package/_bundles/2.ordering-ui.a7de4e953ec3c5879d9b.js +1 -0
- package/_bundles/{4.ordering-ui.f9c3deec77a8e21645ed.js → 4.ordering-ui.a7de4e953ec3c5879d9b.js} +1 -1
- package/_bundles/{5.ordering-ui.f9c3deec77a8e21645ed.js → 5.ordering-ui.a7de4e953ec3c5879d9b.js} +1 -1
- package/_bundles/{6.ordering-ui.f9c3deec77a8e21645ed.js → 6.ordering-ui.a7de4e953ec3c5879d9b.js} +1 -1
- package/_bundles/{7.ordering-ui.f9c3deec77a8e21645ed.js → 7.ordering-ui.a7de4e953ec3c5879d9b.js} +2 -2
- package/_bundles/{7.ordering-ui.f9c3deec77a8e21645ed.js.LICENSE.txt → 7.ordering-ui.a7de4e953ec3c5879d9b.js.LICENSE.txt} +0 -0
- package/_bundles/{8.ordering-ui.f9c3deec77a8e21645ed.js → 8.ordering-ui.a7de4e953ec3c5879d9b.js} +1 -1
- package/_bundles/{9.ordering-ui.f9c3deec77a8e21645ed.js → 9.ordering-ui.a7de4e953ec3c5879d9b.js} +1 -1
- package/_bundles/ordering-ui.a7de4e953ec3c5879d9b.js +2 -0
- package/_bundles/{ordering-ui.f9c3deec77a8e21645ed.js.LICENSE.txt → ordering-ui.a7de4e953ec3c5879d9b.js.LICENSE.txt} +0 -0
- package/_modules/components/BusinessInformation/index.js +4 -8
- package/_modules/components/OrdersOption/styles.js +4 -2
- package/_modules/components/Pagination/index.js +100 -0
- package/_modules/components/Pagination/styles.js +56 -0
- package/_modules/components/SmartAppBanner/index.js +2 -1
- package/_modules/components/VerticalOrdersLayout/SingleOrderCard/index.js +92 -0
- package/_modules/components/VerticalOrdersLayout/index.js +115 -41
- package/_modules/components/VerticalOrdersLayout/styles.js +25 -11
- package/_modules/index.js +7 -0
- package/_modules/themes/five/src/components/AccordionDropdown/index.js +15 -4
- package/_modules/themes/five/src/components/AccordionDropdown/styles.js +14 -4
- package/_modules/themes/five/src/components/AddressList/styles.js +2 -2
- package/_modules/themes/five/src/components/BusinessBasicInformation/index.js +17 -10
- package/_modules/themes/five/src/components/BusinessBasicInformation/styles.js +48 -42
- package/_modules/themes/five/src/components/BusinessListingSearch/index.js +5 -1
- package/_modules/themes/five/src/components/BusinessProductsCategories/index.js +0 -3
- package/_modules/themes/five/src/components/BusinessProductsCategories/layouts/groceries/index.js +22 -13
- package/_modules/themes/five/src/components/BusinessProductsCategories/layouts/groceries/styles.js +15 -7
- package/_modules/themes/five/src/components/BusinessProductsListing/index.js +3 -0
- package/_modules/themes/five/src/components/BusinessTypeFilter/index.js +15 -5
- package/_modules/themes/five/src/components/BusinessesListing/index.js +6 -13
- package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +66 -40
- package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/styles.js +13 -7
- package/_modules/themes/five/src/components/BusinessesListing/layouts/StarbucksBusinessesListing/index.js +16 -7
- package/_modules/themes/five/src/components/BusinessesListing/layouts/StarbucksBusinessesListing/styles.js +21 -15
- package/_modules/themes/five/src/components/CardForm/index.js +17 -3
- package/_modules/themes/five/src/components/CardForm/styles.js +14 -6
- package/_modules/themes/five/src/components/CartPopover/index.js +6 -4
- package/_modules/themes/five/src/components/CartPopover/styles.js +4 -2
- package/_modules/themes/five/src/components/Footer/index.js +16 -6
- package/_modules/themes/five/src/components/Footer/styles.js +11 -9
- package/_modules/themes/five/src/components/Header/index.js +14 -9
- package/_modules/themes/five/src/components/Header/styles.js +64 -44
- package/_modules/themes/five/src/components/HeaderOption/index.js +9 -2
- package/_modules/themes/five/src/components/HeaderOption/styles.js +8 -2
- package/_modules/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/index.js +9 -3
- package/_modules/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/styles.js +5 -3
- package/_modules/themes/five/src/components/HorizontalOrdersLayout/index.js +9 -19
- package/_modules/themes/five/src/components/HorizontalOrdersLayout/styles.js +23 -19
- package/_modules/themes/five/src/components/InputPhoneNumber/index.js +1 -0
- package/_modules/themes/five/src/components/LoginForm/index.js +3 -2
- package/_modules/themes/five/src/components/MyOrders/index.js +24 -56
- package/_modules/themes/five/src/components/MyOrders/styles.js +1 -1
- package/_modules/themes/five/src/components/OrderDetails/index.js +5 -2
- package/_modules/themes/five/src/components/OrderDetails/styles.js +24 -24
- package/_modules/themes/five/src/components/OrderItAgain/styles.js +6 -2
- package/_modules/themes/five/src/components/OrdersOption/index.js +18 -18
- package/_modules/themes/five/src/components/OrdersOption/styles.js +2 -2
- package/_modules/themes/five/src/components/PageBanner/index.js +50 -0
- package/_modules/themes/five/src/components/PageBanner/styles.js +18 -0
- package/_modules/themes/five/src/components/Pagination/index.js +99 -0
- package/_modules/themes/five/src/components/Pagination/styles.js +56 -0
- package/_modules/themes/five/src/components/ProductForm/index.js +39 -23
- package/_modules/themes/five/src/components/ProductForm/styles.js +74 -38
- package/_modules/themes/five/src/components/Promotions/index.js +7 -2
- package/_modules/themes/five/src/components/Promotions/styles.js +16 -14
- package/_modules/themes/five/src/components/RenderProductsLayout/index.js +31 -10
- package/_modules/themes/five/src/components/RenderProductsLayout/styles.js +19 -11
- package/_modules/themes/five/src/components/SidebarMenu/styles.js +1 -1
- package/_modules/themes/five/src/components/SignUpForm/index.js +3 -2
- package/_modules/themes/five/src/components/SingleOrderCard/index.js +7 -17
- package/_modules/themes/five/src/components/SingleProductCard/index.js +7 -298
- package/_modules/themes/five/src/components/SingleProductCard/layouts/original/index.js +310 -0
- package/_modules/themes/five/src/components/SingleProductCard/{styles.js → layouts/original/styles.js} +36 -32
- package/_modules/themes/five/src/components/SingleProductCard/layouts/starbucks/index.js +305 -0
- package/_modules/themes/five/src/components/SingleProductCard/layouts/starbucks/styles.js +143 -0
- package/_modules/themes/five/src/components/StripeElementsForm/index.js +1 -0
- package/_modules/themes/five/src/components/UserPopover/index.js +3 -1
- package/_modules/themes/five/src/components/UserPopover/styles.js +4 -3
- package/_modules/themes/five/src/components/UserProfileForm/styles.js +5 -8
- package/_modules/themes/six/src/components/BusinessController/index.js +81 -15
- package/_modules/themes/six/src/components/BusinessController/styles.js +58 -30
- package/_modules/themes/six/src/components/BusinessProductsListing/SearchProducts/index.js +5 -3
- package/_modules/themes/six/src/components/BusinessesMap/styles.js +1 -1
- package/_modules/themes/six/src/components/SearchBar/index.js +19 -10
- package/_modules/themes/six/src/components/SearchBar/styles.js +44 -16
- package/index-template.js +3 -1
- package/package.json +2 -2
- package/src/components/BusinessInformation/index.js +3 -8
- package/src/components/OrdersOption/styles.js +5 -5
- package/src/components/Pagination/index.js +107 -0
- package/src/components/Pagination/styles.js +106 -0
- package/src/components/SmartAppBanner/index.js +1 -0
- package/src/components/VerticalOrdersLayout/SingleOrderCard/index.js +89 -0
- package/src/components/VerticalOrdersLayout/index.js +86 -48
- package/src/components/VerticalOrdersLayout/styles.js +66 -22
- package/src/index.js +2 -0
- package/src/themes/five/src/components/AccordionDropdown/index.js +19 -6
- package/src/themes/five/src/components/AccordionDropdown/styles.js +25 -1
- package/src/themes/five/src/components/AddressList/styles.js +2 -0
- package/src/themes/five/src/components/BusinessBasicInformation/index.js +21 -11
- package/src/themes/five/src/components/BusinessBasicInformation/styles.js +9 -3
- package/src/themes/five/src/components/BusinessListingSearch/index.js +1 -0
- package/src/themes/five/src/components/BusinessProductsCategories/index.js +0 -2
- package/src/themes/five/src/components/BusinessProductsCategories/layouts/groceries/index.js +23 -12
- package/src/themes/five/src/components/BusinessProductsCategories/layouts/groceries/styles.js +12 -4
- package/src/themes/five/src/components/BusinessProductsListing/index.js +3 -0
- package/src/themes/five/src/components/BusinessTypeFilter/index.js +15 -5
- package/src/themes/five/src/components/BusinessesListing/index.js +5 -5
- package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +54 -25
- package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/styles.js +40 -26
- package/src/themes/five/src/components/BusinessesListing/layouts/StarbucksBusinessesListing/index.js +19 -6
- package/src/themes/five/src/components/BusinessesListing/layouts/StarbucksBusinessesListing/styles.js +38 -3
- package/src/themes/five/src/components/CardForm/index.js +49 -8
- package/src/themes/five/src/components/CardForm/styles.js +20 -2
- package/src/themes/five/src/components/CartPopover/index.js +2 -1
- package/src/themes/five/src/components/CartPopover/styles.js +3 -3
- package/src/themes/five/src/components/Footer/index.js +15 -6
- package/src/themes/five/src/components/Footer/styles.js +15 -14
- package/src/themes/five/src/components/Header/index.js +6 -4
- package/src/themes/five/src/components/Header/styles.js +14 -11
- package/src/themes/five/src/components/HeaderOption/index.js +13 -10
- package/src/themes/five/src/components/HeaderOption/styles.js +2 -2
- package/src/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/index.js +22 -10
- package/src/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/styles.js +8 -0
- package/src/themes/five/src/components/HorizontalOrdersLayout/index.js +24 -36
- package/src/themes/five/src/components/HorizontalOrdersLayout/styles.js +12 -1
- package/src/themes/five/src/components/InputPhoneNumber/index.js +1 -0
- package/src/themes/five/src/components/LoginForm/index.js +2 -1
- package/src/themes/five/src/components/MyOrders/index.js +20 -62
- package/src/themes/five/src/components/MyOrders/styles.js +1 -2
- package/src/themes/five/src/components/OrderDetails/index.js +9 -0
- package/src/themes/five/src/components/OrderDetails/styles.js +0 -55
- package/src/themes/five/src/components/OrderItAgain/styles.js +18 -0
- package/src/themes/five/src/components/OrdersOption/index.js +10 -16
- package/src/themes/five/src/components/OrdersOption/styles.js +1 -3
- package/src/themes/five/src/components/PageBanner/index.js +58 -0
- package/src/themes/five/src/components/PageBanner/styles.js +58 -0
- package/src/themes/five/src/components/Pagination/index.js +106 -0
- package/src/themes/five/src/components/Pagination/styles.js +106 -0
- package/src/themes/five/src/components/ProductForm/index.js +108 -84
- package/src/themes/five/src/components/ProductForm/styles.js +94 -12
- package/src/themes/five/src/components/Promotions/index.js +22 -16
- package/src/themes/five/src/components/Promotions/styles.js +10 -4
- package/src/themes/five/src/components/RenderProductsLayout/index.js +94 -66
- package/src/themes/five/src/components/RenderProductsLayout/styles.js +23 -22
- package/src/themes/five/src/components/SidebarMenu/styles.js +1 -1
- package/src/themes/five/src/components/SignUpForm/index.js +2 -1
- package/src/themes/five/src/components/SingleOrderCard/index.js +0 -21
- package/src/themes/five/src/components/SingleProductCard/index.js +7 -300
- package/src/themes/five/src/components/SingleProductCard/layouts/original/index.js +312 -0
- package/src/themes/five/src/components/SingleProductCard/{styles.js → layouts/original/styles.js} +9 -5
- package/src/themes/five/src/components/SingleProductCard/layouts/starbucks/index.js +313 -0
- package/src/themes/five/src/components/SingleProductCard/layouts/starbucks/styles.js +353 -0
- package/src/themes/five/src/components/StripeElementsForm/index.js +1 -0
- package/src/themes/five/src/components/UserPopover/index.js +2 -0
- package/src/themes/five/src/components/UserPopover/styles.js +2 -2
- package/src/themes/five/src/components/UserProfileForm/styles.js +3 -11
- package/src/themes/six/src/components/BusinessController/index.js +163 -62
- package/src/themes/six/src/components/BusinessController/styles.js +53 -14
- package/src/themes/six/src/components/BusinessProductsListing/SearchProducts/index.js +3 -1
- package/src/themes/six/src/components/BusinessesMap/styles.js +1 -1
- package/src/themes/six/src/components/SearchBar/index.js +27 -8
- package/src/themes/six/src/components/SearchBar/styles.js +33 -2
- package/template/app.js +364 -364
- package/template/assets/images/chew_logo.png +0 -0
- package/template/components/HelmetTags/index.js +5 -4
- package/_bundles/2.ordering-ui.f9c3deec77a8e21645ed.js +0 -1
- package/_bundles/ordering-ui.f9c3deec77a8e21645ed.js +0 -2
package/_modules/themes/five/src/components/BusinessProductsCategories/layouts/groceries/styles.js
CHANGED
|
@@ -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:
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
15
|
+
var _theme$business_listi, _theme$business_listi2, _theme$business_listi3;
|
|
22
16
|
var logosLayout = props.logosLayout;
|
|
23
|
-
var
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
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$
|
|
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)(
|
|
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
|
-
|
|
121
|
-
|
|
122
|
-
var _useState13 = (0, _react.useState)(
|
|
126
|
+
actualCity = _useState12[0],
|
|
127
|
+
setActualCity = _useState12[1];
|
|
128
|
+
var _useState13 = (0, _react.useState)(false),
|
|
123
129
|
_useState14 = _slicedToArray(_useState13, 2),
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
var _useState15 = (0, _react.useState)(
|
|
130
|
+
isPreorder = _useState14[0],
|
|
131
|
+
setIsPreorder = _useState14[1];
|
|
132
|
+
var _useState15 = (0, _react.useState)(null),
|
|
127
133
|
_useState16 = _slicedToArray(_useState15, 2),
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
var
|
|
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
|
-
|
|
134
|
-
|
|
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$
|
|
178
|
-
if (!(orderState !== null && orderState !== void 0 && (_orderState$
|
|
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$
|
|
231
|
-
changeCityFilter(cityId === (orderState === null || orderState === void 0 ? void 0 : (_orderState$
|
|
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.
|
|
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$
|
|
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$
|
|
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,
|
|
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
|
-
})),
|
|
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$
|
|
348
|
-
return (city === null || city === void 0 ? void 0 : city.id) === (orderState === null || orderState === void 0 ? void 0 : (_orderState$
|
|
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$
|
|
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)),
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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('
|
|
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
|
|
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) ===
|
|
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
|
-
})
|
|
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
|
|
84
|
+
var BusinessCityList = _styledComponents.default.div(_templateObject26 || (_templateObject26 = _taggedTemplateLiteral(["\n\n"])));
|
|
83
85
|
exports.BusinessCityList = BusinessCityList;
|
|
84
|
-
var
|
|
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
|
|
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(
|
|
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$
|
|
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 <
|
|
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
|
|
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$
|
|
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$
|
|
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
|