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
|
File without changes
|
|
@@ -140,9 +140,7 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
|
|
|
140
140
|
}
|
|
141
141
|
}, [mapErrors]);
|
|
142
142
|
(0, _react.useEffect)(function () {
|
|
143
|
-
if (orderState.loading
|
|
144
|
-
// const newurl = window.location.protocol + '//' + window.location.host + window.location.pathname
|
|
145
|
-
// window.history.pushState({ path: newurl }, '', newurl)
|
|
143
|
+
if (orderState.loading || businessesList.loading) {
|
|
146
144
|
var params = new URLSearchParams();
|
|
147
145
|
history.replace({
|
|
148
146
|
pathname: location.pathname,
|
|
@@ -26,14 +26,16 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
26
26
|
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; } }
|
|
27
27
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
28
28
|
var SingleOrderCardUI = function SingleOrderCardUI(props) {
|
|
29
|
-
var _order$business, _theme$images, _theme$images$dummies, _order$business2, _order$business3, _order$business5, _theme$images3, _theme$images3$dummie, _order$
|
|
29
|
+
var _order$business, _theme$images, _theme$images$dummies, _order$business2, _order$business3, _order$business4, _order$business5, _order$business6, _order$business7, _theme$images3, _theme$images3$dummie, _order$business8, _order$business9, _order$business10, _order$business11, _order$business12, _getOrderStatus;
|
|
30
30
|
var order = props.order,
|
|
31
31
|
getOrderStatus = props.getOrderStatus,
|
|
32
32
|
handleReorder = props.handleReorder,
|
|
33
33
|
reorderLoading = props.reorderLoading,
|
|
34
34
|
orderID = props.orderID,
|
|
35
35
|
handleFavoriteOrder = props.handleFavoriteOrder,
|
|
36
|
-
setOrderSelected = props.setOrderSelected
|
|
36
|
+
setOrderSelected = props.setOrderSelected,
|
|
37
|
+
onRedirectPage = props.onRedirectPage,
|
|
38
|
+
customArray = props.customArray;
|
|
37
39
|
var theme = (0, _styledComponents.useTheme)();
|
|
38
40
|
var _useLanguage = (0, _orderingComponentsExternal.useLanguage)(),
|
|
39
41
|
_useLanguage2 = _slicedToArray(_useLanguage, 2),
|
|
@@ -44,14 +46,26 @@ var SingleOrderCardUI = function SingleOrderCardUI(props) {
|
|
|
44
46
|
var handleChangeFavorite = function handleChangeFavorite(order) {
|
|
45
47
|
handleFavoriteOrder && handleFavoriteOrder(!(order !== null && order !== void 0 && order.favorite));
|
|
46
48
|
};
|
|
49
|
+
var handleClickCard = function handleClickCard(e, order) {
|
|
50
|
+
var _order$cart_group_id;
|
|
51
|
+
if (e.target.closest('.favorite') || e.target.closest('.review') || e.target.closest('.reorder')) return;
|
|
52
|
+
var params = _defineProperty({}, customArray ? 'cartUuid' : 'orderId', customArray ? order.uuid : (_order$cart_group_id = order === null || order === void 0 ? void 0 : order.cart_group_id) !== null && _order$cart_group_id !== void 0 ? _order$cart_group_id : order.uuid);
|
|
53
|
+
var page = customArray ? 'checkout' : order !== null && order !== void 0 && order.cart_group_id ? 'multi_orders' : 'order_detail';
|
|
54
|
+
onRedirectPage({
|
|
55
|
+
page: page,
|
|
56
|
+
params: params
|
|
57
|
+
});
|
|
58
|
+
};
|
|
47
59
|
return /*#__PURE__*/_react.default.createElement(_styles2.SingleCard, {
|
|
48
60
|
key: order.id,
|
|
49
|
-
id: "order-card"
|
|
61
|
+
id: "order-card",
|
|
62
|
+
onClick: function onClick(e) {
|
|
63
|
+
return handleClickCard(e, order);
|
|
64
|
+
}
|
|
50
65
|
}, /*#__PURE__*/_react.default.createElement(_styles2.OrderPastContent, null, (((_order$business = order.business) === null || _order$business === void 0 ? void 0 : _order$business.logo) || ((_theme$images = theme.images) === null || _theme$images === void 0 ? void 0 : (_theme$images$dummies = _theme$images.dummies) === null || _theme$images$dummies === void 0 ? void 0 : _theme$images$dummies.businessLogo)) && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, (order === null || order === void 0 ? void 0 : (_order$business2 = order.business) === null || _order$business2 === void 0 ? void 0 : _order$business2.length) > 1 ? /*#__PURE__*/_react.default.createElement(_styles2.MultiLogosContainer, null, order === null || order === void 0 ? void 0 : (_order$business3 = order.business) === null || _order$business3 === void 0 ? void 0 : _order$business3.map(function (business, i) {
|
|
51
|
-
var
|
|
52
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
53
|
-
key: business === null || business === void 0 ? void 0 : business.id
|
|
54
|
-
}, i > 1 ? /*#__PURE__*/_react.default.createElement("p", null, "+ ", (order === null || order === void 0 ? void 0 : (_order$business4 = order.business) === null || _order$business4 === void 0 ? void 0 : _order$business4.length) - 2) : /*#__PURE__*/_react.default.createElement(_styles2.PastLogo, {
|
|
66
|
+
var _theme$images2, _theme$images2$dummie;
|
|
67
|
+
return i < 2 && /*#__PURE__*/_react.default.createElement(_styles2.PastLogo, {
|
|
68
|
+
key: business === null || business === void 0 ? void 0 : business.id,
|
|
55
69
|
isMulti: true
|
|
56
70
|
}, /*#__PURE__*/_react.default.createElement("img", {
|
|
57
71
|
src: (business === null || business === void 0 ? void 0 : business.logo) || ((_theme$images2 = theme.images) === null || _theme$images2 === void 0 ? void 0 : (_theme$images2$dummie = _theme$images2.dummies) === null || _theme$images2$dummie === void 0 ? void 0 : _theme$images2$dummie.businessLogo),
|
|
@@ -59,21 +73,21 @@ var SingleOrderCardUI = function SingleOrderCardUI(props) {
|
|
|
59
73
|
width: "55px",
|
|
60
74
|
height: "64px",
|
|
61
75
|
loading: "lazy"
|
|
62
|
-
}))
|
|
63
|
-
})) : /*#__PURE__*/_react.default.createElement(_styles2.PastLogo, null, /*#__PURE__*/_react.default.createElement("img", {
|
|
64
|
-
src: ((_order$
|
|
76
|
+
}));
|
|
77
|
+
}), (order === null || order === void 0 ? void 0 : (_order$business4 = order.business) === null || _order$business4 === void 0 ? void 0 : _order$business4.length) > 1 && (order === null || order === void 0 ? void 0 : (_order$business5 = order.business) === null || _order$business5 === void 0 ? void 0 : _order$business5.length) - 2 > 0 && /*#__PURE__*/_react.default.createElement("p", null, "+ ", (order === null || order === void 0 ? void 0 : (_order$business6 = order.business) === null || _order$business6 === void 0 ? void 0 : _order$business6.length) - 2)) : /*#__PURE__*/_react.default.createElement(_styles2.PastLogo, null, /*#__PURE__*/_react.default.createElement("img", {
|
|
78
|
+
src: ((_order$business7 = order.business) === null || _order$business7 === void 0 ? void 0 : _order$business7.logo) || ((_theme$images3 = theme.images) === null || _theme$images3 === void 0 ? void 0 : (_theme$images3$dummie = _theme$images3.dummies) === null || _theme$images3$dummie === void 0 ? void 0 : _theme$images3$dummie.businessLogo),
|
|
65
79
|
alt: "business-logo",
|
|
66
80
|
width: "55px",
|
|
67
81
|
height: "64px",
|
|
68
82
|
loading: "lazy"
|
|
69
|
-
}))), /*#__PURE__*/_react.default.createElement(_styles.BusinessInformation, null, /*#__PURE__*/_react.default.createElement(_styles2.WrapperBusinessTitle, null, /*#__PURE__*/_react.default.createElement("h2", null, (order === null || order === void 0 ? void 0 : (_order$
|
|
83
|
+
}))), /*#__PURE__*/_react.default.createElement(_styles.BusinessInformation, null, /*#__PURE__*/_react.default.createElement(_styles2.WrapperBusinessTitle, null, /*#__PURE__*/_react.default.createElement("h2", null, (order === null || order === void 0 ? void 0 : (_order$business8 = order.business) === null || _order$business8 === void 0 ? void 0 : _order$business8.length) > 1 ? "".concat(t('GROUP_ORDER', 'Group Order'), " ").concat(t('No', 'No'), ". ").concat(order === null || order === void 0 ? void 0 : order.cart_group_id) : (_order$business9 = order.business) === null || _order$business9 === void 0 ? void 0 : _order$business9.name), !(order !== null && order !== void 0 && (_order$business10 = order.business) !== null && _order$business10 !== void 0 && _order$business10.length) && /*#__PURE__*/_react.default.createElement(_styles2.FavoriteWrapper, {
|
|
70
84
|
onClick: function onClick() {
|
|
71
85
|
return handleChangeFavorite(order);
|
|
72
86
|
},
|
|
73
87
|
className: "favorite"
|
|
74
88
|
}, order !== null && order !== void 0 && order.favorite ? /*#__PURE__*/_react.default.createElement(_reactBootstrapIcons.HeartFill, null) : /*#__PURE__*/_react.default.createElement(_reactBootstrapIcons.Heart, null))), /*#__PURE__*/_react.default.createElement(_styles2.OrderInfo, null, (order === null || order === void 0 ? void 0 : order.id) && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("p", {
|
|
75
89
|
name: "order_number"
|
|
76
|
-
}, (order === null || order === void 0 ? void 0 : (_order$
|
|
90
|
+
}, (order === null || order === void 0 ? void 0 : (_order$business11 = order.business) === null || _order$business11 === void 0 ? void 0 : _order$business11.length) > 1 ? "".concat(order === null || order === void 0 ? void 0 : (_order$business12 = order.business) === null || _order$business12 === void 0 ? void 0 : _order$business12.length, " ").concat(t('ORDERS', 'orders')) : "".concat(t('ORDER_NUM', 'Order No.'), " ").concat(order.id)), /*#__PURE__*/_react.default.createElement(_BsDot.default, {
|
|
77
91
|
className: "dot"
|
|
78
92
|
})), /*#__PURE__*/_react.default.createElement("p", null, order !== null && order !== void 0 && order.delivery_datetime_utc ? parseDate(order === null || order === void 0 ? void 0 : order.delivery_datetime_utc) : parseDate(order === null || order === void 0 ? void 0 : order.delivery_datetime, {
|
|
79
93
|
utc: false
|
|
@@ -11,7 +11,7 @@ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _temp
|
|
|
11
11
|
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); }
|
|
12
12
|
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; }
|
|
13
13
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
14
|
-
var SingleCard = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 100%;\n display: flex;\n max-height: 100px;\n height: auto;\n border-bottom: 1px solid #F5F6F6;\n\n ", "\n\n @media(min-width: 480px){\n height: 140px;\n ", "\n }\n"])), function (props) {
|
|
14
|
+
var SingleCard = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 100%;\n display: flex;\n max-height: 100px;\n height: auto;\n border-radius: 16px;\n padding: 10px;\n transition: all 0.3s ease;\n border-bottom: 1px solid #F5F6F6;\n cursor: pointer;\n\n ", "\n\n @media(min-width: 480px){\n height: 140px;\n ", "\n }\n\n &:hover {\n box-shadow: rgb(0 0 0 / 20%) 0px 8px 24px;\n }\n"])), function (props) {
|
|
15
15
|
return (props.theme.colors.backgroundPage === '#FFF' || props.theme.colors.backgroundPage === '#FFFFFF') && (0, _styledComponents.css)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n margin-bottom: 15px;\n "])));
|
|
16
16
|
}, function (props) {
|
|
17
17
|
return (props.theme.colors.backgroundPage === '#FFF' || props.theme.colors.backgroundPage === '#FFFFFF') && (0, _styledComponents.css)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n border-top: none !important;\n "])));
|
|
@@ -375,6 +375,12 @@ Object.defineProperty(exports, "OrderBillSection", {
|
|
|
375
375
|
return _OrderBillSection.OrderBillSection;
|
|
376
376
|
}
|
|
377
377
|
});
|
|
378
|
+
Object.defineProperty(exports, "OrderContextUI", {
|
|
379
|
+
enumerable: true,
|
|
380
|
+
get: function get() {
|
|
381
|
+
return _OrderContextUI.OrderContextUI;
|
|
382
|
+
}
|
|
383
|
+
});
|
|
378
384
|
Object.defineProperty(exports, "OrderDetails", {
|
|
379
385
|
enumerable: true,
|
|
380
386
|
get: function get() {
|
|
@@ -845,6 +851,7 @@ var _SearchProducts = require("./src/components/SearchProducts");
|
|
|
845
851
|
var _MultiCartsPaymethodsAndWallets = require("./src/components/MultiCartsPaymethodsAndWallets");
|
|
846
852
|
var _ProfessionalProfile = require("./src/components/ProfessionalProfile");
|
|
847
853
|
var _OrderHistory = require("./src/components/OrderDetails/OrderHistory");
|
|
854
|
+
var _OrderContextUI = require("./src/components/OrderContextUI");
|
|
848
855
|
var _OrderBillSection = require("./src/components/OrderDetails/OrderBillSection");
|
|
849
856
|
var _OrderPreferencesSections = require("./src/components/OrderDetails/OrderPreferencesSections");
|
|
850
857
|
var _ActionsSection = require("./src/components/OrderDetails/ActionsSection");
|
|
@@ -53,7 +53,8 @@ var AddressListUI = function AddressListUI(props) {
|
|
|
53
53
|
isCustomerMode = props.isCustomerMode,
|
|
54
54
|
isFromCheckout = props.isFromCheckout,
|
|
55
55
|
setIsAddressFormOpen = props.setIsAddressFormOpen,
|
|
56
|
-
isProfile = props.isProfile
|
|
56
|
+
isProfile = props.isProfile,
|
|
57
|
+
isMobile = props.isMobile;
|
|
57
58
|
var _useLanguage = (0, _orderingComponentsExternal.useLanguage)(),
|
|
58
59
|
_useLanguage2 = _slicedToArray(_useLanguage, 2),
|
|
59
60
|
t = _useLanguage2[1];
|
|
@@ -225,7 +226,7 @@ var AddressListUI = function AddressListUI(props) {
|
|
|
225
226
|
return openAddress({});
|
|
226
227
|
},
|
|
227
228
|
disabled: (orderState === null || orderState === void 0 ? void 0 : orderState.loading) || actionStatus.loading,
|
|
228
|
-
style: isCompletedLayout ? {
|
|
229
|
+
style: isCompletedLayout && !isMobile ? {
|
|
229
230
|
flex: 1,
|
|
230
231
|
width: 'fit-content'
|
|
231
232
|
} : {}
|
|
@@ -24,7 +24,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
24
24
|
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; } }
|
|
25
25
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
26
26
|
var BusinessItemAccordion = function BusinessItemAccordion(props) {
|
|
27
|
-
var _configs$cart_change_, _orderingTheme$theme, _orderingTheme$theme$, _orderingTheme$theme$2, _orderingTheme$theme$3, _orderingTheme$theme$4, _orderingTheme$theme$5, _orderingTheme$theme$6, _orderingTheme$theme$7, _orderingTheme$theme2, _orderingTheme$theme3, _orderingTheme$theme4, _orderingTheme$theme5, _orderingTheme$theme6, _orderingTheme$theme7, _orderingTheme$theme8, _orderingTheme$theme9, _props$beforeElements, _props$beforeComponen, _theme$images, _theme$images$dummies, _orderState$options, _props$afterComponent, _props$afterElements;
|
|
27
|
+
var _configs$cart_change_, _configs$checkout_mul, _orderingTheme$theme, _orderingTheme$theme$, _orderingTheme$theme$2, _orderingTheme$theme$3, _orderingTheme$theme$4, _orderingTheme$theme$5, _orderingTheme$theme$6, _orderingTheme$theme$7, _orderingTheme$theme2, _orderingTheme$theme3, _orderingTheme$theme4, _orderingTheme$theme5, _orderingTheme$theme6, _orderingTheme$theme7, _orderingTheme$theme8, _orderingTheme$theme9, _props$beforeElements, _props$beforeComponen, _theme$images, _theme$images$dummies, _orderState$options, _props$afterComponent, _props$afterElements;
|
|
28
28
|
var uuid = props.uuid,
|
|
29
29
|
isCartPending = props.isCartPending,
|
|
30
30
|
currentCartUuid = props.currentCartUuid,
|
|
@@ -81,6 +81,7 @@ var BusinessItemAccordion = function BusinessItemAccordion(props) {
|
|
|
81
81
|
cartProductUpdated = _useState8[0],
|
|
82
82
|
setCartProductUpdated = _useState8[1];
|
|
83
83
|
var isBusinessChangeEnabled = (configs === null || configs === void 0 ? void 0 : (_configs$cart_change_ = configs.cart_change_business_validation) === null || _configs$cart_change_ === void 0 ? void 0 : _configs$cart_change_.value) === '1';
|
|
84
|
+
var checkoutMultiBusinessEnabled = (configs === null || configs === void 0 ? void 0 : (_configs$checkout_mul = configs.checkout_multi_business_enabled) === null || _configs$checkout_mul === void 0 ? void 0 : _configs$checkout_mul.value) === '1';
|
|
84
85
|
var content = (0, _react.useRef)(null);
|
|
85
86
|
var businessStore = (0, _react.useRef)(null);
|
|
86
87
|
var businessDelete = (0, _react.useRef)(null);
|
|
@@ -200,7 +201,7 @@ var BusinessItemAccordion = function BusinessItemAccordion(props) {
|
|
|
200
201
|
ref: changeStore,
|
|
201
202
|
onClick: handleChangeStore,
|
|
202
203
|
className: "change-store"
|
|
203
|
-
}, t('CHANGE_STORE', 'Change store')))), props.children), !setActive && !isClosed && !!isProducts && !checkoutButtonDisabled && !isMultiCheckout && /*#__PURE__*/_react.default.createElement(_styles.PriceContainer, null, /*#__PURE__*/_react.default.createElement("h4", null, parsePrice(total)), /*#__PURE__*/_react.default.createElement(_Buttons.Button, {
|
|
204
|
+
}, t('CHANGE_STORE', 'Change store')))), props.children), !setActive && !isClosed && !!isProducts && !checkoutButtonDisabled && !isMultiCheckout && !checkoutMultiBusinessEnabled && /*#__PURE__*/_react.default.createElement(_styles.PriceContainer, null, /*#__PURE__*/_react.default.createElement("h4", null, parsePrice(total)), /*#__PURE__*/_react.default.createElement(_Buttons.Button, {
|
|
204
205
|
onClick: handleClickCheckout,
|
|
205
206
|
color: "primary"
|
|
206
207
|
}, t('CHECKOUT', 'Checkout')))), (_props$afterComponent = props.afterComponents) === null || _props$afterComponent === void 0 ? void 0 : _props$afterComponent.map(function (AfterComponent, i) {
|
|
@@ -47,7 +47,7 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
|
|
|
47
47
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
48
48
|
var PIXELS_TO_SCROLL = 300;
|
|
49
49
|
var BusinessListingSearchUI = function BusinessListingSearchUI(props) {
|
|
50
|
-
var _businessesSearchList, _sortItems$filter, _brandList$brands, _brandList$brands$fil, _orderState$options3, _orderState$options4, _orderState$options5, _businessesSearchList3, _businessesSearchList4, _businessesSearchList6, _curProduct$
|
|
50
|
+
var _businessesSearchList, _Object$values$find, _sortItems$filter, _brandList$brands, _brandList$brands$fil, _orderState$options3, _orderState$options4, _orderState$options5, _businessesSearchList3, _businessesSearchList4, _businessesSearchList6, _curProduct$business2, _curProduct$business3, _curProduct$product, _curProduct$product2, _currentCart$products;
|
|
51
51
|
var businessesSearchList = props.businessesSearchList,
|
|
52
52
|
onBusinessClick = props.onBusinessClick,
|
|
53
53
|
handleChangeFilters = props.handleChangeFilters,
|
|
@@ -117,6 +117,10 @@ var BusinessListingSearchUI = function BusinessListingSearchUI(props) {
|
|
|
117
117
|
content: '$$$$$'
|
|
118
118
|
}];
|
|
119
119
|
var noResults = !businessesSearchList.loading && !businessesSearchList.lengthError && (businessesSearchList === null || businessesSearchList === void 0 ? void 0 : (_businessesSearchList = businessesSearchList.businesses) === null || _businessesSearchList === void 0 ? void 0 : _businessesSearchList.length) === 0;
|
|
120
|
+
var currentCart = (_Object$values$find = Object.values(orderState === null || orderState === void 0 ? void 0 : orderState.carts).find(function (cart) {
|
|
121
|
+
var _cart$business, _curProduct$business;
|
|
122
|
+
return (cart === null || cart === void 0 ? void 0 : (_cart$business = cart.business) === null || _cart$business === void 0 ? void 0 : _cart$business.slug) === (curProduct === null || curProduct === void 0 ? void 0 : (_curProduct$business = curProduct.business) === null || _curProduct$business === void 0 ? void 0 : _curProduct$business.slug);
|
|
123
|
+
})) !== null && _Object$values$find !== void 0 ? _Object$values$find : {};
|
|
120
124
|
var handleScroll = (0, _react.useCallback)(function () {
|
|
121
125
|
var _document$documentEle, _document$documentEle2, _businessesSearchList2;
|
|
122
126
|
var innerHeightScrolltop = window.innerHeight + ((_document$documentEle = document.documentElement) === null || _document$documentEle === void 0 ? void 0 : _document$documentEle.scrollTop) + PIXELS_TO_SCROLL;
|
|
@@ -346,16 +350,20 @@ var BusinessListingSearchUI = function BusinessListingSearchUI(props) {
|
|
|
346
350
|
isProductForm: true,
|
|
347
351
|
disableOverflowX: true
|
|
348
352
|
}, !!(curProduct !== null && curProduct !== void 0 && curProduct.product) && /*#__PURE__*/_react.default.createElement(_ProductForm.ProductForm, {
|
|
349
|
-
businessSlug: curProduct === null || curProduct === void 0 ? void 0 : (_curProduct$
|
|
353
|
+
businessSlug: curProduct === null || curProduct === void 0 ? void 0 : (_curProduct$business2 = curProduct.business) === null || _curProduct$business2 === void 0 ? void 0 : _curProduct$business2.slug,
|
|
350
354
|
useKioskApp: props === null || props === void 0 ? void 0 : props.useKioskApp,
|
|
351
|
-
|
|
355
|
+
product: curProduct === null || curProduct === void 0 ? void 0 : curProduct.product,
|
|
356
|
+
businessId: curProduct === null || curProduct === void 0 ? void 0 : (_curProduct$business3 = curProduct.business) === null || _curProduct$business3 === void 0 ? void 0 : _curProduct$business3.id,
|
|
352
357
|
categoryId: curProduct === null || curProduct === void 0 ? void 0 : (_curProduct$product = curProduct.product) === null || _curProduct$product === void 0 ? void 0 : _curProduct$product.category_id,
|
|
353
358
|
productId: curProduct === null || curProduct === void 0 ? void 0 : (_curProduct$product2 = curProduct.product) === null || _curProduct$product2 === void 0 ? void 0 : _curProduct$product2.id,
|
|
354
359
|
onSave: handleRedirectToCart,
|
|
355
360
|
handleUpdateProducts: function handleUpdateProducts(productId, changes) {
|
|
356
|
-
var _curProduct$product3, _curProduct$
|
|
357
|
-
return _handleUpdateProducts(productId, curProduct === null || curProduct === void 0 ? void 0 : (_curProduct$product3 = curProduct.product) === null || _curProduct$product3 === void 0 ? void 0 : _curProduct$product3.category_id, curProduct === null || curProduct === void 0 ? void 0 : (_curProduct$
|
|
358
|
-
}
|
|
361
|
+
var _curProduct$product3, _curProduct$business4;
|
|
362
|
+
return _handleUpdateProducts(productId, curProduct === null || curProduct === void 0 ? void 0 : (_curProduct$product3 = curProduct.product) === null || _curProduct$product3 === void 0 ? void 0 : _curProduct$product3.category_id, curProduct === null || curProduct === void 0 ? void 0 : (_curProduct$business4 = curProduct.business) === null || _curProduct$business4 === void 0 ? void 0 : _curProduct$business4.id, changes);
|
|
363
|
+
},
|
|
364
|
+
productAddedToCartLength: (currentCart === null || currentCart === void 0 ? void 0 : (_currentCart$products = currentCart.products) === null || _currentCart$products === void 0 ? void 0 : _currentCart$products.reduce(function (productsLength, Cproduct) {
|
|
365
|
+
return productsLength + ((Cproduct === null || Cproduct === void 0 ? void 0 : Cproduct.id) === (curProduct === null || curProduct === void 0 ? void 0 : curProduct.id) ? Cproduct === null || Cproduct === void 0 ? void 0 : Cproduct.quantity : 0);
|
|
366
|
+
}, 0)) || 0
|
|
359
367
|
})));
|
|
360
368
|
};
|
|
361
369
|
exports.BusinessListingSearchUI = BusinessListingSearchUI;
|
|
@@ -32,7 +32,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
32
32
|
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; } }
|
|
33
33
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
34
34
|
var BusinessProductsCategoriesUI = function BusinessProductsCategoriesUI(props) {
|
|
35
|
-
var _props$beforeElements, _props$beforeComponen, _props$afterComponent, _props$afterElements;
|
|
35
|
+
var _orderingTheme$theme, _orderingTheme$theme$, _orderingTheme$theme$2, _orderingTheme$theme$3, _orderingTheme$theme$4, _props$beforeElements, _props$beforeComponen, _props$afterComponent, _props$afterElements;
|
|
36
36
|
var isSkeleton = props.isSkeleton,
|
|
37
37
|
categories = props.categories,
|
|
38
38
|
featured = props.featured,
|
|
@@ -43,6 +43,9 @@ var BusinessProductsCategoriesUI = function BusinessProductsCategoriesUI(props)
|
|
|
43
43
|
useKioskApp = props.useKioskApp,
|
|
44
44
|
isProfessional = props.isProfessional;
|
|
45
45
|
var theme = (0, _styledComponents.useTheme)();
|
|
46
|
+
var _useOrderingTheme = (0, _orderingComponentsExternal.useOrderingTheme)(),
|
|
47
|
+
_useOrderingTheme2 = _slicedToArray(_useOrderingTheme, 1),
|
|
48
|
+
orderingTheme = _useOrderingTheme2[0];
|
|
46
49
|
var _useState = (0, _react.useState)({
|
|
47
50
|
id: null
|
|
48
51
|
}),
|
|
@@ -50,6 +53,7 @@ var BusinessProductsCategoriesUI = function BusinessProductsCategoriesUI(props)
|
|
|
50
53
|
selectedCategory = _useState2[0],
|
|
51
54
|
setSelectedCateogry = _useState2[1];
|
|
52
55
|
var scrollTopSpan = 60;
|
|
56
|
+
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';
|
|
53
57
|
var handleChangeCategory = function handleChangeCategory(category) {
|
|
54
58
|
var _document$getElementB, _document$getElementB2;
|
|
55
59
|
var isBlockScroll = window.location.search.includes('category') && window.location.search.includes('product');
|
|
@@ -131,12 +135,13 @@ var BusinessProductsCategoriesUI = function BusinessProductsCategoriesUI(props)
|
|
|
131
135
|
(0, _react.useEffect)(function () {
|
|
132
136
|
if (typeof useKioskApp === 'undefined') return;
|
|
133
137
|
var styleSheet = document.getElementById('styles').sheet;
|
|
138
|
+
var disabledCustomWidth = isChew;
|
|
134
139
|
var style0 = '.sticky-prod-cat {';
|
|
135
140
|
style0 += 'position: fixed !important;';
|
|
136
141
|
style0 += 'top: 0px !important;';
|
|
137
142
|
style0 += 'left: 0px !important;';
|
|
138
143
|
style0 += 'padding: 5px 5px 0px 5px !important;';
|
|
139
|
-
style0 += "width: calc(100% - ".concat(useKioskApp ? '50px' : '155px', ") !important;");
|
|
144
|
+
!disabledCustomWidth && (style0 += "width: calc(100% - ".concat(useKioskApp ? '50px' : '155px', ") !important;"));
|
|
140
145
|
style0 += '}';
|
|
141
146
|
var style1 = '.sticky-search {';
|
|
142
147
|
style1 += 'position: fixed !important;';
|
|
@@ -152,7 +157,7 @@ var BusinessProductsCategoriesUI = function BusinessProductsCategoriesUI(props)
|
|
|
152
157
|
return function () {
|
|
153
158
|
return window.removeEventListener('scroll', handleScroll);
|
|
154
159
|
};
|
|
155
|
-
}, [useKioskApp]);
|
|
160
|
+
}, [useKioskApp, isChew]);
|
|
156
161
|
(0, _react.useEffect)(function () {
|
|
157
162
|
var _business$professiona;
|
|
158
163
|
if ((business === null || business === void 0 ? void 0 : (_business$professiona = business.professionals) === null || _business$professiona === void 0 ? void 0 : _business$professiona.length) > 0 && !useKioskApp) {
|
|
@@ -34,7 +34,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
34
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; } }
|
|
35
35
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
36
36
|
var BusinessProductsListUI = function BusinessProductsListUI(props) {
|
|
37
|
-
var _configs$use_parent_c, _configs$use_parent_c2, _categoryState$produc, _props$beforeElements, _props$beforeComponen, _category$subcategori2,
|
|
37
|
+
var _configs$use_parent_c, _configs$use_parent_c2, _categoryState$produc, _props$beforeElements, _props$beforeComponen, _category$subcategori2, _category$subcategori3, _category$subcategori4, _category$subcategori5, _categoryState$produc2, _categoryState$produc3, _categoryState$produc4, _props$afterComponent, _props$afterElements;
|
|
38
38
|
var errors = props.errors,
|
|
39
39
|
businessId = props.businessId,
|
|
40
40
|
isLazy = props.isLazy,
|
|
@@ -136,9 +136,7 @@ var BusinessProductsListUI = function BusinessProductsListUI(props) {
|
|
|
136
136
|
}, props));
|
|
137
137
|
}), /*#__PURE__*/_react.default.createElement(_styles.ProductsContainer, null, (category === null || category === void 0 ? void 0 : category.id) && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_styles.HeaderWrapper, null, (category === null || category === void 0 ? void 0 : (_category$subcategori2 = category.subcategories) === null || _category$subcategori2 === void 0 ? void 0 : _category$subcategori2.length) > 0 && !isSearchMode && /*#__PURE__*/_react.default.createElement(SubcategoriesComponent, {
|
|
138
138
|
category: category
|
|
139
|
-
})), /*#__PURE__*/_react.default.createElement(_styles.ProductsListing, null, productsCategorySelected
|
|
140
|
-
return (product === null || product === void 0 ? void 0 : product.category_id) === (category === null || category === void 0 ? void 0 : category.id);
|
|
141
|
-
})) === null || _productsCategorySele === void 0 ? void 0 : _productsCategorySele.map(function (product, i) {
|
|
139
|
+
})), /*#__PURE__*/_react.default.createElement(_styles.ProductsListing, null, productsCategorySelected.map(function (product, i) {
|
|
142
140
|
var _currentCart$products;
|
|
143
141
|
return /*#__PURE__*/_react.default.createElement(_SingleProductCard.SingleProductCard, {
|
|
144
142
|
key: i,
|
|
@@ -158,14 +156,14 @@ var BusinessProductsListUI = function BusinessProductsListUI(props) {
|
|
|
158
156
|
return (product === null || product === void 0 ? void 0 : product.category_id) === (subcategory === null || subcategory === void 0 ? void 0 : subcategory.id);
|
|
159
157
|
});
|
|
160
158
|
})) === null || _category$subcategori5 === void 0 ? void 0 : _category$subcategori5.map(function (subcategory) {
|
|
161
|
-
var
|
|
159
|
+
var _productsCategorySele;
|
|
162
160
|
return /*#__PURE__*/_react.default.createElement(_styles.SubcategorySearchContainer, {
|
|
163
161
|
key: subcategory === null || subcategory === void 0 ? void 0 : subcategory.id
|
|
164
162
|
}, /*#__PURE__*/_react.default.createElement("h4", null, subcategory === null || subcategory === void 0 ? void 0 : subcategory.name), /*#__PURE__*/_react.default.createElement(_styles.ProductsListing, {
|
|
165
163
|
isSubcategorySearch: true
|
|
166
|
-
}, productsCategorySelected === null || productsCategorySelected === void 0 ? void 0 : (
|
|
164
|
+
}, productsCategorySelected === null || productsCategorySelected === void 0 ? void 0 : (_productsCategorySele = productsCategorySelected.filter(function (product) {
|
|
167
165
|
return (product === null || product === void 0 ? void 0 : product.category_id) === (subcategory === null || subcategory === void 0 ? void 0 : subcategory.id);
|
|
168
|
-
})) === null ||
|
|
166
|
+
})) === null || _productsCategorySele === void 0 ? void 0 : _productsCategorySele.map(function (product, i) {
|
|
169
167
|
var _currentCart$products2;
|
|
170
168
|
return /*#__PURE__*/_react.default.createElement(_SingleProductCard.SingleProductCard, {
|
|
171
169
|
key: i,
|
|
@@ -200,18 +198,30 @@ var BusinessProductsListUI = function BusinessProductsListUI(props) {
|
|
|
200
198
|
return productsLength + ((Cproduct === null || Cproduct === void 0 ? void 0 : Cproduct.id) === (product === null || product === void 0 ? void 0 : product.id) ? Cproduct === null || Cproduct === void 0 ? void 0 : Cproduct.quantity : 0);
|
|
201
199
|
}, 0)
|
|
202
200
|
});
|
|
201
|
+
}), !(categoryState !== null && categoryState !== void 0 && categoryState.loading) && (categoryState === null || categoryState === void 0 ? void 0 : (_categoryState$produc4 = categoryState.products) === null || _categoryState$produc4 === void 0 ? void 0 : _categoryState$produc4.length) > 9 && /*#__PURE__*/_react.default.createElement(_SingleProductCard.SingleProductCard, {
|
|
202
|
+
useCustomFunctionality: true,
|
|
203
|
+
onCustomClick: function onCustomClick() {
|
|
204
|
+
return onClickCategory(category);
|
|
205
|
+
},
|
|
206
|
+
isCartOnProductsList: isCartOnProductsList,
|
|
207
|
+
handleUpdateProducts: handleUpdateProducts,
|
|
208
|
+
customText: t('MORE', 'More'),
|
|
209
|
+
customStyle: {
|
|
210
|
+
display: 'flex',
|
|
211
|
+
justifyContent: 'center'
|
|
212
|
+
}
|
|
203
213
|
})))), !(category !== null && category !== void 0 && category.id) && categories.filter(function (category) {
|
|
204
214
|
return (category === null || category === void 0 ? void 0 : category.id) !== null;
|
|
205
215
|
}).map(function (category, i, _categories) {
|
|
206
|
-
var _categoryState$
|
|
207
|
-
var _products = !isUseParentCategory ? (_categoryState$
|
|
216
|
+
var _categoryState$produc5, _categoryState$produc6, _categoryState$produc7, _categoryState$produc8, _category$description, _category$description2, _category$subcategori6, _category$subcategori7, _category$ribbon, _category$ribbon2, _category$ribbon3, _category$ribbon4, _category$ribbon5, _headerRef$current, _category$description3, _category$subcategori8, _category$subcategori9, _products$filter, _category$subcategori10, _category$subcategori11, _category$subcategori12;
|
|
217
|
+
var _products = !isUseParentCategory ? (_categoryState$produc5 = categoryState === null || categoryState === void 0 ? void 0 : (_categoryState$produc6 = categoryState.products) === null || _categoryState$produc6 === void 0 ? void 0 : _categoryState$produc6.filter(function (product) {
|
|
208
218
|
return (product === null || product === void 0 ? void 0 : product.category_id) === (category === null || category === void 0 ? void 0 : category.id);
|
|
209
|
-
})) !== null && _categoryState$
|
|
219
|
+
})) !== null && _categoryState$produc5 !== void 0 ? _categoryState$produc5 : [] : (_categoryState$produc7 = categoryState === null || categoryState === void 0 ? void 0 : (_categoryState$produc8 = categoryState.products) === null || _categoryState$produc8 === void 0 ? void 0 : _categoryState$produc8.filter(function (product) {
|
|
210
220
|
var _category$children;
|
|
211
221
|
return category === null || category === void 0 ? void 0 : (_category$children = category.children) === null || _category$children === void 0 ? void 0 : _category$children.some(function (cat) {
|
|
212
222
|
return cat.category_id === (product === null || product === void 0 ? void 0 : product.category_id);
|
|
213
223
|
});
|
|
214
|
-
})) !== null && _categoryState$
|
|
224
|
+
})) !== null && _categoryState$produc7 !== void 0 ? _categoryState$produc7 : [];
|
|
215
225
|
var products = (subcategoriesSelected === null || subcategoriesSelected === void 0 ? void 0 : subcategoriesSelected.length) > 0 ? _products === null || _products === void 0 ? void 0 : _products.filter(function (product) {
|
|
216
226
|
return !(subcategoriesSelected !== null && subcategoriesSelected !== void 0 && subcategoriesSelected.find(function (subcategory) {
|
|
217
227
|
return (subcategory === null || subcategory === void 0 ? void 0 : subcategory.parent_category_id) === (category === null || category === void 0 ? void 0 : category.id);
|
|
@@ -249,8 +259,8 @@ var BusinessProductsListUI = function BusinessProductsListUI(props) {
|
|
|
249
259
|
category: category
|
|
250
260
|
})), /*#__PURE__*/_react.default.createElement(_styles.ProductsListing, {
|
|
251
261
|
isSubcategorySearch: isSubcategorySearch
|
|
252
|
-
}, isSearchMode && (category === null || category === void 0 ? void 0 : (_category$subcategori9 = category.subcategories) === null || _category$subcategori9 === void 0 ? void 0 : _category$subcategori9.length) > 0 ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, products === null || products === void 0 ? void 0 : (_products$filter = products.filter(function (product) {
|
|
253
|
-
return (product === null || product === void 0 ? void 0 : product.category_id) === (category === null || category === void 0 ? void 0 : category.id);
|
|
262
|
+
}, isSearchMode && (category === null || category === void 0 ? void 0 : (_category$subcategori9 = category.subcategories) === null || _category$subcategori9 === void 0 ? void 0 : _category$subcategori9.length) > 0 ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, products === null || products === void 0 ? void 0 : (_products$filter = products.filter(function (product, i) {
|
|
263
|
+
return i < 9 && (product === null || product === void 0 ? void 0 : product.category_id) === (category === null || category === void 0 ? void 0 : category.id);
|
|
254
264
|
})) === null || _products$filter === void 0 ? void 0 : _products$filter.map(function (product, i) {
|
|
255
265
|
var _currentCart$products4;
|
|
256
266
|
return /*#__PURE__*/_react.default.createElement(_SingleProductCard.SingleProductCard, {
|
|
@@ -266,7 +276,21 @@ var BusinessProductsListUI = function BusinessProductsListUI(props) {
|
|
|
266
276
|
return productsLength + ((Cproduct === null || Cproduct === void 0 ? void 0 : Cproduct.id) === (product === null || product === void 0 ? void 0 : product.id) ? Cproduct === null || Cproduct === void 0 ? void 0 : Cproduct.quantity : 0);
|
|
267
277
|
}, 0)
|
|
268
278
|
});
|
|
269
|
-
})) : /*#__PURE__*/_react.default.createElement(
|
|
279
|
+
}), !(categoryState !== null && categoryState !== void 0 && categoryState.loading) && (products === null || products === void 0 ? void 0 : products.length) > 9 && /*#__PURE__*/_react.default.createElement(_SingleProductCard.SingleProductCard, {
|
|
280
|
+
useCustomFunctionality: true,
|
|
281
|
+
onCustomClick: function onCustomClick() {
|
|
282
|
+
return onClickCategory(category);
|
|
283
|
+
},
|
|
284
|
+
isCartOnProductsList: isCartOnProductsList,
|
|
285
|
+
handleUpdateProducts: handleUpdateProducts,
|
|
286
|
+
customText: t('MORE', 'More'),
|
|
287
|
+
customStyle: {
|
|
288
|
+
display: 'flex',
|
|
289
|
+
justifyContent: 'center'
|
|
290
|
+
}
|
|
291
|
+
})) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, products.filter(function (_, i) {
|
|
292
|
+
return i < 9;
|
|
293
|
+
}).map(function (product, i) {
|
|
270
294
|
var _currentCart$products5;
|
|
271
295
|
return /*#__PURE__*/_react.default.createElement(_SingleProductCard.SingleProductCard, {
|
|
272
296
|
key: i,
|
|
@@ -281,6 +305,18 @@ var BusinessProductsListUI = function BusinessProductsListUI(props) {
|
|
|
281
305
|
return productsLength + ((Cproduct === null || Cproduct === void 0 ? void 0 : Cproduct.id) === (product === null || product === void 0 ? void 0 : product.id) ? Cproduct === null || Cproduct === void 0 ? void 0 : Cproduct.quantity : 0);
|
|
282
306
|
}, 0)
|
|
283
307
|
});
|
|
308
|
+
}), !(categoryState !== null && categoryState !== void 0 && categoryState.loading) && (products === null || products === void 0 ? void 0 : products.length) > 9 && /*#__PURE__*/_react.default.createElement(_SingleProductCard.SingleProductCard, {
|
|
309
|
+
useCustomFunctionality: true,
|
|
310
|
+
onCustomClick: function onCustomClick() {
|
|
311
|
+
return onClickCategory(category);
|
|
312
|
+
},
|
|
313
|
+
isCartOnProductsList: isCartOnProductsList,
|
|
314
|
+
handleUpdateProducts: handleUpdateProducts,
|
|
315
|
+
customText: t('MORE', 'More'),
|
|
316
|
+
customStyle: {
|
|
317
|
+
display: 'flex',
|
|
318
|
+
justifyContent: 'center'
|
|
319
|
+
}
|
|
284
320
|
})), categoryState.loading && i + 1 === _categories.length && _toConsumableArray(Array(categoryState.pagination.nextPageItems).keys()).map(function (i) {
|
|
285
321
|
return /*#__PURE__*/_react.default.createElement(_SingleProductCard.SingleProductCard, {
|
|
286
322
|
key: "skeleton:".concat(i),
|
|
@@ -25,6 +25,7 @@ var _Confirm = require("../../../../../components/Confirm");
|
|
|
25
25
|
var _FloatingButton = require("../../../../../components/FloatingButton");
|
|
26
26
|
var _UpsellingPage = require("../../../../../components/UpsellingPage");
|
|
27
27
|
var _ServiceForm = require("../ServiceForm");
|
|
28
|
+
var _OrderContextUI = require("../OrderContextUI");
|
|
28
29
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
29
30
|
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); }
|
|
30
31
|
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; }
|
|
@@ -385,11 +386,17 @@ var BusinessProductsListingUI = function BusinessProductsListingUI(props) {
|
|
|
385
386
|
adjustBusiness(adjustBusinessId);
|
|
386
387
|
}
|
|
387
388
|
}, [currentCart]);
|
|
388
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_styles.ProductsContainer, null, !props.useKioskApp &&
|
|
389
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_styles.ProductsContainer, null, !props.useKioskApp &&
|
|
390
|
+
/*#__PURE__*/
|
|
391
|
+
// <ArrowLeft onClick={() => handleGoToBusinessList()} />
|
|
392
|
+
_react.default.createElement(_styles.HeaderContent, null, /*#__PURE__*/_react.default.createElement(_reactBootstrapIcons.ArrowLeft, {
|
|
393
|
+
className: "back-arrow",
|
|
389
394
|
onClick: function onClick() {
|
|
390
395
|
return handleGoToBusinessList();
|
|
391
396
|
}
|
|
392
|
-
}), /*#__PURE__*/_react.default.createElement(
|
|
397
|
+
}), (windowSize === null || windowSize === void 0 ? void 0 : windowSize.width) < 576 && /*#__PURE__*/_react.default.createElement(_styles.OrderContextUIWrapper, null, /*#__PURE__*/_react.default.createElement(_OrderContextUI.OrderContextUI, {
|
|
398
|
+
isCheckOut: true
|
|
399
|
+
}))), /*#__PURE__*/_react.default.createElement(_RenderProductsLayout.RenderProductsLayout, {
|
|
393
400
|
errors: errors,
|
|
394
401
|
isError: error,
|
|
395
402
|
isLoading: loading,
|
|
@@ -4,15 +4,13 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.Title = exports.SkeletonItem = exports.ProductsContainer = exports.ProductLoading = exports.MobileCartViewWrapper = exports.EmptyCart = exports.EmptyBtnWrapper = exports.BusinessCartContent = void 0;
|
|
7
|
+
exports.Title = exports.SkeletonItem = exports.ProductsContainer = exports.ProductLoading = exports.OrderContextUIWrapper = exports.MobileCartViewWrapper = exports.HeaderContent = exports.EmptyCart = exports.EmptyBtnWrapper = exports.BusinessCartContent = void 0;
|
|
8
8
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
9
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9;
|
|
9
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12;
|
|
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 ProductsContainer = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 95%;\n margin: 20px auto 0px;\n
|
|
14
|
-
return props.theme.colors.headingColor;
|
|
15
|
-
});
|
|
13
|
+
var ProductsContainer = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 95%;\n margin: 20px auto 0px;\n"])));
|
|
16
14
|
exports.ProductsContainer = ProductsContainer;
|
|
17
15
|
var ProductLoading = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n width: 100%;\n display: flex;\n flex-direction: column;\n"])));
|
|
18
16
|
exports.ProductLoading = ProductLoading;
|
|
@@ -37,4 +35,10 @@ exports.Title = Title;
|
|
|
37
35
|
var EmptyBtnWrapper = _styledComponents.default.div(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-top: 20px;\n\n span {\n font-weight: 600;\n font-size: 16px;\n color: ", ";\n }\n\n button {\n color: #748194;\n background: #F8F9FA;\n border: 1px solid #F8F9FA;\n border-radius: 7.6px;\n height: 44px;\n font-size: 14px;\n padding-left: 25px;\n padding-right: 25px;\n }\n"])), function (props) {
|
|
38
36
|
return props.theme.colors.darkTextColor;
|
|
39
37
|
});
|
|
40
|
-
exports.EmptyBtnWrapper = EmptyBtnWrapper;
|
|
38
|
+
exports.EmptyBtnWrapper = EmptyBtnWrapper;
|
|
39
|
+
var HeaderContent = _styledComponents.default.div(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n margin-bottom: 10px;\n .back-arrow {\n font-size: 24px;\n cursor: pointer;\n }\n"])));
|
|
40
|
+
exports.HeaderContent = HeaderContent;
|
|
41
|
+
var OrderContextUIWrapper = _styledComponents.default.div(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n flex: 1;\n width: 100%;\n ", "\n"])), function (props) {
|
|
42
|
+
return props.theme.rtl && (0, _styledComponents.css)(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n margin-left: 0px;\n margin-right: 15px;\n "])));
|
|
43
|
+
});
|
|
44
|
+
exports.OrderContextUIWrapper = OrderContextUIWrapper;
|