@fctc/interface-logic 1.10.5 → 1.10.7
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/{view-type-D8ukwj_2.d.mts → api-type-DfAFCfCw.d.mts} +1 -15
- package/dist/{view-type-D8ukwj_2.d.ts → api-type-DfAFCfCw.d.ts} +1 -15
- package/dist/hooks.d.mts +4 -227
- package/dist/hooks.d.ts +4 -227
- package/dist/hooks.js +19 -35
- package/dist/hooks.mjs +6 -22
- package/dist/provider.d.mts +55 -2
- package/dist/provider.d.ts +55 -2
- package/dist/provider.js +1817 -56
- package/dist/provider.mjs +1814 -55
- package/dist/services.d.mts +2 -1
- package/dist/services.d.ts +2 -1
- package/dist/types.d.mts +2 -1
- package/dist/types.d.ts +2 -1
- package/dist/use-switch-locale-BFEf9mtg.d.mts +229 -0
- package/dist/use-switch-locale-y3Oki_i5.d.ts +229 -0
- package/dist/view-type-C6Eej-Ij.d.mts +15 -0
- package/dist/view-type-C6Eej-Ij.d.ts +15 -0
- package/package.json +1 -1
package/dist/hooks.mjs
CHANGED
|
@@ -4765,36 +4765,20 @@ import { Fragment, jsx as jsx4 } from "react/jsx-runtime";
|
|
|
4765
4765
|
// src/provider/env-provider.tsx
|
|
4766
4766
|
import { createContext, useContext, useState as useState3, useCallback as useCallback2 } from "react";
|
|
4767
4767
|
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
4768
|
-
var initialEnvState = {
|
|
4769
|
-
env: null,
|
|
4770
|
-
baseUrl: "",
|
|
4771
|
-
requests: null,
|
|
4772
|
-
companies: [],
|
|
4773
|
-
user: {},
|
|
4774
|
-
config: null,
|
|
4775
|
-
envFile: null,
|
|
4776
|
-
defaultCompany: {
|
|
4777
|
-
id: null,
|
|
4778
|
-
logo: "",
|
|
4779
|
-
secondary_color: "",
|
|
4780
|
-
primary_color: ""
|
|
4781
|
-
},
|
|
4782
|
-
context: {
|
|
4783
|
-
uid: null,
|
|
4784
|
-
allowed_company_ids: [],
|
|
4785
|
-
lang: "vi_VN",
|
|
4786
|
-
tz: "Asia/Saigon"
|
|
4787
|
-
}
|
|
4788
|
-
};
|
|
4789
4768
|
var EnvContext = createContext(null);
|
|
4790
4769
|
function useEnv() {
|
|
4791
4770
|
const context = useContext(EnvContext);
|
|
4792
4771
|
if (!context) {
|
|
4793
|
-
|
|
4772
|
+
throw new Error("useEnv must be used within an EnvProvider");
|
|
4794
4773
|
}
|
|
4795
4774
|
return context;
|
|
4796
4775
|
}
|
|
4797
4776
|
|
|
4777
|
+
// src/provider/service-provider.tsx
|
|
4778
|
+
import { createContext as createContext2, useContext as useContext2 } from "react";
|
|
4779
|
+
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
4780
|
+
var ServiceContext = createContext2(null);
|
|
4781
|
+
|
|
4798
4782
|
// src/services/auth-service/backup.ts
|
|
4799
4783
|
function useAuthService() {
|
|
4800
4784
|
const { env: env2 } = useEnv();
|
package/dist/provider.d.mts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
import { L as LocalStorageUtilsType, S as SessionStorageUtilsType } from './session-storage-ARp_lhTD.mjs';
|
|
4
|
+
import { e as useForgotPassword, f as useForgotPasswordSSO, w as useGetProvider, y as useIsValidToken, z as useLoginCredential, A as useLoginSocial, F as useResetPassword, G as useResetPasswordSSO, K as useUpdatePassword, P as useLogout, O as useGetAccessByCode, Q as useValidateActionToken, i as useGetCompanyInfo, l as useGetCurrentCompany, s as useGetListCompany, c as useExecuteImport, d as useExportExcel, n as useGetFieldExport, p as useGetFileExcel, E as useParsePreview, L as useUploadFile, M as useUploadIdFile, u as useChangeStatus, b as useDeleteComment, h as useGetComment, q as useGetFormView, r as useGetImage, I as useSendComment, N as useUploadImage, a as useDelete, g as useGetAll, j as useGetConversionRate, k as useGetCurrency, m as useGetDetail, o as useGetFieldOnChange, t as useGetListMyBankAccount, B as useModel, C as useOdooDataTransform, D as useOnChangeForm, H as useSave, v as useGetProfile, x as useGetUser, J as useSwitchLocale } from './use-switch-locale-BFEf9mtg.mjs';
|
|
5
|
+
import '@tanstack/react-query';
|
|
6
|
+
import './api-type-DfAFCfCw.mjs';
|
|
4
7
|
|
|
5
8
|
declare const MainProvider: ({ children }: {
|
|
6
9
|
children: ReactNode;
|
|
@@ -44,7 +47,7 @@ declare function EnvProvider({ children, localStorageUtils: localStorageUtil, se
|
|
|
44
47
|
localStorageUtils?: LocalStorageUtilsType;
|
|
45
48
|
sessionStorageUtils?: SessionStorageUtilsType;
|
|
46
49
|
}): react_jsx_runtime.JSX.Element;
|
|
47
|
-
declare function useEnv():
|
|
50
|
+
declare function useEnv(): {
|
|
48
51
|
env: EnvConfig;
|
|
49
52
|
setupEnv: (envConfig: Partial<EnvConfig>) => EnvConfig;
|
|
50
53
|
setUid: (uid: number) => void;
|
|
@@ -57,4 +60,54 @@ declare function useEnv(): EnvConfig | {
|
|
|
57
60
|
setEnvFile: (envFile: any) => void;
|
|
58
61
|
};
|
|
59
62
|
|
|
60
|
-
|
|
63
|
+
interface ServiceContextType {
|
|
64
|
+
useForgotPassword: typeof useForgotPassword;
|
|
65
|
+
useForgotPasswordSSO: typeof useForgotPasswordSSO;
|
|
66
|
+
useGetProvider: typeof useGetProvider;
|
|
67
|
+
useIsValidToken: typeof useIsValidToken;
|
|
68
|
+
useLoginCredential: typeof useLoginCredential;
|
|
69
|
+
useLoginSocial: typeof useLoginSocial;
|
|
70
|
+
useResetPassword: typeof useResetPassword;
|
|
71
|
+
useResetPasswordSSO: typeof useResetPasswordSSO;
|
|
72
|
+
useUpdatePassword: typeof useUpdatePassword;
|
|
73
|
+
useLogout: typeof useLogout;
|
|
74
|
+
useGetAccessByCode: typeof useGetAccessByCode;
|
|
75
|
+
useValidateActionToken: typeof useValidateActionToken;
|
|
76
|
+
useGetCompanyInfo: typeof useGetCompanyInfo;
|
|
77
|
+
useGetCurrentCompany: typeof useGetCurrentCompany;
|
|
78
|
+
useGetListCompany: typeof useGetListCompany;
|
|
79
|
+
useExecuteImport: typeof useExecuteImport;
|
|
80
|
+
useExportExcel: typeof useExportExcel;
|
|
81
|
+
useGetFieldExport: typeof useGetFieldExport;
|
|
82
|
+
useGetFileExcel: typeof useGetFileExcel;
|
|
83
|
+
useParsePreview: typeof useParsePreview;
|
|
84
|
+
useUploadFile: typeof useUploadFile;
|
|
85
|
+
useUploadIdFile: typeof useUploadIdFile;
|
|
86
|
+
useChangeStatus: typeof useChangeStatus;
|
|
87
|
+
useDeleteComment: typeof useDeleteComment;
|
|
88
|
+
useGetComment: typeof useGetComment;
|
|
89
|
+
useGetFormView: typeof useGetFormView;
|
|
90
|
+
useGetImage: typeof useGetImage;
|
|
91
|
+
useSendComment: typeof useSendComment;
|
|
92
|
+
useUploadImage: typeof useUploadImage;
|
|
93
|
+
useDelete: typeof useDelete;
|
|
94
|
+
useGetAll: typeof useGetAll;
|
|
95
|
+
useGetConversionRate: typeof useGetConversionRate;
|
|
96
|
+
useGetCurrency: typeof useGetCurrency;
|
|
97
|
+
useGetDetail: typeof useGetDetail;
|
|
98
|
+
useGetFieldOnChange: typeof useGetFieldOnChange;
|
|
99
|
+
useGetListMyBankAccount: typeof useGetListMyBankAccount;
|
|
100
|
+
useModel: typeof useModel;
|
|
101
|
+
useOdooDataTransform: typeof useOdooDataTransform;
|
|
102
|
+
useOnChangeForm: typeof useOnChangeForm;
|
|
103
|
+
useSave: typeof useSave;
|
|
104
|
+
useGetProfile: typeof useGetProfile;
|
|
105
|
+
useGetUser: typeof useGetUser;
|
|
106
|
+
useSwitchLocale: typeof useSwitchLocale;
|
|
107
|
+
}
|
|
108
|
+
declare const ServiceProvider: ({ children, }: {
|
|
109
|
+
children: React.ReactNode;
|
|
110
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
111
|
+
declare const useService: () => ServiceContextType;
|
|
112
|
+
|
|
113
|
+
export { EnvProvider, MainProvider, ReactQueryProvider, ServiceProvider, VersionGate, useEnv, useService };
|
package/dist/provider.d.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
import { L as LocalStorageUtilsType, S as SessionStorageUtilsType } from './session-storage-ARp_lhTD.js';
|
|
4
|
+
import { e as useForgotPassword, f as useForgotPasswordSSO, w as useGetProvider, y as useIsValidToken, z as useLoginCredential, A as useLoginSocial, F as useResetPassword, G as useResetPasswordSSO, K as useUpdatePassword, P as useLogout, O as useGetAccessByCode, Q as useValidateActionToken, i as useGetCompanyInfo, l as useGetCurrentCompany, s as useGetListCompany, c as useExecuteImport, d as useExportExcel, n as useGetFieldExport, p as useGetFileExcel, E as useParsePreview, L as useUploadFile, M as useUploadIdFile, u as useChangeStatus, b as useDeleteComment, h as useGetComment, q as useGetFormView, r as useGetImage, I as useSendComment, N as useUploadImage, a as useDelete, g as useGetAll, j as useGetConversionRate, k as useGetCurrency, m as useGetDetail, o as useGetFieldOnChange, t as useGetListMyBankAccount, B as useModel, C as useOdooDataTransform, D as useOnChangeForm, H as useSave, v as useGetProfile, x as useGetUser, J as useSwitchLocale } from './use-switch-locale-y3Oki_i5.js';
|
|
5
|
+
import '@tanstack/react-query';
|
|
6
|
+
import './api-type-DfAFCfCw.js';
|
|
4
7
|
|
|
5
8
|
declare const MainProvider: ({ children }: {
|
|
6
9
|
children: ReactNode;
|
|
@@ -44,7 +47,7 @@ declare function EnvProvider({ children, localStorageUtils: localStorageUtil, se
|
|
|
44
47
|
localStorageUtils?: LocalStorageUtilsType;
|
|
45
48
|
sessionStorageUtils?: SessionStorageUtilsType;
|
|
46
49
|
}): react_jsx_runtime.JSX.Element;
|
|
47
|
-
declare function useEnv():
|
|
50
|
+
declare function useEnv(): {
|
|
48
51
|
env: EnvConfig;
|
|
49
52
|
setupEnv: (envConfig: Partial<EnvConfig>) => EnvConfig;
|
|
50
53
|
setUid: (uid: number) => void;
|
|
@@ -57,4 +60,54 @@ declare function useEnv(): EnvConfig | {
|
|
|
57
60
|
setEnvFile: (envFile: any) => void;
|
|
58
61
|
};
|
|
59
62
|
|
|
60
|
-
|
|
63
|
+
interface ServiceContextType {
|
|
64
|
+
useForgotPassword: typeof useForgotPassword;
|
|
65
|
+
useForgotPasswordSSO: typeof useForgotPasswordSSO;
|
|
66
|
+
useGetProvider: typeof useGetProvider;
|
|
67
|
+
useIsValidToken: typeof useIsValidToken;
|
|
68
|
+
useLoginCredential: typeof useLoginCredential;
|
|
69
|
+
useLoginSocial: typeof useLoginSocial;
|
|
70
|
+
useResetPassword: typeof useResetPassword;
|
|
71
|
+
useResetPasswordSSO: typeof useResetPasswordSSO;
|
|
72
|
+
useUpdatePassword: typeof useUpdatePassword;
|
|
73
|
+
useLogout: typeof useLogout;
|
|
74
|
+
useGetAccessByCode: typeof useGetAccessByCode;
|
|
75
|
+
useValidateActionToken: typeof useValidateActionToken;
|
|
76
|
+
useGetCompanyInfo: typeof useGetCompanyInfo;
|
|
77
|
+
useGetCurrentCompany: typeof useGetCurrentCompany;
|
|
78
|
+
useGetListCompany: typeof useGetListCompany;
|
|
79
|
+
useExecuteImport: typeof useExecuteImport;
|
|
80
|
+
useExportExcel: typeof useExportExcel;
|
|
81
|
+
useGetFieldExport: typeof useGetFieldExport;
|
|
82
|
+
useGetFileExcel: typeof useGetFileExcel;
|
|
83
|
+
useParsePreview: typeof useParsePreview;
|
|
84
|
+
useUploadFile: typeof useUploadFile;
|
|
85
|
+
useUploadIdFile: typeof useUploadIdFile;
|
|
86
|
+
useChangeStatus: typeof useChangeStatus;
|
|
87
|
+
useDeleteComment: typeof useDeleteComment;
|
|
88
|
+
useGetComment: typeof useGetComment;
|
|
89
|
+
useGetFormView: typeof useGetFormView;
|
|
90
|
+
useGetImage: typeof useGetImage;
|
|
91
|
+
useSendComment: typeof useSendComment;
|
|
92
|
+
useUploadImage: typeof useUploadImage;
|
|
93
|
+
useDelete: typeof useDelete;
|
|
94
|
+
useGetAll: typeof useGetAll;
|
|
95
|
+
useGetConversionRate: typeof useGetConversionRate;
|
|
96
|
+
useGetCurrency: typeof useGetCurrency;
|
|
97
|
+
useGetDetail: typeof useGetDetail;
|
|
98
|
+
useGetFieldOnChange: typeof useGetFieldOnChange;
|
|
99
|
+
useGetListMyBankAccount: typeof useGetListMyBankAccount;
|
|
100
|
+
useModel: typeof useModel;
|
|
101
|
+
useOdooDataTransform: typeof useOdooDataTransform;
|
|
102
|
+
useOnChangeForm: typeof useOnChangeForm;
|
|
103
|
+
useSave: typeof useSave;
|
|
104
|
+
useGetProfile: typeof useGetProfile;
|
|
105
|
+
useGetUser: typeof useGetUser;
|
|
106
|
+
useSwitchLocale: typeof useSwitchLocale;
|
|
107
|
+
}
|
|
108
|
+
declare const ServiceProvider: ({ children, }: {
|
|
109
|
+
children: React.ReactNode;
|
|
110
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
111
|
+
declare const useService: () => ServiceContextType;
|
|
112
|
+
|
|
113
|
+
export { EnvProvider, MainProvider, ReactQueryProvider, ServiceProvider, VersionGate, useEnv, useService };
|