ordering-ui-external 1.5.5 → 1.6.1
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.cb87b9b647114f245c57.js → 0.ordering-ui.9399c2752e3ad5f2250b.js} +1 -1
- package/_bundles/{1.ordering-ui.cb87b9b647114f245c57.js → 1.ordering-ui.9399c2752e3ad5f2250b.js} +1 -1
- package/_bundles/{2.ordering-ui.cb87b9b647114f245c57.js → 2.ordering-ui.9399c2752e3ad5f2250b.js} +1 -1
- package/_bundles/{4.ordering-ui.cb87b9b647114f245c57.js → 4.ordering-ui.9399c2752e3ad5f2250b.js} +1 -1
- package/_bundles/{5.ordering-ui.cb87b9b647114f245c57.js → 5.ordering-ui.9399c2752e3ad5f2250b.js} +1 -1
- package/_bundles/{6.ordering-ui.cb87b9b647114f245c57.js → 6.ordering-ui.9399c2752e3ad5f2250b.js} +1 -1
- package/_bundles/7.ordering-ui.9399c2752e3ad5f2250b.js +2 -0
- package/_bundles/{7.ordering-ui.cb87b9b647114f245c57.js.LICENSE.txt → 7.ordering-ui.9399c2752e3ad5f2250b.js.LICENSE.txt} +18 -0
- package/_bundles/{8.ordering-ui.cb87b9b647114f245c57.js → 8.ordering-ui.9399c2752e3ad5f2250b.js} +1 -1
- package/_bundles/{9.ordering-ui.cb87b9b647114f245c57.js → 9.ordering-ui.9399c2752e3ad5f2250b.js} +1 -1
- package/_bundles/ordering-ui.9399c2752e3ad5f2250b.js +2 -0
- package/_bundles/{ordering-ui.cb87b9b647114f245c57.js.LICENSE.txt → ordering-ui.9399c2752e3ad5f2250b.js.LICENSE.txt} +0 -0
- package/_modules/components/BusinessTypeFilter/index.js +6 -3
- package/_modules/components/CancellationComponent/index.js +58 -0
- package/_modules/components/CancellationComponent/styles.js +43 -0
- package/_modules/components/Header/index.js +1 -1
- package/_modules/index.js +7 -0
- package/_modules/themes/callcenterOriginal/src/components/Header/styles.js +1 -1
- package/_modules/themes/five/src/components/AddressForm/index.js +5 -5
- package/_modules/themes/five/src/components/AddressList/index.js +3 -1
- package/_modules/themes/five/src/components/AddressList/styles.js +1 -1
- package/_modules/themes/five/src/components/BusinessBasicInformation/index.js +4 -2
- package/_modules/themes/five/src/components/BusinessController/index.js +22 -13
- package/_modules/themes/five/src/components/BusinessProductsCategories/layouts/groceries/styles.js +2 -2
- package/_modules/themes/five/src/components/BusinessReviews/index.js +4 -4
- package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +8 -5
- package/_modules/themes/five/src/components/CartPopover/styles.js +1 -1
- package/_modules/themes/five/src/components/Footer/index.js +7 -2
- package/_modules/themes/five/src/components/Header/index.js +6 -3
- package/_modules/themes/five/src/components/HomeHero/index.js +5 -3
- package/_modules/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/index.js +15 -7
- package/_modules/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/styles.js +21 -18
- package/_modules/themes/five/src/components/MultiCartsPaymethodsAndWallets/index.js +2 -2
- package/_modules/themes/five/src/components/MultiOrdersDetails/styles.js +1 -1
- package/_modules/themes/five/src/components/OrderDetails/OrderActionsSection.js +38 -0
- package/_modules/themes/five/src/components/OrderDetails/OrderHeaderInfoSection.js +27 -0
- package/_modules/themes/five/src/components/OrderDetails/index.js +65 -61
- package/_modules/themes/five/src/components/OrderDetails/styles.js +7 -5
- package/_modules/themes/five/src/components/OrderTypeSelectorContent/index.js +7 -2
- package/_modules/themes/five/src/components/OrdersOption/PreviousBusinessOrdered/index.js +2 -2
- package/_modules/themes/five/src/components/OrdersOption/index.js +4 -2
- package/_modules/themes/five/src/components/ProductItemAccordion/index.js +5 -3
- package/_modules/themes/five/src/components/RenderProductsLayout/index.js +7 -0
- package/_modules/themes/five/src/components/SignUpApproval/index.js +6 -6
- package/_modules/themes/five/src/components/SingleProductCard/index.js +4 -4
- package/_modules/themes/five/src/components/UserFormDetails/index.js +51 -26
- package/_modules/themes/five/src/components/UserFormDetails/styles.js +9 -3
- package/_modules/themes/five/src/components/UserVerification/index.js +7 -2
- package/index-template.js +9 -5
- package/package.json +2 -2
- package/src/components/BusinessTypeFilter/index.js +2 -2
- package/src/components/CancellationComponent/index.js +62 -0
- package/src/components/CancellationComponent/styles.js +162 -0
- package/src/components/Header/index.js +1 -1
- package/src/index.js +2 -0
- package/src/themes/callcenterOriginal/src/components/Header/styles.js +1 -0
- package/src/themes/five/src/components/AddressForm/index.js +2 -2
- package/src/themes/five/src/components/AddressList/index.js +2 -1
- package/src/themes/five/src/components/AddressList/styles.js +4 -1
- package/src/themes/five/src/components/BusinessBasicInformation/index.js +3 -2
- package/src/themes/five/src/components/BusinessController/index.js +68 -44
- package/src/themes/five/src/components/BusinessProductsCategories/layouts/groceries/styles.js +6 -1
- package/src/themes/five/src/components/BusinessReviews/index.js +4 -4
- package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +16 -12
- package/src/themes/five/src/components/CartPopover/styles.js +1 -1
- package/src/themes/five/src/components/Footer/index.js +6 -3
- package/src/themes/five/src/components/Header/index.js +4 -3
- package/src/themes/five/src/components/HomeHero/index.js +4 -2
- package/src/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/index.js +18 -6
- package/src/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/styles.js +3 -0
- package/src/themes/five/src/components/MultiCartsPaymethodsAndWallets/index.js +1 -1
- package/src/themes/five/src/components/MultiOrdersDetails/styles.js +5 -1
- package/src/themes/five/src/components/OrderDetails/OrderActionsSection.js +33 -0
- package/src/themes/five/src/components/OrderDetails/OrderHeaderInfoSection.js +20 -0
- package/src/themes/five/src/components/OrderDetails/index.js +85 -101
- package/src/themes/five/src/components/OrderDetails/styles.js +4 -1
- package/src/themes/five/src/components/OrderTypeSelectorContent/index.js +4 -2
- package/src/themes/five/src/components/OrdersOption/PreviousBusinessOrdered/index.js +2 -2
- package/src/themes/five/src/components/OrdersOption/index.js +3 -1
- package/src/themes/five/src/components/ProductItemAccordion/index.js +4 -2
- package/src/themes/five/src/components/RenderProductsLayout/index.js +10 -1
- package/src/themes/five/src/components/SignUpApproval/index.js +6 -7
- package/src/themes/five/src/components/SingleProductCard/index.js +3 -3
- package/src/themes/five/src/components/UserFormDetails/index.js +59 -23
- package/src/themes/five/src/components/UserFormDetails/styles.js +26 -0
- package/src/themes/five/src/components/UserVerification/index.js +18 -11
- package/template/app.js +394 -370
- package/template/assets/images/home-hero-mobile.jpg +0 -0
- package/template/components/HelmetTags/index.js +4 -2
- package/template/components/SubdomainComponent/index.js +61 -0
- package/template/config.json +4 -1
- package/template/pages/Home/index.js +5 -3
- package/_bundles/7.ordering-ui.cb87b9b647114f245c57.js +0 -2
- package/_bundles/ordering-ui.cb87b9b647114f245c57.js +0 -2
|
@@ -17,7 +17,7 @@ var HeaderItem = _styledComponents.default.div(_templateObject || (_templateObje
|
|
|
17
17
|
return (_props$theme = props.theme) !== null && _props$theme !== void 0 && _props$theme.rtl ? (0, _styledComponents.css)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n margin-right: 10px;\n "]))) : (0, _styledComponents.css)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n margin-left: 10px;\n "])));
|
|
18
18
|
});
|
|
19
19
|
exports.HeaderItem = HeaderItem;
|
|
20
|
-
var PopoverBody = _styledComponents.default.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n background-color: #FFF;\n color: #333;\n padding: 15px;\n border-radius: 10px;\n max-width: 500px;\n z-index:
|
|
20
|
+
var PopoverBody = _styledComponents.default.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n background-color: #FFF;\n color: #333;\n padding: 15px;\n border-radius: 10px;\n max-width: 500px;\n z-index: 2000;\n box-shadow: rgba(0, 0, 0, 0.2) 0px 8px 24px;\n"])));
|
|
21
21
|
exports.PopoverBody = PopoverBody;
|
|
22
22
|
var PopoverArrow = _styledComponents.default.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n width: 0;\n height: 0;\n border-left: 7px solid transparent;\n border-right: 7px solid transparent;\n border-bottom: 8px solid #FFF;\n top: -8px;\n"])));
|
|
23
23
|
exports.PopoverArrow = PopoverArrow;
|
|
@@ -23,6 +23,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
23
23
|
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
24
24
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
25
25
|
var Footer = function Footer() {
|
|
26
|
+
var _theme$my_products, _theme$my_products$co, _theme$my_products$co2, _theme$my_products$co3, _theme$my_products$co4;
|
|
26
27
|
var _useState = (0, _react.useState)({
|
|
27
28
|
body: null,
|
|
28
29
|
loading: false,
|
|
@@ -34,7 +35,11 @@ var Footer = function Footer() {
|
|
|
34
35
|
var _useApi = (0, _orderingComponentsExternal.useApi)(),
|
|
35
36
|
_useApi2 = _slicedToArray(_useApi, 1),
|
|
36
37
|
ordering = _useApi2[0];
|
|
38
|
+
var _useOrderingTheme = (0, _orderingComponentsExternal.useOrderingTheme)(),
|
|
39
|
+
_useOrderingTheme2 = _slicedToArray(_useOrderingTheme, 1),
|
|
40
|
+
theme = _useOrderingTheme2[0].theme;
|
|
37
41
|
var requestsState = {};
|
|
42
|
+
var footerContent = theme === null || theme === void 0 ? void 0 : (_theme$my_products = theme.my_products) === null || _theme$my_products === void 0 ? void 0 : (_theme$my_products$co = _theme$my_products.components) === null || _theme$my_products$co === void 0 ? void 0 : (_theme$my_products$co2 = _theme$my_products$co.theme_settings) === null || _theme$my_products$co2 === void 0 ? void 0 : (_theme$my_products$co3 = _theme$my_products$co2.components) === null || _theme$my_products$co3 === void 0 ? void 0 : (_theme$my_products$co4 = _theme$my_products$co3.values) === null || _theme$my_products$co4 === void 0 ? void 0 : _theme$my_products$co4.footer_content;
|
|
38
43
|
var getPage = /*#__PURE__*/function () {
|
|
39
44
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
40
45
|
var source, _yield$ordering$pages, _yield$ordering$pages2, error, result;
|
|
@@ -99,13 +104,13 @@ var Footer = function Footer() {
|
|
|
99
104
|
}
|
|
100
105
|
};
|
|
101
106
|
}, []);
|
|
102
|
-
return /*#__PURE__*/_react.default.createElement(_styles.Container, null, footerState.body && /*#__PURE__*/_react.default.createElement("div", {
|
|
107
|
+
return /*#__PURE__*/_react.default.createElement(_styles.Container, null, (footerContent || footerState.body) && /*#__PURE__*/_react.default.createElement("div", {
|
|
103
108
|
style: {
|
|
104
109
|
wordBreak: 'break-all',
|
|
105
110
|
padding: '0px 10px'
|
|
106
111
|
},
|
|
107
112
|
dangerouslySetInnerHTML: {
|
|
108
|
-
__html: footerState.body
|
|
113
|
+
__html: footerContent || footerState.body
|
|
109
114
|
}
|
|
110
115
|
}));
|
|
111
116
|
};
|
|
@@ -48,7 +48,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
48
48
|
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
49
49
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
50
50
|
var Header = function Header(props) {
|
|
51
|
-
var _configState$configs, _configState$configs$, _configState$configs2, _configState$configs3, _customerState$user, _orderState$options3, _orderState$options3$, _props$beforeElements, _props$beforeComponen, _theme$images, _theme$images$logos, _theme$images2, _theme$images2$logos, _theme$images3, _theme$images3$logos, _orderState$options5, _orderState$options5$, _orderState$options6, _orderState$options6$, _configState$configs4, _configState$configs5, _configState$configs6, _configState$configs7, _configState$configs8, _configState$configs9, _orderState$options7, _orderState$options8, _configState$configs10, _configState$configs11, _theme$defaultLanguag2, _theme$defaultLanguag3, _orderState$options9, _orderState$options9$, _configState$configs12, _configState$configs13, _orderState$options10, _configState$configs14, _configState$configs15, _configState$configs16, _configState$configs17, _orderState$options11, _orderState$options12, _configState$configs18, _configState$configs19, _orderState$options13, _configState$configs20, _configState$configs21, _configState$configs22, _configState$configs23, _orderState$options14, _orderState$options15, _customerState$user2, _customerState$user3, _theme$defaultLanguag4, _theme$defaultLanguag5, _theme$defaultLanguag6, _theme$defaultLanguag7, _theme$defaultLanguag8, _theme$defaultLanguag9, _props$afterComponent, _props$afterElements;
|
|
51
|
+
var _configState$configs, _configState$configs$, _configState$configs2, _configState$configs3, _customerState$user, _orderState$options3, _orderState$options3$, _props$beforeElements, _props$beforeComponen, _orderingTheme$my_pro, _orderingTheme$my_pro2, _orderingTheme$my_pro3, _orderingTheme$my_pro4, _orderingTheme$my_pro5, _orderingTheme$my_pro6, _theme$images, _theme$images$logos, _orderingTheme$my_pro7, _orderingTheme$my_pro8, _orderingTheme$my_pro9, _orderingTheme$my_pro10, _orderingTheme$my_pro11, _orderingTheme$my_pro12, _theme$images2, _theme$images2$logos, _theme$images3, _theme$images3$logos, _orderState$options5, _orderState$options5$, _orderState$options6, _orderState$options6$, _configState$configs4, _configState$configs5, _configState$configs6, _configState$configs7, _configState$configs8, _configState$configs9, _orderState$options7, _orderState$options8, _configState$configs10, _configState$configs11, _theme$defaultLanguag2, _theme$defaultLanguag3, _orderState$options9, _orderState$options9$, _configState$configs12, _configState$configs13, _orderState$options10, _configState$configs14, _configState$configs15, _configState$configs16, _configState$configs17, _orderState$options11, _orderState$options12, _configState$configs18, _configState$configs19, _orderState$options13, _configState$configs20, _configState$configs21, _configState$configs22, _configState$configs23, _orderState$options14, _orderState$options15, _customerState$user2, _customerState$user3, _theme$defaultLanguag4, _theme$defaultLanguag5, _theme$defaultLanguag6, _theme$defaultLanguag7, _theme$defaultLanguag8, _theme$defaultLanguag9, _props$afterComponent, _props$afterElements;
|
|
52
52
|
var isHome = props.isHome,
|
|
53
53
|
location = props.location,
|
|
54
54
|
isShowOrderOptions = props.isShowOrderOptions,
|
|
@@ -85,6 +85,9 @@ var Header = function Header(props) {
|
|
|
85
85
|
_useCustomer2 = _slicedToArray(_useCustomer, 2),
|
|
86
86
|
customerState = _useCustomer2[0],
|
|
87
87
|
deleteUserCustomer = _useCustomer2[1].deleteUserCustomer;
|
|
88
|
+
var _useOrderingTheme = (0, _orderingComponentsExternal.useOrderingTheme)(),
|
|
89
|
+
_useOrderingTheme2 = _slicedToArray(_useOrderingTheme, 1),
|
|
90
|
+
orderingTheme = _useOrderingTheme2[0].theme;
|
|
88
91
|
var clearCustomer = (0, _react.useRef)(null);
|
|
89
92
|
var _useState3 = (0, _react.useState)(false),
|
|
90
93
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
@@ -273,13 +276,13 @@ var Header = function Header(props) {
|
|
|
273
276
|
alt: "Logotype",
|
|
274
277
|
width: "170px",
|
|
275
278
|
height: "45px",
|
|
276
|
-
src: theme === null || theme === void 0 ? void 0 : (_theme$images = theme.images) === null || _theme$images === void 0 ? void 0 : (_theme$images$logos = _theme$images.logos) === null || _theme$images$logos === void 0 ? void 0 : _theme$images$logos.logotype,
|
|
279
|
+
src: (orderingTheme === null || orderingTheme === void 0 ? void 0 : (_orderingTheme$my_pro = orderingTheme.my_products) === null || _orderingTheme$my_pro === void 0 ? void 0 : (_orderingTheme$my_pro2 = _orderingTheme$my_pro.components) === null || _orderingTheme$my_pro2 === void 0 ? void 0 : (_orderingTheme$my_pro3 = _orderingTheme$my_pro2.images) === null || _orderingTheme$my_pro3 === void 0 ? void 0 : (_orderingTheme$my_pro4 = _orderingTheme$my_pro3.components) === null || _orderingTheme$my_pro4 === void 0 ? void 0 : (_orderingTheme$my_pro5 = _orderingTheme$my_pro4.logo) === null || _orderingTheme$my_pro5 === void 0 ? void 0 : (_orderingTheme$my_pro6 = _orderingTheme$my_pro5.components) === null || _orderingTheme$my_pro6 === void 0 ? void 0 : _orderingTheme$my_pro6.image) || (theme === null || theme === void 0 ? void 0 : (_theme$images = theme.images) === null || _theme$images === void 0 ? void 0 : (_theme$images$logos = _theme$images.logos) === null || _theme$images$logos === void 0 ? void 0 : _theme$images$logos.logotype),
|
|
277
280
|
loading: "lazy"
|
|
278
281
|
}), /*#__PURE__*/_react.default.createElement("img", {
|
|
279
282
|
alt: "Isotype",
|
|
280
283
|
width: "35px",
|
|
281
284
|
height: "45px",
|
|
282
|
-
src: isHome ? theme === null || theme === void 0 ? void 0 : (_theme$images2 = theme.images) === null || _theme$images2 === void 0 ? void 0 : (_theme$images2$logos = _theme$images2.logos) === null || _theme$images2$logos === void 0 ? void 0 : _theme$images2$logos.isotypeInvert : theme === null || theme === void 0 ? void 0 : (_theme$images3 = theme.images) === null || _theme$images3 === void 0 ? void 0 : (_theme$images3$logos = _theme$images3.logos) === null || _theme$images3$logos === void 0 ? void 0 : _theme$images3$logos.isotype,
|
|
285
|
+
src: (orderingTheme === null || orderingTheme === void 0 ? void 0 : (_orderingTheme$my_pro7 = orderingTheme.my_products) === null || _orderingTheme$my_pro7 === void 0 ? void 0 : (_orderingTheme$my_pro8 = _orderingTheme$my_pro7.components) === null || _orderingTheme$my_pro8 === void 0 ? void 0 : (_orderingTheme$my_pro9 = _orderingTheme$my_pro8.images) === null || _orderingTheme$my_pro9 === void 0 ? void 0 : (_orderingTheme$my_pro10 = _orderingTheme$my_pro9.components) === null || _orderingTheme$my_pro10 === void 0 ? void 0 : (_orderingTheme$my_pro11 = _orderingTheme$my_pro10.logo) === null || _orderingTheme$my_pro11 === void 0 ? void 0 : (_orderingTheme$my_pro12 = _orderingTheme$my_pro11.components) === null || _orderingTheme$my_pro12 === void 0 ? void 0 : _orderingTheme$my_pro12.image) || (isHome ? theme === null || theme === void 0 ? void 0 : (_theme$images2 = theme.images) === null || _theme$images2 === void 0 ? void 0 : (_theme$images2$logos = _theme$images2.logos) === null || _theme$images2$logos === void 0 ? void 0 : _theme$images2$logos.isotypeInvert : theme === null || theme === void 0 ? void 0 : (_theme$images3 = theme.images) === null || _theme$images3 === void 0 ? void 0 : (_theme$images3$logos = _theme$images3.logos) === null || _theme$images3$logos === void 0 ? void 0 : _theme$images3$logos.isotype),
|
|
283
286
|
loading: "lazy"
|
|
284
287
|
}))), isShowOrderOptions && !props.isCustomLayout && /*#__PURE__*/_react.default.createElement(_styles.Menu, {
|
|
285
288
|
id: "center-side",
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.HomeHero = void 0;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _styledComponents = require("styled-components");
|
|
8
9
|
var _OriginalHomeHero = require("./layouts/OriginalHomeHero");
|
|
9
10
|
var _RedHomeHero = require("./layouts/RedHomeHero");
|
|
10
11
|
var _StarbucksHomeHero = require("./layouts/StarbucksHomeHero");
|
|
@@ -13,12 +14,13 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
13
14
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
14
15
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
15
16
|
var HomeHero = function HomeHero(props) {
|
|
16
|
-
var _HomeLayoutConfig$hom, _HomeLayoutConfig$hom2, _HomeLayoutConfig$hom3, _HomeLayoutConfig$hom4;
|
|
17
|
+
var _theme$homepage_view, _theme$homepage_view$, _theme$homepage_view$2, _theme$homepage_view2, _theme$homepage_view3, _theme$homepage_view4, _HomeLayoutConfig$hom, _HomeLayoutConfig$hom2, _HomeLayoutConfig$hom3, _HomeLayoutConfig$hom4;
|
|
18
|
+
var theme = (0, _styledComponents.useTheme)();
|
|
17
19
|
var HomeLayoutConfig = {
|
|
18
20
|
homepage_settings: {
|
|
19
|
-
layout: 'original',
|
|
21
|
+
layout: (theme === null || theme === void 0 ? void 0 : (_theme$homepage_view = theme.homepage_view) === null || _theme$homepage_view === void 0 ? void 0 : (_theme$homepage_view$ = _theme$homepage_view.components) === null || _theme$homepage_view$ === void 0 ? void 0 : (_theme$homepage_view$2 = _theme$homepage_view$.layout) === null || _theme$homepage_view$2 === void 0 ? void 0 : _theme$homepage_view$2.type) || 'original',
|
|
20
22
|
// 'original', 'starbucks', 'red'
|
|
21
|
-
contentPosition: 'left' // 'left', 'right', top, 'bottom', 'center'
|
|
23
|
+
contentPosition: (theme === null || theme === void 0 ? void 0 : (_theme$homepage_view2 = theme.homepage_view) === null || _theme$homepage_view2 === void 0 ? void 0 : (_theme$homepage_view3 = _theme$homepage_view2.components) === null || _theme$homepage_view3 === void 0 ? void 0 : (_theme$homepage_view4 = _theme$homepage_view3.layout) === null || _theme$homepage_view4 === void 0 ? void 0 : _theme$homepage_view4.position) || 'left' // 'left', 'right', top, 'bottom', 'center'
|
|
22
24
|
}
|
|
23
25
|
};
|
|
24
26
|
|
|
@@ -31,7 +31,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
31
31
|
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
32
32
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
33
33
|
var OriginalHomeHero = function OriginalHomeHero(props) {
|
|
34
|
-
var _theme$images, _theme$images$general, _theme$images2, _theme$images2$logos, _theme$defaultLanguag, _theme$defaultLanguag2, _orderState$options2, _orderState$options2$, _theme$defaultLanguag3, _theme$defaultLanguag4, _theme$defaultLanguag5, _orderState$options3, _theme$defaultLanguag6, _theme$defaultLanguag7, _theme$defaultLanguag8, _theme$defaultLanguag9, _theme$defaultLanguag10;
|
|
34
|
+
var _orderingTheme$theme, _orderingTheme$theme$, _orderingTheme$theme$2, _orderingTheme$theme$3, _orderingTheme$theme$4, _orderingTheme$theme$5, _orderingTheme$theme2, _orderingTheme$theme3, _orderingTheme$theme4, _orderingTheme$theme5, _orderingTheme$theme6, _orderingTheme$theme7, _orderingTheme$theme8, _orderingTheme$theme9, _orderingTheme$theme10, _orderingTheme$theme11, _orderingTheme$theme12, _orderingTheme$theme13, _orderingTheme$theme14, _orderingTheme$theme15, _orderingTheme$theme16, _orderingTheme$theme17, _orderingTheme$theme18, _orderingTheme$theme19, _orderingTheme$theme20, _theme$images, _theme$images$general, _theme$images2, _theme$images2$genera, _theme$images3, _theme$images3$logos, _theme$defaultLanguag, _theme$defaultLanguag2, _orderState$options2, _orderState$options2$, _theme$defaultLanguag3, _theme$defaultLanguag4, _theme$defaultLanguag5, _orderState$options3, _theme$defaultLanguag6, _theme$defaultLanguag7, _theme$defaultLanguag8, _theme$defaultLanguag9, _theme$defaultLanguag10;
|
|
35
35
|
var onFindBusiness = props.onFindBusiness;
|
|
36
36
|
var _useSession = (0, _orderingComponentsExternal.useSession)(),
|
|
37
37
|
_useSession2 = _slicedToArray(_useSession, 2),
|
|
@@ -53,6 +53,9 @@ var OriginalHomeHero = function OriginalHomeHero(props) {
|
|
|
53
53
|
var theme = (0, _styledComponents.useTheme)();
|
|
54
54
|
var userCustomer = parseInt(window.localStorage.getItem('user-customer'));
|
|
55
55
|
var windowSize = (0, _useWindowSize.useWindowSize)();
|
|
56
|
+
var _useOrderingTheme = (0, _orderingComponentsExternal.useOrderingTheme)(),
|
|
57
|
+
_useOrderingTheme2 = _slicedToArray(_useOrderingTheme, 1),
|
|
58
|
+
orderingTheme = _useOrderingTheme2[0];
|
|
56
59
|
var _useState3 = (0, _react.useState)(false),
|
|
57
60
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
58
61
|
authModalOpen = _useState4[0],
|
|
@@ -61,6 +64,10 @@ var OriginalHomeHero = function OriginalHomeHero(props) {
|
|
|
61
64
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
62
65
|
modalPageToShow = _useState6[0],
|
|
63
66
|
setModalPageToShow = _useState6[1];
|
|
67
|
+
var isShowLoginAccount = !(orderingTheme !== null && orderingTheme !== void 0 && (_orderingTheme$theme = orderingTheme.theme) !== null && _orderingTheme$theme !== void 0 && (_orderingTheme$theme$ = _orderingTheme$theme.mobile_view_web) !== null && _orderingTheme$theme$ !== void 0 && (_orderingTheme$theme$2 = _orderingTheme$theme$.components) !== null && _orderingTheme$theme$2 !== void 0 && (_orderingTheme$theme$3 = _orderingTheme$theme$2.home) !== null && _orderingTheme$theme$3 !== void 0 && (_orderingTheme$theme$4 = _orderingTheme$theme$3.components) !== null && _orderingTheme$theme$4 !== void 0 && (_orderingTheme$theme$5 = _orderingTheme$theme$4.login_account) !== null && _orderingTheme$theme$5 !== void 0 && _orderingTheme$theme$5.hidden);
|
|
68
|
+
var bgImg = orderingTheme === null || orderingTheme === void 0 ? void 0 : (_orderingTheme$theme2 = orderingTheme.theme) === null || _orderingTheme$theme2 === void 0 ? void 0 : (_orderingTheme$theme3 = _orderingTheme$theme2.my_products) === null || _orderingTheme$theme3 === void 0 ? void 0 : (_orderingTheme$theme4 = _orderingTheme$theme3.components) === null || _orderingTheme$theme4 === void 0 ? void 0 : (_orderingTheme$theme5 = _orderingTheme$theme4.images) === null || _orderingTheme$theme5 === void 0 ? void 0 : (_orderingTheme$theme6 = _orderingTheme$theme5.components) === null || _orderingTheme$theme6 === void 0 ? void 0 : (_orderingTheme$theme7 = _orderingTheme$theme6.homepage_background) === null || _orderingTheme$theme7 === void 0 ? void 0 : (_orderingTheme$theme8 = _orderingTheme$theme7.components) === null || _orderingTheme$theme8 === void 0 ? void 0 : _orderingTheme$theme8.image;
|
|
69
|
+
var logo = orderingTheme === null || orderingTheme === void 0 ? void 0 : (_orderingTheme$theme9 = orderingTheme.theme) === null || _orderingTheme$theme9 === void 0 ? void 0 : (_orderingTheme$theme10 = _orderingTheme$theme9.my_products) === null || _orderingTheme$theme10 === void 0 ? void 0 : (_orderingTheme$theme11 = _orderingTheme$theme10.components) === null || _orderingTheme$theme11 === void 0 ? void 0 : (_orderingTheme$theme12 = _orderingTheme$theme11.images) === null || _orderingTheme$theme12 === void 0 ? void 0 : (_orderingTheme$theme13 = _orderingTheme$theme12.components) === null || _orderingTheme$theme13 === void 0 ? void 0 : (_orderingTheme$theme14 = _orderingTheme$theme13.logo) === null || _orderingTheme$theme14 === void 0 ? void 0 : (_orderingTheme$theme15 = _orderingTheme$theme14.components) === null || _orderingTheme$theme15 === void 0 ? void 0 : _orderingTheme$theme15.image;
|
|
70
|
+
var isFullScreen = orderingTheme === null || orderingTheme === void 0 ? void 0 : (_orderingTheme$theme16 = orderingTheme.theme) === null || _orderingTheme$theme16 === void 0 ? void 0 : (_orderingTheme$theme17 = _orderingTheme$theme16.my_products) === null || _orderingTheme$theme17 === void 0 ? void 0 : (_orderingTheme$theme18 = _orderingTheme$theme17.components) === null || _orderingTheme$theme18 === void 0 ? void 0 : (_orderingTheme$theme19 = _orderingTheme$theme18.images) === null || _orderingTheme$theme19 === void 0 ? void 0 : (_orderingTheme$theme20 = _orderingTheme$theme19.components) === null || _orderingTheme$theme20 === void 0 ? void 0 : _orderingTheme$theme20.homepage_image_fullscreen;
|
|
64
71
|
var handleFindBusinesses = function handleFindBusinesses() {
|
|
65
72
|
var _orderState$options, _orderState$options$a;
|
|
66
73
|
if (!(orderState !== null && orderState !== void 0 && (_orderState$options = orderState.options) !== null && _orderState$options !== void 0 && (_orderState$options$a = _orderState$options.address) !== null && _orderState$options$a !== void 0 && _orderState$options$a.location)) {
|
|
@@ -120,11 +127,12 @@ var OriginalHomeHero = function OriginalHomeHero(props) {
|
|
|
120
127
|
};
|
|
121
128
|
}, []);
|
|
122
129
|
return /*#__PURE__*/_react.default.createElement(_styles.HeroContainer, {
|
|
123
|
-
|
|
124
|
-
|
|
130
|
+
mb: !auth && '30vh',
|
|
131
|
+
bgimage: bgImg || (windowSize.width < 576 ? (_theme$images = theme.images) === null || _theme$images === void 0 ? void 0 : (_theme$images$general = _theme$images.general) === null || _theme$images$general === void 0 ? void 0 : _theme$images$general.homeHeroMobile : (_theme$images2 = theme.images) === null || _theme$images2 === void 0 ? void 0 : (_theme$images2$genera = _theme$images2.general) === null || _theme$images2$genera === void 0 ? void 0 : _theme$images2$genera.homeHero),
|
|
132
|
+
isFullScreen: isFullScreen
|
|
125
133
|
}, /*#__PURE__*/_react.default.createElement(_styles.ContentWrapper, null, windowSize.width < 576 && /*#__PURE__*/_react.default.createElement(_styles.LogoWrapper, null, /*#__PURE__*/_react.default.createElement("img", {
|
|
126
134
|
alt: "Logotype",
|
|
127
|
-
src: theme === null || theme === void 0 ? void 0 : (_theme$
|
|
135
|
+
src: logo || (theme === null || theme === void 0 ? void 0 : (_theme$images3 = theme.images) === null || _theme$images3 === void 0 ? void 0 : (_theme$images3$logos = _theme$images3.logos) === null || _theme$images3$logos === void 0 ? void 0 : _theme$images3$logos.logotypeInvert),
|
|
128
136
|
loading: "lazy"
|
|
129
137
|
})), /*#__PURE__*/_react.default.createElement(_styles.HeroContent, null, /*#__PURE__*/_react.default.createElement(_styles.Title, null, t('TITLE_HOME', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag = theme.defaultLanguages) === null || _theme$defaultLanguag === void 0 ? void 0 : _theme$defaultLanguag.TITLE_HOME) || 'All We need is Food.')), /*#__PURE__*/_react.default.createElement(_styles.Slogan, null, t('SUBTITLE_HOME', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag2 = theme.defaultLanguages) === null || _theme$defaultLanguag2 === void 0 ? void 0 : _theme$defaultLanguag2.SUBTITLE_HOME) || 'Let\'s start to order food now')), /*#__PURE__*/_react.default.createElement(_styles.WrapInput, {
|
|
130
138
|
onClick: handleAddressInput,
|
|
@@ -133,17 +141,17 @@ var OriginalHomeHero = function OriginalHomeHero(props) {
|
|
|
133
141
|
color: "primary",
|
|
134
142
|
name: "find-business",
|
|
135
143
|
onClick: handleFindBusinesses
|
|
136
|
-
}, t('FIND_BUSINESSES', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag4 = theme.defaultLanguages) === null || _theme$defaultLanguag4 === void 0 ? void 0 : _theme$defaultLanguag4.FIND_BUSINESSES) || 'Find businesses')))), windowSize.width < 576 && !auth && /*#__PURE__*/_react.default.createElement(_styles.UseAccount, null, /*#__PURE__*/_react.default.createElement(_styles.SectionHeader, null, t('YOUR_ACCOUNT', 'Use your account')), /*#__PURE__*/_react.default.createElement(_Buttons.Button, {
|
|
144
|
+
}, t('FIND_BUSINESSES', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag4 = theme.defaultLanguages) === null || _theme$defaultLanguag4 === void 0 ? void 0 : _theme$defaultLanguag4.FIND_BUSINESSES) || 'Find businesses')))), windowSize.width < 576 && !auth && isShowLoginAccount && /*#__PURE__*/_react.default.createElement(_styles.UseAccount, null, /*#__PURE__*/_react.default.createElement(_styles.SectionHeader, null, t('YOUR_ACCOUNT', 'Use your account')), /*#__PURE__*/_react.default.createElement(_Buttons.Button, {
|
|
137
145
|
color: "primary",
|
|
138
146
|
onClick: function onClick() {
|
|
139
147
|
return handleOpenLoginSignUp('login');
|
|
140
148
|
}
|
|
141
|
-
},
|
|
149
|
+
}, t('LOGIN', 'login')), /*#__PURE__*/_react.default.createElement(_Buttons.Button, {
|
|
142
150
|
color: "primary",
|
|
143
151
|
onClick: function onClick() {
|
|
144
152
|
return handleOpenLoginSignUp('signup');
|
|
145
153
|
}
|
|
146
|
-
},
|
|
154
|
+
}, t('SIGNUP', 'signUp'))), /*#__PURE__*/_react.default.createElement(_Modal.Modal, {
|
|
147
155
|
title: t('WHERE_DO_WE_DELIVERY', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag5 = theme.defaultLanguages) === null || _theme$defaultLanguag5 === void 0 ? void 0 : _theme$defaultLanguag5.WHERE_DO_WE_DELIVERY) || 'Where do we delivery?'),
|
|
148
156
|
open: modals.formOpen,
|
|
149
157
|
onClose: function onClose() {
|
|
@@ -7,18 +7,21 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.WrapInput = exports.UseAccount = exports.Title = exports.Slogan = exports.SectionHeader = exports.LogoWrapper = exports.HeroContent = exports.HeroContainerStyled = exports.HeroContainer = exports.ContentWrapper = 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;
|
|
10
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21;
|
|
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 }; }
|
|
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 HeroContainerStyled = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 100%;\n height: fit-content;\n height: 374px;\n position:relative;\n ", "\n\n\n ", "\n\n @media (min-width: 375px) {\n height: 374px;\n }\n\n @media (min-width: 567px) {\n height: calc(100vh - 65px);\n margin-bottom: 0;\n }\n"])), function (_ref) {
|
|
16
|
+
var HeroContainerStyled = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 100%;\n height: fit-content;\n height: 374px;\n position:relative;\n ", "\n\n\n ", "\n\n @media (min-width: 375px) {\n height: 374px;\n }\n\n @media (min-width: 567px) {\n height: calc(100vh - 65px);\n ", "\n margin-bottom: 0;\n }\n"])), function (_ref) {
|
|
17
17
|
var mb = _ref.mb;
|
|
18
18
|
return mb && (0, _styledComponents.css)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n margin-bottom: ", ";\n "])), mb);
|
|
19
19
|
}, function (_ref2) {
|
|
20
20
|
var bgimage = _ref2.bgimage;
|
|
21
21
|
return bgimage && (0, _styledComponents.css)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n background-repeat: no-repeat, repeat;\n background-size: cover;\n object-fit: cover;\n background-position: center;\n "])));
|
|
22
|
+
}, function (_ref3) {
|
|
23
|
+
var isFullScreen = _ref3.isFullScreen;
|
|
24
|
+
return !isFullScreen && (0, _styledComponents.css)(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n height: calc(60vh - 65px);\n "])));
|
|
22
25
|
});
|
|
23
26
|
exports.HeroContainerStyled = HeroContainerStyled;
|
|
24
27
|
var HeroContainer = function HeroContainer(props) {
|
|
@@ -33,26 +36,26 @@ var HeroContainer = function HeroContainer(props) {
|
|
|
33
36
|
}), props.children);
|
|
34
37
|
};
|
|
35
38
|
exports.HeroContainer = HeroContainer;
|
|
36
|
-
var ContentWrapper = _styledComponents.default.div(
|
|
39
|
+
var ContentWrapper = _styledComponents.default.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n justify-content: space-around;\n height: 100%;\n padding: 0px 10vw 0px;\n background-color: #0000004D;\n\n input {\n width: 90%;\n margin-bottom: 15px;\n }\n\n @media (min-width: 576px) {\n justify-content: center;\n padding: 0px 40px 0px;\n input {\n width: 97%;\n }\n }\n\n @media (min-width: 768px) {\n ", "\n }\n"])), function (props) {
|
|
37
40
|
var _props$theme;
|
|
38
|
-
return ((_props$theme = props.theme) === null || _props$theme === void 0 ? void 0 : _props$theme.rtl) && (0, _styledComponents.css)(
|
|
41
|
+
return ((_props$theme = props.theme) === null || _props$theme === void 0 ? void 0 : _props$theme.rtl) && (0, _styledComponents.css)(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n padding: 0px 40px 0px;\n "])));
|
|
39
42
|
});
|
|
40
43
|
exports.ContentWrapper = ContentWrapper;
|
|
41
|
-
var Title = _styledComponents.default.h1(
|
|
44
|
+
var Title = _styledComponents.default.h1(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n margin: 0px;\n text-align: left;\n font-weight: 600;\n font-size: 30px;\n line-height: 36px;\n letter-spacing: 0px;\n color: #FFFFFF;\n text-shadow: 0px 3px 6px #2c2e33;\n opacity: 1;\n\n ", "\n\n @media (min-width: 381px) {\n font-size: 35px;\n }\n\n\n @media (min-width: 576px) {\n font-size: 40px;\n line-height: initial;\n }\n\n @media (min-width: 850px) {\n font-size: 72px;\n }\n"])), function (props) {
|
|
42
45
|
var _props$theme2;
|
|
43
|
-
return ((_props$theme2 = props.theme) === null || _props$theme2 === void 0 ? void 0 : _props$theme2.rtl) && (0, _styledComponents.css)(
|
|
46
|
+
return ((_props$theme2 = props.theme) === null || _props$theme2 === void 0 ? void 0 : _props$theme2.rtl) && (0, _styledComponents.css)(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n text-align: right;\n "])));
|
|
44
47
|
});
|
|
45
48
|
exports.Title = Title;
|
|
46
|
-
var Slogan = _styledComponents.default.p(
|
|
49
|
+
var Slogan = _styledComponents.default.p(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n margin: 0px;\n text-align: left;\n font-size: .96rem;\n line-height: 24px;\n letter-spacing: 0px;\n color: #FFFFFF;\n opacity: 1;\n text-shadow: 0px 3px 6px #2c2e33;\n margin-bottom: 30px;\n\n ", "\n\n @media (min-width: 480px) {\n font-size: 24px;\n line-height: initial;\n margin-bottom: 37px;\n }\n"])), function (props) {
|
|
47
50
|
var _props$theme3;
|
|
48
|
-
return ((_props$theme3 = props.theme) === null || _props$theme3 === void 0 ? void 0 : _props$theme3.rtl) && (0, _styledComponents.css)(
|
|
51
|
+
return ((_props$theme3 = props.theme) === null || _props$theme3 === void 0 ? void 0 : _props$theme3.rtl) && (0, _styledComponents.css)(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n text-align: right;\n "])));
|
|
49
52
|
});
|
|
50
53
|
exports.Slogan = Slogan;
|
|
51
|
-
var WrapInput = _styledComponents.default.div(
|
|
52
|
-
var withIcon =
|
|
53
|
-
return withIcon && (0, _styledComponents.css)(
|
|
54
|
+
var WrapInput = _styledComponents.default.div(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n position: relative;\n cursor: pointer;\n background: #FFFFFF;\n padding: 8px 16px;\n border: 1px solid #DEE2E6;\n box-sizing: border-box;\n box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.12);\n border-radius: 50px;\n display: flex;\n align-items: center;\n margin-bottom: 22px;\n\n ", "\n\n p{\n color: ", ";\n position: relative;\n margin: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 12px;\n line-height: 18px;\n @media (min-width: 576px) {\n font-size: 1rem;\n line-height: initial;\n }\n }\n\n svg {\n color: ", ";\n font-size: 22px;\n ", "\n\n @media (min-width: 576px) {\n ", "\n }\n }\n"])), function (_ref4) {
|
|
55
|
+
var withIcon = _ref4.withIcon;
|
|
56
|
+
return withIcon && (0, _styledComponents.css)(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n width: calc(100% - 20px);\n box-sizing: border-box;\n\n &::before {\n content: \"\";\n position: absolute;\n right: 5px;\n top: 0;\n bottom: 18px;\n width: 15px;\n\n ", "\n }\n\n @media (min-width: 576px) {\n padding: 10px 25px;\n margin-bottom: 27px;\n }\n\n @media (min-width: 1024px) {\n width: calc(50% - 20px);\n }\n "])), function (props) {
|
|
54
57
|
var _props$theme4;
|
|
55
|
-
return ((_props$theme4 = props.theme) === null || _props$theme4 === void 0 ? void 0 : _props$theme4.rtl) && (0, _styledComponents.css)(
|
|
58
|
+
return ((_props$theme4 = props.theme) === null || _props$theme4 === void 0 ? void 0 : _props$theme4.rtl) && (0, _styledComponents.css)(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n left: 5px;\n right: initial;\n "])));
|
|
56
59
|
});
|
|
57
60
|
}, function (props) {
|
|
58
61
|
return props.theme.colors.darkTextColor;
|
|
@@ -60,19 +63,19 @@ var WrapInput = _styledComponents.default.div(_templateObject10 || (_templateObj
|
|
|
60
63
|
return props.theme.colors.primary;
|
|
61
64
|
}, function (props) {
|
|
62
65
|
var _props$theme5;
|
|
63
|
-
return (_props$theme5 = props.theme) !== null && _props$theme5 !== void 0 && _props$theme5.rtl ? (0, _styledComponents.css)(
|
|
66
|
+
return (_props$theme5 = props.theme) !== null && _props$theme5 !== void 0 && _props$theme5.rtl ? (0, _styledComponents.css)(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n margin-left: 12px;\n "]))) : (0, _styledComponents.css)(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n margin-right: 12px;\n "])));
|
|
64
67
|
}, function (props) {
|
|
65
68
|
var _props$theme6;
|
|
66
|
-
return (_props$theme6 = props.theme) !== null && _props$theme6 !== void 0 && _props$theme6.rtl ? (0, _styledComponents.css)(
|
|
69
|
+
return (_props$theme6 = props.theme) !== null && _props$theme6 !== void 0 && _props$theme6.rtl ? (0, _styledComponents.css)(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n margin-left: 20px;\n "]))) : (0, _styledComponents.css)(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n margin-right: 20px;\n "])));
|
|
67
70
|
});
|
|
68
71
|
exports.WrapInput = WrapInput;
|
|
69
|
-
var UseAccount = _styledComponents.default.div(
|
|
72
|
+
var UseAccount = _styledComponents.default.div(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["\n position: absolute;\n left: 0;\n width: 100%;\n min-height: 30vh;\n padding: 10vw;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n\n > button {\n width: 100%;\n padding-top: 10px;\n padding-bottom: 10px;\n font-size: 14px;\n line-height: 24px;\n }\n\n > *:last-child {\n margin-top: 14px;\n background-color: #E9F2FE;\n color: ", ";\n }\n\n @media (min-width: 576px) {\n display: none;\n }\n"])), function (props) {
|
|
70
73
|
return props.theme.colors.primary;
|
|
71
74
|
});
|
|
72
75
|
exports.UseAccount = UseAccount;
|
|
73
|
-
var SectionHeader = _styledComponents.default.div(
|
|
76
|
+
var SectionHeader = _styledComponents.default.div(_templateObject19 || (_templateObject19 = _taggedTemplateLiteral(["\n font-size: 24px;\n font-weight: 600;\n line-height: 30px;\n color: #344050;\n margin: 0;\n margin-bottom: 27px;\n width: 100%;\n"])));
|
|
74
77
|
exports.SectionHeader = SectionHeader;
|
|
75
|
-
var LogoWrapper = _styledComponents.default.div(
|
|
78
|
+
var LogoWrapper = _styledComponents.default.div(_templateObject20 || (_templateObject20 = _taggedTemplateLiteral(["\n width: 150px;\n margin: 53px auto;\n display: flex;\n justify-content: center;\n img {\n width: 100%;\n object-fit: fill;\n }\n"])));
|
|
76
79
|
exports.LogoWrapper = LogoWrapper;
|
|
77
|
-
var HeroContent = _styledComponents.default.div(
|
|
80
|
+
var HeroContent = _styledComponents.default.div(_templateObject21 || (_templateObject21 = _taggedTemplateLiteral(["\n button{\n font-size: 12px;\n line-height: 18px;\n padding: 10px 16px;\n margin-bottom: 45px;\n white-space: nowrap;\n\n @media (min-width: 576px) {\n padding-top: 5px;\n padding-bottom: 5px;\n font-size: 18px;\n width: 180px;\n line-height: initial;\n }\n }\n"])));
|
|
78
81
|
exports.HeroContent = HeroContent;
|
|
@@ -66,7 +66,7 @@ var CreditCard2 = function CreditCard2() {
|
|
|
66
66
|
}));
|
|
67
67
|
};
|
|
68
68
|
var MultiCartsPaymethodsAndWalletsUI = function MultiCartsPaymethodsAndWalletsUI(props) {
|
|
69
|
-
var _configs$wallet_cash_, _configs$wallet_credi, _paymethodSelected$pa, _paymethodSelected$pa2, _paymethodSelected$pa3, _paymethodSelected$pa4, _paymethodSelected$pa5, _paymethodSelected$pa6, _paymethodSelected$pa7, _paymethodSelected$pa8, _paymethodSelected$pa9, _paymethodSelected$pa10;
|
|
69
|
+
var _configs$wallet_cash_, _configs$wallet_credi, _paymethodSelected$pa, _paymethodSelected$pa2, _paymethodSelected$pa3, _paymethodSelected$pa4, _paymethodSelected$pa5, _paymethodSelected$pa6, _paymethodSelected$pa7, _paymethodSelected$pa8, _paymethodSelected$pa9, _paymethodSelected$pa10, _walletsState$result;
|
|
70
70
|
var businessIds = props.businessIds,
|
|
71
71
|
paymethodsAndWallets = props.paymethodsAndWallets,
|
|
72
72
|
walletsState = props.walletsState,
|
|
@@ -144,7 +144,7 @@ var MultiCartsPaymethodsAndWalletsUI = function MultiCartsPaymethodsAndWalletsUI
|
|
|
144
144
|
marginBottom: '20px'
|
|
145
145
|
}
|
|
146
146
|
}));
|
|
147
|
-
})) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, walletsState.result.filter(function (wallet) {
|
|
147
|
+
})) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, walletsState === null || walletsState === void 0 ? void 0 : (_walletsState$result = walletsState.result) === null || _walletsState$result === void 0 ? void 0 : _walletsState$result.filter(function (wallet) {
|
|
148
148
|
return paymethodsAndWallets.wallets.find(function (item) {
|
|
149
149
|
return item.type === wallet.type;
|
|
150
150
|
});
|
|
@@ -49,7 +49,7 @@ var SingleOrderContainer = _styledComponents.default.div(_templateObject14 || (_
|
|
|
49
49
|
return (_props$theme3 = props.theme) !== null && _props$theme3 !== void 0 && _props$theme3.rtl ? (0, _styledComponents.css)(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n text-align: left;\n "]))) : (0, _styledComponents.css)(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n text-align: right;\n "])));
|
|
50
50
|
});
|
|
51
51
|
exports.SingleOrderContainer = SingleOrderContainer;
|
|
52
|
-
var SingleOrderHeader = _styledComponents.default.div(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n flex-direction: column;\n\n > div {\n > div {\n display: flex;\n align-items: center;\n p {\n line-height: 24px;\n font-size: 14px;\n margin: 3px 0;\n &.date {\n margin: 0 5px;\n }\n }\n }\n }\n\n button {\n height: 43px;\n }\n\n @media (min-width: 576px) {\n flex-direction: row;\n }\n"])));
|
|
52
|
+
var SingleOrderHeader = _styledComponents.default.div(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n flex-direction: column;\n\n > div {\n > div {\n display: flex;\n flex-direction: column;\n align-items: center; \n @media (min-width: 769px) {\n flex-direction: row;\n }\n p {\n line-height: 24px;\n font-size: 14px;\n margin: 3px 0;\n &.date {\n margin: 0 5px;\n }\n }\n }\n }\n\n button {\n height: 43px;\n }\n\n @media (min-width: 576px) {\n flex-direction: row;\n }\n"])));
|
|
53
53
|
exports.SingleOrderHeader = SingleOrderHeader;
|
|
54
54
|
var OrderBusinessDetails = _styledComponents.default.div(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: space-between;\n margin: 50px 0;\n"])));
|
|
55
55
|
exports.OrderBusinessDetails = OrderBusinessDetails;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.OrderActionsSection = void 0;
|
|
7
|
+
var _orderingComponentsExternal = require("ordering-components-external");
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _styledComponents = require("styled-components");
|
|
10
|
+
var _Buttons = require("../../styles/Buttons");
|
|
11
|
+
var _styles = require("./styles");
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
14
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
15
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
16
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
17
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
18
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
19
|
+
var OrderActionsSection = function OrderActionsSection(props) {
|
|
20
|
+
var _theme$defaultLanguag;
|
|
21
|
+
var userCustomerId = props.userCustomerId,
|
|
22
|
+
isService = props.isService,
|
|
23
|
+
handleGoToPage = props.handleGoToPage;
|
|
24
|
+
var _useLanguage = (0, _orderingComponentsExternal.useLanguage)(),
|
|
25
|
+
_useLanguage2 = _slicedToArray(_useLanguage, 2),
|
|
26
|
+
t = _useLanguage2[1];
|
|
27
|
+
var theme = (0, _styledComponents.useTheme)();
|
|
28
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, !userCustomerId && /*#__PURE__*/_react.default.createElement(_styles.MyOrderActions, null, /*#__PURE__*/_react.default.createElement(_Buttons.Button, {
|
|
29
|
+
color: "primary",
|
|
30
|
+
outline: true,
|
|
31
|
+
onClick: function onClick() {
|
|
32
|
+
return handleGoToPage({
|
|
33
|
+
page: 'orders'
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
}, isService ? t('YOUR_APPOINTMENTS', 'Your appointments') : t('YOUR_ORDERS', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag = theme.defaultLanguages) === null || _theme$defaultLanguag === void 0 ? void 0 : _theme$defaultLanguag.YOUR_ORDERS) || 'Your Orders'))));
|
|
37
|
+
};
|
|
38
|
+
exports.OrderActionsSection = OrderActionsSection;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.OrderHeaderInfoSection = void 0;
|
|
7
|
+
var _orderingComponentsExternal = require("ordering-components-external");
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _styledComponents = require("styled-components");
|
|
10
|
+
var _styles = require("./styles");
|
|
11
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
13
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
14
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
15
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
16
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
17
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
18
|
+
var OrderHeaderInfoSection = function OrderHeaderInfoSection(props) {
|
|
19
|
+
var _theme$defaultLanguag, _theme$defaultLanguag2;
|
|
20
|
+
var isService = props.isService;
|
|
21
|
+
var _useLanguage = (0, _orderingComponentsExternal.useLanguage)(),
|
|
22
|
+
_useLanguage2 = _slicedToArray(_useLanguage, 2),
|
|
23
|
+
t = _useLanguage2[1];
|
|
24
|
+
var theme = (0, _styledComponents.useTheme)();
|
|
25
|
+
return /*#__PURE__*/_react.default.createElement(_styles.HeaderInfo, null, /*#__PURE__*/_react.default.createElement("h1", null, isService ? t('SERVICES', 'Services') : t('ORDER_MESSAGE_RECEIVED', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag = theme.defaultLanguages) === null || _theme$defaultLanguag === void 0 ? void 0 : _theme$defaultLanguag.ORDER_MESSAGE_RECEIVED) || 'Your order has been received')), /*#__PURE__*/_react.default.createElement("p", null, !isService && t('ORDER_MESSAGE_HEADER_TEXT', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag2 = theme.defaultLanguages) === null || _theme$defaultLanguag2 === void 0 ? void 0 : _theme$defaultLanguag2.ORDER_MESSAGE_HEADER_TEXT) || 'Once business accepts your order, we will send you an email, thank you!')));
|
|
26
|
+
};
|
|
27
|
+
exports.OrderHeaderInfoSection = OrderHeaderInfoSection;
|