ordering-components-external 13.0.38 → 13.0.40
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-component.db75d96df54e78518073.js → 7.ordering-component.fa62c57788358b5b80ae.js} +1 -1
- package/_bundles/{ordering-component.db75d96df54e78518073.js → ordering-component.fa62c57788358b5b80ae.js} +2 -2
- package/_modules/components/AddressDetails/index.js +2 -2
- package/_modules/components/AddressForm/index.js +6 -4
- package/_modules/components/AddressList/index.js +3 -3
- package/_modules/components/Analitycs/index.js +1 -1
- package/_modules/components/AnalyticsSegment/index.js +2 -2
- package/_modules/components/AppleLogin/index.js +3 -3
- package/_modules/components/BusinessAndProductList/index.js +3 -3
- package/_modules/components/BusinessBasicInformation/index.js +3 -3
- package/_modules/components/BusinessController/index.js +3 -3
- package/_modules/components/BusinessInformation/index.js +1 -1
- package/_modules/components/BusinessList/index.js +3 -3
- package/_modules/components/BusinessMenuListing/index.js +3 -3
- package/_modules/components/BusinessReviews/index.js +3 -3
- package/_modules/components/BusinessSearchList/index.js +3 -3
- package/_modules/components/BusinessSortControl/index.js +1 -1
- package/_modules/components/BusinessTypeFilter/index.js +3 -3
- package/_modules/components/BusinessesMap/index.js +1 -1
- package/_modules/components/Cart/index.js +3 -3
- package/_modules/components/CartStoresListing/index.js +3 -3
- package/_modules/components/Checkout/index.js +3 -3
- package/_modules/components/CmsContent/index.js +3 -3
- package/_modules/components/Contacts/index.js +3 -3
- package/_modules/components/CouponControl/index.js +2 -2
- package/_modules/components/DragAndDrop/index.js +1 -1
- package/_modules/components/DriverList/index.js +3 -3
- package/_modules/components/DriverTips/index.js +1 -1
- package/_modules/components/Emitter/index.js +2 -3
- package/_modules/components/ExamineClick/index.js +1 -1
- package/_modules/components/FacebookLoginButton/index.js +3 -3
- package/_modules/components/FacebookPixel/index.js +1 -1
- package/_modules/components/FavoriteList/index.js +3 -3
- package/_modules/components/FirebaseGoogleLoginButton/index.js +3 -3
- package/_modules/components/ForgotPasswordForm/index.js +3 -3
- package/_modules/components/GiftCard/GiftCardOrdersList/index.js +3 -3
- package/_modules/components/GiftCard/PurchaseGiftCard/index.js +3 -3
- package/_modules/components/GiftCard/RedeemGiftCard/index.js +3 -3
- package/_modules/components/GiftCard/SendGiftCard/index.js +3 -3
- package/_modules/components/GoogleAutocompleteInput/index.js +2 -2
- package/_modules/components/GoogleIdentity/index.js +3 -3
- package/_modules/components/GoogleLoginButton/index.js +3 -3
- package/_modules/components/GoogleMaps/index.js +2 -2
- package/_modules/components/GpsButton/index.js +1 -1
- package/_modules/components/LanguageSelector/index.js +3 -3
- package/_modules/components/LoginForm/index.js +24 -16
- package/_modules/components/LogoutAction/index.js +3 -3
- package/_modules/components/MainSearch/index.js +3 -3
- package/_modules/components/MapView/index.js +2 -2
- package/_modules/components/MenuControl/index.js +2 -2
- package/_modules/components/Messages/index.js +3 -3
- package/_modules/components/MomentOption/index.js +1 -1
- package/_modules/components/MultiCartCreate/index.js +2 -2
- package/_modules/components/MultiCartsPaymethodsAndWallets/index.js +3 -3
- package/_modules/components/MultiCheckout/index.js +3 -3
- package/_modules/components/MultiOrdersDetails/index.js +3 -3
- package/_modules/components/MyOrders/index.js +3 -3
- package/_modules/components/MyOrdersList/index.js +2 -2
- package/_modules/components/OrderChange/index.js +3 -3
- package/_modules/components/OrderDetails/index.js +3 -3
- package/_modules/components/OrderList/index.js +3 -3
- package/_modules/components/OrderListGroups/index.js +3 -3
- package/_modules/components/OrderReview/index.js +3 -3
- package/_modules/components/OrderTypeControl/index.js +1 -1
- package/_modules/components/OrderVerticalList/index.js +3 -3
- package/_modules/components/OrdersControlFilters/index.js +3 -3
- package/_modules/components/OrdersDashboardComponents/Appointments/index.js +3 -3
- package/_modules/components/OrdersDashboardComponents/BusinessProductsListing/index.js +3 -3
- package/_modules/components/OrdersDashboardComponents/CheckPassword/index.js +3 -3
- package/_modules/components/OrdersDashboardComponents/CityList/index.js +3 -3
- package/_modules/components/OrdersDashboardComponents/CountryList/index.js +3 -3
- package/_modules/components/OrdersDashboardComponents/CustomOrderDetails/index.js +3 -3
- package/_modules/components/OrdersDashboardComponents/DashboardBusinessList/index.js +3 -3
- package/_modules/components/OrdersDashboardComponents/DashboardOrdersList/index.js +3 -3
- package/_modules/components/OrdersDashboardComponents/DriversList/index.js +3 -3
- package/_modules/components/OrdersDashboardComponents/ExportCSV/index.js +3 -3
- package/_modules/components/OrdersDashboardComponents/GiftCardsList/index.js +3 -3
- package/_modules/components/OrdersDashboardComponents/GoogleMapsApiKeySetting/index.js +3 -3
- package/_modules/components/OrdersDashboardComponents/LogisticInformation/index.js +3 -3
- package/_modules/components/OrdersDashboardComponents/Logistics/index.js +3 -3
- 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 +3 -3
- package/_modules/components/OrdersDashboardComponents/OrderNotification/index.js +1 -1
- package/_modules/components/OrdersDashboardComponents/OrdersFilter/index.js +2 -2
- package/_modules/components/OrdersDashboardComponents/OrdersManage/index.js +3 -3
- package/_modules/components/OrdersDashboardComponents/PointsWalletLevels/index.js +3 -3
- package/_modules/components/OrdersDashboardComponents/ReviewCustomer/index.js +3 -3
- package/_modules/components/OrdersDashboardComponents/Schedule/index.js +2 -2
- package/_modules/components/OrdersDashboardComponents/SettingsList/index.js +3 -3
- package/_modules/components/OrdersDashboardComponents/UserFormDetails/index.js +3 -3
- package/_modules/components/OrdersDashboardComponents/UsersList/index.js +3 -3
- package/_modules/components/OrdersDashboardComponents/WebsocketStatus/index.js +1 -1
- package/_modules/components/PageBanner/index.js +3 -3
- package/_modules/components/PaymentOptionPaypal/index.js +2 -2
- package/_modules/components/PaymentOptionSquare/index.js +2 -2
- package/_modules/components/PaymentOptionStripe/index.js +3 -3
- package/_modules/components/PaymentOptionStripeDirect/index.js +2 -2
- package/_modules/components/PaymentOptionStripeRedirect/StripeRedirectForm/index.js +1 -1
- package/_modules/components/PaymentOptionStripeRedirect/index.js +2 -2
- package/_modules/components/PaymentOptionWallet/index.js +3 -3
- package/_modules/components/PaymentOptions/index.js +3 -3
- package/_modules/components/PaymethodList/index.js +3 -3
- package/_modules/components/PhoneAutocomplete/index.js +3 -3
- package/_modules/components/PlaceSpot/index.js +3 -3
- package/_modules/components/Popup/index.js +1 -1
- package/_modules/components/ProductComponent/index.js +1 -1
- package/_modules/components/ProductForm/index.js +3 -3
- package/_modules/components/ProductOptionSuboption/index.js +1 -1
- package/_modules/components/ProductShare/index.js +1 -1
- package/_modules/components/ProductsList/index.js +1 -1
- package/_modules/components/ProductsListing/index.js +3 -3
- package/_modules/components/ProfessionalInfo/index.js +3 -3
- package/_modules/components/PromotionsController/index.js +3 -3
- package/_modules/components/QueryLoginSpoonity/index.js +3 -3
- package/_modules/components/ReCaptcha/index.js +1 -1
- package/_modules/components/ResetPassword/index.js +3 -3
- package/_modules/components/ReviewCustomer/index.js +3 -3
- package/_modules/components/ReviewDriver/index.js +3 -3
- package/_modules/components/ReviewProduct/index.js +3 -3
- package/_modules/components/SearchOptions/index.js +1 -1
- package/_modules/components/Sessions/index.js +3 -3
- package/_modules/components/SignupForm/index.js +48 -38
- package/_modules/components/SingleOrderCard/index.js +3 -3
- package/_modules/components/SingleProductCard/index.js +3 -3
- package/_modules/components/SingleProfessionalCard/index.js +3 -3
- package/_modules/components/SmartAppBanner/index.js +1 -1
- package/_modules/components/StoreProductList/index.js +3 -3
- package/_modules/components/StripeElementsForm/CardForm/index.js +3 -3
- package/_modules/components/StripeElementsForm/index.js +2 -2
- package/_modules/components/UpsellingPage/index.js +3 -3
- package/_modules/components/UserFormDetails/index.js +104 -20
- package/_modules/components/UserVerification/index.js +3 -3
- package/_modules/components/WalletList/index.js +3 -3
- package/_modules/components/WebsocketStatus/index.js +1 -1
- package/_modules/components/WrapperGoogleMaps/index.js +1 -1
- package/_modules/contexts/ApiContext/index.js +2 -2
- package/_modules/contexts/BillingContext/index.js +1 -1
- package/_modules/contexts/BusinessContext/index.js +3 -3
- package/_modules/contexts/ConfigContext/index.js +3 -3
- package/_modules/contexts/CustomerContext/index.js +3 -3
- package/_modules/contexts/EventContext/index.js +1 -1
- package/_modules/contexts/LanguageContext/index.js +3 -3
- package/_modules/contexts/OptimizationLoadContext/index.js +3 -3
- package/_modules/contexts/OrderContext/index.js +8 -4
- package/_modules/contexts/OrderingContext/index.js +1 -1
- package/_modules/contexts/OrderingThemeContext/index.js +3 -3
- package/_modules/contexts/ProductContext/index.js +2 -2
- package/_modules/contexts/SessionContext/index.js +3 -3
- package/_modules/contexts/SiteContext/index.js +3 -3
- package/_modules/contexts/ToastContext/index.js +1 -1
- package/_modules/contexts/UtilsContext/index.js +1 -1
- package/_modules/contexts/ValidationsFieldsContext/index.js +3 -3
- package/_modules/contexts/WebsocketContext/index.js +3 -3
- package/_modules/contexts/WebsocketContext/socket.js +2 -3
- package/_modules/native/src/NativeStrategy/index.js +3 -4
- package/_modules/native/src/contexts/OrderingContext/index.js +1 -1
- package/_modules/webStrategy/index.js +3 -4
- package/package.json +1 -1
- package/src/components/AddressForm/index.js +8 -2
- package/src/components/LoginForm/index.js +7 -4
- package/src/components/SignupForm/index.js +10 -2
- package/src/components/UserFormDetails/index.js +56 -4
- package/src/contexts/OrderContext/index.js +2 -0
- /package/_bundles/{0.ordering-component.db75d96df54e78518073.js → 0.ordering-component.fa62c57788358b5b80ae.js} +0 -0
- /package/_bundles/{1.ordering-component.db75d96df54e78518073.js → 1.ordering-component.fa62c57788358b5b80ae.js} +0 -0
- /package/_bundles/{2.ordering-component.db75d96df54e78518073.js → 2.ordering-component.fa62c57788358b5b80ae.js} +0 -0
- /package/_bundles/{4.ordering-component.db75d96df54e78518073.js → 4.ordering-component.fa62c57788358b5b80ae.js} +0 -0
- /package/_bundles/{5.ordering-component.db75d96df54e78518073.js → 5.ordering-component.fa62c57788358b5b80ae.js} +0 -0
- /package/_bundles/{6.ordering-component.db75d96df54e78518073.js → 6.ordering-component.fa62c57788358b5b80ae.js} +0 -0
- /package/_bundles/{7.ordering-component.db75d96df54e78518073.js.LICENSE.txt → 7.ordering-component.fa62c57788358b5b80ae.js.LICENSE.txt} +0 -0
- /package/_bundles/{8.ordering-component.db75d96df54e78518073.js → 8.ordering-component.fa62c57788358b5b80ae.js} +0 -0
- /package/_bundles/{ordering-component.db75d96df54e78518073.js.LICENSE.txt → ordering-component.fa62c57788358b5b80ae.js.LICENSE.txt} +0 -0
|
@@ -4,20 +4,20 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.WebStrategy = void 0;
|
|
7
|
-
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw
|
|
7
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
8
8
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
9
9
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
10
10
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
11
11
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
12
12
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
13
13
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
14
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i :
|
|
14
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
15
15
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
16
16
|
var WebStrategy = exports.WebStrategy = /*#__PURE__*/function () {
|
|
17
17
|
function WebStrategy() {
|
|
18
18
|
_classCallCheck(this, WebStrategy);
|
|
19
19
|
}
|
|
20
|
-
_createClass(WebStrategy, [{
|
|
20
|
+
return _createClass(WebStrategy, [{
|
|
21
21
|
key: "getItem",
|
|
22
22
|
value: function () {
|
|
23
23
|
var _getItem = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(storageKey, isJson) {
|
|
@@ -90,5 +90,4 @@ var WebStrategy = exports.WebStrategy = /*#__PURE__*/function () {
|
|
|
90
90
|
return removeItem;
|
|
91
91
|
}()
|
|
92
92
|
}]);
|
|
93
|
-
return WebStrategy;
|
|
94
93
|
}();
|
package/package.json
CHANGED
|
@@ -175,7 +175,9 @@ export const AddressForm = (props) => {
|
|
|
175
175
|
const conditions = []
|
|
176
176
|
const parameters = {
|
|
177
177
|
location: `${location?.lat},${location?.lng}`,
|
|
178
|
-
type:
|
|
178
|
+
type: 2,
|
|
179
|
+
page: 1,
|
|
180
|
+
page_size: 5
|
|
179
181
|
}
|
|
180
182
|
if (franchiseId) {
|
|
181
183
|
conditions.push({ attribute: 'franchise_id', value: franchiseId })
|
|
@@ -186,7 +188,11 @@ export const AddressForm = (props) => {
|
|
|
186
188
|
}
|
|
187
189
|
const source = {}
|
|
188
190
|
requestsState.businesses = source
|
|
189
|
-
const fetchEndpoint = ordering
|
|
191
|
+
const fetchEndpoint = ordering
|
|
192
|
+
.businesses()
|
|
193
|
+
.select(['delivery_zone', 'name', 'id', 'location', 'logo', 'slug', 'zones'])
|
|
194
|
+
.parameters(parameters)
|
|
195
|
+
.where(where)
|
|
190
196
|
const { content: { error, result } } = await fetchEndpoint.get({ cancelToken: source })
|
|
191
197
|
setBusinessesList({
|
|
192
198
|
...businessesList,
|
|
@@ -35,7 +35,7 @@ export const LoginForm = (props) => {
|
|
|
35
35
|
const [{ configs }] = useConfig()
|
|
36
36
|
const [reCaptchaValue, setReCaptchaValue] = useState({ code: '', version: '' })
|
|
37
37
|
const [isReCaptchaEnable, setIsReCaptchaEnable] = useState(false)
|
|
38
|
-
|
|
38
|
+
const [cellphoneStartZero, setCellphoneStartZero] = useState(null)
|
|
39
39
|
const useLoginByCellphone = configs?.phone_password_login_enabled?.value === '1'
|
|
40
40
|
const useLoginOtpEmail = configs?.opt_email_enabled?.value === '1'
|
|
41
41
|
const useLoginOtpCellphone = configs?.otp_cellphone_enabled?.value === '1'
|
|
@@ -106,8 +106,10 @@ export const LoginForm = (props) => {
|
|
|
106
106
|
if (_credentials?.cellphone?.includes('+')) {
|
|
107
107
|
const parsedNumber = parsePhoneNumber(_credentials.cellphone)
|
|
108
108
|
const cellphone = parsedNumber?.nationalNumber
|
|
109
|
-
|
|
110
109
|
_credentials.cellphone = cellphone
|
|
110
|
+
if (cellphoneStartZero) {
|
|
111
|
+
_credentials.cellphone = cellphoneStartZero
|
|
112
|
+
}
|
|
111
113
|
}
|
|
112
114
|
|
|
113
115
|
if (notificationState?.notification_token) {
|
|
@@ -232,7 +234,7 @@ export const LoginForm = (props) => {
|
|
|
232
234
|
'X-Socket-Id-X': socket?.getId()
|
|
233
235
|
},
|
|
234
236
|
body: JSON.stringify({
|
|
235
|
-
cellphone: values.cellphone,
|
|
237
|
+
cellphone: cellphoneStartZero || values.cellphone,
|
|
236
238
|
country_phone_code: `+${values.country_phone_code}`
|
|
237
239
|
})
|
|
238
240
|
})
|
|
@@ -314,7 +316,7 @@ export const LoginForm = (props) => {
|
|
|
314
316
|
size: 6
|
|
315
317
|
}
|
|
316
318
|
const email = values?.email || credentials?.email
|
|
317
|
-
const cellphone = values?.cellphone || credentials?.cellphone
|
|
319
|
+
const cellphone = cellphoneStartZero || values?.cellphone || credentials?.cellphone
|
|
318
320
|
const countryPhoneCode = values?.countryPhoneCode || values?.country_phone_code || credentials.country_phone_code
|
|
319
321
|
|
|
320
322
|
try {
|
|
@@ -430,6 +432,7 @@ export const LoginForm = (props) => {
|
|
|
430
432
|
useLoginOtpCellphone={useLoginOtpCellphone}
|
|
431
433
|
useLoginSpoonity={useLoginSpoonity}
|
|
432
434
|
handleLoginSpoonity={handleLoginSpoonity}
|
|
435
|
+
setCellphoneStartZero={setCellphoneStartZero}
|
|
433
436
|
/>
|
|
434
437
|
)}
|
|
435
438
|
</>
|
|
@@ -45,6 +45,7 @@ export const SignupForm = (props) => {
|
|
|
45
45
|
const [reCaptchaValue, setReCaptchaValue] = useState({ code: '', version: '' })
|
|
46
46
|
const [isReCaptchaEnable, setIsReCaptchaEnable] = useState(false)
|
|
47
47
|
const [promotionsEnabled, setPromotionsEnabled] = useState(false)
|
|
48
|
+
const [cellphoneStartZero, setCellphoneStartZero] = useState(null)
|
|
48
49
|
|
|
49
50
|
const useSignUpOtpEmail = configs?.email_otp_signup_enabled?.value === '1' && !isCustomerMode
|
|
50
51
|
const useSignUpOtpCellphone = configs?.phone_otp_signup_enabled?.value === '1' && !isCustomerMode
|
|
@@ -106,6 +107,10 @@ export const SignupForm = (props) => {
|
|
|
106
107
|
}
|
|
107
108
|
}
|
|
108
109
|
|
|
110
|
+
if (cellphoneStartZero) {
|
|
111
|
+
newData.cellphone = cellphoneStartZero
|
|
112
|
+
}
|
|
113
|
+
|
|
109
114
|
try {
|
|
110
115
|
setFormState({ ...formState, loading: true })
|
|
111
116
|
const source = {}
|
|
@@ -206,7 +211,7 @@ export const SignupForm = (props) => {
|
|
|
206
211
|
},
|
|
207
212
|
body: JSON.stringify({
|
|
208
213
|
...values,
|
|
209
|
-
cellphone: values.cellphone,
|
|
214
|
+
cellphone: cellphoneStartZero || values.cellphone,
|
|
210
215
|
country_phone_code: `+${values.country_phone_code}`
|
|
211
216
|
})
|
|
212
217
|
})
|
|
@@ -245,7 +250,7 @@ export const SignupForm = (props) => {
|
|
|
245
250
|
size: 6
|
|
246
251
|
}
|
|
247
252
|
const email = values?.email || signupData?.email
|
|
248
|
-
const cellphone = values?.cellphone || signupData?.cellphone
|
|
253
|
+
const cellphone = cellphoneStartZero || values?.cellphone || signupData?.cellphone
|
|
249
254
|
const countryPhoneCode = values?.country_phone_code || signupData.country_phone_code
|
|
250
255
|
|
|
251
256
|
setSignupData({
|
|
@@ -313,6 +318,7 @@ export const SignupForm = (props) => {
|
|
|
313
318
|
const body = {
|
|
314
319
|
...values
|
|
315
320
|
}
|
|
321
|
+
if (isGuest && user?.guest_id) body.guest_token = user?.guest_id
|
|
316
322
|
try {
|
|
317
323
|
setCheckPhoneCodeState({ ...checkPhoneCodeState, loading: true })
|
|
318
324
|
if (notificationState?.notification_token) {
|
|
@@ -372,6 +378,7 @@ export const SignupForm = (props) => {
|
|
|
372
378
|
_credentials.verification_code = reCaptchaValue
|
|
373
379
|
}
|
|
374
380
|
}
|
|
381
|
+
if (isGuest && user?.guest_id) _credentials.guest_token = user?.guest_id
|
|
375
382
|
|
|
376
383
|
try {
|
|
377
384
|
setCheckPhoneCodeState({ ...checkPhoneCodeState, loading: true, result: { error: false } })
|
|
@@ -466,6 +473,7 @@ export const SignupForm = (props) => {
|
|
|
466
473
|
setSignUpTab={setSignUpTab}
|
|
467
474
|
signUpTab={signUpTab}
|
|
468
475
|
setWillVerifyOtpState={setWillVerifyOtpState}
|
|
476
|
+
setCellphoneStartZero={setCellphoneStartZero}
|
|
469
477
|
willVerifyOtpState={willVerifyOtpState}
|
|
470
478
|
useSignUpFullDetails={useSignUpFullDetails}
|
|
471
479
|
useSignUpOtpEmail={useSignUpOtpEmail}
|
|
@@ -6,6 +6,7 @@ import { useCustomer } from '../../contexts/CustomerContext'
|
|
|
6
6
|
import { useValidationFields as useValidationsFieldsController } from '../../contexts/ValidationsFieldsContext'
|
|
7
7
|
import { useWebsocket } from '../../contexts/WebsocketContext'
|
|
8
8
|
import parsePhoneNumber from 'libphonenumber-js'
|
|
9
|
+
import { ToastType, useToast } from '../../contexts/ToastContext'
|
|
9
10
|
const CONDITIONAL_CODES = ['1787']
|
|
10
11
|
|
|
11
12
|
/**
|
|
@@ -27,7 +28,8 @@ export const UserFormDetails = (props) => {
|
|
|
27
28
|
onClose,
|
|
28
29
|
dontToggleEditMode,
|
|
29
30
|
isOrderTypeValidationField,
|
|
30
|
-
checkoutFields
|
|
31
|
+
checkoutFields,
|
|
32
|
+
setUserConfirmPhone
|
|
31
33
|
} = props
|
|
32
34
|
|
|
33
35
|
const [ordering] = useApi()
|
|
@@ -35,6 +37,7 @@ export const UserFormDetails = (props) => {
|
|
|
35
37
|
const [session, { changeUser }] = useSession()
|
|
36
38
|
const [customer, { setUserCustomer }] = useCustomer()
|
|
37
39
|
const [validationFields] = useValidationsFieldsController()
|
|
40
|
+
const [, { showToast }] = useToast()
|
|
38
41
|
const [isEdit, setIsEdit] = useState(!!props?.isEdit)
|
|
39
42
|
const [userState, setUserState] = useState({ loading: false, loadingDriver: false, result: { error: false } })
|
|
40
43
|
const [formState, setFormState] = useState({ loading: false, changes: {}, result: { error: false } })
|
|
@@ -42,6 +45,7 @@ export const UserFormDetails = (props) => {
|
|
|
42
45
|
const [singleNotifications, setSingleNotifications] = useState({ loading: false, changes: {}, result: { error: false } })
|
|
43
46
|
const [verifyPhoneState, setVerifyPhoneState] = useState({ loading: false, result: { error: false } })
|
|
44
47
|
const [removeAccountState, setAccountState] = useState({ loading: false, error: null, result: null })
|
|
48
|
+
const [cellphoneStartZero, setCellphoneStartZero] = useState(null)
|
|
45
49
|
|
|
46
50
|
const requestsState = {}
|
|
47
51
|
const accessToken = useDefualtSessionManager ? session.token : props.accessToken
|
|
@@ -124,7 +128,9 @@ export const UserFormDetails = (props) => {
|
|
|
124
128
|
_changes.country_phone_code = '1'
|
|
125
129
|
}
|
|
126
130
|
}
|
|
127
|
-
|
|
131
|
+
if (cellphoneStartZero) {
|
|
132
|
+
_changes.cellphone = cellphoneStartZero
|
|
133
|
+
}
|
|
128
134
|
formState.changes = _changes
|
|
129
135
|
|
|
130
136
|
if (isImage) {
|
|
@@ -166,7 +172,7 @@ export const UserFormDetails = (props) => {
|
|
|
166
172
|
...formState,
|
|
167
173
|
changes: response.content.error ? formState.changes : {},
|
|
168
174
|
result: response.content,
|
|
169
|
-
loading: false
|
|
175
|
+
loading: !!changes?.confirmDataLayout || false
|
|
170
176
|
})
|
|
171
177
|
}
|
|
172
178
|
|
|
@@ -195,6 +201,10 @@ export const UserFormDetails = (props) => {
|
|
|
195
201
|
handleSuccessUpdate(response.content.result)
|
|
196
202
|
}
|
|
197
203
|
|
|
204
|
+
if (changes?.confirmDataLayout) {
|
|
205
|
+
handleRequestCustomerAddress()
|
|
206
|
+
}
|
|
207
|
+
|
|
198
208
|
onClose && onClose()
|
|
199
209
|
|
|
200
210
|
if (!image && !dontToggleEditMode) {
|
|
@@ -339,7 +349,7 @@ export const UserFormDetails = (props) => {
|
|
|
339
349
|
*/
|
|
340
350
|
const sendVerifyPhoneCode = async (values) => {
|
|
341
351
|
const body = {
|
|
342
|
-
cellphone: values.cellphone,
|
|
352
|
+
cellphone: cellphoneStartZero || values.cellphone,
|
|
343
353
|
country_phone_code: parseInt(values.country_phone_code)
|
|
344
354
|
}
|
|
345
355
|
try {
|
|
@@ -490,6 +500,46 @@ export const UserFormDetails = (props) => {
|
|
|
490
500
|
}
|
|
491
501
|
}
|
|
492
502
|
|
|
503
|
+
const handleRequestCustomerAddress = async () => {
|
|
504
|
+
try {
|
|
505
|
+
setFormState({
|
|
506
|
+
...formState,
|
|
507
|
+
loading: true
|
|
508
|
+
})
|
|
509
|
+
const response = await fetch(`${ordering.root}/actions/run/custom`, {
|
|
510
|
+
method: 'POST',
|
|
511
|
+
headers: {
|
|
512
|
+
'Content-Type': 'application/json',
|
|
513
|
+
Authorization: `Bearer ${accessToken}`,
|
|
514
|
+
'X-App-X': ordering.appId,
|
|
515
|
+
'X-Socket-Id-X': socket?.getId()
|
|
516
|
+
},
|
|
517
|
+
body: JSON.stringify({
|
|
518
|
+
action: 'request_customer_address',
|
|
519
|
+
user_token_required: true,
|
|
520
|
+
user_id: props?.userData?.id || userState.result.result.id,
|
|
521
|
+
user_token_expiration_time: 10
|
|
522
|
+
})
|
|
523
|
+
})
|
|
524
|
+
const { result, error } = await response.json()
|
|
525
|
+
if (error) {
|
|
526
|
+
showToast(ToastType.Error, result, 5000)
|
|
527
|
+
setFormState({
|
|
528
|
+
...formState,
|
|
529
|
+
loading: false
|
|
530
|
+
})
|
|
531
|
+
return
|
|
532
|
+
}
|
|
533
|
+
setFormState({
|
|
534
|
+
...formState,
|
|
535
|
+
loading: false
|
|
536
|
+
})
|
|
537
|
+
setUserConfirmPhone && setUserConfirmPhone({ result, open: false })
|
|
538
|
+
} catch (err) {
|
|
539
|
+
showToast(ToastType.Error, err.message, 5000)
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
|
|
493
543
|
useEffect(() => {
|
|
494
544
|
updatePromotions(
|
|
495
545
|
singleNotifications?.loading ? singleNotifications?.changes : notificationsGroup?.changes,
|
|
@@ -550,6 +600,8 @@ export const UserFormDetails = (props) => {
|
|
|
550
600
|
handleChangePromotions={handleChangePromotions}
|
|
551
601
|
handleRemoveAccount={handleRemoveAccount}
|
|
552
602
|
handleChangeNotifications={handleChangeNotifications}
|
|
603
|
+
handleRequestCustomerAddress={handleRequestCustomerAddress}
|
|
604
|
+
setCellphoneStartZero={setCellphoneStartZero}
|
|
553
605
|
/>
|
|
554
606
|
)}
|
|
555
607
|
</>
|
|
@@ -885,6 +885,8 @@ export const OrderProvider = ({ Alert, children, strategy, isAlsea, isDisableToa
|
|
|
885
885
|
setState({ ...state, loading: false })
|
|
886
886
|
return !error
|
|
887
887
|
} catch (err) {
|
|
888
|
+
refreshOrderOptions()
|
|
889
|
+
setState({ ...state, loading: false })
|
|
888
890
|
return false
|
|
889
891
|
}
|
|
890
892
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|