ordering-components-external 13.2.7 → 13.2.8
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-component.f315afd771830efc8429.js +1 -0
- package/_bundles/{1.ordering-component.f8cca900b596bec3e9d8.js → 1.ordering-component.f315afd771830efc8429.js} +1 -1
- package/_bundles/{2.ordering-component.f8cca900b596bec3e9d8.js → 2.ordering-component.f315afd771830efc8429.js} +1 -1
- package/_bundles/{4.ordering-component.f8cca900b596bec3e9d8.js → 4.ordering-component.f315afd771830efc8429.js} +1 -1
- package/_bundles/{5.ordering-component.f8cca900b596bec3e9d8.js → 5.ordering-component.f315afd771830efc8429.js} +1 -1
- package/_bundles/{6.ordering-component.f8cca900b596bec3e9d8.js → 6.ordering-component.f315afd771830efc8429.js} +1 -1
- package/_bundles/{7.ordering-component.f8cca900b596bec3e9d8.js → 7.ordering-component.f315afd771830efc8429.js} +2 -2
- package/_bundles/{8.ordering-component.f8cca900b596bec3e9d8.js → 8.ordering-component.f315afd771830efc8429.js} +1 -1
- package/_bundles/ordering-component.f315afd771830efc8429.js +2 -0
- package/_bundles/{ordering-component.f8cca900b596bec3e9d8.js.LICENSE.txt → ordering-component.f315afd771830efc8429.js.LICENSE.txt} +0 -9
- package/_modules/components/AddressDetails/index.js +1 -1
- package/_modules/components/AddressForm/index.js +4 -4
- package/_modules/components/AddressList/index.js +4 -4
- package/_modules/components/AnalyticsSegment/index.js +1 -1
- package/_modules/components/AppleLogin/index.js +2 -2
- package/_modules/components/BusinessAndProductList/index.js +9 -9
- package/_modules/components/BusinessBasicInformation/index.js +2 -2
- package/_modules/components/BusinessController/index.js +3 -3
- package/_modules/components/BusinessList/index.js +3 -3
- package/_modules/components/BusinessMenuListing/index.js +1 -1
- package/_modules/components/BusinessReviews/index.js +1 -1
- package/_modules/components/BusinessSearchList/index.js +4 -4
- package/_modules/components/BusinessTypeFilter/index.js +1 -1
- package/_modules/components/Cart/index.js +1 -1
- package/_modules/components/CartStoresListing/index.js +2 -2
- package/_modules/components/Checkout/index.js +11 -11
- package/_modules/components/CmsContent/index.js +1 -1
- package/_modules/components/Contacts/index.js +9 -9
- package/_modules/components/DriverList/index.js +1 -1
- package/_modules/components/FacebookLoginButton/index.js +1 -1
- package/_modules/components/FavoriteList/index.js +3 -3
- package/_modules/components/FirebaseGoogleLoginButton/index.js +2 -2
- package/_modules/components/ForgotPasswordForm/index.js +1 -1
- package/_modules/components/GiftCard/GiftCardOrdersList/index.js +3 -3
- package/_modules/components/GiftCard/PurchaseGiftCard/index.js +2 -2
- package/_modules/components/GiftCard/RedeemGiftCard/index.js +1 -1
- package/_modules/components/GiftCard/SendGiftCard/index.js +1 -1
- package/_modules/components/GoogleIdentity/index.js +1 -1
- package/_modules/components/GoogleLoginButton/index.js +3 -3
- package/_modules/components/LanguageSelector/index.js +1 -1
- package/_modules/components/LoginForm/index.js +5 -5
- package/_modules/components/LogoutAction/index.js +2 -2
- package/_modules/components/MainSearch/index.js +1 -1
- package/_modules/components/MapView/index.js +2 -2
- package/_modules/components/Messages/index.js +1 -1
- package/_modules/components/MultiCartCreate/index.js +1 -1
- package/_modules/components/MultiCartsPaymethodsAndWallets/index.js +2 -2
- package/_modules/components/MultiCheckout/index.js +23 -22
- package/_modules/components/MultiOrdersDetails/index.js +1 -1
- package/_modules/components/MyOrders/index.js +2 -2
- package/_modules/components/MyOrdersList/index.js +1 -1
- package/_modules/components/OrderChange/index.js +1 -1
- package/_modules/components/OrderDetails/index.js +11 -11
- package/_modules/components/OrderList/index.js +11 -11
- package/_modules/components/OrderListGroups/index.js +13 -13
- package/_modules/components/OrderReview/index.js +4 -4
- package/_modules/components/OrderVerticalList/index.js +4 -4
- package/_modules/components/OrdersControlFilters/index.js +1 -1
- package/_modules/components/OrdersDashboardComponents/Appointments/index.js +1 -1
- package/_modules/components/OrdersDashboardComponents/BusinessProductsListing/index.js +7 -7
- package/_modules/components/OrdersDashboardComponents/CheckPassword/index.js +2 -2
- package/_modules/components/OrdersDashboardComponents/CityList/index.js +1 -1
- package/_modules/components/OrdersDashboardComponents/CountryList/index.js +3 -3
- package/_modules/components/OrdersDashboardComponents/CustomOrderDetails/index.js +4 -4
- package/_modules/components/OrdersDashboardComponents/DashboardBusinessList/index.js +8 -8
- package/_modules/components/OrdersDashboardComponents/DashboardOrdersList/index.js +6 -6
- package/_modules/components/OrdersDashboardComponents/DriversList/index.js +4 -4
- package/_modules/components/OrdersDashboardComponents/ExportCSV/index.js +1 -1
- package/_modules/components/OrdersDashboardComponents/GiftCardsList/index.js +1 -1
- package/_modules/components/OrdersDashboardComponents/GoogleMapsApiKeySetting/index.js +1 -1
- package/_modules/components/OrdersDashboardComponents/LogisticInformation/index.js +1 -1
- package/_modules/components/OrdersDashboardComponents/Logistics/index.js +1 -1
- package/_modules/components/OrdersDashboardComponents/Messages/index.js +3 -3
- package/_modules/components/OrdersDashboardComponents/MetaFields/index.js +3 -3
- package/_modules/components/OrdersDashboardComponents/OrderDetails/index.js +7 -7
- package/_modules/components/OrdersDashboardComponents/OrdersManage/index.js +6 -6
- package/_modules/components/OrdersDashboardComponents/PointsWalletLevels/index.js +1 -1
- package/_modules/components/OrdersDashboardComponents/ReviewCustomer/index.js +1 -1
- package/_modules/components/OrdersDashboardComponents/SettingsList/index.js +1 -1
- package/_modules/components/OrdersDashboardComponents/UserFormDetails/index.js +2 -2
- package/_modules/components/OrdersDashboardComponents/UsersList/index.js +7 -7
- package/_modules/components/PageBanner/index.js +1 -1
- package/_modules/components/PaymentOptionPaypal/index.js +3 -3
- package/_modules/components/PaymentOptionSquare/index.js +12 -12
- package/_modules/components/PaymentOptionStripe/index.js +4 -4
- package/_modules/components/PaymentOptionStripeDirect/index.js +2 -2
- package/_modules/components/PaymentOptionStripeRedirect/StripeRedirectForm/index.js +1 -1
- package/_modules/components/PaymentOptionStripeRedirect/index.js +1 -1
- package/_modules/components/PaymentOptionWallet/index.js +3 -3
- package/_modules/components/PaymentOptions/index.js +1 -1
- package/_modules/components/PaymethodList/index.js +1 -1
- package/_modules/components/PhoneAutocomplete/index.js +3 -3
- package/_modules/components/PlaceSpot/index.js +2 -2
- package/_modules/components/Popup/index.js +1 -1
- package/_modules/components/ProductForm/index.js +5 -5
- package/_modules/components/ProductsListing/index.js +2 -2
- package/_modules/components/ProfessionalInfo/index.js +2 -2
- package/_modules/components/PromotionsController/index.js +2 -2
- package/_modules/components/QueryLoginSpoonity/index.js +1 -1
- package/_modules/components/ResetPassword/index.js +1 -1
- package/_modules/components/ReviewCustomer/index.js +1 -1
- package/_modules/components/ReviewDriver/index.js +4 -4
- package/_modules/components/ReviewProduct/index.js +4 -4
- package/_modules/components/Sessions/index.js +3 -3
- package/_modules/components/SignupForm/index.js +5 -5
- package/_modules/components/SingleOrderCard/index.js +2 -2
- package/_modules/components/SingleProductCard/index.js +1 -1
- package/_modules/components/SingleProfessionalCard/index.js +1 -1
- package/_modules/components/StoreProductList/index.js +4 -4
- package/_modules/components/StripeElementsForm/CardForm/index.js +2 -2
- package/_modules/components/StripeElementsForm/index.js +1 -1
- package/_modules/components/UpsellingPage/index.js +1 -1
- package/_modules/components/UserFormDetails/index.js +6 -6
- package/_modules/components/UserVerification/index.js +4 -4
- package/_modules/components/WalletList/index.js +3 -3
- package/_modules/contexts/BusinessContext/index.js +2 -2
- package/_modules/contexts/ConfigContext/index.js +2 -2
- package/_modules/contexts/CustomerContext/index.js +3 -3
- package/_modules/contexts/LanguageContext/index.js +8 -8
- package/_modules/contexts/OptimizationLoadContext/index.js +1 -1
- package/_modules/contexts/OrderContext/index.js +25 -25
- package/_modules/contexts/OrderingThemeContext/index.js +1 -1
- package/_modules/contexts/SessionContext/index.js +7 -7
- package/_modules/contexts/SiteContext/index.js +2 -2
- package/_modules/contexts/ValidationsFieldsContext/index.js +2 -2
- package/_modules/contexts/WebsocketContext/index.js +1 -1
- package/_modules/native/src/NativeStrategy/index.js +3 -3
- package/_modules/webStrategy/index.js +3 -3
- package/package.json +1 -1
- package/src/components/MultiCheckout/index.js +4 -1
- package/_bundles/0.ordering-component.f8cca900b596bec3e9d8.js +0 -1
- package/_bundles/ordering-component.f8cca900b596bec3e9d8.js +0 -2
- /package/_bundles/{7.ordering-component.f8cca900b596bec3e9d8.js.LICENSE.txt → 7.ordering-component.f315afd771830efc8429.js.LICENSE.txt} +0 -0
|
@@ -59,7 +59,7 @@ var ProfessionalInfo = exports.ProfessionalInfo = function ProfessionalInfo(prop
|
|
|
59
59
|
* Method to get user from API
|
|
60
60
|
*/
|
|
61
61
|
var getUser = /*#__PURE__*/function () {
|
|
62
|
-
var _ref = _asyncToGenerator(
|
|
62
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
63
63
|
var fetchEndpoint, _yield$fetchEndpoint$, result, user;
|
|
64
64
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
65
65
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -103,7 +103,7 @@ var ProfessionalInfo = exports.ProfessionalInfo = function ProfessionalInfo(prop
|
|
|
103
103
|
* Method to get the user reviews from API
|
|
104
104
|
*/
|
|
105
105
|
var getUserReviews = /*#__PURE__*/function () {
|
|
106
|
-
var _ref2 = _asyncToGenerator(
|
|
106
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
107
107
|
var requestOptions, response, content;
|
|
108
108
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
109
109
|
while (1) switch (_context2.prev = _context2.next) {
|
|
@@ -60,7 +60,7 @@ var PromotionsController = exports.PromotionsController = function PromotionsCon
|
|
|
60
60
|
setOffersState = _useState6[1];
|
|
61
61
|
var location = JSON.stringify(options === null || options === void 0 || (_options$address = options.address) === null || _options$address === void 0 ? void 0 : _options$address.location);
|
|
62
62
|
var getOffers = /*#__PURE__*/function () {
|
|
63
|
-
var _ref = _asyncToGenerator(
|
|
63
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
64
64
|
var params, url, response;
|
|
65
65
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
66
66
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -97,7 +97,7 @@ var PromotionsController = exports.PromotionsController = function PromotionsCon
|
|
|
97
97
|
};
|
|
98
98
|
}();
|
|
99
99
|
var loadOffers = /*#__PURE__*/function () {
|
|
100
|
-
var _ref2 = _asyncToGenerator(
|
|
100
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
101
101
|
var _yield$getOffers, error, result, _err$message;
|
|
102
102
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
103
103
|
while (1) switch (_context2.prev = _context2.next) {
|
|
@@ -80,7 +80,7 @@ var QueryLoginSpoonity = exports.QueryLoginSpoonity = function QueryLoginSpoonit
|
|
|
80
80
|
* Method to get the user from token
|
|
81
81
|
*/
|
|
82
82
|
var handleGetUser = /*#__PURE__*/function () {
|
|
83
|
-
var _ref = _asyncToGenerator(
|
|
83
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
84
84
|
var requestOptions, response, _yield$response$json, error, result, _result$session;
|
|
85
85
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
86
86
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -53,7 +53,7 @@ var ResetPassword = exports.ResetPassword = function ResetPassword(props) {
|
|
|
53
53
|
_useApi2 = _slicedToArray(_useApi, 1),
|
|
54
54
|
ordering = _useApi2[0];
|
|
55
55
|
var handleResetPassword = /*#__PURE__*/function () {
|
|
56
|
-
var _ref = _asyncToGenerator(
|
|
56
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
57
57
|
var _yield$ordering$users, response, result;
|
|
58
58
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
59
59
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -71,7 +71,7 @@ var ReviewCustomer = exports.ReviewCustomer = function ReviewCustomer(props) {
|
|
|
71
71
|
* Function that load and send the customer review to ordering
|
|
72
72
|
*/
|
|
73
73
|
var handleSendCustomerReview = /*#__PURE__*/function () {
|
|
74
|
-
var _ref = _asyncToGenerator(
|
|
74
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
75
75
|
var response, _yield$response$json, result, error;
|
|
76
76
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
77
77
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -70,7 +70,7 @@ var ReviewDriver = exports.ReviewDriver = function ReviewDriver(props) {
|
|
|
70
70
|
* Function that load and send the driver review to ordering
|
|
71
71
|
*/
|
|
72
72
|
var handleSendDriverReview = /*#__PURE__*/function () {
|
|
73
|
-
var _ref = _asyncToGenerator(
|
|
73
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
74
74
|
var orderId, _order$products$, _order$driver, _reviewsArray$, userId, fetchReviews, reviewsArray, error, result;
|
|
75
75
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
76
76
|
while (1) switch (_context3.prev = _context3.next) {
|
|
@@ -88,13 +88,13 @@ var ReviewDriver = exports.ReviewDriver = function ReviewDriver(props) {
|
|
|
88
88
|
_context3.prev = 4;
|
|
89
89
|
userId = isProfessional ? order === null || order === void 0 || (_order$products$ = order.products[0]) === null || _order$products$ === void 0 || (_order$products$ = _order$products$.calendar_event) === null || _order$products$ === void 0 || (_order$products$ = _order$products$.professional) === null || _order$products$ === void 0 ? void 0 : _order$products$.id : order === null || order === void 0 || (_order$driver = order.driver) === null || _order$driver === void 0 ? void 0 : _order$driver.id;
|
|
90
90
|
fetchReviews = /*#__PURE__*/function () {
|
|
91
|
-
var _ref2 = _asyncToGenerator(
|
|
91
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(ids) {
|
|
92
92
|
var promises, data;
|
|
93
93
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
94
94
|
while (1) switch (_context2.prev = _context2.next) {
|
|
95
95
|
case 0:
|
|
96
|
-
promises = ids.map(
|
|
97
|
-
var _ref3 = _asyncToGenerator(
|
|
96
|
+
promises = ids.map(/*#__PURE__*/function () {
|
|
97
|
+
var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(id) {
|
|
98
98
|
var headers, res, _yield$res$json, result, error;
|
|
99
99
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
100
100
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -77,7 +77,7 @@ var ReviewProduct = exports.ReviewProduct = function ReviewProduct(props) {
|
|
|
77
77
|
}));
|
|
78
78
|
};
|
|
79
79
|
var reviewProducts = /*#__PURE__*/function () {
|
|
80
|
-
var _ref = _asyncToGenerator(
|
|
80
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(orderId, changes) {
|
|
81
81
|
var headers, response, result;
|
|
82
82
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
83
83
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -129,7 +129,7 @@ var ReviewProduct = exports.ReviewProduct = function ReviewProduct(props) {
|
|
|
129
129
|
* Function that load and send the product review to ordering
|
|
130
130
|
*/
|
|
131
131
|
var handleSendProductReview = /*#__PURE__*/function () {
|
|
132
|
-
var _ref2 = _asyncToGenerator(
|
|
132
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
133
133
|
var _order$business, error, result, _order$business2, _result;
|
|
134
134
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
135
135
|
while (1) switch (_context3.prev = _context3.next) {
|
|
@@ -143,8 +143,8 @@ var ReviewProduct = exports.ReviewProduct = function ReviewProduct(props) {
|
|
|
143
143
|
break;
|
|
144
144
|
}
|
|
145
145
|
// eslint-disable-next-line no-unused-expressions
|
|
146
|
-
order === null || order === void 0 || (_order$business2 = order.business) === null || _order$business2 === void 0 || _order$business2.forEach(
|
|
147
|
-
var _ref3 = _asyncToGenerator(
|
|
146
|
+
order === null || order === void 0 || (_order$business2 = order.business) === null || _order$business2 === void 0 || _order$business2.forEach(/*#__PURE__*/function () {
|
|
147
|
+
var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(business, i) {
|
|
148
148
|
var productsOfOrder, _result;
|
|
149
149
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
150
150
|
while (1) switch (_context2.prev = _context2.next) {
|
|
@@ -62,7 +62,7 @@ var Sessions = exports.Sessions = function Sessions(props) {
|
|
|
62
62
|
* Method to get the sessions from API
|
|
63
63
|
*/
|
|
64
64
|
var handleGetSessions = /*#__PURE__*/function () {
|
|
65
|
-
var _ref = _asyncToGenerator(
|
|
65
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
66
66
|
var response, _yield$response$json, result, error;
|
|
67
67
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
68
68
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -126,7 +126,7 @@ var Sessions = exports.Sessions = function Sessions(props) {
|
|
|
126
126
|
* @param {number} sessionId session id
|
|
127
127
|
*/
|
|
128
128
|
var handleDeleteSession = /*#__PURE__*/function () {
|
|
129
|
-
var _ref2 = _asyncToGenerator(
|
|
129
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(session) {
|
|
130
130
|
var response, _yield$response$json2, result, error, sessions;
|
|
131
131
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
132
132
|
while (1) switch (_context2.prev = _context2.next) {
|
|
@@ -197,7 +197,7 @@ var Sessions = exports.Sessions = function Sessions(props) {
|
|
|
197
197
|
* Method to delete all sessions
|
|
198
198
|
*/
|
|
199
199
|
var handleDeleteAllSessions = /*#__PURE__*/function () {
|
|
200
|
-
var _ref3 = _asyncToGenerator(
|
|
200
|
+
var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
201
201
|
var deleteCurrent,
|
|
202
202
|
response,
|
|
203
203
|
_yield$response$json3,
|
|
@@ -144,7 +144,7 @@ var SignupForm = exports.SignupForm = function SignupForm(props) {
|
|
|
144
144
|
* Default fuction for signup workflow
|
|
145
145
|
*/
|
|
146
146
|
var handleSignupClick = /*#__PURE__*/function () {
|
|
147
|
-
var _ref = _asyncToGenerator(
|
|
147
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(values) {
|
|
148
148
|
var data, newData, parsedNumber, source, response;
|
|
149
149
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
150
150
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -310,7 +310,7 @@ var SignupForm = exports.SignupForm = function SignupForm(props) {
|
|
|
310
310
|
* @param {Object} values object with cellphone and country code values
|
|
311
311
|
*/
|
|
312
312
|
var sendVerifyPhoneCode = /*#__PURE__*/function () {
|
|
313
|
-
var _ref4 = _asyncToGenerator(
|
|
313
|
+
var _ref4 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(values) {
|
|
314
314
|
var response, res;
|
|
315
315
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
316
316
|
while (1) switch (_context2.prev = _context2.next) {
|
|
@@ -364,7 +364,7 @@ var SignupForm = exports.SignupForm = function SignupForm(props) {
|
|
|
364
364
|
};
|
|
365
365
|
}();
|
|
366
366
|
var generateOtpCode = /*#__PURE__*/function () {
|
|
367
|
-
var _ref5 = _asyncToGenerator(
|
|
367
|
+
var _ref5 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(values) {
|
|
368
368
|
var body, email, cellphone, countryPhoneCode, response, _yield$response$json, result, error;
|
|
369
369
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
370
370
|
while (1) switch (_context3.prev = _context3.next) {
|
|
@@ -487,7 +487,7 @@ var SignupForm = exports.SignupForm = function SignupForm(props) {
|
|
|
487
487
|
* @param {Object} values object with cellphone and country code values
|
|
488
488
|
*/
|
|
489
489
|
var checkVerifyPhoneCode = /*#__PURE__*/function () {
|
|
490
|
-
var _ref6 = _asyncToGenerator(
|
|
490
|
+
var _ref6 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(values) {
|
|
491
491
|
var body, _res$result, response, res, _res$result2;
|
|
492
492
|
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
493
493
|
while (1) switch (_context4.prev = _context4.next) {
|
|
@@ -553,7 +553,7 @@ var SignupForm = exports.SignupForm = function SignupForm(props) {
|
|
|
553
553
|
};
|
|
554
554
|
}();
|
|
555
555
|
var checkVerifyByOtpCode = /*#__PURE__*/function () {
|
|
556
|
-
var _ref7 = _asyncToGenerator(
|
|
556
|
+
var _ref7 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
|
|
557
557
|
var _signupData$country_p;
|
|
558
558
|
var _credentials, _yield$ordering$users, _yield$ordering$users2, error, result, _result$session;
|
|
559
559
|
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
@@ -76,7 +76,7 @@ var SingleOrderCard = exports.SingleOrderCard = function SingleOrderCard(props)
|
|
|
76
76
|
* Method to add, remove favorite info for user from API
|
|
77
77
|
*/
|
|
78
78
|
var handleFavoriteOrder = /*#__PURE__*/function () {
|
|
79
|
-
var _ref = _asyncToGenerator(
|
|
79
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
80
80
|
var isAdd,
|
|
81
81
|
changes,
|
|
82
82
|
requestOptions,
|
|
@@ -163,7 +163,7 @@ var SingleOrderCard = exports.SingleOrderCard = function SingleOrderCard(props)
|
|
|
163
163
|
* Method to remove products from cart
|
|
164
164
|
*/
|
|
165
165
|
var handleRemoveCart = /*#__PURE__*/function () {
|
|
166
|
-
var _ref2 = _asyncToGenerator(
|
|
166
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(_order) {
|
|
167
167
|
var _businessIds$map;
|
|
168
168
|
var _businessIds, orderIds, uuids, errors, _iterator, _step, item, _error, disableLoading, _yield$clearCart, error, result;
|
|
169
169
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
@@ -66,7 +66,7 @@ var SingleProductCard = exports.SingleProductCard = function SingleProductCard(p
|
|
|
66
66
|
* Method to add, remove favorite info for user from API
|
|
67
67
|
*/
|
|
68
68
|
var handleFavoriteProduct = /*#__PURE__*/function () {
|
|
69
|
-
var _ref = _asyncToGenerator(
|
|
69
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
70
70
|
var isAdd,
|
|
71
71
|
productId,
|
|
72
72
|
changes,
|
|
@@ -61,7 +61,7 @@ var SingleProfessionalCard = exports.SingleProfessionalCard = function SinglePro
|
|
|
61
61
|
* Method to add, remove favorite info for user from API
|
|
62
62
|
*/
|
|
63
63
|
var handleFavoriteProfessional = /*#__PURE__*/function () {
|
|
64
|
-
var _ref = _asyncToGenerator(
|
|
64
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
65
65
|
var isAdd,
|
|
66
66
|
changes,
|
|
67
67
|
requestOptions,
|
|
@@ -94,7 +94,7 @@ var StoreProductList = exports.StoreProductList = function StoreProductList(prop
|
|
|
94
94
|
* Method to get products from API
|
|
95
95
|
*/
|
|
96
96
|
var getCategoryProducts = /*#__PURE__*/function () {
|
|
97
|
-
var _ref = _asyncToGenerator(
|
|
97
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(newFetch) {
|
|
98
98
|
var _productsList$paginat, _productsList$paginat2, _businessState$busine, _businessState$busine2, parameters, where, conditions, searchConditions, fetchEndpoint, _yield$fetchEndpoint$, _yield$fetchEndpoint$2, result, error, pagination;
|
|
99
99
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
100
100
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -181,7 +181,7 @@ var StoreProductList = exports.StoreProductList = function StoreProductList(prop
|
|
|
181
181
|
};
|
|
182
182
|
}();
|
|
183
183
|
var getBusiness = /*#__PURE__*/function () {
|
|
184
|
-
var _ref2 = _asyncToGenerator(
|
|
184
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
185
185
|
var fetchEndpoint, _yield$fetchEndpoint$3, _yield$fetchEndpoint$4, result, error;
|
|
186
186
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
187
187
|
while (1) switch (_context2.prev = _context2.next) {
|
|
@@ -236,7 +236,7 @@ var StoreProductList = exports.StoreProductList = function StoreProductList(prop
|
|
|
236
236
|
});
|
|
237
237
|
};
|
|
238
238
|
var updateStoreProduct = /*#__PURE__*/function () {
|
|
239
|
-
var _ref3 = _asyncToGenerator(
|
|
239
|
+
var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(categoryId, productId) {
|
|
240
240
|
var updateParams,
|
|
241
241
|
_businessState$busine3,
|
|
242
242
|
_yield$ordering$busin,
|
|
@@ -288,7 +288,7 @@ var StoreProductList = exports.StoreProductList = function StoreProductList(prop
|
|
|
288
288
|
};
|
|
289
289
|
}();
|
|
290
290
|
var updateStoreCategory = /*#__PURE__*/function () {
|
|
291
|
-
var _ref4 = _asyncToGenerator(
|
|
291
|
+
var _ref4 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(categoryId) {
|
|
292
292
|
var updateParams,
|
|
293
293
|
_businessState$busine4,
|
|
294
294
|
_yield$ordering$busin3,
|
|
@@ -95,7 +95,7 @@ var CardForm = exports.CardForm = function CardForm(props) {
|
|
|
95
95
|
* @param {*string} businessId string to know your business
|
|
96
96
|
*/
|
|
97
97
|
var stripeTokenHandler = /*#__PURE__*/function () {
|
|
98
|
-
var _ref = _asyncToGenerator(
|
|
98
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(tokenId, user, businessId) {
|
|
99
99
|
var isNewCard,
|
|
100
100
|
result,
|
|
101
101
|
response,
|
|
@@ -187,7 +187,7 @@ var CardForm = exports.CardForm = function CardForm(props) {
|
|
|
187
187
|
* @param {event} event
|
|
188
188
|
*/
|
|
189
189
|
var handleSubmit = /*#__PURE__*/function () {
|
|
190
|
-
var _ref2 = _asyncToGenerator(
|
|
190
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(event) {
|
|
191
191
|
var _card, card, userName, userAddress, billingData, result, _result;
|
|
192
192
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
193
193
|
while (1) switch (_context2.prev = _context2.next) {
|
|
@@ -45,7 +45,7 @@ var StripeElementsForm = exports.StripeElementsForm = function StripeElementsFor
|
|
|
45
45
|
* Method to get client id for create stripe payment method
|
|
46
46
|
*/
|
|
47
47
|
var getRequirements = /*#__PURE__*/function () {
|
|
48
|
-
var _ref = _asyncToGenerator(
|
|
48
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
49
49
|
var response, _yield$response$json, result;
|
|
50
50
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
51
51
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -78,7 +78,7 @@ var UpsellingPage = exports.UpsellingPage = function UpsellingPage(props) {
|
|
|
78
78
|
* getting products if array of product is not defined
|
|
79
79
|
*/
|
|
80
80
|
var getProducts = /*#__PURE__*/function () {
|
|
81
|
-
var _ref = _asyncToGenerator(
|
|
81
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
82
82
|
var _yield$ordering$busin, result;
|
|
83
83
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
84
84
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -203,7 +203,7 @@ var UserFormDetails = exports.UserFormDetails = function UserFormDetails(props)
|
|
|
203
203
|
* Default fuction for user profile workflow
|
|
204
204
|
*/
|
|
205
205
|
var handleUpdateClick = /*#__PURE__*/function () {
|
|
206
|
-
var _ref = _asyncToGenerator(
|
|
206
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(changes, isImage, image) {
|
|
207
207
|
var options,
|
|
208
208
|
response,
|
|
209
209
|
_changes,
|
|
@@ -411,7 +411,7 @@ var UserFormDetails = exports.UserFormDetails = function UserFormDetails(props)
|
|
|
411
411
|
return isOrderTypeValidationField ? (_checkoutRequiredFiel = checkoutRequiredFields) === null || _checkoutRequiredFiel === void 0 ? void 0 : _checkoutRequiredFiel.includes(fieldName) : useValidationFields && !validationFields.loading && ((_validationFields$fie4 = validationFields.fields) === null || _validationFields$fie4 === void 0 || (_validationFields$fie4 = _validationFields$fie4.checkout) === null || _validationFields$fie4 === void 0 ? void 0 : _validationFields$fie4[fieldName]) && ((_validationFields$fie5 = validationFields.fields) === null || _validationFields$fie5 === void 0 || (_validationFields$fie5 = _validationFields$fie5.checkout) === null || _validationFields$fie5 === void 0 || (_validationFields$fie5 = _validationFields$fie5[fieldName]) === null || _validationFields$fie5 === void 0 ? void 0 : _validationFields$fie5.enabled) && ((_validationFields$fie6 = validationFields.fields) === null || _validationFields$fie6 === void 0 || (_validationFields$fie6 = _validationFields$fie6.checkout) === null || _validationFields$fie6 === void 0 || (_validationFields$fie6 = _validationFields$fie6[fieldName]) === null || _validationFields$fie6 === void 0 ? void 0 : _validationFields$fie6.required);
|
|
412
412
|
};
|
|
413
413
|
var handleToggleAvalaibleStatusDriver = /*#__PURE__*/function () {
|
|
414
|
-
var _ref2 = _asyncToGenerator(
|
|
414
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(newValue) {
|
|
415
415
|
var _session$user2, response;
|
|
416
416
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
417
417
|
while (1) switch (_context2.prev = _context2.next) {
|
|
@@ -473,7 +473,7 @@ var UserFormDetails = exports.UserFormDetails = function UserFormDetails(props)
|
|
|
473
473
|
* @param {Object} values object with cellphone and country code values
|
|
474
474
|
*/
|
|
475
475
|
var sendVerifyPhoneCode = /*#__PURE__*/function () {
|
|
476
|
-
var _ref3 = _asyncToGenerator(
|
|
476
|
+
var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(values) {
|
|
477
477
|
var body, response, res;
|
|
478
478
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
479
479
|
while (1) switch (_context3.prev = _context3.next) {
|
|
@@ -528,7 +528,7 @@ var UserFormDetails = exports.UserFormDetails = function UserFormDetails(props)
|
|
|
528
528
|
};
|
|
529
529
|
}();
|
|
530
530
|
var updatePromotions = /*#__PURE__*/function () {
|
|
531
|
-
var _ref4 = _asyncToGenerator(
|
|
531
|
+
var _ref4 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(change, setState, state) {
|
|
532
532
|
var _props$userData4, response, _change$setCustomerIn;
|
|
533
533
|
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
534
534
|
while (1) switch (_context4.prev = _context4.next) {
|
|
@@ -631,7 +631,7 @@ var UserFormDetails = exports.UserFormDetails = function UserFormDetails(props)
|
|
|
631
631
|
}));
|
|
632
632
|
};
|
|
633
633
|
var handleRemoveAccount = /*#__PURE__*/function () {
|
|
634
|
-
var _ref6 = _asyncToGenerator(
|
|
634
|
+
var _ref6 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5(userId) {
|
|
635
635
|
var idToDelete, response, res;
|
|
636
636
|
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
637
637
|
while (1) switch (_context5.prev = _context5.next) {
|
|
@@ -681,7 +681,7 @@ var UserFormDetails = exports.UserFormDetails = function UserFormDetails(props)
|
|
|
681
681
|
};
|
|
682
682
|
}();
|
|
683
683
|
var handleRequestCustomerAddress = /*#__PURE__*/function () {
|
|
684
|
-
var _ref7 = _asyncToGenerator(
|
|
684
|
+
var _ref7 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
|
|
685
685
|
var _props$userData5, response, _yield$response$json, result, error;
|
|
686
686
|
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
687
687
|
while (1) switch (_context6.prev = _context6.next) {
|
|
@@ -69,7 +69,7 @@ var UserVerification = exports.UserVerification = function UserVerification(prop
|
|
|
69
69
|
* @param {Object} values object with type, channel, size, email values
|
|
70
70
|
*/
|
|
71
71
|
var sendVerifyEmailCode = /*#__PURE__*/function () {
|
|
72
|
-
var _ref = _asyncToGenerator(
|
|
72
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(values) {
|
|
73
73
|
var _values$type, _values$channel, _values$size, response, _yield$response$json, error, result;
|
|
74
74
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
75
75
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -132,7 +132,7 @@ var UserVerification = exports.UserVerification = function UserVerification(prop
|
|
|
132
132
|
* @param {Object} values object with channel and code values
|
|
133
133
|
*/
|
|
134
134
|
var checkVerifyEmailCode = /*#__PURE__*/function () {
|
|
135
|
-
var _ref2 = _asyncToGenerator(
|
|
135
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(values) {
|
|
136
136
|
var _values$channel2, response, _yield$response$json2, error, result;
|
|
137
137
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
138
138
|
while (1) switch (_context2.prev = _context2.next) {
|
|
@@ -213,7 +213,7 @@ var UserVerification = exports.UserVerification = function UserVerification(prop
|
|
|
213
213
|
* @param {Object} values object with cellphone and country code values
|
|
214
214
|
*/
|
|
215
215
|
var sendVerifyPhoneCode = /*#__PURE__*/function () {
|
|
216
|
-
var _ref3 = _asyncToGenerator(
|
|
216
|
+
var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(values) {
|
|
217
217
|
var _values$type2, _values$channel3, _values$size2, response, _yield$response$json3, error, result;
|
|
218
218
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
219
219
|
while (1) switch (_context3.prev = _context3.next) {
|
|
@@ -278,7 +278,7 @@ var UserVerification = exports.UserVerification = function UserVerification(prop
|
|
|
278
278
|
* @param {Object} values object with cellphone and country code values
|
|
279
279
|
*/
|
|
280
280
|
var checkVerifyPhoneCode = /*#__PURE__*/function () {
|
|
281
|
-
var _ref4 = _asyncToGenerator(
|
|
281
|
+
var _ref4 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(values) {
|
|
282
282
|
var _values$channel4, response, _yield$response$json4, error, result;
|
|
283
283
|
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
284
284
|
while (1) switch (_context4.prev = _context4.next) {
|
|
@@ -73,7 +73,7 @@ var WalletList = exports.WalletList = function WalletList(props) {
|
|
|
73
73
|
setUserLoyaltyLevel = _useState8[1];
|
|
74
74
|
var userProps = ['loyalty_level'];
|
|
75
75
|
var getTransactions = /*#__PURE__*/function () {
|
|
76
|
-
var _ref = _asyncToGenerator(
|
|
76
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(walletId) {
|
|
77
77
|
var _transactions$list;
|
|
78
78
|
var response, _yield$response$json, error, result;
|
|
79
79
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
@@ -134,7 +134,7 @@ var WalletList = exports.WalletList = function WalletList(props) {
|
|
|
134
134
|
};
|
|
135
135
|
}();
|
|
136
136
|
var getWallets = /*#__PURE__*/function () {
|
|
137
|
-
var _ref2 = _asyncToGenerator(
|
|
137
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
138
138
|
var response, _yield$response$json2, error, result, cashWallet, pointsWallet;
|
|
139
139
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
140
140
|
while (1) switch (_context2.prev = _context2.next) {
|
|
@@ -198,7 +198,7 @@ var WalletList = exports.WalletList = function WalletList(props) {
|
|
|
198
198
|
};
|
|
199
199
|
}();
|
|
200
200
|
var getUserLoyaltyLevel = /*#__PURE__*/function () {
|
|
201
|
-
var _ref3 = _asyncToGenerator(
|
|
201
|
+
var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
202
202
|
var _yield$ordering$users, _yield$ordering$users2, result, error;
|
|
203
203
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
204
204
|
while (1) switch (_context3.prev = _context3.next) {
|
|
@@ -50,7 +50,7 @@ var BusinessProvider = exports.BusinessProvider = function BusinessProvider(_ref
|
|
|
50
50
|
ordering = _useApi2[0];
|
|
51
51
|
var businessParams = ['header', 'logo', 'name', 'slug', 'address', 'location', 'distance', 'address_notes', 'zipcode', 'internal_number'];
|
|
52
52
|
var getBusiness = /*#__PURE__*/function () {
|
|
53
|
-
var _ref2 = _asyncToGenerator(
|
|
53
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(id) {
|
|
54
54
|
var _yield$ordering$busin, _yield$ordering$busin2, result, error;
|
|
55
55
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
56
56
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -91,7 +91,7 @@ var BusinessProvider = exports.BusinessProvider = function BusinessProvider(_ref
|
|
|
91
91
|
};
|
|
92
92
|
}();
|
|
93
93
|
var setBusiness = /*#__PURE__*/function () {
|
|
94
|
-
var _ref3 = _asyncToGenerator(
|
|
94
|
+
var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(business) {
|
|
95
95
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
96
96
|
while (1) switch (_context2.prev = _context2.next) {
|
|
97
97
|
case 0:
|
|
@@ -148,7 +148,7 @@ var ConfigProvider = exports.ConfigProvider = function ConfigProvider(_ref) {
|
|
|
148
148
|
}
|
|
149
149
|
};
|
|
150
150
|
var refreshConfigs = /*#__PURE__*/function () {
|
|
151
|
-
var _ref2 = _asyncToGenerator(
|
|
151
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(newCountryCode) {
|
|
152
152
|
var configs,
|
|
153
153
|
_configs$error,
|
|
154
154
|
_configs$result,
|
|
@@ -311,7 +311,7 @@ var ConfigProvider = exports.ConfigProvider = function ConfigProvider(_ref) {
|
|
|
311
311
|
*/
|
|
312
312
|
var useConfig = exports.useConfig = function useConfig() {
|
|
313
313
|
var configManager = (0, _react.useContext)(ConfigContext);
|
|
314
|
-
return configManager || [{}, /*#__PURE__*/_asyncToGenerator(
|
|
314
|
+
return configManager || [{}, /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
315
315
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
316
316
|
while (1) switch (_context2.prev = _context2.next) {
|
|
317
317
|
case 0:
|
|
@@ -34,7 +34,7 @@ var CustomerProvider = exports.CustomerProvider = function CustomerProvider(_ref
|
|
|
34
34
|
state = _useState2[0],
|
|
35
35
|
setState = _useState2[1];
|
|
36
36
|
var getUserCustomerFromLocalStorage = /*#__PURE__*/function () {
|
|
37
|
-
var _ref2 = _asyncToGenerator(
|
|
37
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
38
38
|
var user;
|
|
39
39
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
40
40
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -70,7 +70,7 @@ var CustomerProvider = exports.CustomerProvider = function CustomerProvider(_ref
|
|
|
70
70
|
};
|
|
71
71
|
}();
|
|
72
72
|
var setUserCustomer = /*#__PURE__*/function () {
|
|
73
|
-
var _ref3 = _asyncToGenerator(
|
|
73
|
+
var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(user, isFromLocalStorage) {
|
|
74
74
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
75
75
|
while (1) switch (_context2.prev = _context2.next) {
|
|
76
76
|
case 0:
|
|
@@ -99,7 +99,7 @@ var CustomerProvider = exports.CustomerProvider = function CustomerProvider(_ref
|
|
|
99
99
|
};
|
|
100
100
|
}();
|
|
101
101
|
var deleteUserCustomer = /*#__PURE__*/function () {
|
|
102
|
-
var _ref4 = _asyncToGenerator(
|
|
102
|
+
var _ref4 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(isFromLocalStorage) {
|
|
103
103
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
104
104
|
while (1) switch (_context3.prev = _context3.next) {
|
|
105
105
|
case 0:
|
|
@@ -51,7 +51,7 @@ var LanguageProvider = exports.LanguageProvider = function LanguageProvider(_ref
|
|
|
51
51
|
* Load language from localstorage and set state or load default language
|
|
52
52
|
*/
|
|
53
53
|
var setLanguageFromLocalStorage = /*#__PURE__*/function () {
|
|
54
|
-
var _ref2 = _asyncToGenerator(
|
|
54
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
55
55
|
var language;
|
|
56
56
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
57
57
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -83,7 +83,7 @@ var LanguageProvider = exports.LanguageProvider = function LanguageProvider(_ref
|
|
|
83
83
|
ordering = _useApi2[0],
|
|
84
84
|
apiHelper = _useApi2[1];
|
|
85
85
|
var updateLanguageContext = /*#__PURE__*/function () {
|
|
86
|
-
var _ref3 = _asyncToGenerator(
|
|
86
|
+
var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
87
87
|
var _language, dictionary, _yield$ordering$trans, _yield$ordering$trans2, errDict, resDict, _yield$ordering$langu, _yield$ordering$langu2, error, result, language;
|
|
88
88
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
89
89
|
while (1) switch (_context2.prev = _context2.next) {
|
|
@@ -146,7 +146,7 @@ var LanguageProvider = exports.LanguageProvider = function LanguageProvider(_ref
|
|
|
146
146
|
};
|
|
147
147
|
}();
|
|
148
148
|
var refreshTranslations = /*#__PURE__*/function () {
|
|
149
|
-
var _ref4 = _asyncToGenerator(
|
|
149
|
+
var _ref4 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
150
150
|
var _yield$ordering$trans3, _yield$ordering$trans4, error, result;
|
|
151
151
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
152
152
|
while (1) switch (_context3.prev = _context3.next) {
|
|
@@ -185,7 +185,7 @@ var LanguageProvider = exports.LanguageProvider = function LanguageProvider(_ref
|
|
|
185
185
|
};
|
|
186
186
|
}();
|
|
187
187
|
var loadDefaultLanguage = /*#__PURE__*/function () {
|
|
188
|
-
var _ref5 = _asyncToGenerator(
|
|
188
|
+
var _ref5 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
|
|
189
189
|
var _language, _yield$ordering$langu3, _yield$ordering$langu4, error, result, language;
|
|
190
190
|
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
191
191
|
while (1) switch (_context4.prev = _context4.next) {
|
|
@@ -243,7 +243,7 @@ var LanguageProvider = exports.LanguageProvider = function LanguageProvider(_ref
|
|
|
243
243
|
};
|
|
244
244
|
}();
|
|
245
245
|
var setLanguage = /*#__PURE__*/function () {
|
|
246
|
-
var _ref6 = _asyncToGenerator(
|
|
246
|
+
var _ref6 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5(language) {
|
|
247
247
|
var _state$language;
|
|
248
248
|
var _language;
|
|
249
249
|
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
@@ -284,7 +284,7 @@ var LanguageProvider = exports.LanguageProvider = function LanguageProvider(_ref
|
|
|
284
284
|
*/
|
|
285
285
|
(0, _react.useEffect)(function () {
|
|
286
286
|
var checkLanguage = /*#__PURE__*/function () {
|
|
287
|
-
var _ref7 = _asyncToGenerator(
|
|
287
|
+
var _ref7 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
|
|
288
288
|
var _state$language2, _state$language3;
|
|
289
289
|
var token;
|
|
290
290
|
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
@@ -336,7 +336,7 @@ var useLanguage = exports.useLanguage = function useLanguage() {
|
|
|
336
336
|
return languageManager || [{}, function (key) {
|
|
337
337
|
var fallback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
338
338
|
return fallback || key;
|
|
339
|
-
}, /*#__PURE__*/_asyncToGenerator(
|
|
339
|
+
}, /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
|
|
340
340
|
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
341
341
|
while (1) switch (_context7.prev = _context7.next) {
|
|
342
342
|
case 0:
|
|
@@ -344,7 +344,7 @@ var useLanguage = exports.useLanguage = function useLanguage() {
|
|
|
344
344
|
return _context7.stop();
|
|
345
345
|
}
|
|
346
346
|
}, _callee7);
|
|
347
|
-
})), /*#__PURE__*/_asyncToGenerator(
|
|
347
|
+
})), /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
|
|
348
348
|
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
|
349
349
|
while (1) switch (_context8.prev = _context8.next) {
|
|
350
350
|
case 0:
|
|
@@ -49,7 +49,7 @@ var OptimizationLoadProvider = exports.OptimizationLoadProvider = function Optim
|
|
|
49
49
|
_useApi2 = _slicedToArray(_useApi, 1),
|
|
50
50
|
ordering = _useApi2[0];
|
|
51
51
|
var getData = /*#__PURE__*/function () {
|
|
52
|
-
var _ref2 = _asyncToGenerator(
|
|
52
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
53
53
|
var _localOptions$address;
|
|
54
54
|
var requestOptions, countryCodeFromLocalStorage, localOptions, countryCode, response, _yield$response$json, result, error;
|
|
55
55
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|