@tap-payments/auth-jsconnect 2.8.65-development → 2.8.65-sandbox

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.
@@ -4,11 +4,14 @@ type GetOccupationBody = {
4
4
  };
5
5
  type GetSegmentsBody = {
6
6
  page: number;
7
- limit: number;
8
7
  };
9
8
  type GetTeamSizeBody = {
10
9
  page: number;
11
10
  };
11
+ type SegmentDataListBody = {
12
+ page: number;
13
+ limit: number;
14
+ };
12
15
  type GetMonthlyIncomeBody = {
13
16
  page: number;
14
17
  country_code: Array<string>;
@@ -20,9 +23,14 @@ export type DataElementBody = {
20
23
  ar: string;
21
24
  };
22
25
  };
23
- type GetBrandOperationsBody = {
26
+ type GetCustomerBasesBody = {
27
+ page: number;
28
+ };
29
+ type GetExpectedSalesBody = {
30
+ page: number;
31
+ };
32
+ type GetExpectedCustomerSalesBody = {
24
33
  page: number;
25
- country_code: string[];
26
34
  };
27
35
  type GetSourceOfIncomeBody = {
28
36
  page: number;
@@ -32,7 +40,9 @@ type GetChannelsOfServicesBody = {
32
40
  };
33
41
  declare const dataService: {
34
42
  getChannelsOfServices: (data: GetChannelsOfServicesBody) => Promise<any>;
35
- getBrandOperations: (data: GetBrandOperationsBody) => Promise<any>;
43
+ getCustomerBases: (data: GetCustomerBasesBody) => Promise<any>;
44
+ getExpectedSales: (data: GetExpectedSalesBody) => Promise<any>;
45
+ getExpectedCustomerSales: (data: GetExpectedCustomerSalesBody) => Promise<any>;
36
46
  getSourceOfIncome: (data: GetSourceOfIncomeBody) => Promise<any>;
37
47
  getMonthlyIncome: (data: GetMonthlyIncomeBody) => Promise<any>;
38
48
  getOccupation: (data: GetOccupationBody) => Promise<any>;
@@ -40,5 +50,8 @@ declare const dataService: {
40
50
  getTeamSize: (data: GetTeamSizeBody) => Promise<any>;
41
51
  getActivities: (config?: AxiosRequestConfig) => Promise<any>;
42
52
  getActivitiesIsIc: () => Promise<any>;
53
+ getSegmentLocation: (data: SegmentDataListBody) => Promise<any>;
54
+ getSegmentProfit: (data: SegmentDataListBody) => Promise<any>;
55
+ getSegmentTech: (data: SegmentDataListBody) => Promise<any>;
43
56
  };
44
57
  export { dataService };
package/build/api/data.js CHANGED
@@ -18,10 +18,24 @@ var getChannelsOfServices = function (data) {
18
18
  data: data
19
19
  });
20
20
  };
21
- var getBrandOperations = function (data) {
21
+ var getCustomerBases = function (data) {
22
22
  return httpClient({
23
23
  method: 'post',
24
- url: "".concat(ENDPOINT_PATHS.BRAND_OPERATIONS),
24
+ url: "".concat(ENDPOINT_PATHS.CUSTOMER_BASES),
25
+ data: data
26
+ });
27
+ };
28
+ var getExpectedSales = function (data) {
29
+ return httpClient({
30
+ method: 'post',
31
+ url: "".concat(ENDPOINT_PATHS.SALES),
32
+ data: data
33
+ });
34
+ };
35
+ var getExpectedCustomerSales = function (data) {
36
+ return httpClient({
37
+ method: 'post',
38
+ url: "".concat(ENDPOINT_PATHS.EXPECTED_CUSTOMERS),
25
39
  data: data
26
40
  });
27
41
  };
@@ -59,7 +73,7 @@ var getActivitiesIsIc = function () {
59
73
  var getSegments = function (data) {
60
74
  return httpClient({
61
75
  method: 'post',
62
- url: "".concat(ENDPOINT_PATHS.SEGMENT_LIST),
76
+ url: "".concat(ENDPOINT_PATHS.SEGMENTS_PATH),
63
77
  data: data
64
78
  });
65
79
  };
@@ -70,15 +84,41 @@ var getTeamSize = function (data) {
70
84
  data: data
71
85
  });
72
86
  };
87
+ var getSegmentLocation = function (data) {
88
+ return httpClient({
89
+ method: 'post',
90
+ url: "".concat(ENDPOINT_PATHS.SEGMENT_LOCATION, "/list"),
91
+ data: data
92
+ });
93
+ };
94
+ var getSegmentProfit = function (data) {
95
+ return httpClient({
96
+ method: 'post',
97
+ url: "".concat(ENDPOINT_PATHS.SEGMENT_PROFIT, "/list"),
98
+ data: data
99
+ });
100
+ };
101
+ var getSegmentTech = function (data) {
102
+ return httpClient({
103
+ method: 'post',
104
+ url: "".concat(ENDPOINT_PATHS.SEGMENT_TECH, "/list"),
105
+ data: data
106
+ });
107
+ };
73
108
  var dataService = {
74
109
  getChannelsOfServices: getChannelsOfServices,
75
- getBrandOperations: getBrandOperations,
110
+ getCustomerBases: getCustomerBases,
111
+ getExpectedSales: getExpectedSales,
112
+ getExpectedCustomerSales: getExpectedCustomerSales,
76
113
  getSourceOfIncome: getSourceOfIncome,
77
114
  getMonthlyIncome: getMonthlyIncome,
78
115
  getOccupation: getOccupation,
79
116
  getSegments: getSegments,
80
117
  getTeamSize: getTeamSize,
81
118
  getActivities: getActivities,
82
- getActivitiesIsIc: getActivitiesIsIc
119
+ getActivitiesIsIc: getActivitiesIsIc,
120
+ getSegmentLocation: getSegmentLocation,
121
+ getSegmentProfit: getSegmentProfit,
122
+ getSegmentTech: getSegmentTech
83
123
  };
84
124
  export { dataService };
@@ -95,9 +95,14 @@ declare const API: {
95
95
  getChannelsOfServices: (data: {
96
96
  page: number;
97
97
  }) => Promise<any>;
98
- getBrandOperations: (data: {
98
+ getCustomerBases: (data: {
99
+ page: number;
100
+ }) => Promise<any>;
101
+ getExpectedSales: (data: {
102
+ page: number;
103
+ }) => Promise<any>;
104
+ getExpectedCustomerSales: (data: {
99
105
  page: number;
100
- country_code: string[];
101
106
  }) => Promise<any>;
102
107
  getSourceOfIncome: (data: {
103
108
  page: number;
@@ -111,13 +116,24 @@ declare const API: {
111
116
  }) => Promise<any>;
112
117
  getSegments: (data: {
113
118
  page: number;
114
- limit: number;
115
119
  }) => Promise<any>;
116
120
  getTeamSize: (data: {
117
121
  page: number;
118
122
  }) => Promise<any>;
119
123
  getActivities: (config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<any>;
120
124
  getActivitiesIsIc: () => Promise<any>;
125
+ getSegmentLocation: (data: {
126
+ page: number;
127
+ limit: number;
128
+ }) => Promise<any>;
129
+ getSegmentProfit: (data: {
130
+ page: number;
131
+ limit: number;
132
+ }) => Promise<any>;
133
+ getSegmentTech: (data: {
134
+ page: number;
135
+ limit: number;
136
+ }) => Promise<any>;
121
137
  };
122
138
  individualService: {
123
139
  retrieveIndividualInfo: (id: string) => Promise<any>;
@@ -57,7 +57,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
57
57
  var _a;
58
58
  import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
59
59
  import { getStoredData, storeData, isArray, findItem, getBrowserInfo, getFingerPrint, sortCountries, findCountryByIso2, getRequestHeaders, encryptString, dangerousMessage, getParameterByName, setBaseUrl, getUserLanguage } from '../utils';
60
- import { BUSINESS_COUNTRIES, DefaultDeviceInfo, LOCAL_STORAGE_KEYS } from '../constants';
60
+ import { BUSINESS_COUNTRIES, DEFAULT_COUNTRY_ISO2, DefaultDeviceInfo, LOCAL_STORAGE_KEYS } from '../constants';
61
61
  import i18n from '../i18n';
62
62
  import { updateLocale } from '../utils/locale';
63
63
  import API, { getAxiosHeaders, setAxiosGlobalHeaders } from '../api';
@@ -161,8 +161,7 @@ export var fetchAppSettingsSync = createAsyncThunk('fetchAppSettingsSync', funct
161
161
  ipCountry = undefined;
162
162
  if (countryCode)
163
163
  businessCountry = findCountryByIso2(countries, countryCode);
164
- if (country_code)
165
- ipCountry = findCountryByIso2(countries, country_code);
164
+ ipCountry = findCountryByIso2(countries, country_code !== null && country_code !== void 0 ? country_code : DEFAULT_COUNTRY_ISO2);
166
165
  if (appConfig.onSettingFetched)
167
166
  appConfig.onSettingFetched({
168
167
  config: config,
@@ -33,7 +33,7 @@ var StyledTooltip = styled(function (_a) {
33
33
  var _b;
34
34
  var theme = _a.theme;
35
35
  return (_b = {},
36
- _b["& .".concat(tooltipClasses.tooltip)] = __assign(__assign({ color: alpha(theme.palette.text.primary, 0.5), width: 'fit-content', maxHeight: 'fit-content' }, theme.typography.body2), { fontWeight: theme.typography.fontWeightLight, backgroundColor: theme.palette.secondary.light, border: "1px solid ".concat(alpha(theme.palette.divider, 0.8)) }),
36
+ _b["& .".concat(tooltipClasses.tooltip)] = __assign(__assign({ color: alpha(theme.palette.text.primary, 0.5), width: 'fit-content', maxHeight: 'fit-content' }, theme.typography.body2), { fontWeight: theme.typography.fontWeightLight, backgroundColor: theme.palette.secondary.light, border: "1px solid ".concat(alpha(theme.palette.divider, 0.8)), zIndex: 2147483647 }),
37
37
  _b);
38
38
  });
39
39
  var TextStyled = styled(Text, { shouldForwardProp: function (prop) { return prop !== 'isAr'; } })(function (_a) {
@@ -25,7 +25,9 @@ export declare const ENDPOINT_PATHS: {
25
25
  FIREBASE_URL: string;
26
26
  CREATE_ACCOUNT: string;
27
27
  CHANNEL: string;
28
- BRAND_OPERATIONS: string;
28
+ CUSTOMER_BASES: string;
29
+ SALES: string;
30
+ EXPECTED_CUSTOMERS: string;
29
31
  SIGNUP: string;
30
32
  SOURCE_INCOME: string;
31
33
  MONTHLY_INCOME: string;
@@ -45,6 +47,7 @@ export declare const ENDPOINT_PATHS: {
45
47
  RETRIEVE_ACTIVITIES_LIST_PATH: string;
46
48
  DOCUMENT: string;
47
49
  CREATE_AUTH_NID: string;
50
+ SEGMENTS_PATH: string;
48
51
  TEAM_SIZE_PATH: string;
49
52
  CITIES: string;
50
53
  INIT: string;
@@ -52,8 +55,10 @@ export declare const ENDPOINT_PATHS: {
52
55
  RETRIEVE_ACTIVITIES_ISIC: string;
53
56
  CONNECT: string;
54
57
  CREATE_CONNECT: string;
58
+ SEGMENT_LOCATION: string;
59
+ SEGMENT_PROFIT: string;
60
+ SEGMENT_TECH: string;
55
61
  MERCHANT: string;
56
62
  TERMINAL: string;
57
63
  CURRENCY: string;
58
- SEGMENT_LIST: string;
59
64
  };
@@ -21,7 +21,9 @@ var CHECK_EMAIL = '/individual/email/availability';
21
21
  var CHECK_BRAND = '/brand/name/check';
22
22
  var CREATE_ACCOUNT_PATH = '/account';
23
23
  var CHANNEL_PATH = '/v2/channel';
24
- var BRAND_OPERATIONS = 'v2/operations';
24
+ var CUSTOMER_BASES_PATH = '/v2/customerBases';
25
+ var SALES_PATH = '/v2/sales';
26
+ var EXPECTED_CUSTOMERS_PATH = '/v2/expectedCustomers';
25
27
  var SIGNUP_PATH = '/signup';
26
28
  var SOURCE_INCOME_PATH = '/v2/sourceOfIncome';
27
29
  var MONTHLY_INCOME_PATH = '/v2/monthlyIncome';
@@ -46,13 +48,16 @@ var CREATE_CONNECT = '/v3/connect';
46
48
  var CREATE_AUTH_NID_PATH = "".concat(CONNECT_PATH, "/auth");
47
49
  var VERIFY_AUTH_OTP_PATH = "".concat(CONNECT_PATH, "/auth");
48
50
  var DOCUMENT_PATH = '/document';
51
+ var SEGMENTS_PATH = '/businessSegment/list';
49
52
  var TEAM_SIZE_PATH = '/businessSegment/team/list';
50
53
  var ADDRESS_PATH = '/address';
51
54
  var INIT_PATH = 'init';
52
55
  var BUSINESS_PATH = '/business';
53
56
  var MERCHANT_PATH = '/merchant';
54
57
  var TERMINAL_PATH = '/terminal';
55
- var SEGMENT_LIST = "v2".concat(BRAND_PATH, "/segment");
58
+ var SEGMENT_LOCATION_PATH = "".concat(BRAND_PATH, "/segment/location");
59
+ var SEGMENT_PROFIT_PATH = "".concat(BRAND_PATH, "/segment/profit");
60
+ var SEGMENT_TECH_PATH = "".concat(BRAND_PATH, "/segment/tech");
56
61
  var CREATE_TOKEN_PATH = '/token';
57
62
  var MIGRATION_STATUS = '/migration';
58
63
  export var ENDPOINT_PATHS = {
@@ -82,7 +87,9 @@ export var ENDPOINT_PATHS = {
82
87
  FIREBASE_URL: FIREBASE_URL,
83
88
  CREATE_ACCOUNT: CREATE_ACCOUNT_PATH,
84
89
  CHANNEL: CHANNEL_PATH,
85
- BRAND_OPERATIONS: BRAND_OPERATIONS,
90
+ CUSTOMER_BASES: CUSTOMER_BASES_PATH,
91
+ SALES: SALES_PATH,
92
+ EXPECTED_CUSTOMERS: EXPECTED_CUSTOMERS_PATH,
86
93
  SIGNUP: SIGNUP_PATH,
87
94
  SOURCE_INCOME: SOURCE_INCOME_PATH,
88
95
  MONTHLY_INCOME: MONTHLY_INCOME_PATH,
@@ -102,6 +109,7 @@ export var ENDPOINT_PATHS = {
102
109
  RETRIEVE_ACTIVITIES_LIST_PATH: RETRIEVE_ACTIVITIES_LIST_PATH,
103
110
  DOCUMENT: DOCUMENT_PATH,
104
111
  CREATE_AUTH_NID: CREATE_AUTH_NID_PATH,
112
+ SEGMENTS_PATH: SEGMENTS_PATH,
105
113
  TEAM_SIZE_PATH: TEAM_SIZE_PATH,
106
114
  CITIES: CITIES_PATH,
107
115
  INIT: INIT_PATH,
@@ -109,8 +117,10 @@ export var ENDPOINT_PATHS = {
109
117
  RETRIEVE_ACTIVITIES_ISIC: RETRIEVE_ACTIVITIES_ISIC_PATH,
110
118
  CONNECT: CONNECT_PATH,
111
119
  CREATE_CONNECT: CREATE_CONNECT,
120
+ SEGMENT_LOCATION: SEGMENT_LOCATION_PATH,
121
+ SEGMENT_PROFIT: SEGMENT_PROFIT_PATH,
122
+ SEGMENT_TECH: SEGMENT_TECH_PATH,
112
123
  MERCHANT: MERCHANT_PATH,
113
124
  TERMINAL: TERMINAL_PATH,
114
- CURRENCY: CURRENCY_PATH,
115
- SEGMENT_LIST: SEGMENT_LIST
125
+ CURRENCY: CURRENCY_PATH
116
126
  };
@@ -1,5 +1,6 @@
1
1
  import { ScreenStepNavigation, BusinessType } from '../@types';
2
2
  export declare const CONNECT_DEV_URL = "https://connect.dev.tap.company";
3
+ export declare const CONNECT_SANDBOX_URL = "https://connect.sandbox.tap.company";
3
4
  export declare const CONNECT_PROD_URL = "https://connect.tap.company";
4
5
  export declare const CLIENT_ORIGIN: string;
5
6
  export declare const TAP_WEBSITE = "https://www.tap.company/";
@@ -9,6 +10,7 @@ export declare const LOCAL_STORAGE_KEYS: {
9
10
  languageMode: string;
10
11
  };
11
12
  export declare const SCOPE_AUTH = "auth";
13
+ export declare const DEFAULT_COUNTRY_ISO2 = "KW";
12
14
  export declare const EXTERNAL_LINKS: {
13
15
  TOS_EN: string;
14
16
  TOS_AR: string;
@@ -1,5 +1,6 @@
1
1
  import { BusinessType } from '../@types';
2
2
  export var CONNECT_DEV_URL = 'https://connect.dev.tap.company';
3
+ export var CONNECT_SANDBOX_URL = 'https://connect.sandbox.tap.company';
3
4
  export var CONNECT_PROD_URL = 'https://connect.tap.company';
4
5
  export var CLIENT_ORIGIN = window.location.origin;
5
6
  export var TAP_WEBSITE = 'https://www.tap.company/';
@@ -9,6 +10,7 @@ export var LOCAL_STORAGE_KEYS = {
9
10
  languageMode: 'languageMode'
10
11
  };
11
12
  export var SCOPE_AUTH = 'auth';
13
+ export var DEFAULT_COUNTRY_ISO2 = 'KW';
12
14
  export var EXTERNAL_LINKS = {
13
15
  TOS_EN: '/en/terms-conditions',
14
16
  TOS_AR: '/ar/terms-conditions',
@@ -53,7 +53,6 @@ export declare const retrieveSegmentDataList: import("@reduxjs/toolkit").AsyncTh
53
53
  segmentLocation: any;
54
54
  segmentProfit: any;
55
55
  segmentTech: any;
56
- segmentTeam: any;
57
56
  }, void, {
58
57
  state?: unknown;
59
58
  dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
@@ -199,7 +199,7 @@ export var verifyBrandLeadOTP = createAsyncThunk('brand/verifyLeadOTP', function
199
199
  });
200
200
  }); });
201
201
  export var retrieveSegmentDataList = createAsyncThunk('brandRetrieveSegmentDataList', function () { return __awaiter(void 0, void 0, void 0, function () {
202
- var dataBody, _a, team, location, profit, tech;
202
+ var dataBody, _a, segmentLocation, segmentProfit, segmentTech;
203
203
  return __generator(this, function (_b) {
204
204
  switch (_b.label) {
205
205
  case 0:
@@ -207,14 +207,17 @@ export var retrieveSegmentDataList = createAsyncThunk('brandRetrieveSegmentDataL
207
207
  page: 0,
208
208
  limit: 50
209
209
  };
210
- return [4, API.dataService.getSegments(dataBody)];
210
+ return [4, Promise.all([
211
+ API.dataService.getSegmentLocation(dataBody),
212
+ API.dataService.getSegmentProfit(dataBody),
213
+ API.dataService.getSegmentTech(dataBody)
214
+ ])];
211
215
  case 1:
212
- _a = _b.sent(), team = _a.team, location = _a.location, profit = _a.profit, tech = _a.tech;
216
+ _a = _b.sent(), segmentLocation = _a[0].list, segmentProfit = _a[1].list, segmentTech = _a[2].list;
213
217
  return [2, {
214
- segmentLocation: (location === null || location === void 0 ? void 0 : location.list) || [],
215
- segmentProfit: (profit === null || profit === void 0 ? void 0 : profit.list) || [],
216
- segmentTech: (tech === null || tech === void 0 ? void 0 : tech.list) || [],
217
- segmentTeam: (team === null || team === void 0 ? void 0 : team.list) || []
218
+ segmentLocation: segmentLocation,
219
+ segmentProfit: segmentProfit,
220
+ segmentTech: segmentTech
218
221
  }];
219
222
  }
220
223
  });
@@ -293,10 +296,10 @@ export var checkBrandNameAvailability = createAsyncThunk('checkBrandNameAvailabi
293
296
  export var updateBrand = createAsyncThunk('brandUpdateBrand', function (_a, thunkApi) {
294
297
  var formData = _a.formData, originalFormData = _a.originalFormData, isDirty = _a.isDirty;
295
298
  return __awaiter(void 0, void 0, void 0, function () {
296
- var _b, settings, brand, brandRes, _c, id, data_status, isNameENNonEditable, isNameARNonEditable, isChannelServicesNonEditable, salesChannels, brandName, brandLogoId, brandData, getAddress, channel_services, brandNameIsEditable, requestBody, brand_1, _d, segmentLocation, segmentProfit, segmentTech, segmentTeam;
297
- var _e, _f;
298
- return __generator(this, function (_g) {
299
- switch (_g.label) {
299
+ var _b, settings, brand, brandRes, _c, id, data_status, isNameENNonEditable, isNameARNonEditable, isChannelServicesNonEditable, salesChannels, brandName, brandLogoId, brandData, getAddress, channel_services, brandNameIsEditable, requestBody, brand_1, _d, teamSizeList, _e, segmentLocation, segmentProfit, segmentTech, _f, _g, _h;
300
+ var _j, _k;
301
+ return __generator(this, function (_l) {
302
+ switch (_l.label) {
300
303
  case 0:
301
304
  _b = thunkApi.getState(), settings = _b.settings, brand = _b.brand;
302
305
  brandRes = (brand.data.verify.responseBody || {}).brand;
@@ -335,18 +338,24 @@ export var updateBrand = createAsyncThunk('brandUpdateBrand', function (_a, thun
335
338
  if (!isDirty) return [3, 2];
336
339
  return [4, API.brandService.updateBrandInfo(requestBody)];
337
340
  case 1:
338
- brand_1 = (_g.sent()).brand;
341
+ brand_1 = (_l.sent()).brand;
339
342
  brandData = brand_1;
340
- _g.label = 2;
341
- case 2: return [4, thunkApi.dispatch(retrieveSegmentDataList()).unwrap()];
342
- case 3:
343
- _d = _g.sent(), segmentLocation = _d.segmentLocation, segmentProfit = _d.segmentProfit, segmentTech = _d.segmentTech, segmentTeam = _d.segmentTeam;
343
+ _l.label = 2;
344
+ case 2:
345
+ _g = (_f = Promise).all;
346
+ _h = [API.dataService.getTeamSize({ page: 0 })];
347
+ return [4, thunkApi.dispatch(retrieveSegmentDataList()).unwrap()];
348
+ case 3: return [4, _g.apply(_f, [_h.concat([
349
+ _l.sent()
350
+ ])])];
351
+ case 4:
352
+ _d = _l.sent(), teamSizeList = _d[0], _e = _d[1], segmentLocation = _e.segmentLocation, segmentProfit = _e.segmentProfit, segmentTech = _e.segmentTech;
344
353
  sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep()); });
345
- (_f = (_e = settings.data.appConfig).onStepCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, settings.data.activeScreen.name, id);
354
+ (_k = (_j = settings.data.appConfig).onStepCompleted) === null || _k === void 0 ? void 0 : _k.call(_j, settings.data.activeScreen.name, id);
346
355
  return [2, {
347
356
  data: __assign({}, brandData),
348
357
  formData: originalFormData,
349
- teamSizeList: segmentTeam,
358
+ teamSizeList: teamSizeList === null || teamSizeList === void 0 ? void 0 : teamSizeList.list,
350
359
  segmentLocationList: segmentLocation,
351
360
  segmentProfitList: segmentProfit,
352
361
  segmentTechList: segmentTech
@@ -490,24 +499,30 @@ export var updateBrandActivities = createAsyncThunk('brandUpdateBrandActivities'
490
499
  });
491
500
  });
492
501
  export var retrieveDataList = createAsyncThunk('brandRetrieveDataList', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
493
- var settings, countryISO2, dataBody, _a, customer_base, sales, expected_customers;
494
- var _b;
495
- return __generator(this, function (_c) {
496
- switch (_c.label) {
502
+ var settings, countryISO2, dataBody, salesDataBody, _a, customerBases, expectedSales, expectedCustomerSales;
503
+ return __generator(this, function (_b) {
504
+ switch (_b.label) {
497
505
  case 0:
498
506
  settings = thunkApi.getState().settings;
499
507
  countryISO2 = settings.data.businessCountry.iso2;
500
508
  dataBody = {
509
+ page: 0
510
+ };
511
+ salesDataBody = {
501
512
  page: 0,
502
513
  country_code: [countryISO2]
503
514
  };
504
- return [4, API.dataService.getBrandOperations(dataBody)];
515
+ return [4, Promise.all([
516
+ API.dataService.getCustomerBases(dataBody),
517
+ API.dataService.getExpectedSales(salesDataBody),
518
+ API.dataService.getExpectedCustomerSales(dataBody)
519
+ ])];
505
520
  case 1:
506
- _a = _c.sent(), customer_base = _a.customer_base, sales = _a.sales, expected_customers = _a.expected_customers;
521
+ _a = _b.sent(), customerBases = _a[0].list, expectedSales = _a[1].list, expectedCustomerSales = _a[2].list;
507
522
  return [2, {
508
- customerBases: (customer_base === null || customer_base === void 0 ? void 0 : customer_base.list) || [],
509
- expectedSales: ((_b = sales === null || sales === void 0 ? void 0 : sales.list) === null || _b === void 0 ? void 0 : _b.length) ? sales.list : EXPECTED_SALES_LIST,
510
- expectedCustomerSales: (expected_customers === null || expected_customers === void 0 ? void 0 : expected_customers.list) || [],
523
+ customerBases: customerBases,
524
+ expectedSales: (expectedSales === null || expectedSales === void 0 ? void 0 : expectedSales.length) ? expectedSales : EXPECTED_SALES_LIST,
525
+ expectedCustomerSales: expectedCustomerSales,
511
526
  countryISO2: countryISO2
512
527
  }];
513
528
  }
@@ -664,24 +664,30 @@ export var updateActivitiesInfo = createAsyncThunk('updateActivitiesInfo', funct
664
664
  });
665
665
  });
666
666
  export var retrieveDataList = createAsyncThunk('businessRetrieveDataList', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
667
- var settings, countryISO2, dataBody, _a, customer_base, sales, expected_customers;
668
- var _b;
669
- return __generator(this, function (_c) {
670
- switch (_c.label) {
667
+ var settings, countryISO2, dataBody, salesDataBody, _a, customerBases, expectedSales, expectedCustomerSales;
668
+ return __generator(this, function (_b) {
669
+ switch (_b.label) {
671
670
  case 0:
672
671
  settings = thunkApi.getState().settings;
673
672
  countryISO2 = settings.data.businessCountry.iso2;
674
673
  dataBody = {
674
+ page: 0
675
+ };
676
+ salesDataBody = {
675
677
  page: 0,
676
678
  country_code: [countryISO2]
677
679
  };
678
- return [4, API.dataService.getBrandOperations(dataBody)];
680
+ return [4, Promise.all([
681
+ API.dataService.getCustomerBases(dataBody),
682
+ API.dataService.getExpectedSales(salesDataBody),
683
+ API.dataService.getExpectedCustomerSales(dataBody)
684
+ ])];
679
685
  case 1:
680
- _a = _c.sent(), customer_base = _a.customer_base, sales = _a.sales, expected_customers = _a.expected_customers;
686
+ _a = _b.sent(), customerBases = _a[0].list, expectedSales = _a[1].list, expectedCustomerSales = _a[2].list;
681
687
  return [2, {
682
- customerBases: (customer_base === null || customer_base === void 0 ? void 0 : customer_base.list) || [],
683
- expectedSales: ((_b = sales === null || sales === void 0 ? void 0 : sales.list) === null || _b === void 0 ? void 0 : _b.length) ? sales.list : EXPECTED_SALES_LIST,
684
- expectedCustomerSales: (expected_customers === null || expected_customers === void 0 ? void 0 : expected_customers.list) || [],
688
+ customerBases: customerBases,
689
+ expectedSales: (expectedSales === null || expectedSales === void 0 ? void 0 : expectedSales.length) ? expectedSales : EXPECTED_SALES_LIST,
690
+ expectedCustomerSales: expectedCustomerSales,
685
691
  countryISO2: countryISO2
686
692
  }];
687
693
  }
@@ -463,7 +463,7 @@ export var retrieveLead = createAsyncThunk('connect/retrieveLead', function (par
463
463
  });
464
464
  }); });
465
465
  export var updateLeadBrand = createAsyncThunk('updateLeadBrand', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
466
- var _a, settings, connect, responseBody, leadBrandId, isNewBrand, brandName, salesChannels, selectedBrandItem, brandLogoId, termAndConditionChecked, getAddress, channel_services, payload_1, brandReqBody_1, brand_1, team, err_5, brandNameBody, payload, lead, brandReqBody, brand, team, err_6;
466
+ var _a, settings, connect, responseBody, leadBrandId, isNewBrand, brandName, salesChannels, selectedBrandItem, brandLogoId, termAndConditionChecked, getAddress, channel_services, payload_1, brandReqBody_1, brand_1, teamSize, err_5, brandNameBody, payload, lead, brandReqBody, brand, teamSize, err_6;
467
467
  var _b, _c, _d, _e, _f;
468
468
  return __generator(this, function (_g) {
469
469
  switch (_g.label) {
@@ -516,10 +516,10 @@ export var updateLeadBrand = createAsyncThunk('updateLeadBrand', function (param
516
516
  _g.label = 4;
517
517
  case 4:
518
518
  _g.trys.push([4, 6, , 7]);
519
- return [4, API.dataService.getSegments({ page: 0, limit: 50 })];
519
+ return [4, API.dataService.getTeamSize({ page: 0 })];
520
520
  case 5:
521
- team = (_g.sent()).team;
522
- brand_1.team_size_list = (team === null || team === void 0 ? void 0 : team.list) || [];
521
+ teamSize = _g.sent();
522
+ brand_1.team_size_list = teamSize.list;
523
523
  return [3, 7];
524
524
  case 6:
525
525
  err_5 = _g.sent();
@@ -562,10 +562,10 @@ export var updateLeadBrand = createAsyncThunk('updateLeadBrand', function (param
562
562
  _g.label = 11;
563
563
  case 11:
564
564
  _g.trys.push([11, 13, , 14]);
565
- return [4, API.dataService.getSegments({ page: 0, limit: 50 })];
565
+ return [4, API.dataService.getTeamSize({ page: 0 })];
566
566
  case 12:
567
- team = (_g.sent()).team;
568
- brand.team_size_list = (team === null || team === void 0 ? void 0 : team.list) || [];
567
+ teamSize = _g.sent();
568
+ brand.team_size_list = teamSize.list;
569
569
  return [3, 14];
570
570
  case 13:
571
571
  err_6 = _g.sent();
@@ -7,7 +7,6 @@ interface verifyLeadTokenProps {
7
7
  export declare const verifyLeadToken: import("@reduxjs/toolkit").AsyncThunk<{
8
8
  data: any;
9
9
  token: string;
10
- flows: any;
11
10
  }, verifyLeadTokenProps, {
12
11
  state?: unknown;
13
12
  dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
@@ -50,7 +49,6 @@ export declare const verifyPasswordLeadOTP: import("@reduxjs/toolkit").AsyncThun
50
49
  formData: {
51
50
  otp: string;
52
51
  };
53
- flows: any;
54
52
  }, OTPFormValues, {
55
53
  state?: unknown;
56
54
  dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
@@ -55,7 +55,7 @@ import { retrieveIndividualData, sleep } from '../../../utils';
55
55
  export var verifyLeadToken = createAsyncThunk('passwordVerifyLeadToken', function (_a, thunkApi) {
56
56
  var token = _a.token, isInternally = _a.isInternally;
57
57
  return __awaiter(void 0, void 0, void 0, function () {
58
- var payload, data, _b, config, board_info_password_status, country_code, board_id, recipient, countryIso2, publicKey, data_1, flows, data_2;
58
+ var payload, data, _b, config, board_info_password_status, country_code, board_id, countryIso2, publicKey, data_1;
59
59
  var _c, _d;
60
60
  return __generator(this, function (_e) {
61
61
  switch (_e.label) {
@@ -72,7 +72,7 @@ export var verifyLeadToken = createAsyncThunk('passwordVerifyLeadToken', functio
72
72
  throw new Error(data.errors[0].description || (data === null || data === void 0 ? void 0 : data.mw_error));
73
73
  if (isInternally)
74
74
  data.step_name = PASSWORD_STEP_NAMES.PASSWORD_INFO;
75
- _b = data || {}, config = _b.config, board_info_password_status = _b.board_info_password_status, country_code = _b.country_code, board_id = _b.id, recipient = _b.recipient;
75
+ _b = data || {}, config = _b.config, board_info_password_status = _b.board_info_password_status, country_code = _b.country_code, board_id = _b.board_id;
76
76
  countryIso2 = country_code;
77
77
  if (countryIso2)
78
78
  thunkApi.dispatch(handleSetCountryByIso2(countryIso2));
@@ -87,27 +87,16 @@ export var verifyLeadToken = createAsyncThunk('passwordVerifyLeadToken', functio
87
87
  thunkApi.dispatch(handleSetCountryByIso2(data_1.entity.country));
88
88
  _e.label = 3;
89
89
  case 3:
90
- flows = [];
91
- if (!(data.step_name === PASSWORD_STEP_NAMES.PHONE_AUTH)) return [3, 4];
92
- thunkApi.dispatch(handleCurrentActiveScreen('PASSWORD_VERIFY_STEP'));
93
- return [3, 7];
94
- case 4:
95
- if (!(board_info_password_status === 'completed')) return [3, 6];
96
- return [4, Promise.all([
97
- API.boardService.retrieveBoardInfoStatus(board_id),
98
- thunkApi.dispatch(retrieveBoardDetails({ boardId: board_id, individualId: recipient === null || recipient === void 0 ? void 0 : recipient.id, individualType: recipient === null || recipient === void 0 ? void 0 : recipient.type })).unwrap()
99
- ])];
100
- case 5:
101
- data_2 = (_e.sent())[0];
102
- flows = (data_2 === null || data_2 === void 0 ? void 0 : data_2.info) || [];
103
- thunkApi.dispatch(handleNextScreenStep('PASSWORD_SUCCESS_FOUR_FLOWS_BUTTONS_STEP'));
104
- return [3, 7];
105
- case 6:
106
- if (data.step_name === PASSWORD_STEP_NAMES.PASSWORD_INFO) {
90
+ if (data.step_name === PASSWORD_STEP_NAMES.PHONE_AUTH) {
91
+ thunkApi.dispatch(handleCurrentActiveScreen('PASSWORD_VERIFY_STEP'));
92
+ }
93
+ else if (board_info_password_status === 'completed') {
94
+ thunkApi.dispatch(handleNextScreenStep('PASSWORD_SUCCESS_FOUR_FLOWS_BUTTONS_STEP'));
95
+ }
96
+ else if (data.step_name === PASSWORD_STEP_NAMES.PASSWORD_INFO) {
107
97
  thunkApi.dispatch(handleNextScreenStep('PASSWORD_CREATE_PASSWORD_STEP'));
108
98
  }
109
- _e.label = 7;
110
- case 7: return [2, { data: data, token: token, flows: flows }];
99
+ return [2, { data: data, token: token }];
111
100
  }
112
101
  });
113
102
  });
@@ -155,7 +144,7 @@ export var retrieveBoardDetails = createAsyncThunk('retrievePasswordBoardDetails
155
144
  });
156
145
  });
157
146
  export var verifyPasswordLeadOTP = createAsyncThunk('verifyPasswordLeadOTP', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
158
- var _a, password, settings, responseBody, payload, data, _b, config, board_info_password_status, country_code, board_id, recipient, countryIso2, publicKey, flows, data_3, data_4;
147
+ var _a, password, settings, responseBody, payload, data, _b, config, board_info_password_status, country_code, board_id, countryIso2, publicKey, data_2;
159
148
  var _c, _d, _e, _f, _g;
160
149
  return __generator(this, function (_h) {
161
150
  switch (_h.label) {
@@ -174,7 +163,7 @@ export var verifyPasswordLeadOTP = createAsyncThunk('verifyPasswordLeadOTP', fun
174
163
  data = (_h.sent()).data;
175
164
  if ((_d = data === null || data === void 0 ? void 0 : data.errors) === null || _d === void 0 ? void 0 : _d.length)
176
165
  throw new Error(data.errors[0].description);
177
- _b = data || {}, config = _b.config, board_info_password_status = _b.board_info_password_status, country_code = _b.country_code, board_id = _b.id, recipient = _b.recipient;
166
+ _b = data || {}, config = _b.config, board_info_password_status = _b.board_info_password_status, country_code = _b.country_code, board_id = _b.board_id;
178
167
  countryIso2 = country_code;
179
168
  if (countryIso2)
180
169
  thunkApi.dispatch(handleSetCountryByIso2(countryIso2));
@@ -182,29 +171,21 @@ export var verifyPasswordLeadOTP = createAsyncThunk('verifyPasswordLeadOTP', fun
182
171
  if (publicKey)
183
172
  thunkApi.dispatch(handlePublicKey(publicKey));
184
173
  (_f = (_e = settings.data.appConfig).onStepCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, settings.data.activeScreen.name, { otp: params.otp });
185
- flows = [];
186
- if (!(board_info_password_status === 'completed')) return [3, 3];
187
- return [4, Promise.all([
188
- API.boardService.retrieveBoardInfoStatus(board_id),
189
- thunkApi.dispatch(retrieveBoardDetails({ boardId: board_id, individualId: recipient === null || recipient === void 0 ? void 0 : recipient.id, individualType: recipient === null || recipient === void 0 ? void 0 : recipient.type })).unwrap()
190
- ])];
191
- case 2:
192
- data_3 = (_h.sent())[0];
193
- flows = (data_3 === null || data_3 === void 0 ? void 0 : data_3.info) || [];
174
+ if (!(board_info_password_status === 'completed')) return [3, 2];
194
175
  thunkApi.dispatch(handleNextScreenStep('PASSWORD_SUCCESS_FOUR_FLOWS_BUTTONS_STEP'));
195
- return [3, 6];
196
- case 3:
197
- if (!!country_code) return [3, 5];
176
+ return [3, 5];
177
+ case 2:
178
+ if (!!country_code) return [3, 4];
198
179
  return [4, API.boardService.retrieveBoardDetails(board_id)];
180
+ case 3:
181
+ data_2 = _h.sent();
182
+ if ((_g = data_2 === null || data_2 === void 0 ? void 0 : data_2.entity) === null || _g === void 0 ? void 0 : _g.country)
183
+ thunkApi.dispatch(handleSetCountryByIso2(data_2.entity.country));
184
+ _h.label = 4;
199
185
  case 4:
200
- data_4 = _h.sent();
201
- if ((_g = data_4 === null || data_4 === void 0 ? void 0 : data_4.entity) === null || _g === void 0 ? void 0 : _g.country)
202
- thunkApi.dispatch(handleSetCountryByIso2(data_4.entity.country));
203
- _h.label = 5;
204
- case 5:
205
186
  thunkApi.dispatch(handleNextScreenStep('PASSWORD_CREATE_PASSWORD_STEP'));
206
- _h.label = 6;
207
- case 6: return [2, { data: data, formData: __assign({}, params), flows: flows }];
187
+ _h.label = 5;
188
+ case 5: return [2, { data: data, formData: __assign({}, params) }];
208
189
  }
209
190
  });
210
191
  }); });
@@ -289,7 +270,7 @@ export var retrieveBoardStatus = createAsyncThunk('password/retrieveBoardStatus'
289
270
  });
290
271
  }); });
291
272
  export var verifyOperationToken = createAsyncThunk('verifyOperationToken', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
292
- var token, boardId, boardInfoId, userId, userType, payload, data, countryIso2, publicKey, data_5;
273
+ var token, boardId, boardInfoId, userId, userType, payload, data, countryIso2, publicKey, data_3;
293
274
  var _a, _b, _c;
294
275
  return __generator(this, function (_d) {
295
276
  switch (_d.label) {
@@ -313,9 +294,9 @@ export var verifyOperationToken = createAsyncThunk('verifyOperationToken', funct
313
294
  if (!!(data === null || data === void 0 ? void 0 : data.country)) return [3, 3];
314
295
  return [4, API.boardService.retrieveBoardDetails(boardId)];
315
296
  case 2:
316
- data_5 = _d.sent();
317
- if ((_c = data_5 === null || data_5 === void 0 ? void 0 : data_5.entity) === null || _c === void 0 ? void 0 : _c.country)
318
- thunkApi.dispatch(handleSetCountryByIso2(data_5.entity.country));
297
+ data_3 = _d.sent();
298
+ if ((_c = data_3 === null || data_3 === void 0 ? void 0 : data_3.entity) === null || _c === void 0 ? void 0 : _c.country)
299
+ thunkApi.dispatch(handleSetCountryByIso2(data_3.entity.country));
319
300
  _d.label = 3;
320
301
  case 3:
321
302
  thunkApi.dispatch(handleNextScreenStep('PASSWORD_CREATE_PASSWORD_STEP'));
@@ -460,10 +441,8 @@ export var passwordSlice = createSlice({
460
441
  state.data.verify.operationType = PASSWORD_OPERATION_TYPE.SET_PASSWORD;
461
442
  state.error = null;
462
443
  state.customLoading = false;
463
- var _a = action.payload, data = _a.data, token = _a.token, flows = _a.flows;
464
- state.data.verify.responseBody = __assign(__assign(__assign(__assign({}, data), state.data.verify.responseBody), { board_id: data.id }), ((flows === null || flows === void 0 ? void 0 : flows.length) && {
465
- flows: flows
466
- }));
444
+ var _a = action.payload, data = _a.data, token = _a.token;
445
+ state.data.verify.responseBody = __assign(__assign(__assign({}, data), state.data.verify.responseBody), { board_id: data.id });
467
446
  state.data.verify.token = token;
468
447
  })
469
448
  .addCase(verifyLeadToken.pending, function (state) {
@@ -498,12 +477,10 @@ export var passwordSlice = createSlice({
498
477
  .addCase(verifyPasswordLeadOTP.fulfilled, function (state, action) {
499
478
  state.loading = false;
500
479
  state.error = null;
501
- var _a = action.payload, data = _a.data, formData = _a.formData, flows = _a.flows;
480
+ var _a = action.payload, data = _a.data, formData = _a.formData;
502
481
  state.data.otpData = formData;
503
482
  state.data.otpData.responseBody = data;
504
- state.data.verify.responseBody = __assign(__assign(__assign(__assign({}, data), state.data.verify.responseBody), { board_id: data.id }), ((flows === null || flows === void 0 ? void 0 : flows.length) && {
505
- flows: flows
506
- }));
483
+ state.data.verify.responseBody = __assign(__assign(__assign({}, data), state.data.verify.responseBody), { board_id: data.id });
507
484
  })
508
485
  .addCase(verifyPasswordLeadOTP.rejected, function (state, action) {
509
486
  state.loading = false;
@@ -3,7 +3,7 @@ import * as React from 'react';
3
3
  import { useTranslation } from 'react-i18next';
4
4
  import { useController, useFormContext } from 'react-hook-form';
5
5
  import { KW_MAX_LICENSE_LENGTH, KW_MIN_LICENSE_LENGTH, LICENSE_NUMBER_MAX_LENGTH, LICENSE_NUMBER_MIN_LENGTH } from '../../../../constants';
6
- import { removeAllOtherThanCharsAndNumber, isSA } from '../../../../utils';
6
+ import { isSA, cleanFLandCRNumber } from '../../../../utils';
7
7
  import ScreenContainer from '../../../shared/Containers/ScreenContainer';
8
8
  import ClearIcon from '../../../shared/ClearIcon';
9
9
  import CheckIcon from '../../../shared/CheckIcon';
@@ -19,7 +19,7 @@ var LicenseNumber = function () {
19
19
  var isSACountry = React.useMemo(function () { return isSA(settingsData.businessCountry.iso2); }, [settingsData.businessCountry.iso2]);
20
20
  var handleFLNumberChange = function (_a) {
21
21
  var target = _a.target;
22
- var value = removeAllOtherThanCharsAndNumber(target.value);
22
+ var value = cleanFLandCRNumber(target.value);
23
23
  licenseNumberControl.field.onChange(value);
24
24
  };
25
25
  var clearLicenseNumber = function () {
@@ -14,7 +14,7 @@ import * as React from 'react';
14
14
  import { useTranslation } from 'react-i18next';
15
15
  import { useController, useFormContext } from 'react-hook-form';
16
16
  import { CR_MIN_LICENSE_LENGTH, CR_NUMBER_MAX_LENGTH, FL_MIN_LICENSE_LENGTH, FL_NUMBER_MAX_LENGTH, KW_MAX_LICENSE_LENGTH, KW_MIN_LICENSE_LENGTH } from '../../../../constants';
17
- import { removeAllOtherThanCharsAndNumber, isOtherLicense, isKW, isOtherThanKWOrSA } from '../../../../utils';
17
+ import { isOtherLicense, isKW, isOtherThanKWOrSA, cleanFLandCRNumber } from '../../../../utils';
18
18
  import ScreenContainer from '../../../shared/Containers/ScreenContainer';
19
19
  import ClearIcon from '../../../shared/ClearIcon';
20
20
  import CheckIcon from '../../../shared/CheckIcon';
@@ -38,7 +38,7 @@ var LicenseNumber = function (_a) {
38
38
  var readOnly = !isOtherLicense(selectedLicense) || (selectedEntityLicense && !isOtherLicense(selectedEntityLicense));
39
39
  var handleFLNumberChange = function (_a) {
40
40
  var target = _a.target;
41
- var value = removeAllOtherThanCharsAndNumber(target.value);
41
+ var value = cleanFLandCRNumber(target.value);
42
42
  licenseNumberControl.field.onChange(value);
43
43
  };
44
44
  var clearLicenseNumber = function () {
@@ -3,7 +3,7 @@ import * as React from 'react';
3
3
  import { useTranslation } from 'react-i18next';
4
4
  import { useController, useFormContext } from 'react-hook-form';
5
5
  import { KW_MAX_LICENSE_LENGTH, KW_MIN_LICENSE_LENGTH, LICENSE_NUMBER_MAX_LENGTH, LICENSE_NUMBER_MIN_LENGTH } from '../../../../constants';
6
- import { removeAllOtherThanCharsNumberSlashAndHyphen, isSA } from '../../../../utils';
6
+ import { isSA, cleanFLandCRNumber } from '../../../../utils';
7
7
  import ScreenContainer from '../../../shared/Containers/ScreenContainer';
8
8
  import ClearIcon from '../../../shared/ClearIcon';
9
9
  import CheckIcon from '../../../shared/CheckIcon';
@@ -19,7 +19,7 @@ var LicenseNumber = function () {
19
19
  var isSACountry = React.useMemo(function () { return isSA(settingsData.businessCountry.iso2); }, [settingsData.businessCountry.iso2]);
20
20
  var handleFLNumberChange = function (_a) {
21
21
  var target = _a.target;
22
- var value = removeAllOtherThanCharsNumberSlashAndHyphen(target.value);
22
+ var value = cleanFLandCRNumber(target.value);
23
23
  licenseNumberControl.field.onChange(value);
24
24
  };
25
25
  var clearLicenseNumber = function () {
@@ -14,7 +14,7 @@ import * as React from 'react';
14
14
  import { useTranslation } from 'react-i18next';
15
15
  import { useController, useFormContext } from 'react-hook-form';
16
16
  import { CR_MIN_LICENSE_LENGTH, CR_NUMBER_MAX_LENGTH, FL_MIN_LICENSE_LENGTH, FL_NUMBER_MAX_LENGTH, KW_MAX_LICENSE_LENGTH, KW_MIN_LICENSE_LENGTH } from '../../../../constants';
17
- import { removeAllOtherThanCharsAndNumber, isKW, isOtherThanKWOrSA } from '../../../../utils';
17
+ import { isKW, isOtherThanKWOrSA, cleanFLandCRNumber } from '../../../../utils';
18
18
  import ScreenContainer from '../../../shared/Containers/ScreenContainer';
19
19
  import ClearIcon from '../../../shared/ClearIcon';
20
20
  import CheckIcon from '../../../shared/CheckIcon';
@@ -36,7 +36,7 @@ var LicenseNumber = function (_a) {
36
36
  var isCR = (selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.type) === BusinessType.CR;
37
37
  var handleFLNumberChange = function (_a) {
38
38
  var target = _a.target;
39
- var value = removeAllOtherThanCharsAndNumber(target.value);
39
+ var value = cleanFLandCRNumber(target.value);
40
40
  licenseNumberControl.field.onChange(value);
41
41
  };
42
42
  var clearLicenseNumber = function () {
@@ -15,7 +15,7 @@ import { useTranslation } from 'react-i18next';
15
15
  import { useController, useFormContext } from 'react-hook-form';
16
16
  import { useAppDispatch, useAppSelector } from '../../../../hooks';
17
17
  import { BusinessType } from '../../../../@types';
18
- import { isKW, isOtherThanKWOrSA, removeAllOtherThanCharsAndNumber } from '../../../../utils';
18
+ import { isKW, isOtherThanKWOrSA, cleanFLandCRNumber } from '../../../../utils';
19
19
  import { settingsSelector } from '../../../../app/settings';
20
20
  import { CR_MIN_LICENSE_LENGTH, CR_NUMBER_MAX_LENGTH, FL_MIN_LICENSE_LENGTH, FL_NUMBER_ENTITY_LENGTH, KW_MAX_LICENSE_LENGTH, KW_MIN_LICENSE_LENGTH } from '../../../../constants';
21
21
  import Collapse from '../../../../components/Collapse';
@@ -38,7 +38,7 @@ var LicenseNumber = function (_a) {
38
38
  var target = _a.target;
39
39
  if (bckError)
40
40
  dispatch(clearError());
41
- var value = removeAllOtherThanCharsAndNumber(target.value);
41
+ var value = cleanFLandCRNumber(target.value);
42
42
  licenseNumberControl.field.onChange(value);
43
43
  };
44
44
  var licenseNumberControl = useController({ control: control, name: 'licenseNumber' });
@@ -1,5 +1,5 @@
1
1
  import { axiosInstance } from '../api';
2
- import { ENDPOINT_PATHS, CONNECT_DEV_URL, CONNECT_PROD_URL } from '../constants';
2
+ import { ENDPOINT_PATHS, CONNECT_SANDBOX_URL, CONNECT_PROD_URL } from '../constants';
3
3
  export var sleep = function (milliseconds) {
4
4
  if (milliseconds === void 0) { milliseconds = 1000; }
5
5
  return new Promise(function (resolve) { return setTimeout(resolve, milliseconds); });
@@ -16,7 +16,7 @@ export var setBaseUrl = function (publicKey) {
16
16
  axiosInstance.defaults.baseURL = ENDPOINT_PATHS.PRODUCTION_BASE_URL;
17
17
  return;
18
18
  }
19
- axiosInstance.defaults.baseURL = ENDPOINT_PATHS.DEV_BASE_URL;
19
+ axiosInstance.defaults.baseURL = ENDPOINT_PATHS.SANDBOX_BASE_URL;
20
20
  };
21
21
  export var updateLocationUrlWithCountry = function (countryIso2) {
22
22
  var country = countryIso2.toLowerCase();
@@ -35,7 +35,7 @@ export var updateLocationUrlWithCountry = function (countryIso2) {
35
35
  window.history.replaceState({}, '', newUrl);
36
36
  };
37
37
  export var openConnect = function (pk, countryCode) {
38
- var newUrl = new URL(pk.includes('pk_live') ? CONNECT_PROD_URL : CONNECT_DEV_URL);
38
+ var newUrl = new URL(pk.includes('pk_live') ? CONNECT_PROD_URL : CONNECT_SANDBOX_URL);
39
39
  if (countryCode) {
40
40
  newUrl.pathname = "/".concat(countryCode.toLowerCase());
41
41
  }
@@ -6,6 +6,7 @@ export declare const removeAllOtherThanAlphabetAndSpace: (str: string) => string
6
6
  export declare const removeAllNumberFromChars: (str: string) => string;
7
7
  export declare const keepEmailCharacters: (str: string) => string;
8
8
  export declare const removeAllOtherThanCharsAndNumber: (str: string) => string;
9
+ export declare const cleanFLandCRNumber: (str: string) => string;
9
10
  export declare const removeAllOtherThanCharsNumberSlashAndHyphen: (str: string) => string;
10
11
  export declare const removeAllOtherThanCharsNumbersAtAndDot: (str: string) => string;
11
12
  export declare const removeAllOtherThanCharsNumbersAndSpace: (str: string) => string;
@@ -22,6 +22,9 @@ export var keepEmailCharacters = function (str) {
22
22
  export var removeAllOtherThanCharsAndNumber = function (str) {
23
23
  return str.replace(/[^A-Za-z0-9]/g, '');
24
24
  };
25
+ export var cleanFLandCRNumber = function (str) {
26
+ return str.replace(/[^a-zA-Z0-9_-]/g, '');
27
+ };
25
28
  export var removeAllOtherThanCharsNumberSlashAndHyphen = function (str) {
26
29
  return str.replace(/[^A-Za-z0-9/-]/g, '');
27
30
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tap-payments/auth-jsconnect",
3
- "version": "2.8.65-development",
3
+ "version": "2.8.65-sandbox",
4
4
  "description": "connect library, auth",
5
5
  "private": false,
6
6
  "main": "build/index.js",
@@ -21,7 +21,7 @@
21
21
  "copy:files": "copyfiles -u 1 src/**/*.css build/",
22
22
  "tsc:alias": "tsc-alias -p tsconfig.json",
23
23
  "ts:build": "rm -rf build && tsc -p tsconfig.json && tsc-alias -p tsconfig.json && yarn copy:files",
24
- "push": "npm publish --access public --tag development"
24
+ "push": "npm publish --access public --tag sandbox"
25
25
  },
26
26
  "keywords": [],
27
27
  "author": {