@fctc/interface-logic 2.0.3 → 2.1.2

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/dist/configs.js CHANGED
@@ -2211,7 +2211,6 @@ var axiosClient = {
2211
2211
  const localStorage2 = config?.localStorageUtils ?? localStorageUtils();
2212
2212
  const sessionStorage2 = config?.sessionStorageUtils ?? sessionStorageUtils();
2213
2213
  const db = config?.db;
2214
- const database = config?.database;
2215
2214
  let isRefreshing = false;
2216
2215
  let failedQueue = [];
2217
2216
  const processQueue = (error, token = null) => {
@@ -2235,10 +2234,6 @@ var axiosClient = {
2235
2234
  if (useActionToken && actionToken) {
2236
2235
  config2.headers["Action-Token"] = actionToken;
2237
2236
  }
2238
- if (database) {
2239
- config2.headers["DATABASE"] = config2.database;
2240
- }
2241
- console.log("database", database);
2242
2237
  const getToken = useRefreshToken ? localStorage2.getRefreshToken : localStorage2.getAccessToken;
2243
2238
  const token = await getToken?.();
2244
2239
  if (token) config2.headers["Authorization"] = `Bearer ${token}`;
package/dist/configs.mjs CHANGED
@@ -2175,7 +2175,6 @@ var axiosClient = {
2175
2175
  const localStorage2 = config?.localStorageUtils ?? localStorageUtils();
2176
2176
  const sessionStorage2 = config?.sessionStorageUtils ?? sessionStorageUtils();
2177
2177
  const db = config?.db;
2178
- const database = config?.database;
2179
2178
  let isRefreshing = false;
2180
2179
  let failedQueue = [];
2181
2180
  const processQueue = (error, token = null) => {
@@ -2199,10 +2198,6 @@ var axiosClient = {
2199
2198
  if (useActionToken && actionToken) {
2200
2199
  config2.headers["Action-Token"] = actionToken;
2201
2200
  }
2202
- if (database) {
2203
- config2.headers["DATABASE"] = config2.database;
2204
- }
2205
- console.log("database", database);
2206
2201
  const getToken = useRefreshToken ? localStorage2.getRefreshToken : localStorage2.getAccessToken;
2207
2202
  const token = await getToken?.();
2208
2203
  if (token) config2.headers["Authorization"] = `Bearer ${token}`;
@@ -19,7 +19,6 @@ interface EnvConfig {
19
19
  companies?: any[];
20
20
  user?: any;
21
21
  db?: string;
22
- database?: string;
23
22
  refreshTokenEndpoint?: string;
24
23
  localStorageUtils?: LocalStorageUtilsType;
25
24
  sessionStorageUtils?: SessionStorageUtilsType;
@@ -19,7 +19,6 @@ interface EnvConfig {
19
19
  companies?: any[];
20
20
  user?: any;
21
21
  db?: string;
22
- database?: string;
23
22
  refreshTokenEndpoint?: string;
24
23
  localStorageUtils?: LocalStorageUtilsType;
25
24
  sessionStorageUtils?: SessionStorageUtilsType;
@@ -2213,7 +2213,6 @@ var axiosClient = {
2213
2213
  const localStorage2 = config?.localStorageUtils ?? localStorageUtils();
2214
2214
  const sessionStorage2 = config?.sessionStorageUtils ?? sessionStorageUtils();
2215
2215
  const db = config?.db;
2216
- const database = config?.database;
2217
2216
  let isRefreshing = false;
2218
2217
  let failedQueue = [];
2219
2218
  const processQueue = (error, token = null) => {
@@ -2237,10 +2236,6 @@ var axiosClient = {
2237
2236
  if (useActionToken && actionToken) {
2238
2237
  config2.headers["Action-Token"] = actionToken;
2239
2238
  }
2240
- if (database) {
2241
- config2.headers["DATABASE"] = config2.database;
2242
- }
2243
- console.log("database", database);
2244
2239
  const getToken = useRefreshToken ? localStorage2.getRefreshToken : localStorage2.getAccessToken;
2245
2240
  const token = await getToken?.();
2246
2241
  if (token) config2.headers["Authorization"] = `Bearer ${token}`;
@@ -2175,7 +2175,6 @@ var axiosClient = {
2175
2175
  const localStorage2 = config?.localStorageUtils ?? localStorageUtils();
2176
2176
  const sessionStorage2 = config?.sessionStorageUtils ?? sessionStorageUtils();
2177
2177
  const db = config?.db;
2178
- const database = config?.database;
2179
2178
  let isRefreshing = false;
2180
2179
  let failedQueue = [];
2181
2180
  const processQueue = (error, token = null) => {
@@ -2199,10 +2198,6 @@ var axiosClient = {
2199
2198
  if (useActionToken && actionToken) {
2200
2199
  config2.headers["Action-Token"] = actionToken;
2201
2200
  }
2202
- if (database) {
2203
- config2.headers["DATABASE"] = config2.database;
2204
- }
2205
- console.log("database", database);
2206
2201
  const getToken = useRefreshToken ? localStorage2.getRefreshToken : localStorage2.getAccessToken;
2207
2202
  const token = await getToken?.();
2208
2203
  if (token) config2.headers["Authorization"] = `Bearer ${token}`;
package/dist/hooks.d.mts CHANGED
@@ -314,7 +314,6 @@ declare const useSignInSSO: () => _tanstack_react_query.UseMutationResult<any, E
314
314
  client_id: string;
315
315
  response_type: string;
316
316
  path: string;
317
- scope: string;
318
317
  }, unknown>;
319
318
 
320
319
  declare const useVerify2FA: () => _tanstack_react_query.UseMutationResult<unknown, Error, {
package/dist/hooks.d.ts CHANGED
@@ -314,7 +314,6 @@ declare const useSignInSSO: () => _tanstack_react_query.UseMutationResult<any, E
314
314
  client_id: string;
315
315
  response_type: string;
316
316
  path: string;
317
- scope: string;
318
317
  }, unknown>;
319
318
 
320
319
  declare const useVerify2FA: () => _tanstack_react_query.UseMutationResult<unknown, Error, {
package/dist/hooks.js CHANGED
@@ -3342,11 +3342,7 @@ function useExcelService() {
3342
3342
  const { env } = useEnv();
3343
3343
  const uploadFile = (0, import_react9.useCallback)(
3344
3344
  async ({ formData }) => {
3345
- return env.requests.post("/upload/file" /* UPLOAD_FILE_PATH */, formData, {
3346
- headers: {
3347
- "Content-Type": "multipart/form-data"
3348
- }
3349
- });
3345
+ return env.requests.post("/upload/file" /* UPLOAD_FILE_PATH */, formData);
3350
3346
  },
3351
3347
  [env]
3352
3348
  );
@@ -3591,11 +3587,7 @@ function useFormService() {
3591
3587
  );
3592
3588
  const uploadImage = (0, import_react10.useCallback)(
3593
3589
  async ({ data }) => {
3594
- return env.requests.post("/mail/attachment/upload" /* UPLOAD_IMAGE */, data, {
3595
- headers: {
3596
- "Content-Type": "multipart/form-data"
3597
- }
3598
- });
3590
+ return env.requests.post("/mail/attachment/upload" /* UPLOAD_IMAGE */, data);
3599
3591
  },
3600
3592
  [env]
3601
3593
  );
@@ -4449,25 +4441,18 @@ function useViewService() {
4449
4441
  redirect_uri,
4450
4442
  state,
4451
4443
  client_id,
4452
- response_type,
4453
- path,
4454
- scope
4444
+ response_type
4455
4445
  }) => {
4456
- const params = new URLSearchParams({
4457
- response_type,
4458
- client_id,
4446
+ const jsonData = {
4459
4447
  redirect_uri,
4460
- state
4461
- });
4462
- const queryString = `${params.toString()}&scope=${encodeURIComponent(
4463
- scope
4464
- )}`;
4465
- const url = `${path}?${queryString}`;
4466
- return env?.requests.get(url, {
4448
+ state,
4449
+ client_id,
4450
+ response_type
4451
+ };
4452
+ return env?.requests.get("/signin-sso/oauth" /* SIGNIN_SSO */, jsonData, {
4467
4453
  headers: {
4468
- "Content-Type": "application/json"
4469
- },
4470
- withCredentials: true
4454
+ credentials: "include"
4455
+ }
4471
4456
  });
4472
4457
  },
4473
4458
  [env]
@@ -5684,16 +5669,13 @@ var useSignInSSO = () => {
5684
5669
  state,
5685
5670
  client_id,
5686
5671
  response_type,
5687
- path,
5688
- scope
5672
+ path
5689
5673
  }) => {
5690
5674
  return signInSSO({
5691
5675
  redirect_uri,
5692
5676
  state,
5693
5677
  client_id,
5694
- response_type,
5695
- path,
5696
- scope
5678
+ response_type
5697
5679
  });
5698
5680
  }
5699
5681
  });
package/dist/hooks.mjs CHANGED
@@ -3239,11 +3239,7 @@ function useExcelService() {
3239
3239
  const { env } = useEnv();
3240
3240
  const uploadFile = useCallback5(
3241
3241
  async ({ formData }) => {
3242
- return env.requests.post("/upload/file" /* UPLOAD_FILE_PATH */, formData, {
3243
- headers: {
3244
- "Content-Type": "multipart/form-data"
3245
- }
3246
- });
3242
+ return env.requests.post("/upload/file" /* UPLOAD_FILE_PATH */, formData);
3247
3243
  },
3248
3244
  [env]
3249
3245
  );
@@ -3488,11 +3484,7 @@ function useFormService() {
3488
3484
  );
3489
3485
  const uploadImage = useCallback6(
3490
3486
  async ({ data }) => {
3491
- return env.requests.post("/mail/attachment/upload" /* UPLOAD_IMAGE */, data, {
3492
- headers: {
3493
- "Content-Type": "multipart/form-data"
3494
- }
3495
- });
3487
+ return env.requests.post("/mail/attachment/upload" /* UPLOAD_IMAGE */, data);
3496
3488
  },
3497
3489
  [env]
3498
3490
  );
@@ -4346,25 +4338,18 @@ function useViewService() {
4346
4338
  redirect_uri,
4347
4339
  state,
4348
4340
  client_id,
4349
- response_type,
4350
- path,
4351
- scope
4341
+ response_type
4352
4342
  }) => {
4353
- const params = new URLSearchParams({
4354
- response_type,
4355
- client_id,
4343
+ const jsonData = {
4356
4344
  redirect_uri,
4357
- state
4358
- });
4359
- const queryString = `${params.toString()}&scope=${encodeURIComponent(
4360
- scope
4361
- )}`;
4362
- const url = `${path}?${queryString}`;
4363
- return env?.requests.get(url, {
4345
+ state,
4346
+ client_id,
4347
+ response_type
4348
+ };
4349
+ return env?.requests.get("/signin-sso/oauth" /* SIGNIN_SSO */, jsonData, {
4364
4350
  headers: {
4365
- "Content-Type": "application/json"
4366
- },
4367
- withCredentials: true
4351
+ credentials: "include"
4352
+ }
4368
4353
  });
4369
4354
  },
4370
4355
  [env]
@@ -5581,16 +5566,13 @@ var useSignInSSO = () => {
5581
5566
  state,
5582
5567
  client_id,
5583
5568
  response_type,
5584
- path,
5585
- scope
5569
+ path
5586
5570
  }) => {
5587
5571
  return signInSSO({
5588
5572
  redirect_uri,
5589
5573
  state,
5590
5574
  client_id,
5591
- response_type,
5592
- path,
5593
- scope
5575
+ response_type
5594
5576
  });
5595
5577
  }
5596
5578
  });
@@ -1,4 +1,3 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
1
  import { ReactNode } from 'react';
3
2
  import { L as LocalStorageUtilsType, S as SessionStorageUtilsType } from './session-storage-ARp_lhTD.mjs';
4
3
  import { useForgotPassword, useForgotPasswordSSO, useGetProvider, useIsValidToken, useLoginCredential, useLoginSocial, useResetPassword, useResetPasswordSSO, useUpdatePassword, useLogout, useGetAccessByCode, useValidateActionToken, useGetCompanyInfo, useGetCurrentCompany, useGetListCompany, useExecuteImport, useExportExcel, useGetFieldExport, useGetFileExcel, useParsePreview, useUploadFile, useUploadIdFile, useChangeStatus, useDeleteComment, useGetComment, useGetFormView, useGetImage, useSendComment, useUploadImage, useDelete, useGetAll, useGetConversionRate, useGetCurrency, useGetDetail, useGetFieldOnChange, useGetListMyBankAccount, useModel, useOdooDataTransform, useOnChangeForm, useSave, useGetProfile, useGetUser, useSwitchLocale, useButton, useDuplicateRecord, useGet2FAMethods, useGetActionDetail, useGetCalendar, useGetGroups, useGetListData, useGetMenu, useGetPrintReport, useGetProGressBar, useGetResequence, useGetSelection, useGetView, useLoadAction, useLoadMessage, usePrint, useRemoveRow, useRunAction, useSignInSSO, useVerify2FA, useGrantAccess, useRemoveTotpSetup, useRequestSetupTotp, useSettingsWebRead2fa, useVerifyTotp } from './hooks.mjs';
@@ -7,15 +6,15 @@ import './view-type-BGJfDe73.mjs';
7
6
 
8
7
  declare const MainProvider: ({ children }: {
9
8
  children: ReactNode;
10
- }) => react_jsx_runtime.JSX.Element;
9
+ }) => JSX.Element;
11
10
 
12
11
  declare const ReactQueryProvider: ({ children }: {
13
12
  children: ReactNode;
14
- }) => react_jsx_runtime.JSX.Element;
13
+ }) => JSX.Element;
15
14
 
16
15
  declare const VersionGate: ({ children }: {
17
16
  children: ReactNode;
18
- }) => react_jsx_runtime.JSX.Element | null;
17
+ }) => JSX.Element | null;
19
18
 
20
19
  interface EnvConfig {
21
20
  env?: any;
@@ -46,7 +45,7 @@ declare function EnvProvider({ children, localStorageUtils: localStorageUtil, se
46
45
  children: React.ReactNode;
47
46
  localStorageUtils?: LocalStorageUtilsType;
48
47
  sessionStorageUtils?: SessionStorageUtilsType;
49
- }): react_jsx_runtime.JSX.Element;
48
+ }): JSX.Element;
50
49
  declare function useEnv(): {
51
50
  env: EnvConfig;
52
51
  setupEnv: (envConfig: Partial<EnvConfig>) => EnvConfig;
@@ -132,12 +131,12 @@ interface ServiceContextType {
132
131
  }
133
132
  declare const ServiceProvider: ({ children, }: {
134
133
  children: React.ReactNode;
135
- }) => react_jsx_runtime.JSX.Element;
134
+ }) => JSX.Element;
136
135
  declare const useService: () => ServiceContextType;
137
136
 
138
137
  type MetaProviderProps = {
139
138
  children: ReactNode;
140
139
  };
141
- declare const MetaProvider: ({ children }: MetaProviderProps) => react_jsx_runtime.JSX.Element;
140
+ declare const MetaProvider: ({ children }: MetaProviderProps) => JSX.Element;
142
141
 
143
142
  export { EnvProvider, MainProvider, MetaProvider, ReactQueryProvider, ServiceProvider, VersionGate, useEnv, useService };
@@ -1,4 +1,3 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
1
  import { ReactNode } from 'react';
3
2
  import { L as LocalStorageUtilsType, S as SessionStorageUtilsType } from './session-storage-ARp_lhTD.js';
4
3
  import { useForgotPassword, useForgotPasswordSSO, useGetProvider, useIsValidToken, useLoginCredential, useLoginSocial, useResetPassword, useResetPasswordSSO, useUpdatePassword, useLogout, useGetAccessByCode, useValidateActionToken, useGetCompanyInfo, useGetCurrentCompany, useGetListCompany, useExecuteImport, useExportExcel, useGetFieldExport, useGetFileExcel, useParsePreview, useUploadFile, useUploadIdFile, useChangeStatus, useDeleteComment, useGetComment, useGetFormView, useGetImage, useSendComment, useUploadImage, useDelete, useGetAll, useGetConversionRate, useGetCurrency, useGetDetail, useGetFieldOnChange, useGetListMyBankAccount, useModel, useOdooDataTransform, useOnChangeForm, useSave, useGetProfile, useGetUser, useSwitchLocale, useButton, useDuplicateRecord, useGet2FAMethods, useGetActionDetail, useGetCalendar, useGetGroups, useGetListData, useGetMenu, useGetPrintReport, useGetProGressBar, useGetResequence, useGetSelection, useGetView, useLoadAction, useLoadMessage, usePrint, useRemoveRow, useRunAction, useSignInSSO, useVerify2FA, useGrantAccess, useRemoveTotpSetup, useRequestSetupTotp, useSettingsWebRead2fa, useVerifyTotp } from './hooks.js';
@@ -7,15 +6,15 @@ import './view-type-BGJfDe73.js';
7
6
 
8
7
  declare const MainProvider: ({ children }: {
9
8
  children: ReactNode;
10
- }) => react_jsx_runtime.JSX.Element;
9
+ }) => JSX.Element;
11
10
 
