ordering-ui-external 10.9.0 → 10.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_bundles/{0.ordering-ui.ac159b0ec9eb4a80c944.js → 0.ordering-ui.c4b4f29a4f0c8eaad874.js} +1 -1
- package/_bundles/{1.ordering-ui.ac159b0ec9eb4a80c944.js → 1.ordering-ui.c4b4f29a4f0c8eaad874.js} +1 -1
- package/_bundles/{2.ordering-ui.ac159b0ec9eb4a80c944.js → 2.ordering-ui.c4b4f29a4f0c8eaad874.js} +1 -1
- package/_bundles/{4.ordering-ui.ac159b0ec9eb4a80c944.js → 4.ordering-ui.c4b4f29a4f0c8eaad874.js} +1 -1
- package/_bundles/{5.ordering-ui.ac159b0ec9eb4a80c944.js → 5.ordering-ui.c4b4f29a4f0c8eaad874.js} +1 -1
- package/_bundles/{6.ordering-ui.ac159b0ec9eb4a80c944.js → 6.ordering-ui.c4b4f29a4f0c8eaad874.js} +1 -1
- package/_bundles/{7.ordering-ui.ac159b0ec9eb4a80c944.js → 7.ordering-ui.c4b4f29a4f0c8eaad874.js} +2 -2
- package/_bundles/{8.ordering-ui.ac159b0ec9eb4a80c944.js → 8.ordering-ui.c4b4f29a4f0c8eaad874.js} +1 -1
- package/_bundles/{9.ordering-ui.ac159b0ec9eb4a80c944.js → 9.ordering-ui.c4b4f29a4f0c8eaad874.js} +1 -1
- package/_bundles/ordering-ui.c4b4f29a4f0c8eaad874.js +2 -0
- package/_modules/components/AddressForm/index.js +5 -8
- package/_modules/components/BusinessProductsListing/index.js +5 -8
- package/_modules/components/Checkout/index.js +5 -8
- package/_modules/components/Footer/index.js +5 -7
- package/_modules/components/HelpStaticPage/index.js +5 -7
- package/_modules/components/LoginForm/index.js +5 -8
- package/_modules/components/OrdersOption/index.js +5 -8
- package/_modules/components/PagesList/index.js +5 -7
- package/_modules/components/StripeMethodForm/index.js +5 -8
- package/_modules/hooks/useIntersectionObserver.js +5 -7
- package/_modules/themes/callcenterOriginal/src/components/AddressDetails/index.js +11 -5
- package/_modules/themes/callcenterOriginal/src/components/AddressForm/index.js +22 -14
- package/_modules/themes/callcenterOriginal/src/components/AddressForm/styles.js +5 -4
- package/_modules/themes/callcenterOriginal/src/components/AddressList/index.js +10 -5
- package/_modules/themes/callcenterOriginal/src/components/AddressList/styles.js +7 -6
- package/_modules/themes/callcenterOriginal/src/components/Checkout/index.js +7 -9
- package/_modules/themes/callcenterOriginal/src/components/Footer/index.js +5 -7
- package/_modules/themes/callcenterOriginal/src/components/Header/index.js +8 -6
- package/_modules/themes/callcenterOriginal/src/components/HelpStaticPage/index.js +5 -7
- package/_modules/themes/callcenterOriginal/src/components/LoginForm/index.js +5 -8
- package/_modules/themes/callcenterOriginal/src/components/Orders/AddressForm/index.js +6 -9
- package/_modules/themes/callcenterOriginal/src/components/Orders/CreateCustomOrder/Checkout/index.js +5 -8
- package/_modules/themes/callcenterOriginal/src/components/Orders/CreateCustomOrder/StripeMethodForm/index.js +5 -8
- package/_modules/themes/callcenterOriginal/src/components/OrdersOption/index.js +5 -8
- package/_modules/themes/callcenterOriginal/src/components/PhoneAutocomplete/index.js +40 -25
- package/_modules/themes/callcenterOriginal/src/components/PhoneAutocomplete/styles.js +9 -7
- package/_modules/themes/callcenterOriginal/src/components/Shared/ImageCrop/index.js +5 -7
- package/_modules/themes/eight/src/components/AddressForm/index.js +5 -8
- package/_modules/themes/eight/src/components/Checkout/index.js +5 -8
- package/_modules/themes/eight/src/components/Footer/index.js +5 -7
- package/_modules/themes/eight/src/components/LoginForm/index.js +5 -8
- package/_modules/themes/five/src/components/AddressForm/index.js +5 -8
- package/_modules/themes/five/src/components/AddressList/index.js +5 -8
- package/_modules/themes/five/src/components/BusinessProductsListing/index.js +9 -15
- package/_modules/themes/five/src/components/Checkout/index.js +5 -8
- package/_modules/themes/five/src/components/Footer/index.js +5 -8
- package/_modules/themes/five/src/components/HelpStaticPage/index.js +5 -7
- package/_modules/themes/five/src/components/LoginForm/index.js +5 -8
- package/_modules/themes/five/src/components/LogoutPopup/index.js +9 -15
- package/_modules/themes/five/src/components/NotNetworkConnectivity/index.js +5 -8
- package/_modules/themes/five/src/components/OrderDetails/index.js +10 -16
- package/_modules/themes/five/src/components/OrderDetails/layouts/Kiosk/index.js +5 -8
- package/_modules/themes/five/src/components/SignUpForm/index.js +5 -8
- package/_modules/themes/five/src/components/SingleOrderCard/index.js +5 -8
- package/_modules/themes/four/src/components/AddressForm/index.js +5 -8
- package/_modules/themes/four/src/components/BusinessProductsListing/index.js +5 -8
- package/_modules/themes/four/src/components/Checkout/index.js +5 -8
- package/_modules/themes/four/src/components/Footer/index.js +5 -7
- package/_modules/themes/four/src/components/HelpStaticPage/index.js +5 -7
- package/_modules/themes/four/src/components/LoginForm/index.js +5 -8
- package/_modules/themes/four/src/components/OrdersOption/index.js +5 -8
- package/_modules/themes/franchise/src/components/AddressForm/index.js +5 -8
- package/_modules/themes/franchise/src/components/Checkout/index.js +5 -8
- package/_modules/themes/franchise/src/components/Footer/index.js +5 -7
- package/_modules/themes/franchise/src/components/HelpStaticPage/index.js +5 -7
- package/_modules/themes/franchise/src/components/LoginForm/index.js +5 -8
- package/_modules/themes/franchise/src/components/OrdersOption/index.js +5 -8
- package/_modules/themes/orderAndPay/src/components/Checkout/index.js +20 -31
- package/_modules/themes/orderAndPay/src/components/Footer/index.js +5 -7
- package/_modules/themes/orderAndPay/src/components/LoginForm/index.js +5 -8
- package/_modules/themes/orderAndPay/src/components/OrderTypeSelectorContent/index.js +9 -15
- package/_modules/themes/orderAndPay/src/components/OrdersOption/index.js +5 -8
- package/_modules/themes/pwa/src/components/AddressForm/index.js +5 -8
- package/_modules/themes/pwa/src/components/Checkout/index.js +5 -8
- package/_modules/themes/pwa/src/components/Footer/index.js +5 -7
- package/_modules/themes/pwa/src/components/HelpStaticPage/index.js +5 -7
- package/_modules/themes/pwa/src/components/LoginForm/index.js +5 -8
- package/_modules/themes/pwa/src/components/OrdersOption/index.js +5 -8
- package/_modules/themes/seven/src/components/AddressForm/index.js +5 -8
- package/_modules/themes/seven/src/components/Checkout/index.js +5 -8
- package/_modules/themes/seven/src/components/Footer/index.js +5 -7
- package/_modules/themes/seven/src/components/LoginForm/index.js +5 -8
- package/_modules/themes/seven/src/components/OrdersOption/index.js +5 -8
- package/_modules/themes/seven/src/components/ProductForm/productForm.js +9 -15
- package/_modules/themes/six/src/components/AddressForm/index.js +5 -8
- package/_modules/themes/six/src/components/Checkout/index.js +5 -8
- package/_modules/themes/six/src/components/Footer/index.js +5 -7
- package/_modules/themes/six/src/components/LoginForm/index.js +5 -8
- package/_modules/themes/three/src/components/AddressForm/index.js +5 -8
- package/_modules/themes/three/src/components/Checkout/index.js +5 -8
- package/_modules/themes/three/src/components/Footer/index.js +5 -7
- package/_modules/themes/three/src/components/HelpStaticPage/index.js +5 -7
- package/_modules/themes/three/src/components/LoginForm/index.js +5 -8
- package/_modules/themes/three/src/components/OrdersOption/index.js +5 -8
- package/_modules/themes/two/src/components/Checkout/index.js +5 -8
- package/_modules/themes/two/src/components/HelpStaticPage/index.js +5 -7
- package/_modules/themes/two/src/components/LoginForm/index.js +5 -8
- package/_modules/themes/two/src/components/OrdersOption/index.js +5 -8
- package/_modules/themes/wow/src/components/AddressForm/index.js +5 -8
- package/_modules/themes/wow/src/components/Checkout/index.js +5 -8
- package/_modules/themes/wow/src/components/LoginForm/index.js +5 -8
- package/_modules/themes/wow/src/components/OrdersOption/index.js +5 -8
- package/package.json +2 -2
- package/src/themes/callcenterOriginal/src/components/AddressDetails/index.js +10 -3
- package/src/themes/callcenterOriginal/src/components/AddressForm/index.js +15 -4
- package/src/themes/callcenterOriginal/src/components/AddressForm/styles.js +3 -1
- package/src/themes/callcenterOriginal/src/components/AddressList/index.js +14 -4
- package/src/themes/callcenterOriginal/src/components/AddressList/styles.js +5 -5
- package/src/themes/callcenterOriginal/src/components/Checkout/index.js +1 -0
- package/src/themes/callcenterOriginal/src/components/Header/index.js +6 -5
- package/src/themes/callcenterOriginal/src/components/Orders/AddressForm/index.js +1 -1
- package/src/themes/callcenterOriginal/src/components/PhoneAutocomplete/index.js +39 -11
- package/src/themes/callcenterOriginal/src/components/PhoneAutocomplete/styles.js +9 -4
- package/_bundles/ordering-ui.ac159b0ec9eb4a80c944.js +0 -2
- /package/_bundles/{7.ordering-ui.ac159b0ec9eb4a80c944.js.LICENSE.txt → 7.ordering-ui.c4b4f29a4f0c8eaad874.js.LICENSE.txt} +0 -0
- /package/_bundles/{ordering-ui.ac159b0ec9eb4a80c944.js.LICENSE.txt → ordering-ui.c4b4f29a4f0c8eaad874.js.LICENSE.txt} +0 -0
|
@@ -53,7 +53,7 @@ var inputNames = [{
|
|
|
53
53
|
code: 'Address notes'
|
|
54
54
|
}];
|
|
55
55
|
var AddressFormUI = function AddressFormUI(props) {
|
|
56
|
-
var _ref, _formState$changes$ad, _formState$changes, _addressState$address, _addressState$address2, _addressState$address3, _formState$changes$lo, _formState$changes2, _configState$configs, _configState$configs2, _configState$configs3, _configState$configs4, _props$beforeElements, _props$beforeComponen, _theme$defaultLanguag, _theme$defaultLanguag2, _theme$defaultLanguag3, _props$beforeMidEleme, _props$beforeMidCompo, _props$afterMidElemen, _props$afterMidCompon, _orderState$options6, _props$afterComponent, _props$afterElements;
|
|
56
|
+
var _ref, _formState$changes$ad, _formState$changes, _addressState$address, _addressState$address2, _addressState$address3, _formState$changes$lo, _formState$changes2, _configState$configs, _configState$configs2, _configState$configs3, _configState$configs4, _ref2, _props$beforeElements, _props$beforeComponen, _theme$defaultLanguag, _theme$defaultLanguag2, _theme$defaultLanguag3, _props$beforeMidEleme, _props$beforeMidCompo, _props$afterMidElemen, _props$afterMidCompon, _orderState$options6, _props$afterComponent, _props$afterElements;
|
|
57
57
|
var isPopup = props.isPopup,
|
|
58
58
|
addressesList = props.addressesList,
|
|
59
59
|
googleMapsControls = props.googleMapsControls,
|
|
@@ -247,8 +247,8 @@ var AddressFormUI = function AddressFormUI(props) {
|
|
|
247
247
|
var handleGoToPage = function handleGoToPage(data) {
|
|
248
248
|
events.emit('go_to_page', data);
|
|
249
249
|
};
|
|
250
|
-
var onSubmit =
|
|
251
|
-
|
|
250
|
+
var onSubmit = function onSubmit() {
|
|
251
|
+
return (_ref2 = _ref2 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
252
252
|
var _formState$changes3, _addressState$address5, _formState$changes4, _formState$changes5, _arrayList$map$some2;
|
|
253
253
|
var _formState$changes6, arrayList, addressToCompare, isAddressAlreadyExist;
|
|
254
254
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
@@ -315,11 +315,8 @@ var AddressFormUI = function AddressFormUI(props) {
|
|
|
315
315
|
return _context.stop();
|
|
316
316
|
}
|
|
317
317
|
}, _callee);
|
|
318
|
-
}));
|
|
319
|
-
|
|
320
|
-
return _ref2.apply(this, arguments);
|
|
321
|
-
};
|
|
322
|
-
}();
|
|
318
|
+
}))).apply(this, arguments);
|
|
319
|
+
};
|
|
323
320
|
|
|
324
321
|
// const handleAddressTag = (tag) => {
|
|
325
322
|
// setAddressTag(tag)
|
|
@@ -391,7 +391,7 @@ var CheckoutUI = function CheckoutUI(props) {
|
|
|
391
391
|
}));
|
|
392
392
|
};
|
|
393
393
|
var Checkout = function Checkout(props) {
|
|
394
|
-
var _Object$values2, _cartState$error, _cartState$cart;
|
|
394
|
+
var _Object$values2, _ref, _cartState$error, _cartState$cart;
|
|
395
395
|
var errors = props.errors,
|
|
396
396
|
clearErrors = props.clearErrors,
|
|
397
397
|
cartUuid = props.cartUuid,
|
|
@@ -481,8 +481,8 @@ var Checkout = function Checkout(props) {
|
|
|
481
481
|
});
|
|
482
482
|
}
|
|
483
483
|
}, [errors]);
|
|
484
|
-
var getOrder =
|
|
485
|
-
|
|
484
|
+
var getOrder = function getOrder(_x) {
|
|
485
|
+
return (_ref = _ref || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(cartId) {
|
|
486
486
|
var _result$order, userCustomer, url, response, _yield$response$json, result, _confirmCartRes$resul, confirmCartRes, cart;
|
|
487
487
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
488
488
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -576,11 +576,8 @@ var Checkout = function Checkout(props) {
|
|
|
576
576
|
return _context.stop();
|
|
577
577
|
}
|
|
578
578
|
}, _callee, null, [[0, 35], [17, 26]]);
|
|
579
|
-
}));
|
|
580
|
-
|
|
581
|
-
return _ref.apply(this, arguments);
|
|
582
|
-
};
|
|
583
|
-
}();
|
|
579
|
+
}))).apply(this, arguments);
|
|
580
|
+
};
|
|
584
581
|
(0, _react.useEffect)(function () {
|
|
585
582
|
if (token && cartUuid) {
|
|
586
583
|
getOrder(cartUuid);
|
|
@@ -26,6 +26,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
26
26
|
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; } }
|
|
27
27
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
28
28
|
var Footer = function Footer() {
|
|
29
|
+
var _ref;
|
|
29
30
|
var location = (0, _reactRouterDom.useLocation)();
|
|
30
31
|
var _useState = (0, _react.useState)({
|
|
31
32
|
body: null,
|
|
@@ -39,8 +40,8 @@ var Footer = function Footer() {
|
|
|
39
40
|
_useApi2 = _slicedToArray(_useApi, 1),
|
|
40
41
|
ordering = _useApi2[0];
|
|
41
42
|
var requestsState = {};
|
|
42
|
-
var getPage =
|
|
43
|
-
|
|
43
|
+
var getPage = function getPage() {
|
|
44
|
+
return (_ref = _ref || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
44
45
|
var footerPage, source, _yield$ordering$pages, _yield$ordering$pages2, error, result;
|
|
45
46
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
46
47
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -93,11 +94,8 @@ var Footer = function Footer() {
|
|
|
93
94
|
return _context.stop();
|
|
94
95
|
}
|
|
95
96
|
}, _callee, null, [[1, 15]]);
|
|
96
|
-
}));
|
|
97
|
-
|
|
98
|
-
return _ref.apply(this, arguments);
|
|
99
|
-
};
|
|
100
|
-
}();
|
|
97
|
+
}))).apply(this, arguments);
|
|
98
|
+
};
|
|
101
99
|
(0, _react.useEffect)(function () {
|
|
102
100
|
getPage();
|
|
103
101
|
return function () {
|
|
@@ -45,7 +45,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
45
45
|
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; } }
|
|
46
46
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
47
47
|
var LoginFormUI = function LoginFormUI(props) {
|
|
48
|
-
var _configs$google_login, _props$beforeElements, _props$beforeComponen, _configs$google_login2, _configs$facebook_log, _configs$facebook_log2, _configs$facebook_id, _configs$facebook_id2, _configs$apple_login_, _configs$twilio_servi, _configs$twilio_servi2, _theme$defaultLanguag, _props$beforeMidEleme, _props$beforeMidCompo, _props$afterMidElemen, _props$afterMidCompon, _theme$defaultLanguag2, _props$afterComponent, _props$afterElements;
|
|
48
|
+
var _configs$google_login, _ref, _props$beforeElements, _props$beforeComponen, _configs$google_login2, _configs$facebook_log, _configs$facebook_log2, _configs$facebook_id, _configs$facebook_id2, _configs$apple_login_, _configs$twilio_servi, _configs$twilio_servi2, _theme$defaultLanguag, _props$beforeMidEleme, _props$beforeMidCompo, _props$afterMidElemen, _props$afterMidCompon, _theme$defaultLanguag2, _props$afterComponent, _props$afterElements;
|
|
49
49
|
var useLoginByEmail = props.useLoginByEmail,
|
|
50
50
|
useLoginByCellphone = props.useLoginByCellphone,
|
|
51
51
|
handleChangeInput = props.handleChangeInput,
|
|
@@ -122,8 +122,8 @@ var LoginFormUI = function LoginFormUI(props) {
|
|
|
122
122
|
cookiepolicy: 'single_host_origin',
|
|
123
123
|
scope: 'profile'
|
|
124
124
|
};
|
|
125
|
-
var onSubmit =
|
|
126
|
-
|
|
125
|
+
var onSubmit = function onSubmit() {
|
|
126
|
+
return (_ref = _ref || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
127
127
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
128
128
|
while (1) switch (_context.prev = _context.next) {
|
|
129
129
|
case 0:
|
|
@@ -151,11 +151,8 @@ var LoginFormUI = function LoginFormUI(props) {
|
|
|
151
151
|
return _context.stop();
|
|
152
152
|
}
|
|
153
153
|
}, _callee);
|
|
154
|
-
}));
|
|
155
|
-
|
|
156
|
-
return _ref.apply(this, arguments);
|
|
157
|
-
};
|
|
158
|
-
}();
|
|
154
|
+
}))).apply(this, arguments);
|
|
155
|
+
};
|
|
159
156
|
var handleSuccessFacebook = function handleSuccessFacebook(user) {
|
|
160
157
|
var _user$session;
|
|
161
158
|
login({
|
|
@@ -50,7 +50,7 @@ var inputNames = [{
|
|
|
50
50
|
code: 'Address notes'
|
|
51
51
|
}];
|
|
52
52
|
var AddressFormUI = function AddressFormUI(props) {
|
|
53
|
-
var _addressState$address, _ref, _formState$changes$ad, _formState$changes, _addressState$address2, _addressState$address3, _theme$header, _addressState$address4, _formState$changes$lo, _formState$changes2, _theme$address, _theme$address2, _configState$configs, _configState$configs2, _configState$configs3, _configState$configs4, _props$beforeElements, _props$beforeComponen, _props$beforeMidEleme, _props$beforeMidCompo, _props$afterMidElemen, _props$afterMidCompon, _orderState$options6, _props$afterComponent, _props$afterElements;
|
|
53
|
+
var _addressState$address, _ref, _formState$changes$ad, _formState$changes, _addressState$address2, _addressState$address3, _theme$header, _addressState$address4, _formState$changes$lo, _formState$changes2, _theme$address, _theme$address2, _configState$configs, _configState$configs2, _configState$configs3, _configState$configs4, _ref2, _props$beforeElements, _props$beforeComponen, _props$beforeMidEleme, _props$beforeMidCompo, _props$afterMidElemen, _props$afterMidCompon, _orderState$options6, _props$afterComponent, _props$afterElements;
|
|
54
54
|
var addressesList = props.addressesList,
|
|
55
55
|
googleMapsControls = props.googleMapsControls,
|
|
56
56
|
formState = props.formState,
|
|
@@ -232,8 +232,8 @@ var AddressFormUI = function AddressFormUI(props) {
|
|
|
232
232
|
e.preventDefault();
|
|
233
233
|
}
|
|
234
234
|
};
|
|
235
|
-
var onSubmit =
|
|
236
|
-
|
|
235
|
+
var onSubmit = function onSubmit() {
|
|
236
|
+
return (_ref2 = _ref2 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
237
237
|
var _formState$changes3, _addressState$address6, _formState$changes4, _formState$changes5, _arrayList$map$some2;
|
|
238
238
|
var _formState$changes6, arrayList, addressToCompare, isAddressAlreadyExist;
|
|
239
239
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
@@ -293,11 +293,8 @@ var AddressFormUI = function AddressFormUI(props) {
|
|
|
293
293
|
return _context.stop();
|
|
294
294
|
}
|
|
295
295
|
}, _callee);
|
|
296
|
-
}));
|
|
297
|
-
|
|
298
|
-
return _ref2.apply(this, arguments);
|
|
299
|
-
};
|
|
300
|
-
}();
|
|
296
|
+
}))).apply(this, arguments);
|
|
297
|
+
};
|
|
301
298
|
var handleAddressTag = function handleAddressTag(tag) {
|
|
302
299
|
setAddressTag(tag);
|
|
303
300
|
handleChangeInput({
|
|
@@ -40,7 +40,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
40
40
|
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; } }
|
|
41
41
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
42
42
|
var AddressListUI = function AddressListUI(props) {
|
|
43
|
-
var _theme$profile, _theme$profile2, _theme$profile3, _theme$profile4, _theme$profile5, _addressList$addresse2, _props$beforeElements, _props$beforeComponen, _props$afterComponent, _props$afterElements;
|
|
43
|
+
var _theme$profile, _theme$profile2, _theme$profile3, _theme$profile4, _theme$profile5, _ref, _addressList$addresse2, _props$beforeElements, _props$beforeComponen, _props$afterComponent, _props$afterElements;
|
|
44
44
|
var actionStatus = props.actionStatus,
|
|
45
45
|
addressList = props.addressList,
|
|
46
46
|
handleDelete = props.handleDelete,
|
|
@@ -132,8 +132,8 @@ var AddressListUI = function AddressListUI(props) {
|
|
|
132
132
|
}
|
|
133
133
|
handleCloseAddressForm();
|
|
134
134
|
};
|
|
135
|
-
var handleSetAddress =
|
|
136
|
-
|
|
135
|
+
var handleSetAddress = function handleSetAddress(_x) {
|
|
136
|
+
return (_ref = _ref || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(address) {
|
|
137
137
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
138
138
|
while (1) switch (_context.prev = _context.next) {
|
|
139
139
|
case 0:
|
|
@@ -158,11 +158,8 @@ var AddressListUI = function AddressListUI(props) {
|
|
|
158
158
|
return _context.stop();
|
|
159
159
|
}
|
|
160
160
|
}, _callee);
|
|
161
|
-
}));
|
|
162
|
-
|
|
163
|
-
return _ref.apply(this, arguments);
|
|
164
|
-
};
|
|
165
|
-
}();
|
|
161
|
+
}))).apply(this, arguments);
|
|
162
|
+
};
|
|
166
163
|
var handleDeleteClick = function handleDeleteClick(address) {
|
|
167
164
|
setConfirm({
|
|
168
165
|
open: true,
|
|
@@ -45,7 +45,7 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
45
45
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
46
46
|
var PIXELS_TO_SCROLL = 300;
|
|
47
47
|
var BusinessProductsListingUI = function BusinessProductsListingUI(props) {
|
|
48
|
-
var _configs$add_product_, _configs$checkout_mul, _Object$values$find, _businessState$busine, _theme$business_view, _theme$business_view2, _theme$business_view3, _theme$header, _theme$defaultLanguag, _theme$defaultLanguag2, _theme$defaultLanguag3, _theme$defaultLanguag4, _theme$defaultLanguag5, _theme$defaultLanguag6, _currentCart$taxes, _currentCart$products2, _theme$defaultLanguag7, _theme$defaultLanguag8, _theme$defaultLanguag9, _theme$defaultLanguag10, _error$, _theme$defaultLanguag11, _currentCart$products3, _theme$defaultLanguag12, _theme$defaultLanguag13, _theme$defaultLanguag14, _theme$defaultLanguag15, _currentCart$products4, _currentCart$products5, _currentCart$products6, _productModal$error$, _theme$defaultLanguag16, _productModal$product2, _business$professiona3, _currentCart$products7, _currentCart$products8;
|
|
48
|
+
var _configs$add_product_, _configs$checkout_mul, _Object$values$find, _businessState$busine, _theme$business_view, _theme$business_view2, _theme$business_view3, _theme$header, _theme$defaultLanguag, _theme$defaultLanguag2, _theme$defaultLanguag3, _theme$defaultLanguag4, _theme$defaultLanguag5, _theme$defaultLanguag6, _currentCart$taxes, _ref, _ref2, _currentCart$products2, _theme$defaultLanguag7, _theme$defaultLanguag8, _theme$defaultLanguag9, _theme$defaultLanguag10, _error$, _theme$defaultLanguag11, _currentCart$products3, _theme$defaultLanguag12, _theme$defaultLanguag13, _theme$defaultLanguag14, _theme$defaultLanguag15, _currentCart$products4, _currentCart$products5, _currentCart$products6, _productModal$error$, _theme$defaultLanguag16, _productModal$product2, _business$professiona3, _currentCart$products7, _currentCart$products8;
|
|
49
49
|
var errors = props.errors,
|
|
50
50
|
openCategories = props.openCategories,
|
|
51
51
|
isInitialRender = props.isInitialRender,
|
|
@@ -193,8 +193,8 @@ var BusinessProductsListingUI = function BusinessProductsListingUI(props) {
|
|
|
193
193
|
var handler = function handler() {
|
|
194
194
|
setOpenBusinessInformation(true);
|
|
195
195
|
};
|
|
196
|
-
var onProductClick =
|
|
197
|
-
|
|
196
|
+
var onProductClick = function onProductClick(_x) {
|
|
197
|
+
return (_ref = _ref || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(product) {
|
|
198
198
|
var _currentCart$products, isProductAddedToCart, productQuantity, minimumPerOrder, addCurrentProduct, updateCurrentProduct, cartData, _business$professiona, _product$category;
|
|
199
199
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
200
200
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -260,11 +260,8 @@ var BusinessProductsListingUI = function BusinessProductsListingUI(props) {
|
|
|
260
260
|
return _context.stop();
|
|
261
261
|
}
|
|
262
262
|
}, _callee);
|
|
263
|
-
}));
|
|
264
|
-
|
|
265
|
-
return _ref.apply(this, arguments);
|
|
266
|
-
};
|
|
267
|
-
}();
|
|
263
|
+
}))).apply(this, arguments);
|
|
264
|
+
};
|
|
268
265
|
var handleCustomProductBannerClick = function handleCustomProductBannerClick(product) {
|
|
269
266
|
var _business$professiona2;
|
|
270
267
|
if (!((product === null || product === void 0 ? void 0 : product.type) === 'service' && (business === null || business === void 0 || (_business$professiona2 = business.professionals) === null || _business$professiona2 === void 0 ? void 0 : _business$professiona2.length) > 0)) {
|
|
@@ -349,8 +346,8 @@ var BusinessProductsListingUI = function BusinessProductsListingUI(props) {
|
|
|
349
346
|
page: 'search'
|
|
350
347
|
});
|
|
351
348
|
};
|
|
352
|
-
var adjustBusiness =
|
|
353
|
-
|
|
349
|
+
var adjustBusiness = function adjustBusiness(_x2) {
|
|
350
|
+
return (_ref2 = _ref2 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(adjustBusinessId) {
|
|
354
351
|
var _carts$adjustBusiness;
|
|
355
352
|
var _carts, products, unavailableProducts, alreadyRemoved;
|
|
356
353
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
@@ -388,11 +385,8 @@ var BusinessProductsListingUI = function BusinessProductsListingUI(props) {
|
|
|
388
385
|
return _context2.stop();
|
|
389
386
|
}
|
|
390
387
|
}, _callee2);
|
|
391
|
-
}));
|
|
392
|
-
|
|
393
|
-
return _ref2.apply(this, arguments);
|
|
394
|
-
};
|
|
395
|
-
}();
|
|
388
|
+
}))).apply(this, arguments);
|
|
389
|
+
};
|
|
396
390
|
(0, _react.useEffect)(function () {
|
|
397
391
|
if (categoryId && productId && isInitialRender) {
|
|
398
392
|
var _productModal$product;
|
|
@@ -689,7 +689,7 @@ var CheckoutUI = function CheckoutUI(props) {
|
|
|
689
689
|
})));
|
|
690
690
|
};
|
|
691
691
|
var Checkout = function Checkout(props) {
|
|
692
|
-
var _Object$values2, _cartState$error, _cartState$cart3;
|
|
692
|
+
var _Object$values2, _ref2, _cartState$error, _cartState$cart3;
|
|
693
693
|
var errors = props.errors,
|
|
694
694
|
clearErrors = props.clearErrors,
|
|
695
695
|
cartUuid = props.cartUuid,
|
|
@@ -784,8 +784,8 @@ var Checkout = function Checkout(props) {
|
|
|
784
784
|
});
|
|
785
785
|
}
|
|
786
786
|
}, [errors]);
|
|
787
|
-
var getOrder =
|
|
788
|
-
|
|
787
|
+
var getOrder = function getOrder(_x) {
|
|
788
|
+
return (_ref2 = _ref2 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(cartId) {
|
|
789
789
|
var _result$order, result, cart, userCustomer, url, response, content, _result, credomaticData, urlParams, paramsObj, _confirmCartRes$resul, confirmCartRes, _cart, spotNumberFromStorage, _JSON$parse, _JSON$parse2, _cart2, spotNumber, slug;
|
|
790
790
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
791
791
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -911,11 +911,8 @@ var Checkout = function Checkout(props) {
|
|
|
911
911
|
return _context.stop();
|
|
912
912
|
}
|
|
913
913
|
}, _callee, null, [[0, 45], [25, 34]]);
|
|
914
|
-
}));
|
|
915
|
-
|
|
916
|
-
return _ref2.apply(this, arguments);
|
|
917
|
-
};
|
|
918
|
-
}();
|
|
914
|
+
}))).apply(this, arguments);
|
|
915
|
+
};
|
|
919
916
|
(0, _react.useEffect)(function () {
|
|
920
917
|
if (token && cartUuid) {
|
|
921
918
|
getOrder(cartUuid);
|
|
@@ -26,7 +26,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
26
26
|
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; } }
|
|
27
27
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
28
28
|
var Footer = function Footer(_ref) {
|
|
29
|
-
var _theme$my_products, _configs$powered_by_o;
|
|
29
|
+
var _theme$my_products, _configs$powered_by_o, _ref2;
|
|
30
30
|
var isFooterPage = _ref.isFooterPage;
|
|
31
31
|
var _useState = (0, _react.useState)({
|
|
32
32
|
body: null,
|
|
@@ -49,8 +49,8 @@ var Footer = function Footer(_ref) {
|
|
|
49
49
|
t = _useLanguage2[1];
|
|
50
50
|
var footerContent = 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.theme_settings) === 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.values) === null || _theme$my_products === void 0 ? void 0 : _theme$my_products.footer_content;
|
|
51
51
|
var enabledPoweredByOrdering = configs === null || configs === void 0 || (_configs$powered_by_o = configs.powered_by_ordering_module) === null || _configs$powered_by_o === void 0 ? void 0 : _configs$powered_by_o.value;
|
|
52
|
-
var getPage =
|
|
53
|
-
|
|
52
|
+
var getPage = function getPage() {
|
|
53
|
+
return (_ref2 = _ref2 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
54
54
|
var source, _yield$ordering$pages, _yield$ordering$pages2, error, result;
|
|
55
55
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
56
56
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -98,11 +98,8 @@ var Footer = function Footer(_ref) {
|
|
|
98
98
|
return _context.stop();
|
|
99
99
|
}
|
|
100
100
|
}, _callee, null, [[1, 14]]);
|
|
101
|
-
}));
|
|
102
|
-
|
|
103
|
-
return _ref2.apply(this, arguments);
|
|
104
|
-
};
|
|
105
|
-
}();
|
|
101
|
+
}))).apply(this, arguments);
|
|
102
|
+
};
|
|
106
103
|
(0, _react.useEffect)(function () {
|
|
107
104
|
getPage();
|
|
108
105
|
return function () {
|
|
@@ -26,6 +26,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
26
26
|
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; } }
|
|
27
27
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
28
28
|
var HelpStaticPage = function HelpStaticPage(props) {
|
|
29
|
+
var _ref;
|
|
29
30
|
var slug = props.slug;
|
|
30
31
|
var _useState = (0, _react.useState)({
|
|
31
32
|
body: null,
|
|
@@ -39,8 +40,8 @@ var HelpStaticPage = function HelpStaticPage(props) {
|
|
|
39
40
|
_useApi2 = _slicedToArray(_useApi, 1),
|
|
40
41
|
ordering = _useApi2[0];
|
|
41
42
|
var requestsState = {};
|
|
42
|
-
var getPage =
|
|
43
|
-
|
|
43
|
+
var getPage = function getPage() {
|
|
44
|
+
return (_ref = _ref || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
44
45
|
var source, _yield$ordering$pages, _yield$ordering$pages2, error, result;
|
|
45
46
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
46
47
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -88,11 +89,8 @@ var HelpStaticPage = function HelpStaticPage(props) {
|
|
|
88
89
|
return _context.stop();
|
|
89
90
|
}
|
|
90
91
|
}, _callee, null, [[1, 14]]);
|
|
91
|
-
}));
|
|
92
|
-
|
|
93
|
-
return _ref.apply(this, arguments);
|
|
94
|
-
};
|
|
95
|
-
}();
|
|
92
|
+
}))).apply(this, arguments);
|
|
93
|
+
};
|
|
96
94
|
(0, _react.useEffect)(function () {
|
|
97
95
|
getPage();
|
|
98
96
|
return function () {
|
|
@@ -46,7 +46,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
46
46
|
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; } }
|
|
47
47
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
48
48
|
var LoginFormUI = function LoginFormUI(props) {
|
|
49
|
-
var _configs$google_login, _optimizationLoad$res, _optimizationLoad$res2, _optimizationLoad$res3, _configs$spoonity_tit, _configs$facebook_log, _configs$facebook_log2, _configs$facebook_id, _configs$google_login2, _configs$google_login3, _configs$google_login4, _configs$apple_login_, _configs$twilio_servi, _configs$twilio_servi2, _props$beforeElements, _props$beforeComponen, _theme$images, _theme$images2, _props$beforeMidEleme, _props$beforeMidCompo, _formMethods$errors, _formMethods$errors2, _formMethods$errors3, _formMethods$errors4, _formMethods$errors5, _formMethods$errors6, _formMethods$errors7, _formMethods$errors8, _formMethods$errors9, _formMethods$errors10, _formMethods$errors11, _formMethods$errors12, _props$afterMidElemen, _props$afterMidCompon, _theme$defaultLanguag, _configs$facebook_log3, _configs$facebook_log4, _configs$facebook_id2, _configs$facebook_id3, _configs$google_login5, _configs$google_login6, _configs$google_login7, _configs$apple_login_2, _configs$twilio_servi3, _configs$twilio_servi4, _props$afterComponent, _props$afterElements;
|
|
49
|
+
var _configs$google_login, _optimizationLoad$res, _optimizationLoad$res2, _optimizationLoad$res3, _configs$spoonity_tit, _configs$facebook_log, _configs$facebook_log2, _configs$facebook_id, _configs$google_login2, _configs$google_login3, _configs$google_login4, _configs$apple_login_, _configs$twilio_servi, _configs$twilio_servi2, _ref, _props$beforeElements, _props$beforeComponen, _theme$images, _theme$images2, _props$beforeMidEleme, _props$beforeMidCompo, _formMethods$errors, _formMethods$errors2, _formMethods$errors3, _formMethods$errors4, _formMethods$errors5, _formMethods$errors6, _formMethods$errors7, _formMethods$errors8, _formMethods$errors9, _formMethods$errors10, _formMethods$errors11, _formMethods$errors12, _props$afterMidElemen, _props$afterMidCompon, _theme$defaultLanguag, _configs$facebook_log3, _configs$facebook_log4, _configs$facebook_id2, _configs$facebook_id3, _configs$google_login5, _configs$google_login6, _configs$google_login7, _configs$apple_login_2, _configs$twilio_servi3, _configs$twilio_servi4, _props$afterComponent, _props$afterElements;
|
|
50
50
|
var useLoginByEmail = props.useLoginByEmail,
|
|
51
51
|
useLoginByCellphone = props.useLoginByCellphone,
|
|
52
52
|
handleChangeInput = props.handleChangeInput,
|
|
@@ -155,8 +155,8 @@ var LoginFormUI = function LoginFormUI(props) {
|
|
|
155
155
|
var spoonityTitle = configs === null || configs === void 0 || (_configs$spoonity_tit = configs.spoonity_title) === null || _configs$spoonity_tit === void 0 ? void 0 : _configs$spoonity_tit.value;
|
|
156
156
|
var hasSocialLogin = ((configs === null || configs === void 0 || (_configs$facebook_log = configs.facebook_login) === null || _configs$facebook_log === void 0 ? void 0 : _configs$facebook_log.value) === 'true' || (configs === null || configs === void 0 || (_configs$facebook_log2 = configs.facebook_login) === null || _configs$facebook_log2 === void 0 ? void 0 : _configs$facebook_log2.value) === '1') && (configs === null || configs === void 0 || (_configs$facebook_id = configs.facebook_id) === null || _configs$facebook_id === void 0 ? void 0 : _configs$facebook_id.value) || (configs === null || configs === void 0 || (_configs$google_login2 = configs.google_login_client_id) === null || _configs$google_login2 === void 0 ? void 0 : _configs$google_login2.value) && (configs === null || configs === void 0 || (_configs$google_login3 = configs.google_login_auth_domain) === null || _configs$google_login3 === void 0 ? void 0 : _configs$google_login3.value) && (configs === null || configs === void 0 || (_configs$google_login4 = configs.google_login_api_key) === null || _configs$google_login4 === void 0 ? void 0 : _configs$google_login4.value) && googleLoginEnabled || (configs === null || configs === void 0 || (_configs$apple_login_ = configs.apple_login_client_id) === null || _configs$apple_login_ === void 0 ? void 0 : _configs$apple_login_.value) && appleLoginEnabled || loginTab === 'cellphone' && ((configs === null || configs === void 0 || (_configs$twilio_servi = configs.twilio_service_enabled) === null || _configs$twilio_servi === void 0 ? void 0 : _configs$twilio_servi.value) === 'true' || (configs === null || configs === void 0 || (_configs$twilio_servi2 = configs.twilio_service_enabled) === null || _configs$twilio_servi2 === void 0 ? void 0 : _configs$twilio_servi2.value) === '1');
|
|
157
157
|
var hasSocialEnabled = googleLoginEnabled || facebookLoginEnabled || appleLoginEnabled;
|
|
158
|
-
var onSubmit =
|
|
159
|
-
|
|
158
|
+
var onSubmit = function onSubmit() {
|
|
159
|
+
return (_ref = _ref || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
160
160
|
var _parseNumber, cellphone, countryPhoneCode;
|
|
161
161
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
162
162
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -214,11 +214,8 @@ var LoginFormUI = function LoginFormUI(props) {
|
|
|
214
214
|
return _context.stop();
|
|
215
215
|
}
|
|
216
216
|
}, _callee);
|
|
217
|
-
}));
|
|
218
|
-
|
|
219
|
-
return _ref.apply(this, arguments);
|
|
220
|
-
};
|
|
221
|
-
}();
|
|
217
|
+
}))).apply(this, arguments);
|
|
218
|
+
};
|
|
222
219
|
var handleSuccessFacebook = function handleSuccessFacebook(user) {
|
|
223
220
|
var _user$session;
|
|
224
221
|
login({
|
|
@@ -30,7 +30,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
30
30
|
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; } }
|
|
31
31
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
32
32
|
var LogoutUI = function LogoutUI(props) {
|
|
33
|
-
var _formMethods$errors, _formMethods$errors2, _formMethods$errors3, _formMethods$errors4;
|
|
33
|
+
var _ref, _ref2, _formMethods$errors, _formMethods$errors2, _formMethods$errors3, _formMethods$errors4;
|
|
34
34
|
var handleLogoutClick = props.handleLogoutClick,
|
|
35
35
|
onClose = props.onClose;
|
|
36
36
|
var _useApi = (0, _orderingComponentsExternal.useApi)(),
|
|
@@ -75,8 +75,8 @@ var LogoutUI = function LogoutUI(props) {
|
|
|
75
75
|
content: []
|
|
76
76
|
});
|
|
77
77
|
};
|
|
78
|
-
var fetchPassword =
|
|
79
|
-
|
|
78
|
+
var fetchPassword = function fetchPassword(_x) {
|
|
79
|
+
return (_ref = _ref || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(body) {
|
|
80
80
|
var response, _yield$response$json, error, result;
|
|
81
81
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
82
82
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -124,13 +124,10 @@ var LogoutUI = function LogoutUI(props) {
|
|
|
124
124
|
return _context.stop();
|
|
125
125
|
}
|
|
126
126
|
}, _callee, null, [[0, 14]]);
|
|
127
|
-
}));
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
}();
|
|
132
|
-
var onSubmit = /*#__PURE__*/function () {
|
|
133
|
-
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(values) {
|
|
127
|
+
}))).apply(this, arguments);
|
|
128
|
+
};
|
|
129
|
+
var onSubmit = function onSubmit(_x2) {
|
|
130
|
+
return (_ref2 = _ref2 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(values) {
|
|
134
131
|
var result;
|
|
135
132
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
136
133
|
while (1) switch (_context2.prev = _context2.next) {
|
|
@@ -155,11 +152,8 @@ var LogoutUI = function LogoutUI(props) {
|
|
|
155
152
|
return _context2.stop();
|
|
156
153
|
}
|
|
157
154
|
}, _callee2, null, [[0, 7]]);
|
|
158
|
-
}));
|
|
159
|
-
|
|
160
|
-
return _ref2.apply(this, arguments);
|
|
161
|
-
};
|
|
162
|
-
}();
|
|
155
|
+
}))).apply(this, arguments);
|
|
156
|
+
};
|
|
163
157
|
return /*#__PURE__*/_react.default.createElement(_styles.LoginContainer, null, /*#__PURE__*/_react.default.createElement(_styles.FormSide, null, /*#__PURE__*/_react.default.createElement(_styles.Title, null, t('LOGOUT', 'Logout')), /*#__PURE__*/_react.default.createElement(_styles.FormInput, null, /*#__PURE__*/_react.default.createElement(_styles.SubTitle, null, t('ONLY_MANAGER_LOGOUT', 'Only the manager has the password to sign out this App.')), ((_formMethods$errors = formMethods.errors) === null || _formMethods$errors === void 0 ? void 0 : _formMethods$errors.password) && /*#__PURE__*/_react.default.createElement(_styles.ValidationText, null, (_formMethods$errors2 = formMethods.errors) === null || _formMethods$errors2 === void 0 || (_formMethods$errors2 = _formMethods$errors2.password) === null || _formMethods$errors2 === void 0 ? void 0 : _formMethods$errors2.message, " ", (formMethods === null || formMethods === void 0 || (_formMethods$errors3 = formMethods.errors) === null || _formMethods$errors3 === void 0 || (_formMethods$errors3 = _formMethods$errors3.password) === null || _formMethods$errors3 === void 0 ? void 0 : _formMethods$errors3.type) === 'required' && '*'), logoutState.error && logoutState.result && /*#__PURE__*/_react.default.createElement(_styles.ValidationText, null, logoutState.result[0]), /*#__PURE__*/_react.default.createElement(_styles.InputWrapper, null, /*#__PURE__*/_react.default.createElement(_Inputs.Input, {
|
|
164
158
|
type: !passwordSee ? 'password' : 'text',
|
|
165
159
|
name: "password",
|
|
@@ -23,7 +23,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
23
23
|
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; } }
|
|
24
24
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
25
25
|
var NotNetworkConnectivity = function NotNetworkConnectivity(props) {
|
|
26
|
-
var _theme$images, _props$isOnline;
|
|
26
|
+
var _theme$images, _ref, _props$isOnline;
|
|
27
27
|
var _useLanguage = (0, _orderingComponentsExternal.useLanguage)(),
|
|
28
28
|
_useLanguage2 = _slicedToArray(_useLanguage, 2),
|
|
29
29
|
t = _useLanguage2[1];
|
|
@@ -34,8 +34,8 @@ var NotNetworkConnectivity = function NotNetworkConnectivity(props) {
|
|
|
34
34
|
_useState2 = _slicedToArray(_useState, 2),
|
|
35
35
|
base64ImageString = _useState2[0],
|
|
36
36
|
setBase64ImageString = _useState2[1];
|
|
37
|
-
var getBase64ImageFromUrl =
|
|
38
|
-
|
|
37
|
+
var getBase64ImageFromUrl = function getBase64ImageFromUrl(_x) {
|
|
38
|
+
return (_ref = _ref || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(imageUrl) {
|
|
39
39
|
var response, blob;
|
|
40
40
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
41
41
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -63,11 +63,8 @@ var NotNetworkConnectivity = function NotNetworkConnectivity(props) {
|
|
|
63
63
|
return _context.stop();
|
|
64
64
|
}
|
|
65
65
|
}, _callee);
|
|
66
|
-
}));
|
|
67
|
-
|
|
68
|
-
return _ref.apply(this, arguments);
|
|
69
|
-
};
|
|
70
|
-
}();
|
|
66
|
+
}))).apply(this, arguments);
|
|
67
|
+
};
|
|
71
68
|
(0, _react.useEffect)(function () {
|
|
72
69
|
getBase64ImageFromUrl(errorImage).then(function (base64) {
|
|
73
70
|
setBase64ImageString(base64);
|
|
@@ -57,7 +57,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
57
57
|
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; } }
|
|
58
58
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
59
59
|
var OrderDetailsUI = function OrderDetailsUI(props) {
|
|
60
|
-
var _configs$google_maps_, _configs$powered_by_o, _theme$confirmation, _theme$confirmation2, _theme$confirmation3, _theme$confirmation4, _theme$confirmation5, _theme$confirmation6, _theme$confirmation7, _theme$confirmation8, _theme$confirmation9, _theme$confirmation10, _theme$confirmation11, _theme$confirmation12, _theme$confirmation13, _theme$confirmation14, _theme$confirmation15, _theme$confirmation16, _theme$confirmation17, _theme$confirmation18, _order$driver, _order$driver2, _theme$images, _order$business2, _order$business3, _theme$images2, _order$customer, _order$customer2, _theme$images3, _order$driver3, _order$driver4, _theme$defaultLanguag, _configs$guest_uuid_a, _order$business4, _order$business5, _orderTypes$find, _configs$general_hour, _order$reporting_data, _configs$general_hour2, _progressBarObjt, _progressBarObjt2, _theme$defaultLanguag2, _order$business6, _order$business7, _order$business8, _order$business9, _order$business10, _order$place, _order$place2, _progressBarObjt3, _progressBarObjt4, _order$business12, _order$customer3, _order$customer4, _order$customer5, _order$customer6, _order$customer7, _order$customer8, _order$customer9, _order$customer10, _theme$defaultLanguag3, _order$driver5, _order$driver6, _order$driver7, _order$driver8, _order$driver9, _order$driver10, _order$driver11, _order$driver12, _order$driver13, _order$driver14, _configs$google_maps_2, _order$products$, _order$products$2, _theme$defaultLanguag4, _theme$defaultLanguag5, _theme$defaultLanguag6, _openTaxModal$data, _openTaxModal$data2, _openTaxModal$data3, _openTaxModal$data4, _openTaxModal$data$fi, _openTaxModal$data5, _openTaxModal$data6;
|
|
60
|
+
var _configs$google_maps_, _configs$powered_by_o, _theme$confirmation, _theme$confirmation2, _theme$confirmation3, _theme$confirmation4, _theme$confirmation5, _theme$confirmation6, _theme$confirmation7, _theme$confirmation8, _theme$confirmation9, _theme$confirmation10, _theme$confirmation11, _theme$confirmation12, _theme$confirmation13, _theme$confirmation14, _theme$confirmation15, _theme$confirmation16, _theme$confirmation17, _theme$confirmation18, _ref, _order$driver, _order$driver2, _theme$images, _order$business2, _order$business3, _theme$images2, _order$customer, _order$customer2, _theme$images3, _order$driver3, _order$driver4, _theme$defaultLanguag, _configs$guest_uuid_a, _order$business4, _order$business5, _orderTypes$find, _configs$general_hour, _order$reporting_data, _configs$general_hour2, _progressBarObjt, _progressBarObjt2, _theme$defaultLanguag2, _order$business6, _order$business7, _order$business8, _order$business9, _order$business10, _order$place, _order$place2, _progressBarObjt3, _progressBarObjt4, _order$business12, _order$customer3, _order$customer4, _order$customer5, _order$customer6, _order$customer7, _order$customer8, _order$customer9, _order$customer10, _theme$defaultLanguag3, _order$driver5, _order$driver6, _order$driver7, _order$driver8, _order$driver9, _order$driver10, _order$driver11, _order$driver12, _order$driver13, _order$driver14, _configs$google_maps_2, _order$products$, _order$products$2, _theme$defaultLanguag4, _theme$defaultLanguag5, _theme$defaultLanguag6, _openTaxModal$data, _openTaxModal$data2, _openTaxModal$data3, _openTaxModal$data4, _openTaxModal$data$fi, _openTaxModal$data5, _openTaxModal$data6;
|
|
61
61
|
var userCustomerId = props.userCustomerId,
|
|
62
62
|
handleChangeOrderStatus = props.handleChangeOrderStatus,
|
|
63
63
|
handleBusinessRedirect = props.handleBusinessRedirect,
|
|
@@ -242,8 +242,8 @@ var OrderDetailsUI = function OrderDetailsUI(props) {
|
|
|
242
242
|
}
|
|
243
243
|
});
|
|
244
244
|
};
|
|
245
|
-
var businessLogoUrlValidation =
|
|
246
|
-
|
|
245
|
+
var businessLogoUrlValidation = function businessLogoUrlValidation() {
|
|
246
|
+
return (_ref = _ref || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
247
247
|
var _order$business;
|
|
248
248
|
var isValidImage;
|
|
249
249
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
@@ -259,11 +259,8 @@ var OrderDetailsUI = function OrderDetailsUI(props) {
|
|
|
259
259
|
return _context.stop();
|
|
260
260
|
}
|
|
261
261
|
}, _callee);
|
|
262
|
-
}));
|
|
263
|
-
|
|
264
|
-
return _ref.apply(this, arguments);
|
|
265
|
-
};
|
|
266
|
-
}();
|
|
262
|
+
}))).apply(this, arguments);
|
|
263
|
+
};
|
|
267
264
|
var locations = [_objectSpread(_objectSpread({}, order === null || order === void 0 || (_order$driver = order.driver) === null || _order$driver === void 0 ? void 0 : _order$driver.location), {}, {
|
|
268
265
|
icon: (order === null || order === void 0 || (_order$driver2 = order.driver) === null || _order$driver2 === void 0 ? void 0 : _order$driver2.photo) || ((_theme$images = theme.images) === null || _theme$images === void 0 || (_theme$images = _theme$images.general) === null || _theme$images === void 0 ? void 0 : _theme$images.driverPng)
|
|
269
266
|
}), _objectSpread(_objectSpread({}, order === null || order === void 0 || (_order$business2 = order.business) === null || _order$business2 === void 0 ? void 0 : _order$business2.location), {}, {
|
|
@@ -358,11 +355,12 @@ var OrderDetailsUI = function OrderDetailsUI(props) {
|
|
|
358
355
|
var handleClickReorder = function handleClickReorder(order) {
|
|
359
356
|
var _carts;
|
|
360
357
|
if (carts["businessId:".concat(order === null || order === void 0 ? void 0 : order.business_id)] && ((_carts = carts["businessId:".concat(order === null || order === void 0 ? void 0 : order.business_id)]) === null || _carts === void 0 || (_carts = _carts.products) === null || _carts === void 0 ? void 0 : _carts.length) > 0) {
|
|
358
|
+
var _handleOnAccept;
|
|
361
359
|
setConfirm({
|
|
362
360
|
open: true,
|
|
363
361
|
content: t('QUESTION_DELETE_PRODUCTS_FROM_CART', 'Are you sure that you want to delete all products from cart?'),
|
|
364
|
-
handleOnAccept: function () {
|
|
365
|
-
|
|
362
|
+
handleOnAccept: function handleOnAccept() {
|
|
363
|
+
return (_handleOnAccept = _handleOnAccept || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
366
364
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
367
365
|
while (1) switch (_context2.prev = _context2.next) {
|
|
368
366
|
case 0:
|
|
@@ -375,12 +373,8 @@ var OrderDetailsUI = function OrderDetailsUI(props) {
|
|
|
375
373
|
return _context2.stop();
|
|
376
374
|
}
|
|
377
375
|
}, _callee2);
|
|
378
|
-
}));
|
|
379
|
-
|
|
380
|
-
return _handleOnAccept.apply(this, arguments);
|
|
381
|
-
}
|
|
382
|
-
return handleOnAccept;
|
|
383
|
-
}()
|
|
376
|
+
}))).apply(this, arguments);
|
|
377
|
+
}
|
|
384
378
|
});
|
|
385
379
|
} else {
|
|
386
380
|
handleReorder(order.id);
|
|
@@ -37,7 +37,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
37
37
|
var _EMAIL = 'email';
|
|
38
38
|
var _SMS = 'sms';
|
|
39
39
|
var OrderDetailsUI = function OrderDetailsUI(props) {
|
|
40
|
-
var _theme$confirmation, _theme$confirmation2, _theme$confirmation3, _order$driver, _order$driver2, _theme$images, _order$business, _order$business2, _theme$images2, _order$customer, _order$customer2, _theme$images3, _theme$defaultLanguag26, _orderTypes$find, _getOrderStatus, _getOrderStatus2, _order$products, _formMethods$errors, _formMethods$errors2, _theme$defaultLanguag27, _theme$defaultLanguag28, _theme$defaultLanguag29, _theme$defaultLanguag30;
|
|
40
|
+
var _theme$confirmation, _theme$confirmation2, _theme$confirmation3, _order$driver, _order$driver2, _theme$images, _order$business, _order$business2, _theme$images2, _order$customer, _order$customer2, _theme$images3, _ref, _theme$defaultLanguag26, _orderTypes$find, _getOrderStatus, _getOrderStatus2, _order$products, _formMethods$errors, _formMethods$errors2, _theme$defaultLanguag27, _theme$defaultLanguag28, _theme$defaultLanguag29, _theme$defaultLanguag30;
|
|
41
41
|
var handleOrderRedirect = props.handleOrderRedirect,
|
|
42
42
|
driverLocation = props.driverLocation,
|
|
43
43
|
orderTypes = props.orderTypes;
|
|
@@ -237,8 +237,8 @@ var OrderDetailsUI = function OrderDetailsUI(props) {
|
|
|
237
237
|
setEmailReceipt(e.target.value.toLowerCase().replace(/[&,()%";:ç?<>{}\\[\]\s]/g, ''));
|
|
238
238
|
formMethods.setValue('email', e.target.value.toLowerCase().replace(/[&,()%";:ç?<>{}\\[\]\s]/g, ''));
|
|
239
239
|
};
|
|
240
|
-
var onSubmit =
|
|
241
|
-
|
|
240
|
+
var onSubmit = function onSubmit(_x) {
|
|
241
|
+
return (_ref = _ref || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(values) {
|
|
242
242
|
var body, response, _yield$response$json, _error, result;
|
|
243
243
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
244
244
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -297,11 +297,8 @@ var OrderDetailsUI = function OrderDetailsUI(props) {
|
|
|
297
297
|
return _context.stop();
|
|
298
298
|
}
|
|
299
299
|
}, _callee, null, [[7, 20]]);
|
|
300
|
-
}));
|
|
301
|
-
|
|
302
|
-
return _ref.apply(this, arguments);
|
|
303
|
-
};
|
|
304
|
-
}();
|
|
300
|
+
}))).apply(this, arguments);
|
|
301
|
+
};
|
|
305
302
|
var OrderHeaderInfoSection = function OrderHeaderInfoSection() {
|
|
306
303
|
var _theme$defaultLanguag25;
|
|
307
304
|
return /*#__PURE__*/_react.default.createElement(_styles.HeaderInfo, null, (order === null || order === void 0 ? void 0 : order.on_behalf_of) && /*#__PURE__*/_react.default.createElement("p", {
|