ordering-ui-external 4.0.0 → 4.0.2
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/_modules/themes/five/src/components/BusinessController/index.js +2 -6
- package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +8 -4
- package/_modules/themes/five/src/components/PageBanner/styles.js +1 -1
- package/package.json +1 -1
- package/src/themes/five/src/components/BusinessController/index.js +1 -2
- package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +5 -2
- package/src/themes/five/src/components/PageBanner/styles.js +1 -1
- package/template/pages/BusinessesList/index.js +1 -1
|
@@ -116,13 +116,9 @@ var BusinessControllerUI = function BusinessControllerUI(props) {
|
|
|
116
116
|
// }
|
|
117
117
|
|
|
118
118
|
var handleBusinessClick = function handleBusinessClick(e) {
|
|
119
|
-
var _favoriteRef$current
|
|
119
|
+
var _favoriteRef$current;
|
|
120
120
|
if (favoriteRef !== null && favoriteRef !== void 0 && (_favoriteRef$current = favoriteRef.current) !== null && _favoriteRef$current !== void 0 && _favoriteRef$current.contains(e.target)) return;
|
|
121
|
-
|
|
122
|
-
var _menu$products;
|
|
123
|
-
return (menu === null || menu === void 0 ? void 0 : menu.enabled) && (menu === null || menu === void 0 ? void 0 : (_menu$products = menu.products) === null || _menu$products === void 0 ? void 0 : _menu$products.length) > 0;
|
|
124
|
-
}).length;
|
|
125
|
-
if (onPreorderBusiness && (!isBusinessOpen || !hasMenu)) onPreorderBusiness(business);else handleClick(business);
|
|
121
|
+
if (onPreorderBusiness && !isBusinessOpen) onPreorderBusiness(business);else handleClick(business);
|
|
126
122
|
};
|
|
127
123
|
var handleChangeFavorite = function handleChangeFavorite() {
|
|
128
124
|
if (auth) {
|
|
@@ -256,7 +256,12 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
|
|
|
256
256
|
});
|
|
257
257
|
})))));
|
|
258
258
|
}
|
|
259
|
-
return /*#__PURE__*/_react.default.createElement(_styles.BusinessContainer, null,
|
|
259
|
+
return /*#__PURE__*/_react.default.createElement(_styles.BusinessContainer, null, !isCustomerMode &&
|
|
260
|
+
/*#__PURE__*/
|
|
261
|
+
// Keep this banner at the top
|
|
262
|
+
_react.default.createElement(_PageBanner.PageBanner, {
|
|
263
|
+
position: "web_business_listing"
|
|
264
|
+
}), (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, {
|
|
260
265
|
isBusinessList: true,
|
|
261
266
|
hideHero: !!(configs !== null && configs !== void 0 && (_configs$business_lis2 = configs.business_listing_hide_image) !== null && _configs$business_lis2 !== void 0 && _configs$business_lis2.value) !== '1' && !hideHero
|
|
262
267
|
}), (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 && !hideHero && /*#__PURE__*/_react.default.createElement(_styles.BusinessHeroImg, {
|
|
@@ -313,6 +318,7 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
|
|
|
313
318
|
userLocation: orderState === null || orderState === void 0 ? void 0 : (_orderState$options9 = orderState.options) === null || _orderState$options9 === void 0 ? void 0 : (_orderState$options9$ = _orderState$options9.address) === null || _orderState$options9$ === void 0 ? void 0 : _orderState$options9$.location,
|
|
314
319
|
setErrors: setMapErrors
|
|
315
320
|
})), !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, {
|
|
321
|
+
propsToFetch: props.propsToFetch,
|
|
316
322
|
handleClickAddress: handleClickAddress,
|
|
317
323
|
setHasHighRatedBusiness: setHasHighRatedBusiness,
|
|
318
324
|
onBusinessClick: onBusinessClick,
|
|
@@ -320,9 +326,7 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
|
|
|
320
326
|
favoriteIds: favoriteIds,
|
|
321
327
|
setFavoriteIds: setFavoriteIds,
|
|
322
328
|
disabledCities: true
|
|
323
|
-
}), /*#__PURE__*/_react.default.createElement(_styles.Divider, null)), /*#__PURE__*/_react.default.createElement(
|
|
324
|
-
position: "web_business_listing"
|
|
325
|
-
}), (configs && (configs === null || configs === void 0 ? void 0 : configs.business_listing_categories) !== false || !isCustomLayout) && !isAllCategoriesHidden && /*#__PURE__*/_react.default.createElement(_BusinessTypeFilter.BusinessTypeFilter, {
|
|
329
|
+
}), /*#__PURE__*/_react.default.createElement(_styles.Divider, null)), (configs && (configs === null || configs === void 0 ? void 0 : configs.business_listing_categories) !== false || !isCustomLayout) && !isAllCategoriesHidden && /*#__PURE__*/_react.default.createElement(_BusinessTypeFilter.BusinessTypeFilter, {
|
|
326
330
|
images: props.images,
|
|
327
331
|
businessTypes: props.businessTypes,
|
|
328
332
|
defaultBusinessType: props.defaultBusinessType,
|
|
@@ -8,7 +8,7 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
|
8
8
|
var _templateObject, _templateObject2;
|
|
9
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
10
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
11
|
-
var BannerContainer = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 100%;\n margin: 40px 0;\n overflow: hidden;\n .swiper-slide {\n /* position: relative; */\n /* height: 256px; */\n }\n .swiper-button-next {\n background-image: url(", ");\n background-color: #d1d0d04d;\n background-repeat: no-repeat;\n background-position: 55% center;\n width: 32px;\n height: 32px;\n box-shadow: rgb(0 0 0 / 7%) 0px 4px 10px;\n border-radius: 50%;\n transition: all 0.2s ease;\n &:hover {\n transform: scale(1.05);\n }\n }\n .swiper-button-prev {\n background-image: url(", ");\n background-color: #d1d0d04d;\n background-repeat: no-repeat;\n background-position: 45% center;\n width: 32px;\n height: 32px;\n border-radius: 50%;\n box-shadow: rgb(0 0 0 / 7%) 0px 4px 10px;\n transition: all 0.2s ease;\n &:hover {\n transform: scale(1.05);\n }\n }\n .swiper-button-next::after, .swiper-button-prev::after {\n display: none;\n }\n"])), function (props) {
|
|
11
|
+
var BannerContainer = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 100%;\n margin: 40px 0 20px;\n overflow: hidden;\n .swiper-slide {\n /* position: relative; */\n /* height: 256px; */\n }\n .swiper-button-next {\n background-image: url(", ");\n background-color: #d1d0d04d;\n background-repeat: no-repeat;\n background-position: 55% center;\n width: 32px;\n height: 32px;\n box-shadow: rgb(0 0 0 / 7%) 0px 4px 10px;\n border-radius: 50%;\n transition: all 0.2s ease;\n &:hover {\n transform: scale(1.05);\n }\n }\n .swiper-button-prev {\n background-image: url(", ");\n background-color: #d1d0d04d;\n background-repeat: no-repeat;\n background-position: 45% center;\n width: 32px;\n height: 32px;\n border-radius: 50%;\n box-shadow: rgb(0 0 0 / 7%) 0px 4px 10px;\n transition: all 0.2s ease;\n &:hover {\n transform: scale(1.05);\n }\n }\n .swiper-button-next::after, .swiper-button-prev::after {\n display: none;\n }\n"])), function (props) {
|
|
12
12
|
return props.theme.images.general.rightArrow;
|
|
13
13
|
}, function (props) {
|
|
14
14
|
return props.theme.images.general.leftArrow;
|
package/package.json
CHANGED
|
@@ -95,8 +95,7 @@ const BusinessControllerUI = (props) => {
|
|
|
95
95
|
|
|
96
96
|
const handleBusinessClick = (e) => {
|
|
97
97
|
if (favoriteRef?.current?.contains(e.target)) return
|
|
98
|
-
|
|
99
|
-
if (onPreorderBusiness && (!isBusinessOpen || !hasMenu)) onPreorderBusiness(business)
|
|
98
|
+
if (onPreorderBusiness && !isBusinessOpen) onPreorderBusiness(business)
|
|
100
99
|
else handleClick(business)
|
|
101
100
|
}
|
|
102
101
|
|
package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js
CHANGED
|
@@ -222,6 +222,10 @@ const BusinessesListingUI = (props) => {
|
|
|
222
222
|
|
|
223
223
|
return (
|
|
224
224
|
<BusinessContainer>
|
|
225
|
+
{!isCustomerMode && ( // Keep this banner at the top
|
|
226
|
+
<PageBanner position='web_business_listing' />
|
|
227
|
+
)}
|
|
228
|
+
|
|
225
229
|
{(windowSize.width < 576 || (configs?.business_listing_hide_image?.value !== '1' && !isChew)) && (
|
|
226
230
|
<BusinessBanner>
|
|
227
231
|
{windowSize.width < 576 && (
|
|
@@ -297,6 +301,7 @@ const BusinessesListingUI = (props) => {
|
|
|
297
301
|
<HightestRatedWrapper>
|
|
298
302
|
<Divider />
|
|
299
303
|
<HighestRated
|
|
304
|
+
propsToFetch={props.propsToFetch}
|
|
300
305
|
handleClickAddress={handleClickAddress}
|
|
301
306
|
setHasHighRatedBusiness={setHasHighRatedBusiness}
|
|
302
307
|
onBusinessClick={onBusinessClick}
|
|
@@ -309,8 +314,6 @@ const BusinessesListingUI = (props) => {
|
|
|
309
314
|
</HightestRatedWrapper>
|
|
310
315
|
)}
|
|
311
316
|
|
|
312
|
-
<PageBanner position='web_business_listing' />
|
|
313
|
-
|
|
314
317
|
{(((configs && configs?.business_listing_categories !== false) || !isCustomLayout) && !isAllCategoriesHidden) && (
|
|
315
318
|
<BusinessTypeFilter
|
|
316
319
|
images={props.images}
|
|
@@ -32,7 +32,7 @@ export const BusinessesList = (props) => {
|
|
|
32
32
|
}
|
|
33
33
|
},
|
|
34
34
|
currentPageParam: 0,
|
|
35
|
-
propsToFetch: ['id', 'name', 'header', 'logo', 'location', 'address', 'ribbon', 'timezone', 'schedule', 'open', 'delivery_price', 'distance', 'delivery_time', 'pickup_time', 'reviews', 'featured', 'offers', 'food', 'laundry', 'alcohol', 'groceries', 'slug', 'city', 'city_id', '
|
|
35
|
+
propsToFetch: ['id', 'name', 'header', 'logo', 'location', 'address', 'ribbon', 'timezone', 'schedule', 'open', 'delivery_price', 'distance', 'delivery_time', 'pickup_time', 'reviews', 'featured', 'offers', 'food', 'laundry', 'alcohol', 'groceries', 'slug', 'city', 'city_id', 'configs'],
|
|
36
36
|
onRedirectPage: (data) => events.emit('go_to_page', data)
|
|
37
37
|
}
|
|
38
38
|
|