ordering-components-external 13.2.29 → 13.2.31
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.41b1c22d8f0b5973d4ce.js → 7.ordering-component.5e6b244837705c07824f.js} +1 -1
- package/_bundles/ordering-component.5e6b244837705c07824f.js +2 -0
- package/_modules/components/AddressDetails/index.js +1 -1
- package/_modules/components/AddressForm/index.js +1 -1
- package/_modules/components/AddressList/index.js +1 -1
- package/_modules/components/AnalyticsSegment/index.js +1 -1
- package/_modules/components/AppleLogin/index.js +1 -1
- package/_modules/components/BusinessAndProductList/index.js +29 -31
- package/_modules/components/BusinessBasicInformation/index.js +1 -1
- package/_modules/components/BusinessController/index.js +1 -1
- package/_modules/components/BusinessList/index.js +1 -1
- package/_modules/components/BusinessMenuListing/index.js +1 -1
- package/_modules/components/BusinessReviews/index.js +1 -1
- package/_modules/components/BusinessSearchList/index.js +1 -1
- package/_modules/components/BusinessTypeFilter/index.js +1 -1
- package/_modules/components/Cart/index.js +1 -1
- package/_modules/components/CartStoresListing/index.js +1 -1
- package/_modules/components/Checkout/index.js +1 -1
- package/_modules/components/CmsContent/index.js +1 -1
- package/_modules/components/Contacts/index.js +1 -1
- package/_modules/components/DriverList/index.js +1 -1
- package/_modules/components/FacebookLoginButton/index.js +1 -1
- package/_modules/components/FavoriteList/index.js +1 -1
- package/_modules/components/FirebaseGoogleLoginButton/index.js +1 -1
- package/_modules/components/ForgotPasswordForm/index.js +1 -1
- package/_modules/components/GiftCard/GiftCardOrdersList/index.js +1 -1
- package/_modules/components/GiftCard/PurchaseGiftCard/index.js +1 -1
- package/_modules/components/GiftCard/RedeemGiftCard/index.js +1 -1
- package/_modules/components/GiftCard/SendGiftCard/index.js +1 -1
- package/_modules/components/GoogleIdentity/index.js +1 -1
- package/_modules/components/GoogleLoginButton/index.js +1 -1
- package/_modules/components/LanguageSelector/index.js +1 -1
- package/_modules/components/LoginForm/index.js +10 -8
- package/_modules/components/LogoutAction/index.js +1 -1
- package/_modules/components/MainSearch/index.js +1 -1
- package/_modules/components/MapView/index.js +1 -1
- package/_modules/components/Messages/index.js +1 -1
- package/_modules/components/MultiCartCreate/index.js +1 -1
- package/_modules/components/MultiCartsPaymethodsAndWallets/index.js +1 -1
- package/_modules/components/MultiCheckout/index.js +1 -1
- package/_modules/components/MultiOrdersDetails/index.js +1 -1
- package/_modules/components/MyOrders/index.js +1 -1
- package/_modules/components/MyOrdersList/index.js +1 -1
- package/_modules/components/OrderChange/index.js +1 -1
- package/_modules/components/OrderDetails/index.js +1 -1
- package/_modules/components/OrderList/index.js +1 -1
- package/_modules/components/OrderListGroups/index.js +1 -1
- package/_modules/components/OrderReview/index.js +1 -1
- package/_modules/components/OrderVerticalList/index.js +1 -1
- package/_modules/components/OrdersControlFilters/index.js +1 -1
- package/_modules/components/OrdersDashboardComponents/Appointments/index.js +1 -1
- package/_modules/components/OrdersDashboardComponents/BusinessProductsListing/index.js +1 -1
- package/_modules/components/OrdersDashboardComponents/CheckPassword/index.js +1 -1
- package/_modules/components/OrdersDashboardComponents/CityList/index.js +1 -1
- package/_modules/components/OrdersDashboardComponents/CountryList/index.js +1 -1
- package/_modules/components/OrdersDashboardComponents/CustomOrderDetails/index.js +1 -1
- package/_modules/components/OrdersDashboardComponents/DashboardBusinessList/index.js +1 -1
- package/_modules/components/OrdersDashboardComponents/DashboardOrdersList/index.js +1 -1
- package/_modules/components/OrdersDashboardComponents/DriversList/index.js +1 -1
- package/_modules/components/OrdersDashboardComponents/ExportCSV/index.js +1 -1
- package/_modules/components/OrdersDashboardComponents/GiftCardsList/index.js +1 -1
- package/_modules/components/OrdersDashboardComponents/GoogleMapsApiKeySetting/index.js +1 -1
- package/_modules/components/OrdersDashboardComponents/LogisticInformation/index.js +1 -1
- package/_modules/components/OrdersDashboardComponents/Logistics/index.js +1 -1
- package/_modules/components/OrdersDashboardComponents/Messages/index.js +1 -1
- package/_modules/components/OrdersDashboardComponents/MetaFields/index.js +1 -1
- package/_modules/components/OrdersDashboardComponents/OrderDetails/index.js +1 -1
- package/_modules/components/OrdersDashboardComponents/OrdersManage/index.js +1 -1
- package/_modules/components/OrdersDashboardComponents/PointsWalletLevels/index.js +1 -1
- package/_modules/components/OrdersDashboardComponents/ReviewCustomer/index.js +1 -1
- package/_modules/components/OrdersDashboardComponents/SettingsList/index.js +1 -1
- package/_modules/components/OrdersDashboardComponents/UserFormDetails/index.js +1 -1
- package/_modules/components/OrdersDashboardComponents/UsersList/index.js +1 -1
- package/_modules/components/PageBanner/index.js +1 -1
- package/_modules/components/PaymentOptionPaypal/index.js +1 -1
- package/_modules/components/PaymentOptionSquare/index.js +1 -1
- package/_modules/components/PaymentOptionStripe/index.js +1 -1
- package/_modules/components/PaymentOptionStripeDirect/index.js +1 -1
- package/_modules/components/PaymentOptionStripeLink/index.js +1 -1
- package/_modules/components/PaymentOptionStripeRedirect/StripeRedirectForm/index.js +1 -1
- package/_modules/components/PaymentOptionStripeRedirect/index.js +1 -1
- package/_modules/components/PaymentOptionWallet/index.js +1 -1
- package/_modules/components/PaymentOptions/index.js +1 -1
- package/_modules/components/PaymethodList/index.js +1 -1
- package/_modules/components/PhoneAutocomplete/index.js +1 -1
- package/_modules/components/PlaceSpot/index.js +1 -1
- package/_modules/components/ProductForm/index.js +1 -1
- package/_modules/components/ProductsListing/index.js +1 -1
- package/_modules/components/ProfessionalInfo/index.js +1 -1
- package/_modules/components/PromotionsController/index.js +1 -1
- package/_modules/components/QueryLoginSpoonity/index.js +1 -1
- package/_modules/components/ResetPassword/index.js +1 -1
- package/_modules/components/ReviewCustomer/index.js +1 -1
- package/_modules/components/ReviewDriver/index.js +1 -1
- package/_modules/components/ReviewProduct/index.js +1 -1
- package/_modules/components/Sessions/index.js +1 -1
- package/_modules/components/SignupForm/index.js +10 -8
- package/_modules/components/SingleOrderCard/index.js +1 -1
- package/_modules/components/SingleProductCard/index.js +1 -1
- package/_modules/components/SingleProfessionalCard/index.js +1 -1
- package/_modules/components/StoreProductList/index.js +1 -1
- package/_modules/components/StripeElementsForm/CardForm/index.js +1 -1
- package/_modules/components/StripeElementsForm/index.js +1 -1
- package/_modules/components/UpsellingPage/index.js +1 -1
- package/_modules/components/UserFormDetails/index.js +1 -1
- package/_modules/components/UserVerification/index.js +1 -1
- package/_modules/components/WalletList/index.js +1 -1
- package/_modules/contexts/BusinessContext/index.js +1 -1
- package/_modules/contexts/ConfigContext/index.js +1 -1
- package/_modules/contexts/CustomerContext/index.js +1 -1
- package/_modules/contexts/LanguageContext/index.js +1 -1
- package/_modules/contexts/OptimizationLoadContext/index.js +1 -1
- package/_modules/contexts/OrderContext/index.js +1 -1
- package/_modules/contexts/OrderingThemeContext/index.js +1 -1
- package/_modules/contexts/SessionContext/index.js +1 -1
- package/_modules/contexts/SiteContext/index.js +1 -1
- package/_modules/contexts/UtilsContext/index.js +17 -27
- package/_modules/contexts/ValidationsFieldsContext/index.js +1 -1
- package/_modules/contexts/WebsocketContext/index.js +1 -1
- package/_modules/native/src/NativeStrategy/index.js +1 -1
- package/_modules/webStrategy/index.js +1 -1
- package/package.json +1 -1
- package/src/components/LoginForm/index.js +9 -5
- package/src/components/SignupForm/index.js +5 -3
- package/src/contexts/UtilsContext/index.js +3 -12
- package/_bundles/ordering-component.41b1c22d8f0b5973d4ce.js +0 -2
- /package/_bundles/{0.ordering-component.41b1c22d8f0b5973d4ce.js → 0.ordering-component.5e6b244837705c07824f.js} +0 -0
- /package/_bundles/{1.ordering-component.41b1c22d8f0b5973d4ce.js → 1.ordering-component.5e6b244837705c07824f.js} +0 -0
- /package/_bundles/{2.ordering-component.41b1c22d8f0b5973d4ce.js → 2.ordering-component.5e6b244837705c07824f.js} +0 -0
- /package/_bundles/{4.ordering-component.41b1c22d8f0b5973d4ce.js → 4.ordering-component.5e6b244837705c07824f.js} +0 -0
- /package/_bundles/{5.ordering-component.41b1c22d8f0b5973d4ce.js → 5.ordering-component.5e6b244837705c07824f.js} +0 -0
- /package/_bundles/{6.ordering-component.41b1c22d8f0b5973d4ce.js → 6.ordering-component.5e6b244837705c07824f.js} +0 -0
- /package/_bundles/{7.ordering-component.41b1c22d8f0b5973d4ce.js.LICENSE.txt → 7.ordering-component.5e6b244837705c07824f.js.LICENSE.txt} +0 -0
- /package/_bundles/{8.ordering-component.41b1c22d8f0b5973d4ce.js → 8.ordering-component.5e6b244837705c07824f.js} +0 -0
- /package/_bundles/{ordering-component.41b1c22d8f0b5973d4ce.js.LICENSE.txt → ordering-component.5e6b244837705c07824f.js.LICENSE.txt} +0 -0
|
@@ -97,15 +97,14 @@ var UtilsProviders = exports.UtilsProviders = function UtilsProviders(_ref) {
|
|
|
97
97
|
_dayjs.default.updateLocale('auto', localeObject);
|
|
98
98
|
};
|
|
99
99
|
var parsePrice = function parsePrice(value) {
|
|
100
|
-
var _configState$configs$, _configState$configs$2, _configState$configs$3, _configState$configs$4, _configState$configs$5,
|
|
100
|
+
var _configState$configs$, _configState$configs$2, _configState$configs$3, _configState$configs$4, _configState$configs$5, _formatNumber$currenc;
|
|
101
101
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
102
102
|
var formatNumber = {
|
|
103
103
|
decimal: (options === null || options === void 0 ? void 0 : options.decimal) || ((_configState$configs$ = configState.configs.format_number_decimal_length) === null || _configState$configs$ === void 0 ? void 0 : _configState$configs$.value) || 2,
|
|
104
104
|
separator: (options === null || options === void 0 ? void 0 : options.separator) || ((_configState$configs$2 = configState.configs.format_number_decimal_separator) === null || _configState$configs$2 === void 0 ? void 0 : _configState$configs$2.value) || ',',
|
|
105
105
|
thousand: (options === null || options === void 0 ? void 0 : options.thousand) || ((_configState$configs$3 = configState.configs.format_number_thousand_separator) === null || _configState$configs$3 === void 0 ? void 0 : _configState$configs$3.value) || '.',
|
|
106
106
|
currency: (options === null || options === void 0 ? void 0 : options.currency) || ((_configState$configs$4 = configState.configs.format_number_currency) === null || _configState$configs$4 === void 0 ? void 0 : _configState$configs$4.value) || '$',
|
|
107
|
-
currencyPosition: (options === null || options === void 0 ? void 0 : options.currencyPosition) || ((_configState$configs$5 = configState.configs.currency_position) === null || _configState$configs$5 === void 0 ? void 0 : _configState$configs$5.value) || 'left'
|
|
108
|
-
isTruncable: (options === null || options === void 0 ? void 0 : options.isTruncable) || ((_configState$configs$6 = configState.configs.format_number_thousand_separator) === null || _configState$configs$6 === void 0 ? void 0 : _configState$configs$6.value) === '.' && ((_configState$configs$7 = configState.configs.format_number_decimal_separator) === null || _configState$configs$7 === void 0 ? void 0 : _configState$configs$7.value) === ','
|
|
107
|
+
currencyPosition: (options === null || options === void 0 ? void 0 : options.currencyPosition) || ((_configState$configs$5 = configState.configs.currency_position) === null || _configState$configs$5 === void 0 ? void 0 : _configState$configs$5.value) || 'left'
|
|
109
108
|
};
|
|
110
109
|
var number = parseNumber(value, formatNumber);
|
|
111
110
|
if (((_formatNumber$currenc = formatNumber.currencyPosition) === null || _formatNumber$currenc === void 0 ? void 0 : _formatNumber$currenc.toLowerCase()) === 'left') {
|
|
@@ -116,25 +115,15 @@ var UtilsProviders = exports.UtilsProviders = function UtilsProviders(_ref) {
|
|
|
116
115
|
return number;
|
|
117
116
|
};
|
|
118
117
|
var parseNumber = function parseNumber(value) {
|
|
119
|
-
var _configState$configs$
|
|
118
|
+
var _configState$configs$6, _configState$configs$7, _configState$configs$8;
|
|
120
119
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
121
120
|
value = parseFloat(value) || 0;
|
|
122
121
|
var formatNumber = {
|
|
123
|
-
decimal: (options === null || options === void 0 ? void 0 : options.decimal) || ((_configState$configs$
|
|
124
|
-
separator: (options === null || options === void 0 ? void 0 : options.separator) || ((_configState$configs$
|
|
125
|
-
thousand: (options === null || options === void 0 ? void 0 : options.thousand) || ((_configState$configs$
|
|
122
|
+
decimal: (options === null || options === void 0 ? void 0 : options.decimal) || ((_configState$configs$6 = configState.configs.format_number_decimal_length) === null || _configState$configs$6 === void 0 ? void 0 : _configState$configs$6.value) || 2,
|
|
123
|
+
separator: (options === null || options === void 0 ? void 0 : options.separator) || ((_configState$configs$7 = configState.configs.format_number_decimal_separator) === null || _configState$configs$7 === void 0 ? void 0 : _configState$configs$7.value) || ',',
|
|
124
|
+
thousand: (options === null || options === void 0 ? void 0 : options.thousand) || ((_configState$configs$8 = configState.configs.format_number_thousand_separator) === null || _configState$configs$8 === void 0 ? void 0 : _configState$configs$8.value) || '.'
|
|
126
125
|
};
|
|
127
|
-
var number = value;
|
|
128
|
-
if (options !== null && options !== void 0 && options.isTruncable) {
|
|
129
|
-
var _numberParts$;
|
|
130
|
-
number = number.toString();
|
|
131
|
-
var _numberParts = number.split(formatNumber.separator);
|
|
132
|
-
var decimalPart = (_numberParts$ = _numberParts[1]) !== null && _numberParts$ !== void 0 ? _numberParts$ : '';
|
|
133
|
-
decimalPart = decimalPart.padEnd(formatNumber.decimal, '0').substring(0, formatNumber.decimal);
|
|
134
|
-
number = _numberParts[0] + '.' + decimalPart;
|
|
135
|
-
} else {
|
|
136
|
-
number = value.toFixed(formatNumber.decimal);
|
|
137
|
-
}
|
|
126
|
+
var number = value.toFixed(formatNumber.decimal);
|
|
138
127
|
number = number.toString();
|
|
139
128
|
if (number.indexOf('.')) {
|
|
140
129
|
number = number.replace('.', formatNumber.separator);
|
|
@@ -142,14 +131,15 @@ var UtilsProviders = exports.UtilsProviders = function UtilsProviders(_ref) {
|
|
|
142
131
|
number = number.replace(',', formatNumber.separator);
|
|
143
132
|
}
|
|
144
133
|
var numberParts = number.split(formatNumber.separator);
|
|
134
|
+
if (formatNumber.thousand === 'space') formatNumber.thousand = ' ';
|
|
145
135
|
numberParts[0] = numberParts[0].replace(/(.)(?=(\d{3})+$)/g, '$1' + formatNumber.thousand);
|
|
146
136
|
number = numberParts.join(formatNumber.separator);
|
|
147
137
|
return number;
|
|
148
138
|
};
|
|
149
139
|
var parseDate = function parseDate(date) {
|
|
150
|
-
var _configState$configs$
|
|
140
|
+
var _configState$configs$9, _configState$configs;
|
|
151
141
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
152
|
-
var formatTime = (options === null || options === void 0 ? void 0 : options.formatTime) || ((_configState$configs$
|
|
142
|
+
var formatTime = (options === null || options === void 0 ? void 0 : options.formatTime) || ((_configState$configs$9 = configState.configs.format_time) === null || _configState$configs$9 === void 0 ? void 0 : _configState$configs$9.value) || '24';
|
|
153
143
|
var formatDate = {
|
|
154
144
|
inputFormat: (options === null || options === void 0 ? void 0 : options.inputFormat) || ['YYYY-MM-DD HH:mm:ss', 'YYYY-MM-DD hh:mm:ss A', 'YYYY-MM-DD hh:mm:ss'],
|
|
155
145
|
outputFormat: (options === null || options === void 0 ? void 0 : options.outputFormat) || ((_configState$configs = configState.configs) === null || _configState$configs === void 0 || (_configState$configs = _configState$configs.dates_general_format) === null || _configState$configs === void 0 ? void 0 : _configState$configs.value) || (formatTime === '24' ? 'YYYY-MM-DD HH:mm:ss' : 'YYYY-MM-DD hh:mm:ss A'),
|
|
@@ -162,10 +152,10 @@ var UtilsProviders = exports.UtilsProviders = function UtilsProviders(_ref) {
|
|
|
162
152
|
return _date.format(formatDate.outputFormat);
|
|
163
153
|
};
|
|
164
154
|
var parseTime = function parseTime(time) {
|
|
165
|
-
var _configState$configs$
|
|
155
|
+
var _configState$configs$0;
|
|
166
156
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
167
157
|
if (!time) return '00:00';
|
|
168
|
-
var _formatTime = (options === null || options === void 0 ? void 0 : options.formatTime) || ((_configState$configs$
|
|
158
|
+
var _formatTime = (options === null || options === void 0 ? void 0 : options.formatTime) || ((_configState$configs$0 = configState.configs.format_time) === null || _configState$configs$0 === void 0 ? void 0 : _configState$configs$0.value) || '24';
|
|
169
159
|
var formatTime = {
|
|
170
160
|
inputFormat: (options === null || options === void 0 ? void 0 : options.inputFormat) || ['HH:mm', 'hh:mm A', 'hh:mm'],
|
|
171
161
|
outputFormat: (options === null || options === void 0 ? void 0 : options.outputFormat) || (_formatTime === '24' ? 'HH:mm' : 'hh:mm A'),
|
|
@@ -190,16 +180,16 @@ var UtilsProviders = exports.UtilsProviders = function UtilsProviders(_ref) {
|
|
|
190
180
|
}
|
|
191
181
|
};
|
|
192
182
|
var parseDistance = function parseDistance(distance) {
|
|
193
|
-
var _configState$configs$
|
|
183
|
+
var _configState$configs$1, _configState$configs$10;
|
|
194
184
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
195
185
|
distance = parseFloat(distance) || 0;
|
|
196
186
|
var unit = (options === null || options === void 0 ? void 0 : options.unit) || 'KM';
|
|
197
|
-
if (((_configState$configs$
|
|
187
|
+
if (((_configState$configs$1 = configState.configs.distance_unit_km) === null || _configState$configs$1 === void 0 ? void 0 : _configState$configs$1.value) === '1') {
|
|
198
188
|
unit = 'KM';
|
|
199
189
|
}
|
|
200
|
-
if ((_configState$configs$
|
|
201
|
-
var _configState$configs$
|
|
202
|
-
unit = (_configState$configs$
|
|
190
|
+
if ((_configState$configs$10 = configState.configs.distance_unit) !== null && _configState$configs$10 !== void 0 && _configState$configs$10.value) {
|
|
191
|
+
var _configState$configs$11;
|
|
192
|
+
unit = (_configState$configs$11 = configState.configs.distance_unit) === null || _configState$configs$11 === void 0 ? void 0 : _configState$configs$11.value;
|
|
203
193
|
}
|
|
204
194
|
if (unit.toUpperCase() === 'MI') {
|
|
205
195
|
var dist = distance * 0.621371;
|
|
@@ -10,7 +10,7 @@ var _OptimizationLoadContext = require("../OptimizationLoadContext");
|
|
|
10
10
|
var _ApiContext = require("../ApiContext");
|
|
11
11
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t2 in e) "default" !== _t2 && {}.hasOwnProperty.call(e, _t2) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t2)) && (i.get || i.set) ? o(f, _t2, i) : f[_t2] = e[_t2]); return f; })(e, t); }
|
|
12
12
|
function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i.return) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
|
|
13
|
-
function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) {
|
|
13
|
+
function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, _regeneratorDefine2(e, r, n, t); }
|
|
14
14
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
15
15
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
16
16
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
@@ -10,7 +10,7 @@ var _SessionContext = require("../SessionContext");
|
|
|
10
10
|
var _socket2 = require("./socket");
|
|
11
11
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
12
12
|
function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i.return) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
|
|
13
|
-
function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) {
|
|
13
|
+
function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, _regeneratorDefine2(e, r, n, t); }
|
|
14
14
|
function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
|
|
15
15
|
function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
|
|
16
16
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
@@ -7,7 +7,7 @@ exports.NativeStrategy = void 0;
|
|
|
7
7
|
var _asyncStorage = _interopRequireDefault(require("@react-native-async-storage/async-storage"));
|
|
8
8
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
9
|
function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i.return) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
|
|
10
|
-
function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) {
|
|
10
|
+
function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, _regeneratorDefine2(e, r, n, t); }
|
|
11
11
|
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); }
|
|
12
12
|
function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
|
|
13
13
|
function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.WebStrategy = void 0;
|
|
7
7
|
function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i.return) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
|
|
8
|
-
function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) {
|
|
8
|
+
function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, _regeneratorDefine2(e, r, n, t); }
|
|
9
9
|
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); }
|
|
10
10
|
function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
|
|
11
11
|
function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
|
package/package.json
CHANGED
|
@@ -39,10 +39,11 @@ export const LoginForm = (props) => {
|
|
|
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'
|
|
42
|
-
const
|
|
42
|
+
const useLoginOtpWhatsapp = configs?.whatsapp_otp_login_enabled?.value === '1'
|
|
43
|
+
const useLoginByEmail = (useLoginByCellphone || useLoginOtpEmail || useLoginOtpCellphone || useLoginOtpWhatsapp)
|
|
43
44
|
? configs?.email_password_login_enabled?.value === '1' : true
|
|
44
45
|
const useLoginSpoonity = configs?.spoonity_enabled?.value === '1'
|
|
45
|
-
const useLoginOtp = useLoginOtpEmail || useLoginOtpCellphone
|
|
46
|
+
const useLoginOtp = useLoginOtpEmail || useLoginOtpCellphone || useLoginOtpWhatsapp
|
|
46
47
|
const isDeviceLoginEnabled = configs?.device_code_login_enabled?.value === '1'
|
|
47
48
|
|
|
48
49
|
defaultLoginTab = useLoginByEmail ? 'email' : useLoginByCellphone ? 'cellphone' : 'otp'
|
|
@@ -76,7 +77,9 @@ export const LoginForm = (props) => {
|
|
|
76
77
|
if (otpType === 'cellphone') {
|
|
77
78
|
_credentials = {
|
|
78
79
|
..._credentials,
|
|
79
|
-
country_phone_code:
|
|
80
|
+
country_phone_code:
|
|
81
|
+
(values && values?.country_phone_code) ||
|
|
82
|
+
credentials?.country_phone_code
|
|
80
83
|
}
|
|
81
84
|
}
|
|
82
85
|
} else {
|
|
@@ -312,10 +315,10 @@ export const LoginForm = (props) => {
|
|
|
312
315
|
}
|
|
313
316
|
}
|
|
314
317
|
|
|
315
|
-
const generateOtpCode = async (values) => {
|
|
318
|
+
const generateOtpCode = async (values, channel) => {
|
|
316
319
|
const body = {
|
|
317
320
|
type: 4,
|
|
318
|
-
channel: otpType === 'email' ? 1 : 2,
|
|
321
|
+
channel: otpType === 'email' ? 1 : (channel || 2),
|
|
319
322
|
size: 6
|
|
320
323
|
}
|
|
321
324
|
const email = values?.email || credentials?.email
|
|
@@ -433,6 +436,7 @@ export const LoginForm = (props) => {
|
|
|
433
436
|
useLoginByCellphone={useLoginByCellphone}
|
|
434
437
|
useLoginOtpEmail={useLoginOtpEmail}
|
|
435
438
|
useLoginOtpCellphone={useLoginOtpCellphone}
|
|
439
|
+
useLoginOtpWhatsapp={useLoginOtpWhatsapp}
|
|
436
440
|
useLoginSpoonity={useLoginSpoonity}
|
|
437
441
|
handleLoginSpoonity={handleLoginSpoonity}
|
|
438
442
|
setCellphoneStartZero={setCellphoneStartZero}
|
|
@@ -49,7 +49,8 @@ export const SignupForm = (props) => {
|
|
|
49
49
|
|
|
50
50
|
const useSignUpOtpEmail = configs?.email_otp_signup_enabled?.value === '1' && !isCustomerMode
|
|
51
51
|
const useSignUpOtpCellphone = configs?.phone_otp_signup_enabled?.value === '1' && !isCustomerMode
|
|
52
|
-
const
|
|
52
|
+
const useSignUpOtpWhatsapp = configs?.whatsapp_otp_signup_enabled?.value === '1' && !isCustomerMode
|
|
53
|
+
const useSignUpFullDetails = (useSignUpOtpEmail || useSignUpOtpCellphone || useSignUpOtpWhatsapp) ? configs?.full_details_signup_enabled?.value === '1' : true
|
|
53
54
|
|
|
54
55
|
const defaultSignUpTab = useSignUpFullDetails ? 'default' : useSignUpOtpEmail ? 'otpEmail' : 'otpCellphone'
|
|
55
56
|
const [signUpTab, setSignUpTab] = useState(defaultSignUpTab)
|
|
@@ -232,7 +233,7 @@ export const SignupForm = (props) => {
|
|
|
232
233
|
}
|
|
233
234
|
}
|
|
234
235
|
|
|
235
|
-
const generateOtpCode = async (values) => {
|
|
236
|
+
const generateOtpCode = async (values, channel) => {
|
|
236
237
|
if (isReCaptchaEnable && reCaptchaValue === null) {
|
|
237
238
|
setCheckPhoneCodeState({
|
|
238
239
|
...checkPhoneCodeState,
|
|
@@ -246,7 +247,7 @@ export const SignupForm = (props) => {
|
|
|
246
247
|
}
|
|
247
248
|
const body = {
|
|
248
249
|
type: 4,
|
|
249
|
-
channel: signUpTab === 'otpEmail' ? 1 : 2,
|
|
250
|
+
channel: signUpTab === 'otpEmail' ? 1 : (channel || 2),
|
|
250
251
|
size: 6
|
|
251
252
|
}
|
|
252
253
|
const email = values?.email || signupData?.email
|
|
@@ -478,6 +479,7 @@ export const SignupForm = (props) => {
|
|
|
478
479
|
useSignUpFullDetails={useSignUpFullDetails}
|
|
479
480
|
useSignUpOtpEmail={useSignUpOtpEmail}
|
|
480
481
|
useSignUpOtpCellphone={useSignUpOtpCellphone}
|
|
482
|
+
useSignUpOtpWhatsapp={useSignUpOtpWhatsapp}
|
|
481
483
|
/>
|
|
482
484
|
)}
|
|
483
485
|
</>
|
|
@@ -121,8 +121,7 @@ export const UtilsProviders = ({ children }) => {
|
|
|
121
121
|
separator: options?.separator || configState.configs.format_number_decimal_separator?.value || ',',
|
|
122
122
|
thousand: options?.thousand || configState.configs.format_number_thousand_separator?.value || '.',
|
|
123
123
|
currency: options?.currency || configState.configs.format_number_currency?.value || '$',
|
|
124
|
-
currencyPosition: options?.currencyPosition || configState.configs.currency_position?.value || 'left'
|
|
125
|
-
isTruncable: options?.isTruncable || (configState.configs.format_number_thousand_separator?.value === '.' && configState.configs.format_number_decimal_separator?.value === ',')
|
|
124
|
+
currencyPosition: options?.currencyPosition || configState.configs.currency_position?.value || 'left'
|
|
126
125
|
}
|
|
127
126
|
let number = parseNumber(value, formatNumber)
|
|
128
127
|
if (formatNumber.currencyPosition?.toLowerCase() === 'left') {
|
|
@@ -140,16 +139,7 @@ export const UtilsProviders = ({ children }) => {
|
|
|
140
139
|
separator: options?.separator || configState.configs.format_number_decimal_separator?.value || ',',
|
|
141
140
|
thousand: options?.thousand || configState.configs.format_number_thousand_separator?.value || '.'
|
|
142
141
|
}
|
|
143
|
-
let number = value
|
|
144
|
-
if (options?.isTruncable) {
|
|
145
|
-
number = number.toString()
|
|
146
|
-
const numberParts = number.split(formatNumber.separator)
|
|
147
|
-
let decimalPart = numberParts[1] ?? ''
|
|
148
|
-
decimalPart = decimalPart.padEnd(formatNumber.decimal, '0').substring(0, formatNumber.decimal)
|
|
149
|
-
number = numberParts[0] + '.' + decimalPart
|
|
150
|
-
} else {
|
|
151
|
-
number = value.toFixed(formatNumber.decimal)
|
|
152
|
-
}
|
|
142
|
+
let number = value.toFixed(formatNumber.decimal)
|
|
153
143
|
number = number.toString()
|
|
154
144
|
if (number.indexOf('.')) {
|
|
155
145
|
number = number.replace('.', formatNumber.separator)
|
|
@@ -157,6 +147,7 @@ export const UtilsProviders = ({ children }) => {
|
|
|
157
147
|
number = number.replace(',', formatNumber.separator)
|
|
158
148
|
}
|
|
159
149
|
const numberParts = number.split(formatNumber.separator)
|
|
150
|
+
if (formatNumber.thousand === 'space') formatNumber.thousand = ' '
|
|
160
151
|
numberParts[0] = numberParts[0].replace(/(.)(?=(\d{3})+$)/g, '$1' + formatNumber.thousand)
|
|
161
152
|
number = numberParts.join(formatNumber.separator)
|
|
162
153
|
return number
|