ordering-components-external 13.0.37 → 13.0.39

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.
Files changed (173) hide show
  1. package/_bundles/{7.ordering-component.42e30ef3a2313ff758b5.js → 7.ordering-component.25ccab3d29565dfca44c.js} +1 -1
  2. package/_bundles/{ordering-component.42e30ef3a2313ff758b5.js → ordering-component.25ccab3d29565dfca44c.js} +2 -2
  3. package/_modules/components/AddressDetails/index.js +2 -2
  4. package/_modules/components/AddressForm/index.js +3 -3
  5. package/_modules/components/AddressList/index.js +3 -3
  6. package/_modules/components/Analitycs/index.js +1 -1
  7. package/_modules/components/AnalyticsSegment/index.js +2 -2
  8. package/_modules/components/AppleLogin/index.js +3 -3
  9. package/_modules/components/BusinessAndProductList/index.js +3 -3
  10. package/_modules/components/BusinessBasicInformation/index.js +3 -3
  11. package/_modules/components/BusinessController/index.js +3 -3
  12. package/_modules/components/BusinessInformation/index.js +1 -1
  13. package/_modules/components/BusinessList/index.js +3 -3
  14. package/_modules/components/BusinessMenuListing/index.js +3 -3
  15. package/_modules/components/BusinessReviews/index.js +3 -3
  16. package/_modules/components/BusinessSearchList/index.js +3 -3
  17. package/_modules/components/BusinessSortControl/index.js +1 -1
  18. package/_modules/components/BusinessTypeFilter/index.js +3 -3
  19. package/_modules/components/BusinessesMap/index.js +1 -1
  20. package/_modules/components/Cart/index.js +3 -3
  21. package/_modules/components/CartStoresListing/index.js +3 -3
  22. package/_modules/components/Checkout/index.js +3 -3
  23. package/_modules/components/CmsContent/index.js +3 -3
  24. package/_modules/components/Contacts/index.js +3 -3
  25. package/_modules/components/CouponControl/index.js +2 -2
  26. package/_modules/components/DragAndDrop/index.js +1 -1
  27. package/_modules/components/DriverList/index.js +3 -3
  28. package/_modules/components/DriverTips/index.js +1 -1
  29. package/_modules/components/Emitter/index.js +2 -3
  30. package/_modules/components/ExamineClick/index.js +1 -1
  31. package/_modules/components/FacebookLoginButton/index.js +3 -3
  32. package/_modules/components/FacebookPixel/index.js +1 -1
  33. package/_modules/components/FavoriteList/index.js +3 -3
  34. package/_modules/components/FirebaseGoogleLoginButton/index.js +3 -3
  35. package/_modules/components/ForgotPasswordForm/index.js +3 -3
  36. package/_modules/components/GiftCard/GiftCardOrdersList/index.js +3 -3
  37. package/_modules/components/GiftCard/PurchaseGiftCard/index.js +3 -3
  38. package/_modules/components/GiftCard/RedeemGiftCard/index.js +3 -3
  39. package/_modules/components/GiftCard/SendGiftCard/index.js +3 -3
  40. package/_modules/components/GoogleAutocompleteInput/index.js +2 -2
  41. package/_modules/components/GoogleIdentity/index.js +3 -3
  42. package/_modules/components/GoogleLoginButton/index.js +3 -3
  43. package/_modules/components/GoogleMaps/index.js +2 -2
  44. package/_modules/components/GpsButton/index.js +1 -1
  45. package/_modules/components/LanguageSelector/index.js +3 -3
  46. package/_modules/components/LoginForm/index.js +24 -16
  47. package/_modules/components/LogoutAction/index.js +3 -3
  48. package/_modules/components/MainSearch/index.js +3 -3
  49. package/_modules/components/MapView/index.js +2 -2
  50. package/_modules/components/MenuControl/index.js +2 -2
  51. package/_modules/components/Messages/index.js +3 -3
  52. package/_modules/components/MomentOption/index.js +1 -1
  53. package/_modules/components/MultiCartCreate/index.js +2 -2
  54. package/_modules/components/MultiCartsPaymethodsAndWallets/index.js +3 -3
  55. package/_modules/components/MultiCheckout/index.js +3 -3
  56. package/_modules/components/MultiOrdersDetails/index.js +3 -3
  57. package/_modules/components/MyOrders/index.js +3 -3
  58. package/_modules/components/MyOrdersList/index.js +2 -2
  59. package/_modules/components/OrderChange/index.js +3 -3
  60. package/_modules/components/OrderDetails/index.js +3 -3
  61. package/_modules/components/OrderList/index.js +3 -3
  62. package/_modules/components/OrderListGroups/index.js +3 -3
  63. package/_modules/components/OrderReview/index.js +3 -3
  64. package/_modules/components/OrderTypeControl/index.js +1 -1
  65. package/_modules/components/OrderVerticalList/index.js +3 -3
  66. package/_modules/components/OrdersControlFilters/index.js +3 -3
  67. package/_modules/components/OrdersDashboardComponents/Appointments/index.js +3 -3
  68. package/_modules/components/OrdersDashboardComponents/BusinessProductsListing/index.js +3 -3
  69. package/_modules/components/OrdersDashboardComponents/CheckPassword/index.js +3 -3
  70. package/_modules/components/OrdersDashboardComponents/CityList/index.js +3 -3
  71. package/_modules/components/OrdersDashboardComponents/CountryList/index.js +3 -3
  72. package/_modules/components/OrdersDashboardComponents/CustomOrderDetails/index.js +3 -3
  73. package/_modules/components/OrdersDashboardComponents/DashboardBusinessList/index.js +3 -3
  74. package/_modules/components/OrdersDashboardComponents/DashboardOrdersList/index.js +3 -3
  75. package/_modules/components/OrdersDashboardComponents/DriversList/index.js +3 -3
  76. package/_modules/components/OrdersDashboardComponents/ExportCSV/index.js +3 -3
  77. package/_modules/components/OrdersDashboardComponents/GiftCardsList/index.js +3 -3
  78. package/_modules/components/OrdersDashboardComponents/GoogleMapsApiKeySetting/index.js +3 -3
  79. package/_modules/components/OrdersDashboardComponents/LogisticInformation/index.js +3 -3
  80. package/_modules/components/OrdersDashboardComponents/Logistics/index.js +3 -3
  81. package/_modules/components/OrdersDashboardComponents/Messages/index.js +3 -3
  82. package/_modules/components/OrdersDashboardComponents/MetaFields/index.js +3 -3
  83. package/_modules/components/OrdersDashboardComponents/OrderDetails/index.js +3 -3
  84. package/_modules/components/OrdersDashboardComponents/OrderNotification/index.js +1 -1
  85. package/_modules/components/OrdersDashboardComponents/OrdersFilter/index.js +2 -2
  86. package/_modules/components/OrdersDashboardComponents/OrdersManage/index.js +3 -3
  87. package/_modules/components/OrdersDashboardComponents/PointsWalletLevels/index.js +3 -3
  88. package/_modules/components/OrdersDashboardComponents/ReviewCustomer/index.js +3 -3
  89. package/_modules/components/OrdersDashboardComponents/Schedule/index.js +2 -2
  90. package/_modules/components/OrdersDashboardComponents/SettingsList/index.js +3 -3
  91. package/_modules/components/OrdersDashboardComponents/UserFormDetails/index.js +3 -3
  92. package/_modules/components/OrdersDashboardComponents/UsersList/index.js +3 -3
  93. package/_modules/components/OrdersDashboardComponents/WebsocketStatus/index.js +1 -1
  94. package/_modules/components/PageBanner/index.js +3 -3
  95. package/_modules/components/PaymentOptionPaypal/index.js +2 -2
  96. package/_modules/components/PaymentOptionSquare/index.js +2 -2
  97. package/_modules/components/PaymentOptionStripe/index.js +3 -3
  98. package/_modules/components/PaymentOptionStripeDirect/index.js +2 -2
  99. package/_modules/components/PaymentOptionStripeRedirect/StripeRedirectForm/index.js +1 -1
  100. package/_modules/components/PaymentOptionStripeRedirect/index.js +2 -2
  101. package/_modules/components/PaymentOptionWallet/index.js +3 -3
  102. package/_modules/components/PaymentOptions/index.js +3 -3
  103. package/_modules/components/PaymethodList/index.js +3 -3
  104. package/_modules/components/PhoneAutocomplete/index.js +3 -3
  105. package/_modules/components/PlaceSpot/index.js +3 -3
  106. package/_modules/components/Popup/index.js +1 -1
  107. package/_modules/components/ProductComponent/index.js +1 -1
  108. package/_modules/components/ProductForm/index.js +35 -29
  109. package/_modules/components/ProductOptionSuboption/index.js +1 -1
  110. package/_modules/components/ProductShare/index.js +1 -1
  111. package/_modules/components/ProductsList/index.js +1 -1
  112. package/_modules/components/ProductsListing/index.js +3 -3
  113. package/_modules/components/ProfessionalInfo/index.js +3 -3
  114. package/_modules/components/PromotionsController/index.js +3 -3
  115. package/_modules/components/QueryLoginSpoonity/index.js +3 -3
  116. package/_modules/components/ReCaptcha/index.js +1 -1
  117. package/_modules/components/ResetPassword/index.js +3 -3
  118. package/_modules/components/ReviewCustomer/index.js +3 -3
  119. package/_modules/components/ReviewDriver/index.js +3 -3
  120. package/_modules/components/ReviewProduct/index.js +3 -3
  121. package/_modules/components/SearchOptions/index.js +1 -1
  122. package/_modules/components/Sessions/index.js +3 -3
  123. package/_modules/components/SignupForm/index.js +48 -38
  124. package/_modules/components/SingleOrderCard/index.js +3 -3
  125. package/_modules/components/SingleProductCard/index.js +3 -3
  126. package/_modules/components/SingleProfessionalCard/index.js +3 -3
  127. package/_modules/components/SmartAppBanner/index.js +1 -1
  128. package/_modules/components/StoreProductList/index.js +3 -3
  129. package/_modules/components/StripeElementsForm/CardForm/index.js +3 -3
  130. package/_modules/components/StripeElementsForm/index.js +2 -2
  131. package/_modules/components/UpsellingPage/index.js +3 -3
  132. package/_modules/components/UserFormDetails/index.js +104 -20
  133. package/_modules/components/UserVerification/index.js +3 -3
  134. package/_modules/components/WalletList/index.js +3 -3
  135. package/_modules/components/WebsocketStatus/index.js +1 -1
  136. package/_modules/components/WrapperGoogleMaps/index.js +1 -1
  137. package/_modules/contexts/ApiContext/index.js +2 -2
  138. package/_modules/contexts/BillingContext/index.js +1 -1
  139. package/_modules/contexts/BusinessContext/index.js +3 -3
  140. package/_modules/contexts/ConfigContext/index.js +3 -3
  141. package/_modules/contexts/CustomerContext/index.js +3 -3
  142. package/_modules/contexts/EventContext/index.js +1 -1
  143. package/_modules/contexts/LanguageContext/index.js +3 -3
  144. package/_modules/contexts/OptimizationLoadContext/index.js +3 -3
  145. package/_modules/contexts/OrderContext/index.js +8 -4
  146. package/_modules/contexts/OrderingContext/index.js +1 -1
  147. package/_modules/contexts/OrderingThemeContext/index.js +3 -3
  148. package/_modules/contexts/ProductContext/index.js +2 -2
  149. package/_modules/contexts/SessionContext/index.js +3 -3
  150. package/_modules/contexts/SiteContext/index.js +3 -3
  151. package/_modules/contexts/ToastContext/index.js +1 -1
  152. package/_modules/contexts/UtilsContext/index.js +1 -1
  153. package/_modules/contexts/ValidationsFieldsContext/index.js +3 -3
  154. package/_modules/contexts/WebsocketContext/index.js +3 -3
  155. package/_modules/contexts/WebsocketContext/socket.js +2 -3
  156. package/_modules/native/src/NativeStrategy/index.js +3 -4
  157. package/_modules/native/src/contexts/OrderingContext/index.js +1 -1
  158. package/_modules/webStrategy/index.js +3 -4
  159. package/package.json +1 -1
  160. package/src/components/LoginForm/index.js +7 -4
  161. package/src/components/ProductForm/index.js +11 -4
  162. package/src/components/SignupForm/index.js +10 -2
  163. package/src/components/UserFormDetails/index.js +56 -4
  164. package/src/contexts/OrderContext/index.js +2 -0
  165. /package/_bundles/{0.ordering-component.42e30ef3a2313ff758b5.js → 0.ordering-component.25ccab3d29565dfca44c.js} +0 -0
  166. /package/_bundles/{1.ordering-component.42e30ef3a2313ff758b5.js → 1.ordering-component.25ccab3d29565dfca44c.js} +0 -0
  167. /package/_bundles/{2.ordering-component.42e30ef3a2313ff758b5.js → 2.ordering-component.25ccab3d29565dfca44c.js} +0 -0
  168. /package/_bundles/{4.ordering-component.42e30ef3a2313ff758b5.js → 4.ordering-component.25ccab3d29565dfca44c.js} +0 -0
  169. /package/_bundles/{5.ordering-component.42e30ef3a2313ff758b5.js → 5.ordering-component.25ccab3d29565dfca44c.js} +0 -0
  170. /package/_bundles/{6.ordering-component.42e30ef3a2313ff758b5.js → 6.ordering-component.25ccab3d29565dfca44c.js} +0 -0
  171. /package/_bundles/{7.ordering-component.42e30ef3a2313ff758b5.js.LICENSE.txt → 7.ordering-component.25ccab3d29565dfca44c.js.LICENSE.txt} +0 -0
  172. /package/_bundles/{8.ordering-component.42e30ef3a2313ff758b5.js → 8.ordering-component.25ccab3d29565dfca44c.js} +0 -0
  173. /package/_bundles/{ordering-component.42e30ef3a2313ff758b5.js.LICENSE.txt → ordering-component.25ccab3d29565dfca44c.js.LICENSE.txt} +0 -0