12
11
  declare const ReactQueryProvider: ({ children }: {
13
12
  children: ReactNode;
14
- }) => react_jsx_runtime.JSX.Element;
13
+ }) => JSX.Element;
15
14
 
16
15
  declare const VersionGate: ({ children }: {
17
16
  children: ReactNode;
18
- }) => react_jsx_runtime.JSX.Element | null;
17
+ }) => JSX.Element | null;
19
18
 
20
19
  interface EnvConfig {
21
20
  env?: any;
@@ -46,7 +45,7 @@ declare function EnvProvider({ children, localStorageUtils: localStorageUtil, se
46
45
  children: React.ReactNode;
47
46
  localStorageUtils?: LocalStorageUtilsType;
48
47
  sessionStorageUtils?: SessionStorageUtilsType;
49
- }): react_jsx_runtime.JSX.Element;
48
+ }): JSX.Element;
50
49
  declare function useEnv(): {
51
50
  env: EnvConfig;
52
51
  setupEnv: (envConfig: Partial<EnvConfig>) => EnvConfig;
@@ -132,12 +131,12 @@ interface ServiceContextType {
132
131
  }
133
132
  declare const ServiceProvider: ({ children, }: {
134
133
  children: React.ReactNode;
135
- }) => react_jsx_runtime.JSX.Element;
134
+ }) => JSX.Element;
136
135
  declare const useService: () => ServiceContextType;
