ordering-ui-external 4.0.7 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_bundles/{0.ordering-ui.b594c1b9cf54956bec90.js → 0.ordering-ui.dc2501dcf51ed5b7b821.js} +1 -1
- package/_bundles/{1.ordering-ui.b594c1b9cf54956bec90.js → 1.ordering-ui.dc2501dcf51ed5b7b821.js} +1 -1
- package/_bundles/{2.ordering-ui.b594c1b9cf54956bec90.js → 2.ordering-ui.dc2501dcf51ed5b7b821.js} +1 -1
- package/_bundles/{4.ordering-ui.b594c1b9cf54956bec90.js → 4.ordering-ui.dc2501dcf51ed5b7b821.js} +1 -1
- package/_bundles/{5.ordering-ui.b594c1b9cf54956bec90.js → 5.ordering-ui.dc2501dcf51ed5b7b821.js} +1 -1
- package/_bundles/{6.ordering-ui.b594c1b9cf54956bec90.js → 6.ordering-ui.dc2501dcf51ed5b7b821.js} +1 -1
- package/_bundles/{7.ordering-ui.b594c1b9cf54956bec90.js → 7.ordering-ui.dc2501dcf51ed5b7b821.js} +2 -2
- package/_bundles/{8.ordering-ui.b594c1b9cf54956bec90.js → 8.ordering-ui.dc2501dcf51ed5b7b821.js} +1 -1
- package/_bundles/{9.ordering-ui.b594c1b9cf54956bec90.js → 9.ordering-ui.dc2501dcf51ed5b7b821.js} +1 -1
- package/_bundles/{ordering-ui.b594c1b9cf54956bec90.js → ordering-ui.dc2501dcf51ed5b7b821.js} +2 -2
- package/_modules/components/BusinessBasicInformation/index.js +4 -4
- package/_modules/components/BusinessBasicInformation/styles.js +4 -1
- package/_modules/components/UserProfileForm/styles.js +1 -1
- package/_modules/themes/callcenterOriginal/src/components/AddressList/index.js +4 -5
- package/_modules/themes/callcenterOriginal/src/components/AddressList/styles.js +2 -6
- package/_modules/themes/callcenterOriginal/src/components/Checkout/index.js +1 -1
- package/_modules/themes/callcenterOriginal/src/components/Header/index.js +23 -43
- package/_modules/themes/callcenterOriginal/src/components/Header/styles.js +14 -12
- package/_modules/themes/callcenterOriginal/src/components/SidebarMenu/index.js +16 -1
- package/_modules/themes/callcenterOriginal/src/components/SidebarMenu/styles.js +11 -3
- package/_modules/themes/callcenterOriginal/src/components/UserDetails/index.js +1 -1
- package/_modules/themes/callcenterOriginal/src/components/UserDetails/styles.js +2 -2
- package/_modules/themes/five/src/components/BusinessInformation/index.js +1 -1
- package/_modules/themes/five/src/components/BusinessInformation/styles.js +9 -5
- package/_modules/themes/five/src/components/BusinessItemAccordion/styles.js +1 -1
- package/_modules/themes/five/src/components/BusinessProductsCategories/index.js +2 -3
- package/_modules/themes/five/src/components/BusinessProductsList/layouts/groceries/index.js +8 -4
- package/_modules/themes/five/src/components/BusinessProductsListing/index.js +18 -14
- package/_modules/themes/five/src/components/Checkout/index.js +6 -6
- package/_modules/themes/five/src/components/HorizontalOrdersLayout/index.js +5 -2
- package/_modules/themes/five/src/components/HorizontalOrdersLayout/styles.js +44 -39
- package/_modules/themes/five/src/components/OrderContextUI/index.js +61 -7
- package/_modules/themes/five/src/components/OrderContextUI/styles.js +1 -1
- package/_modules/themes/five/src/components/PageBanner/index.js +3 -3
- package/_modules/themes/five/src/components/PhoneAutocomplete/styles.js +1 -1
- package/_modules/themes/five/src/components/ProductForm/index.js +20 -18
- package/_modules/themes/five/src/components/ProductShare/index.js +1 -1
- package/_modules/themes/five/src/components/ProductShare/styles.js +2 -2
- package/_modules/themes/five/src/components/RenderProductsLayout/index.js +5 -3
- package/_modules/themes/five/src/components/ResetPassword/index.js +6 -7
- package/_modules/themes/five/src/components/ScheduleAccordion/styles.js +1 -1
- package/_modules/themes/five/src/components/SingleOrderCard/index.js +4 -2
- package/_modules/themes/five/src/components/SingleOrderCard/styles.js +18 -15
- package/_modules/themes/five/src/components/SingleProductCard/layouts/original/index.js +3 -2
- package/_modules/themes/five/src/components/TaxInformation/styles.js +1 -1
- package/package.json +2 -2
- package/src/components/BusinessBasicInformation/index.js +7 -10
- package/src/components/BusinessBasicInformation/styles.js +13 -0
- package/src/components/UserProfileForm/styles.js +0 -1
- package/src/themes/callcenterOriginal/src/components/AddressList/index.js +2 -2
- package/src/themes/callcenterOriginal/src/components/AddressList/styles.js +6 -5
- package/src/themes/callcenterOriginal/src/components/Checkout/index.js +1 -1
- package/src/themes/callcenterOriginal/src/components/Header/index.js +2 -40
- package/src/themes/callcenterOriginal/src/components/Header/styles.js +6 -3
- package/src/themes/callcenterOriginal/src/components/SidebarMenu/index.js +19 -1
- package/src/themes/callcenterOriginal/src/components/SidebarMenu/styles.js +27 -0
- package/src/themes/callcenterOriginal/src/components/UserDetails/index.js +1 -1
- package/src/themes/callcenterOriginal/src/components/UserDetails/styles.js +5 -1
- package/src/themes/five/src/components/BusinessInformation/index.js +2 -0
- package/src/themes/five/src/components/BusinessInformation/styles.js +10 -1
- package/src/themes/five/src/components/BusinessItemAccordion/styles.js +3 -0
- package/src/themes/five/src/components/BusinessProductsCategories/index.js +1 -2
- package/src/themes/five/src/components/BusinessProductsList/layouts/groceries/index.js +5 -1
- package/src/themes/five/src/components/BusinessProductsListing/index.js +5 -1
- package/src/themes/five/src/components/Checkout/index.js +2 -1
- package/src/themes/five/src/components/HorizontalOrdersLayout/index.js +16 -10
- package/src/themes/five/src/components/HorizontalOrdersLayout/styles.js +16 -1
- package/src/themes/five/src/components/OrderContextUI/index.js +47 -3
- package/src/themes/five/src/components/OrderContextUI/styles.js +3 -0
- package/src/themes/five/src/components/PageBanner/index.js +3 -3
- package/src/themes/five/src/components/PhoneAutocomplete/styles.js +4 -0
- package/src/themes/five/src/components/ProductForm/index.js +28 -24
- package/src/themes/five/src/components/ProductShare/index.js +1 -1
- package/src/themes/five/src/components/ProductShare/styles.js +1 -3
- package/src/themes/five/src/components/RenderProductsLayout/index.js +8 -4
- package/src/themes/five/src/components/ResetPassword/index.js +1 -1
- package/src/themes/five/src/components/ScheduleAccordion/styles.js +4 -0
- package/src/themes/five/src/components/SidebarMenu/index.js +3 -2
- package/src/themes/five/src/components/SingleOrderCard/index.js +4 -4
- package/src/themes/five/src/components/SingleOrderCard/styles.js +1 -1
- package/src/themes/five/src/components/SingleProductCard/layouts/original/index.js +3 -2
- package/src/themes/five/src/components/TaxInformation/styles.js +3 -0
- package/template/pages/BusinessProductsList/index.js +1 -0
- /package/_bundles/{7.ordering-ui.b594c1b9cf54956bec90.js.LICENSE.txt → 7.ordering-ui.dc2501dcf51ed5b7b821.js.LICENSE.txt} +0 -0
- /package/_bundles/{ordering-ui.b594c1b9cf54956bec90.js.LICENSE.txt → ordering-ui.dc2501dcf51ed5b7b821.js.LICENSE.txt} +0 -0
|
@@ -10,7 +10,6 @@ var _FiClock = _interopRequireDefault(require("@meronex/icons/fi/FiClock"));
|
|
|
10
10
|
var _GrLocation = _interopRequireDefault(require("@meronex/icons/gr/GrLocation"));
|
|
11
11
|
var _GrDeliver = _interopRequireDefault(require("@meronex/icons/gr/GrDeliver"));
|
|
12
12
|
var _FaStar = _interopRequireDefault(require("@meronex/icons/fa/FaStar"));
|
|
13
|
-
var _BsExclamationCircle = _interopRequireDefault(require("@meronex/icons/bs/BsExclamationCircle"));
|
|
14
13
|
var _styledComponents = require("styled-components");
|
|
15
14
|
var _Modal = require("../Modal");
|
|
16
15
|
var _BusinessInformation = require("../BusinessInformation");
|
|
@@ -103,12 +102,13 @@ var BusinessBasicInformation = function BusinessBasicInformation(props) {
|
|
|
103
102
|
width: 70
|
|
104
103
|
})), (orderState === null || orderState === void 0 ? void 0 : orderState.options.type) === 1 && showDeliveryFee && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, !loading ? /*#__PURE__*/_react.default.createElement("h5", null, /*#__PURE__*/_react.default.createElement(_GrDeliver.default, null), business && parsePrice((business === null || business === void 0 ? void 0 : business.delivery_price) || 0)) : /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
|
|
105
104
|
width: 70
|
|
106
|
-
})), !loading && /*#__PURE__*/_react.default.createElement("
|
|
107
|
-
className: "
|
|
105
|
+
}))), !loading && /*#__PURE__*/_react.default.createElement("div", {
|
|
106
|
+
className: "information"
|
|
107
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
108
108
|
onClick: function onClick() {
|
|
109
109
|
return setOpenBusinessInformation(true);
|
|
110
110
|
}
|
|
111
|
-
})))))), /*#__PURE__*/_react.default.createElement(_Modal.Modal, {
|
|
111
|
+
}, t('INFORMATION', 'Information')))))), /*#__PURE__*/_react.default.createElement(_Modal.Modal, {
|
|
112
112
|
width: "70%",
|
|
113
113
|
open: openBusinessInformation,
|
|
114
114
|
onClose: setOpenBusinessInformation,
|
|
@@ -38,7 +38,7 @@ var BusinessLogo = function BusinessLogo(props) {
|
|
|
38
38
|
exports.BusinessLogo = BusinessLogo;
|
|
39
39
|
var BusinessInfo = _styledComponents.default.div(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n display: flex;\n width: calc(100% - 75px);\n"])));
|
|
40
40
|
exports.BusinessInfo = BusinessInfo;
|
|
41
|
-
var BusinessInfoItem = _styledComponents.default.div(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n width: 100%;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n padding: 0px 5px 0px 16px;\n ", "\n div {\n font-size: 14px;\n display: flex;\n justify-content: space-between;\n\n h5 {\n font-weight: 300;\n svg{\n margin-bottom: 1px;\n }\n }\n\n h5,\n p {\n align-items: center;\n margin: 0px;\n overflow: hidden;\n /* white-space: nowrap; */\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-line-clamp: 1; /* number of lines to show */\n -webkit-box-orient: vertical;\n\n svg {\n margin-right: 4px;\n\n ", "\n\n &.start {\n color: #FFC917;\n }\n\n &.popup {\n color: ", ";\n cursor: pointer;\n transform: rotate(180deg);\n }\n }\n\n &.bold {\n font-weight: 600;\n }\n\n &.type {\n font-weight: 300;\n }\n }\n\n @media (min-width: 481px) {\n font-size: 16px;\n }\n }\n"])), function (props) {
|
|
41
|
+
var BusinessInfoItem = _styledComponents.default.div(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n width: 100%;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n padding: 0px 5px 0px 16px;\n ", "\n div {\n font-size: 14px;\n display: flex;\n justify-content: space-between;\n\n\n h5 {\n font-weight: 300;\n svg{\n margin-bottom: 1px;\n }\n }\n\n h5,\n p {\n align-items: center;\n margin: 0px;\n overflow: hidden;\n /* white-space: nowrap; */\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-line-clamp: 1; /* number of lines to show */\n -webkit-box-orient: vertical;\n\n svg {\n margin-right: 4px;\n\n ", "\n\n &.start {\n color: #FFC917;\n }\n\n &.popup {\n color: ", ";\n cursor: pointer;\n transform: rotate(180deg);\n }\n }\n\n &.bold {\n font-weight: 600;\n }\n\n &.type {\n font-weight: 300;\n }\n }\n\n &.information {\n span {\n user-select: none;\n cursor: pointer;\n font-size: 14px;\n color: ", ";\n &:hover {\n text-decoration: underline;\n }\n }\n }\n\n @media (min-width: 481px) {\n font-size: 16px;\n }\n }\n"])), function (props) {
|
|
42
42
|
var _props$theme;
|
|
43
43
|
return ((_props$theme = props.theme) === null || _props$theme === void 0 ? void 0 : _props$theme.rtl) && (0, _styledComponents.css)(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n padding: 0px 16px 0px 5px;\n "])));
|
|
44
44
|
}, function (props) {
|
|
@@ -46,5 +46,8 @@ var BusinessInfoItem = _styledComponents.default.div(_templateObject9 || (_templ
|
|
|
46
46
|
return ((_props$theme2 = props.theme) === null || _props$theme2 === void 0 ? void 0 : _props$theme2.rtl) && (0, _styledComponents.css)(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n margin-left: 4px;\n margin-right: 0px;\n "])));
|
|
47
47
|
}, function (props) {
|
|
48
48
|
return props.theme.colors.primary;
|
|
49
|
+
}, function (props) {
|
|
50
|
+
var _props$theme3;
|
|
51
|
+
return (_props$theme3 = props.theme) === null || _props$theme3 === void 0 ? void 0 : _props$theme3.colors.primary;
|
|
49
52
|
});
|
|
50
53
|
exports.BusinessInfoItem = BusinessInfoItem;
|
|
@@ -16,7 +16,7 @@ var UserProfileContainer = _styledComponents.default.div(_templateObject2 || (_t
|
|
|
16
16
|
return props.mbottom ? "".concat(props.mbottom, "px") : 'auto';
|
|
17
17
|
});
|
|
18
18
|
exports.UserProfileContainer = UserProfileContainer;
|
|
19
|
-
var UserImage = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n align-items: center;\n width: 100%;\n\n @media (min-width: 768px){\n width: auto;\n
|
|
19
|
+
var UserImage = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n align-items: center;\n width: 100%;\n\n @media (min-width: 768px){\n width: auto;\n }\n"])));
|
|
20
20
|
exports.UserImage = UserImage;
|
|
21
21
|
var Image = _styledComponents.default.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n width: 170px;\n height: 170px;\n border: 2px solid ", ";\n border-radius: 100%;\n overflow: hidden;\n padding: 20px;\n background: ", ";\n cursor: -webkit-grab;\n cursor: grab;\n\n img,\n div {\n width: 100%;\n border-radius: 50%;\n height: 100%;\n border: none;\n overflow: hidden;\n };\n\n img{\n object-fit: cover;\n }\n\n @media (min-width: 480px){\n width: 200px;\n height: 200px;\n }\n\n @media (min-width: 768px){\n width: 170px;\n height: 170px;\n }\n"])), function (props) {
|
|
22
22
|
return props.theme.colors.primary;
|
|
@@ -196,7 +196,9 @@ var AddressListUI = function AddressListUI(props) {
|
|
|
196
196
|
id: "address_control",
|
|
197
197
|
isLoading: (actionStatus === null || actionStatus === void 0 ? void 0 : actionStatus.loading) || (orderState === null || orderState === void 0 ? void 0 : orderState.loading)
|
|
198
198
|
}, /*#__PURE__*/_react.default.createElement(_styles.AddressHalfContainer, null, /*#__PURE__*/_react.default.createElement(_styles.List, {
|
|
199
|
-
halfWidth: addressOpen
|
|
199
|
+
halfWidth: addressOpen,
|
|
200
|
+
isOpenUserData: isOpenUserData,
|
|
201
|
+
isHeader: isHeader
|
|
200
202
|
}, (!isPopover || !addressOpen) && /*#__PURE__*/_react.default.createElement(_Buttons.Button, {
|
|
201
203
|
className: "add",
|
|
202
204
|
outline: true,
|
|
@@ -265,10 +267,7 @@ var AddressListUI = function AddressListUI(props) {
|
|
|
265
267
|
content: ((_addressList$error$ = addressList.error[0]) === null || _addressList$error$ === void 0 ? void 0 : _addressList$error$.message) || addressList.error[0]
|
|
266
268
|
}), !(addressList.loading || actionStatus.loading || orderState.loading) && _typeof((_orderState$options7 = orderState.options) === null || _orderState$options7 === void 0 ? void 0 : _orderState$options7.address) !== 'object' && !addressList.error && /*#__PURE__*/_react.default.createElement(_NotFoundSource.NotFoundSource, {
|
|
267
269
|
content: t('NETWORK_ERROR', 'Network error, please reload the page')
|
|
268
|
-
})), !isPopover && addressOpen && /*#__PURE__*/_react.default.createElement(_styles.AddressFormContainer, {
|
|
269
|
-
isOpenUserData: isOpenUserData,
|
|
270
|
-
isHeader: isHeader
|
|
271
|
-
}, /*#__PURE__*/_react.default.createElement(_styles.TitleFormContainer, null, /*#__PURE__*/_react.default.createElement(_styles.CloseIcon, null, /*#__PURE__*/_react.default.createElement(_MdClose.default, {
|
|
270
|
+
})), !isPopover && addressOpen && /*#__PURE__*/_react.default.createElement(_styles.AddressFormContainer, null, /*#__PURE__*/_react.default.createElement(_styles.TitleFormContainer, null, /*#__PURE__*/_react.default.createElement(_styles.CloseIcon, null, /*#__PURE__*/_react.default.createElement(_MdClose.default, {
|
|
272
271
|
onClick: function onClick() {
|
|
273
272
|
return handleCloseAddressForm();
|
|
274
273
|
}
|
|
@@ -54,16 +54,12 @@ var AddressTitle = _styledComponents.default.span(_templateObject13 || (_templat
|
|
|
54
54
|
exports.AddressTitle = AddressTitle;
|
|
55
55
|
var AddressHalfContainer = _styledComponents.default.div(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n display: flex;\n width: 100%;\n"])));
|
|
56
56
|
exports.AddressHalfContainer = AddressHalfContainer;
|
|
57
|
-
var List = _styledComponents.default.div(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n width: ", ";\n padding-right: 10px;\n button {
|
|
57
|
+
var List = _styledComponents.default.div(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n width: ", ";\n padding-right: 10px;\n position: sticky;\n right: 0;\n top: 0;\n margin-top: 222px;\n button {\n width: 100%;\n }\n"])), function (_ref2) {
|
|
58
58
|
var halfWidth = _ref2.halfWidth;
|
|
59
59
|
return halfWidth ? '50%' : '100%';
|
|
60
60
|
});
|
|
61
61
|
exports.List = List;
|
|
62
|
-
var AddressFormContainer = _styledComponents.default.div(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n width: 50%;\n
|
|
63
|
-
var isOpenUserData = _ref3.isOpenUserData,
|
|
64
|
-
isHeader = _ref3.isHeader;
|
|
65
|
-
return isOpenUserData ? '-30px' : isHeader ? '-222px' : '-190px';
|
|
66
|
-
});
|
|
62
|
+
var AddressFormContainer = _styledComponents.default.div(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n width: 50%;\n z-index: 10;\n height: 100%;\n padding-left: 10px;\n"])));
|
|
67
63
|
exports.AddressFormContainer = AddressFormContainer;
|
|
68
64
|
var CloseIcon = _styledComponents.default.div(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["\n cursor: pointer;\n svg{\n width: 30px;\n height: 30px;\n }\n"])));
|
|
69
65
|
exports.CloseIcon = CloseIcon;
|
|
@@ -178,7 +178,7 @@ var CheckoutUI = function CheckoutUI(props) {
|
|
|
178
178
|
if (userSelected && userSelected !== null && userSelected !== void 0 && userSelected.cellphone) {
|
|
179
179
|
if (userSelected !== null && userSelected !== void 0 && userSelected.country_phone_code) {
|
|
180
180
|
var phone = null;
|
|
181
|
-
phone = "+".concat(userSelected === null || userSelected === void 0 ? void 0 : userSelected.country_phone_code).concat(userSelected === null || userSelected === void 0 ? void 0 : userSelected.cellphone);
|
|
181
|
+
phone = "+".concat(userSelected === null || userSelected === void 0 ? void 0 : userSelected.country_phone_code).concat(userSelected === null || userSelected === void 0 ? void 0 : userSelected.cellphone.replace("+".concat(userSelected === null || userSelected === void 0 ? void 0 : userSelected.country_phone_code), ''));
|
|
182
182
|
var phoneNumber = (0, _libphonenumberJs.default)(phone);
|
|
183
183
|
if (!(phoneNumber !== null && phoneNumber !== void 0 && phoneNumber.isValid())) {
|
|
184
184
|
errors.push(t('VALIDATION_ERROR_MOBILE_PHONE_INVALID', 'The field Phone number is invalid.'));
|
|
@@ -47,7 +47,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
47
47
|
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; } }
|
|
48
48
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
49
49
|
var Header = function Header(props) {
|
|
50
|
-
var _configState$configs, _configState$configs$, _configState$configs2, _configState$configs3, _orderState$options, _orderState$options$a,
|
|
50
|
+
var _configState$configs, _configState$configs$, _configState$configs2, _configState$configs3, _orderState$options, _orderState$options$a, _theme$images, _theme$images$logos, _theme$images2, _theme$images2$logos, _theme$images3, _theme$images3$logos, _orderState$options3, _orderState$options3$, _orderState$options3$2, _orderState$options3$3, _configState$configs4, _configState$configs5, _configState$configs6, _configState$configs7, _configState$configs8, _configState$configs9, _orderState$options4, _orderState$options5, _configState$configs10, _configState$configs11, _theme$defaultLanguag2, _theme$defaultLanguag3, _orderState$options6, _orderState$options6$, _orderState$options6$2, _orderState$options6$3, _configState$configs12, _configState$configs13, _orderState$options7, _configState$configs14, _configState$configs15, _configState$configs16, _configState$configs17, _orderState$options8, _orderState$options8$, _orderState$options8$2, _orderState$options8$3, _configState$configs18, _configState$configs19, _orderState$options9, _configState$configs20, _configState$configs21, _configState$configs22, _configState$configs23, _orderState$options10, _customerState$user, _customerState$user2, _theme$defaultLanguag4, _theme$defaultLanguag5;
|
|
51
51
|
var isHome = props.isHome,
|
|
52
52
|
location = props.location,
|
|
53
53
|
isShowOrderOptions = props.isShowOrderOptions,
|
|
@@ -108,20 +108,16 @@ var Header = function Header(props) {
|
|
|
108
108
|
setConfirm = _useState10[1];
|
|
109
109
|
var _useState11 = (0, _react.useState)(false),
|
|
110
110
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
111
|
-
|
|
112
|
-
|
|
111
|
+
isOpenUserData = _useState12[0],
|
|
112
|
+
setIsOpenUserData = _useState12[1];
|
|
113
113
|
var _useState13 = (0, _react.useState)(false),
|
|
114
114
|
_useState14 = _slicedToArray(_useState13, 2),
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
var _useState15 = (0, _react.useState)(
|
|
115
|
+
isAddressFormOpen = _useState14[0],
|
|
116
|
+
setIsAddressFormOpen = _useState14[1];
|
|
117
|
+
var _useState15 = (0, _react.useState)(null),
|
|
118
118
|
_useState16 = _slicedToArray(_useState15, 2),
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
var _useState17 = (0, _react.useState)(null),
|
|
122
|
-
_useState18 = _slicedToArray(_useState17, 2),
|
|
123
|
-
preorderBusiness = _useState18[0],
|
|
124
|
-
setPreorderBusiness = _useState18[1];
|
|
119
|
+
preorderBusiness = _useState16[0],
|
|
120
|
+
setPreorderBusiness = _useState16[1];
|
|
125
121
|
var cartsWithProducts = (orderState === null || orderState === void 0 ? void 0 : orderState.carts) && Object.values(orderState === null || orderState === void 0 ? void 0 : orderState.carts).filter(function (cart) {
|
|
126
122
|
var _cart$products;
|
|
127
123
|
return cart.products && ((_cart$products = cart.products) === null || _cart$products === void 0 ? void 0 : _cart$products.length) > 0;
|
|
@@ -195,24 +191,6 @@ var Header = function Header(props) {
|
|
|
195
191
|
setCustomerModalOpen(false);
|
|
196
192
|
}
|
|
197
193
|
}, [JSON.stringify(orderState === null || orderState === void 0 ? void 0 : (_orderState$options = orderState.options) === null || _orderState$options === void 0 ? void 0 : (_orderState$options$a = _orderState$options.address) === null || _orderState$options$a === void 0 ? void 0 : _orderState$options$a.address)]);
|
|
198
|
-
(0, _react.useEffect)(function () {
|
|
199
|
-
if (!(pathname.includes('/search') || pathname.includes('/checkout'))) {
|
|
200
|
-
setIsFarAway(false);
|
|
201
|
-
return;
|
|
202
|
-
}
|
|
203
|
-
navigator.geolocation.getCurrentPosition(function (pos) {
|
|
204
|
-
var _orderState$options2, _orderState$options2$, _orderState$options2$2, _orderState$options3, _orderState$options3$, _orderState$options3$2;
|
|
205
|
-
var crd = pos.coords;
|
|
206
|
-
var distance = (0, _utils.getDistance)(crd.latitude, crd.longitude, orderState === null || orderState === void 0 ? void 0 : (_orderState$options2 = orderState.options) === null || _orderState$options2 === void 0 ? void 0 : (_orderState$options2$ = _orderState$options2.address) === null || _orderState$options2$ === void 0 ? void 0 : (_orderState$options2$2 = _orderState$options2$.location) === null || _orderState$options2$2 === void 0 ? void 0 : _orderState$options2$2.lat, orderState === null || orderState === void 0 ? void 0 : (_orderState$options3 = orderState.options) === null || _orderState$options3 === void 0 ? void 0 : (_orderState$options3$ = _orderState$options3.address) === null || _orderState$options3$ === void 0 ? void 0 : (_orderState$options3$2 = _orderState$options3$.location) === null || _orderState$options3$2 === void 0 ? void 0 : _orderState$options3$2.lng);
|
|
207
|
-
if (distance > 20) setIsFarAway(true);else setIsFarAway(false);
|
|
208
|
-
}, function (err) {
|
|
209
|
-
console.warn("ERROR(".concat(err.code, "): ").concat(err.message));
|
|
210
|
-
}, {
|
|
211
|
-
enableHighAccuracy: true,
|
|
212
|
-
timeout: 5000,
|
|
213
|
-
maximumAge: 0
|
|
214
|
-
});
|
|
215
|
-
}, [orderState === null || orderState === void 0 ? void 0 : (_orderState$options4 = orderState.options) === null || _orderState$options4 === void 0 ? void 0 : (_orderState$options4$ = _orderState$options4.address) === null || _orderState$options4$ === void 0 ? void 0 : _orderState$options4$.location, pathname]);
|
|
216
194
|
return /*#__PURE__*/_react.default.createElement(_styles.Header, null, /*#__PURE__*/_react.default.createElement(_styles.InnerHeader, null, /*#__PURE__*/_react.default.createElement(_styles.LeftHeader, null, /*#__PURE__*/_react.default.createElement(_SidebarMenu.SidebarMenu, {
|
|
217
195
|
auth: auth,
|
|
218
196
|
isHideSignup: isHideSignup,
|
|
@@ -220,9 +198,9 @@ var Header = function Header(props) {
|
|
|
220
198
|
isCustomerMode: isCustomerMode
|
|
221
199
|
}), /*#__PURE__*/_react.default.createElement(_styles.LogoHeader, {
|
|
222
200
|
onClick: function onClick() {
|
|
223
|
-
var _orderState$
|
|
201
|
+
var _orderState$options2, _orderState$options2$;
|
|
224
202
|
return handleGoToPage({
|
|
225
|
-
page: orderState !== null && orderState !== void 0 && (_orderState$
|
|
203
|
+
page: orderState !== null && orderState !== void 0 && (_orderState$options2 = orderState.options) !== null && _orderState$options2 !== void 0 && (_orderState$options2$ = _orderState$options2.address) !== null && _orderState$options2$ !== void 0 && _orderState$options2$.location && !isCustomerMode ? 'search' : 'home'
|
|
226
204
|
});
|
|
227
205
|
}
|
|
228
206
|
}, /*#__PURE__*/_react.default.createElement("img", {
|
|
@@ -240,11 +218,11 @@ var Header = function Header(props) {
|
|
|
240
218
|
}))), isShowOrderOptions && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_styles.Menu, {
|
|
241
219
|
className: "left-header",
|
|
242
220
|
id: "center-side"
|
|
243
|
-
},
|
|
221
|
+
}, /*#__PURE__*/_react.default.createElement(_styles.AddressMenu, {
|
|
244
222
|
onClick: function onClick(e) {
|
|
245
223
|
return handleClickUserCustomer(e);
|
|
246
224
|
}
|
|
247
|
-
}, /*#__PURE__*/_react.default.createElement(_reactBootstrapIcons.GeoAlt, null), " ", ((_orderState$
|
|
225
|
+
}, /*#__PURE__*/_react.default.createElement(_reactBootstrapIcons.GeoAlt, null), " ", /*#__PURE__*/_react.default.createElement("span", null, /*#__PURE__*/_react.default.createElement("p", null, ((_orderState$options3 = orderState.options) === null || _orderState$options3 === void 0 ? void 0 : (_orderState$options3$ = _orderState$options3.address) === null || _orderState$options3$ === void 0 ? void 0 : (_orderState$options3$2 = _orderState$options3$.address) === null || _orderState$options3$2 === void 0 ? void 0 : (_orderState$options3$3 = _orderState$options3$2.split(',')) === null || _orderState$options3$3 === void 0 ? void 0 : _orderState$options3$3[0]) || t('WHAT_IS_YOUR_ADDRESS', 'What\'s your address?')))), /*#__PURE__*/_react.default.createElement(_styles.Divider, null), isCustomerMode && windowSize.width > 450 && /*#__PURE__*/_react.default.createElement(_styles.CustomerInfo, {
|
|
248
226
|
onClick: function onClick(e) {
|
|
249
227
|
return handleClickUserCustomer(e);
|
|
250
228
|
}
|
|
@@ -254,7 +232,7 @@ var Header = function Header(props) {
|
|
|
254
232
|
onClick: (configState === null || configState === void 0 ? void 0 : (_configState$configs6 = configState.configs) === null || _configState$configs6 === void 0 ? void 0 : (_configState$configs7 = _configState$configs6.max_days_preorder) === null || _configState$configs7 === void 0 ? void 0 : _configState$configs7.value) === -1 || (configState === null || configState === void 0 ? void 0 : (_configState$configs8 = configState.configs) === null || _configState$configs8 === void 0 ? void 0 : (_configState$configs9 = _configState$configs8.max_days_preorder) === null || _configState$configs9 === void 0 ? void 0 : _configState$configs9.value) === 0 ? null : function () {
|
|
255
233
|
return openModal('moment');
|
|
256
234
|
}
|
|
257
|
-
}, /*#__PURE__*/_react.default.createElement("div", null, (_orderState$
|
|
235
|
+
}, /*#__PURE__*/_react.default.createElement("div", null, (_orderState$options4 = orderState.options) !== null && _orderState$options4 !== void 0 && _orderState$options4.moment ? parseDate((_orderState$options5 = orderState.options) === null || _orderState$options5 === void 0 ? void 0 : _orderState$options5.moment, {
|
|
258
236
|
outputFormat: configState === null || configState === void 0 ? void 0 : (_configState$configs10 = configState.configs) === null || _configState$configs10 === void 0 ? void 0 : (_configState$configs11 = _configState$configs10.dates_moment_format) === null || _configState$configs11 === void 0 ? void 0 : _configState$configs11.value
|
|
259
237
|
}) : t('ASAP_ABBREVIATION', 'ASAP')))), windowSize.width > 768 ? /*#__PURE__*/_react.default.createElement(_OrderTypeSelectorHeader.OrderTypeSelectorHeader, {
|
|
260
238
|
orderTypeList: orderTypeList,
|
|
@@ -323,25 +301,25 @@ var Header = function Header(props) {
|
|
|
323
301
|
onClose: function onClose() {
|
|
324
302
|
return handleClosePopover('user');
|
|
325
303
|
}
|
|
326
|
-
}))))), onlineStatus && isShowOrderOptions && (windowSize.width > 768 && windowSize.width <= 820 ? /*#__PURE__*/_react.default.createElement(_styles.SubMenu, null,
|
|
304
|
+
}))))), onlineStatus && isShowOrderOptions && (windowSize.width > 768 && windowSize.width <= 820 ? /*#__PURE__*/_react.default.createElement(_styles.SubMenu, null, /*#__PURE__*/_react.default.createElement(_styles.AddressMenu, {
|
|
327
305
|
onClick: function onClick() {
|
|
328
306
|
return openModal('address');
|
|
329
307
|
}
|
|
330
|
-
}, /*#__PURE__*/_react.default.createElement(_reactBootstrapIcons.GeoAlt, null), " ", ((_orderState$
|
|
308
|
+
}, /*#__PURE__*/_react.default.createElement(_reactBootstrapIcons.GeoAlt, null), " ", ((_orderState$options6 = orderState.options) === null || _orderState$options6 === void 0 ? void 0 : (_orderState$options6$ = _orderState$options6.address) === null || _orderState$options6$ === void 0 ? void 0 : (_orderState$options6$2 = _orderState$options6$.address) === null || _orderState$options6$2 === void 0 ? void 0 : (_orderState$options6$3 = _orderState$options6$2.split(',')) === null || _orderState$options6$3 === void 0 ? void 0 : _orderState$options6$3[0]) || t('WHAT_IS_YOUR_ADDRESS', 'What\'s your address?')), !isCustomerMode && (isPreOrderSetting || (configState === null || configState === void 0 ? void 0 : (_configState$configs12 = configState.configs) === null || _configState$configs12 === void 0 ? void 0 : (_configState$configs13 = _configState$configs12.preorder_status_enabled) === null || _configState$configs13 === void 0 ? void 0 : _configState$configs13.value) === undefined) && /*#__PURE__*/_react.default.createElement(_HeaderOption.HeaderOption, {
|
|
331
309
|
variant: "moment",
|
|
332
|
-
momentState: orderState === null || orderState === void 0 ? void 0 : (_orderState$
|
|
310
|
+
momentState: orderState === null || orderState === void 0 ? void 0 : (_orderState$options7 = orderState.options) === null || _orderState$options7 === void 0 ? void 0 : _orderState$options7.moment,
|
|
333
311
|
onClick: (configState === null || configState === void 0 ? void 0 : (_configState$configs14 = configState.configs) === null || _configState$configs14 === void 0 ? void 0 : (_configState$configs15 = _configState$configs14.max_days_preorder) === null || _configState$configs15 === void 0 ? void 0 : _configState$configs15.value) === -1 || (configState === null || configState === void 0 ? void 0 : (_configState$configs16 = configState.configs) === null || _configState$configs16 === void 0 ? void 0 : (_configState$configs17 = _configState$configs16.max_days_preorder) === null || _configState$configs17 === void 0 ? void 0 : _configState$configs17.value) === 0 ? null : function (variant) {
|
|
334
312
|
return openModal(variant);
|
|
335
313
|
}
|
|
336
|
-
})) : /*#__PURE__*/_react.default.createElement(_styles.SubMenu, null,
|
|
314
|
+
})) : /*#__PURE__*/_react.default.createElement(_styles.SubMenu, null, /*#__PURE__*/_react.default.createElement(_HeaderOption.HeaderOption, {
|
|
337
315
|
variant: "address",
|
|
338
|
-
addressState: orderState === null || orderState === void 0 ? void 0 : (_orderState$
|
|
316
|
+
addressState: orderState === null || orderState === void 0 ? void 0 : (_orderState$options8 = orderState.options) === null || _orderState$options8 === void 0 ? void 0 : (_orderState$options8$ = _orderState$options8.address) === null || _orderState$options8$ === void 0 ? void 0 : (_orderState$options8$2 = _orderState$options8$.address) === null || _orderState$options8$2 === void 0 ? void 0 : (_orderState$options8$3 = _orderState$options8$2.split(',')) === null || _orderState$options8$3 === void 0 ? void 0 : _orderState$options8$3[0],
|
|
339
317
|
onClick: function onClick(variant) {
|
|
340
318
|
return openModal(variant);
|
|
341
319
|
}
|
|
342
320
|
}), !isCustomerMode && (isPreOrderSetting || (configState === null || configState === void 0 ? void 0 : (_configState$configs18 = configState.configs) === null || _configState$configs18 === void 0 ? void 0 : (_configState$configs19 = _configState$configs18.preorder_status_enabled) === null || _configState$configs19 === void 0 ? void 0 : _configState$configs19.value) === undefined) && /*#__PURE__*/_react.default.createElement(_HeaderOption.HeaderOption, {
|
|
343
321
|
variant: "moment",
|
|
344
|
-
momentState: orderState === null || orderState === void 0 ? void 0 : (_orderState$
|
|
322
|
+
momentState: orderState === null || orderState === void 0 ? void 0 : (_orderState$options9 = orderState.options) === null || _orderState$options9 === void 0 ? void 0 : _orderState$options9.moment,
|
|
345
323
|
onClick: (configState === null || configState === void 0 ? void 0 : (_configState$configs20 = configState.configs) === null || _configState$configs20 === void 0 ? void 0 : (_configState$configs21 = _configState$configs20.max_days_preorder) === null || _configState$configs21 === void 0 ? void 0 : _configState$configs21.value) === -1 || (configState === null || configState === void 0 ? void 0 : (_configState$configs22 = configState.configs) === null || _configState$configs22 === void 0 ? void 0 : (_configState$configs23 = _configState$configs22.max_days_preorder) === null || _configState$configs23 === void 0 ? void 0 : _configState$configs23.value) === 0 ? null : function (variant) {
|
|
346
324
|
return openModal(variant);
|
|
347
325
|
}
|
|
@@ -370,7 +348,7 @@ var Header = function Header(props) {
|
|
|
370
348
|
}
|
|
371
349
|
}) : /*#__PURE__*/_react.default.createElement(_AddressForm.AddressForm, {
|
|
372
350
|
useValidationFileds: true,
|
|
373
|
-
address: (orderState === null || orderState === void 0 ? void 0 : (_orderState$
|
|
351
|
+
address: (orderState === null || orderState === void 0 ? void 0 : (_orderState$options10 = orderState.options) === null || _orderState$options10 === void 0 ? void 0 : _orderState$options10.address) || {},
|
|
374
352
|
onCancel: function onCancel() {
|
|
375
353
|
return setModalIsOpen(false);
|
|
376
354
|
},
|
|
@@ -395,7 +373,9 @@ var Header = function Header(props) {
|
|
|
395
373
|
},
|
|
396
374
|
padding: "20px",
|
|
397
375
|
hideCloseDefault: true
|
|
398
|
-
}, /*#__PURE__*/_react.default.createElement(_styles.UserEdit,
|
|
376
|
+
}, /*#__PURE__*/_react.default.createElement(_styles.UserEdit, {
|
|
377
|
+
isOpenUserData: isOpenUserData
|
|
378
|
+
}, /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_UserDetails.UserDetails, {
|
|
399
379
|
isAddressFormOpen: isAddressFormOpen,
|
|
400
380
|
userData: customerState === null || customerState === void 0 ? void 0 : customerState.user,
|
|
401
381
|
userId: customerState === null || customerState === void 0 ? void 0 : (_customerState$user = customerState.user) === null || _customerState$user === void 0 ? void 0 : _customerState$user.id,
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.UserEdit = exports.SubMenu = exports.RightHeader = exports.MomentMenu = exports.MenuLink = exports.MenuItem = exports.Menu = exports.LogoHeader = exports.LeftHeader = exports.InnerHeader = exports.Header = exports.FarAwayMessage = exports.Divider = exports.CustomerInfo = exports.AdminSection = exports.AddressMenu = 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, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22;
|
|
9
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22, _templateObject23;
|
|
10
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) } })); }
|
|
@@ -44,11 +44,13 @@ var MenuLink = _styledComponents.default.a(_templateObject9 || (_templateObject9
|
|
|
44
44
|
exports.MenuLink = MenuLink;
|
|
45
45
|
var SubMenu = (0, _styledComponents.default)(InnerHeader)(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n display: flex;\n width: 100%;\n justify-content: space-between;\n padding: 0px 20px 7px;\n box-sizing: border-box;\n margin: 0px;\n position: relative;\n\n @media (min-width: 821px) {\n display: none;\n }\n"])));
|
|
46
46
|
exports.SubMenu = SubMenu;
|
|
47
|
-
var CustomerInfo = _styledComponents.default.div(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n display: none;\n cursor: pointer;\n flex: 1;\n position: relative;\n @media (min-width: 450px) {\n display: flex;\n justify-content: center;\n align-items: center;\n\n span {\n display: flex;\n align-items: center;\n margin: 0;\n p {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n color: #909BA9;\n margin: 0;\n }\n svg { \n color: #748194; \n margin: 0;\n font-size: 20px;\n
|
|
47
|
+
var CustomerInfo = _styledComponents.default.div(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n display: none;\n cursor: pointer;\n flex: 1;\n position: relative;\n @media (min-width: 450px) {\n display: flex;\n justify-content: center;\n align-items: center;\n\n span {\n display: flex;\n align-items: center;\n margin: 0;\n p {\n max-width: 250px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n color: #909BA9;\n margin: 0;\n }\n svg { \n color: #748194; \n margin: 0;\n font-size: 20px;\n }\n }\n }\n"])));
|
|
48
48
|
exports.CustomerInfo = CustomerInfo;
|
|
49
|
-
var UserEdit = _styledComponents.default.div(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n > :first-child{\n margin-bottom: 20px
|
|
49
|
+
var UserEdit = _styledComponents.default.div(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n > :first-child{\n margin-bottom: 20px;\n width: 100%;\n ", "\n"])), function (props) {
|
|
50
|
+
return !props.isOpenUserData && (0, _styledComponents.css)(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n position: absolute;\n "])));
|
|
51
|
+
});
|
|
50
52
|
exports.UserEdit = UserEdit;
|
|
51
|
-
var AddressMenu = _styledComponents.default.div(
|
|
53
|
+
var AddressMenu = _styledComponents.default.div(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n cursor: pointer;\n font-size: 14px;\n font-weight: 600;\n color: ", ";\n display: flex;\n align-items: center;\n position: relative;\n width: 50%;\n\n span {\n width: 85%;\n p {\n margin: 0;\n padding: 0;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n }\n }\n\n svg {\n color: ", ";\n font-size: 16px;\n margin-right: 10px;\n ", "\n }\n @media (min-width: 765px) {\n width: 80%;\n }\n @media (min-width: 820px) {\n width: 50%;\n }\n"])), function (props) {
|
|
52
54
|
var _props$theme$colors;
|
|
53
55
|
return (_props$theme$colors = props.theme.colors) === null || _props$theme$colors === void 0 ? void 0 : _props$theme$colors.headingColor;
|
|
54
56
|
}, function (props) {
|
|
@@ -56,33 +58,33 @@ var AddressMenu = _styledComponents.default.div(_templateObject14 || (_templateO
|
|
|
56
58
|
return (_props$theme$colors2 = props.theme.colors) === null || _props$theme$colors2 === void 0 ? void 0 : _props$theme$colors2.lightGray;
|
|
57
59
|
}, function (props) {
|
|
58
60
|
var _props$theme2;
|
|
59
|
-
return ((_props$theme2 = props.theme) === null || _props$theme2 === void 0 ? void 0 : _props$theme2.rtl) && (0, _styledComponents.css)(
|
|
61
|
+
return ((_props$theme2 = props.theme) === null || _props$theme2 === void 0 ? void 0 : _props$theme2.rtl) && (0, _styledComponents.css)(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n margin-left: 10px;\n margin-right: 0;\n "])));
|
|
60
62
|
});
|
|
61
63
|
exports.AddressMenu = AddressMenu;
|
|
62
|
-
var MomentMenu = _styledComponents.default.div(
|
|
64
|
+
var MomentMenu = _styledComponents.default.div(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n border-left: 1px solid #DEE2E6;\n border-right: 1px solid #DEE2E6;\n height: 100%;\n justify-content: center;\n width: 200px;\n display: none;\n \n @media (min-width: 821px) {\n display: flex;\n }\n\n @media (min-width: 1175px) {\n width: 250px;\n }\n\n @media (min-width: 1400px) {\n width: 400px;\n }\n\n > div {\n cursor: pointer;\n font-size: 14px;\n color: #909BA9;\n display: flex;\n align-items: center;\n text-align: center;\n white-space: nowrap;\n padding: 0 10px;\n }\n"])));
|
|
63
65
|
exports.MomentMenu = MomentMenu;
|
|
64
|
-
var FarAwayMessage = _styledComponents.default.div(
|
|
66
|
+
var FarAwayMessage = _styledComponents.default.div(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["\n pointer-events: none;\n position: absolute;\n display: flex;\n align-items: center;\n top: 100%;\n background: ", ";\n border: 1px solid ", ";\n box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.12);\n border-radius: 7.6px;\n padding: 6px 15px;\n box-sizing: border-box;\n z-index: 2000;\n margin: 10px 0px 0px 0px !important;\n\n left: 5px;\n ", "\n\n svg {\n font-size: 20px;\n color: ", ";\n margin-right: 10px;\n ", "\n }\n span {\n font-size: 12px;\n line-height: 18px;\n color: ", ";\n }\n\n @media (min-width: 400px) {\n padding: 8px 20px;\n font-size: 14px;\n line-height: 24px;\n left: 10px;\n ", "\n }\n"])), function (props) {
|
|
65
67
|
return props.theme.colors.warning100;
|
|
66
68
|
}, function (props) {
|
|
67
69
|
return props.theme.colors.warning500;
|
|
68
70
|
}, function (props) {
|
|
69
71
|
var _props$theme3;
|
|
70
|
-
return ((_props$theme3 = props.theme) === null || _props$theme3 === void 0 ? void 0 : _props$theme3.rtl) && (0, _styledComponents.css)(
|
|
72
|
+
return ((_props$theme3 = props.theme) === null || _props$theme3 === void 0 ? void 0 : _props$theme3.rtl) && (0, _styledComponents.css)(_templateObject19 || (_templateObject19 = _taggedTemplateLiteral(["\n right: 5px;\n left: initial;\n "])));
|
|
71
73
|
}, function (props) {
|
|
72
74
|
return props.theme.colors.warning500;
|
|
73
75
|
}, function (props) {
|
|
74
76
|
var _props$theme4;
|
|
75
|
-
return ((_props$theme4 = props.theme) === null || _props$theme4 === void 0 ? void 0 : _props$theme4.rtl) && (0, _styledComponents.css)(
|
|
77
|
+
return ((_props$theme4 = props.theme) === null || _props$theme4 === void 0 ? void 0 : _props$theme4.rtl) && (0, _styledComponents.css)(_templateObject20 || (_templateObject20 = _taggedTemplateLiteral(["\n margin-right: auto;\n margin-left: 10px;\n "])));
|
|
76
78
|
}, function (props) {
|
|
77
79
|
return props.theme.colors.headingColor;
|
|
78
80
|
}, function (props) {
|
|
79
81
|
var _props$theme5;
|
|
80
|
-
return ((_props$theme5 = props.theme) === null || _props$theme5 === void 0 ? void 0 : _props$theme5.rtl) && (0, _styledComponents.css)(
|
|
82
|
+
return ((_props$theme5 = props.theme) === null || _props$theme5 === void 0 ? void 0 : _props$theme5.rtl) && (0, _styledComponents.css)(_templateObject21 || (_templateObject21 = _taggedTemplateLiteral(["\n right: 10px;\n left: initial;\n "])));
|
|
81
83
|
});
|
|
82
84
|
exports.FarAwayMessage = FarAwayMessage;
|
|
83
|
-
var Divider = _styledComponents.default.div(
|
|
85
|
+
var Divider = _styledComponents.default.div(_templateObject22 || (_templateObject22 = _taggedTemplateLiteral(["\n border: 1px solid #DEE2E6;\n height: 100%;\n"])));
|
|
84
86
|
exports.Divider = Divider;
|
|
85
|
-
var AdminSection = _styledComponents.default.div(
|
|
87
|
+
var AdminSection = _styledComponents.default.div(_templateObject23 || (_templateObject23 = _taggedTemplateLiteral(["\n border: 1px solid ", ";\n background: #fff;\n height: 30px;\n width: 120px;\n color: ", ";\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 5px;\n cursor: pointer;\n p {\n margin: 0;\n font-size: 14px;\n }\n svg{\n width: 14px;\n height: 14px;\n }\n"])), function (_ref3) {
|
|
86
88
|
var _theme$colors;
|
|
87
89
|
var theme = _ref3.theme;
|
|
88
90
|
return theme === null || theme === void 0 ? void 0 : (_theme$colors = theme.colors) === null || _theme$colors === void 0 ? void 0 : _theme$colors.primary;
|
|
@@ -24,6 +24,7 @@ var _Modal = require("../Modal");
|
|
|
24
24
|
var _SignUpForm = require("../SignUpForm");
|
|
25
25
|
var _LoginForm = require("../LoginForm");
|
|
26
26
|
var _ForgotPasswordForm = require("../ForgotPasswordForm");
|
|
27
|
+
var _reactBootstrapIcons = require("react-bootstrap-icons");
|
|
27
28
|
var _styles = require("./styles");
|
|
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); }
|
|
@@ -68,6 +69,10 @@ var SidebarMenu = function SidebarMenu(props) {
|
|
|
68
69
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
69
70
|
modalPageToShow = _useState6[0],
|
|
70
71
|
setModalPageToShow = _useState6[1];
|
|
72
|
+
var _useState7 = (0, _react.useState)(false),
|
|
73
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
74
|
+
showMessage = _useState8[0],
|
|
75
|
+
setShowMessage = _useState8[1];
|
|
71
76
|
var isHome = window.location.pathname === '/' || window.location.pathname === '/home';
|
|
72
77
|
var closeModal = function closeModal() {
|
|
73
78
|
setModalIsOpen(false);
|
|
@@ -114,6 +119,12 @@ var SidebarMenu = function SidebarMenu(props) {
|
|
|
114
119
|
}
|
|
115
120
|
}
|
|
116
121
|
}, [width]);
|
|
122
|
+
(0, _react.useEffect)(function () {
|
|
123
|
+
if (!isCustomerMode) return;
|
|
124
|
+
if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
|
|
125
|
+
setShowMessage(true);
|
|
126
|
+
}
|
|
127
|
+
}, []);
|
|
117
128
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, (_props$beforeElements = props.beforeElements) === null || _props$beforeElements === void 0 ? void 0 : _props$beforeElements.map(function (BeforeElement, i) {
|
|
118
129
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
|
|
119
130
|
key: i
|
|
@@ -122,7 +133,11 @@ var SidebarMenu = function SidebarMenu(props) {
|
|
|
122
133
|
return /*#__PURE__*/_react.default.createElement(BeforeComponent, _extends({
|
|
123
134
|
key: i
|
|
124
135
|
}, props));
|
|
125
|
-
}), /*#__PURE__*/_react.default.createElement(_styles.
|
|
136
|
+
}), showMessage && /*#__PURE__*/_react.default.createElement(_styles.MobileMessage, null, /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_reactBootstrapIcons.X, {
|
|
137
|
+
onClick: function onClick() {
|
|
138
|
+
return setShowMessage(false);
|
|
139
|
+
}
|
|
140
|
+
}), t('FOR_THE_BEST_EXPERIENCE_WHILE_SETTING_UP', 'For the best experience while setting up your project, we recommend using a computer.'))), /*#__PURE__*/_react.default.createElement(_styles.Container, {
|
|
126
141
|
auth: auth
|
|
127
142
|
}, /*#__PURE__*/_react.default.createElement(_styles.IconContent, {
|
|
128
143
|
isHome: isHome,
|
|
@@ -4,9 +4,9 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.WrappContent = exports.TextInfo = exports.SidebarContent = exports.MenuLinkText = exports.MenuLinkSeparator = exports.MenuLinkIcon = exports.MenuLink = exports.MenuClose = exports.IconContent = exports.Container = void 0;
|
|
7
|
+
exports.WrappContent = exports.TextInfo = exports.SidebarContent = exports.MobileMessage = exports.MenuLinkText = exports.MenuLinkSeparator = exports.MenuLinkIcon = exports.MenuLink = exports.MenuClose = exports.IconContent = 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, _templateObject17, _templateObject18;
|
|
9
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19;
|
|
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) } })); }
|
|
@@ -83,4 +83,12 @@ var MenuLinkSeparator = _styledComponents.default.div(_templateObject16 || (_tem
|
|
|
83
83
|
var _props$theme3;
|
|
84
84
|
return (_props$theme3 = props.theme) !== null && _props$theme3 !== void 0 && _props$theme3.rtl ? (0, _styledComponents.css)(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n padding-right: 0px;\n margin: 15px 0px -16px -16px;\n "]))) : (0, _styledComponents.css)(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["\n padding-left: 0px;\n margin: 15px -16px -16px 0px;\n "])));
|
|
85
85
|
});
|
|
86
|
-
exports.MenuLinkSeparator = MenuLinkSeparator;
|
|
86
|
+
exports.MenuLinkSeparator = MenuLinkSeparator;
|
|
87
|
+
var MobileMessage = _styledComponents.default.div(_templateObject19 || (_templateObject19 = _taggedTemplateLiteral(["\n position: fixed;\n top: 100px;\n left: calc(50% - 130px);\n z-index: 999;\n background: ", ";\n border: 1px solid ", ";\n box-sizing: border-box;\n box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.12);\n border-radius: 7.6px;\n width: 260px;\n color: ", ";\n > div {\n padding: 15px 15px 10px 15px;\n font-size: 12px;\n line-height: 18px;\n position: relative;\n > svg {\n position: absolute;\n top: 3px;\n right: 3px;\n cursor: pointer;\n font-size: 21px;\n }\n }\n"])), function (props) {
|
|
88
|
+
return props.theme.colors.primaryContrast;
|
|
89
|
+
}, function (props) {
|
|
90
|
+
return props.theme.colors.primary;
|
|
91
|
+
}, function (props) {
|
|
92
|
+
return props.theme.colors.black;
|
|
93
|
+
});
|
|
94
|
+
exports.MobileMessage = MobileMessage;
|
|
@@ -101,7 +101,7 @@ var UserDetailsUI = function UserDetailsUI(props) {
|
|
|
101
101
|
}
|
|
102
102
|
}))), !isEdit ? /*#__PURE__*/_react.default.createElement(_styles.UserData, null, (userData === null || userData === void 0 ? void 0 : userData.address) && /*#__PURE__*/_react.default.createElement("p", null, userData === null || userData === void 0 ? void 0 : userData.address), ((userData === null || userData === void 0 ? void 0 : userData.name) || (userData === null || userData === void 0 ? void 0 : userData.middle_name) || (userData === null || userData === void 0 ? void 0 : userData.lastname) || (userData === null || userData === void 0 ? void 0 : userData.second_lastname)) && /*#__PURE__*/_react.default.createElement(_styles.UserName, null, userData === null || userData === void 0 ? void 0 : userData.name, " ", userData === null || userData === void 0 ? void 0 : userData.middle_name, " ", userData === null || userData === void 0 ? void 0 : userData.lastname, " ", userData === null || userData === void 0 ? void 0 : userData.second_lastname), (userData === null || userData === void 0 ? void 0 : userData.email) && /*#__PURE__*/_react.default.createElement("p", null, userData === null || userData === void 0 ? void 0 : userData.email), ((userData === null || userData === void 0 ? void 0 : userData.cellphone) || (user === null || user === void 0 ? void 0 : user.cellphone)) && /*#__PURE__*/_react.default.createElement(_styles.PhoneContainer, null, /*#__PURE__*/_react.default.createElement(_styles.CountryFlag, null, (userData === null || userData === void 0 ? void 0 : userData.country_phone_code) && /*#__PURE__*/_react.default.createElement(_reactPhoneNumberInput.default, {
|
|
103
103
|
onChange: function onChange() {},
|
|
104
|
-
defaultCountry: (_parsePhoneNumber = (0, _libphonenumberJs.parsePhoneNumber)("+".concat(userData === null || userData === void 0 ? void 0 : (_userData$country_pho = userData.country_phone_code) === null || _userData$country_pho === void 0 ? void 0 : _userData$country_pho.replace('+', ''), " ").concat(userData === null || userData === void 0 ? void 0 : userData.cellphone))) === null || _parsePhoneNumber === void 0 ? void 0 : _parsePhoneNumber.country
|
|
104
|
+
defaultCountry: (_parsePhoneNumber = (0, _libphonenumberJs.parsePhoneNumber)("+".concat(userData === null || userData === void 0 ? void 0 : (_userData$country_pho = userData.country_phone_code) === null || _userData$country_pho === void 0 ? void 0 : _userData$country_pho.replace('+', ''), " ").concat(userData === null || userData === void 0 ? void 0 : userData.cellphone.replace("+".concat(userData === null || userData === void 0 ? void 0 : userData.country_phone_code), '')))) === null || _parsePhoneNumber === void 0 ? void 0 : _parsePhoneNumber.country
|
|
105
105
|
})), /*#__PURE__*/_react.default.createElement("p", null, userData === null || userData === void 0 ? void 0 : userData.cellphone))) : /*#__PURE__*/_react.default.createElement(_styles.SideForm, null, /*#__PURE__*/_react.default.createElement(_UserFormDetails.UserFormDetailsUI, _extends({}, props, {
|
|
106
106
|
userData: userData,
|
|
107
107
|
isCustomerMode: isCustomerMode
|
|
@@ -37,10 +37,10 @@ var ModalIcon = _styledComponents.default.span(_templateObject8 || (_templateObj
|
|
|
37
37
|
exports.ModalIcon = ModalIcon;
|
|
38
38
|
var TitleContainer = _styledComponents.default.div(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n margin-top: 0;\n h1 {\n margin: auto;\n font-size: 24px;\n }\n ", "\n"])), function (_ref) {
|
|
39
39
|
var isAddressFormOpen = _ref.isAddressFormOpen;
|
|
40
|
-
return isAddressFormOpen && (0, _styledComponents.css)(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n h1{
|
|
40
|
+
return isAddressFormOpen && (0, _styledComponents.css)(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n h1{\n width: 75%;\n }\n "])));
|
|
41
41
|
});
|
|
42
42
|
exports.TitleContainer = TitleContainer;
|
|
43
43
|
var CountryFlag = _styledComponents.default.div(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n margin-right: 5px;\n .PhoneInputCountryIcon {\n width: 25px;\n }\n .PhoneInputInput {\n display: none;\n }\n .PhoneInputCountrySelect {\n display: none;\n }\n"])));
|
|
44
44
|
exports.CountryFlag = CountryFlag;
|
|
45
|
-
var PhoneContainer = _styledComponents.default.div(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n height: 30px;\n"])));
|
|
45
|
+
var PhoneContainer = _styledComponents.default.div(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n height: 30px;\n \n p {\n margin: 0;\n }\n"])));
|
|
46
46
|
exports.PhoneContainer = PhoneContainer;
|
|
@@ -88,7 +88,7 @@ var BusinessInformationUI = function BusinessInformationUI(props) {
|
|
|
88
88
|
apiKey: configs === null || configs === void 0 ? void 0 : (_configs$google_maps_ = configs.google_maps_api_key) === null || _configs$google_maps_ === void 0 ? void 0 : _configs$google_maps_.value,
|
|
89
89
|
location: businessLocation.location,
|
|
90
90
|
mapControls: businessLocation.googleMapsControls || business.googleMapsControls
|
|
91
|
-
}))), !hideAddress && (business === null || business === void 0 ? void 0 : business.address) && /*#__PURE__*/_react.default.createElement(_styles.BusinessAddress, null, business === null || business === void 0 ? void 0 : business.address), /*#__PURE__*/_react.default.createElement(_styles.Divider, null)), (businessSchedule === null || businessSchedule === void 0 ? void 0 : businessSchedule.length) > 0 && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, !hideSchedule && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_styles.SectionTitle, null, t('OPENING_TIME', 'Opening time')), /*#__PURE__*/_react.default.createElement(_styles.ScheduleSection, null, /*#__PURE__*/_react.default.createElement(_styles.ScheduleContainer, null, businessSchedule.map(function (schedule, i) {
|
|
91
|
+
}))), !hideAddress && (business === null || business === void 0 ? void 0 : business.address) && /*#__PURE__*/_react.default.createElement(_styles.BusinessAddress, null, business === null || business === void 0 ? void 0 : business.address), (business === null || business === void 0 ? void 0 : business.address_notes) && /*#__PURE__*/_react.default.createElement(_styles.BusinessAddressNotes, null, business === null || business === void 0 ? void 0 : business.address_notes), /*#__PURE__*/_react.default.createElement(_styles.Divider, null)), (businessSchedule === null || businessSchedule === void 0 ? void 0 : businessSchedule.length) > 0 && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, !hideSchedule && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_styles.SectionTitle, null, t('OPENING_TIME', 'Opening time')), /*#__PURE__*/_react.default.createElement(_styles.ScheduleSection, null, /*#__PURE__*/_react.default.createElement(_styles.ScheduleContainer, null, businessSchedule.map(function (schedule, i) {
|
|
92
92
|
return /*#__PURE__*/_react.default.createElement(_ScheduleAccordion.ScheduleAccordion, {
|
|
93
93
|
key: i,
|
|
94
94
|
weekIndex: i,
|
|
@@ -4,10 +4,10 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.SectionTitle = exports.ScheduleSection = exports.ScheduleContainer = exports.ScheduleBlock = exports.ModalIcon = exports.Map = exports.Information = exports.ImageContainer = exports.HeaderImage = exports.Divider = exports.Description = exports.DeliveryInfo = exports.BussinessTitle = exports.BusinessTitle = exports.BusinessMediaContent = exports.BusinessLogo = exports.BusinessInformationContainer = exports.BusinessContent = exports.BusinessAddress = void 0;
|
|
7
|
+
exports.SectionTitle = exports.ScheduleSection = exports.ScheduleContainer = exports.ScheduleBlock = exports.ModalIcon = exports.Map = exports.Information = exports.ImageContainer = exports.HeaderImage = exports.Divider = exports.Description = exports.DeliveryInfo = exports.BussinessTitle = exports.BusinessTitle = exports.BusinessMediaContent = exports.BusinessLogo = exports.BusinessInformationContainer = exports.BusinessContent = exports.BusinessAddressNotes = exports.BusinessAddress = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
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 _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 _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -56,7 +56,7 @@ var ScheduleBlock = _styledComponents.default.div(_templateObject12 || (_templat
|
|
|
56
56
|
return ((_props$theme2 = props.theme) === null || _props$theme2 === void 0 ? void 0 : _props$theme2.rtl) && (0, _styledComponents.css)(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n margin-left: 20px;\n margin-left: 0;\n "])));
|
|
57
57
|
});
|
|
58
58
|
exports.ScheduleBlock = ScheduleBlock;
|
|
59
|
-
var DeliveryInfo = _styledComponents.default.div(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n display: flex;\n flex-wrap: wrap;\n justify-content: flex-start;\n margin-top: 10px;\n\n div {\n width: 100%;\n &:last-child {\n h5:not(:last-child) {\n margin-top: 0px;\n }\n }\n }\n\n @media (min-width: 769px) {\n flex-wrap: nowrap;\n div {\n width: 50%;\n &:last-child {\n h5:not(:last-child) {\n margin-top: 22.1776px;\n }\n }\n }\n }\n"])));
|
|
59
|
+
var DeliveryInfo = _styledComponents.default.div(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n display: flex;\n flex-wrap: wrap;\n justify-content: flex-start;\n margin-top: 10px;\n\n h5 {\n font-size: 16px;\n }\n\n div {\n width: 100%;\n &:last-child {\n h5:not(:last-child) {\n margin-top: 0px;\n }\n }\n }\n\n @media (min-width: 769px) {\n flex-wrap: nowrap;\n div {\n width: 50%;\n &:last-child {\n h5:not(:last-child) {\n margin-top: 22.1776px;\n }\n }\n }\n }\n"])));
|
|
60
60
|
exports.DeliveryInfo = DeliveryInfo;
|
|
61
61
|
var BusinessMediaContent = _styledComponents.default.div(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n padding-bottom: 20px;\n > div {\n display: flex;\n justify-content: flex-start;\n flex-wrap: wrap;\n\n > img,\n > iframe {\n object-fit: cover;\n border-radius: 10px;\n margin: 10px 10px;\n width: calc(100% - 12px);\n cursor: pointer;\n\n @media (min-width: 681px) {\n width: calc(50% - 20px);\n }\n\n @media (min-width: 993px) {\n width: calc(25% - 20px);\n }\n }\n }\n"])));
|
|
62
62
|
exports.BusinessMediaContent = BusinessMediaContent;
|
|
@@ -85,9 +85,13 @@ var BusinessTitle = _styledComponents.default.h2(_templateObject22 || (_template
|
|
|
85
85
|
return ((_props$theme7 = props.theme) === null || _props$theme7 === void 0 ? void 0 : _props$theme7.rtl) && (0, _styledComponents.css)(_templateObject23 || (_templateObject23 = _taggedTemplateLiteral(["\n padding-right: 30px;\n padding-left: 0;\n "])));
|
|
86
86
|
});
|
|
87
87
|
exports.BusinessTitle = BusinessTitle;
|
|
88
|
-
var BusinessAddress = _styledComponents.default.p(_templateObject24 || (_templateObject24 = _taggedTemplateLiteral(["\n font-size: 14px;\n color: ", ";\n margin
|
|
88
|
+
var BusinessAddress = _styledComponents.default.p(_templateObject24 || (_templateObject24 = _taggedTemplateLiteral(["\n font-size: 14px;\n color: ", ";\n margin: 15px 0;\n"])), function (props) {
|
|
89
89
|
return props.theme.colors.darkTextColor;
|
|
90
90
|
});
|
|
91
91
|
exports.BusinessAddress = BusinessAddress;
|
|
92
|
-
var
|
|
92
|
+
var BusinessAddressNotes = _styledComponents.default.p(_templateObject25 || (_templateObject25 = _taggedTemplateLiteral(["\n font-size: 14px;\n color: ", ";\n margin: 15px 0 25px 0;\n"])), function (props) {
|
|
93
|
+
return props.theme.colors.darkTextColor;
|
|
94
|
+
});
|
|
95
|
+
exports.BusinessAddressNotes = BusinessAddressNotes;
|
|
96
|
+
var Divider = _styledComponents.default.div(_templateObject26 || (_templateObject26 = _taggedTemplateLiteral(["\n background: #F8F9FA;\n height: 8px;\n width: calc(100% + 20px);\n margin-left: -10px;\n\n @media (min-width: 768px) {\n width: calc(100% + 40px);\n margin-left: -20px;\n }\n"])));
|
|
93
97
|
exports.Divider = Divider;
|
|
@@ -61,7 +61,7 @@ var BusinessActions = _styledComponents.default.div(_templateObject14 || (_templ
|
|
|
61
61
|
return ((_props$theme4 = props.theme) === null || _props$theme4 === void 0 ? void 0 : _props$theme4.rtl) && (0, _styledComponents.css)(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n margin-left: 5px;\n margin-right: 0;\n "])));
|
|
62
62
|
});
|
|
63
63
|
exports.BusinessActions = BusinessActions;
|
|
64
|
-
var PriceContainer = _styledComponents.default.div(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n button{ \n padding: 10px 30px;\n min-width: 150px;\n width: 50%;\n height: 50px;\n }\n"])));
|
|
64
|
+
var PriceContainer = _styledComponents.default.div(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n h4 {\n font-size: 16px;\n }\n button{ \n padding: 10px 30px;\n min-width: 150px;\n width: 50%;\n height: 50px;\n }\n"])));
|
|
65
65
|
exports.PriceContainer = PriceContainer;
|
|
66
66
|
var BusinessLogoStyled = _styledComponents.default.div(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n display: flex;\n width: 75px;\n height: 75px;\n min-height: 75px;\n box-sizing: border-box;\n position: relative;\n background-repeat: no-repeat, repeat;\n background-size: contain;\n object-fit: contain;\n background-position: center;\n border-radius: 10px;\n"])));
|
|
67
67
|
var BusinessLogo = function BusinessLogo(props) {
|
|
@@ -140,9 +140,8 @@ var BusinessProductsCategoriesUI = function BusinessProductsCategoriesUI(props)
|
|
|
140
140
|
}
|
|
141
141
|
};
|
|
142
142
|
(0, _react.useEffect)(function () {
|
|
143
|
-
var _Object$values;
|
|
144
|
-
|
|
145
|
-
var styleSheet = document.getElementById('styles').sheet;
|
|
143
|
+
var _document$getElementB6, _Object$values;
|
|
144
|
+
var styleSheet = (_document$getElementB6 = document.getElementById('styles')) === null || _document$getElementB6 === void 0 ? void 0 : _document$getElementB6.sheet;
|
|
146
145
|
if ((_Object$values = Object.values(styleSheet.cssRules)) !== null && _Object$values !== void 0 && _Object$values.length) {
|
|
147
146
|
styleSheet === null || styleSheet === void 0 ? void 0 : styleSheet.deleteRule(0);
|
|
148
147
|
}
|