@@ -6,20 +6,20 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.NativeStrategy = void 0;
7
7
  var _asyncStorage = _interopRequireDefault(require("@react-native-async-storage/async-storage"));
8
8
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
9
- 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 new 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 new 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 new 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; }
9
+ 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; }
10
10
  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); }
11
11
  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); } }
12
12
  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); }); }; }
13
13
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
14
14
  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); } }
15
15
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
16
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
16
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
17
17
  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); }
18
18
  var NativeStrategy = exports.NativeStrategy = /*#__PURE__*/function () {
19
19
  function NativeStrategy() {
20
20
  _classCallCheck(this, NativeStrategy);
21
21
  }
22
- _createClass(NativeStrategy, [{
22
+ return _createClass(NativeStrategy, [{
23
23
  key: "getItem",
24
24
  value: function () {
25
25
  var _getItem = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(storageKey, isJson) {
@@ -95,5 +95,4 @@ var NativeStrategy = exports.NativeStrategy = /*#__PURE__*/function () {
95
95
  return removeItem;
96
96
  }()
97
97
  }]);
98
- return NativeStrategy;
99
98
  }();
@@ -23,7 +23,7 @@ var _OrderingThemeContext = require("../../../../src/contexts/OrderingThemeConte
23
23
  var _NativeStrategy = require("../../NativeStrategy");
24
24
  var _SiteContext = require("../../../../src/contexts/SiteContext");
25
25
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
26
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
26
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
27
27
  /**
28
28
  * Create OrderingContext
29
29
  * Wrapper to use all context to ordering apps
@@ -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 new 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 new 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 new 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; }
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 : String(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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ordering-components-external",
3
- "version": "13.0.37",
3
+ "version": "13.0.39",
4
4
  "description": "Ordering Internal Dashboard",
5
5
  "main": "./_modules/index.js",
6
6
  "scripts": {
@@ -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
  </>
@@ -577,7 +577,10 @@ export const ProductForm = (props) => {
577
577
  handleCustomSave && handleCustomSave()
578
578
  }
579
579
  const errors = checkErrors()
580
- if (Object.keys(errors).length === 0 || isService) {
580
+ const isMultiProduct = JSON.parse(product?.product?.meta || '{}')?.external_type === 'coupon'
581
+ const hasAlreadyCoupon = cart?.metafields?.find?.(meta => meta?.key === 'pulse_coupons')?.value && isMultiProduct
582
+
583
+ if ((Object.keys(errors).length === 0 || isService) && !hasAlreadyCoupon) {
581
584
  let successful = true
582
585
  if (useOrderContext) {
583
586
  successful = false
@@ -590,7 +593,6 @@ export const ProductForm = (props) => {
590
593
  service_start: values?.serviceTime ?? orderState.options?.moment
591
594
  }
592
595
  onSave(productCart, !props.productCart?.code)
593
- const isMultiProduct = JSON.parse(product?.product?.meta || '{}')?.external_type === 'coupon'
594
596
  if (!props.productCart?.code) {
595
597
  successful =
596
598
  isMultiProduct
@@ -623,12 +625,17 @@ export const ProductForm = (props) => {
623
625
  )
624
626
  }
625
627
  }
628
+ if (hasAlreadyCoupon) {
629
+ showToast(
630
+ ToastType.Error,
631
+ t('COUPON_ALREADY_ADDED', 'You have a coupon already added')
632
+ )
633
+ }
626
634
  setProductLoading && setProductLoading(false)
627
635
  } catch (err) {
628
636
  showToast(
629
637
  ToastType.Error,
630
- !props.productCart?.code ? t('FAILED_TO_ADD_PRODUCT', 'Failed to add product') : t('FAILED_TO_UPDATE_PRODUCT', 'Failed to update product'),
631
- 5000
638
+ !props.productCart?.code ? t('FAILED_TO_ADD_PRODUCT', 'Failed to add product') : t('FAILED_TO_UPDATE_PRODUCT', 'Failed to update product')
632
639
  )
633
640
  setProductLoading && setProductLoading(false)
634
641
  }
@@ -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
  }