ordering-ui-external 1.6.0 → 1.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_bundles/{0.ordering-ui.ff76ec87ed271a678f9d.js → 0.ordering-ui.9399c2752e3ad5f2250b.js} +1 -1
- package/_bundles/{1.ordering-ui.ff76ec87ed271a678f9d.js → 1.ordering-ui.9399c2752e3ad5f2250b.js} +1 -1
- package/_bundles/{2.ordering-ui.ff76ec87ed271a678f9d.js → 2.ordering-ui.9399c2752e3ad5f2250b.js} +1 -1
- package/_bundles/{4.ordering-ui.ff76ec87ed271a678f9d.js → 4.ordering-ui.9399c2752e3ad5f2250b.js} +1 -1
- package/_bundles/{5.ordering-ui.ff76ec87ed271a678f9d.js → 5.ordering-ui.9399c2752e3ad5f2250b.js} +1 -1
- package/_bundles/{6.ordering-ui.ff76ec87ed271a678f9d.js → 6.ordering-ui.9399c2752e3ad5f2250b.js} +1 -1
- package/_bundles/7.ordering-ui.9399c2752e3ad5f2250b.js +2 -0
- package/_bundles/{7.ordering-ui.ff76ec87ed271a678f9d.js.LICENSE.txt → 7.ordering-ui.9399c2752e3ad5f2250b.js.LICENSE.txt} +18 -0
- package/_bundles/{8.ordering-ui.ff76ec87ed271a678f9d.js → 8.ordering-ui.9399c2752e3ad5f2250b.js} +1 -1
- package/_bundles/{9.ordering-ui.ff76ec87ed271a678f9d.js → 9.ordering-ui.9399c2752e3ad5f2250b.js} +1 -1
- package/_bundles/ordering-ui.9399c2752e3ad5f2250b.js +2 -0
- package/_bundles/{ordering-ui.ff76ec87ed271a678f9d.js.LICENSE.txt → ordering-ui.9399c2752e3ad5f2250b.js.LICENSE.txt} +0 -0
- package/_modules/themes/five/src/components/BusinessProductsCategories/layouts/groceries/styles.js +2 -2
- 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/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/OrderDetails/index.js +1 -1
- package/_modules/themes/five/src/components/RenderProductsLayout/index.js +7 -0
- package/index-template.js +2 -0
- package/package.json +2 -2
- package/src/themes/five/src/components/BusinessProductsCategories/layouts/groceries/styles.js +6 -1
- package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +1 -1
- 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/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/OrderDetails/index.js +1 -1
- package/src/themes/five/src/components/RenderProductsLayout/index.js +10 -1
- package/template/app.js +9 -3
- package/template/assets/images/home-hero-mobile.jpg +0 -0
- package/template/components/HelmetTags/index.js +4 -2
- package/template/components/SubdomainComponent/index.js +16 -9
- package/template/pages/Home/index.js +5 -3
- package/_bundles/7.ordering-ui.ff76ec87ed271a678f9d.js +0 -2
- package/_bundles/ordering-ui.ff76ec87ed271a678f9d.js +0 -2
|
File without changes
|
package/_modules/themes/five/src/components/BusinessProductsCategories/layouts/groceries/styles.js
CHANGED
|
@@ -12,13 +12,13 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
12
12
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
13
13
|
var CategoriesWrap = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n width: 100%;\n @media (min-width: 933px){\n width: calc(100% - 40px);\n }\n"])));
|
|
14
14
|
exports.CategoriesWrap = CategoriesWrap;
|
|
15
|
-
var CategoriesContainer = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n overflow-x: auto;\n padding: 5px;\n padding-bottom: 0;\n background: ", ";\n z-index: 1000;\n
|
|
15
|
+
var CategoriesContainer = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n overflow-x: auto;\n padding: 5px;\n padding-bottom: 0;\n background: ", ";\n z-index: 1000;\n text-align: center;\n width: 100%;\n top: 45px;\n position: sticky;\n\n div.category {\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n }\n\n div.special{\n ", "\n }\n\n @media (min-width: 381px) {\n padding: 15px 15px 0 0;\n }\n"])), function (props) {
|
|
16
16
|
return props.theme.colors.backgroundPage;
|
|
17
17
|
}, function (props) {
|
|
18
18
|
return !props.featured && (0, _styledComponents.css)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: none;\n "])));
|
|
19
19
|
});
|
|
20
20
|
exports.CategoriesContainer = CategoriesContainer;
|
|
21
|
-
var CategoryTab = _styledComponents.default.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n padding: 10px 15px;\n cursor: pointer;\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-left: ", "px;\n border-radius: 8px;\n text-align: left;\n\n span {\n width: 90%;\n }\n\n ", "\n"])), function (props) {
|
|
21
|
+
var CategoryTab = _styledComponents.default.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n padding: 10px 15px;\n cursor: pointer;\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-left: ", "px;\n border-radius: 8px;\n text-align: left;\n\n span {\n width: 90%;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n }\n\n ", "\n"])), function (props) {
|
|
22
22
|
var _props$categorySpace;
|
|
23
23
|
return (_props$categorySpace = props.categorySpace) !== null && _props$categorySpace !== void 0 ? _props$categorySpace : 0;
|
|
24
24
|
}, function (_ref) {
|
|
@@ -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",
|
|
@@ -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
|
});
|
|
@@ -706,7 +706,7 @@ var OrderDetailsUI = function OrderDetailsUI(props) {
|
|
|
706
706
|
onClick: function onClick() {
|
|
707
707
|
return handleChangeOrderStatus(20);
|
|
708
708
|
},
|
|
709
|
-
disabled: (order === null || order === void 0 ? void 0 : order.status) === 20
|
|
709
|
+
disabled: (order === null || order === void 0 ? void 0 : order.status) === 20 || (order === null || order === void 0 ? void 0 : order.status) === 21
|
|
710
710
|
}, (_getOrderStatus3 = getOrderStatus(20)) === null || _getOrderStatus3 === void 0 ? void 0 : _getOrderStatus3.value)), /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_Buttons.Button, {
|
|
711
711
|
style: {
|
|
712
712
|
fontSize: 14
|
|
@@ -115,6 +115,13 @@ var RenderProductsLayout = function RenderProductsLayout(props) {
|
|
|
115
115
|
var hideBusinessNearCity = (_theme$business_view$ = theme === null || theme === void 0 ? void 0 : (_theme$business_view = theme.business_view) === null || _theme$business_view === void 0 ? void 0 : (_theme$business_view$2 = _theme$business_view.components) === null || _theme$business_view$2 === void 0 ? void 0 : (_theme$business_view$3 = _theme$business_view$2.near_business) === null || _theme$business_view$3 === void 0 ? void 0 : _theme$business_view$3.hidden) !== null && _theme$business_view$ !== void 0 ? _theme$business_view$ : true;
|
|
116
116
|
var BusinessLayoutCategories = businessLayout.layoutOne ? _groceries.BusinessProductsCategories : _BusinessProductsCategories.BusinessProductsCategories;
|
|
117
117
|
var BusinessLayoutProductsList = businessLayout.layoutOne ? _groceries2.BusinessProductsList : _BusinessProductsList.BusinessProductsList;
|
|
118
|
+
var handleSaveProduct = function handleSaveProduct() {
|
|
119
|
+
var productContainer = document.getElementsByClassName('bp-list')[0];
|
|
120
|
+
scrollTo(productContainer, 500, 1250);
|
|
121
|
+
};
|
|
122
|
+
(0, _react.useEffect)(function () {
|
|
123
|
+
handleSaveProduct();
|
|
124
|
+
}, [categorySelected]);
|
|
118
125
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, !isLoading && (business === null || business === void 0 ? void 0 : business.id) && /*#__PURE__*/_react.default.createElement(_styles.WrappLayout, {
|
|
119
126
|
isCartOnProductsList: isCartOnProductsList
|
|
120
127
|
}, !hideBusinessNearCity && !useKioskApp && /*#__PURE__*/_react.default.createElement(_styles.NearBusiness, null, /*#__PURE__*/_react.default.createElement(_BusinessesListing.BusinessesListing, {
|
package/index-template.js
CHANGED
|
@@ -19,6 +19,7 @@ import isotype from './template/assets/images/isotype.svg'
|
|
|
19
19
|
import isotypeInvert from './template/assets/images/isotype-invert.svg'
|
|
20
20
|
|
|
21
21
|
import homeHero from './template/assets/images/home-hero.jpg'
|
|
22
|
+
import homeHeroMobile from './template/assets/images/home-hero-mobile.jpg'
|
|
22
23
|
import businessHero from './template/assets/images/business-hero.jpg'
|
|
23
24
|
import notFound from './template/assets/images/not-found.svg'
|
|
24
25
|
import notNetwork from './template/assets/images/not-network.svg'
|
|
@@ -113,6 +114,7 @@ theme.images = {
|
|
|
113
114
|
logos,
|
|
114
115
|
general: {
|
|
115
116
|
homeHero,
|
|
117
|
+
homeHeroMobile,
|
|
116
118
|
businessHero,
|
|
117
119
|
notFound,
|
|
118
120
|
notFound404,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ordering-ui-external",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.2",
|
|
4
4
|
"description": "Ordering UI Components",
|
|
5
5
|
"main": "./_modules/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
"libphonenumber-js": "^1.9.4",
|
|
86
86
|
"lodash": "^4.17.19",
|
|
87
87
|
"moment": "^2.29.4",
|
|
88
|
-
"ordering-components-external": "1.5.
|
|
88
|
+
"ordering-components-external": "1.5.1",
|
|
89
89
|
"polished": "^3.6.6",
|
|
90
90
|
"react-bootstrap-icons": "^1.7.2",
|
|
91
91
|
"react-calendar": "^3.3.1",
|
package/src/themes/five/src/components/BusinessProductsCategories/layouts/groceries/styles.js
CHANGED
|
@@ -16,9 +16,11 @@ export const CategoriesContainer = styled.div`
|
|
|
16
16
|
padding-bottom: 0;
|
|
17
17
|
background: ${props => props.theme.colors.backgroundPage};
|
|
18
18
|
z-index: 1000;
|
|
19
|
-
top: 0;
|
|
20
19
|
text-align: center;
|
|
21
20
|
width: 100%;
|
|
21
|
+
top: 45px;
|
|
22
|
+
position: sticky;
|
|
23
|
+
|
|
22
24
|
div.category {
|
|
23
25
|
text-overflow: ellipsis;
|
|
24
26
|
white-space: nowrap;
|
|
@@ -48,6 +50,9 @@ export const CategoryTab = styled.div`
|
|
|
48
50
|
|
|
49
51
|
span {
|
|
50
52
|
width: 90%;
|
|
53
|
+
text-overflow: ellipsis;
|
|
54
|
+
white-space: nowrap;
|
|
55
|
+
overflow: hidden;
|
|
51
56
|
}
|
|
52
57
|
|
|
53
58
|
${({ active }) => active && css`
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import React, { useState, useEffect } from 'react'
|
|
2
|
-
import { useApi } from 'ordering-components-external'
|
|
2
|
+
import { useApi, useOrderingTheme } from 'ordering-components-external'
|
|
3
3
|
|
|
4
4
|
import { Container } from './styles'
|
|
5
5
|
|
|
6
6
|
export const Footer = () => {
|
|
7
7
|
const [footerState, setfooterState] = useState({ body: null, loading: false, error: null })
|
|
8
8
|
const [ordering] = useApi()
|
|
9
|
+
const [{ theme }] = useOrderingTheme()
|
|
9
10
|
const requestsState = {}
|
|
10
11
|
|
|
12
|
+
const footerContent = theme?.my_products?.components?.theme_settings?.components?.values?.footer_content
|
|
13
|
+
|
|
11
14
|
const getPage = async () => {
|
|
12
15
|
setfooterState({ ...footerState, loading: true })
|
|
13
16
|
try {
|
|
@@ -39,11 +42,11 @@ export const Footer = () => {
|
|
|
39
42
|
return (
|
|
40
43
|
<Container>
|
|
41
44
|
{
|
|
42
|
-
footerState.body && (
|
|
45
|
+
(footerContent || footerState.body) && (
|
|
43
46
|
<div
|
|
44
47
|
style={{ wordBreak: 'break-all', padding: '0px 10px' }}
|
|
45
48
|
dangerouslySetInnerHTML={{
|
|
46
|
-
__html: footerState.body
|
|
49
|
+
__html: (footerContent || footerState.body)
|
|
47
50
|
}}
|
|
48
51
|
/>
|
|
49
52
|
)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
import React, { useState, useEffect, useRef } from 'react'
|
|
3
3
|
import { useLocation } from 'react-router-dom'
|
|
4
|
-
import { useSession, useLanguage, useOrder, useEvent, useConfig, useCustomer, useUtils } from 'ordering-components-external'
|
|
4
|
+
import { useSession, useLanguage, useOrder, useEvent, useConfig, useCustomer, useUtils, useOrderingTheme } from 'ordering-components-external'
|
|
5
5
|
import { useTheme } from 'styled-components'
|
|
6
6
|
import AiOutlineClose from '@meronex/icons/ai/AiOutlineClose'
|
|
7
7
|
import { LanguageSelector } from '../LanguageSelector'
|
|
@@ -67,6 +67,7 @@ export const Header = (props) => {
|
|
|
67
67
|
const theme = useTheme()
|
|
68
68
|
const [configState] = useConfig()
|
|
69
69
|
const [customerState, { deleteUserCustomer }] = useCustomer()
|
|
70
|
+
const [{ theme: orderingTheme }] = useOrderingTheme()
|
|
70
71
|
|
|
71
72
|
const clearCustomer = useRef(null)
|
|
72
73
|
const [modalIsOpen, setModalIsOpen] = useState(false)
|
|
@@ -222,8 +223,8 @@ export const Header = (props) => {
|
|
|
222
223
|
<LogoHeader
|
|
223
224
|
onClick={() => handleGoToPage({ page: orderState?.options?.address?.location && !isCustomerMode ? 'search' : 'home' })}
|
|
224
225
|
>
|
|
225
|
-
<img alt='Logotype' width='170px' height='45px' src={theme?.images?.logos?.logotype} loading='lazy' />
|
|
226
|
-
<img alt='Isotype' width='35px' height='45px' src={isHome ? theme?.images?.logos?.isotypeInvert : theme?.images?.logos?.isotype} loading='lazy' />
|
|
226
|
+
<img alt='Logotype' width='170px' height='45px' src={orderingTheme?.my_products?.components?.images?.components?.logo?.components?.image || theme?.images?.logos?.logotype} loading='lazy' />
|
|
227
|
+
<img alt='Isotype' width='35px' height='45px' src={orderingTheme?.my_products?.components?.images?.components?.logo?.components?.image || (isHome ? theme?.images?.logos?.isotypeInvert : theme?.images?.logos?.isotype)} loading='lazy' />
|
|
227
228
|
</LogoHeader>
|
|
228
229
|
</LeftHeader>
|
|
229
230
|
{isShowOrderOptions && !props.isCustomLayout && (
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useState, useEffect } from 'react'
|
|
2
2
|
import { useTheme } from 'styled-components'
|
|
3
|
-
import { useSession, useOrder, useLanguage } from 'ordering-components-external'
|
|
3
|
+
import { useSession, useOrder, useLanguage, useOrderingTheme } from 'ordering-components-external'
|
|
4
4
|
import HiOutlineLocationMarker from '@meronex/icons/hi/HiOutlineLocationMarker'
|
|
5
5
|
import {
|
|
6
6
|
HeroContainer,
|
|
@@ -33,9 +33,15 @@ export const OriginalHomeHero = (props) => {
|
|
|
33
33
|
const theme = useTheme()
|
|
34
34
|
const userCustomer = parseInt(window.localStorage.getItem('user-customer'))
|
|
35
35
|
const windowSize = useWindowSize()
|
|
36
|
+
const [orderingTheme] = useOrderingTheme()
|
|
36
37
|
const [authModalOpen, setAuthModalOpen] = useState(false)
|
|
37
38
|
const [modalPageToShow, setModalPageToShow] = useState(null)
|
|
38
39
|
|
|
40
|
+
const isShowLoginAccount = !orderingTheme?.theme?.mobile_view_web?.components?.home?.components?.login_account?.hidden
|
|
41
|
+
const bgImg = orderingTheme?.theme?.my_products?.components?.images?.components?.homepage_background?.components?.image
|
|
42
|
+
const logo = orderingTheme?.theme?.my_products?.components?.images?.components?.logo?.components?.image
|
|
43
|
+
const isFullScreen = orderingTheme?.theme?.my_products?.components?.images?.components?.homepage_image_fullscreen
|
|
44
|
+
|
|
39
45
|
const handleFindBusinesses = () => {
|
|
40
46
|
if (!orderState?.options?.address?.location) {
|
|
41
47
|
setModals({ ...modals, formOpen: true })
|
|
@@ -86,11 +92,17 @@ export const OriginalHomeHero = (props) => {
|
|
|
86
92
|
}, [])
|
|
87
93
|
|
|
88
94
|
return (
|
|
89
|
-
<HeroContainer
|
|
95
|
+
<HeroContainer
|
|
96
|
+
mb={!auth && '30vh'}
|
|
97
|
+
bgimage={bgImg || (windowSize.width < 576
|
|
98
|
+
? theme.images?.general?.homeHeroMobile
|
|
99
|
+
: theme.images?.general?.homeHero)}
|
|
100
|
+
isFullScreen={isFullScreen}
|
|
101
|
+
>
|
|
90
102
|
<ContentWrapper>
|
|
91
103
|
{windowSize.width < 576 && (
|
|
92
104
|
<LogoWrapper>
|
|
93
|
-
<img alt='Logotype' src={theme?.images?.logos?.logotypeInvert} loading='lazy' />
|
|
105
|
+
<img alt='Logotype' src={logo || theme?.images?.logos?.logotypeInvert} loading='lazy' />
|
|
94
106
|
</LogoWrapper>
|
|
95
107
|
)}
|
|
96
108
|
<HeroContent>
|
|
@@ -113,13 +125,13 @@ export const OriginalHomeHero = (props) => {
|
|
|
113
125
|
</HeroContent>
|
|
114
126
|
</ContentWrapper>
|
|
115
127
|
|
|
116
|
-
{windowSize.width < 576 && !auth && (
|
|
128
|
+
{windowSize.width < 576 && !auth && isShowLoginAccount && (
|
|
117
129
|
<UseAccount>
|
|
118
130
|
<SectionHeader>
|
|
119
131
|
{t('YOUR_ACCOUNT', 'Use your account')}
|
|
120
132
|
</SectionHeader>
|
|
121
|
-
<Button color='primary' onClick={() => handleOpenLoginSignUp('login')}>login</Button>
|
|
122
|
-
<Button color='primary' onClick={() => handleOpenLoginSignUp('signup')}>signUp</Button>
|
|
133
|
+
<Button color='primary' onClick={() => handleOpenLoginSignUp('login')}>{t('LOGIN', 'login')}</Button>
|
|
134
|
+
<Button color='primary' onClick={() => handleOpenLoginSignUp('signup')}>{t('SIGNUP', 'signUp')}</Button>
|
|
123
135
|
</UseAccount>
|
|
124
136
|
)}
|
|
125
137
|
|
|
@@ -148,7 +148,7 @@ const MultiCartsPaymethodsAndWalletsUI = (props) => {
|
|
|
148
148
|
</>
|
|
149
149
|
) : (
|
|
150
150
|
<>
|
|
151
|
-
{walletsState
|
|
151
|
+
{walletsState?.result?.filter(wallet => paymethodsAndWallets.wallets.find(item => item.type === wallet.type)).map((wallet, idx) => walletName[wallet.type]?.isActive && (
|
|
152
152
|
<WalletOptionContainer
|
|
153
153
|
key={wallet.type}
|
|
154
154
|
isBottomBorder={idx === paymethodsAndWallets.wallets?.length - 1}
|
|
@@ -560,7 +560,7 @@ const OrderDetailsUI = (props) => {
|
|
|
560
560
|
style={{ fontSize: 14 }}
|
|
561
561
|
color={order?.status === 20 ? 'secundary' : 'primary'}
|
|
562
562
|
onClick={() => handleChangeOrderStatus(20)}
|
|
563
|
-
disabled={order?.status === 20}
|
|
563
|
+
disabled={order?.status === 20 || order?.status === 21}
|
|
564
564
|
>
|
|
565
565
|
{getOrderStatus(20)?.value}
|
|
566
566
|
</Button>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useState } from 'react'
|
|
1
|
+
import React, { useState, useEffect } from 'react'
|
|
2
2
|
import { useTheme } from 'styled-components'
|
|
3
3
|
import { useLanguage, useConfig, useUtils, useOrderingTheme } from 'ordering-components-external'
|
|
4
4
|
import CgSearch from '@meronex/icons/cg/CgSearch'
|
|
@@ -125,6 +125,15 @@ export const RenderProductsLayout = (props) => {
|
|
|
125
125
|
? ProductListLayoutGroceries
|
|
126
126
|
: BusinessProductsList
|
|
127
127
|
|
|
128
|
+
const handleSaveProduct = () => {
|
|
129
|
+
const productContainer = document.getElementsByClassName('bp-list')[0]
|
|
130
|
+
scrollTo(productContainer, 500, 1250)
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
useEffect(() => {
|
|
134
|
+
handleSaveProduct()
|
|
135
|
+
}, [categorySelected])
|
|
136
|
+
|
|
128
137
|
return (
|
|
129
138
|
<>
|
|
130
139
|
{!isLoading && business?.id && (
|