@fctc/interface-logic 2.9.8 → 2.9.9
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.d.mts +1 -3
- package/dist/configs.d.ts +1 -3
- package/dist/configs.js +3 -943
- package/dist/configs.mjs +3 -943
- package/dist/environment.d.mts +53 -1
- package/dist/environment.d.ts +53 -1
- package/dist/environment.js +3 -943
- package/dist/environment.mjs +3 -943
- package/dist/provider.d.mts +28 -1
- package/dist/provider.d.ts +28 -1
- package/dist/provider.js +1 -3
- package/dist/provider.mjs +1 -3
- package/dist/session-storage-DP3fkZ2Q.d.mts +25 -0
- package/dist/session-storage-DP3fkZ2Q.d.ts +25 -0
- package/package.json +1 -1
- package/dist/environment-BSFa-Jcm.d.mts +0 -77
- package/dist/environment-BSFa-Jcm.d.ts +0 -77
package/dist/provider.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
import { L as LocalStorageUtilsType, S as SessionStorageUtilsType
|
|
3
|
+
import { L as LocalStorageUtilsType, S as SessionStorageUtilsType } from './session-storage-DP3fkZ2Q.mjs';
|
|
4
4
|
import { useForgotPassword, useForgotPasswordSSO, useGetProvider, useIsValidToken, useLoginCredential, useLoginSocial, useResetPassword, useResetPasswordSSO, useUpdatePassword, useLogout, useGetAccessByCode, useValidateActionToken, useGetCompanyInfo, useGetCurrentCompany, useGetListCompany, useExecuteImport, useExportExcel, useGetFieldExport, useGetFileExcel, useParsePreview, useUploadFileExcel, 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, useUploadFile, useCreateEntity, useGetASession, useCreateSession, useDeleteEntity, useGetList, useGetPos, useHandleClosingSession, useManageSession, useUpdateClosedSession, useUpdateEntity, useLoadDataPosSession, useManageOnChange, useGenSerialNumber, useGetOrderLine, useGetProductImage, useAddEntity, useCheckPayment } from './hooks.mjs';
|
|
5
5
|
import '@tanstack/react-query';
|
|
6
6
|
import './view-type-xxw9OeSR.mjs';
|
|
@@ -19,6 +19,33 @@ declare const VersionGate: ({ children }: {
|
|
|
19
19
|
children: ReactNode;
|
|
20
20
|
}) => react_jsx_runtime.JSX.Element | null;
|
|
21
21
|
|
|
22
|
+
interface EnvConfig {
|
|
23
|
+
env?: any;
|
|
24
|
+
baseUrl?: string;
|
|
25
|
+
requests?: any;
|
|
26
|
+
default_service?: string;
|
|
27
|
+
context?: {
|
|
28
|
+
uid?: number | null;
|
|
29
|
+
allowed_company_ids?: number[];
|
|
30
|
+
lang?: string;
|
|
31
|
+
tz?: string;
|
|
32
|
+
};
|
|
33
|
+
defaultCompany?: {
|
|
34
|
+
id?: number | null;
|
|
35
|
+
logo?: string;
|
|
36
|
+
secondary_color?: string;
|
|
37
|
+
primary_color?: string;
|
|
38
|
+
};
|
|
39
|
+
config?: any;
|
|
40
|
+
companies?: any[];
|
|
41
|
+
user?: any;
|
|
42
|
+
db?: string;
|
|
43
|
+
refreshTokenEndpoint?: string;
|
|
44
|
+
localStorageUtils?: LocalStorageUtilsType;
|
|
45
|
+
sessionStorageUtils?: SessionStorageUtilsType;
|
|
46
|
+
envFile?: any;
|
|
47
|
+
xNode?: string;
|
|
48
|
+
}
|
|
22
49
|
declare function EnvProvider({ children, localStorageUtils: localStorageUtil, sessionStorageUtils: sessionStorageUtil, }: {
|
|
23
50
|
children: React.ReactNode;
|
|
24
51
|
localStorageUtils?: LocalStorageUtilsType;
|
package/dist/provider.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
import { L as LocalStorageUtilsType, S as SessionStorageUtilsType
|
|
3
|
+
import { L as LocalStorageUtilsType, S as SessionStorageUtilsType } from './session-storage-DP3fkZ2Q.js';
|
|
4
4
|
import { useForgotPassword, useForgotPasswordSSO, useGetProvider, useIsValidToken, useLoginCredential, useLoginSocial, useResetPassword, useResetPasswordSSO, useUpdatePassword, useLogout, useGetAccessByCode, useValidateActionToken, useGetCompanyInfo, useGetCurrentCompany, useGetListCompany, useExecuteImport, useExportExcel, useGetFieldExport, useGetFileExcel, useParsePreview, useUploadFileExcel, 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, useUploadFile, useCreateEntity, useGetASession, useCreateSession, useDeleteEntity, useGetList, useGetPos, useHandleClosingSession, useManageSession, useUpdateClosedSession, useUpdateEntity, useLoadDataPosSession, useManageOnChange, useGenSerialNumber, useGetOrderLine, useGetProductImage, useAddEntity, useCheckPayment } from './hooks.js';
|
|
5
5
|
import '@tanstack/react-query';
|
|
6
6
|
import './view-type-xxw9OeSR.js';
|
|
@@ -19,6 +19,33 @@ declare const VersionGate: ({ children }: {
|
|
|
19
19
|
children: ReactNode;
|
|
20
20
|
}) => react_jsx_runtime.JSX.Element | null;
|
|
21
21
|
|
|
22
|
+
interface EnvConfig {
|
|
23
|
+
env?: any;
|
|
24
|
+
baseUrl?: string;
|
|
25
|
+
requests?: any;
|
|
26
|
+
default_service?: string;
|
|
27
|
+
context?: {
|
|
28
|
+
uid?: number | null;
|
|
29
|
+
allowed_company_ids?: number[];
|
|
30
|
+
lang?: string;
|
|
31
|
+
tz?: string;
|
|
32
|
+
};
|
|
33
|
+
defaultCompany?: {
|
|
34
|
+
id?: number | null;
|
|
35
|
+
logo?: string;
|
|
36
|
+
secondary_color?: string;
|
|
37
|
+
primary_color?: string;
|
|
38
|
+
};
|
|
39
|
+
config?: any;
|
|
40
|
+
companies?: any[];
|
|
41
|
+
user?: any;
|
|
42
|
+
db?: string;
|
|
43
|
+
refreshTokenEndpoint?: string;
|
|
44
|
+
localStorageUtils?: LocalStorageUtilsType;
|
|
45
|
+
sessionStorageUtils?: SessionStorageUtilsType;
|
|
46
|
+
envFile?: any;
|
|
47
|
+
xNode?: string;
|
|
48
|
+
}
|
|
22
49
|
declare function EnvProvider({ children, localStorageUtils: localStorageUtil, sessionStorageUtils: sessionStorageUtil, }: {
|
|
23
50
|
children: React.ReactNode;
|
|
24
51
|
localStorageUtils?: LocalStorageUtilsType;
|
package/dist/provider.js
CHANGED
|
@@ -5298,9 +5298,8 @@ var axiosClient = {
|
|
|
5298
5298
|
const database = config?.config?.database;
|
|
5299
5299
|
let isRefreshing = false;
|
|
5300
5300
|
let failedQueue = [];
|
|
5301
|
-
const { env } = useEnv();
|
|
5302
5301
|
const xNode = config?.xNode;
|
|
5303
|
-
const service =
|
|
5302
|
+
const service = sessionStorage2.getMenuFocus().service || config?.default_service;
|
|
5304
5303
|
const processQueue = (error, token = null) => {
|
|
5305
5304
|
failedQueue?.forEach((prom) => {
|
|
5306
5305
|
if (error) {
|
|
@@ -5311,7 +5310,6 @@ var axiosClient = {
|
|
|
5311
5310
|
});
|
|
5312
5311
|
failedQueue = [];
|
|
5313
5312
|
};
|
|
5314
|
-
console.log("config", config, service);
|
|
5315
5313
|
const instance = import_axios.default.create({
|
|
5316
5314
|
adapter: import_axios.default.defaults.adapter,
|
|
5317
5315
|
baseURL: config?.baseUrl,
|
package/dist/provider.mjs
CHANGED
|
@@ -5255,9 +5255,8 @@ var axiosClient = {
|
|
|
5255
5255
|
const database = config?.config?.database;
|
|
5256
5256
|
let isRefreshing = false;
|
|
5257
5257
|
let failedQueue = [];
|
|
5258
|
-
const { env } = useEnv();
|
|
5259
5258
|
const xNode = config?.xNode;
|
|
5260
|
-
const service =
|
|
5259
|
+
const service = sessionStorage2.getMenuFocus().service || config?.default_service;
|
|
5261
5260
|
const processQueue = (error, token = null) => {
|
|
5262
5261
|
failedQueue?.forEach((prom) => {
|
|
5263
5262
|
if (error) {
|
|
@@ -5268,7 +5267,6 @@ var axiosClient = {
|
|
|
5268
5267
|
});
|
|
5269
5268
|
failedQueue = [];
|
|
5270
5269
|
};
|
|
5271
|
-
console.log("config", config, service);
|
|
5272
5270
|
const instance = axios.create({
|
|
5273
5271
|
adapter: axios.defaults.adapter,
|
|
5274
5272
|
baseURL: config?.baseUrl,
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
declare const localStorageUtils: () => {
|
|
2
|
+
setToken: (access_token: string) => Promise<void>;
|
|
3
|
+
setRefreshToken: (refresh_token: string) => Promise<void>;
|
|
4
|
+
getAccessToken: () => Promise<string | null>;
|
|
5
|
+
getRefreshToken: () => Promise<string | null>;
|
|
6
|
+
clearToken: () => Promise<void>;
|
|
7
|
+
};
|
|
8
|
+
type LocalStorageUtilsType = ReturnType<typeof localStorageUtils>;
|
|
9
|
+
|
|
10
|
+
declare const sessionStorageUtils: () => {
|
|
11
|
+
getMenuFocus: () => IMenu;
|
|
12
|
+
setMenuFocus: (menuTree: IMenu) => void;
|
|
13
|
+
setActionData: (actData: any) => void;
|
|
14
|
+
getActionData: () => any | null;
|
|
15
|
+
getViewData: () => any | null;
|
|
16
|
+
setViewData: (viewData: any) => void;
|
|
17
|
+
getBrowserSession: () => string | null;
|
|
18
|
+
};
|
|
19
|
+
interface IMenu {
|
|
20
|
+
id: number | undefined;
|
|
21
|
+
service: string;
|
|
22
|
+
}
|
|
23
|
+
type SessionStorageUtilsType = ReturnType<typeof sessionStorageUtils>;
|
|
24
|
+
|
|
25
|
+
export type { LocalStorageUtilsType as L, SessionStorageUtilsType as S };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
declare const localStorageUtils: () => {
|
|
2
|
+
setToken: (access_token: string) => Promise<void>;
|
|
3
|
+
setRefreshToken: (refresh_token: string) => Promise<void>;
|
|
4
|
+
getAccessToken: () => Promise<string | null>;
|
|
5
|
+
getRefreshToken: () => Promise<string | null>;
|
|
6
|
+
clearToken: () => Promise<void>;
|
|
7
|
+
};
|
|
8
|
+
type LocalStorageUtilsType = ReturnType<typeof localStorageUtils>;
|
|
9
|
+
|
|
10
|
+
declare const sessionStorageUtils: () => {
|
|
11
|
+
getMenuFocus: () => IMenu;
|
|
12
|
+
setMenuFocus: (menuTree: IMenu) => void;
|
|
13
|
+
setActionData: (actData: any) => void;
|
|
14
|
+
getActionData: () => any | null;
|
|
15
|
+
getViewData: () => any | null;
|
|
16
|
+
setViewData: (viewData: any) => void;
|
|
17
|
+
getBrowserSession: () => string | null;
|
|
18
|
+
};
|
|
19
|
+
interface IMenu {
|
|
20
|
+
id: number | undefined;
|
|
21
|
+
service: string;
|
|
22
|
+
}
|
|
23
|
+
type SessionStorageUtilsType = ReturnType<typeof sessionStorageUtils>;
|
|
24
|
+
|
|
25
|
+
export type { LocalStorageUtilsType as L, SessionStorageUtilsType as S };
|
package/package.json
CHANGED
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
declare const localStorageUtils: () => {
|
|
2
|
-
setToken: (access_token: string) => Promise<void>;
|
|
3
|
-
setRefreshToken: (refresh_token: string) => Promise<void>;
|
|
4
|
-
getAccessToken: () => Promise<string | null>;
|
|
5
|
-
getRefreshToken: () => Promise<string | null>;
|
|
6
|
-
clearToken: () => Promise<void>;
|
|
7
|
-
};
|
|
8
|
-
type LocalStorageUtilsType = ReturnType<typeof localStorageUtils>;
|
|
9
|
-
|
|
10
|
-
declare const sessionStorageUtils: () => {
|
|
11
|
-
getMenuFocus: () => IMenu;
|
|
12
|
-
setMenuFocus: (menuTree: IMenu) => void;
|
|
13
|
-
setActionData: (actData: any) => void;
|
|
14
|
-
getActionData: () => any | null;
|
|
15
|
-
getViewData: () => any | null;
|
|
16
|
-
setViewData: (viewData: any) => void;
|
|
17
|
-
getBrowserSession: () => string | null;
|
|
18
|
-
};
|
|
19
|
-
interface IMenu {
|
|
20
|
-
id: number | undefined;
|
|
21
|
-
service: string;
|
|
22
|
-
}
|
|
23
|
-
type SessionStorageUtilsType = ReturnType<typeof sessionStorageUtils>;
|
|
24
|
-
|
|
25
|
-
interface EnvConfig {
|
|
26
|
-
env?: any;
|
|
27
|
-
baseUrl: string;
|
|
28
|
-
requests?: any;
|
|
29
|
-
context?: {
|
|
30
|
-
uid?: number | null;
|
|
31
|
-
allowed_company_ids?: number[];
|
|
32
|
-
lang?: string;
|
|
33
|
-
tz?: string;
|
|
34
|
-
};
|
|
35
|
-
defaultCompany?: {
|
|
36
|
-
id?: number | null;
|
|
37
|
-
logo?: string;
|
|
38
|
-
secondary_color?: string;
|
|
39
|
-
primary_color?: string;
|
|
40
|
-
};
|
|
41
|
-
database?: string;
|
|
42
|
-
xNode?: string;
|
|
43
|
-
default_service?: string;
|
|
44
|
-
config?: any;
|
|
45
|
-
companies?: any[];
|
|
46
|
-
user?: any;
|
|
47
|
-
db?: string;
|
|
48
|
-
refreshTokenEndpoint?: string;
|
|
49
|
-
localStorageUtils?: LocalStorageUtilsType;
|
|
50
|
-
sessionStorageUtils?: SessionStorageUtilsType;
|
|
51
|
-
envFile?: any;
|
|
52
|
-
}
|
|
53
|
-
declare class EnvStore {
|
|
54
|
-
private state;
|
|
55
|
-
private emitter;
|
|
56
|
-
private localStorageUtil;
|
|
57
|
-
private sessionStorageUtil;
|
|
58
|
-
constructor(localStorageUtil?: LocalStorageUtilsType, sessionStorageUtil?: SessionStorageUtilsType);
|
|
59
|
-
getEnv(): EnvConfig;
|
|
60
|
-
onUpdate(callback: (env: EnvConfig) => void): void;
|
|
61
|
-
setupEnv(envConfig: Partial<EnvConfig>): EnvConfig;
|
|
62
|
-
setUid(uid: number): void;
|
|
63
|
-
setLang(lang: string): void;
|
|
64
|
-
setAllowCompanies(allowed_company_ids: number[]): void;
|
|
65
|
-
setCompanies(companies: any[]): void;
|
|
66
|
-
setDefaultCompany(defaultCompany: EnvConfig['defaultCompany']): void;
|
|
67
|
-
setUserInfo(user: any): void;
|
|
68
|
-
setConfig(config: any): void;
|
|
69
|
-
setEnvFile(envFile: any): void;
|
|
70
|
-
}
|
|
71
|
-
declare function initEnv({ localStorageUtils: localStorageUtil, sessionStorageUtils: sessionStorageUtil, }: {
|
|
72
|
-
localStorageUtils?: LocalStorageUtilsType;
|
|
73
|
-
sessionStorageUtils?: SessionStorageUtilsType;
|
|
74
|
-
}): EnvStore;
|
|
75
|
-
declare function getEnv(): any;
|
|
76
|
-
|
|
77
|
-
export { type EnvConfig as E, type LocalStorageUtilsType as L, type SessionStorageUtilsType as S, EnvStore as a, getEnv as g, initEnv as i };
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
declare const localStorageUtils: () => {
|
|
2
|
-
setToken: (access_token: string) => Promise<void>;
|
|
3
|
-
setRefreshToken: (refresh_token: string) => Promise<void>;
|
|
4
|
-
getAccessToken: () => Promise<string | null>;
|
|
5
|
-
getRefreshToken: () => Promise<string | null>;
|
|
6
|
-
clearToken: () => Promise<void>;
|
|
7
|
-
};
|
|
8
|
-
type LocalStorageUtilsType = ReturnType<typeof localStorageUtils>;
|
|
9
|
-
|
|
10
|
-
declare const sessionStorageUtils: () => {
|
|
11
|
-
getMenuFocus: () => IMenu;
|
|
12
|
-
setMenuFocus: (menuTree: IMenu) => void;
|
|
13
|
-
setActionData: (actData: any) => void;
|
|
14
|
-
getActionData: () => any | null;
|
|
15
|
-
getViewData: () => any | null;
|
|
16
|
-
setViewData: (viewData: any) => void;
|
|
17
|
-
getBrowserSession: () => string | null;
|
|
18
|
-
};
|
|
19
|
-
interface IMenu {
|
|
20
|
-
id: number | undefined;
|
|
21
|
-
service: string;
|
|
22
|
-
}
|
|
23
|
-
type SessionStorageUtilsType = ReturnType<typeof sessionStorageUtils>;
|
|
24
|
-
|
|
25
|
-
interface EnvConfig {
|
|
26
|
-
env?: any;
|
|
27
|
-
baseUrl: string;
|
|
28
|
-
requests?: any;
|
|
29
|
-
context?: {
|
|
30
|
-
uid?: number | null;
|
|
31
|
-
allowed_company_ids?: number[];
|
|
32
|
-
lang?: string;
|
|
33
|
-
tz?: string;
|
|
34
|
-
};
|
|
35
|
-
defaultCompany?: {
|
|
36
|
-
id?: number | null;
|
|
37
|
-
logo?: string;
|
|
38
|
-
secondary_color?: string;
|
|
39
|
-
primary_color?: string;
|
|
40
|
-
};
|
|
41
|
-
database?: string;
|
|
42
|
-
xNode?: string;
|
|
43
|
-
default_service?: string;
|
|
44
|
-
config?: any;
|
|
45
|
-
companies?: any[];
|
|
46
|
-
user?: any;
|
|
47
|
-
db?: string;
|
|
48
|
-
refreshTokenEndpoint?: string;
|
|
49
|
-
localStorageUtils?: LocalStorageUtilsType;
|
|
50
|
-
sessionStorageUtils?: SessionStorageUtilsType;
|
|
51
|
-
envFile?: any;
|
|
52
|
-
}
|
|
53
|
-
declare class EnvStore {
|
|
54
|
-
private state;
|
|
55
|
-
private emitter;
|
|
56
|
-
private localStorageUtil;
|
|
57
|
-
private sessionStorageUtil;
|
|
58
|
-
constructor(localStorageUtil?: LocalStorageUtilsType, sessionStorageUtil?: SessionStorageUtilsType);
|
|
59
|
-
getEnv(): EnvConfig;
|
|
60
|
-
onUpdate(callback: (env: EnvConfig) => void): void;
|
|
61
|
-
setupEnv(envConfig: Partial<EnvConfig>): EnvConfig;
|
|
62
|
-
setUid(uid: number): void;
|
|
63
|
-
setLang(lang: string): void;
|
|
64
|
-
setAllowCompanies(allowed_company_ids: number[]): void;
|
|
65
|
-
setCompanies(companies: any[]): void;
|
|
66
|
-
setDefaultCompany(defaultCompany: EnvConfig['defaultCompany']): void;
|
|
67
|
-
setUserInfo(user: any): void;
|
|
68
|
-
setConfig(config: any): void;
|
|
69
|
-
setEnvFile(envFile: any): void;
|
|
70
|
-
}
|
|
71
|
-
declare function initEnv({ localStorageUtils: localStorageUtil, sessionStorageUtils: sessionStorageUtil, }: {
|
|
72
|
-
localStorageUtils?: LocalStorageUtilsType;
|
|
73
|
-
sessionStorageUtils?: SessionStorageUtilsType;
|
|
74
|
-
}): EnvStore;
|
|
75
|
-
declare function getEnv(): any;
|
|
76
|
-
|
|
77
|
-
export { type EnvConfig as E, type LocalStorageUtilsType as L, type SessionStorageUtilsType as S, EnvStore as a, getEnv as g, initEnv as i };
|