ordering-ui-external 1.9.2 → 1.9.4
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.9ce64e14904d222c0020.js +1 -0
- package/_bundles/{1.ordering-ui.8e20ae6af39ad738a29e.js → 1.ordering-ui.9ce64e14904d222c0020.js} +1 -1
- package/_bundles/{2.ordering-ui.8e20ae6af39ad738a29e.js → 2.ordering-ui.9ce64e14904d222c0020.js} +1 -1
- package/_bundles/{4.ordering-ui.8e20ae6af39ad738a29e.js → 4.ordering-ui.9ce64e14904d222c0020.js} +1 -1
- package/_bundles/{5.ordering-ui.8e20ae6af39ad738a29e.js → 5.ordering-ui.9ce64e14904d222c0020.js} +1 -1
- package/_bundles/{6.ordering-ui.8e20ae6af39ad738a29e.js → 6.ordering-ui.9ce64e14904d222c0020.js} +1 -1
- package/_bundles/{7.ordering-ui.8e20ae6af39ad738a29e.js → 7.ordering-ui.9ce64e14904d222c0020.js} +2 -2
- package/_bundles/{7.ordering-ui.8e20ae6af39ad738a29e.js.LICENSE.txt → 7.ordering-ui.9ce64e14904d222c0020.js.LICENSE.txt} +0 -0
- package/_bundles/{8.ordering-ui.8e20ae6af39ad738a29e.js → 8.ordering-ui.9ce64e14904d222c0020.js} +1 -1
- package/_bundles/{9.ordering-ui.8e20ae6af39ad738a29e.js → 9.ordering-ui.9ce64e14904d222c0020.js} +1 -1
- package/_bundles/ordering-ui.9ce64e14904d222c0020.js +2 -0
- package/_bundles/{ordering-ui.8e20ae6af39ad738a29e.js.LICENSE.txt → ordering-ui.9ce64e14904d222c0020.js.LICENSE.txt} +0 -0
- package/_modules/components/BusinessesListing/index.js +1 -3
- package/_modules/components/VerticalOrdersLayout/SingleOrderCard/index.js +26 -12
- package/_modules/components/VerticalOrdersLayout/styles.js +1 -1
- package/_modules/themes/five/index.js +7 -0
- package/_modules/themes/five/src/components/AddressList/index.js +3 -2
- package/_modules/themes/five/src/components/BusinessItemAccordion/index.js +3 -2
- package/_modules/themes/five/src/components/BusinessListingSearch/index.js +14 -6
- package/_modules/themes/five/src/components/BusinessProductsCategories/index.js +8 -3
- package/_modules/themes/five/src/components/BusinessProductsList/index.js +50 -14
- package/_modules/themes/five/src/components/BusinessProductsListing/index.js +9 -2
- package/_modules/themes/five/src/components/BusinessProductsListing/styles.js +10 -6
- package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +55 -186
- package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/styles.js +29 -40
- package/_modules/themes/five/src/components/Cart/index.js +56 -97
- package/_modules/themes/five/src/components/CartContent/index.js +50 -2
- package/_modules/themes/five/src/components/CartContent/styles.js +6 -4
- package/_modules/themes/five/src/components/Checkout/index.js +8 -2
- package/_modules/themes/five/src/components/Checkout/styles.js +10 -4
- package/_modules/themes/five/src/components/Header/index.js +26 -34
- package/_modules/themes/five/src/components/Header/styles.js +46 -35
- package/_modules/themes/five/src/components/HeaderOption/index.js +3 -2
- package/_modules/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/index.js +3 -2
- package/_modules/themes/five/src/components/MultiCheckout/index.js +22 -13
- package/_modules/themes/five/src/components/MultiCheckout/styles.js +11 -8
- package/_modules/themes/five/src/components/MultiOrdersDetails/index.js +9 -1
- package/_modules/themes/five/src/components/OrderContextUI/index.js +192 -0
- package/_modules/themes/five/src/components/OrderContextUI/styles.js +41 -0
- package/_modules/themes/five/src/components/OrderDetails/index.js +3 -0
- package/_modules/themes/five/src/components/OrdersOption/PreviousBusinessOrdered/index.js +8 -2
- package/_modules/themes/five/src/components/OrdersOption/PreviousBusinessOrdered/styles.js +8 -2
- package/_modules/themes/five/src/components/OrdersOption/index.js +2 -1
- package/_modules/themes/five/src/components/ProductItemAccordion/index.js +17 -8
- package/_modules/themes/five/src/components/ProductItemAccordion/styles.js +27 -27
- package/_modules/themes/five/src/components/ProductOptionSubOption/index.js +7 -2
- package/_modules/themes/five/src/components/ProductOptionSubOption/styles.js +17 -14
- package/_modules/themes/five/src/components/SingleOrderCard/index.js +16 -16
- package/_modules/themes/five/src/components/SingleOrderCard/styles.js +49 -41
- package/package.json +3 -2
- package/src/components/BusinessesListing/index.js +1 -3
- package/src/components/VerticalOrdersLayout/SingleOrderCard/index.js +25 -14
- package/src/components/VerticalOrdersLayout/styles.js +8 -0
- package/src/themes/five/index.js +2 -0
- package/src/themes/five/src/components/AddressList/index.js +3 -2
- package/src/themes/five/src/components/BusinessItemAccordion/index.js +2 -1
- package/src/themes/five/src/components/BusinessListingSearch/index.js +4 -0
- package/src/themes/five/src/components/BusinessProductsCategories/index.js +8 -3
- package/src/themes/five/src/components/BusinessProductsList/index.js +54 -18
- package/src/themes/five/src/components/BusinessProductsListing/index.js +14 -2
- package/src/themes/five/src/components/BusinessProductsListing/styles.js +18 -6
- package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +219 -345
- package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/styles.js +2 -77
- package/src/themes/five/src/components/Cart/index.js +50 -57
- package/src/themes/five/src/components/CartContent/index.js +43 -3
- package/src/themes/five/src/components/CartContent/styles.js +6 -0
- package/src/themes/five/src/components/Checkout/index.js +16 -2
- package/src/themes/five/src/components/Checkout/styles.js +19 -6
- package/src/themes/five/src/components/Header/index.js +281 -277
- package/src/themes/five/src/components/Header/styles.js +20 -51
- package/src/themes/five/src/components/HeaderOption/index.js +3 -2
- package/src/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/index.js +2 -1
- package/src/themes/five/src/components/MultiCheckout/index.js +27 -13
- package/src/themes/five/src/components/MultiCheckout/styles.js +8 -13
- package/src/themes/five/src/components/MultiOrdersDetails/index.js +21 -13
- package/src/themes/five/src/components/OrderContextUI/index.js +133 -0
- package/src/themes/five/src/components/OrderContextUI/styles.js +86 -0
- package/src/themes/five/src/components/OrderDetails/index.js +4 -0
- package/src/themes/five/src/components/OrdersOption/PreviousBusinessOrdered/index.js +5 -2
- package/src/themes/five/src/components/OrdersOption/PreviousBusinessOrdered/styles.js +4 -0
- package/src/themes/five/src/components/OrdersOption/index.js +2 -1
- package/src/themes/five/src/components/ProductItemAccordion/index.js +58 -40
- package/src/themes/five/src/components/ProductItemAccordion/styles.js +4 -3
- package/src/themes/five/src/components/ProductOptionSubOption/index.js +8 -1
- package/src/themes/five/src/components/ProductOptionSubOption/styles.js +6 -0
- package/src/themes/five/src/components/SingleOrderCard/index.js +12 -13
- package/src/themes/five/src/components/SingleOrderCard/styles.js +26 -7
- package/template/app.js +179 -66
- package/template/components/ListenPageChanges/index.js +3 -2
- package/template/components/OrderingThemeUpdated/index.js +41 -0
- package/template/helmetdata.json +7 -0
- package/template/pages/MessagesList/index.js +2 -0
- package/template/pages/MultiCart/index.js +30 -0
- package/template/pages/MultiCheckout/index.js +86 -10
- package/template/pages/MultiOrdersDetails/index.js +9 -4
- package/_bundles/0.ordering-ui.8e20ae6af39ad738a29e.js +0 -1
- package/_bundles/ordering-ui.8e20ae6af39ad738a29e.js +0 -2
|
@@ -9,7 +9,6 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
9
9
|
var _styledComponents = require("styled-components");
|
|
10
10
|
var _FiMap = _interopRequireDefault(require("@meronex/icons/fi/FiMap"));
|
|
11
11
|
var _FiFilter = _interopRequireDefault(require("@meronex/icons/fi/FiFilter"));
|
|
12
|
-
var _FaMapMarkerAlt = _interopRequireDefault(require("@meronex/icons/fa/FaMapMarkerAlt"));
|
|
13
12
|
var _orderingComponentsExternal = require("ordering-components-external");
|
|
14
13
|
var _styles = require("./styles");
|
|
15
14
|
var _useWindowSize = require("../../../../../../../hooks/useWindowSize");
|
|
@@ -17,8 +16,6 @@ var _Buttons = require("../../../../styles/Buttons");
|
|
|
17
16
|
var _NotFoundSource = require("../../../NotFoundSource");
|
|
18
17
|
var _Modal = require("../../../Modal");
|
|
19
18
|
var _Confirm = require("../../../Confirm");
|
|
20
|
-
var _AddressForm = require("../../../AddressForm");
|
|
21
|
-
var _AddressList = require("../../../AddressList");
|
|
22
19
|
var _SearchBar = require("../../../SearchBar");
|
|
23
20
|
var _BusinessTypeFilter = require("../../../BusinessTypeFilter");
|
|
24
21
|
var _BusinessController = require("../../../BusinessController");
|
|
@@ -29,14 +26,13 @@ var _BusinessPreorder = require("../../../BusinessPreorder");
|
|
|
29
26
|
var _OrderProgress = require("../../../OrderProgress");
|
|
30
27
|
var _PageBanner = require("../../../PageBanner");
|
|
31
28
|
var _reactLoadingSkeleton = _interopRequireDefault(require("react-loading-skeleton"));
|
|
32
|
-
var _MomentPopover = require("../../../../../../pwa/src/components/MomentPopover");
|
|
33
|
-
var _OrderTypeSelectorHeader = require("../../../../../../../components/OrderTypeSelectorHeader");
|
|
34
29
|
var _AutoScroll = require("../../../AutoScroll");
|
|
35
30
|
var _CitiesControl = require("../../../CitiesControl");
|
|
31
|
+
var _OrderContextUI = require("../../../OrderContextUI");
|
|
32
|
+
var _OrdersSection = require("./OrdersSection");
|
|
36
33
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
37
34
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
38
35
|
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; }
|
|
39
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
40
36
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
41
37
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
42
38
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
@@ -54,7 +50,7 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
|
|
|
54
50
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
55
51
|
var PIXELS_TO_SCROLL = 300;
|
|
56
52
|
var BusinessesListingUI = function BusinessesListingUI(props) {
|
|
57
|
-
var _ref, _theme$business_listi, _theme$business_listi2, _theme$business_listi3, _orderState$options, _theme$business_listi4, _theme$business_listi5, _theme$business_listi6, _theme$business_listi7, _theme$business_listi8, _theme$business_listi9, _theme$business_listi10, _theme$business_listi11, _theme$business_listi12,
|
|
53
|
+
var _ref, _theme$business_listi, _theme$business_listi2, _theme$business_listi3, _orderState$options, _theme$business_listi4, _theme$business_listi5, _theme$business_listi6, _theme$business_listi7, _theme$business_listi8, _theme$business_listi9, _theme$business_listi10, _theme$business_listi11, _theme$business_listi12, _theme$business_listi13, _theme$business_listi14, _theme$business_listi15, _theme$business_listi16, _theme$business_listi17, _theme$business_listi18, _theme$business_listi19, _theme$business_listi20, _theme$business_listi21, _businessesList$busin, _orderingTheme$theme, _orderingTheme$theme$, _orderingTheme$theme$2, _orderingTheme$theme$3, _orderingTheme$theme$4, _businessesList$busin3, _configs$business_lis, _configs$business_lis2, _theme$images2, _theme$images2$genera, _theme$business_listi22, _theme$business_listi23, _theme$business_listi24, _theme$business_listi25, _Object$values, _configs$business_lis3, _theme$images3, _theme$images3$genera, _theme$business_listi26, _theme$business_listi27, _theme$business_listi28, _theme$business_listi29, _citiesState$cities2, _citiesState$cities3, _citiesState$cities3$, _configs$advanced_bus, _orderState$options4, _orderState$options4$, _configs$advanced_bus2, _orderState$options5, _orderState$options5$, _businessesList$busin6, _businessesList$busin7;
|
|
58
54
|
var businessesList = props.businessesList,
|
|
59
55
|
paginationProps = props.paginationProps,
|
|
60
56
|
searchValue = props.searchValue,
|
|
@@ -78,15 +74,12 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
|
|
|
78
74
|
_useOrder2 = _slicedToArray(_useOrder, 2),
|
|
79
75
|
orderState = _useOrder2[0],
|
|
80
76
|
changeCityFilter = _useOrder2[1].changeCityFilter;
|
|
81
|
-
var _useConfig = (0, _orderingComponentsExternal.useConfig)(),
|
|
82
|
-
_useConfig2 = _slicedToArray(_useConfig, 1),
|
|
83
|
-
configState = _useConfig2[0];
|
|
84
77
|
var _useSession = (0, _orderingComponentsExternal.useSession)(),
|
|
85
78
|
_useSession2 = _slicedToArray(_useSession, 1),
|
|
86
79
|
auth = _useSession2[0].auth;
|
|
87
|
-
var
|
|
88
|
-
|
|
89
|
-
configs =
|
|
80
|
+
var _useConfig = (0, _orderingComponentsExternal.useConfig)(),
|
|
81
|
+
_useConfig2 = _slicedToArray(_useConfig, 1),
|
|
82
|
+
configs = _useConfig2[0].configs;
|
|
90
83
|
var windowSize = (0, _useWindowSize.useWindowSize)();
|
|
91
84
|
var _useOrderingTheme = (0, _orderingComponentsExternal.useOrderingTheme)(),
|
|
92
85
|
_useOrderingTheme2 = _slicedToArray(_useOrderingTheme, 1),
|
|
@@ -111,42 +104,38 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
|
|
|
111
104
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
112
105
|
activeMap = _useState6[0],
|
|
113
106
|
setActiveMap = _useState6[1];
|
|
114
|
-
var _useState7 = (0, _react.useState)(
|
|
107
|
+
var _useState7 = (0, _react.useState)(''),
|
|
115
108
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
var _useState9 = (0, _react.useState)(
|
|
109
|
+
mapErrors = _useState8[0],
|
|
110
|
+
setMapErrors = _useState8[1];
|
|
111
|
+
var _useState9 = (0, _react.useState)(false),
|
|
119
112
|
_useState10 = _slicedToArray(_useState9, 2),
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
var _useState11 = (0, _react.useState)(
|
|
113
|
+
isPreorder = _useState10[0],
|
|
114
|
+
setIsPreorder = _useState10[1];
|
|
115
|
+
var _useState11 = (0, _react.useState)(null),
|
|
123
116
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
var _useState13 = (0, _react.useState)(
|
|
117
|
+
preorderBusiness = _useState12[0],
|
|
118
|
+
setPreorderBusiness = _useState12[1];
|
|
119
|
+
var _useState13 = (0, _react.useState)(true),
|
|
127
120
|
_useState14 = _slicedToArray(_useState13, 2),
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
var _useState15 = (0, _react.useState)(true),
|
|
131
|
-
_useState16 = _slicedToArray(_useState15, 2),
|
|
132
|
-
hasHighRatedBusiness = _useState16[0],
|
|
133
|
-
setHasHighRatedBusiness = _useState16[1];
|
|
121
|
+
hasHighRatedBusiness = _useState14[0],
|
|
122
|
+
setHasHighRatedBusiness = _useState14[1];
|
|
134
123
|
var userCustomer = JSON.parse(window.localStorage.getItem('user-customer'));
|
|
135
|
-
var
|
|
136
|
-
|
|
137
|
-
favoriteIds =
|
|
138
|
-
setFavoriteIds =
|
|
124
|
+
var _useState15 = (0, _react.useState)([]),
|
|
125
|
+
_useState16 = _slicedToArray(_useState15, 2),
|
|
126
|
+
favoriteIds = _useState16[0],
|
|
127
|
+
setFavoriteIds = _useState16[1];
|
|
139
128
|
var hideCities = (_ref = (theme === null || theme === void 0 ? void 0 : (_theme$business_listi = theme.business_listing_view) === null || _theme$business_listi === void 0 ? void 0 : (_theme$business_listi2 = _theme$business_listi.components) === null || _theme$business_listi2 === void 0 ? void 0 : (_theme$business_listi3 = _theme$business_listi2.cities) === null || _theme$business_listi3 === void 0 ? void 0 : _theme$business_listi3.hidden) || (orderState === null || orderState === void 0 ? void 0 : (_orderState$options = orderState.options) === null || _orderState$options === void 0 ? void 0 : _orderState$options.type) !== 2) !== null && _ref !== void 0 ? _ref : true;
|
|
140
129
|
var hideSearch = theme === null || theme === void 0 ? void 0 : (_theme$business_listi4 = theme.business_listing_view) === null || _theme$business_listi4 === void 0 ? void 0 : (_theme$business_listi5 = _theme$business_listi4.components) === null || _theme$business_listi5 === void 0 ? void 0 : (_theme$business_listi6 = _theme$business_listi5.search) === null || _theme$business_listi6 === void 0 ? void 0 : _theme$business_listi6.hidden;
|
|
141
130
|
var hideFilter = (theme === null || theme === void 0 ? void 0 : (_theme$business_listi7 = theme.business_listing_view) === null || _theme$business_listi7 === void 0 ? void 0 : (_theme$business_listi8 = _theme$business_listi7.components) === null || _theme$business_listi8 === void 0 ? void 0 : (_theme$business_listi9 = _theme$business_listi8.filter) === null || _theme$business_listi9 === void 0 ? void 0 : _theme$business_listi9.hidden) || hideSearch;
|
|
131
|
+
var hideHero = theme === null || theme === void 0 ? void 0 : (_theme$business_listi10 = theme.business_listing_view) === null || _theme$business_listi10 === void 0 ? void 0 : (_theme$business_listi11 = _theme$business_listi10.components) === null || _theme$business_listi11 === void 0 ? void 0 : (_theme$business_listi12 = _theme$business_listi11.business_hero) === null || _theme$business_listi12 === void 0 ? void 0 : _theme$business_listi12.hidden;
|
|
132
|
+
var hidePreviousOrders = theme === null || theme === void 0 ? void 0 : (_theme$business_listi13 = theme.business_listing_view) === null || _theme$business_listi13 === void 0 ? void 0 : (_theme$business_listi14 = _theme$business_listi13.components) === null || _theme$business_listi14 === void 0 ? void 0 : (_theme$business_listi15 = _theme$business_listi14.previous_orders_block) === null || _theme$business_listi15 === void 0 ? void 0 : _theme$business_listi15.hidden;
|
|
133
|
+
var hideHighestBusiness = theme === null || theme === void 0 ? void 0 : (_theme$business_listi16 = theme.business_listing_view) === null || _theme$business_listi16 === void 0 ? void 0 : (_theme$business_listi17 = _theme$business_listi16.components) === null || _theme$business_listi17 === void 0 ? void 0 : (_theme$business_listi18 = _theme$business_listi17.highest_rated_business_block) === null || _theme$business_listi18 === void 0 ? void 0 : _theme$business_listi18.hidden;
|
|
142
134
|
var hideSearchSection = hideCities && hideSearch && hideFilter;
|
|
143
|
-
var isAllCategoriesHidden = theme === null || theme === void 0 ? void 0 : (_theme$
|
|
144
|
-
var businessesIds =
|
|
135
|
+
var isAllCategoriesHidden = theme === null || theme === void 0 ? void 0 : (_theme$business_listi19 = theme.business_listing_view) === null || _theme$business_listi19 === void 0 ? void 0 : (_theme$business_listi20 = _theme$business_listi19.components) === null || _theme$business_listi20 === void 0 ? void 0 : (_theme$business_listi21 = _theme$business_listi20.categories) === null || _theme$business_listi21 === void 0 ? void 0 : _theme$business_listi21.hidden;
|
|
136
|
+
var businessesIds = businessesList.businesses && ((_businessesList$busin = businessesList.businesses) === null || _businessesList$busin === void 0 ? void 0 : _businessesList$busin.map(function (business) {
|
|
145
137
|
return business.id;
|
|
146
138
|
}));
|
|
147
|
-
var configTypes = (configState === null || configState === void 0 ? void 0 : (_configState$configs = configState.configs) === null || _configState$configs === void 0 ? void 0 : (_configState$configs$ = _configState$configs.order_types_allowed) === null || _configState$configs$ === void 0 ? void 0 : _configState$configs$.value.split('|').map(function (value) {
|
|
148
|
-
return Number(value);
|
|
149
|
-
})) || [];
|
|
150
139
|
var isChew = (orderingTheme === null || orderingTheme === void 0 ? void 0 : (_orderingTheme$theme = orderingTheme.theme) === null || _orderingTheme$theme === void 0 ? void 0 : (_orderingTheme$theme$ = _orderingTheme$theme.header) === null || _orderingTheme$theme$ === void 0 ? void 0 : (_orderingTheme$theme$2 = _orderingTheme$theme$.components) === null || _orderingTheme$theme$2 === void 0 ? void 0 : (_orderingTheme$theme$3 = _orderingTheme$theme$2.layout) === null || _orderingTheme$theme$3 === void 0 ? void 0 : (_orderingTheme$theme$4 = _orderingTheme$theme$3.type) === null || _orderingTheme$theme$4 === void 0 ? void 0 : _orderingTheme$theme$4.toLowerCase()) === 'chew';
|
|
151
140
|
var handleScroll = (0, _react.useCallback)(function () {
|
|
152
141
|
var _document$documentEle, _document$documentEle2, _businessesList$error;
|
|
@@ -173,26 +162,6 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
|
|
|
173
162
|
}));
|
|
174
163
|
}
|
|
175
164
|
};
|
|
176
|
-
var handleTogglePopover = function handleTogglePopover(type) {
|
|
177
|
-
setOpenPopover(_objectSpread(_objectSpread({}, openPopover), {}, _defineProperty({}, type, !openPopover[type])));
|
|
178
|
-
};
|
|
179
|
-
var handleClosePopover = function handleClosePopover(type) {
|
|
180
|
-
setOpenPopover(_objectSpread(_objectSpread({}, openPopover), {}, _defineProperty({}, type, false)));
|
|
181
|
-
};
|
|
182
|
-
var handleFindBusinesses = function handleFindBusinesses() {
|
|
183
|
-
var _orderState$options2, _orderState$options2$;
|
|
184
|
-
if (!(orderState !== null && orderState !== void 0 && (_orderState$options2 = orderState.options) !== null && _orderState$options2 !== void 0 && (_orderState$options2$ = _orderState$options2.address) !== null && _orderState$options2$ !== void 0 && _orderState$options2$.location)) {
|
|
185
|
-
setAlertState({
|
|
186
|
-
open: true,
|
|
187
|
-
content: [t('SELECT_AN_ADDRESS_TO_SEARCH', 'Select or add an address to search')]
|
|
188
|
-
});
|
|
189
|
-
return;
|
|
190
|
-
}
|
|
191
|
-
setModals({
|
|
192
|
-
listOpen: false,
|
|
193
|
-
formOpen: false
|
|
194
|
-
});
|
|
195
|
-
};
|
|
196
165
|
var toggleMap = function toggleMap() {
|
|
197
166
|
setActiveMap(!activeMap);
|
|
198
167
|
};
|
|
@@ -233,8 +202,8 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
|
|
|
233
202
|
}));
|
|
234
203
|
};
|
|
235
204
|
var handleChangeCity = function handleChangeCity(cityId) {
|
|
236
|
-
var _orderState$
|
|
237
|
-
changeCityFilter(cityId === (orderState === null || orderState === void 0 ? void 0 : (_orderState$
|
|
205
|
+
var _orderState$options2;
|
|
206
|
+
changeCityFilter(cityId === (orderState === null || orderState === void 0 ? void 0 : (_orderState$options2 = orderState.options) === null || _orderState$options2 === void 0 ? void 0 : _orderState$options2.city_id) ? null : cityId);
|
|
238
207
|
};
|
|
239
208
|
(0, _react.useEffect)(function () {
|
|
240
209
|
if (preorderBusiness) setIsPreorder(true);
|
|
@@ -250,36 +219,6 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
|
|
|
250
219
|
});
|
|
251
220
|
setFavoriteIds(_toConsumableArray(new Set(ids)));
|
|
252
221
|
}, [businessesList === null || businessesList === void 0 ? void 0 : (_businessesList$busin3 = businessesList.businesses) === null || _businessesList$busin3 === void 0 ? void 0 : _businessesList$busin3.length]);
|
|
253
|
-
var OrdersSection = function OrdersSection(_ref2) {
|
|
254
|
-
var _getCustomArray;
|
|
255
|
-
var titleContent = _ref2.titleContent;
|
|
256
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, isCustomLayout && onRedirectPage && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_OrdersOption.OrdersOption, {
|
|
257
|
-
horizontal: true,
|
|
258
|
-
isBusinessesPage: true,
|
|
259
|
-
onRedirectPage: onRedirectPage,
|
|
260
|
-
titleContent: t('CARTS', 'Carts'),
|
|
261
|
-
businessesIds: businessesIds,
|
|
262
|
-
customArray: (_getCustomArray = getCustomArray(orderState.carts)) === null || _getCustomArray === void 0 ? void 0 : _getCustomArray.filter(function (cart) {
|
|
263
|
-
return cart.products.length > 0;
|
|
264
|
-
}),
|
|
265
|
-
isCustomLayout: true,
|
|
266
|
-
isBusinessesLoading: businessesList.loading,
|
|
267
|
-
isCustomerMode: isCustomerMode,
|
|
268
|
-
franchiseId: props.franchiseId
|
|
269
|
-
}), /*#__PURE__*/_react.default.createElement(_OrdersOption.OrdersOption, {
|
|
270
|
-
horizontal: true,
|
|
271
|
-
asDashboard: true,
|
|
272
|
-
isBusinessesPage: true,
|
|
273
|
-
businessesIds: businessesIds,
|
|
274
|
-
onRedirectPage: onRedirectPage,
|
|
275
|
-
userCustomerId: userCustomer === null || userCustomer === void 0 ? void 0 : userCustomer.id,
|
|
276
|
-
isCustomLayout: true,
|
|
277
|
-
titleContent: titleContent,
|
|
278
|
-
isBusinessesLoading: businessesList.loading,
|
|
279
|
-
isCustomerMode: isCustomerMode,
|
|
280
|
-
franchiseId: props.franchiseId
|
|
281
|
-
})));
|
|
282
|
-
};
|
|
283
222
|
if (logosLayout) {
|
|
284
223
|
var _businessesList$busin4, _businessesList$busin5;
|
|
285
224
|
return /*#__PURE__*/_react.default.createElement(_styles.BusinessLogosWrapper, null, /*#__PURE__*/_react.default.createElement(_styles.BusinessLogosContainer, null, /*#__PURE__*/_react.default.createElement(_AutoScroll.AutoScroll, {
|
|
@@ -302,32 +241,11 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
|
|
|
302
241
|
});
|
|
303
242
|
})))));
|
|
304
243
|
}
|
|
305
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
}, BeforeElement);
|
|
309
|
-
}), (_props$beforeComponen = props.beforeComponents) === null || _props$beforeComponen === void 0 ? void 0 : _props$beforeComponen.map(function (BeforeComponent, i) {
|
|
310
|
-
return /*#__PURE__*/_react.default.createElement(BeforeComponent, _extends({
|
|
311
|
-
key: i
|
|
312
|
-
}, props));
|
|
313
|
-
}), /*#__PURE__*/_react.default.createElement(_styles.BusinessContainer, null, (windowSize.width < 576 || (configs === null || configs === void 0 ? void 0 : (_configs$business_lis = configs.business_listing_hide_image) === null || _configs$business_lis === void 0 ? void 0 : _configs$business_lis.value) !== '1' && !isChew) && /*#__PURE__*/_react.default.createElement(_styles.BusinessBanner, null, windowSize.width < 576 && /*#__PURE__*/_react.default.createElement(_styles.BusinessFeatures, null, /*#__PURE__*/_react.default.createElement(_styles.AddressMenu, {
|
|
314
|
-
onClick: function onClick() {
|
|
315
|
-
return handleClickAddress();
|
|
316
|
-
}
|
|
317
|
-
}, /*#__PURE__*/_react.default.createElement(_FaMapMarkerAlt.default, null), /*#__PURE__*/_react.default.createElement("span", null, ((_orderState$options4 = orderState.options) === null || _orderState$options4 === void 0 ? void 0 : (_orderState$options4$ = _orderState$options4.address) === null || _orderState$options4$ === void 0 ? void 0 : _orderState$options4$.address) || t('WHERE_DO_WE_DELIVERY', 'Where do we delivery?'))), /*#__PURE__*/_react.default.createElement(_styles.FeatureItems, null, /*#__PURE__*/_react.default.createElement(_styles.ItemInline, null, /*#__PURE__*/_react.default.createElement(_OrderTypeSelectorHeader.OrderTypeSelectorHeader, {
|
|
318
|
-
configTypes: configTypes
|
|
319
|
-
})), /*#__PURE__*/_react.default.createElement(_styles.ItemInline, null, /*#__PURE__*/_react.default.createElement(_MomentPopover.MomentPopover, {
|
|
320
|
-
open: openPopover.moment,
|
|
321
|
-
onClick: function onClick() {
|
|
322
|
-
return handleTogglePopover('moment');
|
|
323
|
-
},
|
|
324
|
-
onClose: function onClose() {
|
|
325
|
-
return handleClosePopover('moment');
|
|
326
|
-
},
|
|
327
|
-
isBanner: true
|
|
328
|
-
})))), (configs === null || configs === void 0 ? void 0 : (_configs$business_lis2 = configs.business_listing_hide_image) === null || _configs$business_lis2 === void 0 ? void 0 : _configs$business_lis2.value) !== '1' && !isChew && /*#__PURE__*/_react.default.createElement(_styles.BusinessHeroImg, {
|
|
244
|
+
return /*#__PURE__*/_react.default.createElement(_styles.BusinessContainer, null, (windowSize.width < 576 || (configs === null || configs === void 0 ? void 0 : (_configs$business_lis = configs.business_listing_hide_image) === null || _configs$business_lis === void 0 ? void 0 : _configs$business_lis.value) !== '1' && !isChew) && /*#__PURE__*/_react.default.createElement(_styles.BusinessBanner, null, windowSize.width < 576 && /*#__PURE__*/_react.default.createElement(_OrderContextUI.OrderContextUI, {
|
|
245
|
+
isBusinessList: true
|
|
246
|
+
}), (configs === null || configs === void 0 ? void 0 : (_configs$business_lis2 = configs.business_listing_hide_image) === null || _configs$business_lis2 === void 0 ? void 0 : _configs$business_lis2.value) !== '1' && !isChew && !hideHero && /*#__PURE__*/_react.default.createElement(_styles.BusinessHeroImg, {
|
|
329
247
|
bgimage: (_theme$images2 = theme.images) === null || _theme$images2 === void 0 ? void 0 : (_theme$images2$genera = _theme$images2.general) === null || _theme$images2$genera === void 0 ? void 0 : _theme$images2$genera.businessHero,
|
|
330
|
-
height: theme === null || theme === void 0 ? void 0 : (_theme$
|
|
248
|
+
height: theme === null || theme === void 0 ? void 0 : (_theme$business_listi22 = theme.business_listing_view) === null || _theme$business_listi22 === void 0 ? void 0 : (_theme$business_listi23 = _theme$business_listi22.components) === null || _theme$business_listi23 === void 0 ? void 0 : (_theme$business_listi24 = _theme$business_listi23.business_hero) === null || _theme$business_listi24 === void 0 ? void 0 : (_theme$business_listi25 = _theme$business_listi24.style) === null || _theme$business_listi25 === void 0 ? void 0 : _theme$business_listi25.height
|
|
331
249
|
})), !!((_Object$values = Object.values(orderState === null || orderState === void 0 ? void 0 : orderState.carts)) !== null && _Object$values !== void 0 && _Object$values.length) && /*#__PURE__*/_react.default.createElement(_OrderProgress.OrderProgress, {
|
|
332
250
|
isChew: isChew,
|
|
333
251
|
franchiseId: props.franchiseId,
|
|
@@ -336,9 +254,15 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
|
|
|
336
254
|
isCustomerMode: isCustomerMode
|
|
337
255
|
}), (configs === null || configs === void 0 ? void 0 : (_configs$business_lis3 = configs.business_listing_hide_image) === null || _configs$business_lis3 === void 0 ? void 0 : _configs$business_lis3.value) !== '1' && isChew && /*#__PURE__*/_react.default.createElement(_styles.BusinessHeroImg, {
|
|
338
256
|
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,
|
|
339
|
-
height: theme === null || theme === void 0 ? void 0 : (_theme$
|
|
340
|
-
}), isCustomerMode && /*#__PURE__*/_react.default.createElement(OrdersSection, {
|
|
341
|
-
titleContent: t('PREVIOUS_ORDERS', 'Previous orders')
|
|
257
|
+
height: theme === null || theme === void 0 ? void 0 : (_theme$business_listi26 = theme.business_listing_view) === null || _theme$business_listi26 === void 0 ? void 0 : (_theme$business_listi27 = _theme$business_listi26.components) === null || _theme$business_listi27 === void 0 ? void 0 : (_theme$business_listi28 = _theme$business_listi27.business_hero) === null || _theme$business_listi28 === void 0 ? void 0 : (_theme$business_listi29 = _theme$business_listi28.style) === null || _theme$business_listi29 === void 0 ? void 0 : _theme$business_listi29.height
|
|
258
|
+
}), isCustomerMode && !hidePreviousOrders && !businessesList.loading && /*#__PURE__*/_react.default.createElement(_OrdersSection.OrdersSection, {
|
|
259
|
+
titleContent: t('PREVIOUS_ORDERS', 'Previous orders'),
|
|
260
|
+
onRedirectPage: onRedirectPage,
|
|
261
|
+
businessesIds: businessesIds,
|
|
262
|
+
getCustomArray: getCustomArray,
|
|
263
|
+
businessesList: businessesList,
|
|
264
|
+
isCustomerMode: isCustomerMode,
|
|
265
|
+
userCustomer: userCustomer
|
|
342
266
|
}), !isCustomerMode && !hideSearchSection && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_styles.WrapperSearch, {
|
|
343
267
|
isCustomLayout: isCustomLayout,
|
|
344
268
|
isCustomerMode: isCustomerMode
|
|
@@ -357,8 +281,8 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
|
|
|
357
281
|
color: "primary",
|
|
358
282
|
onClick: handleOpenCities
|
|
359
283
|
}, (citiesState === null || citiesState === void 0 ? void 0 : (_citiesState$cities3 = citiesState.cities) === null || _citiesState$cities3 === void 0 ? void 0 : (_citiesState$cities3$ = _citiesState$cities3.find(function (city) {
|
|
360
|
-
var _orderState$
|
|
361
|
-
return (city === null || city === void 0 ? void 0 : city.id) === (orderState === null || orderState === void 0 ? void 0 : (_orderState$
|
|
284
|
+
var _orderState$options3;
|
|
285
|
+
return (city === null || city === void 0 ? void 0 : city.id) === (orderState === null || orderState === void 0 ? void 0 : (_orderState$options3 = orderState.options) === null || _orderState$options3 === void 0 ? void 0 : _orderState$options3.city_id);
|
|
362
286
|
})) === null || _citiesState$cities3$ === void 0 ? void 0 : _citiesState$cities3$.name) || t('SELECT_A_CITY', 'Select a city')), !hideFilter && (configs === null || configs === void 0 ? void 0 : (_configs$advanced_bus = configs.advanced_business_search_enabled) === null || _configs$advanced_bus === void 0 ? void 0 : _configs$advanced_bus.value) === '1' && /*#__PURE__*/_react.default.createElement(_FiFilter.default, {
|
|
363
287
|
onClick: function onClick() {
|
|
364
288
|
return onRedirectPage({
|
|
@@ -369,15 +293,16 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
|
|
|
369
293
|
onClick: toggleMap
|
|
370
294
|
})), activeMap && /*#__PURE__*/_react.default.createElement(_BusinessesMap.BusinessesMap, {
|
|
371
295
|
businessList: businessesList.businesses,
|
|
372
|
-
userLocation: orderState === null || orderState === void 0 ? void 0 : (_orderState$
|
|
296
|
+
userLocation: orderState === null || orderState === void 0 ? void 0 : (_orderState$options4 = orderState.options) === null || _orderState$options4 === void 0 ? void 0 : (_orderState$options4$ = _orderState$options4.address) === null || _orderState$options4$ === void 0 ? void 0 : _orderState$options4$.location,
|
|
373
297
|
setErrors: setMapErrors
|
|
374
|
-
})), !isChew && hasHighRatedBusiness && !props.franchiseId && /*#__PURE__*/_react.default.createElement(_styles.HightestRatedWrapper, null, /*#__PURE__*/_react.default.createElement(_styles.Divider, null), /*#__PURE__*/_react.default.createElement(_HighestRated.HighestRated, {
|
|
298
|
+
})), !isChew && hasHighRatedBusiness && !props.franchiseId && !hideHighestBusiness && /*#__PURE__*/_react.default.createElement(_styles.HightestRatedWrapper, null, /*#__PURE__*/_react.default.createElement(_styles.Divider, null), /*#__PURE__*/_react.default.createElement(_HighestRated.HighestRated, {
|
|
375
299
|
handleClickAddress: handleClickAddress,
|
|
376
300
|
setHasHighRatedBusiness: setHasHighRatedBusiness,
|
|
377
301
|
onBusinessClick: onBusinessClick,
|
|
378
302
|
isCustomerMode: isCustomerMode,
|
|
379
303
|
favoriteIds: favoriteIds,
|
|
380
|
-
setFavoriteIds: setFavoriteIds
|
|
304
|
+
setFavoriteIds: setFavoriteIds,
|
|
305
|
+
disabledCities: true
|
|
381
306
|
}), /*#__PURE__*/_react.default.createElement(_styles.Divider, null)), /*#__PURE__*/_react.default.createElement(_PageBanner.PageBanner, {
|
|
382
307
|
position: "web_business_listing"
|
|
383
308
|
}), (configs && (configs === null || configs === void 0 ? void 0 : configs.business_listing_categories) !== false || !isCustomLayout) && !isAllCategoriesHidden && /*#__PURE__*/_react.default.createElement(_BusinessTypeFilter.BusinessTypeFilter, {
|
|
@@ -406,9 +331,9 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
|
|
|
406
331
|
onClick: toggleMap
|
|
407
332
|
}))), isCustomerMode && activeMap && /*#__PURE__*/_react.default.createElement(_BusinessesMap.BusinessesMap, {
|
|
408
333
|
businessList: businessesList.businesses,
|
|
409
|
-
userLocation: orderState === null || orderState === void 0 ? void 0 : (_orderState$
|
|
334
|
+
userLocation: orderState === null || orderState === void 0 ? void 0 : (_orderState$options5 = orderState.options) === null || _orderState$options5 === void 0 ? void 0 : (_orderState$options5$ = _orderState$options5.address) === null || _orderState$options5$ === void 0 ? void 0 : _orderState$options5$.location,
|
|
410
335
|
setErrors: setMapErrors
|
|
411
|
-
}),
|
|
336
|
+
}), /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, (!isCustomLayout && isCustomerMode && (businessesList === null || businessesList === void 0 ? void 0 : (_businessesList$busin6 = businessesList.businesses) === null || _businessesList$busin6 === void 0 ? void 0 : _businessesList$busin6.length) > 0 || isChew) && /*#__PURE__*/_react.default.createElement(_styles.BusinessesTitle, null, t('BUSINESSES', 'Businesses')), /*#__PURE__*/_react.default.createElement(_styles.BusinessList, null, !businessesList.loading && businessesList.businesses.length === 0 && (businessesList === null || businessesList === void 0 ? void 0 : businessesList.fetched) && /*#__PURE__*/_react.default.createElement(_NotFoundSource.NotFoundSource, {
|
|
412
337
|
content: t('NOT_FOUND_BUSINESSES', 'No businesses to delivery / pick up at this address, please change filters or change address.')
|
|
413
338
|
}, /*#__PURE__*/_react.default.createElement(_Buttons.Button, {
|
|
414
339
|
outline: true,
|
|
@@ -420,14 +345,14 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
|
|
|
420
345
|
height: '44px'
|
|
421
346
|
}
|
|
422
347
|
}, t('CHANGE_ADDRESS', 'Select other Address'))), (_businessesList$busin7 = businessesList.businesses) === null || _businessesList$busin7 === void 0 ? void 0 : _businessesList$busin7.map(function (business) {
|
|
423
|
-
var _orderState$
|
|
348
|
+
var _orderState$options6, _business$reviews;
|
|
424
349
|
return /*#__PURE__*/_react.default.createElement(_BusinessController.BusinessController, {
|
|
425
350
|
key: business.id,
|
|
426
351
|
className: "card",
|
|
427
352
|
business: business,
|
|
428
353
|
isBusinessOpen: business.open,
|
|
429
354
|
handleCustomClick: handleBusinessClick,
|
|
430
|
-
orderType: orderState === null || orderState === void 0 ? void 0 : (_orderState$
|
|
355
|
+
orderType: orderState === null || orderState === void 0 ? void 0 : (_orderState$options6 = orderState.options) === null || _orderState$options6 === void 0 ? void 0 : _orderState$options6.type,
|
|
431
356
|
isCustomLayout: isCustomLayout,
|
|
432
357
|
isCustomerMode: isCustomerMode,
|
|
433
358
|
onPreorderBusiness: setPreorderBusiness,
|
|
@@ -444,14 +369,14 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
|
|
|
444
369
|
favoriteIds: favoriteIds,
|
|
445
370
|
setFavoriteIds: setFavoriteIds
|
|
446
371
|
});
|
|
447
|
-
}), businessesList.loading && _toConsumableArray(Array((paginationProps === null || paginationProps === void 0 ? void 0 : paginationProps.nextPageItems) > 4 ? paginationProps.nextPageItems : 8).keys()).map(function (i) {
|
|
448
|
-
var _orderState$
|
|
372
|
+
}), (businessesList.loading || !(businessesList !== null && businessesList !== void 0 && businessesList.fetched)) && _toConsumableArray(Array((paginationProps === null || paginationProps === void 0 ? void 0 : paginationProps.nextPageItems) > 4 ? paginationProps.nextPageItems : 8).keys()).map(function (i) {
|
|
373
|
+
var _orderState$options7;
|
|
449
374
|
return /*#__PURE__*/_react.default.createElement(_BusinessController.BusinessController, {
|
|
450
375
|
key: i,
|
|
451
376
|
className: "card",
|
|
452
377
|
business: {},
|
|
453
378
|
isSkeleton: true,
|
|
454
|
-
orderType: orderState === null || orderState === void 0 ? void 0 : (_orderState$
|
|
379
|
+
orderType: orderState === null || orderState === void 0 ? void 0 : (_orderState$options7 = orderState.options) === null || _orderState$options7 === void 0 ? void 0 : _orderState$options7.type
|
|
455
380
|
});
|
|
456
381
|
}))), /*#__PURE__*/_react.default.createElement(_Modal.Modal, {
|
|
457
382
|
open: isPreorder,
|
|
@@ -463,54 +388,6 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
|
|
|
463
388
|
business: preorderBusiness,
|
|
464
389
|
handleClick: handleBusinessClick,
|
|
465
390
|
showButton: true
|
|
466
|
-
})), /*#__PURE__*/_react.default.createElement(_Modal.Modal, {
|
|
467
|
-
title: t('ADDRESS_FORM', 'Address Form'),
|
|
468
|
-
open: modals.formOpen,
|
|
469
|
-
onClose: function onClose() {
|
|
470
|
-
return setModals(_objectSpread(_objectSpread({}, modals), {}, {
|
|
471
|
-
formOpen: false
|
|
472
|
-
}));
|
|
473
|
-
}
|
|
474
|
-
}, /*#__PURE__*/_react.default.createElement(_AddressForm.AddressForm, {
|
|
475
|
-
useValidationFileds: true,
|
|
476
|
-
address: (orderState === null || orderState === void 0 ? void 0 : (_orderState$options10 = orderState.options) === null || _orderState$options10 === void 0 ? void 0 : _orderState$options10.address) || {},
|
|
477
|
-
onClose: function onClose() {
|
|
478
|
-
return setModals(_objectSpread(_objectSpread({}, modals), {}, {
|
|
479
|
-
formOpen: false
|
|
480
|
-
}));
|
|
481
|
-
},
|
|
482
|
-
onCancel: function onCancel() {
|
|
483
|
-
return setModals(_objectSpread(_objectSpread({}, modals), {}, {
|
|
484
|
-
formOpen: false
|
|
485
|
-
}));
|
|
486
|
-
},
|
|
487
|
-
onSaveAddress: function onSaveAddress() {
|
|
488
|
-
return setModals(_objectSpread(_objectSpread({}, modals), {}, {
|
|
489
|
-
formOpen: false
|
|
490
|
-
}));
|
|
491
|
-
}
|
|
492
|
-
})), /*#__PURE__*/_react.default.createElement(_Modal.Modal, {
|
|
493
|
-
title: t('ADDRESSES', 'Address List'),
|
|
494
|
-
open: modals.listOpen,
|
|
495
|
-
width: "70%",
|
|
496
|
-
onClose: function onClose() {
|
|
497
|
-
return setModals(_objectSpread(_objectSpread({}, modals), {}, {
|
|
498
|
-
listOpen: false
|
|
499
|
-
}));
|
|
500
|
-
}
|
|
501
|
-
}, /*#__PURE__*/_react.default.createElement(_AddressList.AddressList, {
|
|
502
|
-
isModal: true,
|
|
503
|
-
changeOrderAddressWithDefault: true,
|
|
504
|
-
userId: isNaN(userCustomer === null || userCustomer === void 0 ? void 0 : userCustomer.id) ? null : userCustomer === null || userCustomer === void 0 ? void 0 : userCustomer.id,
|
|
505
|
-
onCancel: function onCancel() {
|
|
506
|
-
return setModals(_objectSpread(_objectSpread({}, modals), {}, {
|
|
507
|
-
listOpen: false
|
|
508
|
-
}));
|
|
509
|
-
},
|
|
510
|
-
onAccept: function onAccept() {
|
|
511
|
-
return handleFindBusinesses();
|
|
512
|
-
},
|
|
513
|
-
isCustomerMode: isCustomerMode
|
|
514
391
|
})), /*#__PURE__*/_react.default.createElement(_Modal.Modal, {
|
|
515
392
|
title: t('SELECT_A_STORE', 'Select a store'),
|
|
516
393
|
open: modals.citiesOpen,
|
|
@@ -540,14 +417,6 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
|
|
|
540
417
|
return handleCloseAlerts();
|
|
541
418
|
},
|
|
542
419
|
closeOnBackdrop: false
|
|
543
|
-
})), (_props$afterComponent = props.afterComponents) === null || _props$afterComponent === void 0 ? void 0 : _props$afterComponent.map(function (AfterComponent, i) {
|
|
544
|
-
return /*#__PURE__*/_react.default.createElement(AfterComponent, _extends({
|
|
545
|
-
key: i
|
|
546
|
-
}, props));
|
|
547
|
-
}), (_props$afterElements = props.afterElements) === null || _props$afterElements === void 0 ? void 0 : _props$afterElements.map(function (AfterElement, i) {
|
|
548
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
|
|
549
|
-
key: i
|
|
550
|
-
}, AfterElement);
|
|
551
420
|
}));
|
|
552
421
|
};
|
|
553
422
|
var OriginalBusinessesListing = function OriginalBusinessesListing(props) {
|
|
@@ -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.
|
|
7
|
+
exports.WrapperSearch = exports.SearchContainer = exports.PreviousOrders = exports.HightestRatedWrapper = exports.HeaderSearchMode = exports.ErrorMessage = exports.Divider = exports.BusinessesTitle = exports.BusinessSearch = exports.BusinessLogosWrapper = exports.BusinessLogosContainer = exports.BusinessLogo = exports.BusinessList = exports.BusinessHeroImgStyled = exports.BusinessHeroImg = exports.BusinessContainer = exports.BusinessBanner = void 0;
|
|
8
8
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
9
9
|
var _react = _interopRequireDefault(require("react"));
|
|
10
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22, _templateObject23
|
|
10
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22, _templateObject23;
|
|
11
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
12
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
13
13
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -15,52 +15,41 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
|
15
15
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
16
16
|
var BusinessContainer = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n width: 100%;\n"])));
|
|
17
17
|
exports.BusinessContainer = BusinessContainer;
|
|
18
|
-
var BusinessBanner = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: center;\n align-items: center;\n margin-bottom: 30px;\n position: relative;\n @media (max-width:
|
|
18
|
+
var BusinessBanner = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: center;\n align-items: center;\n margin-bottom: 30px;\n position: relative;\n @media (max-width: 576px) {\n margin-bottom: 0px;\n }\n"])));
|
|
19
19
|
exports.BusinessBanner = BusinessBanner;
|
|
20
|
-
var
|
|
21
|
-
exports.BusinessFeatures = BusinessFeatures;
|
|
22
|
-
var AddressMenu = _styledComponents.default.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n cursor: pointer;\n font-size: 14px;\n display: flex;\n align-items: center;\n background-color: #fff;\n color: #344050;\n font-weight: 600;\n border-radius: 50px;\n padding: 13px 19px;\n margin-bottom: 10px;\n span {\n width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n svg {\n margin-right: 5px;\n color: #B1BCCC;\n ", "\n }\n"])), function (props) {
|
|
23
|
-
var _props$theme;
|
|
24
|
-
return ((_props$theme = props.theme) === null || _props$theme === void 0 ? void 0 : _props$theme.rtl) && (0, _styledComponents.css)(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n margin-left: 5px;\n margin-right: 0;\n "])));
|
|
25
|
-
});
|
|
26
|
-
exports.AddressMenu = AddressMenu;
|
|
27
|
-
var FeatureItems = _styledComponents.default.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n width: 100%;\n display: flex;\n justify-content: space-between;\n"])));
|
|
28
|
-
exports.FeatureItems = FeatureItems;
|
|
29
|
-
var ItemInline = _styledComponents.default.div(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n > span #select-input {\n background-color: #F8F9FA !important;\n border: none;\n border-radius: 7.6px;\n svg {\n font-size: 14px;\n }\n #list {\n background-color: #fff;\n border: none;\n border-radius: 7.6px;\n left: 0px;\n right: initial;\n ", "\n }\n > div:first-child {\n font-size: 11px;\n }\n }\n .moment-popover {\n > div:first-child {\n font-size: 11px;\n padding: 4px 7px;\n svg {\n font-size: 14px;\n }\n }\n }\n"])), function (props) {
|
|
30
|
-
return props.theme.rtl && (0, _styledComponents.css)(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n left: initial;\n right: 0px;\n "])));
|
|
31
|
-
});
|
|
32
|
-
exports.ItemInline = ItemInline;
|
|
33
|
-
var BusinessSearch = _styledComponents.default.div(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n display: flex;\n background-color: #f8f9fa;\n align-items: center;\n padding: 7px;\n border-radius: 7px;\n font-size: 11px;\n svg {\n font-size: 15px;\n }\n"])));
|
|
20
|
+
var BusinessSearch = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex;\n background-color: #f8f9fa;\n align-items: center;\n padding: 7px;\n border-radius: 7px;\n font-size: 11px;\n svg {\n font-size: 15px;\n }\n"])));
|
|
34
21
|
exports.BusinessSearch = BusinessSearch;
|
|
35
|
-
var BusinessList = _styledComponents.default.div(
|
|
22
|
+
var BusinessList = _styledComponents.default.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: flex;\n flex-wrap: wrap;\n"])));
|
|
36
23
|
exports.BusinessList = BusinessList;
|
|
37
|
-
var WrapperSearch = _styledComponents.default.div(
|
|
38
|
-
var _props$
|
|
39
|
-
return (_props$
|
|
24
|
+
var WrapperSearch = _styledComponents.default.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n margin: 10px 20px 0px;\n display: flex;\n justify-content: flex-end;\n svg{\n align-self: center;\n cursor: pointer;\n font-size: 26px;\n color: ", ";\n margin-left: 10px;\n }\n button {\n width: 250px;\n margin-left: 10px;\n }\n ", "\n"])), function (props) {
|
|
25
|
+
var _props$theme, _props$theme$colors;
|
|
26
|
+
return (_props$theme = props.theme) === null || _props$theme === void 0 ? void 0 : (_props$theme$colors = _props$theme.colors) === null || _props$theme$colors === void 0 ? void 0 : _props$theme$colors.primary;
|
|
40
27
|
}, function (_ref) {
|
|
41
28
|
var isCustomLayout = _ref.isCustomLayout,
|
|
42
29
|
isCustomerMode = _ref.isCustomerMode;
|
|
43
|
-
return isCustomLayout && (0, _styledComponents.css)(
|
|
30
|
+
return isCustomLayout && (0, _styledComponents.css)(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n box-sizing: border-box;\n display: flex;\n justify-content: center;\n align-items: center;\n position: relative;\n margin: 0;\n margin-top: 10px;\n margin-bottom: 20px;\n width: 100%; \n padding: 0 20px;\n ", "\n svg {\n align-self: auto;\n }\n \n @media(min-width: 681px){\n width: 75%;\n padding: 0;\n }\n @media(min-width: 1201px){\n width: 50%;\n }\n "])), isCustomerMode ? (0, _styledComponents.css)(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n margin-right: 20px;\n "]))) : (0, _styledComponents.css)(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n margin: 0 auto;\n "]))));
|
|
44
31
|
});
|
|
45
32
|
exports.WrapperSearch = WrapperSearch;
|
|
46
|
-
var ErrorMessage = _styledComponents.default.span(
|
|
33
|
+
var ErrorMessage = _styledComponents.default.span(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n padding: 20px;\n width: 100%;\n background-color: #CCCCCC;\n margin: 0px 15px;\n color: #D81313;\n font-weight: bold;\n"])));
|
|
47
34
|
exports.ErrorMessage = ErrorMessage;
|
|
48
|
-
var PreviousOrders = _styledComponents.default.div(
|
|
35
|
+
var PreviousOrders = _styledComponents.default.div(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n display: flex;\n flex-wrap: wrap;\n margin: 10px 20px 0px;\n"])));
|
|
49
36
|
exports.PreviousOrders = PreviousOrders;
|
|
50
|
-
var BusinessesTitle = _styledComponents.default.h1(
|
|
37
|
+
var BusinessesTitle = _styledComponents.default.h1(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n ", "\n"])), function (_ref2) {
|
|
51
38
|
var isCustomerMode = _ref2.isCustomerMode;
|
|
52
|
-
return isCustomerMode ? (0, _styledComponents.css)(
|
|
53
|
-
var _props$
|
|
54
|
-
return (_props$
|
|
39
|
+
return isCustomerMode ? (0, _styledComponents.css)(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n font-size: 18px;\n margin: 0px 20px;\n "]))) : (0, _styledComponents.css)(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n font-weight: 600;\n font-size: 24px;\n color: ", ";\n margin: 42px 20px 5px 20px;\n "])), function (props) {
|
|
40
|
+
var _props$theme2;
|
|
41
|
+
return (_props$theme2 = props.theme) === null || _props$theme2 === void 0 ? void 0 : _props$theme2.colors.headingColor;
|
|
55
42
|
});
|
|
56
43
|
});
|
|
57
44
|
exports.BusinessesTitle = BusinessesTitle;
|
|
58
|
-
var BusinessHeroImgStyled = _styledComponents.default.div(
|
|
45
|
+
var BusinessHeroImgStyled = _styledComponents.default.div(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n margin-bottom: 30px;\n width: 100%;\n height: calc(65vh - 98px);\n ", "\n @media (min-width: 450px) {\n height: 370px;\n }\n @media (min-width: 821px) {\n height: ", ";\n }\n"])), function (_ref3) {
|
|
59
46
|
var bgimage = _ref3.bgimage;
|
|
60
|
-
return bgimage && (0, _styledComponents.css)(
|
|
47
|
+
return bgimage && (0, _styledComponents.css)(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n background-repeat: no-repeat, repeat;\n background-size: cover;\n object-fit: cover;\n background-position: center;\n "])));
|
|
61
48
|
}, function (_ref4) {
|
|
62
|
-
var
|
|
63
|
-
|
|
49
|
+
var _theme$business_listi, _theme$business_listi2, _theme$business_listi3, _theme$business_listi4, _theme$business_listi5;
|
|
50
|
+
var height = _ref4.height,
|
|
51
|
+
theme = _ref4.theme;
|
|
52
|
+
return (theme === null || theme === void 0 ? void 0 : (_theme$business_listi = theme.business_listing_view) === null || _theme$business_listi === void 0 ? void 0 : (_theme$business_listi2 = _theme$business_listi.components) === null || _theme$business_listi2 === void 0 ? void 0 : (_theme$business_listi3 = _theme$business_listi2.business_hero) === null || _theme$business_listi3 === void 0 ? void 0 : (_theme$business_listi4 = _theme$business_listi3.components) === null || _theme$business_listi4 === void 0 ? void 0 : (_theme$business_listi5 = _theme$business_listi4.styles) === null || _theme$business_listi5 === void 0 ? void 0 : _theme$business_listi5.height) || height || '650px';
|
|
64
53
|
});
|
|
65
54
|
exports.BusinessHeroImgStyled = BusinessHeroImgStyled;
|
|
66
55
|
var BusinessHeroImg = function BusinessHeroImg(props) {
|
|
@@ -71,16 +60,16 @@ var BusinessHeroImg = function BusinessHeroImg(props) {
|
|
|
71
60
|
}), props.children);
|
|
72
61
|
};
|
|
73
62
|
exports.BusinessHeroImg = BusinessHeroImg;
|
|
74
|
-
var HightestRatedWrapper = _styledComponents.default.div(
|
|
63
|
+
var HightestRatedWrapper = _styledComponents.default.div(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n padding: 50px 0 30px 0;\n"])));
|
|
75
64
|
exports.HightestRatedWrapper = HightestRatedWrapper;
|
|
76
|
-
var Divider = _styledComponents.default.div(
|
|
65
|
+
var Divider = _styledComponents.default.div(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n background: #F8F9FA;\n height: 8px;\n width: 100%;\n"])));
|
|
77
66
|
exports.Divider = Divider;
|
|
78
|
-
var SearchContainer = _styledComponents.default.div(
|
|
67
|
+
var SearchContainer = _styledComponents.default.div(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n"])));
|
|
79
68
|
exports.SearchContainer = SearchContainer;
|
|
80
|
-
var BusinessLogosWrapper = _styledComponents.default.div(
|
|
69
|
+
var BusinessLogosWrapper = _styledComponents.default.div(_templateObject19 || (_templateObject19 = _taggedTemplateLiteral(["\n overflow: scroll hidden;\n width: 100%;\n"])));
|
|
81
70
|
exports.BusinessLogosWrapper = BusinessLogosWrapper;
|
|
82
|
-
var BusinessLogoStyled = _styledComponents.default.div(
|
|
83
|
-
return props.isActive && (0, _styledComponents.css)(
|
|
71
|
+
var BusinessLogoStyled = _styledComponents.default.div(_templateObject20 || (_templateObject20 = _taggedTemplateLiteral(["\n min-width: 100px;\n min-height: 100px;\n height: 100px;\n width: 100px;\n box-sizing: border-box;\n background-repeat: no-repeat, repeat;\n background-size: cover;\n object-fit: cover;\n background-position: center;\n border-radius: 7.6px;\n margin-right: 15px;\n cursor: pointer;\n ", ";\n"])), function (props) {
|
|
72
|
+
return props.isActive && (0, _styledComponents.css)(_templateObject21 || (_templateObject21 = _taggedTemplateLiteral(["\n border: 2px solid ", ";\n "])), function (props) {
|
|
84
73
|
return props.theme.colors.primary;
|
|
85
74
|
});
|
|
86
75
|
});
|
|
@@ -94,7 +83,7 @@ var BusinessLogo = function BusinessLogo(props) {
|
|
|
94
83
|
}), props.children);
|
|
95
84
|
};
|
|
96
85
|
exports.BusinessLogo = BusinessLogo;
|
|
97
|
-
var BusinessLogosContainer = _styledComponents.default.div(
|
|
86
|
+
var BusinessLogosContainer = _styledComponents.default.div(_templateObject22 || (_templateObject22 = _taggedTemplateLiteral(["\n display: flex;\n padding-bottom: 10px;\n"])));
|
|
98
87
|
exports.BusinessLogosContainer = BusinessLogosContainer;
|
|
99
|
-
var HeaderSearchMode = _styledComponents.default.div(
|
|
88
|
+
var HeaderSearchMode = _styledComponents.default.div(_templateObject23 || (_templateObject23 = _taggedTemplateLiteral(["\n position: absolute;\n width: 200px;\n"])));
|
|
100
89
|
exports.HeaderSearchMode = HeaderSearchMode;
|