ordering-ui-external 1.5.5 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_bundles/{0.ordering-ui.cb87b9b647114f245c57.js → 0.ordering-ui.ff76ec87ed271a678f9d.js} +0 -0
- package/_bundles/{1.ordering-ui.cb87b9b647114f245c57.js → 1.ordering-ui.ff76ec87ed271a678f9d.js} +0 -0
- package/_bundles/{2.ordering-ui.cb87b9b647114f245c57.js → 2.ordering-ui.ff76ec87ed271a678f9d.js} +0 -0
- package/_bundles/{4.ordering-ui.cb87b9b647114f245c57.js → 4.ordering-ui.ff76ec87ed271a678f9d.js} +0 -0
- package/_bundles/{5.ordering-ui.cb87b9b647114f245c57.js → 5.ordering-ui.ff76ec87ed271a678f9d.js} +0 -0
- package/_bundles/{6.ordering-ui.cb87b9b647114f245c57.js → 6.ordering-ui.ff76ec87ed271a678f9d.js} +0 -0
- package/_bundles/{7.ordering-ui.cb87b9b647114f245c57.js → 7.ordering-ui.ff76ec87ed271a678f9d.js} +1 -1
- package/_bundles/{7.ordering-ui.cb87b9b647114f245c57.js.LICENSE.txt → 7.ordering-ui.ff76ec87ed271a678f9d.js.LICENSE.txt} +0 -0
- package/_bundles/{8.ordering-ui.cb87b9b647114f245c57.js → 8.ordering-ui.ff76ec87ed271a678f9d.js} +0 -0
- package/_bundles/{9.ordering-ui.cb87b9b647114f245c57.js → 9.ordering-ui.ff76ec87ed271a678f9d.js} +0 -0
- package/_bundles/{ordering-ui.cb87b9b647114f245c57.js → ordering-ui.ff76ec87ed271a678f9d.js} +2 -2
- package/_bundles/{ordering-ui.cb87b9b647114f245c57.js.LICENSE.txt → ordering-ui.ff76ec87ed271a678f9d.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/BusinessReviews/index.js +4 -4
- package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +8 -5
- package/_modules/themes/five/src/components/HomeHero/index.js +5 -3
- 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 +64 -60
- 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/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 +7 -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/BusinessReviews/index.js +4 -4
- package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +15 -11
- package/src/themes/five/src/components/HomeHero/index.js +4 -2
- 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 +84 -100
- 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/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 +385 -367
- package/template/components/SubdomainComponent/index.js +54 -0
- package/template/config.json +4 -1
|
File without changes
|
|
@@ -30,7 +30,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
30
30
|
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; }
|
|
31
31
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
32
32
|
var BusinessTypeFilterUI = function BusinessTypeFilterUI(props) {
|
|
33
|
-
var
|
|
33
|
+
var _props$beforeElements, _props$beforeComponen, _props$afterComponent, _props$afterElements;
|
|
34
34
|
var typesState = props.typesState,
|
|
35
35
|
currentTypeSelected = props.currentTypeSelected,
|
|
36
36
|
handleChangeBusinessType = props.handleChangeBusinessType;
|
|
@@ -45,7 +45,10 @@ var BusinessTypeFilterUI = function BusinessTypeFilterUI(props) {
|
|
|
45
45
|
_useState2 = _slicedToArray(_useState, 2),
|
|
46
46
|
load = _useState2[0],
|
|
47
47
|
setLoad = _useState2[1];
|
|
48
|
-
var defaultImage =
|
|
48
|
+
var defaultImage = function defaultImage(name) {
|
|
49
|
+
var _theme$images, _theme$images$categor;
|
|
50
|
+
return (_theme$images = theme.images) === null || _theme$images === void 0 ? void 0 : (_theme$images$categor = _theme$images.categories) === null || _theme$images$categor === void 0 ? void 0 : _theme$images$categor[name.toLowerCase()];
|
|
51
|
+
};
|
|
49
52
|
var handleChangeCategory = function handleChangeCategory(category) {
|
|
50
53
|
handleChangeBusinessType && handleChangeBusinessType(category);
|
|
51
54
|
};
|
|
@@ -83,7 +86,7 @@ var BusinessTypeFilterUI = function BusinessTypeFilterUI(props) {
|
|
|
83
86
|
active: type.id === currentTypeSelected,
|
|
84
87
|
load: load
|
|
85
88
|
}, /*#__PURE__*/_react.default.createElement("img", {
|
|
86
|
-
src: type.image || defaultImage,
|
|
89
|
+
src: type.image || defaultImage(type.name),
|
|
87
90
|
alt: type.name.toLowerCase(),
|
|
88
91
|
onLoad: function onLoad() {
|
|
89
92
|
return setLoad(true);
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.CancellationComponent = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _orderingComponentsExternal = require("ordering-components-external");
|
|
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 CancellationComponent = function CancellationComponent(props) {
|
|
19
|
+
var _theme$images, _theme$images$general, _theme$images2, _theme$images2$genera, _theme$images3, _theme$images3$logos, _theme$images4, _theme$images4$logos;
|
|
20
|
+
var bgUrl = props.bgUrl,
|
|
21
|
+
logoUrl = props.logoUrl,
|
|
22
|
+
ButtonComponent = props.ButtonComponent,
|
|
23
|
+
InputComponent = props.InputComponent;
|
|
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, /*#__PURE__*/_react.default.createElement(_styles.Hero, null, (bgUrl || ((_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.businessHero)) && /*#__PURE__*/_react.default.createElement(_styles.BgImg, {
|
|
29
|
+
src: bgUrl || ((_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.businessHero),
|
|
30
|
+
alt: "bg"
|
|
31
|
+
}), /*#__PURE__*/_react.default.createElement(_styles.HeroText, null, (logoUrl || ((_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.logotype)) && /*#__PURE__*/_react.default.createElement(_styles.LogoImg, {
|
|
32
|
+
src: logoUrl || ((_theme$images4 = theme.images) === null || _theme$images4 === void 0 ? void 0 : (_theme$images4$logos = _theme$images4.logos) === null || _theme$images4$logos === void 0 ? void 0 : _theme$images4$logos.logotype),
|
|
33
|
+
alt: "logo"
|
|
34
|
+
}), /*#__PURE__*/_react.default.createElement("h1", {
|
|
35
|
+
className: "title"
|
|
36
|
+
}, t('CANCELLATION_TITLE', 'SITE OUT OF SERVICE')), /*#__PURE__*/_react.default.createElement("h4", {
|
|
37
|
+
className: "sub-title",
|
|
38
|
+
dangerouslySetInnerHTML: {
|
|
39
|
+
__html: t('CANCELLATION_SUBTITLE', 'This website has been archived or suspended in accordance with our :Terms of Service').replace(':Terms of Service', "<b><i>".concat(t('CANCELLATION_TERMS', 'Terms of Service'), "</i></b>"))
|
|
40
|
+
}
|
|
41
|
+
}))), /*#__PURE__*/_react.default.createElement(_styles.Content, null, /*#__PURE__*/_react.default.createElement("p", {
|
|
42
|
+
dangerouslySetInnerHTML: {
|
|
43
|
+
__html: t('CANCELLATION_OWNER_TEXT', 'If you are the :owner of this website contact us to reactivate your website.').replace(':owner', "<b>".concat(t('CANCELLATION_OWNER', 'owner'), "</b>"))
|
|
44
|
+
}
|
|
45
|
+
}), ButtonComponent && /*#__PURE__*/_react.default.createElement(ButtonComponent, {
|
|
46
|
+
color: "primary"
|
|
47
|
+
}, t('CANCELLATION_CONTACT_US', 'Contact us'))), /*#__PURE__*/_react.default.createElement(_styles.Segment, null, /*#__PURE__*/_react.default.createElement("p", {
|
|
48
|
+
dangerouslySetInnerHTML: {
|
|
49
|
+
__html: t('CANCELLATION_OWNER_TEXT', 'If you are a :customer let the owner know you midd this website, just write your email below.').replace(':customer', "<b>".concat(t('CANCELLATION_CUSTOMER', 'customer'), "</b>"))
|
|
50
|
+
}
|
|
51
|
+
}), /*#__PURE__*/_react.default.createElement(_styles.InputWrapper, null, /*#__PURE__*/_react.default.createElement(_styles.BusinessSearch, null, InputComponent && /*#__PURE__*/_react.default.createElement(InputComponent, {
|
|
52
|
+
name: "Email",
|
|
53
|
+
placeholder: t('CANCELLATION_INPUT_PLACEHOLDER', 'Email')
|
|
54
|
+
})), ButtonComponent && /*#__PURE__*/_react.default.createElement(ButtonComponent, {
|
|
55
|
+
color: "primary"
|
|
56
|
+
}, t('CANCELLATION_SEND_BUTTON', 'Send')))));
|
|
57
|
+
};
|
|
58
|
+
exports.CancellationComponent = CancellationComponent;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.Segment = exports.LogoImg = exports.InputWrapper = exports.HeroText = exports.Hero = exports.Content = exports.BusinessSearch = exports.BgImg = void 0;
|
|
8
|
+
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
9
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10;
|
|
10
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
11
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
12
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
13
|
+
var Hero = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n margin-bottom: 30px;\n width: 100%;\n background: black;\n overflow: hidden;\n position: relative;\n\n @media (min-width: 450px) {\n height: 370px;\n }\n\n @media (min-width: 821px) {\n height: ", ";\n }\n"])), function (_ref) {
|
|
14
|
+
var height = _ref.height;
|
|
15
|
+
return height || '450px';
|
|
16
|
+
});
|
|
17
|
+
exports.Hero = Hero;
|
|
18
|
+
var BgImg = _styledComponents.default.img(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n ", "\n"])), function (_ref2) {
|
|
19
|
+
var src = _ref2.src;
|
|
20
|
+
return src && (0, _styledComponents.css)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n width: 100%;\n height: 100%;\n opacity: 0.4;\n object-fit: cover;\n position: absolute;\n "])));
|
|
21
|
+
});
|
|
22
|
+
exports.BgImg = BgImg;
|
|
23
|
+
var HeroText = _styledComponents.default.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n height: 100%;\n color: ", ";\n opacity: .9;\n text-align: center;\n\n .title {\n font-size: 40px;\n margin: 10px 0;\n }\n\n .sub-title {\n font-size: 16px;\n line-height: 24px;\n font-weight: 100;\n margin: 0;\n max-width: 560px;\n }\n\n .terms {\n font-style: italic;\n }\n"])), function (props) {
|
|
24
|
+
return props.theme.colors.backgroundPage;
|
|
25
|
+
});
|
|
26
|
+
exports.HeroText = HeroText;
|
|
27
|
+
var LogoImg = _styledComponents.default.img(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n ", "\n"])), function (_ref3) {
|
|
28
|
+
var src = _ref3.src;
|
|
29
|
+
return src && (0, _styledComponents.css)(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n width: 120px;\n height: 120px;\n border-radius: 8px;\n margin-bottom: 30px;\n "])));
|
|
30
|
+
});
|
|
31
|
+
exports.LogoImg = LogoImg;
|
|
32
|
+
var Content = _styledComponents.default.div(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n margin-bottom: 30px;\n width: 100%;\n height: 200px;\n background-color: #F3F9FF;\n text-align: center;\n\n p {\n font-size: x-large;\n color: ", ";\n margin: 0;\n max-width: 600px;\n }\n\n button {\n margin-top: 20px;\n }\n"])), function (props) {
|
|
33
|
+
return props.theme.colors.headingColor;
|
|
34
|
+
});
|
|
35
|
+
exports.Content = Content;
|
|
36
|
+
var Segment = _styledComponents.default.div(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n margin-bottom: 30px;\n text-align: center:\n width: 100%;\n text-align: center;\n\n p {\n font-size: x-large;\n color: ", ";\n margin: 0;\n max-width: 660px;\n margin-bottom: 30px;\n }\n"])), function (props) {
|
|
37
|
+
return props.theme.colors.headingColor;
|
|
38
|
+
});
|
|
39
|
+
exports.Segment = Segment;
|
|
40
|
+
var InputWrapper = _styledComponents.default.div(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n margin: 10px 20px 0px;\n display: flex;\n \n button {\n width: 80px;\n margin-left: -10px;\n border-radius: 0 7.6px 7.6px 0;\n padding: 4px;\n z-index: 100;\n }\n box-sizing: border-box;\n justify-content: center;\n align-items: center;\n position: relative;\n margin: 0;\n margin-top: 10px;\n margin-bottom: 20px;\n width: 100%; \n padding: 0 20px;\n margin-right: 20px;\n \n @media(min-width: 681px){\n width: 60%;\n padding: 0;\n }\n\n @media(min-width: 1201px){\n width: 50%;\n }\n"])));
|
|
41
|
+
exports.InputWrapper = InputWrapper;
|
|
42
|
+
var BusinessSearch = _styledComponents.default.div(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n width: 100%;\n display: flex;\n justify-content: flex-end;\n position: relative;\n\n input {\n border: none;\n border-bottom: 1px solid #E9ECEF;\n border-radius: 0px;\n width: 100%;\n background-repeat: no-repeat;\n background-size: 30px 18px;\n box-sizing: border-box;\n padding-left: 30px;\n padding-right: 50px;\n\n @media (min-width: 681px) {\n width: 100%;\n }\n\n }\n"])));
|
|
43
|
+
exports.BusinessSearch = BusinessSearch;
|
|
@@ -260,7 +260,7 @@ var Header = function Header(props) {
|
|
|
260
260
|
},
|
|
261
261
|
isHome: isHome,
|
|
262
262
|
isCustomerMode: isCustomerMode
|
|
263
|
-
}), isFarAway && /*#__PURE__*/_react.default.createElement(_styles.FarAwayMessage, null, /*#__PURE__*/_react.default.createElement(_TiWarningOutline.default, null), /*#__PURE__*/_react.default.createElement("span", null, t('YOU_ARE_FAR_FROM_ADDRESS', 'You are far from this address'))))))), onlineStatus && /*#__PURE__*/_react.default.createElement(_styles.RightHeader, null, /*#__PURE__*/_react.default.createElement(_styles.Menu, null, !auth && windowSize.width > 870 && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_styles.MenuLink, {
|
|
263
|
+
}), isFarAway && /*#__PURE__*/_react.default.createElement(_styles.FarAwayMessage, null, /*#__PURE__*/_react.default.createElement(_TiWarningOutline.default, null), /*#__PURE__*/_react.default.createElement("span", null, t('YOU_ARE_FAR_FROM_ADDRESS', 'You are far from this address'))))))), onlineStatus && /*#__PURE__*/_react.default.createElement(_styles.RightHeader, null, /*#__PURE__*/_react.default.createElement(_styles.Menu, null, !auth && windowSize.width > 870 && !isCustomerMode && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_styles.MenuLink, {
|
|
264
264
|
onClick: function onClick() {
|
|
265
265
|
return handleGoToPage({
|
|
266
266
|
page: 'signin'
|
package/_modules/index.js
CHANGED
|
@@ -123,6 +123,12 @@ Object.defineProperty(exports, "Button", {
|
|
|
123
123
|
return _Buttons.Button;
|
|
124
124
|
}
|
|
125
125
|
});
|
|
126
|
+
Object.defineProperty(exports, "CancellationComponent", {
|
|
127
|
+
enumerable: true,
|
|
128
|
+
get: function get() {
|
|
129
|
+
return _CancellationComponent.CancellationComponent;
|
|
130
|
+
}
|
|
131
|
+
});
|
|
126
132
|
Object.defineProperty(exports, "CardForm", {
|
|
127
133
|
enumerable: true,
|
|
128
134
|
get: function get() {
|
|
@@ -944,6 +950,7 @@ var _useWindowSize = require("./hooks/useWindowSize");
|
|
|
944
950
|
var _useCountdownTimer = require("./hooks/useCountdownTimer");
|
|
945
951
|
var _useIntersectionObserver = require("./hooks/useIntersectionObserver");
|
|
946
952
|
var _useIsMounted = require("./hooks/useIsMounted");
|
|
953
|
+
var _CancellationComponent = require("./components/CancellationComponent");
|
|
947
954
|
var _Buttons = require("./styles/Buttons");
|
|
948
955
|
var _Inputs = require("./styles/Inputs");
|
|
949
956
|
var _Select = require("./styles/Select");
|
|
@@ -57,7 +57,7 @@ var AddressMenu = _styledComponents.default.div(_templateObject14 || (_templateO
|
|
|
57
57
|
exports.AddressMenu = AddressMenu;
|
|
58
58
|
var MomentMenu = _styledComponents.default.div(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n border-left: 1px solid #DEE2E6;\n border-right: 1px solid #DEE2E6;\n height: 100%;\n justify-content: center;\n width: 200px;\n display: none;\n \n @media (min-width: 821px) {\n display: flex;\n }\n\n @media (min-width: 1175px) {\n width: 250px;\n }\n\n @media (min-width: 1400px) {\n width: 400px;\n }\n\n > div {\n cursor: pointer;\n font-size: 14px;\n color: #909BA9;\n display: flex;\n align-items: center;\n text-align: center;\n white-space: nowrap;\n padding: 0 10px;\n }\n"])));
|
|
59
59
|
exports.MomentMenu = MomentMenu;
|
|
60
|
-
var FarAwayMessage = _styledComponents.default.div(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n pointer-events: none;\n position: absolute;\n display: flex;\n align-items: center;\n top: 100%;\n background: ", ";\n border: 1px solid ", ";\n box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.12);\n border-radius: 7.6px;\n padding: 6px 15px;\n box-sizing: border-box;\n margin: 10px 0px 0px 0px !important;\n\n left: 5px;\n ", "\n\n svg {\n font-size: 20px;\n color: ", ";\n margin-right: 10px;\n ", "\n }\n span {\n font-size: 12px;\n line-height: 18px;\n color: ", ";\n }\n\n @media (min-width: 400px) {\n padding: 8px 20px;\n font-size: 14px;\n line-height: 24px;\n left: 10px;\n ", "\n }\n"])), function (props) {
|
|
60
|
+
var FarAwayMessage = _styledComponents.default.div(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n pointer-events: none;\n position: absolute;\n display: flex;\n align-items: center;\n top: 100%;\n background: ", ";\n border: 1px solid ", ";\n box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.12);\n border-radius: 7.6px;\n padding: 6px 15px;\n box-sizing: border-box;\n z-index: 2000;\n margin: 10px 0px 0px 0px !important;\n\n left: 5px;\n ", "\n\n svg {\n font-size: 20px;\n color: ", ";\n margin-right: 10px;\n ", "\n }\n span {\n font-size: 12px;\n line-height: 18px;\n color: ", ";\n }\n\n @media (min-width: 400px) {\n padding: 8px 20px;\n font-size: 14px;\n line-height: 24px;\n left: 10px;\n ", "\n }\n"])), function (props) {
|
|
61
61
|
return props.theme.colors.warning100;
|
|
62
62
|
}, function (props) {
|
|
63
63
|
return props.theme.colors.warning500;
|
|
@@ -47,7 +47,7 @@ var inputNames = [{
|
|
|
47
47
|
code: 'Address notes'
|
|
48
48
|
}];
|
|
49
49
|
var AddressFormUI = function AddressFormUI(props) {
|
|
50
|
-
var _addressState$address, _ref, _formState$changes$ad, _formState$changes, _addressState$address2, _addressState$address3, _addressState$address4, _formState$changes$lo, _formState$changes2, _orderingTheme$theme, _orderingTheme$theme$, _orderingTheme$theme$2, _orderingTheme$theme$3, _orderingTheme$
|
|
50
|
+
var _addressState$address, _ref, _formState$changes$ad, _formState$changes, _addressState$address2, _addressState$address3, _addressState$address4, _formState$changes$lo, _formState$changes2, _orderingTheme$theme, _orderingTheme$theme$, _orderingTheme$theme$2, _orderingTheme$theme$3, _orderingTheme$theme2, _orderingTheme$theme3, _orderingTheme$theme4, _orderingTheme$theme5, _configState$configs, _configState$configs$, _configState$configs2, _configState$configs3, _configState$configs4, _configState$configs5, _configState$configs6, _configState$configs7, _props$beforeElements, _props$beforeComponen, _props$beforeMidEleme, _props$beforeMidCompo, _props$afterMidElemen, _props$afterMidCompon, _orderState$options6, _orderState$options6$, _props$afterComponent, _props$afterElements;
|
|
51
51
|
var addressesList = props.addressesList,
|
|
52
52
|
googleMapsControls = props.googleMapsControls,
|
|
53
53
|
formState = props.formState,
|
|
@@ -108,8 +108,8 @@ var AddressFormUI = function AddressFormUI(props) {
|
|
|
108
108
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
109
109
|
locationChange = _useState12[0],
|
|
110
110
|
setLocationChange = _useState12[1];
|
|
111
|
-
var isHideMap = orderingTheme === null || orderingTheme === void 0 ? void 0 : (_orderingTheme$theme = orderingTheme.theme) === null || _orderingTheme$theme === void 0 ? void 0 : (_orderingTheme$theme$ = _orderingTheme$theme.
|
|
112
|
-
var isHideIcons = orderingTheme === null || orderingTheme === void 0 ? void 0 : (_orderingTheme$theme2 = orderingTheme.theme) === null || _orderingTheme$theme2 === void 0 ? void 0 : (_orderingTheme$theme3 = _orderingTheme$theme2.
|
|
111
|
+
var isHideMap = orderingTheme === null || orderingTheme === void 0 ? void 0 : (_orderingTheme$theme = orderingTheme.theme) === null || _orderingTheme$theme === void 0 ? void 0 : (_orderingTheme$theme$ = _orderingTheme$theme.address) === null || _orderingTheme$theme$ === void 0 ? void 0 : (_orderingTheme$theme$2 = _orderingTheme$theme$.components) === null || _orderingTheme$theme$2 === void 0 ? void 0 : (_orderingTheme$theme$3 = _orderingTheme$theme$2.map) === null || _orderingTheme$theme$3 === void 0 ? void 0 : _orderingTheme$theme$3.hidden;
|
|
112
|
+
var isHideIcons = orderingTheme === null || orderingTheme === void 0 ? void 0 : (_orderingTheme$theme2 = orderingTheme.theme) === null || _orderingTheme$theme2 === void 0 ? void 0 : (_orderingTheme$theme3 = _orderingTheme$theme2.address) === null || _orderingTheme$theme3 === void 0 ? void 0 : (_orderingTheme$theme4 = _orderingTheme$theme3.components) === null || _orderingTheme$theme4 === void 0 ? void 0 : (_orderingTheme$theme5 = _orderingTheme$theme4.icons) === null || _orderingTheme$theme5 === void 0 ? void 0 : _orderingTheme$theme5.hidden;
|
|
113
113
|
var maxLimitLocation = configState === null || configState === void 0 ? void 0 : (_configState$configs = configState.configs) === null || _configState$configs === void 0 ? void 0 : (_configState$configs$ = _configState$configs.meters_to_change_address) === null || _configState$configs$ === void 0 ? void 0 : _configState$configs$.value;
|
|
114
114
|
var googleMapsApiKey = configState === null || configState === void 0 ? void 0 : (_configState$configs2 = configState.configs) === null || _configState$configs2 === void 0 ? void 0 : (_configState$configs3 = _configState$configs2.google_maps_api_key) === null || _configState$configs3 === void 0 ? void 0 : _configState$configs3.value;
|
|
115
115
|
var isLocationRequired = ((_configState$configs4 = configState.configs) === null || _configState$configs4 === void 0 ? void 0 : (_configState$configs5 = _configState$configs4.google_autocomplete_selection_required) === null || _configState$configs5 === void 0 ? void 0 : _configState$configs5.value) === '1' || ((_configState$configs6 = configState.configs) === null || _configState$configs6 === void 0 ? void 0 : (_configState$configs7 = _configState$configs6.google_autocomplete_selection_required) === null || _configState$configs7 === void 0 ? void 0 : _configState$configs7.value) === 'true';
|
|
@@ -320,8 +320,8 @@ var AddressFormUI = function AddressFormUI(props) {
|
|
|
320
320
|
});
|
|
321
321
|
};
|
|
322
322
|
var showFieldWithTheme = function showFieldWithTheme(name) {
|
|
323
|
-
var _orderingTheme$
|
|
324
|
-
return !(orderingTheme !== null && orderingTheme !== void 0 && (_orderingTheme$
|
|
323
|
+
var _orderingTheme$theme6, _orderingTheme$theme7, _orderingTheme$theme8, _orderingTheme$theme9, _orderingTheme$theme10, _orderingTheme$theme11;
|
|
324
|
+
return !(orderingTheme !== null && orderingTheme !== void 0 && (_orderingTheme$theme6 = orderingTheme.theme) !== null && _orderingTheme$theme6 !== void 0 && (_orderingTheme$theme7 = _orderingTheme$theme6.header) !== null && _orderingTheme$theme7 !== void 0 && (_orderingTheme$theme8 = _orderingTheme$theme7.components) !== null && _orderingTheme$theme8 !== void 0 && (_orderingTheme$theme9 = _orderingTheme$theme8.address_form) !== null && _orderingTheme$theme9 !== void 0 && (_orderingTheme$theme10 = _orderingTheme$theme9.components) !== null && _orderingTheme$theme10 !== void 0 && (_orderingTheme$theme11 = _orderingTheme$theme10[name]) !== null && _orderingTheme$theme11 !== void 0 && _orderingTheme$theme11.hidden);
|
|
325
325
|
};
|
|
326
326
|
(0, _react.useEffect)(function () {
|
|
327
327
|
var _formState$result, _ref5, _formState$changes$ad3, _formState$changes9, _addressState$address8, _ref6, _formState$changes$ad4, _formState$changes10, _addressState$address9;
|
|
@@ -35,7 +35,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
35
35
|
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; }
|
|
36
36
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
37
37
|
var AddressListUI = function AddressListUI(props) {
|
|
38
|
-
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, _props$beforeElements, _props$beforeComponen, _props$afterComponent, _props$afterElements;
|
|
38
|
+
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, _orderingTheme$theme21, _orderingTheme$theme22, _orderingTheme$theme23, _orderingTheme$theme24, _props$beforeElements, _props$beforeComponen, _props$afterComponent, _props$afterElements;
|
|
39
39
|
var actionStatus = props.actionStatus,
|
|
40
40
|
addressList = props.addressList,
|
|
41
41
|
handleDelete = props.handleDelete,
|
|
@@ -96,6 +96,7 @@ var AddressListUI = function AddressListUI(props) {
|
|
|
96
96
|
var showIcons = !(orderingTheme !== null && orderingTheme !== void 0 && (_orderingTheme$theme2 = orderingTheme.theme) !== null && _orderingTheme$theme2 !== void 0 && (_orderingTheme$theme3 = _orderingTheme$theme2.profile) !== null && _orderingTheme$theme3 !== void 0 && (_orderingTheme$theme4 = _orderingTheme$theme3.components) !== null && _orderingTheme$theme4 !== void 0 && (_orderingTheme$theme5 = _orderingTheme$theme4.address_list) !== null && _orderingTheme$theme5 !== void 0 && (_orderingTheme$theme6 = _orderingTheme$theme5.components) !== null && _orderingTheme$theme6 !== void 0 && (_orderingTheme$theme7 = _orderingTheme$theme6.icons) !== null && _orderingTheme$theme7 !== void 0 && _orderingTheme$theme7.hidden);
|
|
97
97
|
var showZipcode = !(orderingTheme !== null && orderingTheme !== void 0 && (_orderingTheme$theme8 = orderingTheme.theme) !== null && _orderingTheme$theme8 !== void 0 && (_orderingTheme$theme9 = _orderingTheme$theme8.profile) !== null && _orderingTheme$theme9 !== void 0 && (_orderingTheme$theme10 = _orderingTheme$theme9.components) !== null && _orderingTheme$theme10 !== void 0 && (_orderingTheme$theme11 = _orderingTheme$theme10.address_list) !== null && _orderingTheme$theme11 !== void 0 && (_orderingTheme$theme12 = _orderingTheme$theme11.components) !== null && _orderingTheme$theme12 !== void 0 && (_orderingTheme$theme13 = _orderingTheme$theme12.zipcode) !== null && _orderingTheme$theme13 !== void 0 && _orderingTheme$theme13.hidden);
|
|
98
98
|
var showInternalNumber = !(orderingTheme !== null && orderingTheme !== void 0 && (_orderingTheme$theme14 = orderingTheme.theme) !== null && _orderingTheme$theme14 !== void 0 && (_orderingTheme$theme15 = _orderingTheme$theme14.profile) !== null && _orderingTheme$theme15 !== void 0 && (_orderingTheme$theme16 = _orderingTheme$theme15.components) !== null && _orderingTheme$theme16 !== void 0 && (_orderingTheme$theme17 = _orderingTheme$theme16.address_list) !== null && _orderingTheme$theme17 !== void 0 && (_orderingTheme$theme18 = _orderingTheme$theme17.components) !== null && _orderingTheme$theme18 !== void 0 && (_orderingTheme$theme19 = _orderingTheme$theme18.internal_number) !== null && _orderingTheme$theme19 !== void 0 && _orderingTheme$theme19.hidden);
|
|
99
|
+
var notFoundImage = orderingTheme === null || orderingTheme === void 0 ? void 0 : (_orderingTheme$theme20 = orderingTheme.theme) === null || _orderingTheme$theme20 === void 0 ? void 0 : (_orderingTheme$theme21 = _orderingTheme$theme20.profile) === null || _orderingTheme$theme21 === void 0 ? void 0 : (_orderingTheme$theme22 = _orderingTheme$theme21.components) === null || _orderingTheme$theme22 === void 0 ? void 0 : (_orderingTheme$theme23 = _orderingTheme$theme22.address_list) === null || _orderingTheme$theme23 === void 0 ? void 0 : (_orderingTheme$theme24 = _orderingTheme$theme23.components) === null || _orderingTheme$theme24 === void 0 ? void 0 : _orderingTheme$theme24.image;
|
|
99
100
|
var openAddress = function openAddress(address) {
|
|
100
101
|
setCurAddress(address);
|
|
101
102
|
setAddressOpen(true);
|
|
@@ -283,6 +284,7 @@ var AddressListUI = function AddressListUI(props) {
|
|
|
283
284
|
height: "112px",
|
|
284
285
|
loading: "lazy"
|
|
285
286
|
}), /*#__PURE__*/_react.default.createElement("h1", null, t('NOT_FOUND_ADDRESS', 'Sorry, You don\'t seem to have any addresses.'))), !(addressList.loading || actionStatus.loading || orderState.loading) && addressList.error && addressList.error.length > 0 && /*#__PURE__*/_react.default.createElement(_NotFoundSource.NotFoundSource, {
|
|
287
|
+
image: notFoundImage,
|
|
286
288
|
content: ((_addressList$error$ = addressList.error[0]) === null || _addressList$error$ === void 0 ? void 0 : _addressList$error$.message) || addressList.error[0]
|
|
287
289
|
}), !(addressList.loading || actionStatus.loading || orderState.loading) && _typeof((_orderState$options7 = orderState.options) === null || _orderState$options7 === void 0 ? void 0 : _orderState$options7.address) !== 'object' && !addressList.error && /*#__PURE__*/_react.default.createElement(_NotFoundSource.NotFoundSource, {
|
|
288
290
|
content: t('NETWORK_ERROR', 'Network error, please reload the page')
|
|
@@ -11,7 +11,7 @@ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _temp
|
|
|
11
11
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
12
12
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
13
13
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
14
|
-
var AddressListContainer = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n padding: 0px 10px;\n ", "\n\n ", "\n\n button.add {\n height: 50px;\n ", "\n }\n"])), function (_ref) {
|
|
14
|
+
var AddressListContainer = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n padding: 0;\n @media (min-width: 768px) {\n padding: 0px 10px;\n }\n ", "\n\n ", "\n\n button.add {\n height: 50px;\n ", "\n }\n"])), function (_ref) {
|
|
15
15
|
var isProfile = _ref.isProfile;
|
|
16
16
|
return !isProfile && (0, _styledComponents.css)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n width: 100%;\n "])));
|
|
17
17
|
}, function (_ref2) {
|
|
@@ -42,7 +42,7 @@ _dayjs.default.extend(_timezone.default);
|
|
|
42
42
|
_dayjs.default.extend(_isBetween.default);
|
|
43
43
|
var types = ['food', 'laundry', 'alcohol', 'groceries'];
|
|
44
44
|
var BusinessBasicInformation = function BusinessBasicInformation(props) {
|
|
45
|
-
var _configs$preorder_sta, _orderingTheme$theme, _orderingTheme$theme$, _orderingTheme$theme$2, _orderingTheme$theme$3, _orderingTheme$theme$4, _orderingTheme$theme$5, _orderingTheme$theme$6, _orderingTheme$theme$7, _orderingTheme$theme2, _orderingTheme$theme3, _orderingTheme$theme4, _orderingTheme$theme5, _orderingTheme$theme6, _orderingTheme$theme7, _orderingTheme$theme8, _orderingTheme$theme9, _orderingTheme$theme10, _orderingTheme$theme11, _orderingTheme$theme12, _orderingTheme$theme13, _orderingTheme$theme14, _orderingTheme$theme15, _orderingTheme$theme16, _orderingTheme$theme17, _orderingTheme$theme18, _orderingTheme$theme19, _orderingTheme$theme20, _orderingTheme$theme21, _orderingTheme$theme22, _orderingTheme$theme23, _orderingTheme$theme24, _orderingTheme$theme25, _orderingTheme$theme26, _orderingTheme$theme27, _orderingTheme$theme28, _orderingTheme$theme29, _orderingTheme$theme30, _orderingTheme$theme31, _orderingTheme$theme32, _orderingTheme$theme33, _orderingTheme$theme34, _orderingTheme$theme35, _orderingTheme$theme36, _orderingTheme$theme37, _orderingTheme$theme38, _orderingTheme$theme39, _orderingTheme$theme40, _orderingTheme$theme41, _orderingTheme$theme42, _orderingTheme$theme43, _orderingTheme$theme44, _orderingTheme$theme45, _orderingTheme$theme46, _orderingTheme$theme47, _orderingTheme$theme48, _orderingTheme$theme49, _orderingTheme$theme50, _orderingTheme$theme51, _orderingTheme$theme52, _orderingTheme$theme53, _orderingTheme$theme54, _orderingTheme$theme55, _orderingTheme$theme56, _orderingTheme$theme57, _orderingTheme$theme58, _orderingTheme$theme59, _orderingTheme$theme60, _orderingTheme$theme61, _orderingTheme$theme62, _orderingTheme$theme63, _orderingTheme$theme64, _orderingTheme$theme65, _props$beforeElements, _props$beforeComponen, _theme$images, _theme$images$dummies, _theme$images2, _theme$images2$dummie, _business$reviews3, _business$reviews4, _props$afterComponent, _props$afterElements;
|
|
45
|
+
var _configs$preorder_sta, _orderingTheme$theme, _orderingTheme$theme$, _orderingTheme$theme$2, _orderingTheme$theme$3, _orderingTheme$theme$4, _orderingTheme$theme$5, _orderingTheme$theme$6, _orderingTheme$theme$7, _orderingTheme$theme2, _orderingTheme$theme3, _orderingTheme$theme4, _orderingTheme$theme5, _orderingTheme$theme6, _orderingTheme$theme7, _orderingTheme$theme8, _orderingTheme$theme9, _orderingTheme$theme10, _orderingTheme$theme11, _orderingTheme$theme12, _orderingTheme$theme13, _orderingTheme$theme14, _orderingTheme$theme15, _orderingTheme$theme16, _orderingTheme$theme17, _orderingTheme$theme18, _orderingTheme$theme19, _orderingTheme$theme20, _orderingTheme$theme21, _orderingTheme$theme22, _orderingTheme$theme23, _orderingTheme$theme24, _orderingTheme$theme25, _orderingTheme$theme26, _orderingTheme$theme27, _orderingTheme$theme28, _orderingTheme$theme29, _orderingTheme$theme30, _orderingTheme$theme31, _orderingTheme$theme32, _orderingTheme$theme33, _orderingTheme$theme34, _orderingTheme$theme35, _orderingTheme$theme36, _orderingTheme$theme37, _orderingTheme$theme38, _orderingTheme$theme39, _orderingTheme$theme40, _orderingTheme$theme41, _orderingTheme$theme42, _orderingTheme$theme43, _orderingTheme$theme44, _orderingTheme$theme45, _orderingTheme$theme46, _orderingTheme$theme47, _orderingTheme$theme48, _orderingTheme$theme49, _orderingTheme$theme50, _orderingTheme$theme51, _orderingTheme$theme52, _orderingTheme$theme53, _orderingTheme$theme54, _orderingTheme$theme55, _orderingTheme$theme56, _orderingTheme$theme57, _orderingTheme$theme58, _orderingTheme$theme59, _orderingTheme$theme60, _orderingTheme$theme61, _orderingTheme$theme62, _orderingTheme$theme63, _orderingTheme$theme64, _orderingTheme$theme65, _orderingTheme$theme66, _orderingTheme$theme67, _orderingTheme$theme68, _orderingTheme$theme69, _orderingTheme$theme70, _orderingTheme$theme71, _props$beforeElements, _props$beforeComponen, _theme$images, _theme$images$dummies, _theme$images2, _theme$images2$dummie, _business$reviews3, _business$reviews4, _props$afterComponent, _props$afterElements;
|
|
46
46
|
var isSkeleton = props.isSkeleton,
|
|
47
47
|
businessState = props.businessState,
|
|
48
48
|
setOpenBusinessInformation = props.setOpenBusinessInformation,
|
|
@@ -98,6 +98,8 @@ var BusinessBasicInformation = function BusinessBasicInformation(props) {
|
|
|
98
98
|
var showSort = !(orderingTheme !== null && orderingTheme !== void 0 && (_orderingTheme$theme42 = orderingTheme.theme) !== null && _orderingTheme$theme42 !== void 0 && (_orderingTheme$theme43 = _orderingTheme$theme42.business_view) !== null && _orderingTheme$theme43 !== void 0 && (_orderingTheme$theme44 = _orderingTheme$theme43.components) !== null && _orderingTheme$theme44 !== void 0 && (_orderingTheme$theme45 = _orderingTheme$theme44.header) !== null && _orderingTheme$theme45 !== void 0 && (_orderingTheme$theme46 = _orderingTheme$theme45.components) !== null && _orderingTheme$theme46 !== void 0 && (_orderingTheme$theme47 = _orderingTheme$theme46.business) !== null && _orderingTheme$theme47 !== void 0 && (_orderingTheme$theme48 = _orderingTheme$theme47.components) !== null && _orderingTheme$theme48 !== void 0 && (_orderingTheme$theme49 = _orderingTheme$theme48.sort) !== null && _orderingTheme$theme49 !== void 0 && _orderingTheme$theme49.hidden);
|
|
99
99
|
var isInfoShrunken = (orderingTheme === null || orderingTheme === void 0 ? void 0 : (_orderingTheme$theme50 = orderingTheme.theme) === null || _orderingTheme$theme50 === void 0 ? void 0 : (_orderingTheme$theme51 = _orderingTheme$theme50.business_view) === null || _orderingTheme$theme51 === void 0 ? void 0 : (_orderingTheme$theme52 = _orderingTheme$theme51.components) === null || _orderingTheme$theme52 === void 0 ? void 0 : (_orderingTheme$theme53 = _orderingTheme$theme52.header) === null || _orderingTheme$theme53 === void 0 ? void 0 : (_orderingTheme$theme54 = _orderingTheme$theme53.components) === null || _orderingTheme$theme54 === void 0 ? void 0 : (_orderingTheme$theme55 = _orderingTheme$theme54.business) === null || _orderingTheme$theme55 === void 0 ? void 0 : (_orderingTheme$theme56 = _orderingTheme$theme55.components) === null || _orderingTheme$theme56 === void 0 ? void 0 : (_orderingTheme$theme57 = _orderingTheme$theme56.layout) === null || _orderingTheme$theme57 === void 0 ? void 0 : _orderingTheme$theme57.position) === 'shrunken';
|
|
100
100
|
var hideCity = orderingTheme === null || orderingTheme === void 0 ? void 0 : (_orderingTheme$theme58 = orderingTheme.theme) === null || _orderingTheme$theme58 === void 0 ? void 0 : (_orderingTheme$theme59 = _orderingTheme$theme58.business_view) === null || _orderingTheme$theme59 === void 0 ? void 0 : (_orderingTheme$theme60 = _orderingTheme$theme59.components) === null || _orderingTheme$theme60 === void 0 ? void 0 : (_orderingTheme$theme61 = _orderingTheme$theme60.header) === null || _orderingTheme$theme61 === void 0 ? void 0 : (_orderingTheme$theme62 = _orderingTheme$theme61.components) === null || _orderingTheme$theme62 === void 0 ? void 0 : (_orderingTheme$theme63 = _orderingTheme$theme62.business) === null || _orderingTheme$theme63 === void 0 ? void 0 : (_orderingTheme$theme64 = _orderingTheme$theme63.components) === null || _orderingTheme$theme64 === void 0 ? void 0 : (_orderingTheme$theme65 = _orderingTheme$theme64.city) === null || _orderingTheme$theme65 === void 0 ? void 0 : _orderingTheme$theme65.hidden;
|
|
101
|
+
var layoutsWithOldSearch = ['starbucks', 'old'];
|
|
102
|
+
var hideSearch = layoutsWithOldSearch.includes(orderingTheme === null || orderingTheme === void 0 ? void 0 : (_orderingTheme$theme66 = orderingTheme.theme) === null || _orderingTheme$theme66 === void 0 ? void 0 : (_orderingTheme$theme67 = _orderingTheme$theme66.business_view) === null || _orderingTheme$theme67 === void 0 ? void 0 : (_orderingTheme$theme68 = _orderingTheme$theme67.components) === null || _orderingTheme$theme68 === void 0 ? void 0 : (_orderingTheme$theme69 = _orderingTheme$theme68.product_search) === null || _orderingTheme$theme69 === void 0 ? void 0 : (_orderingTheme$theme70 = _orderingTheme$theme69.components) === null || _orderingTheme$theme70 === void 0 ? void 0 : (_orderingTheme$theme71 = _orderingTheme$theme70.layout) === null || _orderingTheme$theme71 === void 0 ? void 0 : _orderingTheme$theme71.type);
|
|
101
103
|
var getBusinessType = function getBusinessType() {
|
|
102
104
|
if (Object.keys(business).length <= 0) return t('GENERAL', 'General');
|
|
103
105
|
var _types = [];
|
|
@@ -269,7 +271,7 @@ var BusinessBasicInformation = function BusinessBasicInformation(props) {
|
|
|
269
271
|
}
|
|
270
272
|
}, t('REVIEWS', 'Reviews'))) : /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
|
|
271
273
|
width: isCustomerMode ? 100 : 150
|
|
272
|
-
})))), ((categoryState === null || categoryState === void 0 ? void 0 : (_categoryState$produc = categoryState.products) === null || _categoryState$produc === void 0 ? void 0 : _categoryState$produc.length) !== 0 || searchValue) && !errorQuantityProducts && !isInfoShrunken && !(business !== null && business !== void 0 && (_business$professiona = business.professionals) !== null && _business$professiona !== void 0 && _business$professiona.length) && /*#__PURE__*/_react.default.createElement(SearchComponent, null));
|
|
274
|
+
})))), !hideSearch && ((categoryState === null || categoryState === void 0 ? void 0 : (_categoryState$produc = categoryState.products) === null || _categoryState$produc === void 0 ? void 0 : _categoryState$produc.length) !== 0 || searchValue) && !errorQuantityProducts && !isInfoShrunken && !(business !== null && business !== void 0 && (_business$professiona = business.professionals) !== null && _business$professiona !== void 0 && _business$professiona.length) && /*#__PURE__*/_react.default.createElement(SearchComponent, null));
|
|
273
275
|
};
|
|
274
276
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, (_props$beforeElements = props.beforeElements) === null || _props$beforeElements === void 0 ? void 0 : _props$beforeElements.map(function (BeforeElement, i) {
|
|
275
277
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
|
|
@@ -33,7 +33,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
33
33
|
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; }
|
|
34
34
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
35
35
|
var BusinessControllerUI = function BusinessControllerUI(props) {
|
|
36
|
-
var _orderingTheme$theme, _orderingTheme$theme$, _orderingTheme$theme$2, _orderingTheme$theme$3, _business$available_d, _business$busy_driver, _business$active_orde, _business$ribbon, _business$ribbon2, _business$ribbon3, _business$ribbon4, _business$ribbon5, _business$ribbon6, _business$ribbon7, _theme$images, _theme$images$dummies, _configState$configs, _configState$configs$, _orderState$options, _theme$images2, _theme$images2$dummie, _theme$images3, _theme$images3$dummie, _business$reviews, _business$reviews2, _orderState$options2, _business$available_d2, _business$available_d3, _business$busy_driver2, _business$busy_driver3, _business$active_orde2, _business$active_orde3, _theme$defaultLanguag, _theme$defaultLanguag2, _theme$defaultLanguag3, _theme$defaultLanguag4;
|
|
36
|
+
var _orderingTheme$theme, _orderingTheme$theme$, _orderingTheme$theme$2, _orderingTheme$theme$3, _theme$business_listi, _theme$business_listi2, _theme$business_listi3, _theme$business_listi4, _theme$business_listi5, _theme$business_listi6, _theme$business_listi7, _theme$business_listi8, _theme$business_listi9, _theme$business_listi10, _theme$business_listi11, _theme$business_listi12, _theme$business_listi13, _theme$business_listi14, _theme$business_listi15, _theme$business_listi16, _theme$business_listi17, _theme$business_listi18, _theme$business_listi19, _theme$business_listi20, _theme$business_listi21, _theme$business_listi22, _theme$business_listi23, _theme$business_listi24, _theme$business_listi25, _theme$business_listi26, _theme$business_listi27, _theme$business_listi28, _theme$business_listi29, _theme$business_listi30, _theme$business_listi31, _theme$business_listi32, _theme$business_listi33, _theme$business_listi34, _theme$business_listi35, _business$available_d, _business$busy_driver, _business$active_orde, _business$ribbon, _business$ribbon2, _business$ribbon3, _business$ribbon4, _business$ribbon5, _business$ribbon6, _business$ribbon7, _theme$images, _theme$images$dummies, _configState$configs, _configState$configs$, _orderState$options, _theme$images2, _theme$images2$dummie, _theme$images3, _theme$images3$dummie, _business$reviews, _business$reviews2, _businessState$busine2, _orderState$options2, _business$available_d2, _business$available_d3, _business$busy_driver2, _business$busy_driver3, _business$active_orde2, _business$active_orde3, _theme$defaultLanguag, _theme$defaultLanguag2, _theme$defaultLanguag3, _theme$defaultLanguag4;
|
|
37
37
|
var isSkeleton = props.isSkeleton,
|
|
38
38
|
business = props.business,
|
|
39
39
|
getBusinessOffer = props.getBusinessOffer,
|
|
@@ -57,7 +57,8 @@ var BusinessControllerUI = function BusinessControllerUI(props) {
|
|
|
57
57
|
businessDeliveryTime = props.businessDeliveryTime,
|
|
58
58
|
businessPickupTime = props.businessPickupTime,
|
|
59
59
|
businessDistance = props.businessDistance,
|
|
60
|
-
handleFavoriteBusiness = props.handleFavoriteBusiness
|
|
60
|
+
handleFavoriteBusiness = props.handleFavoriteBusiness,
|
|
61
|
+
businessState = props.businessState;
|
|
61
62
|
var _useConfig = (0, _orderingComponentsExternal.useConfig)(),
|
|
62
63
|
_useConfig2 = _slicedToArray(_useConfig, 1),
|
|
63
64
|
configState = _useConfig2[0];
|
|
@@ -98,6 +99,13 @@ var BusinessControllerUI = function BusinessControllerUI(props) {
|
|
|
98
99
|
setModalPageToShow = _useState6[1];
|
|
99
100
|
var favoriteRef = (0, _react.useRef)(null);
|
|
100
101
|
var businessRows = orderingTheme === null || orderingTheme === void 0 ? void 0 : (_orderingTheme$theme = orderingTheme.theme) === null || _orderingTheme$theme === void 0 ? void 0 : (_orderingTheme$theme$ = _orderingTheme$theme.business_listing_view) === null || _orderingTheme$theme$ === void 0 ? void 0 : (_orderingTheme$theme$2 = _orderingTheme$theme$.components) === null || _orderingTheme$theme$2 === void 0 ? void 0 : (_orderingTheme$theme$3 = _orderingTheme$theme$2.layout) === null || _orderingTheme$theme$3 === void 0 ? void 0 : _orderingTheme$theme$3.rows;
|
|
102
|
+
var hideBusinessLogo = theme === null || theme === void 0 ? void 0 : (_theme$business_listi = theme.business_listing_view) === null || _theme$business_listi === void 0 ? void 0 : (_theme$business_listi2 = _theme$business_listi.components) === null || _theme$business_listi2 === void 0 ? void 0 : (_theme$business_listi3 = _theme$business_listi2.business) === null || _theme$business_listi3 === void 0 ? void 0 : (_theme$business_listi4 = _theme$business_listi3.components) === null || _theme$business_listi4 === void 0 ? void 0 : (_theme$business_listi5 = _theme$business_listi4.logo) === null || _theme$business_listi5 === void 0 ? void 0 : _theme$business_listi5.hidden;
|
|
103
|
+
var hideBusinessFee = theme === null || theme === void 0 ? void 0 : (_theme$business_listi6 = theme.business_listing_view) === null || _theme$business_listi6 === void 0 ? void 0 : (_theme$business_listi7 = _theme$business_listi6.components) === null || _theme$business_listi7 === void 0 ? void 0 : (_theme$business_listi8 = _theme$business_listi7.business) === null || _theme$business_listi8 === void 0 ? void 0 : (_theme$business_listi9 = _theme$business_listi8.components) === null || _theme$business_listi9 === void 0 ? void 0 : (_theme$business_listi10 = _theme$business_listi9.fee) === null || _theme$business_listi10 === void 0 ? void 0 : _theme$business_listi10.hidden;
|
|
104
|
+
var hideBusinessTime = theme === null || theme === void 0 ? void 0 : (_theme$business_listi11 = theme.business_listing_view) === null || _theme$business_listi11 === void 0 ? void 0 : (_theme$business_listi12 = _theme$business_listi11.components) === null || _theme$business_listi12 === void 0 ? void 0 : (_theme$business_listi13 = _theme$business_listi12.business) === null || _theme$business_listi13 === void 0 ? void 0 : (_theme$business_listi14 = _theme$business_listi13.components) === null || _theme$business_listi14 === void 0 ? void 0 : (_theme$business_listi15 = _theme$business_listi14.time) === null || _theme$business_listi15 === void 0 ? void 0 : _theme$business_listi15.hidden;
|
|
105
|
+
var hideBusinessDistance = theme === null || theme === void 0 ? void 0 : (_theme$business_listi16 = theme.business_listing_view) === null || _theme$business_listi16 === void 0 ? void 0 : (_theme$business_listi17 = _theme$business_listi16.components) === null || _theme$business_listi17 === void 0 ? void 0 : (_theme$business_listi18 = _theme$business_listi17.business) === null || _theme$business_listi18 === void 0 ? void 0 : (_theme$business_listi19 = _theme$business_listi18.components) === null || _theme$business_listi19 === void 0 ? void 0 : (_theme$business_listi20 = _theme$business_listi19.distance) === null || _theme$business_listi20 === void 0 ? void 0 : _theme$business_listi20.hidden;
|
|
106
|
+
var hideBusinessReviews = theme === null || theme === void 0 ? void 0 : (_theme$business_listi21 = theme.business_listing_view) === null || _theme$business_listi21 === void 0 ? void 0 : (_theme$business_listi22 = _theme$business_listi21.components) === null || _theme$business_listi22 === void 0 ? void 0 : (_theme$business_listi23 = _theme$business_listi22.business) === null || _theme$business_listi23 === void 0 ? void 0 : (_theme$business_listi24 = _theme$business_listi23.components) === null || _theme$business_listi24 === void 0 ? void 0 : (_theme$business_listi25 = _theme$business_listi24.reviews) === null || _theme$business_listi25 === void 0 ? void 0 : _theme$business_listi25.hidden;
|
|
107
|
+
var hideBusinessFavorite = theme === null || theme === void 0 ? void 0 : (_theme$business_listi26 = theme.business_listing_view) === null || _theme$business_listi26 === void 0 ? void 0 : (_theme$business_listi27 = _theme$business_listi26.components) === null || _theme$business_listi27 === void 0 ? void 0 : (_theme$business_listi28 = _theme$business_listi27.business) === null || _theme$business_listi28 === void 0 ? void 0 : (_theme$business_listi29 = _theme$business_listi28.components) === null || _theme$business_listi29 === void 0 ? void 0 : (_theme$business_listi30 = _theme$business_listi29.favorite) === null || _theme$business_listi30 === void 0 ? void 0 : _theme$business_listi30.hidden;
|
|
108
|
+
var hideBusinessOffer = theme === null || theme === void 0 ? void 0 : (_theme$business_listi31 = theme.business_listing_view) === null || _theme$business_listi31 === void 0 ? void 0 : (_theme$business_listi32 = _theme$business_listi31.components) === null || _theme$business_listi32 === void 0 ? void 0 : (_theme$business_listi33 = _theme$business_listi32.business) === null || _theme$business_listi33 === void 0 ? void 0 : (_theme$business_listi34 = _theme$business_listi33.components) === null || _theme$business_listi34 === void 0 ? void 0 : (_theme$business_listi35 = _theme$business_listi34.offer) === null || _theme$business_listi35 === void 0 ? void 0 : _theme$business_listi35.hidden;
|
|
101
109
|
|
|
102
110
|
// const handleShowAlert = () => {
|
|
103
111
|
// setAlertState({ open: true, content: [t('ERROR_ADD_PRODUCT_BUSINESS_CLOSED', 'The Business is closed at the moment')] })
|
|
@@ -110,7 +118,8 @@ var BusinessControllerUI = function BusinessControllerUI(props) {
|
|
|
110
118
|
};
|
|
111
119
|
var handleChangeFavorite = function handleChangeFavorite() {
|
|
112
120
|
if (auth) {
|
|
113
|
-
|
|
121
|
+
var _businessState$busine;
|
|
122
|
+
handleFavoriteBusiness && handleFavoriteBusiness(!(businessState !== null && businessState !== void 0 && (_businessState$busine = businessState.business) !== null && _businessState$busine !== void 0 && _businessState$busine.favorite));
|
|
114
123
|
} else {
|
|
115
124
|
setModalPageToShow('login');
|
|
116
125
|
setIsModalOpen(true);
|
|
@@ -163,13 +172,13 @@ var BusinessControllerUI = function BusinessControllerUI(props) {
|
|
|
163
172
|
}, business === null || business === void 0 ? void 0 : (_business$ribbon7 = business.ribbon) === null || _business$ribbon7 === void 0 ? void 0 : _business$ribbon7.text), /*#__PURE__*/_react.default.createElement(_styles.BusinessHero, null, isSkeleton ? /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
|
|
164
173
|
height: isCustomerMode ? 100 : 140
|
|
165
174
|
}) : /*#__PURE__*/_react.default.createElement(_styles.BusinessHeader, {
|
|
166
|
-
bgimage: optimizeImage(businessHeader || (business === null || business === void 0 ? void 0 : business.header) || ((_theme$images = theme.images) === null || _theme$images === void 0 ? void 0 : (_theme$images$dummies = _theme$images.dummies) === null || _theme$images$dummies === void 0 ? void 0 : _theme$images$dummies.
|
|
175
|
+
bgimage: optimizeImage(businessHeader || (business === null || business === void 0 ? void 0 : business.header) || ((_theme$images = theme.images) === null || _theme$images === void 0 ? void 0 : (_theme$images$dummies = _theme$images.dummies) === null || _theme$images$dummies === void 0 ? void 0 : _theme$images$dummies.businessHeader), 'h_400,c_limit'),
|
|
167
176
|
isClosed: !isBusinessOpen
|
|
168
177
|
}, /*#__PURE__*/_react.default.createElement(_styles.BusinessTags, null, (businessFeatured !== null && businessFeatured !== void 0 ? businessFeatured : business === null || business === void 0 ? void 0 : business.featured) && /*#__PURE__*/_react.default.createElement("span", {
|
|
169
178
|
className: "crown"
|
|
170
|
-
}, /*#__PURE__*/_react.default.createElement(_FaCrown.default, null)), !isCustomLayout && (configState === null || configState === void 0 ? void 0 : (_configState$configs = configState.configs) === null || _configState$configs === void 0 ? void 0 : (_configState$configs$ = _configState$configs.preorder_status_enabled) === null || _configState$configs$ === void 0 ? void 0 : _configState$configs$.value) === '1' && /*#__PURE__*/_react.default.createElement("div", null, getBusinessOffer(businessOffers !== null && businessOffers !== void 0 ? businessOffers : business === null || business === void 0 ? void 0 : business.offers) && /*#__PURE__*/_react.default.createElement("span", null, getBusinessOffer(businessOffers !== null && businessOffers !== void 0 ? businessOffers : business === null || business === void 0 ? void 0 : business.offers) || parsePrice(0)), !isBusinessOpen && /*#__PURE__*/_react.default.createElement("span", null, t('PREORDER', 'PreOrder')))), !!businessWillCloseSoonMinutes && (orderState === null || orderState === void 0 ? void 0 : (_orderState$options = orderState.options) === null || _orderState$options === void 0 ? void 0 : _orderState$options.moment) === null && isBusinessOpen && /*#__PURE__*/_react.default.createElement("h1", null, businessWillCloseSoonMinutes, " ", t('MINUTES_TO_CLOSE', 'minutes to close')), !isBusinessOpen && /*#__PURE__*/_react.default.createElement("h1", {
|
|
179
|
+
}, /*#__PURE__*/_react.default.createElement(_FaCrown.default, null)), !hideBusinessOffer && !isCustomLayout && (configState === null || configState === void 0 ? void 0 : (_configState$configs = configState.configs) === null || _configState$configs === void 0 ? void 0 : (_configState$configs$ = _configState$configs.preorder_status_enabled) === null || _configState$configs$ === void 0 ? void 0 : _configState$configs$.value) === '1' && /*#__PURE__*/_react.default.createElement("div", null, getBusinessOffer(businessOffers !== null && businessOffers !== void 0 ? businessOffers : business === null || business === void 0 ? void 0 : business.offers) && /*#__PURE__*/_react.default.createElement("span", null, getBusinessOffer(businessOffers !== null && businessOffers !== void 0 ? businessOffers : business === null || business === void 0 ? void 0 : business.offers) || parsePrice(0)), !isBusinessOpen && /*#__PURE__*/_react.default.createElement("span", null, t('PREORDER', 'PreOrder')))), !!businessWillCloseSoonMinutes && (orderState === null || orderState === void 0 ? void 0 : (_orderState$options = orderState.options) === null || _orderState$options === void 0 ? void 0 : _orderState$options.moment) === null && isBusinessOpen && /*#__PURE__*/_react.default.createElement("h1", null, businessWillCloseSoonMinutes, " ", t('MINUTES_TO_CLOSE', 'minutes to close')), !isBusinessOpen && /*#__PURE__*/_react.default.createElement("h1", {
|
|
171
180
|
className: "closed"
|
|
172
|
-
}, t('CLOSED', 'Closed')))), /*#__PURE__*/_react.default.createElement(_styles.BusinessContent, null, /*#__PURE__*/_react.default.createElement(_styles.BusinessLogoWrapper, null, /*#__PURE__*/_react.default.createElement(_styles.WrapperBusinessLogo, {
|
|
181
|
+
}, t('CLOSED', 'Closed')))), /*#__PURE__*/_react.default.createElement(_styles.BusinessContent, null, /*#__PURE__*/_react.default.createElement(_styles.BusinessLogoWrapper, null, !hideBusinessLogo && /*#__PURE__*/_react.default.createElement(_styles.WrapperBusinessLogo, {
|
|
173
182
|
isSkeleton: isSkeleton,
|
|
174
183
|
isCustomerMode: isCustomerMode
|
|
175
184
|
}, !isSkeleton && (businessLogo || business !== null && business !== void 0 && business.logo || (_theme$images2 = theme.images) !== null && _theme$images2 !== void 0 && (_theme$images2$dummie = _theme$images2.dummies) !== null && _theme$images2$dummie !== void 0 && _theme$images2$dummie.businessLogo) ? /*#__PURE__*/_react.default.createElement(_styles.BusinessLogo, {
|
|
@@ -177,14 +186,14 @@ var BusinessControllerUI = function BusinessControllerUI(props) {
|
|
|
177
186
|
}) : /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
|
|
178
187
|
height: 70,
|
|
179
188
|
width: 70
|
|
180
|
-
})), /*#__PURE__*/_react.default.createElement(_styles.BusinessStarInfo, null, !isSkeleton ? (businessReviews !== null && businessReviews !== void 0 ? businessReviews : business === null || business === void 0 ? void 0 : (_business$reviews = business.reviews) === null || _business$reviews === void 0 ? void 0 : _business$reviews.total) > 0 && /*#__PURE__*/_react.default.createElement("div", {
|
|
189
|
+
})), /*#__PURE__*/_react.default.createElement(_styles.BusinessStarInfo, null, !hideBusinessReviews && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, !isSkeleton ? (businessReviews !== null && businessReviews !== void 0 ? businessReviews : business === null || business === void 0 ? void 0 : (_business$reviews = business.reviews) === null || _business$reviews === void 0 ? void 0 : _business$reviews.total) > 0 && /*#__PURE__*/_react.default.createElement("div", {
|
|
181
190
|
className: "reviews"
|
|
182
191
|
}, /*#__PURE__*/_react.default.createElement(_BisStar.default, null), /*#__PURE__*/_react.default.createElement("span", null, businessReviews !== null && businessReviews !== void 0 ? businessReviews : business === null || business === void 0 ? void 0 : (_business$reviews2 = business.reviews) === null || _business$reviews2 === void 0 ? void 0 : _business$reviews2.total)) : /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
|
|
183
192
|
width: 50
|
|
184
|
-
}), /*#__PURE__*/_react.default.createElement(_styles.FavoriteWrapper, {
|
|
193
|
+
})), !hideBusinessFavorite && /*#__PURE__*/_react.default.createElement(_styles.FavoriteWrapper, {
|
|
185
194
|
ref: favoriteRef,
|
|
186
195
|
onClick: handleChangeFavorite
|
|
187
|
-
}, !isSkeleton ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null,
|
|
196
|
+
}, !isSkeleton ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, businessState !== null && businessState !== void 0 && (_businessState$busine2 = businessState.business) !== null && _businessState$busine2 !== void 0 && _businessState$busine2.favorite ? /*#__PURE__*/_react.default.createElement(_reactBootstrapIcons.HeartFill, null) : /*#__PURE__*/_react.default.createElement(_reactBootstrapIcons.Heart, null)) : /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
|
|
188
197
|
width: 16,
|
|
189
198
|
height: 16
|
|
190
199
|
})))), /*#__PURE__*/_react.default.createElement(_styles.BusinessInfo, {
|
|
@@ -194,19 +203,19 @@ var BusinessControllerUI = function BusinessControllerUI(props) {
|
|
|
194
203
|
})), /*#__PURE__*/_react.default.createElement(_styles.Medadata, {
|
|
195
204
|
isCustomerMode: isCustomerMode,
|
|
196
205
|
isSkeleton: isSkeleton
|
|
197
|
-
}, orderType === 1 && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, (businessDeliveryPrice !== null && businessDeliveryPrice !== void 0 ? businessDeliveryPrice : business === null || business === void 0 ? void 0 : business.delivery_price) >= 0 ? /*#__PURE__*/_react.default.createElement("p", null, /*#__PURE__*/_react.default.createElement("span", null, t('DELIVERY_FEE', 'Delivery fee')), business && parsePrice(businessDeliveryPrice !== null && businessDeliveryPrice !== void 0 ? businessDeliveryPrice : business === null || business === void 0 ? void 0 : business.delivery_price)) : /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
|
|
206
|
+
}, !hideBusinessFee && orderType === 1 && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, (businessDeliveryPrice !== null && businessDeliveryPrice !== void 0 ? businessDeliveryPrice : business === null || business === void 0 ? void 0 : business.delivery_price) >= 0 ? /*#__PURE__*/_react.default.createElement("p", null, /*#__PURE__*/_react.default.createElement("span", null, t('DELIVERY_FEE', 'Delivery fee')), business && parsePrice(businessDeliveryPrice !== null && businessDeliveryPrice !== void 0 ? businessDeliveryPrice : business === null || business === void 0 ? void 0 : business.delivery_price)) : /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
|
|
198
207
|
width: isCustomerMode ? 70 : 65
|
|
199
|
-
})), Object.keys(business).length > 0 ? /*#__PURE__*/_react.default.createElement("p", {
|
|
208
|
+
})), !hideBusinessTime && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, Object.keys(business).length > 0 ? /*#__PURE__*/_react.default.createElement("p", {
|
|
200
209
|
className: "bullet"
|
|
201
210
|
}, /*#__PURE__*/_react.default.createElement(_GoPrimitiveDot.default, null), (0, _utils.convertHoursToMinutes)((orderState === null || orderState === void 0 ? void 0 : (_orderState$options2 = orderState.options) === null || _orderState$options2 === void 0 ? void 0 : _orderState$options2.type) === 1 ? businessDeliveryTime !== null && businessDeliveryTime !== void 0 ? businessDeliveryTime : business === null || business === void 0 ? void 0 : business.delivery_time : businessPickupTime !== null && businessPickupTime !== void 0 ? businessPickupTime : business === null || business === void 0 ? void 0 : business.pickup_time) || /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
|
|
202
211
|
width: 100
|
|
203
212
|
})) : /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
|
|
204
213
|
width: 65
|
|
205
|
-
}), (businessDistance !== null && businessDistance !== void 0 ? businessDistance : business === null || business === void 0 ? void 0 : business.distance) >= 0 ? /*#__PURE__*/_react.default.createElement("p", {
|
|
214
|
+
})), !hideBusinessDistance && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, (businessDistance !== null && businessDistance !== void 0 ? businessDistance : business === null || business === void 0 ? void 0 : business.distance) >= 0 ? /*#__PURE__*/_react.default.createElement("p", {
|
|
206
215
|
className: "bullet"
|
|
207
216
|
}, /*#__PURE__*/_react.default.createElement(_GoPrimitiveDot.default, null), parseDistance(businessDistance !== null && businessDistance !== void 0 ? businessDistance : business === null || business === void 0 ? void 0 : business.distance)) : /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
|
|
208
217
|
width: 65
|
|
209
|
-
}), isCustomerMode && hasInformationLength && /*#__PURE__*/_react.default.createElement(_styles.CallCenterInformation, null, (business === null || business === void 0 ? void 0 : (_business$available_d2 = business.available_drivers) === null || _business$available_d2 === void 0 ? void 0 : _business$available_d2.length) > 0 && /*#__PURE__*/_react.default.createElement(_styles.CallCenterInformationBullet, null, /*#__PURE__*/_react.default.createElement(_styles.InfoLength, null, business === null || business === void 0 ? void 0 : (_business$available_d3 = business.available_drivers) === null || _business$available_d3 === void 0 ? void 0 : _business$available_d3.length), /*#__PURE__*/_react.default.createElement(_styles.InfoDescription, null, t('OPEN_ORDERS', 'Open orders'))), (business === null || business === void 0 ? void 0 : (_business$busy_driver2 = business.busy_drivers) === null || _business$busy_driver2 === void 0 ? void 0 : _business$busy_driver2.length) > 0 && /*#__PURE__*/_react.default.createElement(_styles.CallCenterInformationBullet, null, /*#__PURE__*/_react.default.createElement(_styles.InfoLength, null, business === null || business === void 0 ? void 0 : (_business$busy_driver3 = business.busy_drivers) === null || _business$busy_driver3 === void 0 ? void 0 : _business$busy_driver3.length), /*#__PURE__*/_react.default.createElement(_styles.InfoDescription, null, t('BUSY_DRIVERS', 'Busy drivers'))), (business === null || business === void 0 ? void 0 : (_business$active_orde2 = business.active_orders) === null || _business$active_orde2 === void 0 ? void 0 : _business$active_orde2.length) > 0 && /*#__PURE__*/_react.default.createElement(_styles.CallCenterInformationBullet, null, /*#__PURE__*/_react.default.createElement(_styles.InfoLength, null, business === null || business === void 0 ? void 0 : (_business$active_orde3 = business.active_orders) === null || _business$active_orde3 === void 0 ? void 0 : _business$active_orde3.length), /*#__PURE__*/_react.default.createElement(_styles.InfoDescription, null, t('AVAILABLE_DRIVERS', 'Avalable drivers')))))))))), /*#__PURE__*/_react.default.createElement(_Confirm.Alert, {
|
|
218
|
+
})), isCustomerMode && hasInformationLength && /*#__PURE__*/_react.default.createElement(_styles.CallCenterInformation, null, (business === null || business === void 0 ? void 0 : (_business$available_d2 = business.available_drivers) === null || _business$available_d2 === void 0 ? void 0 : _business$available_d2.length) > 0 && /*#__PURE__*/_react.default.createElement(_styles.CallCenterInformationBullet, null, /*#__PURE__*/_react.default.createElement(_styles.InfoLength, null, business === null || business === void 0 ? void 0 : (_business$available_d3 = business.available_drivers) === null || _business$available_d3 === void 0 ? void 0 : _business$available_d3.length), /*#__PURE__*/_react.default.createElement(_styles.InfoDescription, null, t('OPEN_ORDERS', 'Open orders'))), (business === null || business === void 0 ? void 0 : (_business$busy_driver2 = business.busy_drivers) === null || _business$busy_driver2 === void 0 ? void 0 : _business$busy_driver2.length) > 0 && /*#__PURE__*/_react.default.createElement(_styles.CallCenterInformationBullet, null, /*#__PURE__*/_react.default.createElement(_styles.InfoLength, null, business === null || business === void 0 ? void 0 : (_business$busy_driver3 = business.busy_drivers) === null || _business$busy_driver3 === void 0 ? void 0 : _business$busy_driver3.length), /*#__PURE__*/_react.default.createElement(_styles.InfoDescription, null, t('BUSY_DRIVERS', 'Busy drivers'))), (business === null || business === void 0 ? void 0 : (_business$active_orde2 = business.active_orders) === null || _business$active_orde2 === void 0 ? void 0 : _business$active_orde2.length) > 0 && /*#__PURE__*/_react.default.createElement(_styles.CallCenterInformationBullet, null, /*#__PURE__*/_react.default.createElement(_styles.InfoLength, null, business === null || business === void 0 ? void 0 : (_business$active_orde3 = business.active_orders) === null || _business$active_orde3 === void 0 ? void 0 : _business$active_orde3.length), /*#__PURE__*/_react.default.createElement(_styles.InfoDescription, null, t('AVAILABLE_DRIVERS', 'Avalable drivers')))))))))), /*#__PURE__*/_react.default.createElement(_Confirm.Alert, {
|
|
210
219
|
title: t('BUSINESS_CLOSED', 'Business Closed'),
|
|
211
220
|
content: alertState.content,
|
|
212
221
|
acceptText: t('ACCEPT', 'Accept'),
|
|
@@ -48,10 +48,10 @@ var BusinessReviewsUI = function BusinessReviewsUI(props) {
|
|
|
48
48
|
var handleClickRaiting = function handleClickRaiting(raiting) {
|
|
49
49
|
if (raiting) handleClickOption(raiting);
|
|
50
50
|
};
|
|
51
|
-
var showRanking = !(orderingTheme !== null && orderingTheme !== void 0 && (_orderingTheme$theme = orderingTheme.theme) !== null && _orderingTheme$theme !== void 0 && (_orderingTheme$theme$ = _orderingTheme$theme.business_view) !== null && _orderingTheme$theme$ !== void 0 && (_orderingTheme$theme$2 = _orderingTheme$theme$.components) !== null && _orderingTheme$theme$2 !== void 0 && (_orderingTheme$theme$3 = _orderingTheme$theme$2.
|
|
52
|
-
var showReviewDate = !(orderingTheme !== null && orderingTheme !== void 0 && (_orderingTheme$theme2 = orderingTheme.theme) !== null && _orderingTheme$theme2 !== void 0 && (_orderingTheme$theme3 = _orderingTheme$theme2.business_view) !== null && _orderingTheme$theme3 !== void 0 && (_orderingTheme$theme4 = _orderingTheme$theme3.components) !== null && _orderingTheme$theme4 !== void 0 && (_orderingTheme$theme5 = _orderingTheme$theme4.
|
|
53
|
-
var showCustomerComments = !(orderingTheme !== null && orderingTheme !== void 0 && (_orderingTheme$theme8 = orderingTheme.theme) !== null && _orderingTheme$theme8 !== void 0 && (_orderingTheme$theme9 = _orderingTheme$theme8.business_view) !== null && _orderingTheme$theme9 !== void 0 && (_orderingTheme$theme10 = _orderingTheme$theme9.components) !== null && _orderingTheme$theme10 !== void 0 && (_orderingTheme$theme11 = _orderingTheme$theme10.
|
|
54
|
-
var showSearch = !(orderingTheme !== null && orderingTheme !== void 0 && (_orderingTheme$theme14 = orderingTheme.theme) !== null && _orderingTheme$theme14 !== void 0 && (_orderingTheme$theme15 = _orderingTheme$theme14.business_view) !== null && _orderingTheme$theme15 !== void 0 && (_orderingTheme$theme16 = _orderingTheme$theme15.components) !== null && _orderingTheme$theme16 !== void 0 && (_orderingTheme$theme17 = _orderingTheme$theme16.
|
|
51
|
+
var showRanking = !(orderingTheme !== null && orderingTheme !== void 0 && (_orderingTheme$theme = orderingTheme.theme) !== null && _orderingTheme$theme !== void 0 && (_orderingTheme$theme$ = _orderingTheme$theme.business_view) !== null && _orderingTheme$theme$ !== void 0 && (_orderingTheme$theme$2 = _orderingTheme$theme$.components) !== null && _orderingTheme$theme$2 !== void 0 && (_orderingTheme$theme$3 = _orderingTheme$theme$2.review) !== 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.ranking) !== null && _orderingTheme$theme$5 !== void 0 && _orderingTheme$theme$5.hidden);
|
|
52
|
+
var showReviewDate = !(orderingTheme !== null && orderingTheme !== void 0 && (_orderingTheme$theme2 = orderingTheme.theme) !== null && _orderingTheme$theme2 !== void 0 && (_orderingTheme$theme3 = _orderingTheme$theme2.business_view) !== null && _orderingTheme$theme3 !== void 0 && (_orderingTheme$theme4 = _orderingTheme$theme3.components) !== null && _orderingTheme$theme4 !== void 0 && (_orderingTheme$theme5 = _orderingTheme$theme4.review) !== null && _orderingTheme$theme5 !== void 0 && (_orderingTheme$theme6 = _orderingTheme$theme5.components) !== null && _orderingTheme$theme6 !== void 0 && (_orderingTheme$theme7 = _orderingTheme$theme6.review_date) !== null && _orderingTheme$theme7 !== void 0 && _orderingTheme$theme7.hidden);
|
|
53
|
+
var showCustomerComments = !(orderingTheme !== null && orderingTheme !== void 0 && (_orderingTheme$theme8 = orderingTheme.theme) !== null && _orderingTheme$theme8 !== void 0 && (_orderingTheme$theme9 = _orderingTheme$theme8.business_view) !== null && _orderingTheme$theme9 !== void 0 && (_orderingTheme$theme10 = _orderingTheme$theme9.components) !== null && _orderingTheme$theme10 !== void 0 && (_orderingTheme$theme11 = _orderingTheme$theme10.review) !== null && _orderingTheme$theme11 !== void 0 && (_orderingTheme$theme12 = _orderingTheme$theme11.components) !== null && _orderingTheme$theme12 !== void 0 && (_orderingTheme$theme13 = _orderingTheme$theme12.customer_comments) !== null && _orderingTheme$theme13 !== void 0 && _orderingTheme$theme13.hidden);
|
|
54
|
+
var showSearch = !(orderingTheme !== null && orderingTheme !== void 0 && (_orderingTheme$theme14 = orderingTheme.theme) !== null && _orderingTheme$theme14 !== void 0 && (_orderingTheme$theme15 = _orderingTheme$theme14.business_view) !== null && _orderingTheme$theme15 !== void 0 && (_orderingTheme$theme16 = _orderingTheme$theme15.components) !== null && _orderingTheme$theme16 !== void 0 && (_orderingTheme$theme17 = _orderingTheme$theme16.review) !== null && _orderingTheme$theme17 !== void 0 && (_orderingTheme$theme18 = _orderingTheme$theme17.components) !== null && _orderingTheme$theme18 !== void 0 && (_orderingTheme$theme19 = _orderingTheme$theme18.search) !== null && _orderingTheme$theme19 !== void 0 && _orderingTheme$theme19.hidden);
|
|
55
55
|
var hideElement = !(!showReviewDate && !showCustomerComments);
|
|
56
56
|
var reviewPoints = [1, 2, 3, 4, 5];
|
|
57
57
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, (_props$beforeElements = props.beforeElements) === null || _props$beforeElements === void 0 ? void 0 : _props$beforeElements.map(function (BeforeElement, i) {
|
|
@@ -51,7 +51,7 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
51
51
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
52
52
|
var PIXELS_TO_SCROLL = 300;
|
|
53
53
|
var BusinessesListingUI = function BusinessesListingUI(props) {
|
|
54
|
-
var _theme$business_listi, _theme$business_listi2, _theme$business_listi3, _theme$business_listi4, _businessesList$busin, _businessesList$busin3, _props$beforeElements, _props$beforeComponen, _orderState$options3, _orderState$options3$, _theme$images2, _theme$images2$genera, _theme$
|
|
54
|
+
var _theme$business_listi, _theme$business_listi2, _theme$business_listi3, _theme$business_listi4, _theme$business_listi5, _theme$business_listi6, _theme$business_listi7, _theme$business_listi8, _theme$business_listi9, _theme$business_listi10, _businessesList$busin, _businessesList$busin3, _props$beforeElements, _props$beforeComponen, _orderState$options3, _orderState$options3$, _theme$images2, _theme$images2$genera, _theme$business_listi11, _theme$business_listi12, _theme$business_listi13, _theme$business_listi14, _Object$values, _citiesState$cities2, _citiesState$cities3, _citiesState$cities3$, _configs$advanced_bus, _orderState$options5, _orderState$options5$, _configs$advanced_bus2, _orderState$options6, _orderState$options6$, _businessesList$busin6, _businessesList$busin7, _orderState$options9, _citiesState$cities4, _props$afterComponent, _props$afterElements;
|
|
55
55
|
var businessesList = props.businessesList,
|
|
56
56
|
paginationProps = props.paginationProps,
|
|
57
57
|
searchValue = props.searchValue,
|
|
@@ -128,6 +128,9 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
|
|
|
128
128
|
favoriteIds = _useState18[0],
|
|
129
129
|
setFavoriteIds = _useState18[1];
|
|
130
130
|
var hideCities = (_theme$business_listi = theme === null || theme === void 0 ? void 0 : (_theme$business_listi2 = theme.business_listing_view) === null || _theme$business_listi2 === void 0 ? void 0 : (_theme$business_listi3 = _theme$business_listi2.components) === null || _theme$business_listi3 === void 0 ? void 0 : (_theme$business_listi4 = _theme$business_listi3.cities) === null || _theme$business_listi4 === void 0 ? void 0 : _theme$business_listi4.hidden) !== null && _theme$business_listi !== void 0 ? _theme$business_listi : true;
|
|
131
|
+
var hideSearch = theme === null || theme === void 0 ? void 0 : (_theme$business_listi5 = theme.business_listing_view) === null || _theme$business_listi5 === void 0 ? void 0 : (_theme$business_listi6 = _theme$business_listi5.components) === null || _theme$business_listi6 === void 0 ? void 0 : (_theme$business_listi7 = _theme$business_listi6.search) === null || _theme$business_listi7 === void 0 ? void 0 : _theme$business_listi7.hidden;
|
|
132
|
+
var hideFilter = theme === null || theme === void 0 ? void 0 : (_theme$business_listi8 = theme.business_listing_view) === null || _theme$business_listi8 === void 0 ? void 0 : (_theme$business_listi9 = _theme$business_listi8.components) === null || _theme$business_listi9 === void 0 ? void 0 : (_theme$business_listi10 = _theme$business_listi9.filter) === null || _theme$business_listi10 === void 0 ? void 0 : _theme$business_listi10.hidden;
|
|
133
|
+
var hideSearchSection = hideCities && hideSearch && hideFilter;
|
|
131
134
|
var businessesIds = isCustomLayout && businessesList.businesses && ((_businessesList$busin = businessesList.businesses) === null || _businessesList$busin === void 0 ? void 0 : _businessesList$busin.map(function (business) {
|
|
132
135
|
return business.id;
|
|
133
136
|
}));
|
|
@@ -305,7 +308,7 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
|
|
|
305
308
|
isBanner: true
|
|
306
309
|
})))), /*#__PURE__*/_react.default.createElement(_styles.BusinessHeroImg, {
|
|
307
310
|
bgimage: (_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.businessHero,
|
|
308
|
-
height: theme === null || theme === void 0 ? void 0 : (_theme$
|
|
311
|
+
height: theme === null || theme === void 0 ? void 0 : (_theme$business_listi11 = theme.business_listing_view) === null || _theme$business_listi11 === void 0 ? void 0 : (_theme$business_listi12 = _theme$business_listi11.components) === null || _theme$business_listi12 === void 0 ? void 0 : (_theme$business_listi13 = _theme$business_listi12.business_hero) === null || _theme$business_listi13 === void 0 ? void 0 : (_theme$business_listi14 = _theme$business_listi13.style) === null || _theme$business_listi14 === void 0 ? void 0 : _theme$business_listi14.height
|
|
309
312
|
})), !!((_Object$values = Object.values(orderState === null || orderState === void 0 ? void 0 : orderState.carts)) !== null && _Object$values !== void 0 && _Object$values.length) && /*#__PURE__*/_react.default.createElement(_styles.OrderProgressWrapper, null, /*#__PURE__*/_react.default.createElement(_OrderProgress.OrderProgress, {
|
|
310
313
|
franchiseId: props.franchiseId,
|
|
311
314
|
userCustomerId: userCustomer === null || userCustomer === void 0 ? void 0 : userCustomer.id,
|
|
@@ -313,10 +316,10 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
|
|
|
313
316
|
isCustomerMode: isCustomerMode
|
|
314
317
|
})), isCustomerMode && /*#__PURE__*/_react.default.createElement(OrdersSection, {
|
|
315
318
|
titleContent: t('PREVIOUS_ORDERS', 'Previous orders')
|
|
316
|
-
}), !isCustomerMode && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_styles.WrapperSearch, {
|
|
319
|
+
}), !isCustomerMode && !hideSearchSection && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_styles.WrapperSearch, {
|
|
317
320
|
isCustomLayout: isCustomLayout,
|
|
318
321
|
isCustomerMode: isCustomerMode
|
|
319
|
-
}, /*#__PURE__*/_react.default.createElement(_SearchBar.SearchBar, {
|
|
322
|
+
}, !hideSearch && /*#__PURE__*/_react.default.createElement(_SearchBar.SearchBar, {
|
|
320
323
|
lazyLoad: true,
|
|
321
324
|
search: searchValue,
|
|
322
325
|
isCustomLayout: isCustomLayout,
|
|
@@ -333,7 +336,7 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
|
|
|
333
336
|
}, (citiesState === null || citiesState === void 0 ? void 0 : (_citiesState$cities3 = citiesState.cities) === null || _citiesState$cities3 === void 0 ? void 0 : (_citiesState$cities3$ = _citiesState$cities3.find(function (city) {
|
|
334
337
|
var _orderState$options4;
|
|
335
338
|
return (city === null || city === void 0 ? void 0 : city.id) === (orderState === null || orderState === void 0 ? void 0 : (_orderState$options4 = orderState.options) === null || _orderState$options4 === void 0 ? void 0 : _orderState$options4.city_id);
|
|
336
|
-
})) === null || _citiesState$cities3$ === void 0 ? void 0 : _citiesState$cities3$.name) || t('SELECT_A_CITY', 'Select a city')), (configs === null || configs === void 0 ? void 0 : (_configs$advanced_bus = configs.advanced_business_search_enabled) === null || _configs$advanced_bus === void 0 ? void 0 : _configs$advanced_bus.value) === '1' && /*#__PURE__*/_react.default.createElement(_FiFilter.default, {
|
|
339
|
+
})) === null || _citiesState$cities3$ === void 0 ? void 0 : _citiesState$cities3$.name) || t('SELECT_A_CITY', 'Select a city')), !hideFilter && (configs === null || configs === void 0 ? void 0 : (_configs$advanced_bus = configs.advanced_business_search_enabled) === null || _configs$advanced_bus === void 0 ? void 0 : _configs$advanced_bus.value) === '1' && /*#__PURE__*/_react.default.createElement(_FiFilter.default, {
|
|
337
340
|
onClick: function onClick() {
|
|
338
341
|
return onRedirectPage({
|
|
339
342
|
page: 'business_search'
|
|
@@ -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
|
|