ordering-ui-external 14.1.49 → 14.1.52
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/{7.ordering-ui.697d19ddfcc29dfbeb52.js → 7.ordering-ui.746cebc54de638e8e528.js} +1 -1
- package/_bundles/ordering-ui.746cebc54de638e8e528.js +2 -0
- package/_modules/components/GoogleGpsButton/index.js +11 -3
- package/_modules/components/VerticalOrdersLayout/styles.js +1 -1
- package/_modules/themes/callcenterOriginal/index.js +7 -0
- package/_modules/themes/callcenterOriginal/src/components/AddressForm/index.js +22 -5
- package/_modules/themes/callcenterOriginal/src/components/AddressForm/styles.js +10 -7
- package/_modules/themes/callcenterOriginal/src/components/AddressList/index.js +59 -19
- package/_modules/themes/callcenterOriginal/src/components/AddressList/styles.js +10 -4
- package/_modules/themes/callcenterOriginal/src/components/ConfirmAddressForm/index.js +638 -0
- package/_modules/themes/callcenterOriginal/src/components/ConfirmAddressForm/styles.js +50 -0
- package/_modules/themes/callcenterOriginal/src/components/Header/index.js +33 -4
- package/_modules/themes/callcenterOriginal/src/components/InputPhoneNumber/index.js +17 -10
- package/_modules/themes/callcenterOriginal/src/components/PhoneAutocomplete/index.js +58 -106
- package/_modules/themes/callcenterOriginal/src/components/PhoneAutocomplete/styles.js +6 -29
- package/_modules/themes/callcenterOriginal/src/components/SearchBar/index.js +2 -2
- package/_modules/themes/callcenterOriginal/src/components/SignUpForm/index.js +21 -1
- package/_modules/themes/callcenterOriginal/src/components/UserDetails/index.js +49 -8
- package/_modules/themes/callcenterOriginal/src/components/UserDetails/styles.js +12 -9
- package/_modules/themes/callcenterOriginal/src/components/UserFormDetails/index.js +30 -12
- package/_modules/themes/callcenterOriginal/src/components/UserFormDetails/styles.js +11 -5
- package/_modules/themes/five/src/components/BusinessBasicInformation/index.js +1 -1
- package/_modules/themes/five/src/components/BusinessController/franchises/OloBusinessController/index.js +192 -0
- package/_modules/themes/five/src/components/BusinessController/franchises/OloBusinessController/styles.js +114 -0
- package/_modules/themes/five/src/components/BusinessesListing/franchises/OloBusinessesListing/index.js +572 -0
- package/_modules/themes/five/src/components/BusinessesListing/franchises/OloBusinessesListing/styles.js +89 -0
- package/_modules/themes/five/src/components/BusinessesListing/index.js +6 -2
- package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +31 -118
- package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/styles.js +1 -1
- package/_modules/themes/five/src/components/Checkout/OrderDetail.js +1 -3
- package/_modules/themes/five/src/components/Checkout/index.js +22 -4
- package/_modules/themes/five/src/components/DriverTips/styles.js +1 -1
- package/_modules/themes/five/src/components/Header/index.js +8 -7
- package/_modules/themes/five/src/components/Header/styles.js +28 -25
- package/_modules/themes/five/src/components/HighestRated/franchises/OloHighestRated/index.js +116 -0
- package/_modules/themes/five/src/components/HighestRated/franchises/OloHighestRated/styles.js +22 -0
- package/_modules/themes/five/src/components/HomeHero/franchises/OloHomeHero/index.js +136 -0
- package/_modules/themes/five/src/components/HomeHero/franchises/OloHomeHero/styles.js +46 -0
- package/_modules/themes/five/src/components/HomeHero/index.js +5 -2
- package/_modules/themes/five/src/components/InputPhoneNumber/index.js +19 -12
- package/_modules/themes/five/src/components/LogoutPopup/index.js +2 -1
- package/_modules/themes/five/src/components/Modal/index.js +6 -3
- package/_modules/themes/five/src/components/MultiOrdersDetails/styles.js +2 -2
- package/_modules/themes/five/src/components/OrderDetails/layouts/Kiosk/index.js +2 -1
- package/_modules/themes/five/src/components/OrderItAgain/styles.js +1 -1
- package/_modules/themes/five/src/components/OrderTypesSquares/index.js +160 -0
- package/_modules/themes/five/src/components/OrderTypesSquares/styles.js +39 -0
- package/_modules/themes/five/src/components/ProductItemAccordion/index.js +4 -4
- package/_modules/themes/five/src/components/RenderProductsLayout/styles.js +1 -1
- package/_modules/themes/five/src/components/SearchBar/index.js +2 -2
- package/_modules/themes/five/src/components/SignUpForm/index.js +11 -8
- package/_modules/themes/five/src/components/SingleProductCard/layouts/original/styles.js +1 -1
- package/_modules/themes/five/src/components/UserDetails/index.js +5 -2
- package/_modules/themes/five/src/styles/Buttons/index.js +1 -1
- package/index-template.js +9 -1
- package/package.json +2 -2
- package/src/components/GoogleGpsButton/index.js +10 -2
- package/src/components/VerticalOrdersLayout/styles.js +2 -2
- package/src/themes/callcenterOriginal/index.js +2 -0
- package/src/themes/callcenterOriginal/src/components/AddressForm/index.js +44 -23
- package/src/themes/callcenterOriginal/src/components/AddressForm/styles.js +8 -0
- package/src/themes/callcenterOriginal/src/components/AddressList/index.js +67 -22
- package/src/themes/callcenterOriginal/src/components/AddressList/styles.js +16 -1
- package/src/themes/callcenterOriginal/src/components/ConfirmAddressForm/index.js +579 -0
- package/src/themes/callcenterOriginal/src/components/ConfirmAddressForm/styles.js +275 -0
- package/src/themes/callcenterOriginal/src/components/Header/index.js +22 -0
- package/src/themes/callcenterOriginal/src/components/InputPhoneNumber/index.js +13 -8
- package/src/themes/callcenterOriginal/src/components/PhoneAutocomplete/index.js +34 -100
- package/src/themes/callcenterOriginal/src/components/PhoneAutocomplete/styles.js +0 -52
- package/src/themes/callcenterOriginal/src/components/SearchBar/index.js +2 -2
- package/src/themes/callcenterOriginal/src/components/SignUpForm/index.js +19 -1
- package/src/themes/callcenterOriginal/src/components/UserDetails/index.js +45 -11
- package/src/themes/callcenterOriginal/src/components/UserDetails/styles.js +3 -1
- package/src/themes/callcenterOriginal/src/components/UserFormDetails/index.js +40 -14
- package/src/themes/callcenterOriginal/src/components/UserFormDetails/styles.js +19 -1
- package/src/themes/five/src/components/BusinessBasicInformation/index.js +1 -1
- package/src/themes/five/src/components/BusinessController/franchises/OloBusinessController/index.js +237 -0
- package/src/themes/five/src/components/BusinessController/franchises/OloBusinessController/styles.js +367 -0
- package/src/themes/five/src/components/BusinessesListing/franchises/OloBusinessesListing/index.js +582 -0
- package/src/themes/five/src/components/BusinessesListing/franchises/OloBusinessesListing/styles.js +307 -0
- package/src/themes/five/src/components/BusinessesListing/index.js +19 -4
- package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +7 -104
- package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/styles.js +2 -2
- package/src/themes/five/src/components/Checkout/OrderDetail.js +1 -5
- package/src/themes/five/src/components/Checkout/index.js +20 -2
- package/src/themes/five/src/components/DriverTips/styles.js +1 -0
- package/src/themes/five/src/components/Header/index.js +17 -12
- package/src/themes/five/src/components/Header/styles.js +51 -4
- package/src/themes/five/src/components/HighestRated/franchises/OloHighestRated/index.js +114 -0
- package/src/themes/five/src/components/HighestRated/franchises/OloHighestRated/styles.js +57 -0
- package/src/themes/five/src/components/HomeHero/franchises/OloHomeHero/index.js +122 -0
- package/src/themes/five/src/components/HomeHero/franchises/OloHomeHero/styles.js +125 -0
- package/src/themes/five/src/components/HomeHero/index.js +16 -3
- package/src/themes/five/src/components/InputPhoneNumber/index.js +14 -9
- package/src/themes/five/src/components/LogoutPopup/index.js +3 -1
- package/src/themes/five/src/components/Modal/index.js +6 -3
- package/src/themes/five/src/components/MultiOrdersDetails/styles.js +3 -3
- package/src/themes/five/src/components/OrderDetails/layouts/Kiosk/index.js +3 -1
- package/src/themes/five/src/components/OrderItAgain/styles.js +2 -0
- package/src/themes/five/src/components/OrderTypesSquares/index.js +157 -0
- package/src/themes/five/src/components/OrderTypesSquares/styles.js +62 -0
- package/src/themes/five/src/components/ProductItemAccordion/index.js +2 -2
- package/src/themes/five/src/components/RenderProductsLayout/styles.js +2 -0
- package/src/themes/five/src/components/SearchBar/index.js +2 -2
- package/src/themes/five/src/components/SignUpForm/index.js +5 -3
- package/src/themes/five/src/components/SingleProductCard/layouts/original/styles.js +1 -1
- package/src/themes/five/src/components/UserDetails/index.js +3 -1
- package/src/themes/five/src/styles/Buttons/index.js +2 -2
- package/template/app.js +14 -11
- package/template/assets/images/catering.svg +13 -0
- package/template/assets/images/curbside.svg +19 -0
- package/template/assets/images/drivethru.svg +19 -0
- package/template/assets/images/eatin.svg +17 -0
- package/template/components/SubdomainComponent/index.js +4 -8
- package/template/pages/BusinessesList/index.js +1 -1
- package/_bundles/ordering-ui.697d19ddfcc29dfbeb52.js +0 -2
- /package/_bundles/{0.ordering-ui.697d19ddfcc29dfbeb52.js → 0.ordering-ui.746cebc54de638e8e528.js} +0 -0
- /package/_bundles/{1.ordering-ui.697d19ddfcc29dfbeb52.js → 1.ordering-ui.746cebc54de638e8e528.js} +0 -0
- /package/_bundles/{2.ordering-ui.697d19ddfcc29dfbeb52.js → 2.ordering-ui.746cebc54de638e8e528.js} +0 -0
- /package/_bundles/{4.ordering-ui.697d19ddfcc29dfbeb52.js → 4.ordering-ui.746cebc54de638e8e528.js} +0 -0
- /package/_bundles/{5.ordering-ui.697d19ddfcc29dfbeb52.js → 5.ordering-ui.746cebc54de638e8e528.js} +0 -0
- /package/_bundles/{6.ordering-ui.697d19ddfcc29dfbeb52.js → 6.ordering-ui.746cebc54de638e8e528.js} +0 -0
- /package/_bundles/{7.ordering-ui.697d19ddfcc29dfbeb52.js.LICENSE.txt → 7.ordering-ui.746cebc54de638e8e528.js.LICENSE.txt} +0 -0
- /package/_bundles/{8.ordering-ui.697d19ddfcc29dfbeb52.js → 8.ordering-ui.746cebc54de638e8e528.js} +0 -0
- /package/_bundles/{9.ordering-ui.697d19ddfcc29dfbeb52.js → 9.ordering-ui.746cebc54de638e8e528.js} +0 -0
- /package/_bundles/{ordering-ui.697d19ddfcc29dfbeb52.js.LICENSE.txt → ordering-ui.746cebc54de638e8e528.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.WrapperMap = exports.WrapInput = exports.ViewLocations = exports.TypesContainer = exports.TypeButton = exports.Title = exports.Subtitle = exports.Separator = exports.PreviousOrders = exports.PaginationContainer = exports.LoadMoreButtonCityWrap = exports.IconTypeButton = exports.HightestRatedWrapper = exports.HeaderSearchMode = exports.ErrorMessage = exports.Divider = exports.CityContainer = exports.CitiesContainer = exports.BusinessSearch = exports.BusinessListContainer = exports.BusinessList = exports.BusinessContainer = exports.AddressFormWrapper = exports.AdditionalTypesWrapper = exports.AdditionalTypesContainer = void 0;
|
|
8
|
+
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
9
|
+
var _react = _interopRequireDefault(require("react"));
|
|
10
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22, _templateObject23, _templateObject24, _templateObject25, _templateObject26, _templateObject27, _templateObject28, _templateObject29, _templateObject30, _templateObject31, _templateObject32, _templateObject33;
|
|
11
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
13
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
14
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
15
|
+
var BusinessContainer = exports.BusinessContainer = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n width: 100%;\n height: 100%;\n"])));
|
|
16
|
+
var BusinessSearch = exports.BusinessSearch = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n background-color: #f8f9fa;\n align-items: center;\n padding: 7px;\n border-radius: 7px;\n font-size: 11px;\n svg {\n font-size: 15px;\n }\n"])));
|
|
17
|
+
var BusinessList = exports.BusinessList = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex;\n flex-wrap: wrap;\n"])));
|
|
18
|
+
var ErrorMessage = exports.ErrorMessage = _styledComponents.default.span(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n padding: 20px;\n width: 100%;\n background-color: #CCCCCC;\n margin: 0px 15px;\n color: #D81313;\n font-weight: bold;\n"])));
|
|
19
|
+
var PreviousOrders = exports.PreviousOrders = _styledComponents.default.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n display: flex;\n flex-wrap: wrap;\n margin: 10px 20px 0px;\n"])));
|
|
20
|
+
var HightestRatedWrapper = exports.HightestRatedWrapper = _styledComponents.default.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n padding: 50px 0 30px 0;\n"])));
|
|
21
|
+
var Divider = exports.Divider = _styledComponents.default.div(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n background: rgb(230, 234, 233);\n height: 8px;\n width: 100%;\n"])));
|
|
22
|
+
var HeaderSearchMode = exports.HeaderSearchMode = _styledComponents.default.div(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n position: absolute;\n width: 200px;\n"])));
|
|
23
|
+
var AddressFormWrapper = exports.AddressFormWrapper = _styledComponents.default.div(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n @media (min-width: 450px) {\n margin-top: 20px;\n }\n"])));
|
|
24
|
+
var IconTypeButton = exports.IconTypeButton = _styledComponents.default.div(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: center;\n align-items: center;\n width: 44px;\n height: 44px;\n background: ", ";\n border-radius: 44px;\n"])), function (_ref) {
|
|
25
|
+
var _theme$colors;
|
|
26
|
+
var activated = _ref.activated,
|
|
27
|
+
theme = _ref.theme;
|
|
28
|
+
return activated ? theme === null || theme === void 0 || (_theme$colors = theme.colors) === null || _theme$colors === void 0 ? void 0 : _theme$colors.white : '#F3F9FF';
|
|
29
|
+
});
|
|
30
|
+
var TypesContainer = exports.TypesContainer = _styledComponents.default.div(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n display: flex;\n margin-top: 20px;\n"])));
|
|
31
|
+
var AdditionalTypesContainer = exports.AdditionalTypesContainer = _styledComponents.default.div(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n width: 60%;\n display: flex;\n margin-bottom: 20px;\n button {\n padding: 4px 10px;\n border-radius: 50px;\n font-size: 10px;\n line-height: 0;\n height: 25px;\n margin-right: 20px;\n }\n .activated {\n color: ", "\n }\n"])), function (_ref2) {
|
|
32
|
+
var _theme$colors2;
|
|
33
|
+
var theme = _ref2.theme;
|
|
34
|
+
return theme === null || theme === void 0 || (_theme$colors2 = theme.colors) === null || _theme$colors2 === void 0 ? void 0 : _theme$colors2.darkTextColor;
|
|
35
|
+
});
|
|
36
|
+
var TypeButton = exports.TypeButton = _styledComponents.default.div(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n width: 215px;\n height: 75px;\n border-radius: 7.6px;\n padding: 16px;\n box-shadow: 0px 1px 4px 0px rgba(0, 0, 0, 0.10);\n margin-right: 32px;\n cursor: pointer;\n box-sizing: border-box;\n background: ", ";\n p{\n margin: 0;\n margin-left: 33px;\n ", "\n }\n"])), function (_ref3) {
|
|
37
|
+
var _theme$colors3, _theme$colors4;
|
|
38
|
+
var activated = _ref3.activated,
|
|
39
|
+
theme = _ref3.theme;
|
|
40
|
+
return activated ? theme === null || theme === void 0 || (_theme$colors3 = theme.colors) === null || _theme$colors3 === void 0 ? void 0 : _theme$colors3.primary : theme === null || theme === void 0 || (_theme$colors4 = theme.colors) === null || _theme$colors4 === void 0 ? void 0 : _theme$colors4.white;
|
|
41
|
+
}, function (_ref4) {
|
|
42
|
+
var _theme$colors5;
|
|
43
|
+
var activated = _ref4.activated,
|
|
44
|
+
theme = _ref4.theme;
|
|
45
|
+
return activated && (0, _styledComponents.css)(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n color: ", ";\n "])), theme === null || theme === void 0 || (_theme$colors5 = theme.colors) === null || _theme$colors5 === void 0 ? void 0 : _theme$colors5.white);
|
|
46
|
+
});
|
|
47
|
+
var Title = exports.Title = _styledComponents.default.h2(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n font-size: 32px;\n font-weight: 600;\n margin: 0;\n margin-bottom: 20px;\n"])));
|
|
48
|
+
var Subtitle = exports.Subtitle = _styledComponents.default.h3(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n font-size: 18px;\n font-weight: 400;\n margin: 0;\n margin-bottom: 20px;\n"])));
|
|
49
|
+
var BusinessListContainer = exports.BusinessListContainer = _styledComponents.default.div(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n width: 50%;\n padding: 40px 20px 0px 20px;\n box-sizing: border-box;\n"])));
|
|
50
|
+
var AdditionalTypesWrapper = exports.AdditionalTypesWrapper = _styledComponents.default.div(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n padding: 20px;\n padding-bottom: 0;\n"])));
|
|
51
|
+
var WrapInput = exports.WrapInput = _styledComponents.default.div(_templateObject19 || (_templateObject19 = _taggedTemplateLiteral(["\n position: relative;\n cursor: pointer;\n background: #FFFFFF;\n padding: 8px 16px;\n border: 1px solid #DEE2E6;\n box-sizing: border-box;\n box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.12);\n border-radius: 7.6px;\n display: flex;\n align-items: center;\n margin-bottom: 22px;\n margin-top: 22px;\n width: 100%;\n height: 44px;\n ", "\n\n p{\n color: ", ";\n position: relative;\n margin: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 12px;\n line-height: 18px;\n @media (min-width: 576px) {\n font-size: 1rem;\n line-height: initial;\n }\n }\n\n svg {\n color: #B1BCCC;\n font-size: 20px;\n ", "\n\n @media (min-width: 576px) {\n ", "\n }\n }\n"])), function (_ref5) {
|
|
52
|
+
var withIcon = _ref5.withIcon;
|
|
53
|
+
return withIcon && (0, _styledComponents.css)(_templateObject20 || (_templateObject20 = _taggedTemplateLiteral(["\n box-sizing: border-box;\n\n &::before {\n content: \"\";\n position: absolute;\n right: 5px;\n top: 0;\n bottom: 18px;\n width: 15px;\n\n ", "\n }\n\n @media (min-width: 576px) {\n padding: 10px 25px;\n margin-bottom: 27px;\n }\n "])), function (props) {
|
|
54
|
+
var _props$theme;
|
|
55
|
+
return ((_props$theme = props.theme) === null || _props$theme === void 0 ? void 0 : _props$theme.rtl) && (0, _styledComponents.css)(_templateObject21 || (_templateObject21 = _taggedTemplateLiteral(["\n left: 5px;\n right: initial;\n "])));
|
|
56
|
+
});
|
|
57
|
+
}, function (props) {
|
|
58
|
+
return props.theme.colors.darkTextColor;
|
|
59
|
+
}, function (props) {
|
|
60
|
+
var _props$theme2;
|
|
61
|
+
return (_props$theme2 = props.theme) !== null && _props$theme2 !== void 0 && _props$theme2.rtl ? (0, _styledComponents.css)(_templateObject22 || (_templateObject22 = _taggedTemplateLiteral(["\n margin-left: 12px;\n "]))) : (0, _styledComponents.css)(_templateObject23 || (_templateObject23 = _taggedTemplateLiteral(["\n margin-right: 12px;\n "])));
|
|
62
|
+
}, function (props) {
|
|
63
|
+
var _props$theme3;
|
|
64
|
+
return (_props$theme3 = props.theme) !== null && _props$theme3 !== void 0 && _props$theme3.rtl ? (0, _styledComponents.css)(_templateObject24 || (_templateObject24 = _taggedTemplateLiteral(["\n margin-left: 20px;\n "]))) : (0, _styledComponents.css)(_templateObject25 || (_templateObject25 = _taggedTemplateLiteral(["\n margin-right: 20px;\n "])));
|
|
65
|
+
});
|
|
66
|
+
var PaginationContainer = exports.PaginationContainer = _styledComponents.default.div(_templateObject26 || (_templateObject26 = _taggedTemplateLiteral(["\n align-self: flex-end;\n width: 100%;\n margin-bottom: 20px;\n"])));
|
|
67
|
+
var WrapperMap = exports.WrapperMap = _styledComponents.default.div(_templateObject27 || (_templateObject27 = _taggedTemplateLiteral(["\n width: 50%;\n max-height: 2500px;\n > div {\n position: relative !important;\n width: 100% !important;\n height: 100% !important;\n }\n .btn-choose-store {\n line-height: 30px;\n padding: 0 10px;\n font-size: 14px;\n cursor: pointer;\n outline: none;\n overflow: hidden;\n text-overflow: ellipsis;\n min-width: 80px;\n height: 38px;\n font-size: 14px;\n background: ", ";\n color: ", ";\n border-color: ", ";\n }\n\n .btn-address-map {\n cursor: pointer;\n &:hover{\n text-decoration: underline;\n }\n }\n .className {\n object-fit: none;\n }\n"])), function (props) {
|
|
68
|
+
return props.theme.colors.primary;
|
|
69
|
+
}, function (props) {
|
|
70
|
+
return props.theme.colors.primaryContrast;
|
|
71
|
+
}, function (props) {
|
|
72
|
+
return props.theme.colors.primary;
|
|
73
|
+
});
|
|
74
|
+
var CityContainer = exports.CityContainer = _styledComponents.default.div(_templateObject28 || (_templateObject28 = _taggedTemplateLiteral(["\n width: 100%;\n padding: 20px;\n display: flex;\n justify-content: space-between;\n align-items: center;\n border-bottom: 1px solid ", ";;\n height: 70px;\n margin: 0;\n box-sizing: border-box;\n\n h3{\n font-size: 16px;\n }\n ", "\n"])), function (_ref6) {
|
|
75
|
+
var _theme$colors6;
|
|
76
|
+
var theme = _ref6.theme;
|
|
77
|
+
return (theme === null || theme === void 0 || (_theme$colors6 = theme.colors) === null || _theme$colors6 === void 0 ? void 0 : _theme$colors6.tertiary) || '#fff';
|
|
78
|
+
}, function (_ref7) {
|
|
79
|
+
var isSelected = _ref7.isSelected;
|
|
80
|
+
return isSelected && (0, _styledComponents.css)(_templateObject29 || (_templateObject29 = _taggedTemplateLiteral(["\n \n "])));
|
|
81
|
+
});
|
|
82
|
+
var LoadMoreButtonCityWrap = exports.LoadMoreButtonCityWrap = _styledComponents.default.div(_templateObject30 || (_templateObject30 = _taggedTemplateLiteral(["\n margin-top: 10px;\n button {\n width: 100%;\n }\n"])));
|
|
83
|
+
var ViewLocations = exports.ViewLocations = _styledComponents.default.div(_templateObject31 || (_templateObject31 = _taggedTemplateLiteral(["\n p {\n color: ", ";\n cursor: pointer;\n }\n"])), function (_ref8) {
|
|
84
|
+
var _theme$colors7;
|
|
85
|
+
var theme = _ref8.theme;
|
|
86
|
+
return theme === null || theme === void 0 || (_theme$colors7 = theme.colors) === null || _theme$colors7 === void 0 ? void 0 : _theme$colors7.primary;
|
|
87
|
+
});
|
|
88
|
+
var CitiesContainer = exports.CitiesContainer = _styledComponents.default.div(_templateObject32 || (_templateObject32 = _taggedTemplateLiteral(["\n border-radius: 7.6px;\n box-shadow: 0px 1px 4px 0px rgba(0, 0, 0, 0.10);\n > div {\n cursor: pointer;\n }\n margin-bottom: 20px;\n"])));
|
|
89
|
+
var Separator = exports.Separator = _styledComponents.default.div(_templateObject33 || (_templateObject33 = _taggedTemplateLiteral(["\n height: 1px;\n margin-left: 20px;\n margin-right: 40px;\n background: #E9ECEF;\n box-sizing: border-box;\n"])));
|
|
@@ -10,12 +10,16 @@ var _RedBusinessesListing = require("./layouts/RedBusinessesListing");
|
|
|
10
10
|
var _StarbucksBusinessesListing = require("./layouts/StarbucksBusinessesListing");
|
|
11
11
|
var _AppointmentsBusinessListing = require("./layouts/AppointmentsBusinessListing");
|
|
12
12
|
var _styledComponents = require("styled-components");
|
|
13
|
+
var _OloBusinessesListing = require("./franchises/OloBusinessesListing");
|
|
13
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
15
|
var BusinessesListing = exports.BusinessesListing = function BusinessesListing(props) {
|
|
15
|
-
var _theme$business_listi;
|
|
16
|
+
var _theme$my_products, _theme$my_products2, _theme$business_listi;
|
|
16
17
|
var logosLayout = props.logosLayout;
|
|
17
18
|
var theme = (0, _styledComponents.useTheme)();
|
|
19
|
+
var websiteTheme = theme === null || theme === void 0 || (_theme$my_products = theme.my_products) === null || _theme$my_products === void 0 || (_theme$my_products = _theme$my_products.components) === null || _theme$my_products === void 0 || (_theme$my_products = _theme$my_products.website_theme) === null || _theme$my_products === void 0 || (_theme$my_products = _theme$my_products.components) === null || _theme$my_products === void 0 ? void 0 : _theme$my_products.type;
|
|
20
|
+
var franchiseLayout = theme === null || theme === void 0 || (_theme$my_products2 = theme.my_products) === null || _theme$my_products2 === void 0 || (_theme$my_products2 = _theme$my_products2.components) === null || _theme$my_products2 === void 0 || (_theme$my_products2 = _theme$my_products2.website_theme) === null || _theme$my_products2 === void 0 || (_theme$my_products2 = _theme$my_products2.components) === null || _theme$my_products2 === void 0 ? void 0 : _theme$my_products2.franchise_slug;
|
|
18
21
|
var layout = (theme === null || theme === void 0 || (_theme$business_listi = theme.business_listing_view) === null || _theme$business_listi === void 0 || (_theme$business_listi = _theme$business_listi.components) === null || _theme$business_listi === void 0 || (_theme$business_listi = _theme$business_listi.layout) === null || _theme$business_listi === void 0 ? void 0 : _theme$business_listi.type) || 'original';
|
|
19
22
|
var isStarbucksLayout = ['starbucks', 'mapview'].includes(layout);
|
|
20
|
-
|
|
23
|
+
var oloLayout = ['franchise_1', 'franchise_2'];
|
|
24
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, websiteTheme === 'franchise' ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, oloLayout.includes(franchiseLayout) && /*#__PURE__*/_react.default.createElement(_OloBusinessesListing.OloBusinessesListing, props), !franchiseLayout && /*#__PURE__*/_react.default.createElement(_OriginalBusinessesListing.OriginalBusinessesListing, props)) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, (layout === 'original' || logosLayout) && /*#__PURE__*/_react.default.createElement(_OriginalBusinessesListing.OriginalBusinessesListing, props), isStarbucksLayout && !logosLayout && /*#__PURE__*/_react.default.createElement(_StarbucksBusinessesListing.StarbucksBusinessesListing, props), layout === 'red' && !logosLayout && /*#__PURE__*/_react.default.createElement(_RedBusinessesListing.RedBusinessesListing, props), layout === 'appointments' && !logosLayout && /*#__PURE__*/_react.default.createElement(_AppointmentsBusinessListing.BusinessListing, props)));
|
|
21
25
|
};
|
|
@@ -32,6 +32,7 @@ var _OrdersSection = require("./OrdersSection");
|
|
|
32
32
|
var _utils = require("../../../../../../../utils");
|
|
33
33
|
var _AddressList = require("../../../AddressList");
|
|
34
34
|
var _AddressForm = require("../../../AddressForm");
|
|
35
|
+
var _OrderTypesSquares = require("../../../OrderTypesSquares");
|
|
35
36
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
36
37
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
37
38
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
@@ -53,7 +54,7 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
53
54
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
54
55
|
var PIXELS_TO_SCROLL = 300;
|
|
55
56
|
var BusinessesListingUI = function BusinessesListingUI(props) {
|
|
56
|
-
var
|
|
57
|
+
var _citiesState$cities, _ref, _theme$business_listi, _orderState$options, _theme$business_listi2, _theme$business_listi3, _theme$business_listi4, _theme$business_listi5, _theme$business_listi6, _theme$business_listi7, _businessesList$busin, _theme$header, _orderState$options2, _orderState$options3, _businessesList$busin4, _orderState$options7, _configs$business_lis, _configs$business_lis2, _configs$business_lis3, _theme$images2, _theme$business_listi8, _orderState$options8, _configs$business_lis4, _theme$images3, _theme$business_listi9, _citiesState$cities5, _citiesState$cities6, _orderState$options10, _configs$advanced_bus2, _citiesState$cities7, _citiesState$cities8, _orderState$options12, _businessesList$busin6, _businessesList$busin7, _orderState$options15;
|
|
57
58
|
var businessesList = props.businessesList,
|
|
58
59
|
paginationProps = props.paginationProps,
|
|
59
60
|
searchValue = props.searchValue,
|
|
@@ -71,18 +72,13 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
|
|
|
71
72
|
logosLayout = props.logosLayout,
|
|
72
73
|
actualSlug = props.actualSlug,
|
|
73
74
|
orderTypes = props.orderTypes;
|
|
74
|
-
var allOrderTypes = [1, 2, 3, 4, 5];
|
|
75
|
-
var pickupTypes = [2, 4, 5];
|
|
76
|
-
var eatInType = 3;
|
|
77
75
|
var _useLanguage = (0, _orderingComponentsExternal.useLanguage)(),
|
|
78
76
|
_useLanguage2 = _slicedToArray(_useLanguage, 2),
|
|
79
77
|
t = _useLanguage2[1];
|
|
80
78
|
var _useOrder = (0, _orderingComponentsExternal.useOrder)(),
|
|
81
79
|
_useOrder2 = _slicedToArray(_useOrder, 2),
|
|
82
80
|
orderState = _useOrder2[0],
|
|
83
|
-
|
|
84
|
-
changeCityFilter = _useOrder2$.changeCityFilter,
|
|
85
|
-
changeType = _useOrder2$.changeType;
|
|
81
|
+
changeCityFilter = _useOrder2[1].changeCityFilter;
|
|
86
82
|
var _useSession = (0, _orderingComponentsExternal.useSession)(),
|
|
87
83
|
_useSession2 = _slicedToArray(_useSession, 1),
|
|
88
84
|
auth = _useSession2[0].auth;
|
|
@@ -126,19 +122,15 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
|
|
|
126
122
|
_useState14 = _slicedToArray(_useState13, 2),
|
|
127
123
|
hasHighRatedBusiness = _useState14[0],
|
|
128
124
|
setHasHighRatedBusiness = _useState14[1];
|
|
129
|
-
var _useState15 = (0, _react.useState)(orderState === null || orderState === void 0 || (_orderState$options = orderState.options) === null || _orderState$options === void 0 ? void 0 : _orderState$options.type),
|
|
130
|
-
_useState16 = _slicedToArray(_useState15, 2),
|
|
131
|
-
orderTypeSelected = _useState16[0],
|
|
132
|
-
setOrderTypeSelected = _useState16[1];
|
|
133
125
|
var userCustomer = JSON.parse(window.localStorage.getItem('user-customer'));
|
|
134
|
-
var
|
|
135
|
-
|
|
136
|
-
favoriteIds =
|
|
137
|
-
setFavoriteIds =
|
|
126
|
+
var _useState15 = (0, _react.useState)([]),
|
|
127
|
+
_useState16 = _slicedToArray(_useState15, 2),
|
|
128
|
+
favoriteIds = _useState16[0],
|
|
129
|
+
setFavoriteIds = _useState16[1];
|
|
138
130
|
var allCitiesDisabled = citiesState === null || citiesState === void 0 || (_citiesState$cities = citiesState.cities) === null || _citiesState$cities === void 0 ? void 0 : _citiesState$cities.every(function (city) {
|
|
139
131
|
return !city.enabled;
|
|
140
132
|
});
|
|
141
|
-
var hideCities = (_ref = (theme === null || theme === void 0 || (_theme$business_listi = theme.business_listing_view) === null || _theme$business_listi === void 0 || (_theme$business_listi = _theme$business_listi.components) === null || _theme$business_listi === void 0 || (_theme$business_listi = _theme$business_listi.cities) === null || _theme$business_listi === void 0 ? void 0 : _theme$business_listi.hidden) || (orderState === null || orderState === void 0 || (_orderState$
|
|
133
|
+
var hideCities = (_ref = (theme === null || theme === void 0 || (_theme$business_listi = theme.business_listing_view) === null || _theme$business_listi === void 0 || (_theme$business_listi = _theme$business_listi.components) === null || _theme$business_listi === void 0 || (_theme$business_listi = _theme$business_listi.cities) === null || _theme$business_listi === void 0 ? void 0 : _theme$business_listi.hidden) || (orderState === null || orderState === void 0 || (_orderState$options = orderState.options) === null || _orderState$options === void 0 ? void 0 : _orderState$options.type) !== 2 || allCitiesDisabled) !== null && _ref !== void 0 ? _ref : true;
|
|
142
134
|
var hideSearch = theme === null || theme === void 0 || (_theme$business_listi2 = theme.business_listing_view) === null || _theme$business_listi2 === void 0 || (_theme$business_listi2 = _theme$business_listi2.components) === null || _theme$business_listi2 === void 0 || (_theme$business_listi2 = _theme$business_listi2.search) === null || _theme$business_listi2 === void 0 ? void 0 : _theme$business_listi2.hidden;
|
|
143
135
|
var hideFilter = (theme === null || theme === void 0 || (_theme$business_listi3 = theme.business_listing_view) === null || _theme$business_listi3 === void 0 || (_theme$business_listi3 = _theme$business_listi3.components) === null || _theme$business_listi3 === void 0 || (_theme$business_listi3 = _theme$business_listi3.filter) === null || _theme$business_listi3 === void 0 ? void 0 : _theme$business_listi3.hidden) || hideSearch;
|
|
144
136
|
var hideHero = theme === null || theme === void 0 || (_theme$business_listi4 = theme.business_listing_view) === null || _theme$business_listi4 === void 0 || (_theme$business_listi4 = _theme$business_listi4.components) === null || _theme$business_listi4 === void 0 || (_theme$business_listi4 = _theme$business_listi4.business_hero) === null || _theme$business_listi4 === void 0 ? void 0 : _theme$business_listi4.hidden;
|
|
@@ -150,12 +142,7 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
|
|
|
150
142
|
return business.id;
|
|
151
143
|
}));
|
|
152
144
|
var isChew = (theme === null || theme === void 0 || (_theme$header = theme.header) === null || _theme$header === void 0 || (_theme$header = _theme$header.components) === null || _theme$header === void 0 || (_theme$header = _theme$header.layout) === null || _theme$header === void 0 || (_theme$header = _theme$header.type) === null || _theme$header === void 0 ? void 0 : _theme$header.toLowerCase()) === 'chew';
|
|
153
|
-
var cateringTypeString = (orderState === null || orderState === void 0 || (_orderState$
|
|
154
|
-
var configTypes = (configs === null || configs === void 0 || (_configs$order_types_ = configs.order_types_allowed) === null || _configs$order_types_ === void 0 ? void 0 : _configs$order_types_.value.split('|').filter(function (value) {
|
|
155
|
-
return allOrderTypes.includes(Number(value));
|
|
156
|
-
}).map(function (value) {
|
|
157
|
-
return Number(value);
|
|
158
|
-
})) || [];
|
|
145
|
+
var cateringTypeString = (orderState === null || orderState === void 0 || (_orderState$options2 = orderState.options) === null || _orderState$options2 === void 0 ? void 0 : _orderState$options2.type) === 7 ? 'catering_delivery' : (orderState === null || orderState === void 0 || (_orderState$options3 = orderState.options) === null || _orderState$options3 === void 0 ? void 0 : _orderState$options3.type) === 8 ? 'catering_pickup' : null;
|
|
159
146
|
var cateringValues = (preorderBusiness === null || preorderBusiness === void 0 ? void 0 : preorderBusiness.configs) && (0, _utils.getCateringValues)(cateringTypeString, preorderBusiness === null || preorderBusiness === void 0 ? void 0 : preorderBusiness.configs);
|
|
160
147
|
var handleScroll = (0, _react.useCallback)(function () {
|
|
161
148
|
var _document$documentEle, _document$documentEle2, _businessesList$error;
|
|
@@ -222,22 +209,8 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
|
|
|
222
209
|
}));
|
|
223
210
|
};
|
|
224
211
|
var handleChangeCity = function handleChangeCity(cityId) {
|
|
225
|
-
var _orderState$
|
|
226
|
-
changeCityFilter(cityId === (orderState === null || orderState === void 0 || (_orderState$
|
|
227
|
-
};
|
|
228
|
-
var handleChangeType = function handleChangeType(value) {
|
|
229
|
-
if (!(orderState !== null && orderState !== void 0 && orderState.loading)) {
|
|
230
|
-
changeType(value);
|
|
231
|
-
setOrderTypeSelected(value);
|
|
232
|
-
}
|
|
233
|
-
};
|
|
234
|
-
var handleChangeToPickup = function handleChangeToPickup() {
|
|
235
|
-
var _orderTypes$find;
|
|
236
|
-
var firstEnabledPickupType = (_orderTypes$find = orderTypes.find(function (type) {
|
|
237
|
-
return (configTypes === null || configTypes === void 0 ? void 0 : configTypes.includes(type.value)) && type.value !== 1;
|
|
238
|
-
})) === null || _orderTypes$find === void 0 ? void 0 : _orderTypes$find.value;
|
|
239
|
-
handleChangeType(firstEnabledPickupType);
|
|
240
|
-
setOrderTypeSelected(firstEnabledPickupType);
|
|
212
|
+
var _orderState$options4;
|
|
213
|
+
changeCityFilter(cityId === (orderState === null || orderState === void 0 || (_orderState$options4 = orderState.options) === null || _orderState$options4 === void 0 ? void 0 : _orderState$options4.city_id) ? null : cityId);
|
|
241
214
|
};
|
|
242
215
|
(0, _react.useEffect)(function () {
|
|
243
216
|
if (preorderBusiness) setIsPreorder(true);
|
|
@@ -261,35 +234,15 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
|
|
|
261
234
|
setFavoriteIds(_toConsumableArray(new Set(ids)));
|
|
262
235
|
}, [businessesList === null || businessesList === void 0 || (_businessesList$busin4 = businessesList.businesses) === null || _businessesList$busin4 === void 0 ? void 0 : _businessesList$busin4.length]);
|
|
263
236
|
(0, _react.useEffect)(function () {
|
|
264
|
-
var _citiesState$cities3, _orderState$
|
|
265
|
-
if (!(citiesState !== null && citiesState !== void 0 && (_citiesState$cities3 = citiesState.cities) !== null && _citiesState$cities3 !== void 0 && _citiesState$cities3.length) || !(orderState !== null && orderState !== void 0 && (_orderState$
|
|
237
|
+
var _citiesState$cities3, _orderState$options5, _citiesState$cities4;
|
|
238
|
+
if (!(citiesState !== null && citiesState !== void 0 && (_citiesState$cities3 = citiesState.cities) !== null && _citiesState$cities3 !== void 0 && _citiesState$cities3.length) || !(orderState !== null && orderState !== void 0 && (_orderState$options5 = orderState.options) !== null && _orderState$options5 !== void 0 && _orderState$options5.city_id)) return;
|
|
266
239
|
var selectedCity = citiesState === null || citiesState === void 0 || (_citiesState$cities4 = citiesState.cities) === null || _citiesState$cities4 === void 0 ? void 0 : _citiesState$cities4.find(function (city) {
|
|
267
|
-
var _orderState$
|
|
268
|
-
return (city === null || city === void 0 ? void 0 : city.id) === (orderState === null || orderState === void 0 || (_orderState$
|
|
240
|
+
var _orderState$options6;
|
|
241
|
+
return (city === null || city === void 0 ? void 0 : city.id) === (orderState === null || orderState === void 0 || (_orderState$options6 = orderState.options) === null || _orderState$options6 === void 0 ? void 0 : _orderState$options6.city_id);
|
|
269
242
|
});
|
|
270
243
|
if (!selectedCity || !(selectedCity !== null && selectedCity !== void 0 && selectedCity.enabled)) changeCityFilter(null);
|
|
271
244
|
setHasHighRatedBusiness(true);
|
|
272
|
-
}, [citiesState, orderState === null || orderState === void 0 || (_orderState$
|
|
273
|
-
(0, _react.useEffect)(function () {
|
|
274
|
-
var _orderState$options9;
|
|
275
|
-
setOrderTypeSelected(orderState === null || orderState === void 0 || (_orderState$options9 = orderState.options) === null || _orderState$options9 === void 0 ? void 0 : _orderState$options9.type);
|
|
276
|
-
}, [orderState === null || orderState === void 0 || (_orderState$options10 = orderState.options) === null || _orderState$options10 === void 0 ? void 0 : _orderState$options10.type]);
|
|
277
|
-
var OrderTypesComponent = function OrderTypesComponent() {
|
|
278
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, orderTypes && (configTypes ? orderTypes.filter(function (type) {
|
|
279
|
-
return (configTypes === null || configTypes === void 0 ? void 0 : configTypes.includes(type.value)) && pickupTypes.includes(type === null || type === void 0 ? void 0 : type.value);
|
|
280
|
-
}) : orderTypes).map(function (item, i) {
|
|
281
|
-
var _orderState$options11, _orderState$options12;
|
|
282
|
-
return /*#__PURE__*/_react.default.createElement(_Buttons.Button, {
|
|
283
|
-
key: item.value,
|
|
284
|
-
onClick: function onClick() {
|
|
285
|
-
return handleChangeType(item.value);
|
|
286
|
-
},
|
|
287
|
-
color: (orderState === null || orderState === void 0 || (_orderState$options11 = orderState.options) === null || _orderState$options11 === void 0 ? void 0 : _orderState$options11.type) === (item === null || item === void 0 ? void 0 : item.value) ? 'primary' : 'secondary',
|
|
288
|
-
disabled: orderState === null || orderState === void 0 ? void 0 : orderState.loading,
|
|
289
|
-
className: (orderState === null || orderState === void 0 || (_orderState$options12 = orderState.options) === null || _orderState$options12 === void 0 ? void 0 : _orderState$options12.type) !== (item === null || item === void 0 ? void 0 : item.value) ? 'activated' : ''
|
|
290
|
-
}, item.text);
|
|
291
|
-
}));
|
|
292
|
-
};
|
|
245
|
+
}, [citiesState, orderState === null || orderState === void 0 || (_orderState$options7 = orderState.options) === null || _orderState$options7 === void 0 ? void 0 : _orderState$options7.city_id]);
|
|
293
246
|
if (logosLayout) {
|
|
294
247
|
var _businessesList$busin5;
|
|
295
248
|
return /*#__PURE__*/_react.default.createElement(_styles.BusinessLogosWrapper, null, /*#__PURE__*/_react.default.createElement(_styles.BusinessLogosContainer, null, /*#__PURE__*/_react.default.createElement(_AutoScroll.AutoScroll, {
|
|
@@ -321,56 +274,16 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
|
|
|
321
274
|
}), (configs === null || configs === void 0 || (_configs$business_lis3 = configs.business_listing_hide_image) === null || _configs$business_lis3 === void 0 ? void 0 : _configs$business_lis3.value) !== '1' && !isChew && !hideHero && !isCustomerMode && /*#__PURE__*/_react.default.createElement(_styles.BusinessHeroImg, {
|
|
322
275
|
bgimage: (_theme$images2 = theme.images) === null || _theme$images2 === void 0 || (_theme$images2 = _theme$images2.general) === null || _theme$images2 === void 0 ? void 0 : _theme$images2.businessHero,
|
|
323
276
|
height: theme === null || theme === void 0 || (_theme$business_listi8 = theme.business_listing_view) === null || _theme$business_listi8 === void 0 || (_theme$business_listi8 = _theme$business_listi8.components) === null || _theme$business_listi8 === void 0 || (_theme$business_listi8 = _theme$business_listi8.business_hero) === null || _theme$business_listi8 === void 0 || (_theme$business_listi8 = _theme$business_listi8.style) === null || _theme$business_listi8 === void 0 ? void 0 : _theme$business_listi8.height
|
|
324
|
-
})), userCustomer && (orderState === null || orderState === void 0 || (_orderState$
|
|
325
|
-
|
|
326
|
-
}))
|
|
327
|
-
onClick: function onClick() {
|
|
328
|
-
return handleChangeType(1);
|
|
329
|
-
},
|
|
330
|
-
disabled: orderState === null || orderState === void 0 ? void 0 : orderState.loading,
|
|
331
|
-
activated: orderTypeSelected === 1
|
|
332
|
-
}, /*#__PURE__*/_react.default.createElement(_styles.IconTypeButton, {
|
|
333
|
-
activated: orderTypeSelected === 1
|
|
334
|
-
}, /*#__PURE__*/_react.default.createElement("img", {
|
|
335
|
-
src: theme === null || theme === void 0 || (_theme$images3 = theme.images) === null || _theme$images3 === void 0 || (_theme$images3 = _theme$images3.general) === null || _theme$images3 === void 0 ? void 0 : _theme$images3.deliveryIco,
|
|
336
|
-
width: 20,
|
|
337
|
-
height: 20
|
|
338
|
-
})), /*#__PURE__*/_react.default.createElement("p", null, t('DELIVERY', 'Delivery'))), configTypes.some(function (type) {
|
|
339
|
-
return pickupTypes.includes(type);
|
|
340
|
-
}) && /*#__PURE__*/_react.default.createElement(_styles.TypeButton, {
|
|
341
|
-
disabled: orderState === null || orderState === void 0 ? void 0 : orderState.loading,
|
|
342
|
-
activated: pickupTypes.includes(orderTypeSelected),
|
|
343
|
-
onClick: function onClick() {
|
|
344
|
-
return handleChangeToPickup();
|
|
345
|
-
}
|
|
346
|
-
}, /*#__PURE__*/_react.default.createElement(_styles.IconTypeButton, {
|
|
347
|
-
activated: pickupTypes.includes(orderTypeSelected)
|
|
348
|
-
}, /*#__PURE__*/_react.default.createElement("img", {
|
|
349
|
-
src: theme === null || theme === void 0 || (_theme$images4 = theme.images) === null || _theme$images4 === void 0 || (_theme$images4 = _theme$images4.general) === null || _theme$images4 === void 0 ? void 0 : _theme$images4.pickupIco,
|
|
350
|
-
width: 22,
|
|
351
|
-
height: 22
|
|
352
|
-
})), /*#__PURE__*/_react.default.createElement("p", null, t('PICKUP', 'Pickup'))), configTypes.some(function (type) {
|
|
353
|
-
return eatInType === type;
|
|
354
|
-
}) && /*#__PURE__*/_react.default.createElement(_styles.TypeButton, {
|
|
355
|
-
disabled: orderState === null || orderState === void 0 ? void 0 : orderState.loading,
|
|
356
|
-
activated: orderTypeSelected === 3,
|
|
357
|
-
onClick: function onClick() {
|
|
358
|
-
return handleChangeType(3);
|
|
359
|
-
}
|
|
360
|
-
}, /*#__PURE__*/_react.default.createElement(_styles.IconTypeButton, {
|
|
361
|
-
activated: orderTypeSelected === 3
|
|
362
|
-
}, /*#__PURE__*/_react.default.createElement("img", {
|
|
363
|
-
src: theme === null || theme === void 0 || (_theme$images5 = theme.images) === null || _theme$images5 === void 0 || (_theme$images5 = _theme$images5.general) === null || _theme$images5 === void 0 ? void 0 : _theme$images5.eatinIco,
|
|
364
|
-
width: 22,
|
|
365
|
-
height: 22
|
|
366
|
-
})), /*#__PURE__*/_react.default.createElement("p", null, t('EAT_IN', 'Eat in')))), pickupTypes.includes(orderTypeSelected) && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("p", null, t('WHAT_PICKUP_YOU_NEED', 'What kind of pickup do you need?')), /*#__PURE__*/_react.default.createElement(_styles.AdditionalTypesContainer, null, /*#__PURE__*/_react.default.createElement(OrderTypesComponent, null)))), !isCustomerMode && /*#__PURE__*/_react.default.createElement(_OrderProgress.OrderProgress, {
|
|
277
|
+
})), userCustomer && (orderState === null || orderState === void 0 || (_orderState$options8 = orderState.options) === null || _orderState$options8 === void 0 || (_orderState$options8 = _orderState$options8.address) === null || _orderState$options8 === void 0 ? void 0 : _orderState$options8.address) && isCustomerMode && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_OrderTypesSquares.OrderTypesSquares, {
|
|
278
|
+
orderTypes: orderTypes
|
|
279
|
+
})), !isCustomerMode && /*#__PURE__*/_react.default.createElement(_OrderProgress.OrderProgress, {
|
|
367
280
|
isChew: isChew,
|
|
368
281
|
franchiseId: props.franchiseId,
|
|
369
282
|
userCustomerId: userCustomer === null || userCustomer === void 0 ? void 0 : userCustomer.id,
|
|
370
283
|
asDashboard: isCustomerMode,
|
|
371
284
|
isCustomerMode: isCustomerMode
|
|
372
285
|
}), (configs === null || configs === void 0 || (_configs$business_lis4 = configs.business_listing_hide_image) === null || _configs$business_lis4 === void 0 ? void 0 : _configs$business_lis4.value) !== '1' && isChew && /*#__PURE__*/_react.default.createElement(_styles.BusinessHeroImg, {
|
|
373
|
-
bgimage: (_theme$
|
|
286
|
+
bgimage: (_theme$images3 = theme.images) === null || _theme$images3 === void 0 || (_theme$images3 = _theme$images3.general) === null || _theme$images3 === void 0 ? void 0 : _theme$images3.businessHero,
|
|
374
287
|
height: theme === null || theme === void 0 || (_theme$business_listi9 = theme.business_listing_view) === null || _theme$business_listi9 === void 0 || (_theme$business_listi9 = _theme$business_listi9.components) === null || _theme$business_listi9 === void 0 || (_theme$business_listi9 = _theme$business_listi9.business_hero) === null || _theme$business_listi9 === void 0 || (_theme$business_listi9 = _theme$business_listi9.style) === null || _theme$business_listi9 === void 0 ? void 0 : _theme$business_listi9.height
|
|
375
288
|
}), isCustomerMode && !hidePreviousOrders && !businessesList.loading && /*#__PURE__*/_react.default.createElement(_OrdersSection.OrdersSection, {
|
|
376
289
|
titleContent: t('PREVIOUS_ORDERS', 'Previous orders'),
|
|
@@ -400,13 +313,13 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
|
|
|
400
313
|
color: "primary",
|
|
401
314
|
onClick: handleOpenCities
|
|
402
315
|
}, (citiesState === null || citiesState === void 0 || (_citiesState$cities6 = citiesState.cities) === null || _citiesState$cities6 === void 0 || (_citiesState$cities6 = _citiesState$cities6.find(function (city) {
|
|
403
|
-
var _orderState$
|
|
404
|
-
return (city === null || city === void 0 ? void 0 : city.id) === (orderState === null || orderState === void 0 || (_orderState$
|
|
316
|
+
var _orderState$options9;
|
|
317
|
+
return (city === null || city === void 0 ? void 0 : city.id) === (orderState === null || orderState === void 0 || (_orderState$options9 = orderState.options) === null || _orderState$options9 === void 0 ? void 0 : _orderState$options9.city_id);
|
|
405
318
|
})) === null || _citiesState$cities6 === void 0 ? void 0 : _citiesState$cities6.name) || t('SELECT_A_CITY', 'Select a city')), isCustomLayout && /*#__PURE__*/_react.default.createElement(_FiMap.default, {
|
|
406
319
|
onClick: toggleMap
|
|
407
320
|
})), activeMap && /*#__PURE__*/_react.default.createElement(_BusinessesMap.BusinessesMap, {
|
|
408
321
|
businessList: businessesList.businesses,
|
|
409
|
-
userLocation: orderState === null || orderState === void 0 || (_orderState$
|
|
322
|
+
userLocation: orderState === null || orderState === void 0 || (_orderState$options10 = orderState.options) === null || _orderState$options10 === void 0 || (_orderState$options10 = _orderState$options10.address) === null || _orderState$options10 === void 0 ? void 0 : _orderState$options10.location,
|
|
410
323
|
setErrors: setMapErrors
|
|
411
324
|
})), !isChew && hasHighRatedBusiness && !props.franchiseId && !hideHighestBusiness && /*#__PURE__*/_react.default.createElement(_styles.HightestRatedWrapper, null, /*#__PURE__*/_react.default.createElement(_styles.Divider, null), /*#__PURE__*/_react.default.createElement(_HighestRated.HighestRated, {
|
|
412
325
|
propsToFetch: props.propsToFetch,
|
|
@@ -445,11 +358,11 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
|
|
|
445
358
|
color: "primary",
|
|
446
359
|
onClick: handleOpenCities
|
|
447
360
|
}, (citiesState === null || citiesState === void 0 || (_citiesState$cities8 = citiesState.cities) === null || _citiesState$cities8 === void 0 || (_citiesState$cities8 = _citiesState$cities8.find(function (city) {
|
|
448
|
-
var _orderState$
|
|
449
|
-
return (city === null || city === void 0 ? void 0 : city.id) === (orderState === null || orderState === void 0 || (_orderState$
|
|
361
|
+
var _orderState$options11;
|
|
362
|
+
return (city === null || city === void 0 ? void 0 : city.id) === (orderState === null || orderState === void 0 || (_orderState$options11 = orderState.options) === null || _orderState$options11 === void 0 ? void 0 : _orderState$options11.city_id);
|
|
450
363
|
})) === null || _citiesState$cities8 === void 0 ? void 0 : _citiesState$cities8.name) || t('SELECT_A_CITY', 'Select a city')))), isCustomerMode && activeMap && /*#__PURE__*/_react.default.createElement(_BusinessesMap.BusinessesMap, {
|
|
451
364
|
businessList: businessesList.businesses,
|
|
452
|
-
userLocation: orderState === null || orderState === void 0 || (_orderState$
|
|
365
|
+
userLocation: orderState === null || orderState === void 0 || (_orderState$options12 = orderState.options) === null || _orderState$options12 === void 0 || (_orderState$options12 = _orderState$options12.address) === null || _orderState$options12 === void 0 ? void 0 : _orderState$options12.location,
|
|
453
366
|
setErrors: setMapErrors
|
|
454
367
|
}), /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, (!isCustomLayout && isCustomerMode && (businessesList === null || businessesList === void 0 || (_businessesList$busin6 = businessesList.businesses) === null || _businessesList$busin6 === void 0 ? void 0 : _businessesList$busin6.length) > 0 || isChew) && /*#__PURE__*/_react.default.createElement(_styles.BusinessesTitle, null, t('BUSINESSES', 'Businesses')), /*#__PURE__*/_react.default.createElement(_styles.BusinessList, null, !businessesList.loading && businessesList.businesses.length === 0 && (businessesList === null || businessesList === void 0 ? void 0 : businessesList.fetched) && /*#__PURE__*/_react.default.createElement(_NotFoundSource.NotFoundSource, {
|
|
455
368
|
content: t('NOT_FOUND_BUSINESSES', 'No businesses to delivery / pick up at this address, please change filters or change address.')
|
|
@@ -463,14 +376,14 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
|
|
|
463
376
|
height: '44px'
|
|
464
377
|
}
|
|
465
378
|
}, t('CHANGE_ADDRESS', 'Select other Address'))), (_businessesList$busin7 = businessesList.businesses) === null || _businessesList$busin7 === void 0 ? void 0 : _businessesList$busin7.map(function (business) {
|
|
466
|
-
var _orderState$
|
|
379
|
+
var _orderState$options13, _business$reviews;
|
|
467
380
|
return /*#__PURE__*/_react.default.createElement(_BusinessController.BusinessController, {
|
|
468
381
|
key: business.id,
|
|
469
382
|
className: "card",
|
|
470
383
|
business: business,
|
|
471
384
|
isBusinessOpen: business.open && (business === null || business === void 0 ? void 0 : business.enabled) !== false,
|
|
472
385
|
handleCustomClick: handleBusinessClick,
|
|
473
|
-
orderType: orderState === null || orderState === void 0 || (_orderState$
|
|
386
|
+
orderType: orderState === null || orderState === void 0 || (_orderState$options13 = orderState.options) === null || _orderState$options13 === void 0 ? void 0 : _orderState$options13.type,
|
|
474
387
|
isCustomLayout: isCustomLayout,
|
|
475
388
|
isCustomerMode: isCustomerMode,
|
|
476
389
|
onPreorderBusiness: setPreorderBusiness,
|
|
@@ -488,13 +401,13 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
|
|
|
488
401
|
setFavoriteIds: setFavoriteIds
|
|
489
402
|
});
|
|
490
403
|
}), (businessesList.loading || !(businessesList !== null && businessesList !== void 0 && businessesList.fetched)) && _toConsumableArray(Array((paginationProps === null || paginationProps === void 0 ? void 0 : paginationProps.nextPageItems) > 4 ? paginationProps.nextPageItems : 8).keys()).map(function (i) {
|
|
491
|
-
var _orderState$
|
|
404
|
+
var _orderState$options14;
|
|
492
405
|
return /*#__PURE__*/_react.default.createElement(_BusinessController.BusinessController, {
|
|
493
406
|
key: i,
|
|
494
407
|
className: "card",
|
|
495
408
|
business: {},
|
|
496
409
|
isSkeleton: true,
|
|
497
|
-
orderType: orderState === null || orderState === void 0 || (_orderState$
|
|
410
|
+
orderType: orderState === null || orderState === void 0 || (_orderState$options14 = orderState.options) === null || _orderState$options14 === void 0 ? void 0 : _orderState$options14.type
|
|
498
411
|
});
|
|
499
412
|
}))), /*#__PURE__*/_react.default.createElement(_Modal.Modal, {
|
|
500
413
|
open: isPreorder,
|
|
@@ -548,7 +461,7 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
|
|
|
548
461
|
isCustomerMode: isCustomerMode
|
|
549
462
|
}) : /*#__PURE__*/_react.default.createElement(_styles.AddressFormWrapper, null, /*#__PURE__*/_react.default.createElement(_AddressForm.AddressForm, {
|
|
550
463
|
useValidationFileds: true,
|
|
551
|
-
address: (orderState === null || orderState === void 0 || (_orderState$
|
|
464
|
+
address: (orderState === null || orderState === void 0 || (_orderState$options15 = orderState.options) === null || _orderState$options15 === void 0 ? void 0 : _orderState$options15.address) || {},
|
|
552
465
|
onCancel: function onCancel() {
|
|
553
466
|
return setModals(_objectSpread(_objectSpread({}, modals), {}, {
|
|
554
467
|
formOpen: false
|
|
@@ -23,7 +23,7 @@ var WrapperSearch = exports.WrapperSearch = _styledComponents.default.div(_templ
|
|
|
23
23
|
}, function (_ref) {
|
|
24
24
|
var isCustomLayout = _ref.isCustomLayout,
|
|
25
25
|
isCustomerMode = _ref.isCustomerMode;
|
|
26
|
-
return isCustomLayout && (0, _styledComponents.css)(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n box-sizing: border-box;\n display: flex;\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
|
|
26
|
+
return isCustomLayout && (0, _styledComponents.css)(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n box-sizing: border-box;\n display: flex;\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 ", "\n svg {\n align-self: auto;\n }\n\n @media(min-width: 681px){\n width: 75%;\n padding: 0;\n }\n @media(min-width: 1201px){\n width: 50%;\n }\n "])), isCustomerMode ? (0, _styledComponents.css)(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n margin-right: 20px;\n "]))) : (0, _styledComponents.css)(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n margin: 0 auto;\n "]))));
|
|
27
27
|
});
|
|
28
28
|
var ErrorMessage = exports.ErrorMessage = _styledComponents.default.span(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n padding: 20px;\n width: 100%;\n background-color: #CCCCCC;\n margin: 0px 15px;\n color: #D81313;\n font-weight: bold;\n"])));
|
|
29
29
|
var PreviousOrders = exports.PreviousOrders = _styledComponents.default.div(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n display: flex;\n flex-wrap: wrap;\n margin: 10px 20px 0px;\n"])));
|
|
@@ -20,14 +20,12 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
20
20
|
var OrderDetail = exports.OrderDetail = function OrderDetail(props) {
|
|
21
21
|
var item = props.item,
|
|
22
22
|
placingOrder = props.placingOrder,
|
|
23
|
-
orderType = props.orderType,
|
|
24
23
|
customerAddress = props.customerAddress,
|
|
25
24
|
_onClick = props.onClick;
|
|
26
25
|
var _useLanguage = (0, _orderingComponentsExternal.useLanguage)(),
|
|
27
26
|
_useLanguage2 = _slicedToArray(_useLanguage, 2),
|
|
28
27
|
t = _useLanguage2[1];
|
|
29
|
-
|
|
30
|
-
return /*#__PURE__*/_react.default.createElement(_styles.OrderDetailContainer, null, /*#__PURE__*/_react.default.createElement("h3", null, customerAddress), /*#__PURE__*/_react.default.createElement("h3", null, orderTypeList[orderType - 1] || t('DELIVERY', 'Delivery')), /*#__PURE__*/_react.default.createElement("div", null, item === null || item === void 0 ? void 0 : item.products.filter(function (product) {
|
|
28
|
+
return /*#__PURE__*/_react.default.createElement(_styles.OrderDetailContainer, null, /*#__PURE__*/_react.default.createElement("h3", null, customerAddress), /*#__PURE__*/_react.default.createElement("div", null, item === null || item === void 0 ? void 0 : item.products.filter(function (product) {
|
|
31
29
|
return !(product !== null && product !== void 0 && product.calendar_event);
|
|
32
30
|
}).map(function (product) {
|
|
33
31
|
var _item$toppings_remove;
|
|
@@ -35,6 +35,7 @@ var _SignUpForm = require("../SignUpForm");
|
|
|
35
35
|
var _LoginForm = require("../LoginForm");
|
|
36
36
|
var _OrderDetail = require("./OrderDetail");
|
|
37
37
|
var _SpinnerLoader = require("../../../../../components/SpinnerLoader");
|
|
38
|
+
var _OrderTypesSquares = require("../OrderTypesSquares");
|
|
38
39
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
39
40
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
40
41
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
@@ -64,7 +65,7 @@ var mapConfigs = {
|
|
|
64
65
|
}
|
|
65
66
|
};
|
|
66
67
|
var CheckoutUI = function CheckoutUI(props) {
|
|
67
|
-
var _businessDetails$busi, _businessDetails$busi2, _configs$table_numer_, _businessConfigs$find, _businessConfigs$find2, _configs$cash_wallet, _configs$wallet_enabl, _theme$header, _theme$colors, _theme$colors$split, _cart$comment, _cart$offers, _paymethodSelected$da, _paymethodSelected$da2, _cardList$cards, _cartState$cart, _configs$driver_tip_o, _configs$driver_tip_o2, _configs$driver_tip_o3, _instructionsOptions$, _theme$checkout, _theme$checkout2, _theme$checkout3, _theme$checkout4, _loyaltyPlansState$re, _creditPointPlan$busi, _cart$business2, _businessDetails$busi3, _theme$images, _configs$google_maps_, _customerState$user, _customerState$user2, _Object$values2, _businessDetails$busi4, _businessDetails$busi5, _businessDetails$busi6, _businessDetails$busi7, _businessDetails$busi8, _businessDetails$busi9, _businessDetails$erro, _businessDetails$erro2, _businessDetails$busi10, _businessDetails$busi11, _businessDetails$busi12, _configs$driver_tip_t, _configs$driver_tip_u, _configs$driver_tip_t2, _cartState$cart$spot_, _cartState$cart2, _cart$business3, _cart$products2, _ref2, _creditPointPlanOnBus, _configs$driver_tip_t3, _configs$driver_tip_u2, _configs$driver_tip_t4, _customerState$user3, _options$address;
|
|
68
|
+
var _businessDetails$busi, _businessDetails$busi2, _configs$table_numer_, _businessConfigs$find, _businessConfigs$find2, _configs$cash_wallet, _configs$wallet_enabl, _theme$header, _theme$colors, _theme$colors$split, _cart$comment, _cart$offers, _paymethodSelected$da, _paymethodSelected$da2, _cardList$cards, _cartState$cart, _configs$driver_tip_o, _configs$driver_tip_o2, _configs$driver_tip_o3, _instructionsOptions$, _theme$checkout, _theme$checkout2, _theme$checkout3, _theme$checkout4, _loyaltyPlansState$re, _creditPointPlan$busi, _cart$business2, _businessDetails$busi3, _theme$images, _configs$google_maps_, _customerState$user, _customerState$user2, _Object$values2, _businessDetails$busi4, _businessDetails$busi5, _businessDetails$busi6, _businessDetails$busi7, _businessDetails$busi8, _businessDetails$busi9, _businessDetails$erro, _businessDetails$erro2, _businessDetails$busi10, _businessDetails$busi11, _businessDetails$busi12, _configs$driver_tip_t, _configs$driver_tip_u, _configs$driver_tip_t2, _cartState$cart$spot_, _cartState$cart2, _cart$business3, _cart$products2, _ref2, _creditPointPlanOnBus, _configs$driver_tip_t3, _configs$driver_tip_u2, _configs$driver_tip_t4, _customerState$user3, _theme$colors2, _options$address;
|
|
68
69
|
var cart = props.cart,
|
|
69
70
|
errors = props.errors,
|
|
70
71
|
placing = props.placing,
|
|
@@ -178,6 +179,7 @@ var CheckoutUI = function CheckoutUI(props) {
|
|
|
178
179
|
productLoading = _useState26[0],
|
|
179
180
|
setProductLoading = _useState26[1];
|
|
180
181
|
var shouldActivateOrderDetailModal = isCustomerMode;
|
|
182
|
+
var orderTypeList = [t('DELIVERY', 'Delivery'), t('PICKUP', 'Pickup'), t('EAT_IN', 'Eat in'), t('CURBSIDE', 'Curbside'), t('DRIVE_THRU', 'Drive thru')];
|
|
181
183
|
var cardsMethods = ['stripe', 'credomatic'];
|
|
182
184
|
var stripePaymethods = ['stripe', 'stripe_connect', 'stripe_redirect'];
|
|
183
185
|
var businessConfigs = (_businessDetails$busi = businessDetails === null || businessDetails === void 0 || (_businessDetails$busi2 = businessDetails.business) === null || _businessDetails$busi2 === void 0 ? void 0 : _businessDetails$busi2.configs) !== null && _businessDetails$busi !== void 0 ? _businessDetails$busi : [];
|
|
@@ -333,6 +335,7 @@ var CheckoutUI = function CheckoutUI(props) {
|
|
|
333
335
|
var _Object$values, _configs$verification2;
|
|
334
336
|
setUserErrors([]);
|
|
335
337
|
var errors = [];
|
|
338
|
+
var UKCodes = ['44'];
|
|
336
339
|
var userSelected = isCustomerMode ? customerState.user : user;
|
|
337
340
|
var _requiredFields = [];
|
|
338
341
|
Object.values(checkoutFieldsState === null || checkoutFieldsState === void 0 ? void 0 : checkoutFieldsState.fields).map(function (field) {
|
|
@@ -355,11 +358,21 @@ var CheckoutUI = function CheckoutUI(props) {
|
|
|
355
358
|
setRequiredFields(_requiredFields);
|
|
356
359
|
if (userSelected && userSelected !== null && userSelected !== void 0 && userSelected.cellphone) {
|
|
357
360
|
if (userSelected !== null && userSelected !== void 0 && userSelected.country_phone_code) {
|
|
358
|
-
var _configs$validation_p, _configs$validation_p2;
|
|
361
|
+
var _phoneNumber$isPossib, _phoneNumber$isValid, _configs$validation_p, _configs$validation_p2;
|
|
359
362
|
var phone = null;
|
|
360
363
|
phone = "+".concat(userSelected === null || userSelected === void 0 ? void 0 : userSelected.country_phone_code).concat(userSelected === null || userSelected === void 0 ? void 0 : userSelected.cellphone.replace("+".concat(userSelected === null || userSelected === void 0 ? void 0 : userSelected.country_phone_code), ''));
|
|
361
364
|
var phoneNumber = (0, _libphonenumberJs.default)(phone);
|
|
362
|
-
|
|
365
|
+
var enableIspossibly = false;
|
|
366
|
+
if (UKCodes.includes(phoneNumber === null || phoneNumber === void 0 ? void 0 : phoneNumber.countryCallingCode)) {
|
|
367
|
+
var inputNumber = userSelected === null || userSelected === void 0 ? void 0 : userSelected.cellphone;
|
|
368
|
+
var validationsForUK = ['01', '02', '07', '0800', '0808', '0845', '0870', '0871', '16'];
|
|
369
|
+
var result = validationsForUK.some(function (areaCode) {
|
|
370
|
+
return inputNumber === null || inputNumber === void 0 ? void 0 : inputNumber.startsWith(areaCode);
|
|
371
|
+
});
|
|
372
|
+
enableIspossibly = result;
|
|
373
|
+
}
|
|
374
|
+
var validation = enableIspossibly ? phoneNumber === null || phoneNumber === void 0 || (_phoneNumber$isPossib = phoneNumber.isPossible) === null || _phoneNumber$isPossib === void 0 ? void 0 : _phoneNumber$isPossib.call(phoneNumber) : phoneNumber === null || phoneNumber === void 0 || (_phoneNumber$isValid = phoneNumber.isValid) === null || _phoneNumber$isValid === void 0 ? void 0 : _phoneNumber$isValid.call(phoneNumber);
|
|
375
|
+
if (parseInt((_configs$validation_p = configs === null || configs === void 0 || (_configs$validation_p2 = configs.validation_phone_number_lib) === null || _configs$validation_p2 === void 0 ? void 0 : _configs$validation_p2.value) !== null && _configs$validation_p !== void 0 ? _configs$validation_p : 1, 10) && !validation) {
|
|
363
376
|
errors.push(t('VALIDATION_ERROR_MOBILE_PHONE_INVALID', 'The field Phone number is invalid.'));
|
|
364
377
|
}
|
|
365
378
|
} else {
|
|
@@ -616,7 +629,7 @@ var CheckoutUI = function CheckoutUI(props) {
|
|
|
616
629
|
cart: cart,
|
|
617
630
|
loyaltyPlansState: loyaltyPlansState,
|
|
618
631
|
businessConfigs: businessDetails === null || businessDetails === void 0 || (_businessDetails$busi12 = businessDetails.business) === null || _businessDetails$busi12 === void 0 ? void 0 : _businessDetails$busi12.configs
|
|
619
|
-
})))), /*#__PURE__*/_react.default.createElement(_styles.WrapperRightContainer, null, !!(!isMultiDriverTips && driverTipsField) && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_styles.DriverTipContainer, null, /*#__PURE__*/_react.default.createElement("h1", null, t('DRIVER_TIPS', 'Driver Tips')), /*#__PURE__*/_react.default.createElement("p", null, t('100%_OF_THE_TIP_YOUR_DRIVER', '100% of the tip goes to your driver')), /*#__PURE__*/_react.default.createElement(_DriverTips.DriverTips, {
|
|
632
|
+
})))), /*#__PURE__*/_react.default.createElement(_styles.WrapperRightContainer, null, isCustomerMode && /*#__PURE__*/_react.default.createElement(_OrderTypesSquares.OrderTypesSquares, null), !!(!isMultiDriverTips && driverTipsField) && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_styles.DriverTipContainer, null, /*#__PURE__*/_react.default.createElement("h1", null, t('DRIVER_TIPS', 'Driver Tips')), /*#__PURE__*/_react.default.createElement("p", null, t('100%_OF_THE_TIP_YOUR_DRIVER', '100% of the tip goes to your driver')), /*#__PURE__*/_react.default.createElement(_DriverTips.DriverTips, {
|
|
620
633
|
businessId: cart === null || cart === void 0 ? void 0 : cart.business_id,
|
|
621
634
|
driverTipsOptions: driverTipsOptions,
|
|
622
635
|
isFixedPrice: parseInt(configs === null || configs === void 0 || (_configs$driver_tip_t = configs.driver_tip_type) === null || _configs$driver_tip_t === void 0 ? void 0 : _configs$driver_tip_t.value, 10) === 1,
|
|
@@ -760,6 +773,11 @@ var CheckoutUI = function CheckoutUI(props) {
|
|
|
760
773
|
return setOpenModal(_objectSpread(_objectSpread({}, openModal), {}, {
|
|
761
774
|
orderDetail: false
|
|
762
775
|
}));
|
|
776
|
+
},
|
|
777
|
+
title: orderTypeList[(options === null || options === void 0 ? void 0 : options.type) - 1] || t('DELIVERY', 'Delivery'),
|
|
778
|
+
titleStyle: {
|
|
779
|
+
color: theme === null || theme === void 0 || (_theme$colors2 = theme.colors) === null || _theme$colors2 === void 0 ? void 0 : _theme$colors2.primary,
|
|
780
|
+
fontSize: 30
|
|
763
781
|
}
|
|
764
782
|
}, /*#__PURE__*/_react.default.createElement(_OrderDetail.OrderDetail, {
|
|
765
783
|
item: cart,
|
|
@@ -25,4 +25,4 @@ var WrapperInput = exports.WrapperInput = _styledComponents.default.div(_templat
|
|
|
25
25
|
var DriverTipMessage = exports.DriverTipMessage = _styledComponents.default.p(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n color: ", ";\n font-weight: 600;\n"])), function (props) {
|
|
26
26
|
return props.theme.colors.primary;
|
|
27
27
|
});
|
|
28
|
-
var WrapperTips = exports.WrapperTips = _styledComponents.default.div(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n display: flex;\n width: 100%;\n justify-content: flex-start;\n align-items: center;\n flex-wrap: wrap;\n\n > div {\n margin: 5px;\n }\n"])));
|
|
28
|
+
var WrapperTips = exports.WrapperTips = _styledComponents.default.div(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n display: flex;\n width: 100%;\n justify-content: flex-start;\n align-items: center;\n flex-wrap: wrap;\n\n > div {\n margin: 5px;\n text-align: center;\n }\n"])));
|