ordering-ui-external 10.9.6 → 10.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_bundles/{7.ordering-ui.a3fd703d3312a3b71fa1.js → 7.ordering-ui.5066da7ae1ecd7adcd8c.js} +1 -1
- package/_bundles/ordering-ui.5066da7ae1ecd7adcd8c.js +2 -0
- package/_modules/components/AddressForm/index.js +8 -5
- package/_modules/components/BusinessProductsListing/index.js +8 -5
- package/_modules/components/Checkout/index.js +8 -5
- package/_modules/components/Footer/index.js +7 -5
- package/_modules/components/HelpStaticPage/index.js +7 -5
- package/_modules/components/LoginForm/index.js +8 -5
- package/_modules/components/OrdersOption/index.js +8 -5
- package/_modules/components/PagesList/index.js +7 -5
- package/_modules/components/StripeMethodForm/index.js +8 -5
- package/_modules/hooks/useIntersectionObserver.js +7 -5
- package/_modules/index.js +6 -0
- package/_modules/themes/callcenterOriginal/src/components/AddressForm/index.js +8 -5
- package/_modules/themes/callcenterOriginal/src/components/AddressList/styles.js +4 -4
- package/_modules/themes/callcenterOriginal/src/components/Checkout/index.js +8 -5
- package/_modules/themes/callcenterOriginal/src/components/Footer/index.js +7 -5
- package/_modules/themes/callcenterOriginal/src/components/Header/styles.js +3 -3
- package/_modules/themes/callcenterOriginal/src/components/HelpStaticPage/index.js +7 -5
- package/_modules/themes/callcenterOriginal/src/components/LoginForm/index.js +8 -5
- package/_modules/themes/callcenterOriginal/src/components/Orders/AddressForm/index.js +8 -5
- package/_modules/themes/callcenterOriginal/src/components/Orders/CreateCustomOrder/Checkout/index.js +8 -5
- package/_modules/themes/callcenterOriginal/src/components/Orders/CreateCustomOrder/StripeMethodForm/index.js +8 -5
- package/_modules/themes/callcenterOriginal/src/components/OrdersOption/index.js +8 -5
- package/_modules/themes/callcenterOriginal/src/components/PhoneAutocomplete/styles.js +4 -4
- package/_modules/themes/callcenterOriginal/src/components/Shared/ImageCrop/index.js +7 -5
- package/_modules/themes/eight/src/components/AddressForm/index.js +8 -5
- package/_modules/themes/eight/src/components/Checkout/index.js +8 -5
- package/_modules/themes/eight/src/components/Footer/index.js +7 -5
- package/_modules/themes/eight/src/components/LoginForm/index.js +8 -5
- package/_modules/themes/five/src/components/AddressForm/index.js +8 -5
- package/_modules/themes/five/src/components/AddressList/index.js +8 -5
- package/_modules/themes/five/src/components/BusinessProductsCategories/layouts/groceries/styles.js +2 -2
- package/_modules/themes/five/src/components/BusinessProductsListing/index.js +15 -9
- package/_modules/themes/five/src/components/Checkout/index.js +8 -5
- package/_modules/themes/five/src/components/Footer/index.js +8 -5
- package/_modules/themes/five/src/components/HelpStaticPage/index.js +7 -5
- package/_modules/themes/five/src/components/LoginForm/index.js +8 -5
- package/_modules/themes/five/src/components/LogoutPopup/index.js +15 -9
- package/_modules/themes/five/src/components/NotNetworkConnectivity/index.js +8 -5
- package/_modules/themes/five/src/components/OrderDetails/index.js +16 -10
- package/_modules/themes/five/src/components/OrderDetails/layouts/Kiosk/index.js +8 -5
- package/_modules/themes/five/src/components/ProductForm/index.js +3 -2
- package/_modules/themes/five/src/components/ProductItemAccordion/index.js +3 -2
- package/_modules/themes/five/src/components/SignUpForm/index.js +8 -5
- package/_modules/themes/five/src/components/SingleOrderCard/index.js +8 -5
- package/_modules/themes/five/src/components/SingleProductCard/layouts/original/index.js +4 -3
- package/_modules/themes/five/src/components/UpsellingPage/index.js +9 -5
- package/_modules/themes/five/src/components/UserFormDetails/index.js +8 -7
- package/_modules/themes/four/src/components/AddressForm/index.js +8 -5
- package/_modules/themes/four/src/components/BusinessProductsListing/index.js +8 -5
- package/_modules/themes/four/src/components/Checkout/index.js +8 -5
- package/_modules/themes/four/src/components/Footer/index.js +7 -5
- package/_modules/themes/four/src/components/HelpStaticPage/index.js +7 -5
- package/_modules/themes/four/src/components/LoginForm/index.js +8 -5
- package/_modules/themes/four/src/components/OrdersOption/index.js +8 -5
- package/_modules/themes/franchise/src/components/AddressForm/index.js +8 -5
- package/_modules/themes/franchise/src/components/Checkout/index.js +8 -5
- package/_modules/themes/franchise/src/components/Footer/index.js +7 -5
- package/_modules/themes/franchise/src/components/HelpStaticPage/index.js +7 -5
- package/_modules/themes/franchise/src/components/LoginForm/index.js +8 -5
- package/_modules/themes/franchise/src/components/OrdersOption/index.js +8 -5
- package/_modules/themes/orderAndPay/src/components/Checkout/index.js +31 -20
- package/_modules/themes/orderAndPay/src/components/Footer/index.js +7 -5
- package/_modules/themes/orderAndPay/src/components/LoginForm/index.js +8 -5
- package/_modules/themes/orderAndPay/src/components/OrderTypeSelectorContent/index.js +15 -9
- package/_modules/themes/orderAndPay/src/components/OrdersOption/index.js +8 -5
- package/_modules/themes/pwa/src/components/AddressForm/index.js +8 -5
- package/_modules/themes/pwa/src/components/Checkout/index.js +8 -5
- package/_modules/themes/pwa/src/components/Footer/index.js +7 -5
- package/_modules/themes/pwa/src/components/HelpStaticPage/index.js +7 -5
- package/_modules/themes/pwa/src/components/LoginForm/index.js +8 -5
- package/_modules/themes/pwa/src/components/OrdersOption/index.js +8 -5
- package/_modules/themes/seven/src/components/AddressForm/index.js +8 -5
- package/_modules/themes/seven/src/components/Checkout/index.js +8 -5
- package/_modules/themes/seven/src/components/Footer/index.js +7 -5
- package/_modules/themes/seven/src/components/LoginForm/index.js +8 -5
- package/_modules/themes/seven/src/components/OrdersOption/index.js +8 -5
- package/_modules/themes/seven/src/components/ProductForm/productForm.js +15 -9
- package/_modules/themes/six/src/components/AddressForm/index.js +8 -5
- package/_modules/themes/six/src/components/Checkout/index.js +8 -5
- package/_modules/themes/six/src/components/Footer/index.js +7 -5
- package/_modules/themes/six/src/components/Header/index.js +1 -0
- package/_modules/themes/six/src/components/LoginForm/index.js +8 -5
- package/_modules/themes/six/src/components/SidebarMenu/index.js +96 -11
- package/_modules/themes/three/src/components/AddressForm/index.js +8 -5
- package/_modules/themes/three/src/components/Checkout/index.js +8 -5
- package/_modules/themes/three/src/components/Footer/index.js +7 -5
- package/_modules/themes/three/src/components/HelpStaticPage/index.js +7 -5
- package/_modules/themes/three/src/components/LoginForm/index.js +8 -5
- package/_modules/themes/three/src/components/OrdersOption/index.js +8 -5
- package/_modules/themes/two/src/components/Checkout/index.js +8 -5
- package/_modules/themes/two/src/components/HelpStaticPage/index.js +7 -5
- package/_modules/themes/two/src/components/LoginForm/index.js +8 -5
- package/_modules/themes/two/src/components/OrdersOption/index.js +8 -5
- package/_modules/themes/wow/src/components/AddressForm/index.js +8 -5
- package/_modules/themes/wow/src/components/Checkout/index.js +8 -5
- package/_modules/themes/wow/src/components/LoginForm/index.js +8 -5
- package/_modules/themes/wow/src/components/OrdersOption/index.js +8 -5
- package/package.json +2 -2
- package/src/index.js +4 -2
- package/src/themes/callcenterOriginal/src/components/AddressList/styles.js +4 -4
- package/src/themes/callcenterOriginal/src/components/Header/styles.js +5 -5
- package/src/themes/callcenterOriginal/src/components/PhoneAutocomplete/styles.js +4 -4
- package/src/themes/five/src/components/BusinessProductsCategories/layouts/groceries/styles.js +5 -5
- package/src/themes/five/src/components/ProductForm/index.js +29 -26
- package/src/themes/five/src/components/ProductItemAccordion/index.js +2 -1
- package/src/themes/five/src/components/SingleProductCard/layouts/original/index.js +2 -1
- package/src/themes/five/src/components/UpsellingPage/index.js +12 -4
- package/src/themes/five/src/components/UserFormDetails/index.js +6 -6
- package/src/themes/six/src/components/Header/index.js +1 -1
- package/src/themes/six/src/components/SidebarMenu/index.js +120 -5
- package/template/app.js +31 -26
- package/_bundles/ordering-ui.a3fd703d3312a3b71fa1.js +0 -2
- /package/_bundles/{0.ordering-ui.a3fd703d3312a3b71fa1.js → 0.ordering-ui.5066da7ae1ecd7adcd8c.js} +0 -0
- /package/_bundles/{1.ordering-ui.a3fd703d3312a3b71fa1.js → 1.ordering-ui.5066da7ae1ecd7adcd8c.js} +0 -0
- /package/_bundles/{2.ordering-ui.a3fd703d3312a3b71fa1.js → 2.ordering-ui.5066da7ae1ecd7adcd8c.js} +0 -0
- /package/_bundles/{4.ordering-ui.a3fd703d3312a3b71fa1.js → 4.ordering-ui.5066da7ae1ecd7adcd8c.js} +0 -0
- /package/_bundles/{5.ordering-ui.a3fd703d3312a3b71fa1.js → 5.ordering-ui.5066da7ae1ecd7adcd8c.js} +0 -0
- /package/_bundles/{6.ordering-ui.a3fd703d3312a3b71fa1.js → 6.ordering-ui.5066da7ae1ecd7adcd8c.js} +0 -0
- /package/_bundles/{7.ordering-ui.a3fd703d3312a3b71fa1.js.LICENSE.txt → 7.ordering-ui.5066da7ae1ecd7adcd8c.js.LICENSE.txt} +0 -0
- /package/_bundles/{8.ordering-ui.a3fd703d3312a3b71fa1.js → 8.ordering-ui.5066da7ae1ecd7adcd8c.js} +0 -0
- /package/_bundles/{9.ordering-ui.a3fd703d3312a3b71fa1.js → 9.ordering-ui.5066da7ae1ecd7adcd8c.js} +0 -0
- /package/_bundles/{ordering-ui.a3fd703d3312a3b71fa1.js.LICENSE.txt → ordering-ui.5066da7ae1ecd7adcd8c.js.LICENSE.txt} +0 -0
|
@@ -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,
|
|
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;
|
|
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 = function
|
|
159
|
-
|
|
158
|
+
var onSubmit = /*#__PURE__*/function () {
|
|
159
|
+
var _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,8 +214,11 @@ var LoginFormUI = function LoginFormUI(props) {
|
|
|
214
214
|
return _context.stop();
|
|
215
215
|
}
|
|
216
216
|
}, _callee);
|
|
217
|
-
}))
|
|
218
|
-
|
|
217
|
+
}));
|
|
218
|
+
return function onSubmit() {
|
|
219
|
+
return _ref.apply(this, arguments);
|
|
220
|
+
};
|
|
221
|
+
}();
|
|
219
222
|
var handleSuccessFacebook = function handleSuccessFacebook(user) {
|
|
220
223
|
var _user$session;
|
|
221
224
|
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
|
|
33
|
+
var _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 = function
|
|
79
|
-
|
|
78
|
+
var fetchPassword = /*#__PURE__*/function () {
|
|
79
|
+
var _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,10 +124,13 @@ var LogoutUI = function LogoutUI(props) {
|
|
|
124
124
|
return _context.stop();
|
|
125
125
|
}
|
|
126
126
|
}, _callee, null, [[0, 14]]);
|
|
127
|
-
}))
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
127
|
+
}));
|
|
128
|
+
return function fetchPassword(_x) {
|
|
129
|
+
return _ref.apply(this, arguments);
|
|
130
|
+
};
|
|
131
|
+
}();
|
|
132
|
+
var onSubmit = /*#__PURE__*/function () {
|
|
133
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(values) {
|
|
131
134
|
var result;
|
|
132
135
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
133
136
|
while (1) switch (_context2.prev = _context2.next) {
|
|
@@ -152,8 +155,11 @@ var LogoutUI = function LogoutUI(props) {
|
|
|
152
155
|
return _context2.stop();
|
|
153
156
|
}
|
|
154
157
|
}, _callee2, null, [[0, 7]]);
|
|
155
|
-
}))
|
|
156
|
-
|
|
158
|
+
}));
|
|
159
|
+
return function onSubmit(_x2) {
|
|
160
|
+
return _ref2.apply(this, arguments);
|
|
161
|
+
};
|
|
162
|
+
}();
|
|
157
163
|
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, {
|
|
158
164
|
type: !passwordSee ? 'password' : 'text',
|
|
159
165
|
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,
|
|
26
|
+
var _theme$images, _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 = function
|
|
38
|
-
|
|
37
|
+
var getBase64ImageFromUrl = /*#__PURE__*/function () {
|
|
38
|
+
var _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,8 +63,11 @@ var NotNetworkConnectivity = function NotNetworkConnectivity(props) {
|
|
|
63
63
|
return _context.stop();
|
|
64
64
|
}
|
|
65
65
|
}, _callee);
|
|
66
|
-
}))
|
|
67
|
-
|
|
66
|
+
}));
|
|
67
|
+
return function getBase64ImageFromUrl(_x) {
|
|
68
|
+
return _ref.apply(this, arguments);
|
|
69
|
+
};
|
|
70
|
+
}();
|
|
68
71
|
(0, _react.useEffect)(function () {
|
|
69
72
|
getBase64ImageFromUrl(errorImage).then(function (base64) {
|
|
70
73
|
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,
|
|
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;
|
|
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 = function
|
|
246
|
-
|
|
245
|
+
var businessLogoUrlValidation = /*#__PURE__*/function () {
|
|
246
|
+
var _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,8 +259,11 @@ var OrderDetailsUI = function OrderDetailsUI(props) {
|
|
|
259
259
|
return _context.stop();
|
|
260
260
|
}
|
|
261
261
|
}, _callee);
|
|
262
|
-
}))
|
|
263
|
-
|
|
262
|
+
}));
|
|
263
|
+
return function businessLogoUrlValidation() {
|
|
264
|
+
return _ref.apply(this, arguments);
|
|
265
|
+
};
|
|
266
|
+
}();
|
|
264
267
|
var locations = [_objectSpread(_objectSpread({}, order === null || order === void 0 || (_order$driver = order.driver) === null || _order$driver === void 0 ? void 0 : _order$driver.location), {}, {
|
|
265
268
|
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)
|
|
266
269
|
}), _objectSpread(_objectSpread({}, order === null || order === void 0 || (_order$business2 = order.business) === null || _order$business2 === void 0 ? void 0 : _order$business2.location), {}, {
|
|
@@ -355,12 +358,11 @@ var OrderDetailsUI = function OrderDetailsUI(props) {
|
|
|
355
358
|
var handleClickReorder = function handleClickReorder(order) {
|
|
356
359
|
var _carts;
|
|
357
360
|
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;
|
|
359
361
|
setConfirm({
|
|
360
362
|
open: true,
|
|
361
363
|
content: t('QUESTION_DELETE_PRODUCTS_FROM_CART', 'Are you sure that you want to delete all products from cart?'),
|
|
362
|
-
handleOnAccept: function
|
|
363
|
-
|
|
364
|
+
handleOnAccept: function () {
|
|
365
|
+
var _handleOnAccept = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
364
366
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
365
367
|
while (1) switch (_context2.prev = _context2.next) {
|
|
366
368
|
case 0:
|
|
@@ -373,8 +375,12 @@ var OrderDetailsUI = function OrderDetailsUI(props) {
|
|
|
373
375
|
return _context2.stop();
|
|
374
376
|
}
|
|
375
377
|
}, _callee2);
|
|
376
|
-
}))
|
|
377
|
-
|
|
378
|
+
}));
|
|
379
|
+
function handleOnAccept() {
|
|
380
|
+
return _handleOnAccept.apply(this, arguments);
|
|
381
|
+
}
|
|
382
|
+
return handleOnAccept;
|
|
383
|
+
}()
|
|
378
384
|
});
|
|
379
385
|
} else {
|
|
380
386
|
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,
|
|
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;
|
|
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 = function
|
|
241
|
-
|
|
240
|
+
var onSubmit = /*#__PURE__*/function () {
|
|
241
|
+
var _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,8 +297,11 @@ var OrderDetailsUI = function OrderDetailsUI(props) {
|
|
|
297
297
|
return _context.stop();
|
|
298
298
|
}
|
|
299
299
|
}, _callee, null, [[7, 20]]);
|
|
300
|
-
}))
|
|
301
|
-
|
|
300
|
+
}));
|
|
301
|
+
return function onSubmit(_x) {
|
|
302
|
+
return _ref.apply(this, arguments);
|
|
303
|
+
};
|
|
304
|
+
}();
|
|
302
305
|
var OrderHeaderInfoSection = function OrderHeaderInfoSection() {
|
|
303
306
|
var _theme$defaultLanguag25;
|
|
304
307
|
return /*#__PURE__*/_react.default.createElement(_styles.HeaderInfo, null, (order === null || order === void 0 ? void 0 : order.on_behalf_of) && /*#__PURE__*/_react.default.createElement("p", {
|
|
@@ -55,7 +55,7 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
55
55
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
56
56
|
_swiper.default.use([_swiper.Navigation, _swiper.Thumbs]);
|
|
57
57
|
var ProductOptionsUI = function ProductOptionsUI(props) {
|
|
58
|
-
var _configs$unaddressed_, _configs$guest_checko, _orderState$options, _configs$allowed_orde, _orderState$options2, _theme$business_view, _theme$defaultLanguag, _product$tags, _product$ingredients2, _product$extras, _product$ingredients3, _product$ingredients4, _product$ingredients5, _product$extras2, _theme$defaultLanguag2, _theme$defaultLanguag3, _props$afterMidElemen, _props$afterMidCompon, _orderState$options3, _orderState$options4, _orderState$options5, _orderState$options6, _theme$defaultLanguag4, _theme$defaultLanguag5, _theme$defaultLanguag6, _orderState$options7, _orderState$options8, _theme$defaultLanguag7, _orderState$options9, _theme$defaultLanguag8, _theme$defaultLanguag9, _theme$defaultLanguag10, _theme$defaultLanguag11, _theme$defaultLanguag12, _theme$defaultLanguag13, _error$;
|
|
58
|
+
var _configs$unaddressed_, _configs$guest_checko, _orderState$options, _configs$allowed_orde, _orderState$options2, _theme$business_view, _theme$business_view2, _theme$defaultLanguag, _product$tags, _product$ingredients2, _product$extras, _product$ingredients3, _product$ingredients4, _product$ingredients5, _product$extras2, _theme$defaultLanguag2, _theme$defaultLanguag3, _props$afterMidElemen, _props$afterMidCompon, _orderState$options3, _orderState$options4, _orderState$options5, _orderState$options6, _theme$defaultLanguag4, _theme$defaultLanguag5, _theme$defaultLanguag6, _orderState$options7, _orderState$options8, _theme$defaultLanguag7, _orderState$options9, _theme$defaultLanguag8, _theme$defaultLanguag9, _theme$defaultLanguag10, _theme$defaultLanguag11, _theme$defaultLanguag12, _theme$defaultLanguag13, _error$;
|
|
59
59
|
var businessSlug = props.businessSlug,
|
|
60
60
|
editMode = props.editMode,
|
|
61
61
|
isSoldOut = props.isSoldOut,
|
|
@@ -168,6 +168,7 @@ var ProductOptionsUI = function ProductOptionsUI(props) {
|
|
|
168
168
|
var guestCheckoutEnabled = (configs === null || configs === void 0 || (_configs$guest_checko = configs.guest_checkout_enabled) === null || _configs$guest_checko === void 0 ? void 0 : _configs$guest_checko.value) === '1';
|
|
169
169
|
var orderTypeEnabled = !_utils.orderTypeList[(orderState === null || orderState === void 0 || (_orderState$options = orderState.options) === null || _orderState$options === void 0 ? void 0 : _orderState$options.type) - 1] || (configs === null || configs === void 0 || (_configs$allowed_orde = configs.allowed_order_types_guest_checkout) === null || _configs$allowed_orde === void 0 || (_configs$allowed_orde = _configs$allowed_orde.value) === null || _configs$allowed_orde === void 0 ? void 0 : _configs$allowed_orde.includes(_utils.orderTypeList[(orderState === null || orderState === void 0 || (_orderState$options2 = orderState.options) === null || _orderState$options2 === void 0 ? void 0 : _orderState$options2.type) - 1]));
|
|
170
170
|
var hideProductDescription = 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.product) === 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.description) === null || _theme$business_view === void 0 ? void 0 : _theme$business_view.hidden;
|
|
171
|
+
var hideProductDummyLogo = theme === null || theme === void 0 || (_theme$business_view2 = theme.business_view) === null || _theme$business_view2 === void 0 || (_theme$business_view2 = _theme$business_view2.components) === null || _theme$business_view2 === void 0 || (_theme$business_view2 = _theme$business_view2.products) === null || _theme$business_view2 === void 0 || (_theme$business_view2 = _theme$business_view2.components) === null || _theme$business_view2 === void 0 || (_theme$business_view2 = _theme$business_view2.product) === null || _theme$business_view2 === void 0 || (_theme$business_view2 = _theme$business_view2.components) === null || _theme$business_view2 === void 0 || (_theme$business_view2 = _theme$business_view2.dummy) === null || _theme$business_view2 === void 0 ? void 0 : _theme$business_view2.hidden;
|
|
171
172
|
var closeModal = function closeModal() {
|
|
172
173
|
setModalIsOpen(false);
|
|
173
174
|
setModalPageToShow('login');
|
|
@@ -432,7 +433,7 @@ var ProductOptionsUI = function ProductOptionsUI(props) {
|
|
|
432
433
|
}
|
|
433
434
|
})), product && /*#__PURE__*/_react.default.createElement(_styles.WrapperImage, null, /*#__PURE__*/_react.default.createElement(_styles.SwiperWrapper, {
|
|
434
435
|
isSoldOut: isSoldOut
|
|
435
|
-
}, /*#__PURE__*/_react.default.createElement(_react2.Swiper, {
|
|
436
|
+
}, ((product === null || product === void 0 ? void 0 : product.images) || !hideProductDummyLogo) && /*#__PURE__*/_react.default.createElement(_react2.Swiper, {
|
|
436
437
|
spaceBetween: 10,
|
|
437
438
|
navigation: true,
|
|
438
439
|
watchOverflow: true,
|
|
@@ -32,7 +32,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
32
32
|
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; } }
|
|
33
33
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
34
34
|
var ProductItemAccordion = function ProductItemAccordion(props) {
|
|
35
|
-
var _theme$viewString, _productInfo, _productInfo2, _props$beforeElements, _props$beforeComponen, _product$valid, _theme$images, _theme$images2, _product$calendar_eve, _configs$format_time, _product$calendar_eve2, _configs$format_time2, _props$afterComponent, _props$afterElements;
|
|
35
|
+
var _theme$viewString, _theme$business_view, _productInfo, _productInfo2, _props$beforeElements, _props$beforeComponen, _product$valid, _theme$images, _theme$images2, _product$calendar_eve, _configs$format_time, _product$calendar_eve2, _configs$format_time2, _props$afterComponent, _props$afterElements;
|
|
36
36
|
var isDisabledEdit = props.isDisabledEdit,
|
|
37
37
|
isCartPending = props.isCartPending,
|
|
38
38
|
isCartProduct = props.isCartProduct,
|
|
@@ -79,6 +79,7 @@ var ProductItemAccordion = function ProductItemAccordion(props) {
|
|
|
79
79
|
var productActionsDelete = (0, _react.useRef)(null);
|
|
80
80
|
var viewString = isConfirmationPage ? 'confirmation' : isStore ? 'business_view' : 'header';
|
|
81
81
|
var showProductImage = !(theme !== null && theme !== void 0 && (_theme$viewString = theme[viewString]) !== null && _theme$viewString !== void 0 && (_theme$viewString = _theme$viewString.components) !== null && _theme$viewString !== void 0 && (_theme$viewString = _theme$viewString.cart) !== null && _theme$viewString !== void 0 && (_theme$viewString = _theme$viewString.components) !== null && _theme$viewString !== void 0 && (_theme$viewString = _theme$viewString.products) !== null && _theme$viewString !== void 0 && (_theme$viewString = _theme$viewString.components) !== null && _theme$viewString !== void 0 && (_theme$viewString = _theme$viewString.image) !== null && _theme$viewString !== void 0 && _theme$viewString.hidden);
|
|
82
|
+
var hideProductDummyLogo = 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.product) === 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.dummy) === null || _theme$business_view === void 0 ? void 0 : _theme$business_view.hidden;
|
|
82
83
|
var productInfo = function productInfo() {
|
|
83
84
|
if (isCartProduct) {
|
|
84
85
|
var _product$ingredients, _product$options;
|
|
@@ -143,7 +144,7 @@ var ProductItemAccordion = function ProductItemAccordion(props) {
|
|
|
143
144
|
}, /*#__PURE__*/_react.default.createElement(_styles.ProductInfo, {
|
|
144
145
|
className: "info",
|
|
145
146
|
isValid: (_product$valid = product === null || product === void 0 ? void 0 : product.valid) !== null && _product$valid !== void 0 ? _product$valid : true
|
|
146
|
-
}, ((product === null || product === void 0 ? void 0 : product.images) || (theme === null || theme === void 0 || (_theme$images = theme.images) === null || _theme$images === void 0 || (_theme$images = _theme$images.dummies) === null || _theme$images === void 0 ? void 0 : _theme$images.product)) && showProductImage && /*#__PURE__*/_react.default.createElement(_styles.WrapperProductImage, null, /*#__PURE__*/_react.default.createElement(_styles.ProductImage, {
|
|
147
|
+
}, ((product === null || product === void 0 ? void 0 : product.images) || !hideProductDummyLogo && (theme === null || theme === void 0 || (_theme$images = theme.images) === null || _theme$images === void 0 || (_theme$images = _theme$images.dummies) === null || _theme$images === void 0 ? void 0 : _theme$images.product)) && showProductImage && /*#__PURE__*/_react.default.createElement(_styles.WrapperProductImage, null, /*#__PURE__*/_react.default.createElement(_styles.ProductImage, {
|
|
147
148
|
bgimage: (product === null || product === void 0 ? void 0 : product.images) || (theme === null || theme === void 0 || (_theme$images2 = theme.images) === null || _theme$images2 === void 0 || (_theme$images2 = _theme$images2.dummies) === null || _theme$images2 === void 0 ? void 0 : _theme$images2.product)
|
|
148
149
|
})), product !== null && product !== void 0 && product.calendar_event ? /*#__PURE__*/_react.default.createElement(_styles.ScheduleInfoWrapper, null, /*#__PURE__*/_react.default.createElement("h3", null, product.name), /*#__PURE__*/_react.default.createElement(_styles.ScheduleInfo, null, /*#__PURE__*/_react.default.createElement("span", null, parseDate(product === null || product === void 0 || (_product$calendar_eve = product.calendar_event) === null || _product$calendar_eve === void 0 ? void 0 : _product$calendar_eve.start, {
|
|
149
150
|
outputFormat: (configs === null || configs === void 0 || (_configs$format_time = configs.format_time) === null || _configs$format_time === void 0 ? void 0 : _configs$format_time.value) === '12' ? 'hh:mm a' : 'HH:mm'
|
|
@@ -51,7 +51,7 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
51
51
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
52
52
|
var notValidationFields = ['coupon', 'driver_tip', 'mobile_phone', 'address', 'address_notes'];
|
|
53
53
|
var SignUpFormUI = function SignUpFormUI(props) {
|
|
54
|
-
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,
|
|
54
|
+
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$fie6, _validationFields$fie7, _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;
|
|
55
55
|
var handleChangeInput = props.handleChangeInput,
|
|
56
56
|
handleButtonSignupClick = props.handleButtonSignupClick,
|
|
57
57
|
handleReCaptcha = props.handleReCaptcha,
|
|
@@ -197,8 +197,8 @@ var SignUpFormUI = function SignUpFormUI(props) {
|
|
|
197
197
|
setSignUpTab(tab);
|
|
198
198
|
formMethods.clearErrors();
|
|
199
199
|
};
|
|
200
|
-
var onSubmit = function
|
|
201
|
-
|
|
200
|
+
var onSubmit = /*#__PURE__*/function () {
|
|
201
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
202
202
|
var _validationFields$fie3, _validationFields$fie4, _configs$verification2;
|
|
203
203
|
var isPhoneNumberValid;
|
|
204
204
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
@@ -241,8 +241,11 @@ var SignUpFormUI = function SignUpFormUI(props) {
|
|
|
241
241
|
return _context.stop();
|
|
242
242
|
}
|
|
243
243
|
}, _callee);
|
|
244
|
-
}))
|
|
245
|
-
|
|
244
|
+
}));
|
|
245
|
+
return function onSubmit() {
|
|
246
|
+
return _ref.apply(this, arguments);
|
|
247
|
+
};
|
|
248
|
+
}();
|
|
246
249
|
var handleChangePhoneNumber = function handleChangePhoneNumber(number, isValid) {
|
|
247
250
|
setUserPhoneNumber(number);
|
|
248
251
|
var phoneNumberParser = null;
|
|
@@ -182,12 +182,11 @@ var SingleOrderCardUI = function SingleOrderCardUI(props) {
|
|
|
182
182
|
var handleClickReorder = function handleClickReorder(order) {
|
|
183
183
|
var _carts;
|
|
184
184
|
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) {
|
|
185
|
-
var _handleOnAccept;
|
|
186
185
|
setConfirm({
|
|
187
186
|
open: true,
|
|
188
187
|
content: t('QUESTION_DELETE_PRODUCTS_FROM_CART', 'Are you sure that you want to delete all products from cart?'),
|
|
189
|
-
handleOnAccept: function
|
|
190
|
-
|
|
188
|
+
handleOnAccept: function () {
|
|
189
|
+
var _handleOnAccept = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
191
190
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
192
191
|
while (1) switch (_context.prev = _context.next) {
|
|
193
192
|
case 0:
|
|
@@ -200,8 +199,12 @@ var SingleOrderCardUI = function SingleOrderCardUI(props) {
|
|
|
200
199
|
return _context.stop();
|
|
201
200
|
}
|
|
202
201
|
}, _callee);
|
|
203
|
-
}))
|
|
204
|
-
|
|
202
|
+
}));
|
|
203
|
+
function handleOnAccept() {
|
|
204
|
+
return _handleOnAccept.apply(this, arguments);
|
|
205
|
+
}
|
|
206
|
+
return handleOnAccept;
|
|
207
|
+
}()
|
|
205
208
|
});
|
|
206
209
|
} else {
|
|
207
210
|
handleReorder(order.id);
|
|
@@ -38,7 +38,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
38
38
|
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; } }
|
|
39
39
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
40
40
|
var SingleProductCardUI = function SingleProductCardUI(props) {
|
|
41
|
-
var _theme$business_view$, _theme$business_view, _theme$business_view2, _theme$viewString, _theme$
|
|
41
|
+
var _theme$business_view$, _theme$business_view, _theme$business_view2, _theme$business_view3, _theme$viewString, _theme$business_view4, _theme$images, _theme$images2, _product$ribbon, _product$ribbon2, _product$ribbon3, _product$ribbon4, _product$ribbon5, _theme$images3, _product$ribbon6, _theme$defaultLanguag, _theme$defaultLanguag2, _theme$defaultLanguag3, _theme$defaultLanguag4;
|
|
42
42
|
var product = props.product,
|
|
43
43
|
isSoldOut = props.isSoldOut,
|
|
44
44
|
isSkeleton = props.isSkeleton,
|
|
@@ -108,7 +108,8 @@ var SingleProductCardUI = function SingleProductCardUI(props) {
|
|
|
108
108
|
var maxCartProductConfig = (stateConfig.configs.max_product_amount ? parseInt(stateConfig.configs.max_product_amount) : 100) - totalBalance;
|
|
109
109
|
var hideAddButton = (_theme$business_view$ = 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.add_to_cart_button) === null || _theme$business_view === void 0 ? void 0 : _theme$business_view.hidden) !== null && _theme$business_view$ !== void 0 ? _theme$business_view$ : true;
|
|
110
110
|
var hideProductDescription = theme === null || theme === void 0 || (_theme$business_view2 = theme.business_view) === null || _theme$business_view2 === void 0 || (_theme$business_view2 = _theme$business_view2.components) === null || _theme$business_view2 === void 0 || (_theme$business_view2 = _theme$business_view2.products) === null || _theme$business_view2 === void 0 || (_theme$business_view2 = _theme$business_view2.components) === null || _theme$business_view2 === void 0 || (_theme$business_view2 = _theme$business_view2.product) === null || _theme$business_view2 === void 0 || (_theme$business_view2 = _theme$business_view2.components) === null || _theme$business_view2 === void 0 || (_theme$business_view2 = _theme$business_view2.description) === null || _theme$business_view2 === void 0 ? void 0 : _theme$business_view2.hidden;
|
|
111
|
-
var
|
|
111
|
+
var hideProductDummyLogo = theme === null || theme === void 0 || (_theme$business_view3 = theme.business_view) === null || _theme$business_view3 === void 0 || (_theme$business_view3 = _theme$business_view3.components) === null || _theme$business_view3 === void 0 || (_theme$business_view3 = _theme$business_view3.products) === null || _theme$business_view3 === void 0 || (_theme$business_view3 = _theme$business_view3.components) === null || _theme$business_view3 === void 0 || (_theme$business_view3 = _theme$business_view3.product) === null || _theme$business_view3 === void 0 || (_theme$business_view3 = _theme$business_view3.components) === null || _theme$business_view3 === void 0 || (_theme$business_view3 = _theme$business_view3.dummy) === null || _theme$business_view3 === void 0 ? void 0 : _theme$business_view3.hidden;
|
|
112
|
+
var hideProductLogo = viewString ? theme === null || theme === void 0 || (_theme$viewString = theme[viewString]) === null || _theme$viewString === void 0 || (_theme$viewString = _theme$viewString.components) === null || _theme$viewString === void 0 || (_theme$viewString = _theme$viewString.cart) === null || _theme$viewString === void 0 || (_theme$viewString = _theme$viewString.components) === null || _theme$viewString === void 0 || (_theme$viewString = _theme$viewString.products) === null || _theme$viewString === void 0 || (_theme$viewString = _theme$viewString.image) === null || _theme$viewString === void 0 ? void 0 : _theme$viewString.hidden : theme === null || theme === void 0 || (_theme$business_view4 = theme.business_view) === null || _theme$business_view4 === void 0 || (_theme$business_view4 = _theme$business_view4.components) === null || _theme$business_view4 === void 0 || (_theme$business_view4 = _theme$business_view4.products) === null || _theme$business_view4 === void 0 || (_theme$business_view4 = _theme$business_view4.components) === null || _theme$business_view4 === void 0 || (_theme$business_view4 = _theme$business_view4.product) === null || _theme$business_view4 === void 0 || (_theme$business_view4 = _theme$business_view4.components) === null || _theme$business_view4 === void 0 || (_theme$business_view4 = _theme$business_view4.image) === null || _theme$business_view4 === void 0 ? void 0 : _theme$business_view4.hidden;
|
|
112
113
|
|
|
113
114
|
// const productsRows = theme?.layouts?.business_view?.components?.products?.components?.layout?.rows
|
|
114
115
|
|
|
@@ -218,7 +219,7 @@ var SingleProductCardUI = function SingleProductCardUI(props) {
|
|
|
218
219
|
}, product === null || product === void 0 || (_product$ribbon5 = product.ribbon) === null || _product$ribbon5 === void 0 ? void 0 : _product$ribbon5.text), /*#__PURE__*/_react.default.createElement(_styles.CardLogo, {
|
|
219
220
|
className: "image",
|
|
220
221
|
soldOut: isSoldOut || maxProductQuantity <= 0,
|
|
221
|
-
bgimage: optimizeImage((product === null || product === void 0 ? void 0 : product.images) || (theme === null || theme === void 0 || (_theme$images3 = theme.images) === null || _theme$images3 === void 0 || (_theme$images3 = _theme$images3.dummies) === null || _theme$images3 === void 0 ? void 0 : _theme$images3.product), 'h_86,c_limit')
|
|
222
|
+
bgimage: optimizeImage((product === null || product === void 0 ? void 0 : product.images) || !hideProductDummyLogo && (theme === null || theme === void 0 || (_theme$images3 = theme.images) === null || _theme$images3 === void 0 || (_theme$images3 = _theme$images3.dummies) === null || _theme$images3 === void 0 ? void 0 : _theme$images3.product), 'h_86,c_limit')
|
|
222
223
|
})) : /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
|
|
223
224
|
height: 75,
|
|
224
225
|
width: 75
|
|
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.UpsellingPage = void 0;
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
9
|
var _orderingComponentsExternal = require("ordering-components-external");
|
|
10
|
+
var _styledComponents = require("styled-components");
|
|
10
11
|
var _styles = require("./styles");
|
|
11
12
|
var _Buttons = require("../../styles/Buttons");
|
|
12
13
|
var _MdClose = _interopRequireDefault(require("@meronex/icons/md/MdClose"));
|
|
@@ -34,7 +35,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
34
35
|
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
36
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
36
37
|
var UpsellingPageUI = function UpsellingPageUI(props) {
|
|
37
|
-
var _upsellingProducts$pr4;
|
|
38
|
+
var _theme$business_view, _upsellingProducts$pr4;
|
|
38
39
|
var upsellingProducts = props.upsellingProducts,
|
|
39
40
|
handleUpsellingPage = props.handleUpsellingPage,
|
|
40
41
|
openUpselling = props.openUpselling,
|
|
@@ -45,6 +46,10 @@ var UpsellingPageUI = function UpsellingPageUI(props) {
|
|
|
45
46
|
var _useLanguage = (0, _orderingComponentsExternal.useLanguage)(),
|
|
46
47
|
_useLanguage2 = _slicedToArray(_useLanguage, 2),
|
|
47
48
|
t = _useLanguage2[1];
|
|
49
|
+
var _useUtils = (0, _orderingComponentsExternal.useUtils)(),
|
|
50
|
+
_useUtils2 = _slicedToArray(_useUtils, 1),
|
|
51
|
+
parsePrice = _useUtils2[0].parsePrice;
|
|
52
|
+
var theme = (0, _styledComponents.useTheme)();
|
|
48
53
|
var _useState = (0, _react.useState)(null),
|
|
49
54
|
_useState2 = _slicedToArray(_useState, 2),
|
|
50
55
|
actualProduct = _useState2[0],
|
|
@@ -53,13 +58,11 @@ var UpsellingPageUI = function UpsellingPageUI(props) {
|
|
|
53
58
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
54
59
|
modalIsOpen = _useState4[0],
|
|
55
60
|
setModalIsOpen = _useState4[1];
|
|
56
|
-
var _useUtils = (0, _orderingComponentsExternal.useUtils)(),
|
|
57
|
-
_useUtils2 = _slicedToArray(_useUtils, 1),
|
|
58
|
-
parsePrice = _useUtils2[0].parsePrice;
|
|
59
61
|
var _useState5 = (0, _react.useState)(true),
|
|
60
62
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
61
63
|
showUpselling = _useState6[0],
|
|
62
64
|
setShowUpSelling = _useState6[1];
|
|
65
|
+
var hideProductDummyLogo = 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.product) === 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.dummy) === null || _theme$business_view === void 0 ? void 0 : _theme$business_view.hidden;
|
|
63
66
|
(0, _react.useEffect)(function () {
|
|
64
67
|
if (!isCustomMode) {
|
|
65
68
|
var _upsellingProducts$pr, _upsellingProducts$pr2;
|
|
@@ -134,6 +137,7 @@ var UpsellingPageUI = function UpsellingPageUI(props) {
|
|
|
134
137
|
scrollId: "upSelling",
|
|
135
138
|
isColumnMode: upsellingProducts.products.length === 1
|
|
136
139
|
}, !upsellingProducts.error && upsellingProducts.products.length > 0 ? upsellingProducts.products.map(function (product, i) {
|
|
140
|
+
var _theme$images;
|
|
137
141
|
return /*#__PURE__*/_react.default.createElement(_styles.HorizontalItem, {
|
|
138
142
|
key: product.id,
|
|
139
143
|
name: product.name
|
|
@@ -144,7 +148,7 @@ var UpsellingPageUI = function UpsellingPageUI(props) {
|
|
|
144
148
|
onClick: function onClick() {
|
|
145
149
|
return handleFormProduct(product);
|
|
146
150
|
}
|
|
147
|
-
}, t('ADD', 'Add'))), /*#__PURE__*/_react.default.createElement(_styles.HorizontalImage, null, /*#__PURE__*/_react.default.createElement("img", {
|
|
151
|
+
}, t('ADD', 'Add'))), ((product === null || product === void 0 ? void 0 : product.images) || !hideProductDummyLogo && (theme === null || theme === void 0 || (_theme$images = theme.images) === null || _theme$images === void 0 || (_theme$images = _theme$images.dummies) === null || _theme$images === void 0 ? void 0 : _theme$images.product)) && /*#__PURE__*/_react.default.createElement(_styles.HorizontalImage, null, /*#__PURE__*/_react.default.createElement("img", {
|
|
148
152
|
src: product.images,
|
|
149
153
|
alt: "product-".concat(i),
|
|
150
154
|
loading: "lazy"
|
|
@@ -43,7 +43,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
43
43
|
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; } }
|
|
44
44
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
45
45
|
var UserFormDetailsUI = function UserFormDetailsUI(props) {
|
|
46
|
-
var _formState$result, _formState$result2, _formState$changes$se, _formState$changes, _user$settings, _formState$result3, _formState$result4, _formState$changes$se2, _formState$changes2, _user$settings2, _formState$result5, _formState$result6, _formState$changes$se3, _formState$changes3, _user$settings3, _theme$profile, _theme$profile2, _theme$profile3, _theme$profile4, _theme$profile5, _validationFields$fie, _validationFields$fie2, _validationFields$fie3, _validationFields$fie4, _configs$verification3, _props$beforeElements, _props$beforeComponen, _props$beforeMidEleme, _props$beforeMidCompo, _validationFields$fie7, _props$afterMidElemen, _props$afterMidCompon, _props$afterComponent, _props$afterElements;
|
|
46
|
+
var _formState$result, _formState$result2, _formState$changes$se, _formState$changes, _user$settings, _formState$result3, _formState$result4, _formState$changes$se2, _formState$changes2, _user$settings2, _formState$result5, _formState$result6, _formState$changes$se3, _formState$changes3, _user$settings3, _theme$profile, _theme$profile2, _theme$profile3, _theme$profile4, _theme$profile5, _validationFields$fie, _validationFields$fie2, _validationFields$fie3, _validationFields$fie4, _configs$verification3, _props$beforeElements, _props$beforeComponen, _props$beforeMidEleme, _props$beforeMidCompo, _validationFields$fie7, _requiredFields$inclu4, _requiredFields$inclu5, _requiredFields$inclu6, _props$afterMidElemen, _props$afterMidCompon, _props$afterComponent, _props$afterElements;
|
|
47
47
|
var isEdit = props.isEdit,
|
|
48
48
|
formState = props.formState,
|
|
49
49
|
onCancel = props.onCancel,
|
|
@@ -334,7 +334,8 @@ var UserFormDetailsUI = function UserFormDetailsUI(props) {
|
|
|
334
334
|
}
|
|
335
335
|
}, [isValidPhoneNumber, userPhoneNumber, configs === null || configs === void 0 || (_configs$verification3 = configs.verification_phone_required) === null || _configs$verification3 === void 0 ? void 0 : _configs$verification3.value, isChanged]);
|
|
336
336
|
(0, _react.useEffect)(function () {
|
|
337
|
-
|
|
337
|
+
var _requiredFields$inclu;
|
|
338
|
+
if (requiredFields && !(requiredFields !== null && requiredFields !== void 0 && (_requiredFields$inclu = requiredFields.includes) !== null && _requiredFields$inclu !== void 0 && _requiredFields$inclu.call(requiredFields, 'cellphone'))) setIsValidPhoneNumber(true);
|
|
338
339
|
}, [requiredFields]);
|
|
339
340
|
var handleEditNotifications = function handleEditNotifications(key, value) {
|
|
340
341
|
setNotificationList(_objectSpread(_objectSpread({}, notificationList), {}, _defineProperty({}, key, value)));
|
|
@@ -364,10 +365,10 @@ var UserFormDetailsUI = function UserFormDetailsUI(props) {
|
|
|
364
365
|
}), (0, _utils.sortInputFields)({
|
|
365
366
|
values: validationFields === null || validationFields === void 0 || (_validationFields$fie7 = validationFields.fields) === null || _validationFields$fie7 === void 0 ? void 0 : _validationFields$fie7.checkout
|
|
366
367
|
}).map(function (field) {
|
|
367
|
-
var _ref3, _formState$changes$fi, _ref4, _formState$changes$fi2;
|
|
368
|
+
var _requiredFields$inclu2, _ref3, _formState$changes$fi, _requiredFields$inclu3, _ref4, _formState$changes$fi2;
|
|
368
369
|
return (showField && showField(field.code) && showFieldWithTheme(field.code) || (user === null || user === void 0 ? void 0 : user.guest_id)) && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
|
|
369
370
|
key: field.id
|
|
370
|
-
}, field.code === 'email' ? (requiredFields && requiredFields.includes(field.code) || !requiredFields) && /*#__PURE__*/_react.default.createElement(_styles.InputGroup, null, /*#__PURE__*/_react.default.createElement("p", null, t(field.code.toUpperCase(), field === null || field === void 0 ? void 0 : field.name)), /*#__PURE__*/_react.default.createElement(_Inputs.Input, {
|
|
371
|
+
}, field.code === 'email' ? (requiredFields && (requiredFields === null || requiredFields === void 0 || (_requiredFields$inclu2 = requiredFields.includes) === null || _requiredFields$inclu2 === void 0 ? void 0 : _requiredFields$inclu2.call(requiredFields, field.code)) || !requiredFields) && /*#__PURE__*/_react.default.createElement(_styles.InputGroup, null, /*#__PURE__*/_react.default.createElement("p", null, t(field.code.toUpperCase(), field === null || field === void 0 ? void 0 : field.name)), /*#__PURE__*/_react.default.createElement(_Inputs.Input, {
|
|
371
372
|
key: field.id,
|
|
372
373
|
type: field.type,
|
|
373
374
|
name: field.code,
|
|
@@ -381,7 +382,7 @@ var UserFormDetailsUI = function UserFormDetailsUI(props) {
|
|
|
381
382
|
emailInput.current = e;
|
|
382
383
|
},
|
|
383
384
|
autoComplete: "off"
|
|
384
|
-
})) : (requiredFields && requiredFields.includes(field.code) || !requiredFields) && /*#__PURE__*/_react.default.createElement(_styles.InputGroup, null, /*#__PURE__*/_react.default.createElement("p", null, t(field.code.toUpperCase(), field === null || field === void 0 ? void 0 : field.name)), /*#__PURE__*/_react.default.createElement(_Inputs.Input, {
|
|
385
|
+
})) : (requiredFields && (requiredFields === null || requiredFields === void 0 || (_requiredFields$inclu3 = requiredFields.includes) === null || _requiredFields$inclu3 === void 0 ? void 0 : _requiredFields$inclu3.call(requiredFields, field.code)) || !requiredFields) && /*#__PURE__*/_react.default.createElement(_styles.InputGroup, null, /*#__PURE__*/_react.default.createElement("p", null, t(field.code.toUpperCase(), field === null || field === void 0 ? void 0 : field.name)), /*#__PURE__*/_react.default.createElement(_Inputs.Input, {
|
|
385
386
|
key: field.id,
|
|
386
387
|
type: field.type,
|
|
387
388
|
borderBottom: true,
|
|
@@ -396,7 +397,7 @@ var UserFormDetailsUI = function UserFormDetailsUI(props) {
|
|
|
396
397
|
}),
|
|
397
398
|
autoComplete: "off"
|
|
398
399
|
})));
|
|
399
|
-
}), (!(user !== null && user !== void 0 && user.guest_id) && showInputBirthday || (user === null || user === void 0 ? void 0 : user.guest_id) && requiredFields.includes('birthdate')) && /*#__PURE__*/_react.default.createElement(_styles.InputPhoneNumberWrapper, null, /*#__PURE__*/_react.default.createElement("p", null, t('BIRTHDATE', 'Birthdate')), /*#__PURE__*/_react.default.createElement(_Inputs.Input, {
|
|
400
|
+
}), (!(user !== null && user !== void 0 && user.guest_id) && showInputBirthday || (user === null || user === void 0 ? void 0 : user.guest_id) && (requiredFields === null || requiredFields === void 0 || (_requiredFields$inclu4 = requiredFields.includes) === null || _requiredFields$inclu4 === void 0 ? void 0 : _requiredFields$inclu4.call(requiredFields, 'birthdate'))) && /*#__PURE__*/_react.default.createElement(_styles.InputPhoneNumberWrapper, null, /*#__PURE__*/_react.default.createElement("p", null, t('BIRTHDATE', 'Birthdate')), /*#__PURE__*/_react.default.createElement(_Inputs.Input, {
|
|
400
401
|
borderBottom: true,
|
|
401
402
|
className: "form",
|
|
402
403
|
value: birthdate ? (0, _moment.default)(birthdate).format('YYYY/MM/DD') : '',
|
|
@@ -408,7 +409,7 @@ var UserFormDetailsUI = function UserFormDetailsUI(props) {
|
|
|
408
409
|
value: birthdate,
|
|
409
410
|
onChange: _handleChangeDate,
|
|
410
411
|
name: 'birthdate'
|
|
411
|
-
})), (!(user !== null && user !== void 0 && user.guest_id) && !!showInputPhoneNumber || (user === null || user === void 0 ? void 0 : user.guest_id) && requiredFields.includes('cellphone')) && showCustomerCellphone && (requiredFields && requiredFields.includes('cellphone') || !requiredFields) && /*#__PURE__*/_react.default.createElement(_styles.InputPhoneNumberWrapper, null, /*#__PURE__*/_react.default.createElement("p", null, t('PHONE', 'Phone')), /*#__PURE__*/_react.default.createElement(_InputPhoneNumber.InputPhoneNumber, {
|
|
412
|
+
})), (!(user !== null && user !== void 0 && user.guest_id) && !!showInputPhoneNumber || (user === null || user === void 0 ? void 0 : user.guest_id) && (requiredFields === null || requiredFields === void 0 || (_requiredFields$inclu5 = requiredFields.includes) === null || _requiredFields$inclu5 === void 0 ? void 0 : _requiredFields$inclu5.call(requiredFields, 'cellphone'))) && showCustomerCellphone && (requiredFields && (requiredFields === null || requiredFields === void 0 || (_requiredFields$inclu6 = requiredFields.includes) === null || _requiredFields$inclu6 === void 0 ? void 0 : _requiredFields$inclu6.call(requiredFields, 'cellphone')) || !requiredFields) && /*#__PURE__*/_react.default.createElement(_styles.InputPhoneNumberWrapper, null, /*#__PURE__*/_react.default.createElement("p", null, t('PHONE', 'Phone')), /*#__PURE__*/_react.default.createElement(_InputPhoneNumber.InputPhoneNumber, {
|
|
412
413
|
user: user,
|
|
413
414
|
value: userPhoneNumber,
|
|
414
415
|
setValue: handleChangePhoneNumber,
|
|
@@ -55,7 +55,7 @@ var inputNames = [{
|
|
|
55
55
|
code: 'Address notes'
|
|
56
56
|
}];
|
|
57
57
|
var AddressFormUI = function AddressFormUI(props) {
|
|
58
|
-
var _addressState$address, _ref, _formState$changes$ad, _formState$changes, _addressState$address2, _addressState$address3, _addressState$address4, _formState$changes$lo, _formState$changes2, _configState$configs, _configState$configs2, _configState$configs3, _configState$configs4,
|
|
58
|
+
var _addressState$address, _ref, _formState$changes$ad, _formState$changes, _addressState$address2, _addressState$address3, _addressState$address4, _formState$changes$lo, _formState$changes2, _configState$configs, _configState$configs2, _configState$configs3, _configState$configs4, _props$beforeElements, _props$beforeComponen, _props$beforeMidEleme, _props$beforeMidCompo, _props$afterMidElemen, _props$afterMidCompon, _orderState$options6, _theme$defaultLanguag, _props$afterComponent, _props$afterElements;
|
|
59
59
|
var addressesList = props.addressesList,
|
|
60
60
|
googleMapsControls = props.googleMapsControls,
|
|
61
61
|
formState = props.formState,
|
|
@@ -238,8 +238,8 @@ var AddressFormUI = function AddressFormUI(props) {
|
|
|
238
238
|
e.preventDefault();
|
|
239
239
|
}
|
|
240
240
|
};
|
|
241
|
-
var onSubmit = function
|
|
242
|
-
|
|
241
|
+
var onSubmit = /*#__PURE__*/function () {
|
|
242
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
243
243
|
var _formState$changes3, _addressState$address6, _formState$changes4, _formState$changes5, _arrayList$map$some2;
|
|
244
244
|
var _formState$changes6, arrayList, addressToCompare, isAddressAlreadyExist;
|
|
245
245
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
@@ -300,8 +300,11 @@ var AddressFormUI = function AddressFormUI(props) {
|
|
|
300
300
|
return _context.stop();
|
|
301
301
|
}
|
|
302
302
|
}, _callee);
|
|
303
|
-
}))
|
|
304
|
-
|
|
303
|
+
}));
|
|
304
|
+
return function onSubmit() {
|
|
305
|
+
return _ref2.apply(this, arguments);
|
|
306
|
+
};
|
|
307
|
+
}();
|
|
305
308
|
var handleAddressTag = function handleAddressTag(tag) {
|
|
306
309
|
setAddressTag(tag);
|
|
307
310
|
handleChangeInput({
|
|
@@ -38,7 +38,7 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
38
38
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
39
39
|
var PIXELS_TO_SCROLL = 300;
|
|
40
40
|
var BusinessProductsListingUI = function BusinessProductsListingUI(props) {
|
|
41
|
-
var _configs$add_product_, _Object$values$find,
|
|
41
|
+
var _configs$add_product_, _Object$values$find, _props$beforeElements, _props$beforeComponen, _currentCart$products2, _theme$defaultLanguag, _theme$defaultLanguag2, _theme$defaultLanguag3, _error$, _theme$defaultLanguag4, _currentCart$products3, _theme$defaultLanguag5, _theme$defaultLanguag6, _currentCart$products4, _productModal$error$, _theme$defaultLanguag7, _props$afterComponent, _props$afterElements;
|
|
42
42
|
var errors = props.errors,
|
|
43
43
|
isInitialRender = props.isInitialRender,
|
|
44
44
|
businessState = props.businessState,
|
|
@@ -124,8 +124,8 @@ var BusinessProductsListingUI = function BusinessProductsListingUI(props) {
|
|
|
124
124
|
var handler = function handler() {
|
|
125
125
|
setOpenBusinessInformation(true);
|
|
126
126
|
};
|
|
127
|
-
var onProductClick = function
|
|
128
|
-
|
|
127
|
+
var onProductClick = /*#__PURE__*/function () {
|
|
128
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(product) {
|
|
129
129
|
var _currentCart$products, isProductAddedToCart, productQuantity, addCurrentProduct, updateCurrentProduct, cartData;
|
|
130
130
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
131
131
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -180,8 +180,11 @@ var BusinessProductsListingUI = function BusinessProductsListingUI(props) {
|
|
|
180
180
|
return _context.stop();
|
|
181
181
|
}
|
|
182
182
|
}, _callee);
|
|
183
|
-
}))
|
|
184
|
-
|
|
183
|
+
}));
|
|
184
|
+
return function onProductClick(_x) {
|
|
185
|
+
return _ref.apply(this, arguments);
|
|
186
|
+
};
|
|
187
|
+
}();
|
|
185
188
|
var handlerProductAction = function handlerProductAction(product) {
|
|
186
189
|
if (Object.keys(product).length) {
|
|
187
190
|
setModalIsOpen(false);
|