ordering-ui-external 1.9.1 → 1.9.3
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.ea0875b41af5b7f1d809.js +1 -0
- package/_bundles/{1.ordering-ui.a97bdaf67c563ada4c74.js → 1.ordering-ui.ea0875b41af5b7f1d809.js} +1 -1
- package/_bundles/{2.ordering-ui.a97bdaf67c563ada4c74.js → 2.ordering-ui.ea0875b41af5b7f1d809.js} +1 -1
- package/_bundles/{4.ordering-ui.a97bdaf67c563ada4c74.js → 4.ordering-ui.ea0875b41af5b7f1d809.js} +1 -1
- package/_bundles/{5.ordering-ui.a97bdaf67c563ada4c74.js → 5.ordering-ui.ea0875b41af5b7f1d809.js} +1 -1
- package/_bundles/{6.ordering-ui.a97bdaf67c563ada4c74.js → 6.ordering-ui.ea0875b41af5b7f1d809.js} +1 -1
- package/_bundles/{7.ordering-ui.a97bdaf67c563ada4c74.js → 7.ordering-ui.ea0875b41af5b7f1d809.js} +2 -2
- package/_bundles/{7.ordering-ui.a97bdaf67c563ada4c74.js.LICENSE.txt → 7.ordering-ui.ea0875b41af5b7f1d809.js.LICENSE.txt} +0 -0
- package/_bundles/{8.ordering-ui.a97bdaf67c563ada4c74.js → 8.ordering-ui.ea0875b41af5b7f1d809.js} +1 -1
- package/_bundles/{9.ordering-ui.a97bdaf67c563ada4c74.js → 9.ordering-ui.ea0875b41af5b7f1d809.js} +1 -1
- package/_bundles/ordering-ui.ea0875b41af5b7f1d809.js +2 -0
- package/_bundles/{ordering-ui.a97bdaf67c563ada4c74.js.LICENSE.txt → ordering-ui.ea0875b41af5b7f1d809.js.LICENSE.txt} +0 -0
- package/_modules/components/VerticalOrdersLayout/SingleOrderCard/index.js +9 -10
- 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/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 +34 -129
- package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/styles.js +29 -40
- package/_modules/themes/five/src/components/Cart/index.js +6 -3
- package/_modules/themes/five/src/components/CartContent/index.js +97 -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 +20 -10
- package/_modules/themes/five/src/components/MultiCheckout/styles.js +11 -8
- package/_modules/themes/five/src/components/MultiOrdersDetails/index.js +2 -0
- 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 +5 -2
- 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/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 +2 -1
- package/src/components/VerticalOrdersLayout/SingleOrderCard/index.js +12 -12
- 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/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 +2 -85
- package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/styles.js +2 -77
- package/src/themes/five/src/components/Cart/index.js +6 -3
- package/src/themes/five/src/components/CartContent/index.js +61 -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 +26 -6
- package/src/themes/five/src/components/MultiCheckout/styles.js +8 -13
- package/src/themes/five/src/components/MultiOrdersDetails/index.js +2 -0
- 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 +6 -2
- 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/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 +1 -1
- 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 +24 -0
- package/template/pages/MultiCheckout/index.js +86 -10
- package/template/pages/MultiOrdersDetails/index.js +9 -4
- package/_bundles/0.ordering-ui.a97bdaf67c563ada4c74.js +0 -1
- package/_bundles/ordering-ui.a97bdaf67c563ada4c74.js +0 -2
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.Text = exports.SuboptionPrice = exports.SubOptionThumbnail = exports.RightOptionContainer = exports.QuantityControl = exports.PositionControl = exports.LeftOptionContainer = exports.IconControl = exports.Container = void 0;
|
|
8
8
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
9
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16;
|
|
9
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17;
|
|
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) } })); }
|
|
@@ -21,50 +21,53 @@ var IconControl = _styledComponents.default.div(_templateObject2 || (_templateOb
|
|
|
21
21
|
return props.theme.colors.lightGray;
|
|
22
22
|
});
|
|
23
23
|
exports.IconControl = IconControl;
|
|
24
|
-
var Text = _styledComponents.default.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n flex: 1 1 auto;\n display: flex;\n font-weight: 300;\n color: #555;\n overflow: hidden;\n text-overflow: ellipsis;\n margin: 0 5px;\n\n div {\n overflow: hidden;\n text-overflow: ellipsis;\n font-size: 14px;\n color: ", ";\n }\n\n span {\n margin-left: 10px;\n font-weight: 500;\n color: ", ";\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n ", "\n }\n"])), function (props) {
|
|
24
|
+
var Text = _styledComponents.default.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n flex: 1 1 auto;\n display: flex;\n font-weight: 300;\n color: #555;\n overflow: hidden;\n text-overflow: ellipsis;\n margin: 0 5px;\n\n div {\n overflow: hidden;\n text-overflow: ellipsis;\n font-size: 14px;\n color: ", ";\n }\n\n span {\n margin-left: 10px;\n font-weight: 500;\n color: ", ";\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n ", "\n }\n\n ", "\n"])), function (props) {
|
|
25
25
|
return props.theme.colors.darkGray;
|
|
26
26
|
}, function (props) {
|
|
27
27
|
return props.theme.colors.primary;
|
|
28
28
|
}, function (props) {
|
|
29
29
|
var _props$theme2;
|
|
30
30
|
return ((_props$theme2 = props.theme) === null || _props$theme2 === void 0 ? void 0 : _props$theme2.rtl) && (0, _styledComponents.css)(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n margin-left: 0;\n margin-right: 10px; \n "])));
|
|
31
|
+
}, function (_ref) {
|
|
32
|
+
var noMargin = _ref.noMargin;
|
|
33
|
+
return noMargin && (0, _styledComponents.css)(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n span {\n margin: 0;\n }\n "])));
|
|
31
34
|
});
|
|
32
35
|
exports.Text = Text;
|
|
33
|
-
var SubOptionThumbnail = _styledComponents.default.div(
|
|
34
|
-
var src =
|
|
36
|
+
var SubOptionThumbnail = _styledComponents.default.div(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n display: inline-block;\n border-radius: 8px;\n background-image: url(", ");\n background-repeat: no-repeat, repeat;\n width: 40px;\n height: 40px;\n background-size: cover;\n object-fit: cover;\n background-position: center;\n justify-content: center;\n align-items: center;\n"])), function (_ref2) {
|
|
37
|
+
var src = _ref2.src;
|
|
35
38
|
return src;
|
|
36
39
|
});
|
|
37
40
|
exports.SubOptionThumbnail = SubOptionThumbnail;
|
|
38
|
-
var QuantityControl = _styledComponents.default.div(
|
|
41
|
+
var QuantityControl = _styledComponents.default.div(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n display: flex;\n color: ", ";\n align-items: center;\n font-weight: 300;\n font-size: 18px;\n margin: 0 5px;\n\n svg {\n color: ", ";\n font-size: 20px;\n margin-right: 3px;\n ", "\n }\n\n svg[disabled] {\n color: #CBCBCB;\n }\n\n svg:last-child {\n margin-left: 3px;\n margin-right: 0;\n ", "\n }\n"])), function (props) {
|
|
39
42
|
return props.theme.colors.darkGray;
|
|
40
43
|
}, function (props) {
|
|
41
44
|
return props.theme.colors.primary;
|
|
42
45
|
}, function (props) {
|
|
43
46
|
var _props$theme3;
|
|
44
|
-
return ((_props$theme3 = props.theme) === null || _props$theme3 === void 0 ? void 0 : _props$theme3.rtl) && (0, _styledComponents.css)(
|
|
47
|
+
return ((_props$theme3 = props.theme) === null || _props$theme3 === void 0 ? void 0 : _props$theme3.rtl) && (0, _styledComponents.css)(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n margin-left: 3px;\n margin-right: 0px;\n "])));
|
|
45
48
|
}, function (props) {
|
|
46
49
|
var _props$theme4;
|
|
47
|
-
return ((_props$theme4 = props.theme) === null || _props$theme4 === void 0 ? void 0 : _props$theme4.rtl) && (0, _styledComponents.css)(
|
|
50
|
+
return ((_props$theme4 = props.theme) === null || _props$theme4 === void 0 ? void 0 : _props$theme4.rtl) && (0, _styledComponents.css)(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n margin-right: 3px;\n margin-left: 0px;\n "])));
|
|
48
51
|
});
|
|
49
52
|
exports.QuantityControl = QuantityControl;
|
|
50
|
-
var PositionControl = _styledComponents.default.div(
|
|
53
|
+
var PositionControl = _styledComponents.default.div(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n color: #CBCBCB;\n font-weight: 300;\n font-size: 18px;\n margin: 0 5px;\n\n svg {\n font-size: 20px;\n margin-right: 3px;\n ", "\n &.reverse {\n transform: rotate(180deg);\n }\n\n &.selected {\n color: ", ";\n }\n\n &:last-child {\n margin-right: 0;\n ", "\n }\n }\n"])), function (props) {
|
|
51
54
|
var _props$theme5;
|
|
52
|
-
return ((_props$theme5 = props.theme) === null || _props$theme5 === void 0 ? void 0 : _props$theme5.rtl) && (0, _styledComponents.css)(
|
|
55
|
+
return ((_props$theme5 = props.theme) === null || _props$theme5 === void 0 ? void 0 : _props$theme5.rtl) && (0, _styledComponents.css)(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n margin-left: 3px;\n margin-right: 0px;\n "])));
|
|
53
56
|
}, function (props) {
|
|
54
57
|
return props.theme.colors.primary;
|
|
55
58
|
}, function (props) {
|
|
56
59
|
var _props$theme6;
|
|
57
|
-
return ((_props$theme6 = props.theme) === null || _props$theme6 === void 0 ? void 0 : _props$theme6.rtl) && (0, _styledComponents.css)(
|
|
60
|
+
return ((_props$theme6 = props.theme) === null || _props$theme6 === void 0 ? void 0 : _props$theme6.rtl) && (0, _styledComponents.css)(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n margin-left: 0;\n "])));
|
|
58
61
|
});
|
|
59
62
|
exports.PositionControl = PositionControl;
|
|
60
|
-
var SuboptionPrice = _styledComponents.default.div(
|
|
63
|
+
var SuboptionPrice = _styledComponents.default.div(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n display: flex;\n white-space: nowrap;\n font-weight: 300;\n font-size: 14px;\n color: ", ";\n margin-left: 5px;\n min-width: 60px;\n ", "\n"])), function (props) {
|
|
61
64
|
return props.theme.colors.darkGray;
|
|
62
65
|
}, function (props) {
|
|
63
66
|
var _props$theme7;
|
|
64
|
-
return ((_props$theme7 = props.theme) === null || _props$theme7 === void 0 ? void 0 : _props$theme7.rtl) && (0, _styledComponents.css)(
|
|
67
|
+
return ((_props$theme7 = props.theme) === null || _props$theme7 === void 0 ? void 0 : _props$theme7.rtl) && (0, _styledComponents.css)(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n margin-right: 5px;\n margin-left: 0px;\n "])));
|
|
65
68
|
});
|
|
66
69
|
exports.SuboptionPrice = SuboptionPrice;
|
|
67
|
-
var LeftOptionContainer = _styledComponents.default.div(
|
|
70
|
+
var LeftOptionContainer = _styledComponents.default.div(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n display: flex;\n width: 70%;\n align-items: center;\n"])));
|
|
68
71
|
exports.LeftOptionContainer = LeftOptionContainer;
|
|
69
|
-
var RightOptionContainer = _styledComponents.default.div(
|
|
72
|
+
var RightOptionContainer = _styledComponents.default.div(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n display: flex;\n width: 25%;\n align-items: center;\n justify-content: space-between;\n"])));
|
|
70
73
|
exports.RightOptionContainer = RightOptionContainer;
|
|
@@ -39,7 +39,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
39
39
|
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; } }
|
|
40
40
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
41
41
|
var SingleOrderCardUI = function SingleOrderCardUI(props) {
|
|
42
|
-
var _orderingTheme$theme, _orderingTheme$theme$, _orderingTheme$theme$2, _orderingTheme$theme$3, _orderingTheme$theme2, _orderingTheme$theme3, _orderingTheme$theme4, _orderingTheme$theme5, _props$beforeElements, _props$beforeComponen, _order$business, _order$business2, _order$business4, _theme$images2, _theme$images2$dummie, _order$
|
|
42
|
+
var _orderingTheme$theme, _orderingTheme$theme$, _orderingTheme$theme$2, _orderingTheme$theme$3, _orderingTheme$theme2, _orderingTheme$theme3, _orderingTheme$theme4, _orderingTheme$theme5, _props$beforeElements, _props$beforeComponen, _order$business, _order$business2, _order$business3, _order$business4, _order$business5, _order$business6, _theme$images2, _theme$images2$dummie, _order$business7, _theme$images3, _theme$images3$dummie, _order$business8, _theme$images4, _theme$images4$dummie, _order$business9, _order$business10, _order$summary, _order$business11, _order$business12, _order$business13, _order$business14, _getOrderStatus, _order$business15, _order$summary2, _order$business16, _props$afterComponent, _props$afterElements;
|
|
43
43
|
var order = props.order,
|
|
44
44
|
getOrderStatus = props.getOrderStatus,
|
|
45
45
|
isBusinessesPage = props.isBusinessesPage,
|
|
@@ -230,6 +230,7 @@ var SingleOrderCardUI = function SingleOrderCardUI(props) {
|
|
|
230
230
|
}, props));
|
|
231
231
|
}), /*#__PURE__*/_react.default.createElement(_styles.Container, {
|
|
232
232
|
id: "order-card",
|
|
233
|
+
w: screen.width - (screen.width < 411 ? -60 : 60),
|
|
233
234
|
isBusinessesPage: isBusinessesPage,
|
|
234
235
|
isCustomerMode: isCustomerMode,
|
|
235
236
|
onClick: function onClick(e) {
|
|
@@ -241,33 +242,32 @@ var SingleOrderCardUI = function SingleOrderCardUI(props) {
|
|
|
241
242
|
width: 60,
|
|
242
243
|
height: 60
|
|
243
244
|
}) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, !isCustomerMode && showBusinessLogo && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, (order === null || order === void 0 ? void 0 : (_order$business = order.business) === null || _order$business === void 0 ? void 0 : _order$business.length) > 1 ? /*#__PURE__*/_react.default.createElement(_styles.MultiLogosContainer, null, order === null || order === void 0 ? void 0 : (_order$business2 = order.business) === null || _order$business2 === void 0 ? void 0 : _order$business2.map(function (business, i) {
|
|
244
|
-
var
|
|
245
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
246
|
-
key: business === null || business === void 0 ? void 0 : business.id
|
|
247
|
-
}, i > 1 ? /*#__PURE__*/_react.default.createElement("p", null, "+ ", (order === null || order === void 0 ? void 0 : (_order$business3 = order.business) === null || _order$business3 === void 0 ? void 0 : _order$business3.length) - 2) : /*#__PURE__*/_react.default.createElement(_styles.BusinessLogoWrapper, {
|
|
245
|
+
var _theme$images, _theme$images$dummies;
|
|
246
|
+
return i < 2 && /*#__PURE__*/_react.default.createElement(_styles.BusinessLogoWrapper, {
|
|
247
|
+
key: business === null || business === void 0 ? void 0 : business.id,
|
|
248
248
|
bgimage: optimizeImage((business === null || business === void 0 ? void 0 : 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), 'h_400,c_limit'),
|
|
249
249
|
isMulti: true
|
|
250
|
-
})
|
|
251
|
-
})) : /*#__PURE__*/_react.default.createElement(_styles.BusinessLogoWrapper, {
|
|
252
|
-
bgimage: optimizeImage((order === null || order === void 0 ? void 0 : (_order$
|
|
253
|
-
})), isCustomerMode && showBusinessLogo && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, (((_order$
|
|
254
|
-
src: ((_order$
|
|
250
|
+
});
|
|
251
|
+
}), (order === null || order === void 0 ? void 0 : (_order$business3 = order.business) === null || _order$business3 === void 0 ? void 0 : _order$business3.length) > 1 && (order === null || order === void 0 ? void 0 : (_order$business4 = order.business) === null || _order$business4 === void 0 ? void 0 : _order$business4.length) - 2 > 0 && /*#__PURE__*/_react.default.createElement("p", null, "+ ", (order === null || order === void 0 ? void 0 : (_order$business5 = order.business) === null || _order$business5 === void 0 ? void 0 : _order$business5.length) - 2)) : /*#__PURE__*/_react.default.createElement(_styles.BusinessLogoWrapper, {
|
|
252
|
+
bgimage: optimizeImage((order === null || order === void 0 ? void 0 : (_order$business6 = order.business) === null || _order$business6 === void 0 ? void 0 : _order$business6.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), 'h_400,c_limit')
|
|
253
|
+
})), isCustomerMode && showBusinessLogo && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, (((_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)) && /*#__PURE__*/_react.default.createElement(_styles.Logo, null, /*#__PURE__*/_react.default.createElement("img", {
|
|
254
|
+
src: ((_order$business8 = order.business) === null || _order$business8 === void 0 ? void 0 : _order$business8.logo) || ((_theme$images4 = theme.images) === null || _theme$images4 === void 0 ? void 0 : (_theme$images4$dummie = _theme$images4.dummies) === null || _theme$images4$dummie === void 0 ? void 0 : _theme$images4$dummie.businessLogo),
|
|
255
255
|
alt: "business-logo",
|
|
256
256
|
width: "75px",
|
|
257
257
|
height: "75px"
|
|
258
258
|
})))), /*#__PURE__*/_react.default.createElement(_styles2.BusinessInformation, {
|
|
259
259
|
activeOrders: true,
|
|
260
|
-
isMultiCart: (order === null || order === void 0 ? void 0 : (_order$
|
|
260
|
+
isMultiCart: (order === null || order === void 0 ? void 0 : (_order$business9 = order.business) === null || _order$business9 === void 0 ? void 0 : _order$business9.length) > 1
|
|
261
261
|
}, isCustomerMode ? /*#__PURE__*/_react.default.createElement(_styles.TitleContainer, null, /*#__PURE__*/_react.default.createElement("h2", null, isSkeleton ? /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
|
|
262
262
|
width: 120
|
|
263
|
-
}) : (_order$
|
|
263
|
+
}) : (_order$business10 = order.business) === null || _order$business10 === void 0 ? void 0 : _order$business10.name), /*#__PURE__*/_react.default.createElement(_styles.Price, {
|
|
264
264
|
isBusinessesPage: isBusinessesPage,
|
|
265
265
|
isCustomerMode: isCustomerMode
|
|
266
266
|
}, /*#__PURE__*/_react.default.createElement("h2", null, isSkeleton ? /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
|
|
267
267
|
width: 50
|
|
268
268
|
}) : parsePrice((order === null || order === void 0 ? void 0 : (_order$summary = order.summary) === null || _order$summary === void 0 ? void 0 : _order$summary.total) || (order === null || order === void 0 ? void 0 : order.total))))) : /*#__PURE__*/_react.default.createElement("h2", null, isSkeleton ? /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
|
|
269
269
|
width: 120
|
|
270
|
-
}) : (order === null || order === void 0 ? void 0 : (_order$
|
|
270
|
+
}) : (order === null || order === void 0 ? void 0 : (_order$business11 = order.business) === null || _order$business11 === void 0 ? void 0 : _order$business11.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$business12 = order.business) === null || _order$business12 === void 0 ? void 0 : _order$business12.name), isSkeleton ? /*#__PURE__*/_react.default.createElement("div", {
|
|
271
271
|
className: "orders-detail"
|
|
272
272
|
}, /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
|
|
273
273
|
width: 150
|
|
@@ -275,7 +275,7 @@ var SingleOrderCardUI = function SingleOrderCardUI(props) {
|
|
|
275
275
|
className: "orders-detail"
|
|
276
276
|
}, (order === null || order === void 0 ? void 0 : order.id) && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_BsDot.default, null), /*#__PURE__*/_react.default.createElement("p", {
|
|
277
277
|
name: "order_number"
|
|
278
|
-
}, (order === null || order === void 0 ? void 0 : (_order$
|
|
278
|
+
}, (order === null || order === void 0 ? void 0 : (_order$business13 = order.business) === null || _order$business13 === void 0 ? void 0 : _order$business13.length) > 1 ? "".concat(order === null || order === void 0 ? void 0 : (_order$business14 = order.business) === null || _order$business14 === void 0 ? void 0 : _order$business14.length, " ").concat(t('ORDERS', 'orders')) : "".concat(t('ORDER_NUM', 'Order No.'), " ").concat(order.id))), showDate && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_BsDot.default, null), /*#__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, {
|
|
279
279
|
outputFormat: 'MM/DD/YY hh:mm A'
|
|
280
280
|
}) : parseDate(order === null || order === void 0 ? void 0 : order.delivery_datetime, {
|
|
281
281
|
utc: false
|
|
@@ -287,7 +287,7 @@ var SingleOrderCardUI = function SingleOrderCardUI(props) {
|
|
|
287
287
|
isBusinessesPage: isBusinessesPage
|
|
288
288
|
}, !pastOrders && /*#__PURE__*/_react.default.createElement("h2", null, isSkeleton ? /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
|
|
289
289
|
width: 50
|
|
290
|
-
}) : parsePrice((order === null || order === void 0 ? void 0 : (_order$
|
|
290
|
+
}) : parsePrice((order === null || order === void 0 ? void 0 : (_order$business15 = order.business) === null || _order$business15 === void 0 ? void 0 : _order$business15.length) > 1 ? order === null || order === void 0 ? void 0 : order.total : (order === null || order === void 0 ? void 0 : (_order$summary2 = order.summary) === null || _order$summary2 === void 0 ? void 0 : _order$summary2.total) || (order === null || order === void 0 ? void 0 : order.total)))), pastOrders && !isCustomerMode && /*#__PURE__*/_react.default.createElement(_styles.ButtonWrapper, null, !isOrderReviewed && !isFavorite && (!(order !== null && order !== void 0 && order.review) || order.driver && !(order !== null && order !== void 0 && order.user_review)) && /*#__PURE__*/_react.default.createElement(_Buttons.Button, {
|
|
291
291
|
outline: true,
|
|
292
292
|
color: "primary",
|
|
293
293
|
className: "review",
|
|
@@ -301,7 +301,7 @@ var SingleOrderCardUI = function SingleOrderCardUI(props) {
|
|
|
301
301
|
onClick: function onClick() {
|
|
302
302
|
return handleClickReorder(order);
|
|
303
303
|
}
|
|
304
|
-
}, cartState !== null && cartState !== void 0 && cartState.loading ? t('LOADING', 'Loading...') : t('REORDER', 'Reorder'))), !(order !== null && order !== void 0 && (_order$
|
|
304
|
+
}, cartState !== null && cartState !== void 0 && cartState.loading ? t('LOADING', 'Loading...') : t('REORDER', 'Reorder'))), !(order !== null && order !== void 0 && (_order$business16 = order.business) !== null && _order$business16 !== void 0 && _order$business16.length) && /*#__PURE__*/_react.default.createElement(_styles.FavoriteWrapper, {
|
|
305
305
|
onClick: function onClick() {
|
|
306
306
|
return handleChangeFavorite(order);
|
|
307
307
|
},
|
|
@@ -7,19 +7,25 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.TitleContainer = exports.ReviewWrapper = exports.Price = exports.MultiLogosContainer = exports.Map = exports.Logo = exports.FavoriteWrapper = exports.Content = exports.Container = exports.ButtonWrapper = exports.BusinessLogoWrapper = void 0;
|
|
8
8
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
9
9
|
var _react = _interopRequireDefault(require("react"));
|
|
10
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22, _templateObject23, _templateObject24, _templateObject25;
|
|
10
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22, _templateObject23, _templateObject24, _templateObject25, _templateObject26;
|
|
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; }
|
|
14
14
|
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); }
|
|
15
15
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
16
|
-
var Container = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n cursor: pointer;\n margin: 10px;\n position: relative;\n background: white;\n border-radius: 16px;\n display: inline-block;\n text-align: left;\n transition: all 0.3s ease;\n\n > span {\n display: flex;\n }\n\n ", "\n\n &:hover {\n box-shadow: rgb(0 0 0 / 20%) 0px 8px 24px;\n }\n\n button.load-orders {\n padding: 10px 30px;\n }\n\n ", "\n\n ", "\n\n ", "\n\n @media (min-width: 480px) {\n min-width: 430px;\n max-height: ", ";\n width: 430px;\n }\n\n @media(min-width: 993px){\n ", "\n }\n"])), function (_ref) {
|
|
16
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n cursor: pointer;\n margin: 10px 0;\n position: relative;\n background: white;\n border-radius: 16px;\n display: inline-block;\n text-align: left;\n transition: all 0.3s ease;\n\n > span {\n display: flex;\n }\n\n ", "\n\n &:hover {\n box-shadow: rgb(0 0 0 / 20%) 0px 8px 24px;\n }\n\n button.load-orders {\n padding: 10px 30px;\n }\n\n ", "\n\n ", "\n\n ", "\n\n @media (min-width: 480px) {\n min-width: 430px;\n max-height: ", ";\n width: 430px;\n }\n\n @media (min-width: 768px) {\n margin: 10px;\n }\n\n @media(min-width: 993px){\n ", "\n }\n"])), function (_ref) {
|
|
17
17
|
var isCustomerMode = _ref.isCustomerMode;
|
|
18
|
-
return isCustomerMode ? (0, _styledComponents.css)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n min-width: 300px;\n width: 300px;\n display: inline-block;\n "]))) : (0, _styledComponents.css)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n min-width:
|
|
19
|
-
var
|
|
20
|
-
return
|
|
18
|
+
return isCustomerMode ? (0, _styledComponents.css)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n min-width: 300px;\n width: 300px;\n display: inline-block;\n "]))) : (0, _styledComponents.css)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n min-width: ", "px;\n width: ", "px;\n height: ", ";\n max-height: ", ";\n "])), function (_ref2) {
|
|
19
|
+
var w = _ref2.w;
|
|
20
|
+
return w !== null && w !== void 0 ? w : 380;
|
|
21
21
|
}, function (_ref3) {
|
|
22
|
-
var
|
|
22
|
+
var w = _ref3.w;
|
|
23
|
+
return w !== null && w !== void 0 ? w : 380;
|
|
24
|
+
}, function (_ref4) {
|
|
25
|
+
var isBusinessesPage = _ref4.isBusinessesPage;
|
|
26
|
+
return isBusinessesPage && '300px';
|
|
27
|
+
}, function (_ref5) {
|
|
28
|
+
var isBusinessesPage = _ref5.isBusinessesPage;
|
|
23
29
|
return isBusinessesPage ? '300px' : '220px';
|
|
24
30
|
});
|
|
25
31
|
}, function (props) {
|
|
@@ -29,40 +35,42 @@ var Container = _styledComponents.default.div(_templateObject || (_templateObjec
|
|
|
29
35
|
return (props.nobg || props.isBusinessesPage) && (0, _styledComponents.css)(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n background: transparent;\n "])));
|
|
30
36
|
}, function (props) {
|
|
31
37
|
return props.flex && (0, _styledComponents.css)(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n justify-content: center;\n "])));
|
|
32
|
-
}, function (
|
|
33
|
-
var isBusinessesPage =
|
|
38
|
+
}, function (_ref6) {
|
|
39
|
+
var isBusinessesPage = _ref6.isBusinessesPage;
|
|
34
40
|
return isBusinessesPage ? '300px' : '250px';
|
|
35
|
-
}, function (
|
|
36
|
-
var isBusinessesPage =
|
|
41
|
+
}, function (_ref7) {
|
|
42
|
+
var isBusinessesPage = _ref7.isBusinessesPage;
|
|
37
43
|
return isBusinessesPage && (0, _styledComponents.css)(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n margin: 30px 20px;\n width: calc(33% - 40px);\n "])));
|
|
38
44
|
});
|
|
39
45
|
exports.Container = Container;
|
|
40
|
-
var Content = _styledComponents.default.div(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n display: flex;\n position: relative;\n border-radius: 16px;\n padding:
|
|
41
|
-
var isCustomerMode =
|
|
46
|
+
var Content = _styledComponents.default.div(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n display: flex;\n position: relative;\n border-radius: 16px;\n padding: 0;\n ", "\n\n @media (min-width: 768px) {\n padding: 10px;\n }\n"])), function (_ref8) {
|
|
47
|
+
var isCustomerMode = _ref8.isCustomerMode;
|
|
42
48
|
return isCustomerMode ? (0, _styledComponents.css)(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n align-items: center;\n "]))) : (0, _styledComponents.css)(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n align-items: flex-start;\n flex: 1;\n "])));
|
|
43
49
|
});
|
|
44
50
|
exports.Content = Content;
|
|
45
|
-
var Price = _styledComponents.default.div(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n width: 35%;\n \n ", "\n\n h2 {\n font-size: 16px;\n margin-block-end: ", ";\n margin-block-start: 0.1em;\n font-weight: normal;\n }\n p {\n margin-block-end: 0.1em;\n margin-block-start: ", ";\n color: #ff9300;\n font-size: 0.8em;\n overflow:hidden;\n text-overflow: ellipsis;\n margin-left: 5px;\n }\n\n p[name='view-cart']{\n color: ", ";\n cursor: pointer;\n }\n\n @media (min-width: 480px) {\n ", "\n }\n"])), function (
|
|
46
|
-
var isCustomerMode =
|
|
51
|
+
var Price = _styledComponents.default.div(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n width: 35%;\n \n ", "\n\n h2 {\n font-size: 16px;\n margin-block-end: ", ";\n margin-block-start: 0.1em;\n font-weight: normal;\n }\n p {\n margin-block-end: 0.1em;\n margin-block-start: ", ";\n color: #ff9300;\n font-size: 0.8em;\n overflow:hidden;\n text-overflow: ellipsis;\n margin-left: 5px;\n }\n\n p[name='view-cart']{\n color: ", ";\n cursor: pointer;\n }\n\n @media (min-width: 480px) {\n ", "\n }\n"])), function (_ref9) {
|
|
52
|
+
var isCustomerMode = _ref9.isCustomerMode;
|
|
47
53
|
return isCustomerMode ? (0, _styledComponents.css)(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n text-align: end;\n white-space: nowrap;\n text-overflow: ellipsis;\n "]))) : (0, _styledComponents.css)(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: flex-end;\n flex-direction: column;\n align-items: flex-end;\n "])));
|
|
48
|
-
}, function (
|
|
49
|
-
var isBusinessesPage =
|
|
54
|
+
}, function (_ref10) {
|
|
55
|
+
var isBusinessesPage = _ref10.isBusinessesPage;
|
|
50
56
|
return isBusinessesPage ? '0.1em' : '1em';
|
|
51
|
-
}, function (
|
|
52
|
-
var isBusinessesPage =
|
|
57
|
+
}, function (_ref11) {
|
|
58
|
+
var isBusinessesPage = _ref11.isBusinessesPage;
|
|
53
59
|
return isBusinessesPage ? '0.1em' : '1em';
|
|
54
60
|
}, function (props) {
|
|
55
61
|
return props.theme.colors.primary;
|
|
56
|
-
}, function (
|
|
57
|
-
var isCustomerMode =
|
|
62
|
+
}, function (_ref12) {
|
|
63
|
+
var isCustomerMode = _ref12.isCustomerMode;
|
|
58
64
|
return !isCustomerMode && (0, _styledComponents.css)(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n flex-direction: row;\n align-items: center;\n "])));
|
|
59
65
|
});
|
|
60
66
|
exports.Price = Price;
|
|
61
|
-
var BusinessLogoWrapperStyled = _styledComponents.default.div(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n display: flex;\n width: 55px;\n min-width: 55px;\n height: 55px;\n min-height: 55px;\n box-sizing: border-box;\n position: relative;\n background-repeat: no-repeat, repeat;\n background-size: cover;\n object-fit: cover;\n background-position: center;\n justify-content: center;\n align-items: center;\n border-radius: 7.6px;\n box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.1);\n\n margin-
|
|
62
|
-
return props.theme.rtl && (0, _styledComponents.css)(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n margin-left:
|
|
63
|
-
}, function (
|
|
64
|
-
|
|
65
|
-
|
|
67
|
+
var BusinessLogoWrapperStyled = _styledComponents.default.div(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n display: flex;\n width: 55px;\n min-width: 55px;\n height: 55px;\n min-height: 55px;\n box-sizing: border-box;\n position: relative;\n background-repeat: no-repeat, repeat;\n background-size: cover;\n object-fit: cover;\n background-position: center;\n justify-content: center;\n align-items: center;\n border-radius: 7.6px;\n box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.1);\n\n margin-right: 8px;\n margin-left: 0px;\n\n ", "\n\n @media (min-width: 768px) {\n margin-right: 0px;\n margin-left: 8px;\n\n ", "\n }\n\n @media (min-width: 576px) {\n width: 86px;\n min-width: 86px;\n height: 86px;\n min-height: 86px;\n ", "\n }\n"])), function (props) {
|
|
68
|
+
return props.theme.rtl && (0, _styledComponents.css)(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n margin-left: 8px;\n margin-right: 0px;\n "])));
|
|
69
|
+
}, function (props) {
|
|
70
|
+
return props.theme.rtl && (0, _styledComponents.css)(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n margin-left: 0px;\n margin-right: 8px;\n "])));
|
|
71
|
+
}, function (_ref13) {
|
|
72
|
+
var isMulti = _ref13.isMulti;
|
|
73
|
+
return isMulti && (0, _styledComponents.css)(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["\n width: 55px;\n min-width: 55px;\n height: 55px;\n min-height: 55px;\n "])));
|
|
66
74
|
});
|
|
67
75
|
var BusinessLogoWrapper = function BusinessLogoWrapper(props) {
|
|
68
76
|
var style = {};
|
|
@@ -76,7 +84,7 @@ var BusinessLogoWrapper = function BusinessLogoWrapper(props) {
|
|
|
76
84
|
}), props.children);
|
|
77
85
|
};
|
|
78
86
|
exports.BusinessLogoWrapper = BusinessLogoWrapper;
|
|
79
|
-
var ButtonWrapper = _styledComponents.default.div(
|
|
87
|
+
var ButtonWrapper = _styledComponents.default.div(_templateObject19 || (_templateObject19 = _taggedTemplateLiteral(["\n position: absolute;\n right: 0px;\n top: 4px;\n display: flex;\n align-items: center;\n\n button {\n border-radius: 50px;\n font-size: 10px;\n line-height: 15px;\n padding: 4px 8px;\n border: 1px solid ", ";\n margin: 5px;\n\n &.reorder {\n background: ", ";\n &:hover {\n background: ", ";\n }\n }\n }\n"])), function (props) {
|
|
80
88
|
return props.theme.colors.primaryContrast;
|
|
81
89
|
}, function (props) {
|
|
82
90
|
return props.theme.colors.primaryContrast;
|
|
@@ -84,34 +92,34 @@ var ButtonWrapper = _styledComponents.default.div(_templateObject18 || (_templat
|
|
|
84
92
|
return props.theme.colors.primary;
|
|
85
93
|
});
|
|
86
94
|
exports.ButtonWrapper = ButtonWrapper;
|
|
87
|
-
var Logo = _styledComponents.default.div(
|
|
95
|
+
var Logo = _styledComponents.default.div(_templateObject20 || (_templateObject20 = _taggedTemplateLiteral(["\n width: 55px;\n height: 55px;\n filter: drop-shadow(0px 1px 4px rgba(0, 0, 0, 0.1));\n border-radius: 7.6px;\n\n img {\n width: 100%;\n height: 100%;\n border-radius: 7.6px;\n }\n\n @media (min-width: 480px){\n width: 86px;\n height: 86px;\n }\n"])));
|
|
88
96
|
exports.Logo = Logo;
|
|
89
|
-
var TitleContainer = _styledComponents.default.div(
|
|
97
|
+
var TitleContainer = _styledComponents.default.div(_templateObject21 || (_templateObject21 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: space-between;\n"])));
|
|
90
98
|
exports.TitleContainer = TitleContainer;
|
|
91
|
-
var Map = _styledComponents.default.div(
|
|
92
|
-
var isBusinessesPage = _ref12.isBusinessesPage;
|
|
93
|
-
return isBusinessesPage ? '200px' : '88px';
|
|
94
|
-
}, function (_ref13) {
|
|
95
|
-
var isBusinessesPage = _ref13.isBusinessesPage;
|
|
96
|
-
return isBusinessesPage && '175px';
|
|
97
|
-
}, function (_ref14) {
|
|
99
|
+
var Map = _styledComponents.default.div(_templateObject22 || (_templateObject22 = _taggedTemplateLiteral(["\n width: 100%;\n height: ", ";\n min-height: ", ";\n img{\n width: 100%;\n height: 100%;\n border-top-left-radius: 16px;\n border-top-right-radius: 16px;\n border-radius: ", ";\n image-rendering: -webkit-optimize-contrast;\n object-fit: cover;\n }\n @media(min-width: 480px){\n height: ", ";\n min-height: ", "\n }\n"])), function (_ref14) {
|
|
98
100
|
var isBusinessesPage = _ref14.isBusinessesPage;
|
|
99
|
-
return isBusinessesPage
|
|
101
|
+
return isBusinessesPage ? '200px' : '88px';
|
|
100
102
|
}, function (_ref15) {
|
|
101
103
|
var isBusinessesPage = _ref15.isBusinessesPage;
|
|
102
|
-
return isBusinessesPage
|
|
104
|
+
return isBusinessesPage && '175px';
|
|
103
105
|
}, function (_ref16) {
|
|
104
106
|
var isBusinessesPage = _ref16.isBusinessesPage;
|
|
107
|
+
return isBusinessesPage && '16px';
|
|
108
|
+
}, function (_ref17) {
|
|
109
|
+
var isBusinessesPage = _ref17.isBusinessesPage;
|
|
110
|
+
return isBusinessesPage ? '200px' : '100px';
|
|
111
|
+
}, function (_ref18) {
|
|
112
|
+
var isBusinessesPage = _ref18.isBusinessesPage;
|
|
105
113
|
return isBusinessesPage && '200px';
|
|
106
114
|
});
|
|
107
115
|
exports.Map = Map;
|
|
108
|
-
var FavoriteWrapper = _styledComponents.default.div(
|
|
109
|
-
return props.theme.rtl && (0, _styledComponents.css)(
|
|
116
|
+
var FavoriteWrapper = _styledComponents.default.div(_templateObject23 || (_templateObject23 = _taggedTemplateLiteral(["\n position: absolute;\n cursor: pointer;\n display: flex;\n z-index: 10;\n align-items: center;\n justify-content: center;\n top: 41px;\n right: 10px;\n ", "\n svg {\n color: ", ";\n font-size: 16px;\n }\n"])), function (props) {
|
|
117
|
+
return props.theme.rtl && (0, _styledComponents.css)(_templateObject24 || (_templateObject24 = _taggedTemplateLiteral(["\n left: 10px;\n right: initial;\n "])));
|
|
110
118
|
}, function (props) {
|
|
111
119
|
return props.theme.colors.danger500;
|
|
112
120
|
});
|
|
113
121
|
exports.FavoriteWrapper = FavoriteWrapper;
|
|
114
|
-
var ReviewWrapper = _styledComponents.default.div(
|
|
122
|
+
var ReviewWrapper = _styledComponents.default.div(_templateObject25 || (_templateObject25 = _taggedTemplateLiteral(["\n .review-sent {\n border-radius: 7.6px;\n }\n"])));
|
|
115
123
|
exports.ReviewWrapper = ReviewWrapper;
|
|
116
|
-
var MultiLogosContainer = _styledComponents.default.div(
|
|
124
|
+
var MultiLogosContainer = _styledComponents.default.div(_templateObject26 || (_templateObject26 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n p {\n white-space: nowrap;\n }\n"])));
|
|
117
125
|
exports.MultiLogosContainer = MultiLogosContainer;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ordering-ui-external",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.3",
|
|
4
4
|
"description": "Ordering UI Components",
|
|
5
5
|
"main": "./_modules/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -73,6 +73,7 @@
|
|
|
73
73
|
},
|
|
74
74
|
"dependencies": {
|
|
75
75
|
"@babel/runtime": "^7.10.4",
|
|
76
|
+
"@loadable/component": "^5.15.2",
|
|
76
77
|
"@meronex/icons": "^4.0.0",
|
|
77
78
|
"@popperjs/core": "^2.5.3",
|
|
78
79
|
"@sentry/react": "^5.25.0",
|
|
@@ -43,19 +43,19 @@ const SingleOrderCardUI = (props) => {
|
|
|
43
43
|
<>
|
|
44
44
|
{order?.business?.length > 1 ? (
|
|
45
45
|
<MultiLogosContainer>
|
|
46
|
-
{order?.business?.map((business, i) => (
|
|
47
|
-
<
|
|
48
|
-
{
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
<PastLogo isMulti>
|
|
54
|
-
<img src={business?.logo || theme.images?.dummies?.businessLogo} alt='business-logo' width='55px' height='64px' loading='lazy' />
|
|
55
|
-
</PastLogo>
|
|
56
|
-
)}
|
|
57
|
-
</React.Fragment>
|
|
46
|
+
{order?.business?.map((business, i) => i < 2 && (
|
|
47
|
+
<PastLogo
|
|
48
|
+
key={business?.id}
|
|
49
|
+
isMulti
|
|
50
|
+
>
|
|
51
|
+
<img src={business?.logo || theme.images?.dummies?.businessLogo} alt='business-logo' width='55px' height='64px' loading='lazy' />
|
|
52
|
+
</PastLogo>
|
|
58
53
|
))}
|
|
54
|
+
{order?.business?.length > 1 && (order?.business?.length - 2) > 0 && (
|
|
55
|
+
<p>
|
|
56
|
+
+ {order?.business?.length - 2}
|
|
57
|
+
</p>
|
|
58
|
+
)}
|
|
59
59
|
</MultiLogosContainer>
|
|
60
60
|
) : (
|
|
61
61
|
<PastLogo>
|
package/src/themes/five/index.js
CHANGED
|
@@ -108,6 +108,7 @@ import { SearchProducts } from './src/components/SearchProducts'
|
|
|
108
108
|
import { MultiCartsPaymethodsAndWallets } from './src/components/MultiCartsPaymethodsAndWallets'
|
|
109
109
|
import { ProfessionalProfile } from './src/components/ProfessionalProfile'
|
|
110
110
|
import { OrderHistory } from './src/components/OrderDetails/OrderHistory'
|
|
111
|
+
import { OrderContextUI } from './src/components/OrderContextUI'
|
|
111
112
|
import { OrderBillSection } from './src/components/OrderDetails/OrderBillSection'
|
|
112
113
|
import { OrderPreferencesSection } from './src/components/OrderDetails/OrderPreferencesSections'
|
|
113
114
|
import { ActionsSection } from './src/components/OrderDetails/ActionsSection'
|
|
@@ -177,6 +178,7 @@ export {
|
|
|
177
178
|
Modal,
|
|
178
179
|
NotFoundSource,
|
|
179
180
|
NotNetworkConnectivity,
|
|
181
|
+
OrderContextUI,
|
|
180
182
|
OrderDetails,
|
|
181
183
|
OrderItAgain,
|
|
182
184
|
OrderDetailsKiosk,
|
|
@@ -64,7 +64,8 @@ const AddressListUI = (props) => {
|
|
|
64
64
|
isCustomerMode,
|
|
65
65
|
isFromCheckout,
|
|
66
66
|
setIsAddressFormOpen,
|
|
67
|
-
isProfile
|
|
67
|
+
isProfile,
|
|
68
|
+
isMobile
|
|
68
69
|
} = props
|
|
69
70
|
|
|
70
71
|
const [, t] = useLanguage()
|
|
@@ -235,7 +236,7 @@ const AddressListUI = (props) => {
|
|
|
235
236
|
color={isEnableContinueButton && addressList?.addresses?.length > 0 ? 'secondary' : 'primary'}
|
|
236
237
|
onClick={() => openAddress({})}
|
|
237
238
|
disabled={orderState?.loading || actionStatus.loading}
|
|
238
|
-
style={isCompletedLayout ? { flex: 1, width: 'fit-content' } : {}}
|
|
239
|
+
style={(isCompletedLayout && !isMobile) ? { flex: 1, width: 'fit-content' } : {}}
|
|
239
240
|
>
|
|
240
241
|
{(orderState?.loading || actionStatus.loading) ? t('LOADING', 'Loading') : t('ADD_NEW_ADDRESS', 'Add New Address')}
|
|
241
242
|
</Button>
|
|
@@ -55,6 +55,7 @@ export const BusinessItemAccordion = (props) => {
|
|
|
55
55
|
const [setRotate, setRotateState] = useState('accordion__icon')
|
|
56
56
|
const [cartProductUpdated, setCartProductUpdated] = useState(null)
|
|
57
57
|
const isBusinessChangeEnabled = configs?.cart_change_business_validation?.value === '1'
|
|
58
|
+
const checkoutMultiBusinessEnabled = configs?.checkout_multi_business_enabled?.value === '1'
|
|
58
59
|
|
|
59
60
|
const content = useRef(null)
|
|
60
61
|
const businessStore = useRef(null)
|
|
@@ -242,7 +243,7 @@ export const BusinessItemAccordion = (props) => {
|
|
|
242
243
|
)}
|
|
243
244
|
{props.children}
|
|
244
245
|
</AccordionContent>
|
|
245
|
-
{!setActive && !isClosed && !!isProducts && !checkoutButtonDisabled && !isMultiCheckout && (
|
|
246
|
+
{!setActive && !isClosed && !!isProducts && !checkoutButtonDisabled && !isMultiCheckout && !checkoutMultiBusinessEnabled && (
|
|
246
247
|
<PriceContainer>
|
|
247
248
|
<h4>{parsePrice(total)}</h4>
|
|
248
249
|
<Button onClick={handleClickCheckout} color='primary'>{t('CHECKOUT', 'Checkout')}</Button>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useEffect, useState } from 'react'
|
|
2
2
|
import Skeleton from 'react-loading-skeleton'
|
|
3
|
-
import { BusinessProductsCategories as ProductsCategories } from 'ordering-components-external'
|
|
3
|
+
import { BusinessProductsCategories as ProductsCategories, useOrderingTheme } from 'ordering-components-external'
|
|
4
4
|
import { AutoScroll } from '../../../../../components/AutoScroll'
|
|
5
5
|
import { useTheme } from 'styled-components'
|
|
6
6
|
|
|
@@ -21,9 +21,12 @@ const BusinessProductsCategoriesUI = (props) => {
|
|
|
21
21
|
} = props
|
|
22
22
|
|
|
23
23
|
const theme = useTheme()
|
|
24
|
+
const [orderingTheme] = useOrderingTheme()
|
|
24
25
|
const [selectedCategory, setSelectedCateogry] = useState({ id: null })
|
|
25
26
|
const scrollTopSpan = 60
|
|
26
27
|
|
|
28
|
+
const isChew = orderingTheme?.theme?.header?.components?.layout?.type?.toLowerCase() === 'chew'
|
|
29
|
+
|
|
27
30
|
const handleChangeCategory = (category) => {
|
|
28
31
|
const isBlockScroll = window.location.search.includes('category') &&
|
|
29
32
|
window.location.search.includes('product')
|
|
@@ -118,12 +121,14 @@ const BusinessProductsCategoriesUI = (props) => {
|
|
|
118
121
|
if (typeof useKioskApp === 'undefined') return
|
|
119
122
|
const styleSheet = document.getElementById('styles').sheet
|
|
120
123
|
|
|
124
|
+
const disabledCustomWidth = isChew
|
|
125
|
+
|
|
121
126
|
let style0 = '.sticky-prod-cat {'
|
|
122
127
|
style0 += 'position: fixed !important;'
|
|
123
128
|
style0 += 'top: 0px !important;'
|
|
124
129
|
style0 += 'left: 0px !important;'
|
|
125
130
|
style0 += 'padding: 5px 5px 0px 5px !important;'
|
|
126
|
-
style0 += `width: calc(100% - ${useKioskApp ? '50px' : '155px'}) !important;`
|
|
131
|
+
!disabledCustomWidth && (style0 += `width: calc(100% - ${useKioskApp ? '50px' : '155px'}) !important;`)
|
|
127
132
|
style0 += '}'
|
|
128
133
|
|
|
129
134
|
let style1 = '.sticky-search {'
|
|
@@ -140,7 +145,7 @@ const BusinessProductsCategoriesUI = (props) => {
|
|
|
140
145
|
|
|
141
146
|
window.addEventListener('scroll', handleScroll)
|
|
142
147
|
return () => window.removeEventListener('scroll', handleScroll)
|
|
143
|
-
}, [useKioskApp])
|
|
148
|
+
}, [useKioskApp, isChew])
|
|
144
149
|
|
|
145
150
|
useEffect(() => {
|
|
146
151
|
if (business?.professionals?.length > 0 && !useKioskApp) {
|