@fctc/interface-logic 1.8.3 → 1.8.4
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 -4
- package/dist/configs.d.ts +1 -4
- package/dist/configs.js +15 -12
- package/dist/configs.mjs +15 -12
- package/dist/environment.d.mts +15 -17
- package/dist/environment.d.ts +15 -17
- package/dist/environment.js +81 -92
- package/dist/environment.mjs +81 -90
- package/dist/hooks.d.mts +2 -7
- package/dist/hooks.d.ts +2 -7
- package/dist/hooks.js +195 -229
- package/dist/hooks.mjs +155 -188
- package/dist/provider.d.mts +4 -3
- package/dist/provider.d.ts +4 -3
- package/dist/provider.js +87 -88
- package/dist/provider.mjs +87 -88
- package/dist/services.d.mts +1 -2
- package/dist/services.d.ts +1 -2
- package/dist/services.js +82 -103
- package/dist/services.mjs +82 -103
- package/dist/store.d.mts +14 -280
- package/dist/store.d.ts +14 -280
- package/dist/store.js +4 -4
- package/dist/store.mjs +4 -4
- package/dist/types.d.mts +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/{view-type-BGJfDe73.d.mts → view-type-D8ukwj_2.d.mts} +1 -1
- package/dist/{view-type-BGJfDe73.d.ts → view-type-D8ukwj_2.d.ts} +1 -1
- package/package.json +1 -1
package/dist/provider.d.mts
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
1
2
|
import { ReactNode } from 'react';
|
|
2
3
|
|
|
3
4
|
declare const MainProvider: ({ children }: {
|
|
4
5
|
children: ReactNode;
|
|
5
|
-
}) => JSX.Element;
|
|
6
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
6
7
|
|
|
7
8
|
declare const ReactQueryProvider: ({ children }: {
|
|
8
9
|
children: ReactNode;
|
|
9
|
-
}) => JSX.Element;
|
|
10
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
10
11
|
|
|
11
12
|
declare const VersionGate: ({ children }: {
|
|
12
13
|
children: ReactNode;
|
|
13
|
-
}) => JSX.Element | null;
|
|
14
|
+
}) => react_jsx_runtime.JSX.Element | null;
|
|
14
15
|
|
|
15
16
|
export { MainProvider, ReactQueryProvider, VersionGate };
|
package/dist/provider.d.ts
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
1
2
|
import { ReactNode } from 'react';
|
|
2
3
|
|
|
3
4
|
declare const MainProvider: ({ children }: {
|
|
4
5
|
children: ReactNode;
|
|
5
|
-
}) => JSX.Element;
|
|
6
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
6
7
|
|
|
7
8
|
declare const ReactQueryProvider: ({ children }: {
|
|
8
9
|
children: ReactNode;
|
|
9
|
-
}) => JSX.Element;
|
|
10
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
10
11
|
|
|
11
12
|
declare const VersionGate: ({ children }: {
|
|
12
13
|
children: ReactNode;
|
|
13
|
-
}) => JSX.Element | null;
|
|
14
|
+
}) => react_jsx_runtime.JSX.Element | null;
|
|
14
15
|
|
|
15
16
|
export { MainProvider, ReactQueryProvider, VersionGate };
|
package/dist/provider.js
CHANGED
|
@@ -2861,9 +2861,9 @@ var sessionStorageUtils = () => {
|
|
|
2861
2861
|
// src/configs/axios-client.ts
|
|
2862
2862
|
var axiosClient = {
|
|
2863
2863
|
init(config) {
|
|
2864
|
-
const localStorage2 = config
|
|
2865
|
-
const sessionStorage2 = config
|
|
2866
|
-
const db = config
|
|
2864
|
+
const localStorage2 = config?.localStorageUtils ?? localStorageUtils();
|
|
2865
|
+
const sessionStorage2 = config?.sessionStorageUtils ?? sessionStorageUtils();
|
|
2866
|
+
const db = config?.db;
|
|
2867
2867
|
let isRefreshing = false;
|
|
2868
2868
|
let failedQueue = [];
|
|
2869
2869
|
const processQueue = (error, token = null) => {
|
|
@@ -2882,16 +2882,19 @@ var axiosClient = {
|
|
|
2882
2882
|
timeout: 5e4,
|
|
2883
2883
|
paramsSerializer: (params) => new URLSearchParams(params).toString()
|
|
2884
2884
|
});
|
|
2885
|
-
instance.interceptors.request.use(
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2885
|
+
instance.interceptors.request.use(
|
|
2886
|
+
async (config2) => {
|
|
2887
|
+
const useRefreshToken = config2.useRefreshToken;
|
|
2888
|
+
const token = useRefreshToken ? await localStorage2.getRefreshToken() : await localStorage2.getAccessToken();
|
|
2889
|
+
if (token) {
|
|
2890
|
+
config2.headers["Authorization"] = "Bearer " + token;
|
|
2891
|
+
}
|
|
2892
|
+
return config2;
|
|
2893
|
+
},
|
|
2894
|
+
(error) => {
|
|
2895
|
+
Promise.reject(error);
|
|
2896
|
+
}
|
|
2897
|
+
);
|
|
2895
2898
|
instance.interceptors.response.use(
|
|
2896
2899
|
(response) => {
|
|
2897
2900
|
return handleResponse(response);
|
|
@@ -3032,83 +3035,73 @@ var axiosClient = {
|
|
|
3032
3035
|
};
|
|
3033
3036
|
|
|
3034
3037
|
// src/environment/EnvStore.ts
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
|
|
3039
|
-
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
|
|
3052
|
-
|
|
3053
|
-
|
|
3054
|
-
setup() {
|
|
3055
|
-
const env2 = this.envStore.getState().env;
|
|
3056
|
-
this.baseUrl = env2?.baseUrl;
|
|
3057
|
-
this.requests = env2?.requests;
|
|
3058
|
-
this.context = env2?.context;
|
|
3059
|
-
this.defaultCompany = env2?.defaultCompany;
|
|
3060
|
-
this.config = env2?.config;
|
|
3061
|
-
this.companies = env2?.companies || [];
|
|
3062
|
-
this.user = env2?.user;
|
|
3063
|
-
this.db = env2?.db;
|
|
3064
|
-
this.refreshTokenEndpoint = env2?.refreshTokenEndpoint;
|
|
3065
|
-
}
|
|
3066
|
-
setupEnv(envConfig) {
|
|
3067
|
-
const dispatch = this.envStore.dispatch;
|
|
3068
|
-
const env2 = {
|
|
3038
|
+
function createEnvStore(store, localStorageUtil, sessionStorageUtil) {
|
|
3039
|
+
const getEnvState = () => store.getState().env;
|
|
3040
|
+
const setupEnvConfig = () => {
|
|
3041
|
+
const env2 = getEnvState();
|
|
3042
|
+
return {
|
|
3043
|
+
baseUrl: env2?.baseUrl,
|
|
3044
|
+
requests: env2?.requests,
|
|
3045
|
+
context: env2?.context,
|
|
3046
|
+
defaultCompany: env2?.defaultCompany,
|
|
3047
|
+
config: env2?.config,
|
|
3048
|
+
companies: env2?.companies || [],
|
|
3049
|
+
user: env2?.user,
|
|
3050
|
+
db: env2?.db,
|
|
3051
|
+
refreshTokenEndpoint: env2?.refreshTokenEndpoint
|
|
3052
|
+
};
|
|
3053
|
+
};
|
|
3054
|
+
const setupEnv = (envConfig) => {
|
|
3055
|
+
const dispatch = store.dispatch;
|
|
3056
|
+
const updatedEnv = {
|
|
3069
3057
|
...envConfig,
|
|
3070
|
-
localStorageUtils:
|
|
3071
|
-
sessionStorageUtils:
|
|
3058
|
+
localStorageUtils: localStorageUtil,
|
|
3059
|
+
sessionStorageUtils: sessionStorageUtil
|
|
3072
3060
|
};
|
|
3073
|
-
const requests = axiosClient.init(
|
|
3074
|
-
dispatch(setEnv({ ...
|
|
3075
|
-
|
|
3076
|
-
}
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
dispatch(
|
|
3095
|
-
|
|
3096
|
-
}
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
|
|
3061
|
+
const requests = axiosClient.init(updatedEnv);
|
|
3062
|
+
dispatch(setEnv({ ...updatedEnv, requests }));
|
|
3063
|
+
return setupEnvConfig();
|
|
3064
|
+
};
|
|
3065
|
+
const setupUid = (uid) => {
|
|
3066
|
+
store.dispatch(setUid(uid));
|
|
3067
|
+
return setupEnvConfig();
|
|
3068
|
+
};
|
|
3069
|
+
const setupLang = (lang) => {
|
|
3070
|
+
store.dispatch(setLang(lang));
|
|
3071
|
+
return setupEnvConfig();
|
|
3072
|
+
};
|
|
3073
|
+
const setupAllowCompanies = (allowCompanies) => {
|
|
3074
|
+
store.dispatch(setAllowCompanies(allowCompanies));
|
|
3075
|
+
return setupEnvConfig();
|
|
3076
|
+
};
|
|
3077
|
+
const setupCompanies = (companies) => {
|
|
3078
|
+
store.dispatch(setCompanies(companies));
|
|
3079
|
+
return setupEnvConfig();
|
|
3080
|
+
};
|
|
3081
|
+
const setupDefaultCompany = (company) => {
|
|
3082
|
+
store.dispatch(setDefaultCompany(company));
|
|
3083
|
+
return setupEnvConfig();
|
|
3084
|
+
};
|
|
3085
|
+
const setUserInfo = (userInfo) => {
|
|
3086
|
+
store.dispatch(setUser(userInfo));
|
|
3087
|
+
return setupEnvConfig();
|
|
3088
|
+
};
|
|
3089
|
+
return {
|
|
3090
|
+
getEnvConfig: setupEnvConfig,
|
|
3091
|
+
setupEnv,
|
|
3092
|
+
setUid: setupUid,
|
|
3093
|
+
setLang: setupLang,
|
|
3094
|
+
setAllowCompanies: setupAllowCompanies,
|
|
3095
|
+
setCompanies: setupCompanies,
|
|
3096
|
+
setDefaultCompany: setupDefaultCompany,
|
|
3097
|
+
setUserInfo
|
|
3098
|
+
};
|
|
3099
|
+
}
|
|
3108
3100
|
var env = null;
|
|
3109
3101
|
function getEnv() {
|
|
3110
|
-
if (!env)
|
|
3111
|
-
env =
|
|
3102
|
+
if (!env) {
|
|
3103
|
+
env = createEnvStore(envStore, localStorageUtils(), sessionStorageUtils());
|
|
3104
|
+
}
|
|
3112
3105
|
return env;
|
|
3113
3106
|
}
|
|
3114
3107
|
|
|
@@ -3373,8 +3366,8 @@ var ViewService = {
|
|
|
3373
3366
|
},
|
|
3374
3367
|
async getVersion() {
|
|
3375
3368
|
const env2 = getEnv();
|
|
3376
|
-
console.log("env", env2);
|
|
3377
|
-
return env2?.requests
|
|
3369
|
+
console.log("env?.requests", env2, env2?.requests);
|
|
3370
|
+
return env2?.requests?.get("", {
|
|
3378
3371
|
headers: {
|
|
3379
3372
|
"Content-Type": "application/json"
|
|
3380
3373
|
}
|
|
@@ -3571,6 +3564,7 @@ var VersionGate = ({ children }) => {
|
|
|
3571
3564
|
};
|
|
3572
3565
|
const validateVersion = async () => {
|
|
3573
3566
|
const serverVersion = await view_service_default.getVersion();
|
|
3567
|
+
console.log("serverVersion", serverVersion);
|
|
3574
3568
|
const cached = localStorage.getItem("__api_version__");
|
|
3575
3569
|
if (cached !== serverVersion?.api_version) {
|
|
3576
3570
|
clearVersion();
|
|
@@ -3593,6 +3587,11 @@ var VersionGate = ({ children }) => {
|
|
|
3593
3587
|
}, [queryClient]);
|
|
3594
3588
|
return ready ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_jsx_runtime4.Fragment, { children }) : null;
|
|
3595
3589
|
};
|
|
3590
|
+
|
|
3591
|
+
// src/provider/env-provider.tsx
|
|
3592
|
+
var import_react3 = require("react");
|
|
3593
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
3594
|
+
var EnvContext = (0, import_react3.createContext)(null);
|
|
3596
3595
|
// Annotate the CommonJS export names for ESM import in node:
|
|
3597
3596
|
0 && (module.exports = {
|
|
3598
3597
|
MainProvider,
|
package/dist/provider.mjs
CHANGED
|
@@ -2823,9 +2823,9 @@ var sessionStorageUtils = () => {
|
|
|
2823
2823
|
// src/configs/axios-client.ts
|
|
2824
2824
|
var axiosClient = {
|
|
2825
2825
|
init(config) {
|
|
2826
|
-
const localStorage2 = config
|
|
2827
|
-
const sessionStorage2 = config
|
|
2828
|
-
const db = config
|
|
2826
|
+
const localStorage2 = config?.localStorageUtils ?? localStorageUtils();
|
|
2827
|
+
const sessionStorage2 = config?.sessionStorageUtils ?? sessionStorageUtils();
|
|
2828
|
+
const db = config?.db;
|
|
2829
2829
|
let isRefreshing = false;
|
|
2830
2830
|
let failedQueue = [];
|
|
2831
2831
|
const processQueue = (error, token = null) => {
|
|
@@ -2844,16 +2844,19 @@ var axiosClient = {
|
|
|
2844
2844
|
timeout: 5e4,
|
|
2845
2845
|
paramsSerializer: (params) => new URLSearchParams(params).toString()
|
|
2846
2846
|
});
|
|
2847
|
-
instance.interceptors.request.use(
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2847
|
+
instance.interceptors.request.use(
|
|
2848
|
+
async (config2) => {
|
|
2849
|
+
const useRefreshToken = config2.useRefreshToken;
|
|
2850
|
+
const token = useRefreshToken ? await localStorage2.getRefreshToken() : await localStorage2.getAccessToken();
|
|
2851
|
+
if (token) {
|
|
2852
|
+
config2.headers["Authorization"] = "Bearer " + token;
|
|
2853
|
+
}
|
|
2854
|
+
return config2;
|
|
2855
|
+
},
|
|
2856
|
+
(error) => {
|
|
2857
|
+
Promise.reject(error);
|
|
2858
|
+
}
|
|
2859
|
+
);
|
|
2857
2860
|
instance.interceptors.response.use(
|
|
2858
2861
|
(response) => {
|
|
2859
2862
|
return handleResponse(response);
|
|
@@ -2994,83 +2997,73 @@ var axiosClient = {
|
|
|
2994
2997
|
};
|
|
2995
2998
|
|
|
2996
2999
|
// src/environment/EnvStore.ts
|
|
2997
|
-
|
|
2998
|
-
|
|
2999
|
-
|
|
3000
|
-
|
|
3001
|
-
|
|
3002
|
-
|
|
3003
|
-
|
|
3004
|
-
|
|
3005
|
-
|
|
3006
|
-
|
|
3007
|
-
|
|
3008
|
-
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
setup() {
|
|
3017
|
-
const env2 = this.envStore.getState().env;
|
|
3018
|
-
this.baseUrl = env2?.baseUrl;
|
|
3019
|
-
this.requests = env2?.requests;
|
|
3020
|
-
this.context = env2?.context;
|
|
3021
|
-
this.defaultCompany = env2?.defaultCompany;
|
|
3022
|
-
this.config = env2?.config;
|
|
3023
|
-
this.companies = env2?.companies || [];
|
|
3024
|
-
this.user = env2?.user;
|
|
3025
|
-
this.db = env2?.db;
|
|
3026
|
-
this.refreshTokenEndpoint = env2?.refreshTokenEndpoint;
|
|
3027
|
-
}
|
|
3028
|
-
setupEnv(envConfig) {
|
|
3029
|
-
const dispatch = this.envStore.dispatch;
|
|
3030
|
-
const env2 = {
|
|
3000
|
+
function createEnvStore(store, localStorageUtil, sessionStorageUtil) {
|
|
3001
|
+
const getEnvState = () => store.getState().env;
|
|
3002
|
+
const setupEnvConfig = () => {
|
|
3003
|
+
const env2 = getEnvState();
|
|
3004
|
+
return {
|
|
3005
|
+
baseUrl: env2?.baseUrl,
|
|
3006
|
+
requests: env2?.requests,
|
|
3007
|
+
context: env2?.context,
|
|
3008
|
+
defaultCompany: env2?.defaultCompany,
|
|
3009
|
+
config: env2?.config,
|
|
3010
|
+
companies: env2?.companies || [],
|
|
3011
|
+
user: env2?.user,
|
|
3012
|
+
db: env2?.db,
|
|
3013
|
+
refreshTokenEndpoint: env2?.refreshTokenEndpoint
|
|
3014
|
+
};
|
|
3015
|
+
};
|
|
3016
|
+
const setupEnv = (envConfig) => {
|
|
3017
|
+
const dispatch = store.dispatch;
|
|
3018
|
+
const updatedEnv = {
|
|
3031
3019
|
...envConfig,
|
|
3032
|
-
localStorageUtils:
|
|
3033
|
-
sessionStorageUtils:
|
|
3020
|
+
localStorageUtils: localStorageUtil,
|
|
3021
|
+
sessionStorageUtils: sessionStorageUtil
|
|
3034
3022
|
};
|
|
3035
|
-
const requests = axiosClient.init(
|
|
3036
|
-
dispatch(setEnv({ ...
|
|
3037
|
-
|
|
3038
|
-
}
|
|
3039
|
-
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
|
|
3052
|
-
|
|
3053
|
-
|
|
3054
|
-
|
|
3055
|
-
|
|
3056
|
-
dispatch(
|
|
3057
|
-
|
|
3058
|
-
}
|
|
3059
|
-
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
|
|
3063
|
-
|
|
3064
|
-
|
|
3065
|
-
|
|
3066
|
-
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
|
|
3023
|
+
const requests = axiosClient.init(updatedEnv);
|
|
3024
|
+
dispatch(setEnv({ ...updatedEnv, requests }));
|
|
3025
|
+
return setupEnvConfig();
|
|
3026
|
+
};
|
|
3027
|
+
const setupUid = (uid) => {
|
|
3028
|
+
store.dispatch(setUid(uid));
|
|
3029
|
+
return setupEnvConfig();
|
|
3030
|
+
};
|
|
3031
|
+
const setupLang = (lang) => {
|
|
3032
|
+
store.dispatch(setLang(lang));
|
|
3033
|
+
return setupEnvConfig();
|
|
3034
|
+
};
|
|
3035
|
+
const setupAllowCompanies = (allowCompanies) => {
|
|
3036
|
+
store.dispatch(setAllowCompanies(allowCompanies));
|
|
3037
|
+
return setupEnvConfig();
|
|
3038
|
+
};
|
|
3039
|
+
const setupCompanies = (companies) => {
|
|
3040
|
+
store.dispatch(setCompanies(companies));
|
|
3041
|
+
return setupEnvConfig();
|
|
3042
|
+
};
|
|
3043
|
+
const setupDefaultCompany = (company) => {
|
|
3044
|
+
store.dispatch(setDefaultCompany(company));
|
|
3045
|
+
return setupEnvConfig();
|
|
3046
|
+
};
|
|
3047
|
+
const setUserInfo = (userInfo) => {
|
|
3048
|
+
store.dispatch(setUser(userInfo));
|
|
3049
|
+
return setupEnvConfig();
|
|
3050
|
+
};
|
|
3051
|
+
return {
|
|
3052
|
+
getEnvConfig: setupEnvConfig,
|
|
3053
|
+
setupEnv,
|
|
3054
|
+
setUid: setupUid,
|
|
3055
|
+
setLang: setupLang,
|
|
3056
|
+
setAllowCompanies: setupAllowCompanies,
|
|
3057
|
+
setCompanies: setupCompanies,
|
|
3058
|
+
setDefaultCompany: setupDefaultCompany,
|
|
3059
|
+
setUserInfo
|
|
3060
|
+
};
|
|
3061
|
+
}
|
|
3070
3062
|
var env = null;
|
|
3071
3063
|
function getEnv() {
|
|
3072
|
-
if (!env)
|
|
3073
|
-
env =
|
|
3064
|
+
if (!env) {
|
|
3065
|
+
env = createEnvStore(envStore, localStorageUtils(), sessionStorageUtils());
|
|
3066
|
+
}
|
|
3074
3067
|
return env;
|
|
3075
3068
|
}
|
|
3076
3069
|
|
|
@@ -3335,8 +3328,8 @@ var ViewService = {
|
|
|
3335
3328
|
},
|
|
3336
3329
|
async getVersion() {
|
|
3337
3330
|
const env2 = getEnv();
|
|
3338
|
-
console.log("env", env2);
|
|
3339
|
-
return env2?.requests
|
|
3331
|
+
console.log("env?.requests", env2, env2?.requests);
|
|
3332
|
+
return env2?.requests?.get("", {
|
|
3340
3333
|
headers: {
|
|
3341
3334
|
"Content-Type": "application/json"
|
|
3342
3335
|
}
|
|
@@ -3533,6 +3526,7 @@ var VersionGate = ({ children }) => {
|
|
|
3533
3526
|
};
|
|
3534
3527
|
const validateVersion = async () => {
|
|
3535
3528
|
const serverVersion = await view_service_default.getVersion();
|
|
3529
|
+
console.log("serverVersion", serverVersion);
|
|
3536
3530
|
const cached = localStorage.getItem("__api_version__");
|
|
3537
3531
|
if (cached !== serverVersion?.api_version) {
|
|
3538
3532
|
clearVersion();
|
|
@@ -3555,6 +3549,11 @@ var VersionGate = ({ children }) => {
|
|
|
3555
3549
|
}, [queryClient]);
|
|
3556
3550
|
return ready ? /* @__PURE__ */ jsx4(Fragment, { children }) : null;
|
|
3557
3551
|
};
|
|
3552
|
+
|
|
3553
|
+
// src/provider/env-provider.tsx
|
|
3554
|
+
import { createContext, useContext, useState as useState3, useCallback } from "react";
|
|
3555
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
3556
|
+
var EnvContext = createContext(null);
|
|
3558
3557
|
export {
|
|
3559
3558
|
MainProvider,
|
|
3560
3559
|
ReactQueryProvider,
|
package/dist/services.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as ContextApi, L as LoginCredentialBody, R as ResetPasswordRequest, U as UpdatePasswordRequest, b as GetListParams,
|
|
1
|
+
import { C as ContextApi, L as LoginCredentialBody, R as ResetPasswordRequest, U as UpdatePasswordRequest, b as GetListParams, c as GetDetailParams, d as SaveParams, D as DeleteParams, O as OnChangeParams, V as ViewData, a as GetViewParams, G as GetSelectionType } from './view-type-D8ukwj_2.mjs';
|
|
2
2
|
|
|
3
3
|
declare const ActionService: {
|
|
4
4
|
loadAction({ idAction, context, }: {
|
|
@@ -51,7 +51,6 @@ declare const AuthService: {
|
|
|
51
51
|
}): Promise<any>;
|
|
52
52
|
updatePassword(data: UpdatePasswordRequest, token: string | null): Promise<any>;
|
|
53
53
|
isValidToken(token: string | null): Promise<any>;
|
|
54
|
-
isValidActionToken(actionToken: string | null, path: string): Promise<any>;
|
|
55
54
|
loginSocial({ db, state, access_token, }: {
|
|
56
55
|
db: string;
|
|
57
56
|
state: object;
|
package/dist/services.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as ContextApi, L as LoginCredentialBody, R as ResetPasswordRequest, U as UpdatePasswordRequest, b as GetListParams,
|
|
1
|
+
import { C as ContextApi, L as LoginCredentialBody, R as ResetPasswordRequest, U as UpdatePasswordRequest, b as GetListParams, c as GetDetailParams, d as SaveParams, D as DeleteParams, O as OnChangeParams, V as ViewData, a as GetViewParams, G as GetSelectionType } from './view-type-D8ukwj_2.js';
|
|
2
2
|
|
|
3
3
|
declare const ActionService: {
|
|
4
4
|
loadAction({ idAction, context, }: {
|
|
@@ -51,7 +51,6 @@ declare const AuthService: {
|
|
|
51
51
|
}): Promise<any>;
|
|
52
52
|
updatePassword(data: UpdatePasswordRequest, token: string | null): Promise<any>;
|
|
53
53
|
isValidToken(token: string | null): Promise<any>;
|
|
54
|
-
isValidActionToken(actionToken: string | null, path: string): Promise<any>;
|
|
55
54
|
loginSocial({ db, state, access_token, }: {
|
|
56
55
|
db: string;
|
|
57
56
|
state: object;
|