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
|
@@ -9,6 +9,7 @@ var _styledComponents = require("styled-components");
|
|
|
9
9
|
var _OriginalHomeHero = require("./layouts/OriginalHomeHero");
|
|
10
10
|
var _RedHomeHero = require("./layouts/RedHomeHero");
|
|
11
11
|
var _StarbucksHomeHero = require("./layouts/StarbucksHomeHero");
|
|
12
|
+
var _OloHomeHero = require("./franchises/OloHomeHero");
|
|
12
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
14
|
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); }
|
|
14
15
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
@@ -17,8 +18,9 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
|
|
|
17
18
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
18
19
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
19
20
|
var HomeHero = exports.HomeHero = function HomeHero(props) {
|
|
20
|
-
var _theme$homepage_view, _theme$homepage_view2, _HomeLayoutConfig$hom, _HomeLayoutConfig$hom2, _HomeLayoutConfig$hom3, _HomeLayoutConfig$hom4;
|
|
21
|
+
var _theme$my_products, _theme$homepage_view, _theme$homepage_view2, _HomeLayoutConfig$hom, _HomeLayoutConfig$hom2, _theme$my_products2, _HomeLayoutConfig$hom3, _HomeLayoutConfig$hom4;
|
|
21
22
|
var theme = (0, _styledComponents.useTheme)();
|
|
23
|
+
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;
|
|
22
24
|
var HomeLayoutConfig = {
|
|
23
25
|
homepage_settings: {
|
|
24
26
|
layout: (theme === null || theme === void 0 || (_theme$homepage_view = theme.homepage_view) === null || _theme$homepage_view === void 0 || (_theme$homepage_view = _theme$homepage_view.components) === null || _theme$homepage_view === void 0 || (_theme$homepage_view = _theme$homepage_view.layout) === null || _theme$homepage_view === void 0 ? void 0 : _theme$homepage_view.type) || 'original',
|
|
@@ -27,9 +29,10 @@ var HomeHero = exports.HomeHero = function HomeHero(props) {
|
|
|
27
29
|
}
|
|
28
30
|
};
|
|
29
31
|
var layout = (HomeLayoutConfig === null || HomeLayoutConfig === void 0 || (_HomeLayoutConfig$hom = HomeLayoutConfig.homepage_settings) === null || _HomeLayoutConfig$hom === void 0 ? void 0 : _HomeLayoutConfig$hom.layout) !== undefined ? HomeLayoutConfig === null || HomeLayoutConfig === void 0 || (_HomeLayoutConfig$hom2 = HomeLayoutConfig.homepage_settings) === null || _HomeLayoutConfig$hom2 === void 0 ? void 0 : _HomeLayoutConfig$hom2.layout : 'original';
|
|
32
|
+
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;
|
|
30
33
|
var homeLayoutProps = _objectSpread(_objectSpread({}, props), {}, {
|
|
31
34
|
layout: layout,
|
|
32
35
|
contentPosition: (HomeLayoutConfig === null || HomeLayoutConfig === void 0 || (_HomeLayoutConfig$hom3 = HomeLayoutConfig.homepage_settings) === null || _HomeLayoutConfig$hom3 === void 0 ? void 0 : _HomeLayoutConfig$hom3.contentPosition) !== undefined ? HomeLayoutConfig === null || HomeLayoutConfig === void 0 || (_HomeLayoutConfig$hom4 = HomeLayoutConfig.homepage_settings) === null || _HomeLayoutConfig$hom4 === void 0 ? void 0 : _HomeLayoutConfig$hom4.contentPosition : 'left'
|
|
33
36
|
});
|
|
34
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, layout === 'original' && /*#__PURE__*/_react.default.createElement(_OriginalHomeHero.OriginalHomeHero, homeLayoutProps), layout === 'starbucks' && /*#__PURE__*/_react.default.createElement(_StarbucksHomeHero.StarbucksHomeHero, homeLayoutProps), layout === 'red' && /*#__PURE__*/_react.default.createElement(_RedHomeHero.RedHomeHero, homeLayoutProps));
|
|
37
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, websiteTheme === 'franchise' ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, franchiseLayout === 'franchise_1' && /*#__PURE__*/_react.default.createElement(_OloHomeHero.OloHomeHero, homeLayoutProps), !franchiseLayout && /*#__PURE__*/_react.default.createElement(_OriginalHomeHero.OriginalHomeHero, homeLayoutProps)) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, layout === 'original' && /*#__PURE__*/_react.default.createElement(_OriginalHomeHero.OriginalHomeHero, homeLayoutProps), layout === 'starbucks' && /*#__PURE__*/_react.default.createElement(_StarbucksHomeHero.StarbucksHomeHero, homeLayoutProps), layout === 'red' && /*#__PURE__*/_react.default.createElement(_RedHomeHero.RedHomeHero, homeLayoutProps)));
|
|
35
38
|
};
|
|
@@ -21,7 +21,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
21
21
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
22
22
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
23
23
|
var InputPhoneNumber = exports.InputPhoneNumber = function InputPhoneNumber(props) {
|
|
24
|
-
var _configs$default_coun;
|
|
24
|
+
var _configs$default_coun, _phoneRef$current4;
|
|
25
25
|
var user = props.user,
|
|
26
26
|
value = props.value,
|
|
27
27
|
setValue = props.setValue,
|
|
@@ -39,7 +39,7 @@ var InputPhoneNumber = exports.InputPhoneNumber = function InputPhoneNumber(prop
|
|
|
39
39
|
_useConfig2 = _slicedToArray(_useConfig, 1),
|
|
40
40
|
configs = _useConfig2[0].configs;
|
|
41
41
|
var phoneRef = (0, _react.useRef)(null);
|
|
42
|
-
var
|
|
42
|
+
var UKCodes = ['44'];
|
|
43
43
|
var isValidPhoneNumber = function isValidPhoneNumber(number) {
|
|
44
44
|
var _configs$validation_p, _configs$validation_p2, _numberParser$isPossi, _numberParser$isValid;
|
|
45
45
|
if (!number) return;
|
|
@@ -48,9 +48,9 @@ var InputPhoneNumber = exports.InputPhoneNumber = function InputPhoneNumber(prop
|
|
|
48
48
|
}
|
|
49
49
|
var numberParser = (0, _libphonenumberJs.default)(number);
|
|
50
50
|
var enableIspossibly = false;
|
|
51
|
-
if (
|
|
51
|
+
if (UKCodes.includes(numberParser === null || numberParser === void 0 ? void 0 : numberParser.countryCallingCode)) {
|
|
52
52
|
var inputNumber = returnRawNumber(number);
|
|
53
|
-
var validationsForUK = ['01', '02', '07', '0800', '0808', '0845', '0870', '0871'];
|
|
53
|
+
var validationsForUK = ['01', '02', '07', '0800', '0808', '0845', '0870', '0871', '16'];
|
|
54
54
|
var result = validationsForUK.some(function (areaCode) {
|
|
55
55
|
var _inputNumber$number;
|
|
56
56
|
return inputNumber === null || inputNumber === void 0 || (_inputNumber$number = inputNumber.number) === null || _inputNumber$number === void 0 ? void 0 : _inputNumber$number.startsWith(areaCode);
|
|
@@ -60,20 +60,27 @@ var InputPhoneNumber = exports.InputPhoneNumber = function InputPhoneNumber(prop
|
|
|
60
60
|
return enableIspossibly ? numberParser === null || numberParser === void 0 || (_numberParser$isPossi = numberParser.isPossible) === null || _numberParser$isPossi === void 0 ? void 0 : _numberParser$isPossi.call(numberParser) : numberParser === null || numberParser === void 0 || (_numberParser$isValid = numberParser.isValid) === null || _numberParser$isValid === void 0 ? void 0 : _numberParser$isValid.call(numberParser);
|
|
61
61
|
};
|
|
62
62
|
var returnRawNumber = function returnRawNumber(number) {
|
|
63
|
-
var _configs$validation_p3, _configs$validation_p4, _phoneRef$
|
|
63
|
+
var _configs$validation_p3, _configs$validation_p4, _phoneRef$current2;
|
|
64
64
|
if (!number) return null;
|
|
65
65
|
if (!parseInt((_configs$validation_p3 = configs === null || configs === void 0 || (_configs$validation_p4 = configs.validation_phone_number_lib) === null || _configs$validation_p4 === void 0 ? void 0 : _configs$validation_p4.value) !== null && _configs$validation_p3 !== void 0 ? _configs$validation_p3 : 1, 10)) {
|
|
66
66
|
return null;
|
|
67
67
|
}
|
|
68
68
|
var numberParser = (0, _libphonenumberJs.default)(number);
|
|
69
69
|
var validations = ['0', '+'];
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
var
|
|
70
|
+
var startsWithValidations = ['16'];
|
|
71
|
+
var hasStartValidation = startsWithValidations.some(function (validation) {
|
|
72
|
+
var _phoneRef$current, _phoneRef$current$sta;
|
|
73
|
+
return phoneRef === null || phoneRef === void 0 || (_phoneRef$current = phoneRef.current) === null || _phoneRef$current === void 0 || (_phoneRef$current = _phoneRef$current.value) === null || _phoneRef$current === void 0 || (_phoneRef$current$sta = _phoneRef$current.startsWith) === null || _phoneRef$current$sta === void 0 ? void 0 : _phoneRef$current$sta.call(_phoneRef$current, validation);
|
|
74
|
+
});
|
|
75
|
+
if ((hasStartValidation || validations.includes(phoneRef === null || phoneRef === void 0 || (_phoneRef$current2 = phoneRef.current) === null || _phoneRef$current2 === void 0 ? void 0 : _phoneRef$current2.value[0])) && UKCodes.includes(numberParser === null || numberParser === void 0 ? void 0 : numberParser.countryCallingCode)) {
|
|
76
|
+
var _phoneRef$current3;
|
|
77
|
+
var numberInput = phoneRef === null || phoneRef === void 0 || (_phoneRef$current3 = phoneRef.current) === null || _phoneRef$current3 === void 0 ? void 0 : _phoneRef$current3.value.replace('-', '');
|
|
73
78
|
var numberRaw = '';
|
|
74
|
-
numberInput
|
|
75
|
-
return i > 0 || i === 0 && _splited[0] === '0'
|
|
76
|
-
|
|
79
|
+
numberInput && numberInput.split(' ').filter(function (_splited, i) {
|
|
80
|
+
return i > 0 || i === 0 && (_splited[0] === '0' || startsWithValidations.some(function (validation) {
|
|
81
|
+
return _splited.startsWith(validation);
|
|
82
|
+
}));
|
|
83
|
+
}).map(function (splited) {
|
|
77
84
|
numberRaw = "".concat(numberRaw).concat(splited);
|
|
78
85
|
return numberRaw;
|
|
79
86
|
});
|
|
@@ -106,5 +113,5 @@ var InputPhoneNumber = exports.InputPhoneNumber = function InputPhoneNumber(prop
|
|
|
106
113
|
onChange: function onChange(val) {
|
|
107
114
|
return setValue && setValue(val, isValidPhoneNumber(val), returnRawNumber(val));
|
|
108
115
|
}
|
|
109
|
-
}), value && !isValidPhoneNumber(value) && !disabled && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, (auth && (user === null || user === void 0 ? void 0 : user.country_phone_code) || !auth || value.includes('+')) && /*#__PURE__*/_react.default.createElement(_styles.ErrorMsg, null, t('INVALID_ERROR_PHONE_NUMBER', 'The Phone Number field is invalid')), auth && !(user !== null && user !== void 0 && user.country_phone_code) && !value.includes('+') && /*#__PURE__*/_react.default.createElement(_styles.ErrorMsg, null, t('INVALID_ERROR_COUNTRY_CODE_PHONE_NUMBER', 'The country code of the phone number is invalid'))));
|
|
116
|
+
}), value && !isValidPhoneNumber(value) && !disabled && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, (auth && (user === null || user === void 0 ? void 0 : user.country_phone_code) || !auth || value.includes('+')) && (phoneRef === null || phoneRef === void 0 || (_phoneRef$current4 = phoneRef.current) === null || _phoneRef$current4 === void 0 ? void 0 : _phoneRef$current4.value) && /*#__PURE__*/_react.default.createElement(_styles.ErrorMsg, null, t('INVALID_ERROR_PHONE_NUMBER', 'The Phone Number field is invalid')), auth && !(user !== null && user !== void 0 && user.country_phone_code) && !value.includes('+') && /*#__PURE__*/_react.default.createElement(_styles.ErrorMsg, null, t('INVALID_ERROR_COUNTRY_CODE_PHONE_NUMBER', 'The country code of the phone number is invalid'))));
|
|
110
117
|
};
|
|
@@ -90,7 +90,8 @@ var LogoutUI = function LogoutUI(props) {
|
|
|
90
90
|
method: 'POST',
|
|
91
91
|
headers: {
|
|
92
92
|
'Content-Type': 'application/json',
|
|
93
|
-
Authorization: "Bearer ".concat(token)
|
|
93
|
+
Authorization: "Bearer ".concat(token),
|
|
94
|
+
'X-App-X': ordering.appId
|
|
94
95
|
},
|
|
95
96
|
body: JSON.stringify(body)
|
|
96
97
|
});
|
|
@@ -39,7 +39,8 @@ var ModalUI = function ModalUI(props) {
|
|
|
39
39
|
onRemove = props.onRemove,
|
|
40
40
|
isSlideBar = props.isSlideBar,
|
|
41
41
|
slideBarPosition = props.slideBarPosition,
|
|
42
|
-
disableOverflowX = props.disableOverflowX
|
|
42
|
+
disableOverflowX = props.disableOverflowX,
|
|
43
|
+
titleStyle = props.titleStyle;
|
|
43
44
|
var _useLanguage = (0, _orderingComponentsExternal.useLanguage)(),
|
|
44
45
|
_useLanguage2 = _slicedToArray(_useLanguage, 2),
|
|
45
46
|
t = _useLanguage2[1];
|
|
@@ -53,8 +54,8 @@ var ModalUI = function ModalUI(props) {
|
|
|
53
54
|
var scrollbarWidth = window.innerWidth - document.body.clientWidth;
|
|
54
55
|
var bodyPaddingRight = window.document.body.style.paddingRight;
|
|
55
56
|
document.body.style.paddingRight = props.open ? "".concat(bodyPaddingRight + scrollbarWidth, "px") : "".concat(bodyPaddingRight, "px");
|
|
57
|
+
document.body.style.overflow = props.open ? 'hidden' : 'auto';
|
|
56
58
|
}
|
|
57
|
-
document.body.style.overflow = props.open ? 'hidden' : 'auto';
|
|
58
59
|
if (props.open) {
|
|
59
60
|
window.addEventListener('keydown', handleKeyDown);
|
|
60
61
|
return function () {
|
|
@@ -83,7 +84,9 @@ var ModalUI = function ModalUI(props) {
|
|
|
83
84
|
onClick: function onClick() {
|
|
84
85
|
return onClose();
|
|
85
86
|
}
|
|
86
|
-
}))), /*#__PURE__*/_react.default.createElement(_styles.ModalHeader, null, title && /*#__PURE__*/_react.default.createElement(_styles.ModalTitle,
|
|
87
|
+
}))), /*#__PURE__*/_react.default.createElement(_styles.ModalHeader, null, title && /*#__PURE__*/_react.default.createElement(_styles.ModalTitle, {
|
|
88
|
+
style: titleStyle
|
|
89
|
+
}, title)), children, (onCancel || onAccept) && /*#__PURE__*/_react.default.createElement(_styles.ModalActions, null, onCancel && /*#__PURE__*/_react.default.createElement(_Buttons.Button, {
|
|
87
90
|
outline: true,
|
|
88
91
|
onClick: function onClick() {
|
|
89
92
|
return onCancel();
|
|
@@ -10,7 +10,7 @@ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _temp
|
|
|
10
10
|
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); }
|
|
11
11
|
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; }
|
|
12
12
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
13
|
-
var Container = exports.Container = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 100%;\n margin-left: auto;\n margin-right: auto;\n padding: 30px 15px 15px 15px;\n box-sizing: border-box;\n min-height: calc(100vh - 280px);\n\n @media (min-width: 769px) {\n width: 70%;\n }\n
|
|
13
|
+
var Container = exports.Container = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 100%;\n margin-left: auto;\n margin-right: auto;\n padding: 30px 15px 15px 15px;\n box-sizing: border-box;\n min-height: calc(100vh - 280px);\n\n @media (min-width: 769px) {\n width: 70%;\n }\n\n h2 {\n margin: 0;\n font-weight: 600;\n font-size: 20px;\n line-height: 30px;\n }\n\n h3 {\n margin: 0;\n font-weight: 600;\n font-size: 16px;\n }\n"])));
|
|
14
14
|
var HeaderContainer = exports.HeaderContainer = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n h1 {\n font-size: 24px;\n line-height: 36px;\n font-weight: 400;\n margin: 0;\n span.name {\n font-weight: 700;\n margin: 0 10px;\n }\n }\n p {\n font-size: 14px;\n margin: 6px 0;\n }\n"])));
|
|
15
15
|
var CustomerInfoContainer = exports.CustomerInfoContainer = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n border-radius: 7.6px;\n border: 1px solid ", ";\n padding: 30px 25px;\n margin-top: 48px;\n display: flex;\n flex-wrap: wrap;\n flex-direction: column;\n @media (min-width: 576px) {\n flex-direction: row;\n }\n"])), function (props) {
|
|
16
16
|
return props.theme.colors.gray200;
|
|
@@ -39,7 +39,7 @@ var SingleOrderContainer = exports.SingleOrderContainer = _styledComponents.defa
|
|
|
39
39
|
var _props$theme3;
|
|
40
40
|
return (_props$theme3 = props.theme) !== null && _props$theme3 !== void 0 && _props$theme3.rtl ? (0, _styledComponents.css)(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n text-align: left;\n "]))) : (0, _styledComponents.css)(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n text-align: right;\n "])));
|
|
41
41
|
});
|
|
42
|
-
var SingleOrderHeader = exports.SingleOrderHeader = _styledComponents.default.div(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n flex-direction: column;\n\n > div {\n > div {\n display: flex;\n flex-direction: column;\n align-items: center
|
|
42
|
+
var SingleOrderHeader = exports.SingleOrderHeader = _styledComponents.default.div(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n flex-direction: column;\n\n > div {\n > div {\n display: flex;\n flex-direction: column;\n align-items: center;\n @media (min-width: 769px) {\n flex-direction: row;\n }\n p {\n line-height: 24px;\n font-size: 14px;\n margin: 3px 0;\n &.date {\n margin: 0 5px;\n }\n }\n }\n }\n\n button {\n height: 43px;\n }\n\n @media (min-width: 576px) {\n flex-direction: row;\n }\n"])));
|
|
43
43
|
var OrderBusinessDetails = exports.OrderBusinessDetails = _styledComponents.default.div(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: space-between;\n margin: 50px 0;\n"])));
|
|
44
44
|
var OrderBusinessWrapper = exports.OrderBusinessWrapper = _styledComponents.default.div(_templateObject19 || (_templateObject19 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n\n @media (min-width: 576px) {\n flex-direction: row;\n }\n"])));
|
|
45
45
|
var BusinessData = exports.BusinessData = _styledComponents.default.div(_templateObject20 || (_templateObject20 = _taggedTemplateLiteral(["\n margin-top: 10px;\n p {\n font-size: 14px;\n line-height: 21px;\n margin: 2px 0;\n &.bold {\n font-weight: 500;\n }\n }\n @media (min-width: 576px) {\n margin-top: 0px;\n }\n"])));
|
|
@@ -281,7 +281,8 @@ var OrderDetailsUI = function OrderDetailsUI(props) {
|
|
|
281
281
|
method: 'POST',
|
|
282
282
|
headers: {
|
|
283
283
|
'Content-Type': 'application/json',
|
|
284
|
-
Authorization: "Bearer ".concat(token)
|
|
284
|
+
Authorization: "Bearer ".concat(token),
|
|
285
|
+
'X-App-X': ordering.appId
|
|
285
286
|
},
|
|
286
287
|
body: JSON.stringify(body)
|
|
287
288
|
});
|
|
@@ -25,7 +25,7 @@ var ContentHeader = exports.ContentHeader = _styledComponents.default.div(_templ
|
|
|
25
25
|
});
|
|
26
26
|
});
|
|
27
27
|
var ProductListWrapper = exports.ProductListWrapper = _styledComponents.default.div(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n overflow: auto hidden;\n width: 100%;\n ::-webkit-scrollbar {\n width: 6px;\n height: 6px;\n }\n"])));
|
|
28
|
-
var ProductList = exports.ProductList = _styledComponents.default.div(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n box-sizing: border-box;\n align-items: center;\n button {\n padding: 0px;\n }\n #orderItAgain > div {\n width: 350px;\n ", "\n }\n"])), function (_ref3) {
|
|
28
|
+
var ProductList = exports.ProductList = _styledComponents.default.div(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n box-sizing: border-box;\n align-items: center;\n\n button {\n padding: 0px;\n }\n\n #orderItAgain > div {\n width: 350px;\n ", "\n }\n"])), function (_ref3) {
|
|
29
29
|
var _theme$business_view;
|
|
30
30
|
var theme = _ref3.theme;
|
|
31
31
|
return (theme === null || theme === void 0 || (_theme$business_view = theme.business_view) === null || _theme$business_view === void 0 || (_theme$business_view = _theme$business_view.components) === null || _theme$business_view === void 0 || (_theme$business_view = _theme$business_view.products) === null || _theme$business_view === void 0 || (_theme$business_view = _theme$business_view.components) === null || _theme$business_view === void 0 || (_theme$business_view = _theme$business_view.layout) === null || _theme$business_view === void 0 ? void 0 : _theme$business_view.type) === 'starbucks' && (0, _styledComponents.css)(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n width: 230px;\n "])));
|
|
@@ -0,0 +1,160 @@
|
|
|
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.OrderTypesSquaresController = exports.OrderTypesSquares = void 0;
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _styles = require("./styles");
|
|
10
|
+
var _styledComponents = require("styled-components");
|
|
11
|
+
var _orderingComponentsExternal = require("ordering-components-external");
|
|
12
|
+
var _Buttons = _interopRequireDefault(require("../../styles/Buttons"));
|
|
13
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
|
+
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); }
|
|
15
|
+
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; }
|
|
16
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
17
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
18
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
19
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
20
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
21
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
22
|
+
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."); }
|
|
23
|
+
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); }
|
|
24
|
+
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; }
|
|
25
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
26
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
27
|
+
var OrderTypesSquaresController = exports.OrderTypesSquaresController = function OrderTypesSquaresController(props) {
|
|
28
|
+
var _orderState$options, _configs$order_types_, _orderState$options3, _theme$images, _theme$images2, _theme$images3;
|
|
29
|
+
var orderTypes = props.orderTypes,
|
|
30
|
+
hideTitle = props.hideTitle;
|
|
31
|
+
var theme = (0, _styledComponents.useTheme)();
|
|
32
|
+
var _useOrder = (0, _orderingComponentsExternal.useOrder)(),
|
|
33
|
+
_useOrder2 = _slicedToArray(_useOrder, 2),
|
|
34
|
+
orderState = _useOrder2[0],
|
|
35
|
+
changeType = _useOrder2[1].changeType;
|
|
36
|
+
var _useConfig = (0, _orderingComponentsExternal.useConfig)(),
|
|
37
|
+
_useConfig2 = _slicedToArray(_useConfig, 1),
|
|
38
|
+
configs = _useConfig2[0].configs;
|
|
39
|
+
var _useLanguage = (0, _orderingComponentsExternal.useLanguage)(),
|
|
40
|
+
_useLanguage2 = _slicedToArray(_useLanguage, 2),
|
|
41
|
+
t = _useLanguage2[1];
|
|
42
|
+
var _useState = (0, _react.useState)(orderState === null || orderState === void 0 || (_orderState$options = orderState.options) === null || _orderState$options === void 0 ? void 0 : _orderState$options.type),
|
|
43
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
44
|
+
orderTypeSelected = _useState2[0],
|
|
45
|
+
setOrderTypeSelected = _useState2[1];
|
|
46
|
+
var allOrderTypes = [1, 2, 3, 4, 5];
|
|
47
|
+
var pickupTypes = [2, 4, 5];
|
|
48
|
+
var eatInType = 3;
|
|
49
|
+
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) {
|
|
50
|
+
return allOrderTypes.includes(Number(value));
|
|
51
|
+
}).map(function (value) {
|
|
52
|
+
return Number(value);
|
|
53
|
+
})) || [];
|
|
54
|
+
var handleChangeType = function handleChangeType(value) {
|
|
55
|
+
if (!(orderState !== null && orderState !== void 0 && orderState.loading)) {
|
|
56
|
+
changeType(value);
|
|
57
|
+
setOrderTypeSelected(value);
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
var handleChangeToPickup = function handleChangeToPickup() {
|
|
61
|
+
var _orderTypes$find;
|
|
62
|
+
var firstEnabledPickupType = (_orderTypes$find = orderTypes.find(function (type) {
|
|
63
|
+
return (configTypes === null || configTypes === void 0 ? void 0 : configTypes.includes(type.value)) && type.value !== 1;
|
|
64
|
+
})) === null || _orderTypes$find === void 0 ? void 0 : _orderTypes$find.value;
|
|
65
|
+
handleChangeType(firstEnabledPickupType);
|
|
66
|
+
setOrderTypeSelected(firstEnabledPickupType);
|
|
67
|
+
};
|
|
68
|
+
(0, _react.useEffect)(function () {
|
|
69
|
+
var _orderState$options2;
|
|
70
|
+
setOrderTypeSelected(orderState === null || orderState === void 0 || (_orderState$options2 = orderState.options) === null || _orderState$options2 === void 0 ? void 0 : _orderState$options2.type);
|
|
71
|
+
}, [orderState === null || orderState === void 0 || (_orderState$options3 = orderState.options) === null || _orderState$options3 === void 0 ? void 0 : _orderState$options3.type]);
|
|
72
|
+
var OrderTypesComponent = function OrderTypesComponent() {
|
|
73
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, orderTypes && (configTypes ? orderTypes.filter(function (type) {
|
|
74
|
+
return (configTypes === null || configTypes === void 0 ? void 0 : configTypes.includes(type.value)) && pickupTypes.includes(type === null || type === void 0 ? void 0 : type.value);
|
|
75
|
+
}) : orderTypes).map(function (item, i) {
|
|
76
|
+
var _orderState$options4, _orderState$options5;
|
|
77
|
+
return /*#__PURE__*/_react.default.createElement(_Buttons.default, {
|
|
78
|
+
key: item.value,
|
|
79
|
+
onClick: function onClick() {
|
|
80
|
+
return handleChangeType(item.value);
|
|
81
|
+
},
|
|
82
|
+
color: (orderState === null || orderState === void 0 || (_orderState$options4 = orderState.options) === null || _orderState$options4 === void 0 ? void 0 : _orderState$options4.type) === (item === null || item === void 0 ? void 0 : item.value) ? 'primary' : 'secondary',
|
|
83
|
+
disabled: orderState === null || orderState === void 0 ? void 0 : orderState.loading,
|
|
84
|
+
className: (orderState === null || orderState === void 0 || (_orderState$options5 = orderState.options) === null || _orderState$options5 === void 0 ? void 0 : _orderState$options5.type) !== (item === null || item === void 0 ? void 0 : item.value) ? 'activated' : ''
|
|
85
|
+
}, item.text);
|
|
86
|
+
}));
|
|
87
|
+
};
|
|
88
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, !hideTitle && (configTypes.includes(1) || configTypes.some(function (type) {
|
|
89
|
+
return pickupTypes.includes(type);
|
|
90
|
+
})) && /*#__PURE__*/_react.default.createElement(_styles.Title, null, t('DELIVERY_TYPE', 'Delivery Type')), /*#__PURE__*/_react.default.createElement(_styles.TypesContainer, null, configTypes.includes(1) && /*#__PURE__*/_react.default.createElement(_styles.TypeButton, {
|
|
91
|
+
onClick: function onClick() {
|
|
92
|
+
return handleChangeType(1);
|
|
93
|
+
},
|
|
94
|
+
disabled: orderState === null || orderState === void 0 ? void 0 : orderState.loading,
|
|
95
|
+
activated: orderTypeSelected === 1
|
|
96
|
+
}, /*#__PURE__*/_react.default.createElement(_styles.IconTypeButton, {
|
|
97
|
+
activated: orderTypeSelected === 1
|
|
98
|
+
}, /*#__PURE__*/_react.default.createElement("img", {
|
|
99
|
+
src: theme === null || theme === void 0 || (_theme$images = theme.images) === null || _theme$images === void 0 || (_theme$images = _theme$images.general) === null || _theme$images === void 0 ? void 0 : _theme$images.deliveryIco,
|
|
100
|
+
width: 20,
|
|
101
|
+
height: 20
|
|
102
|
+
})), /*#__PURE__*/_react.default.createElement("p", null, t('DELIVERY', 'Delivery'))), configTypes.some(function (type) {
|
|
103
|
+
return pickupTypes.includes(type);
|
|
104
|
+
}) && /*#__PURE__*/_react.default.createElement(_styles.TypeButton, {
|
|
105
|
+
disabled: orderState === null || orderState === void 0 ? void 0 : orderState.loading,
|
|
106
|
+
activated: pickupTypes.includes(orderTypeSelected),
|
|
107
|
+
onClick: function onClick() {
|
|
108
|
+
return handleChangeToPickup();
|
|
109
|
+
}
|
|
110
|
+
}, /*#__PURE__*/_react.default.createElement(_styles.IconTypeButton, {
|
|
111
|
+
activated: pickupTypes.includes(orderTypeSelected)
|
|
112
|
+
}, /*#__PURE__*/_react.default.createElement("img", {
|
|
113
|
+
src: theme === null || theme === void 0 || (_theme$images2 = theme.images) === null || _theme$images2 === void 0 || (_theme$images2 = _theme$images2.general) === null || _theme$images2 === void 0 ? void 0 : _theme$images2.pickupIco,
|
|
114
|
+
width: 22,
|
|
115
|
+
height: 22
|
|
116
|
+
})), /*#__PURE__*/_react.default.createElement("p", null, t('PICKUP', 'Pickup'))), configTypes.some(function (type) {
|
|
117
|
+
return eatInType === type;
|
|
118
|
+
}) && /*#__PURE__*/_react.default.createElement(_styles.TypeButton, {
|
|
119
|
+
disabled: orderState === null || orderState === void 0 ? void 0 : orderState.loading,
|
|
120
|
+
activated: orderTypeSelected === 3,
|
|
121
|
+
onClick: function onClick() {
|
|
122
|
+
return handleChangeType(3);
|
|
123
|
+
}
|
|
124
|
+
}, /*#__PURE__*/_react.default.createElement(_styles.IconTypeButton, {
|
|
125
|
+
activated: orderTypeSelected === 3
|
|
126
|
+
}, /*#__PURE__*/_react.default.createElement("img", {
|
|
127
|
+
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.eatinIco,
|
|
128
|
+
width: 22,
|
|
129
|
+
height: 22
|
|
130
|
+
})), /*#__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))));
|
|
131
|
+
};
|
|
132
|
+
var OrderTypesSquares = exports.OrderTypesSquares = function OrderTypesSquares(props) {
|
|
133
|
+
var _useLanguage3 = (0, _orderingComponentsExternal.useLanguage)(),
|
|
134
|
+
_useLanguage4 = _slicedToArray(_useLanguage3, 2),
|
|
135
|
+
t = _useLanguage4[1];
|
|
136
|
+
var OrderTypesSquaresProps = _objectSpread(_objectSpread({}, props), {}, {
|
|
137
|
+
orderTypes: props.orderTypes || [{
|
|
138
|
+
value: 1,
|
|
139
|
+
text: t('DELIVERY', 'Delivery'),
|
|
140
|
+
description: t('ORDERTYPE_DESCRIPTION_DELIVERY', 'Delivery description')
|
|
141
|
+
}, {
|
|
142
|
+
value: 2,
|
|
143
|
+
text: t('PICKUP', 'Pickup'),
|
|
144
|
+
description: t('ORDERTYPE_DESCRIPTION_PICKUP', 'Pickup description')
|
|
145
|
+
}, {
|
|
146
|
+
value: 3,
|
|
147
|
+
text: t('EAT_IN', 'Eat in'),
|
|
148
|
+
description: t('ORDERTYPE_DESCRIPTION_EATIN', 'Eat in description')
|
|
149
|
+
}, {
|
|
150
|
+
value: 4,
|
|
151
|
+
text: t('CURBSIDE', 'Curbside'),
|
|
152
|
+
description: t('ORDERTYPE_DESCRIPTION_CURBSIDE', 'Curbside description')
|
|
153
|
+
}, {
|
|
154
|
+
value: 5,
|
|
155
|
+
text: t('DRIVE_THRU', 'Drive thru'),
|
|
156
|
+
description: t('ORDERTYPE_DESCRIPTION_DRIVETHRU', 'Drive Thru description')
|
|
157
|
+
}]
|
|
158
|
+
});
|
|
159
|
+
return /*#__PURE__*/_react.default.createElement(OrderTypesSquaresController, OrderTypesSquaresProps);
|
|
160
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
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.TypesContainer = exports.TypeButton = exports.Title = exports.IconTypeButton = exports.AdditionalTypesContainer = void 0;
|
|
8
|
+
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
9
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
|
|
10
|
+
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); }
|
|
11
|
+
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; }
|
|
12
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
13
|
+
var IconTypeButton = exports.IconTypeButton = _styledComponents.default.div(_templateObject || (_templateObject = _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) {
|
|
14
|
+
var _theme$colors;
|
|
15
|
+
var activated = _ref.activated,
|
|
16
|
+
theme = _ref.theme;
|
|
17
|
+
return activated ? theme === null || theme === void 0 || (_theme$colors = theme.colors) === null || _theme$colors === void 0 ? void 0 : _theme$colors.white : '#F3F9FF';
|
|
18
|
+
});
|
|
19
|
+
var TypesContainer = exports.TypesContainer = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n margin: 42px 20px 0px 20px;\n"])));
|
|
20
|
+
var AdditionalTypesContainer = exports.AdditionalTypesContainer = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n width: 60%;\n display: flex;\n margin-bottom: 20px;\n margin-left: 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) {
|
|
21
|
+
var _theme$colors2;
|
|
22
|
+
var theme = _ref2.theme;
|
|
23
|
+
return theme === null || theme === void 0 || (_theme$colors2 = theme.colors) === null || _theme$colors2 === void 0 ? void 0 : _theme$colors2.darkTextColor;
|
|
24
|
+
});
|
|
25
|
+
var TypeButton = exports.TypeButton = _styledComponents.default.div(_templateObject4 || (_templateObject4 = _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 margin-bottom: 32px;\n cursor: pointer;\n background: ", ";\n p{\n margin: 0;\n margin-left: 33px;\n ", "\n }\n"])), function (_ref3) {
|
|
26
|
+
var _theme$colors3, _theme$colors4;
|
|
27
|
+
var activated = _ref3.activated,
|
|
28
|
+
theme = _ref3.theme;
|
|
29
|
+
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;
|
|
30
|
+
}, function (_ref4) {
|
|
31
|
+
var _theme$colors5;
|
|
32
|
+
var activated = _ref4.activated,
|
|
33
|
+
theme = _ref4.theme;
|
|
34
|
+
return activated && (0, _styledComponents.css)(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n color: ", ";\n "])), theme === null || theme === void 0 || (_theme$colors5 = theme.colors) === null || _theme$colors5 === void 0 ? void 0 : _theme$colors5.white);
|
|
35
|
+
});
|
|
36
|
+
var Title = exports.Title = _styledComponents.default.h2(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n font-weight: 600;\n font-size: 24px;\n color: ", ";\n margin: 20px 20px 5px 20px;\n"])), function (props) {
|
|
37
|
+
var _props$theme;
|
|
38
|
+
return (_props$theme = props.theme) === null || _props$theme === void 0 ? void 0 : _props$theme.colors.headingColor;
|
|
39
|
+
});
|
|
@@ -220,14 +220,14 @@ var ProductItemAccordionUI = function ProductItemAccordionUI(props) {
|
|
|
220
220
|
className: "ingredient",
|
|
221
221
|
key: ingredient.id
|
|
222
222
|
}, /*#__PURE__*/_react.default.createElement("span", null, t('NO', 'No'), " ", ingredient.name));
|
|
223
|
-
})), productInfo.options.length > 0 && /*#__PURE__*/_react.default.createElement(_styles.ProductOptionsList, null, productInfo.options.
|
|
224
|
-
return a.rank - b.rank;
|
|
225
|
-
}).map(function (option) {
|
|
223
|
+
})), productInfo.options.length > 0 && /*#__PURE__*/_react.default.createElement(_styles.ProductOptionsList, null, productInfo.options.map(function (option) {
|
|
226
224
|
return /*#__PURE__*/_react.default.createElement("li", {
|
|
227
225
|
key: option.id
|
|
228
226
|
}, /*#__PURE__*/_react.default.createElement("p", null, option.name), /*#__PURE__*/_react.default.createElement(_styles.ProductOptionsList, {
|
|
229
227
|
className: "suboption"
|
|
230
|
-
}, option.suboptions.
|
|
228
|
+
}, option.suboptions.sort(function (a, b) {
|
|
229
|
+
return a.rank - b.rank;
|
|
230
|
+
}).map(function (suboption) {
|
|
231
231
|
var _suboption$half_price;
|
|
232
232
|
return /*#__PURE__*/_react.default.createElement("li", {
|
|
233
233
|
key: suboption.id
|
|
@@ -14,7 +14,7 @@ var Title = exports.Title = _styledComponents.default.h1(_templateObject || (_te
|
|
|
14
14
|
return props.theme.colors.darkTextColor;
|
|
15
15
|
});
|
|
16
16
|
var WrappLayout = exports.WrappLayout = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral([""])));
|
|
17
|
-
var WrapContent = exports.WrapContent = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n padding: 5px;\n background: ", ";\n ", "\n @media (min-width: 576px) {\n padding: 0px;\n }\n &#businessProductList {\n > div {\n margin-top: 30px;\n }\n }\n"])), function (props) {
|
|
17
|
+
var WrapContent = exports.WrapContent = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n padding: 5px;\n background: ", ";\n\n ", "\n\n @media (min-width: 576px) {\n padding: 0px;\n }\n &#businessProductList {\n > div {\n margin-top: 30px;\n }\n }\n"])), function (props) {
|
|
18
18
|
return props.theme.colors.backgroundPage;
|
|
19
19
|
}, function (_ref) {
|
|
20
20
|
var isGroceries = _ref.isGroceries;
|
|
@@ -45,14 +45,14 @@ var SearchBar = exports.SearchBar = function SearchBar(props) {
|
|
|
45
45
|
}
|
|
46
46
|
if (previousSearch !== e.target.value) {
|
|
47
47
|
if (!lazyLoad) {
|
|
48
|
-
onSearch(e.target.value);
|
|
48
|
+
onSearch && onSearch(e.target.value);
|
|
49
49
|
if (el.current) {
|
|
50
50
|
el.current.value = e.target.value;
|
|
51
51
|
}
|
|
52
52
|
} else {
|
|
53
53
|
clearTimeout(timeout);
|
|
54
54
|
timeout = setTimeout(function () {
|
|
55
|
-
onSearch(e.target.value);
|
|
55
|
+
onSearch && onSearch(e.target.value);
|
|
56
56
|
if (el.current) {
|
|
57
57
|
el.current.value = e.target.value;
|
|
58
58
|
}
|
|
@@ -52,7 +52,7 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
52
52
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
53
53
|
var notValidationFields = ['coupon', 'driver_tip', 'mobile_phone', 'address', 'address_notes'];
|
|
54
54
|
var SignUpFormUI = function SignUpFormUI(props) {
|
|
55
|
-
var _configs$facebook_log, _configs$facebook_log2, _configs$google_login, _configs$google_login2, _configs$facebook_log3, _configs$facebook_log4, _configs$apple_login_, _configs$apple_login_2, _validationFields$fie, _validationFields$fie2, _configs$verification, _configs$google_login3, _configs$facebook_log5, _configs$facebook_log6, _configs$facebook_id, _configs$google_login4, _configs$google_login5, _configs$google_login6, _configs$apple_login_3, _props$beforeElements, _props$beforeComponen, _props$beforeMidEleme, _props$beforeMidCompo, _validationFields$
|
|
55
|
+
var _configs$facebook_log, _configs$facebook_log2, _configs$google_login, _configs$google_login2, _configs$facebook_log3, _configs$facebook_log4, _configs$apple_login_, _configs$apple_login_2, _validationFields$fie, _validationFields$fie2, _configs$verification, _configs$google_login3, _configs$facebook_log5, _configs$facebook_log6, _configs$facebook_id, _configs$google_login4, _configs$google_login5, _configs$google_login6, _configs$apple_login_3, _props$beforeElements, _props$beforeComponen, _props$beforeMidEleme, _props$beforeMidCompo, _validationFields$fie7, _validationFields$fie8, _formMethods$errors8, _formMethods$errors9, _formMethods$errors10, _formMethods$errors11, _formMethods$errors12, _formMethods$errors13, _formMethods$errors14, _formMethods$errors15, _props$afterMidElemen, _props$afterMidCompon, _configs$terms_and_co, _formMethods$errors16, _formMethods$errors17, _configs$terms_and_co2, _configs$business_sig, _configs$driver_signu, _configs$business_sig2, _configs$driver_signu2, _configs$facebook_id2, _configs$facebook_id3, _configs$apple_login_4, _configs$google_login7, _configs$google_login8, _configs$google_login9, _props$afterComponent, _props$afterElements;
|
|
56
56
|
var handleChangeInput = props.handleChangeInput,
|
|
57
57
|
handleButtonSignupClick = props.handleButtonSignupClick,
|
|
58
58
|
handleReCaptcha = props.handleReCaptcha,
|
|
@@ -342,11 +342,14 @@ var SignUpFormUI = function SignUpFormUI(props) {
|
|
|
342
342
|
var _validationFields$fie5;
|
|
343
343
|
if (useChekoutFileds && validationFields !== null && validationFields !== void 0 && validationFields.loading) return;
|
|
344
344
|
var fieldnum = 0;
|
|
345
|
-
(0
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
345
|
+
if (validationFields !== null && validationFields !== void 0 && (_validationFields$fie5 = validationFields.fields) !== null && _validationFields$fie5 !== void 0 && _validationFields$fie5.checkout) {
|
|
346
|
+
var _validationFields$fie6;
|
|
347
|
+
(0, _utils.sortInputFields)({
|
|
348
|
+
values: validationFields === null || validationFields === void 0 || (_validationFields$fie6 = validationFields.fields) === null || _validationFields$fie6 === void 0 ? void 0 : _validationFields$fie6.checkout
|
|
349
|
+
}).forEach(function (field) {
|
|
350
|
+
if (showField && showField(field.code) && field.code !== 'email') fieldnum += 1;
|
|
351
|
+
});
|
|
352
|
+
}
|
|
350
353
|
setFieldNumber(fieldnum);
|
|
351
354
|
}, [validationFields]);
|
|
352
355
|
(0, _react.useEffect)(function () {
|
|
@@ -429,8 +432,8 @@ var SignUpFormUI = function SignUpFormUI(props) {
|
|
|
429
432
|
return /*#__PURE__*/_react.default.createElement(BeforeMidComponents, _extends({
|
|
430
433
|
key: i
|
|
431
434
|
}, props));
|
|
432
|
-
}), !(useChekoutFileds && validationFields !== null && validationFields !== void 0 && validationFields.loading) ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, (validationFields === null || validationFields === void 0 || (_validationFields$
|
|
433
|
-
values: validationFields === null || validationFields === void 0 || (_validationFields$
|
|
435
|
+
}), !(useChekoutFileds && validationFields !== null && validationFields !== void 0 && validationFields.loading) ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, (validationFields === null || validationFields === void 0 || (_validationFields$fie7 = validationFields.fields) === null || _validationFields$fie7 === void 0 ? void 0 : _validationFields$fie7.checkout) && (0, _utils.sortInputFields)({
|
|
436
|
+
values: validationFields === null || validationFields === void 0 || (_validationFields$fie8 = validationFields.fields) === null || _validationFields$fie8 === void 0 ? void 0 : _validationFields$fie8.checkout
|
|
434
437
|
}).map(function (field) {
|
|
435
438
|
var _formMethods$errors, _formMethods$errors2, _formMethods$errors3, _formMethods$errors4, _formMethods$errors5, _formMethods$errors6, _formMethods$errors7;
|
|
436
439
|
return showField && showField(field.code) && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
|
|
@@ -29,7 +29,7 @@ var CardContainer = exports.CardContainer = _styledComponents.default.div(_templ
|
|
|
29
29
|
var productsRows = _ref4.productsRows;
|
|
30
30
|
return productsRows ? (0, _styledComponents.css)(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n width: ", ";\n margin: 10px 0;\n "])), function () {
|
|
31
31
|
return productsRows === 3 ? 'calc(33% - 20px)' : 'calc(50% - 20px)';
|
|
32
|
-
}) : (0, _styledComponents.css)(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n width: 100%;\n margin: 10px;\n @media (min-width: 576px) {\n margin: 10px;\n width: calc(100% - 20px);\n }\n ", "\n
|
|
32
|
+
}) : (0, _styledComponents.css)(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n width: 100%;\n margin: 10px;\n @media (min-width: 576px) {\n margin: 10px;\n width: calc(100% - 20px);\n }\n ", "\n\n "])), function (_ref5) {
|
|
33
33
|
var isCartOnProductsList = _ref5.isCartOnProductsList;
|
|
34
34
|
return isCartOnProductsList ? (0, _styledComponents.css)(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n @media (min-width: 993px) {\n width: calc(50% - 20px);\n margin: 10px 20px 10px 0px;\n ", "\n }\n "])), function (props) {
|
|
35
35
|
var _props$theme;
|
|
@@ -34,7 +34,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
34
34
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
35
35
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
36
36
|
var UserDetailsUI = function UserDetailsUI(props) {
|
|
37
|
-
var _userState$result, _formState$result, _verifyPhoneState$res3, _props$beforeElements, _props$beforeComponen, _userData$email, _userData$cellphone, _user$cellphone, _userData$cellphone2, _parsePhoneNumber, _userData$country_pho, _userData, _props$afterComponent, _props$afterElements;
|
|
37
|
+
var _userState$result, _formState$result, _verifyPhoneState$res3, _props$beforeElements, _props$beforeComponen, _userData$email, _userData$cellphone, _user$cellphone, _userData$cellphone2, _parsePhoneNumber, _userData$country_pho, _userData, _configs$default_coun, _props$afterComponent, _props$afterElements;
|
|
38
38
|
var isEdit = props.isEdit,
|
|
39
39
|
formState = props.formState,
|
|
40
40
|
cleanFormState = props.cleanFormState,
|
|
@@ -62,6 +62,9 @@ var UserDetailsUI = function UserDetailsUI(props) {
|
|
|
62
62
|
_useSession2$ = _useSession2[0],
|
|
63
63
|
user = _useSession2$.user,
|
|
64
64
|
loading = _useSession2$.loading;
|
|
65
|
+
var _useConfig = (0, _orderingComponentsExternal.useConfig)(),
|
|
66
|
+
_useConfig2 = _slicedToArray(_useConfig, 1),
|
|
67
|
+
configs = _useConfig2[0].configs;
|
|
65
68
|
var _useState = (0, _react.useState)({
|
|
66
69
|
open: false,
|
|
67
70
|
content: []
|
|
@@ -190,7 +193,7 @@ var UserDetailsUI = function UserDetailsUI(props) {
|
|
|
190
193
|
}
|
|
191
194
|
})), !isEdit ? /*#__PURE__*/_react.default.createElement(_styles.UserData, null, ((userData === null || userData === void 0 ? void 0 : userData.name) || (userData === null || userData === void 0 ? void 0 : userData.middle_name) || (userData === null || userData === void 0 ? void 0 : userData.lastname) || (userData === null || userData === void 0 ? void 0 : userData.second_lastname)) && /*#__PURE__*/_react.default.createElement(_styles.UserName, null, userData === null || userData === void 0 ? void 0 : userData.name, " ", userData === null || userData === void 0 ? void 0 : userData.middle_name, " ", userData === null || userData === void 0 ? void 0 : userData.lastname, " ", userData === null || userData === void 0 ? void 0 : userData.second_lastname), ((_userData$email = userData === null || userData === void 0 ? void 0 : userData.email) !== null && _userData$email !== void 0 ? _userData$email : userData === null || userData === void 0 ? void 0 : userData.guest_email) && /*#__PURE__*/_react.default.createElement("p", null, userData !== null && userData !== void 0 && userData.guest_id ? userData === null || userData === void 0 ? void 0 : userData.guest_email : userData === null || userData === void 0 ? void 0 : userData.email), (((_userData$cellphone = userData === null || userData === void 0 ? void 0 : userData.cellphone) !== null && _userData$cellphone !== void 0 ? _userData$cellphone : userData === null || userData === void 0 ? void 0 : userData.guest_cellphone) || ((_user$cellphone = user === null || user === void 0 ? void 0 : user.cellphone) !== null && _user$cellphone !== void 0 ? _user$cellphone : user === null || user === void 0 ? void 0 : user.guest_cellphone)) && /*#__PURE__*/_react.default.createElement(_styles.PhoneContainer, null, /*#__PURE__*/_react.default.createElement(_styles.CountryFlag, null, (userData === null || userData === void 0 ? void 0 : userData.country_phone_code) && ((_userData$cellphone2 = userData === null || userData === void 0 ? void 0 : userData.cellphone) !== null && _userData$cellphone2 !== void 0 ? _userData$cellphone2 : userData === null || userData === void 0 ? void 0 : userData.guest_cellphone) && /*#__PURE__*/_react.default.createElement(_reactPhoneNumberInput.default, {
|
|
192
195
|
onChange: function onChange() {},
|
|
193
|
-
defaultCountry: (_parsePhoneNumber = (0, _libphonenumberJs.parsePhoneNumber)("+".concat(userData === null || userData === void 0 || (_userData$country_pho = userData.country_phone_code) === null || _userData$country_pho === void 0 ? void 0 : _userData$country_pho.replace('+', ''), " ").concat(userData === null || userData === void 0 || (_userData = userData[userData !== null && userData !== void 0 && userData.guest_id ? 'guest_cellphone' : 'cellphone']) === null || _userData === void 0 ? void 0 : _userData.replace("+".concat(userData === null || userData === void 0 ? void 0 : userData.country_phone_code), '')))) === null || _parsePhoneNumber === void 0 ? void 0 : _parsePhoneNumber.country
|
|
196
|
+
defaultCountry: ((_parsePhoneNumber = (0, _libphonenumberJs.parsePhoneNumber)("+".concat(userData === null || userData === void 0 || (_userData$country_pho = userData.country_phone_code) === null || _userData$country_pho === void 0 ? void 0 : _userData$country_pho.replace('+', ''), " ").concat(userData === null || userData === void 0 || (_userData = userData[userData !== null && userData !== void 0 && userData.guest_id ? 'guest_cellphone' : 'cellphone']) === null || _userData === void 0 ? void 0 : _userData.replace("+".concat(userData === null || userData === void 0 ? void 0 : userData.country_phone_code), '')))) === null || _parsePhoneNumber === void 0 ? void 0 : _parsePhoneNumber.country) || (configs === null || configs === void 0 || (_configs$default_coun = configs.default_country_code) === null || _configs$default_coun === void 0 ? void 0 : _configs$default_coun.value)
|
|
194
197
|
})), /*#__PURE__*/_react.default.createElement("p", null, userData !== null && userData !== void 0 && userData.guest_id ? userData === null || userData === void 0 ? void 0 : userData.guest_cellphone : userData === null || userData === void 0 ? void 0 : userData.cellphone)), /*#__PURE__*/_react.default.createElement(_styles.ChangeCustomerText, null, cartStatus !== 2 && /*#__PURE__*/_react.default.createElement("span", {
|
|
195
198
|
onClick: function onClick() {
|
|
196
199
|
return toggleIsEdit();
|
|
@@ -36,7 +36,7 @@ var IconButton = exports.IconButton = _styledComponents.default.button(_template
|
|
|
36
36
|
var isDisabled = _ref4.isDisabled;
|
|
37
37
|
return isDisabled && (0, _styledComponents.css)(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n pointer-events: none;\n "])));
|
|
38
38
|
});
|
|
39
|
-
var Button = exports.Button = _styledComponents.default.button(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n background: #
|
|
39
|
+
var Button = exports.Button = _styledComponents.default.button(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n background: #E9ECEF;\n color: #FFF;\n border: 1px solid #E9ECEF;\n border-radius: 7.6px;\n line-height: 30px;\n padding-left: 15px;\n padding-right: 15px;\n font-size: 16px;\n cursor: pointer;\n outline: none;\n overflow: hidden;\n text-overflow: ellipsis;\n &:active {\n background: ", ";\n }\n &:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n"])), function () {
|
|
40
40
|
return (0, _polished.darken)(0.07, '#CCC');
|
|
41
41
|
}, function (_ref5) {
|
|
42
42
|
var width = _ref5.width;
|
package/index-template.js
CHANGED
|
@@ -48,6 +48,10 @@ import loyaltyLevel from './template/assets/images/loyalty_level.png'
|
|
|
48
48
|
import phoneHero from './template/assets/images/phone-hero-callcenter.png'
|
|
49
49
|
import deliveryIco from './template/assets/images/delivery.svg'
|
|
50
50
|
import pickupIco from './template/assets/images/pickup.svg'
|
|
51
|
+
import eatinIco from './template/assets/images/eatin.svg'
|
|
52
|
+
import curbsideIco from './template/assets/images/curbside.svg'
|
|
53
|
+
import drivethruIco from './template/assets/images/drivethru.svg'
|
|
54
|
+
import cateringIco from './template/assets/images/catering.svg'
|
|
51
55
|
import phone from './template/assets/images/phone.svg'
|
|
52
56
|
import driverPng from './template/assets/images/driver.png'
|
|
53
57
|
|
|
@@ -151,7 +155,11 @@ theme.images = {
|
|
|
151
155
|
deliveryIco,
|
|
152
156
|
pickupIco,
|
|
153
157
|
phone,
|
|
154
|
-
driverPng
|
|
158
|
+
driverPng,
|
|
159
|
+
eatinIco,
|
|
160
|
+
curbsideIco,
|
|
161
|
+
drivethruIco,
|
|
162
|
+
cateringIco
|
|
155
163
|
},
|
|
156
164
|
icons: {
|
|
157
165
|
delivered,
|