137
136
 
138
137
  type MetaProviderProps = {
139
138
  children: ReactNode;
140
139
  };
141
- declare const MetaProvider: ({ children }: MetaProviderProps) => react_jsx_runtime.JSX.Element;
140
+ declare const MetaProvider: ({ children }: MetaProviderProps) => JSX.Element;
142
141
 
143
142
  export { EnvProvider, MainProvider, MetaProvider, ReactQueryProvider, ServiceProvider, VersionGate, useEnv, useService };
package/dist/provider.js CHANGED
@@ -3291,11 +3291,7 @@ function useExcelService() {
3291
3291
  const { env } = useEnv();
3292
3292
  const uploadFile = (0, import_react5.useCallback)(
3293
3293
  async ({ formData }) => {
3294
- return env.requests.post("/upload/file" /* UPLOAD_FILE_PATH */, formData, {
3295
- headers: {
3296
- "Content-Type": "multipart/form-data"
3297
- }
3298
- });
3294
+ return env.requests.post("/upload/file" /* UPLOAD_FILE_PATH */, formData);
3299
3295
  },
3300
3296
  [env]
3301
3297
  );
@@ -3540,11 +3536,7 @@ function useFormService() {
3540
3536
  );
3541
3537
  const uploadImage = (0, import_react6.useCallback)(
3542
3538
  async ({ data }) => {
3543
- return env.requests.post("/mail/attachment/upload" /* UPLOAD_IMAGE */, data, {
3544
- headers: {
3545
- "Content-Type": "multipart/form-data"
3546
- }
3547
- });
3539
+ return env.requests.post("/mail/attachment/upload" /* UPLOAD_IMAGE */, data);
3548
3540
  },
3549
3541
  [env]
3550
3542
  );
@@ -4398,25 +4390,18 @@ function useViewService() {
4398
4390
  redirect_uri,
4399
4391
  state,
4400
4392
  client_id,
4401
- response_type,
4402
- path,
4403
- scope
4393
+ response_type
4404
4394
  }) => {
4405
- const params = new URLSearchParams({
4406
- response_type,
4407
- client_id,
4395
+ const jsonData = {
4408
4396
  redirect_uri,
4409
- state
4410
- });
4411
- const queryString = `${params.toString()}&scope=${encodeURIComponent(
4412
- scope
4413
- )}`;
4414
- const url = `${path}?${queryString}`;
4415
- return env?.requests.get(url, {
4397
+ state,
4398
+ client_id,
4399
+ response_type
4400
+ };
4401
+ return env?.requests.get("/signin-sso/oauth" /* SIGNIN_SSO */, jsonData, {
4416
4402
  headers: {
4417
- "Content-Type": "application/json"
4418
- },
4419
- withCredentials: true
4403
+ credentials: "include"
4404
+ }
4420
4405
  });
4421
4406
  },
4422
4407
  [env]
@@ -4592,7 +4577,6 @@ var axiosClient = {
4592
4577
  const localStorage2 = config?.localStorageUtils ?? localStorageUtils();
4593
4578
  const sessionStorage2 = config?.sessionStorageUtils ?? sessionStorageUtils();
4594
4579
  const db = config?.db;
4595
- const database = config?.database;
4596
4580
  let isRefreshing = false;
4597
4581
  let failedQueue = [];
4598
4582
  const processQueue = (error, token = null) => {
@@ -4616,10 +4600,6 @@ var axiosClient = {
4616
4600
  if (useActionToken && actionToken) {
4617
4601
  config2.headers["Action-Token"] = actionToken;
4618
4602
  }
4619
- if (database) {
4620
- config2.headers["DATABASE"] = config2.database;
4621
- }
4622
- console.log("database", database);
4623
4603
  const getToken = useRefreshToken ? localStorage2.getRefreshToken : localStorage2.getAccessToken;
4624
4604
  const token = await getToken?.();
4625
4605
  if (token) config2.headers["Authorization"] = `Bearer ${token}`;
@@ -6020,16 +6000,13 @@ var useSignInSSO = () => {
6020
6000
  state,
6021
6001
  client_id,
6022
6002
  response_type,
6023
- path,
6024
- scope
6003
+ path
6025
6004
  }) => {
6026
6005
  return signInSSO({
6027
6006
  redirect_uri,
6028
6007
  state,
6029
6008
  client_id,
6030
- response_type,
6031
- path,
6032
- scope
6009
+ response_type
6033
6010
  });
6034
6011
  }
6035
6012
  });
package/dist/provider.mjs CHANGED
@@ -3248,11 +3248,7 @@ function useExcelService() {
3248
3248
  const { env } = useEnv();
3249
3249
  const uploadFile = useCallback4(
3250
3250
  async ({ formData }) => {
3251
- return env.requests.post("/upload/file" /* UPLOAD_FILE_PATH */, formData, {
3252
- headers: {
3253
- "Content-Type": "multipart/form-data"
3254
- }
3255
- });
3251
+ return env.requests.post("/upload/file" /* UPLOAD_FILE_PATH */, formData);
3256
3252
  },
3257
3253
  [env]
3258
3254
  );
@@ -3497,11 +3493,7 @@ function useFormService() {
3497
3493
  );
3498
3494
  const uploadImage = useCallback5(
3499
3495
  async ({ data }) => {
3500
- return env.requests.post("/mail/attachment/upload" /* UPLOAD_IMAGE */, data, {
3501
- headers: {
3502
- "Content-Type": "multipart/form-data"
3503
- }
3504
- });
3496
+ return env.requests.post("/mail/attachment/upload" /* UPLOAD_IMAGE */, data);
3505
3497
  },
3506
3498
  [env]
3507
3499
  );
@@ -4355,25 +4347,18 @@ function useViewService() {
4355
4347
  redirect_uri,
4356
4348
  state,
4357
4349
  client_id,
4358
- response_type,
4359
- path,
4360
- scope
4350
+ response_type
4361
4351
  }) => {
4362
- const params = new URLSearchParams({
4363
- response_type,
4364
- client_id,
4352
+ const jsonData = {
4365
4353
  redirect_uri,
4366
- state
4367
- });
4368
- const queryString = `${params.toString()}&scope=${encodeURIComponent(
4369
- scope
4370
- )}`;
4371
- const url = `${path}?${queryString}`;
4372
- return env?.requests.get(url, {
4354
+ state,
4355
+ client_id,
4356
+ response_type
4357
+ };
4358
+ return env?.requests.get("/signin-sso/oauth" /* SIGNIN_SSO */, jsonData, {
4373
4359
  headers: {
4374
- "Content-Type": "application/json"
4375
- },
4376
- withCredentials: true
4360
+ credentials: "include"
4361
+ }
4377
4362
  });
4378
4363
  },
4379
4364
  [env]
@@ -4549,7 +4534,6 @@ var axiosClient = {
4549
4534
  const localStorage2 = config?.localStorageUtils ?? localStorageUtils();
4550
4535
  const sessionStorage2 = config?.sessionStorageUtils ?? sessionStorageUtils();
4551
4536
  const db = config?.db;
4552
- const database = config?.database;
4553
4537
  let isRefreshing = false;
4554
4538
  let failedQueue = [];
4555
4539
  const processQueue = (error, token = null) => {
@@ -4573,10 +4557,6 @@ var axiosClient = {
4573
4557
  if (useActionToken && actionToken) {
4574
4558
  config2.headers["Action-Token"] = actionToken;
4575
4559
  }
4576
- if (database) {
4577
- config2.headers["DATABASE"] = config2.database;
4578
- }
4579
- console.log("database", database);
4580
4560
  const getToken = useRefreshToken ? localStorage2.getRefreshToken : localStorage2.getAccessToken;
4581
4561
  const token = await getToken?.();
4582
4562
  if (token) config2.headers["Authorization"] = `Bearer ${token}`;
@@ -5977,16 +5957,13 @@ var useSignInSSO = () => {
5977
5957
  state,
5978
5958
  client_id,
5979
5959
  response_type,
5980
- path,
5981
- scope
5960
+ path
5982
5961
  }) => {
5983
5962
  return signInSSO({
5984
5963
  redirect_uri,
5985
5964
  state,
5986
5965
  client_id,
5987
- response_type,
5988
- path,
5989
- scope
5966
+ response_type
5990
5967
  });
5991
5968
  }
5992
5969
  });
@@ -229,13 +229,11 @@ declare function useViewService(): {
229
229
  kwargs: any;
230
230
  model: string;
231
231
  }) => Promise<any>;
232
- signInSSO: ({ redirect_uri, state, client_id, response_type, path, scope, }: {
232
+ signInSSO: ({ redirect_uri, state, client_id, response_type, }: {
233
233
  redirect_uri: string;
234
234
  state: string;
235
235
  client_id: string;
236
236
  response_type: string;
237
- path: string;
238
- scope: string;
239
237
  }) => Promise<any>;
240
238
  verify2FA: ({ method, with_context, code, device, location, }: {
241
239
  method: string;
@@ -229,13 +229,11 @@ declare function useViewService(): {
229
229
  kwargs: any;
230
230
  model: string;
231
231
  }) => Promise<any>;
232
- signInSSO: ({ redirect_uri, state, client_id, response_type, path, scope, }: {
232
+ signInSSO: ({ redirect_uri, state, client_id, response_type, }: {
233
233
  redirect_uri: string;
234
234
  state: string;
235
235
  client_id: string;
236
236
  response_type: string;
237
- path: string;
238
- scope: string;
239
237
  }) => Promise<any>;
240
238
  verify2FA: ({ method, with_context, code, device, location, }: {
241
239
  method: string;
package/dist/services.js CHANGED
@@ -3458,11 +3458,7 @@ function useExcelService() {
3458
3458
  const { env } = useEnv();
3459
3459
  const uploadFile = (0, import_react9.useCallback)(
3460
3460
  async ({ formData }) => {
3461
- return env.requests.post("/upload/file" /* UPLOAD_FILE_PATH */, formData, {
3462
- headers: {
3463
- "Content-Type": "multipart/form-data"
3464
- }
3465
- });
3461
+ return env.requests.post("/upload/file" /* UPLOAD_FILE_PATH */, formData);
3466
3462
  },
3467
3463
  [env]
3468
3464
  );
@@ -3707,11 +3703,7 @@ function useFormService() {
3707
3703
  );
3708
3704
  const uploadImage = (0, import_react10.useCallback)(
3709
3705
  async ({ data }) => {
3710
- return env.requests.post("/mail/attachment/upload" /* UPLOAD_IMAGE */, data, {
3711
- headers: {
3712
- "Content-Type": "multipart/form-data"
3713
- }
3714
- });
3706
+ return env.requests.post("/mail/attachment/upload" /* UPLOAD_IMAGE */, data);
3715
3707
  },
3716
3708
  [env]
3717
3709
  );
@@ -4565,25 +4557,18 @@ function useViewService() {
4565
4557
  redirect_uri,
4566
4558
  state,
4567
4559
  client_id,
4568
- response_type,
4569
- path,
4570
- scope
4560
+ response_type
4571
4561
  }) => {
4572
- const params = new URLSearchParams({
4573
- response_type,
4574
- client_id,
4562
+ const jsonData = {
4575
4563
  redirect_uri,
4576
- state
4577
- });
4578
- const queryString = `${params.toString()}&scope=${encodeURIComponent(
4579
- scope
4580
- )}`;
4581
- const url = `${path}?${queryString}`;
4582
- return env?.requests.get(url, {
4564
+ state,
4565
+ client_id,
4566
+ response_type
4567
+ };
4568
+ return env?.requests.get("/signin-sso/oauth" /* SIGNIN_SSO */, jsonData, {
4583
4569
  headers: {
4584
- "Content-Type": "application/json"
4585
- },
4586
- withCredentials: true
4570
+ credentials: "include"
4571
+ }
4587
4572
  });
4588
4573
  },
4589
4574
  [env]
package/dist/services.mjs CHANGED
@@ -3414,11 +3414,7 @@ function useExcelService() {
3414
3414
  const { env } = useEnv();
3415
3415
  const uploadFile = useCallback5(
3416
3416
  async ({ formData }) => {
3417
- return env.requests.post("/upload/file" /* UPLOAD_FILE_PATH */, formData, {
3418
- headers: {
3419
- "Content-Type": "multipart/form-data"
3420
- }
3421
- });
3417
+ return env.requests.post("/upload/file" /* UPLOAD_FILE_PATH */, formData);
3422
3418
  },
3423
3419
  [env]
3424
3420
  );
@@ -3663,11 +3659,7 @@ function useFormService() {
3663
3659
  );
3664
3660
  const uploadImage = useCallback6(
3665
3661
  async ({ data }) => {
3666
- return env.requests.post("/mail/attachment/upload" /* UPLOAD_IMAGE */, data, {
3667
- headers: {
3668
- "Content-Type": "multipart/form-data"
3669
- }
3670
- });
3662
+ return env.requests.post("/mail/attachment/upload" /* UPLOAD_IMAGE */, data);
3671
3663
  },
3672
3664
  [env]
3673
3665
  );
@@ -4521,25 +4513,18 @@ function useViewService() {
4521
4513
  redirect_uri,
4522
4514
  state,
4523
4515
  client_id,
4524
- response_type,
4525
- path,
4526
- scope
4516
+ response_type
4527
4517
  }) => {
4528
- const params = new URLSearchParams({
4529
- response_type,
4530
- client_id,
4518
+ const jsonData = {
4531
4519
  redirect_uri,
4532
- state
4533
- });
4534
- const queryString = `${params.toString()}&scope=${encodeURIComponent(
4535
- scope
4536
- )}`;
4537
- const url = `${path}?${queryString}`;
4538
- return env?.requests.get(url, {
4520
+ state,
4521
+ client_id,
4522
+ response_type
4523
+ };
4524
+ return env?.requests.get("/signin-sso/oauth" /* SIGNIN_SSO */, jsonData, {
4539
4525
  headers: {
4540
- "Content-Type": "application/json"
4541
- },
4542
- withCredentials: true
4526
+ credentials: "include"
4527
+ }
4543
4528
  });
4544
4529
  },
4545
4530
  [env]
package/package.json CHANGED
@@ -1,85 +1,85 @@
1
- {
2
- "name": "@fctc/interface-logic",
3
- "version": "2.0.3",
4
- "types": "dist/index.d.ts",
5
- "main": "dist/index.cjs",
6
- "module": "dist/index.mjs",
7
- "exports": {
8
- ".": {
9
- "types": "./dist/index.d.ts",
10
- "import": "./dist/index.mjs",
11
- "require": "./dist/index.cjs"
12
- },
13
- "./configs": {
14
- "types": "./dist/configs.d.ts",
15
- "import": "./dist/configs.mjs",
16
- "require": "./dist/configs.cjs"
17
- },
18
- "./constants": {
19
- "types": "./dist/constants.d.ts",
20
- "import": "./dist/constants.mjs",
21
- "require": "./dist/constants.cjs"
22
- },
23
- "./environment": {
24
- "types": "./dist/environment.d.ts",
25
- "import": "./dist/environment.mjs",
26
- "require": "./dist/environment.cjs"
27
- },
28
- "./hooks": {
29
- "types": "./dist/hooks.d.ts",
30
- "import": "./dist/hooks.mjs",
31
- "require": "./dist/hooks.cjs"
32
- },
33
- "./provider": {
34
- "types": "./dist/provider.d.ts",
35
- "import": "./dist/provider.mjs",
36
- "require": "./dist/provider.cjs"
37
- },
38
- "./services": {
39
- "types": "./dist/services.d.ts",
40
- "import": "./dist/services.mjs",
41
- "require": "./dist/services.cjs"
42
- },
43
- "./store": {
44
- "types": "./dist/store.d.ts",
45
- "import": "./dist/store.mjs",
46
- "require": "./dist/store.cjs"
47
- },
48
- "./utils": {
49
- "types": "./dist/utils.d.ts",
50
- "import": "./dist/utils.mjs",
51
- "require": "./dist/utils.cjs"
52
- },
53
- "./types": {
54
- "types": "./dist/types.d.ts",
55
- "import": "./dist/types.mjs",
56
- "require": "./dist/types.cjs"
57
- }
58
- },
59
- "files": [
60
- "dist"
61
- ],
62
- "scripts": {
63
- "build": "tsup",
64
- "test": "jest"
65
- },
66
- "peerDependencies": {
67
- "react": "18.0.0",
68
- "@tanstack/react-query": "^5.83.0"
69
- },
70
- "dependencies": {
71
- "@reduxjs/toolkit": "^2.8.2",
72
- "@tanstack/react-query": "^5.83.0",
73
- "axios": "^1.11.0",
74
- "moment": "^2.30.1",
75
- "react-redux": "^9.2.0"
76
- },
77
- "devDependencies": {
78
- "@types/react": "^18.3.1",
79
- "react": "18.0.0",
80
- "jest": "^29.7.0",
81
- "tsup": "^8.0.0",
82
- "typescript": "^5.8.2"
83
- },
84
- "packageManager": "yarn@1.22.0"
85
- }
1
+ {
2
+ "name": "@fctc/interface-logic",
3
+ "version": "2.1.2",
4
+ "types": "dist/index.d.ts",
5
+ "main": "dist/index.cjs",
6
+ "module": "dist/index.mjs",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./dist/index.d.ts",
10
+ "import": "./dist/index.mjs",
11
+ "require": "./dist/index.cjs"
12
+ },
13
+ "./configs": {
14
+ "types": "./dist/configs.d.ts",
15
+ "import": "./dist/configs.mjs",
16
+ "require": "./dist/configs.cjs"
17
+ },
18
+ "./constants": {
19
+ "types": "./dist/constants.d.ts",
20
+ "import": "./dist/constants.mjs",
21
+ "require": "./dist/constants.cjs"
22
+ },
23
+ "./environment": {
24
+ "types": "./dist/environment.d.ts",
25
+ "import": "./dist/environment.mjs",
26
+ "require": "./dist/environment.cjs"
27
+ },
28
+ "./hooks": {
29
+ "types": "./dist/hooks.d.ts",
30
+ "import": "./dist/hooks.mjs",
31
+ "require": "./dist/hooks.cjs"
32
+ },
33
+ "./provider": {
34
+ "types": "./dist/provider.d.ts",
35
+ "import": "./dist/provider.mjs",
36
+ "require": "./dist/provider.cjs"
37
+ },
38
+ "./services": {
39
+ "types": "./dist/services.d.ts",
40
+ "import": "./dist/services.mjs",
41
+ "require": "./dist/services.cjs"
42
+ },
43
+ "./store": {
44
+ "types": "./dist/store.d.ts",
45
+ "import": "./dist/store.mjs",
46
+ "require": "./dist/store.cjs"
47
+ },
48
+ "./utils": {
49
+ "types": "./dist/utils.d.ts",
50
+ "import": "./dist/utils.mjs",
51
+ "require": "./dist/utils.cjs"
52
+ },
53
+ "./types": {
54
+ "types": "./dist/types.d.ts",
55
+ "import": "./dist/types.mjs",
56
+ "require": "./dist/types.cjs"
57
+ }
58
+ },
59
+ "files": [
60
+ "dist"
61
+ ],
62
+ "scripts": {
63
+ "build": "tsup",
64
+ "test": "jest"
65
+ },
66
+ "peerDependencies": {
67
+ "react": "18.0.0",
68
+ "@tanstack/react-query": "^5.83.0"
69
+ },
70
+ "dependencies": {
71
+ "@reduxjs/toolkit": "^2.8.2",
72
+ "@tanstack/react-query": "^5.83.0",
73
+ "axios": "^1.11.0",
74
+ "moment": "^2.30.1",
75
+ "react-redux": "^9.2.0"
76
+ },
77
+ "devDependencies": {
78
+ "@types/react": "^18.3.1",
79
+ "react": "18.0.0",
80
+ "jest": "^29.7.0",
81
+ "tsup": "^8.0.0",
82
+ "typescript": "^5.8.2"
83
+ },
84
+ "packageManager": "yarn@1.22.0"
85
+ }