@fctc/interface-logic 1.7.6 → 1.7.8
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 +3 -3
- package/dist/configs.mjs +3 -3
- package/dist/environment.d.mts +20 -19
- package/dist/environment.d.ts +20 -19
- package/dist/environment.js +48 -67
- package/dist/environment.mjs +48 -67
- package/dist/hooks.d.mts +1 -1
- package/dist/hooks.d.ts +1 -1
- package/dist/hooks.js +47 -65
- package/dist/hooks.mjs +47 -65
- package/dist/provider.js +47 -65
- package/dist/provider.mjs +47 -65
- package/dist/services.d.mts +1 -1
- package/dist/services.d.ts +1 -1
- package/dist/services.js +47 -65
- package/dist/services.mjs +47 -65
- 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/services.js
CHANGED
|
@@ -2251,9 +2251,9 @@ var sessionStorageUtils = () => {
|
|
|
2251
2251
|
// src/configs/axios-client.ts
|
|
2252
2252
|
var axiosClient = {
|
|
2253
2253
|
init(config) {
|
|
2254
|
-
const localStorage2 = config
|
|
2255
|
-
const sessionStorage2 = config
|
|
2256
|
-
const db = config
|
|
2254
|
+
const localStorage2 = config?.localStorageUtils ?? localStorageUtils();
|
|
2255
|
+
const sessionStorage2 = config?.sessionStorageUtils ?? sessionStorageUtils();
|
|
2256
|
+
const db = config?.db;
|
|
2257
2257
|
let isRefreshing = false;
|
|
2258
2258
|
let failedQueue = [];
|
|
2259
2259
|
const processQueue = (error, token = null) => {
|
|
@@ -3041,97 +3041,79 @@ var envStore = (0, import_toolkit11.configureStore)({
|
|
|
3041
3041
|
// src/environment/EnvStore.ts
|
|
3042
3042
|
var EnvStore = class _EnvStore {
|
|
3043
3043
|
static instance = null;
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
config;
|
|
3050
|
-
companies;
|
|
3051
|
-
user;
|
|
3052
|
-
db;
|
|
3053
|
-
localStorageUtils;
|
|
3054
|
-
sessionStorageUtils;
|
|
3055
|
-
refreshTokenEndpoint;
|
|
3056
|
-
constructor(envStore2, localStorageUtils2, sessionStorageUtils2) {
|
|
3057
|
-
this.envStore = envStore2;
|
|
3058
|
-
this.localStorageUtils = localStorageUtils2;
|
|
3059
|
-
this.sessionStorageUtils = sessionStorageUtils2;
|
|
3060
|
-
this.setup();
|
|
3061
|
-
}
|
|
3062
|
-
static getInstance(envStore2, localStorageUtils2, sessionStorageUtils2) {
|
|
3044
|
+
static localStorageUtils;
|
|
3045
|
+
static sessionStorageUtils;
|
|
3046
|
+
constructor() {
|
|
3047
|
+
}
|
|
3048
|
+
static getInstance(localStorageUtils2, sessionStorageUtils2) {
|
|
3063
3049
|
if (!_EnvStore.instance) {
|
|
3064
3050
|
console.log("Creating new EnvStore instance");
|
|
3065
|
-
_EnvStore.instance = new _EnvStore(
|
|
3051
|
+
_EnvStore.instance = new _EnvStore();
|
|
3052
|
+
_EnvStore.localStorageUtils = localStorageUtils2;
|
|
3053
|
+
_EnvStore.sessionStorageUtils = sessionStorageUtils2;
|
|
3066
3054
|
} else {
|
|
3067
3055
|
console.log("Returning existing EnvStore instance");
|
|
3068
3056
|
}
|
|
3069
3057
|
return _EnvStore.instance;
|
|
3070
3058
|
}
|
|
3071
|
-
|
|
3072
|
-
const
|
|
3073
|
-
console.log("Redux env state
|
|
3074
|
-
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
|
|
3059
|
+
static getState() {
|
|
3060
|
+
const state = envStore.getState().env;
|
|
3061
|
+
console.log("Redux env state:", state);
|
|
3062
|
+
return {
|
|
3063
|
+
baseUrl: state?.baseUrl,
|
|
3064
|
+
requests: state?.requests,
|
|
3065
|
+
context: state?.context,
|
|
3066
|
+
defaultCompany: state?.defaultCompany,
|
|
3067
|
+
config: state?.config,
|
|
3068
|
+
companies: state?.companies || [],
|
|
3069
|
+
user: state?.user,
|
|
3070
|
+
db: state?.db,
|
|
3071
|
+
refreshTokenEndpoint: state?.refreshTokenEndpoint,
|
|
3072
|
+
uid: state?.uid,
|
|
3073
|
+
lang: state?.lang,
|
|
3074
|
+
allowCompanies: state?.allowCompanies
|
|
3075
|
+
};
|
|
3076
|
+
}
|
|
3077
|
+
static setupEnv(envConfig) {
|
|
3078
|
+
const dispatch = envStore.dispatch;
|
|
3087
3079
|
const env = {
|
|
3080
|
+
..._EnvStore.getState(),
|
|
3088
3081
|
...envConfig,
|
|
3089
|
-
localStorageUtils:
|
|
3090
|
-
sessionStorageUtils:
|
|
3082
|
+
localStorageUtils: _EnvStore.localStorageUtils,
|
|
3083
|
+
sessionStorageUtils: _EnvStore.sessionStorageUtils
|
|
3091
3084
|
};
|
|
3092
3085
|
console.log("Setting up env with config:", envConfig);
|
|
3093
3086
|
const requests = axiosClient.init(env);
|
|
3094
3087
|
console.log("axiosClient.init result:", requests);
|
|
3095
3088
|
dispatch(setEnv({ ...env, requests }));
|
|
3096
|
-
this.setup();
|
|
3097
3089
|
}
|
|
3098
|
-
setUid(uid) {
|
|
3099
|
-
const dispatch =
|
|
3090
|
+
static setUid(uid) {
|
|
3091
|
+
const dispatch = envStore.dispatch;
|
|
3100
3092
|
dispatch(setUid(uid));
|
|
3101
|
-
this.setup();
|
|
3102
3093
|
}
|
|
3103
|
-
setLang(lang) {
|
|
3104
|
-
const dispatch =
|
|
3094
|
+
static setLang(lang) {
|
|
3095
|
+
const dispatch = envStore.dispatch;
|
|
3105
3096
|
dispatch(setLang(lang));
|
|
3106
|
-
this.setup();
|
|
3107
3097
|
}
|
|
3108
|
-
setAllowCompanies(allowCompanies) {
|
|
3109
|
-
const dispatch =
|
|
3098
|
+
static setAllowCompanies(allowCompanies) {
|
|
3099
|
+
const dispatch = envStore.dispatch;
|
|
3110
3100
|
dispatch(setAllowCompanies(allowCompanies));
|
|
3111
|
-
this.setup();
|
|
3112
3101
|
}
|
|
3113
|
-
setCompanies(companies) {
|
|
3114
|
-
const dispatch =
|
|
3102
|
+
static setCompanies(companies) {
|
|
3103
|
+
const dispatch = envStore.dispatch;
|
|
3115
3104
|
dispatch(setCompanies(companies));
|
|
3116
|
-
this.setup();
|
|
3117
3105
|
}
|
|
3118
|
-
setDefaultCompany(company) {
|
|
3119
|
-
const dispatch =
|
|
3106
|
+
static setDefaultCompany(company) {
|
|
3107
|
+
const dispatch = envStore.dispatch;
|
|
3120
3108
|
dispatch(setDefaultCompany(company));
|
|
3121
|
-
this.setup();
|
|
3122
3109
|
}
|
|
3123
|
-
setUserInfo(userInfo) {
|
|
3124
|
-
const dispatch =
|
|
3110
|
+
static setUserInfo(userInfo) {
|
|
3111
|
+
const dispatch = envStore.dispatch;
|
|
3125
3112
|
dispatch(setUser(userInfo));
|
|
3126
|
-
this.setup();
|
|
3127
3113
|
}
|
|
3128
3114
|
};
|
|
3129
3115
|
function getEnv() {
|
|
3130
|
-
|
|
3131
|
-
if (!instance) {
|
|
3132
|
-
throw new Error("EnvStore has not been initialized \u2014 call initEnv() first");
|
|
3133
|
-
}
|
|
3134
|
-
return instance;
|
|
3116
|
+
return EnvStore.getState();
|
|
3135
3117
|
}
|
|
3136
3118
|
|
|
3137
3119
|
// src/services/action-service/index.ts
|
package/dist/services.mjs
CHANGED
|
@@ -2207,9 +2207,9 @@ var sessionStorageUtils = () => {
|
|
|
2207
2207
|
// src/configs/axios-client.ts
|
|
2208
2208
|
var axiosClient = {
|
|
2209
2209
|
init(config) {
|
|
2210
|
-
const localStorage2 = config
|
|
2211
|
-
const sessionStorage2 = config
|
|
2212
|
-
const db = config
|
|
2210
|
+
const localStorage2 = config?.localStorageUtils ?? localStorageUtils();
|
|
2211
|
+
const sessionStorage2 = config?.sessionStorageUtils ?? sessionStorageUtils();
|
|
2212
|
+
const db = config?.db;
|
|
2213
2213
|
let isRefreshing = false;
|
|
2214
2214
|
let failedQueue = [];
|
|
2215
2215
|
const processQueue = (error, token = null) => {
|
|
@@ -2997,97 +2997,79 @@ var envStore = configureStore({
|
|
|
2997
2997
|
// src/environment/EnvStore.ts
|
|
2998
2998
|
var EnvStore = class _EnvStore {
|
|
2999
2999
|
static instance = null;
|
|
3000
|
-
|
|
3001
|
-
|
|
3002
|
-
|
|
3003
|
-
|
|
3004
|
-
|
|
3005
|
-
config;
|
|
3006
|
-
companies;
|
|
3007
|
-
user;
|
|
3008
|
-
db;
|
|
3009
|
-
localStorageUtils;
|
|
3010
|
-
sessionStorageUtils;
|
|
3011
|
-
refreshTokenEndpoint;
|
|
3012
|
-
constructor(envStore2, localStorageUtils2, sessionStorageUtils2) {
|
|
3013
|
-
this.envStore = envStore2;
|
|
3014
|
-
this.localStorageUtils = localStorageUtils2;
|
|
3015
|
-
this.sessionStorageUtils = sessionStorageUtils2;
|
|
3016
|
-
this.setup();
|
|
3017
|
-
}
|
|
3018
|
-
static getInstance(envStore2, localStorageUtils2, sessionStorageUtils2) {
|
|
3000
|
+
static localStorageUtils;
|
|
3001
|
+
static sessionStorageUtils;
|
|
3002
|
+
constructor() {
|
|
3003
|
+
}
|
|
3004
|
+
static getInstance(localStorageUtils2, sessionStorageUtils2) {
|
|
3019
3005
|
if (!_EnvStore.instance) {
|
|
3020
3006
|
console.log("Creating new EnvStore instance");
|
|
3021
|
-
_EnvStore.instance = new _EnvStore(
|
|
3007
|
+
_EnvStore.instance = new _EnvStore();
|
|
3008
|
+
_EnvStore.localStorageUtils = localStorageUtils2;
|
|
3009
|
+
_EnvStore.sessionStorageUtils = sessionStorageUtils2;
|
|
3022
3010
|
} else {
|
|
3023
3011
|
console.log("Returning existing EnvStore instance");
|
|
3024
3012
|
}
|
|
3025
3013
|
return _EnvStore.instance;
|
|
3026
3014
|
}
|
|
3027
|
-
|
|
3028
|
-
const
|
|
3029
|
-
console.log("Redux env state
|
|
3030
|
-
|
|
3031
|
-
|
|
3032
|
-
|
|
3033
|
-
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
|
|
3039
|
-
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
|
|
3015
|
+
static getState() {
|
|
3016
|
+
const state = envStore.getState().env;
|
|
3017
|
+
console.log("Redux env state:", state);
|
|
3018
|
+
return {
|
|
3019
|
+
baseUrl: state?.baseUrl,
|
|
3020
|
+
requests: state?.requests,
|
|
3021
|
+
context: state?.context,
|
|
3022
|
+
defaultCompany: state?.defaultCompany,
|
|
3023
|
+
config: state?.config,
|
|
3024
|
+
companies: state?.companies || [],
|
|
3025
|
+
user: state?.user,
|
|
3026
|
+
db: state?.db,
|
|
3027
|
+
refreshTokenEndpoint: state?.refreshTokenEndpoint,
|
|
3028
|
+
uid: state?.uid,
|
|
3029
|
+
lang: state?.lang,
|
|
3030
|
+
allowCompanies: state?.allowCompanies
|
|
3031
|
+
};
|
|
3032
|
+
}
|
|
3033
|
+
static setupEnv(envConfig) {
|
|
3034
|
+
const dispatch = envStore.dispatch;
|
|
3043
3035
|
const env = {
|
|
3036
|
+
..._EnvStore.getState(),
|
|
3044
3037
|
...envConfig,
|
|
3045
|
-
localStorageUtils:
|
|
3046
|
-
sessionStorageUtils:
|
|
3038
|
+
localStorageUtils: _EnvStore.localStorageUtils,
|
|
3039
|
+
sessionStorageUtils: _EnvStore.sessionStorageUtils
|
|
3047
3040
|
};
|
|
3048
3041
|
console.log("Setting up env with config:", envConfig);
|
|
3049
3042
|
const requests = axiosClient.init(env);
|
|
3050
3043
|
console.log("axiosClient.init result:", requests);
|
|
3051
3044
|
dispatch(setEnv({ ...env, requests }));
|
|
3052
|
-
this.setup();
|
|
3053
3045
|
}
|
|
3054
|
-
setUid(uid) {
|
|
3055
|
-
const dispatch =
|
|
3046
|
+
static setUid(uid) {
|
|
3047
|
+
const dispatch = envStore.dispatch;
|
|
3056
3048
|
dispatch(setUid(uid));
|
|
3057
|
-
this.setup();
|
|
3058
3049
|
}
|
|
3059
|
-
setLang(lang) {
|
|
3060
|
-
const dispatch =
|
|
3050
|
+
static setLang(lang) {
|
|
3051
|
+
const dispatch = envStore.dispatch;
|
|
3061
3052
|
dispatch(setLang(lang));
|
|
3062
|
-
this.setup();
|
|
3063
3053
|
}
|
|
3064
|
-
setAllowCompanies(allowCompanies) {
|
|
3065
|
-
const dispatch =
|
|
3054
|
+
static setAllowCompanies(allowCompanies) {
|
|
3055
|
+
const dispatch = envStore.dispatch;
|
|
3066
3056
|
dispatch(setAllowCompanies(allowCompanies));
|
|
3067
|
-
this.setup();
|
|
3068
3057
|
}
|
|
3069
|
-
setCompanies(companies) {
|
|
3070
|
-
const dispatch =
|
|
3058
|
+
static setCompanies(companies) {
|
|
3059
|
+
const dispatch = envStore.dispatch;
|
|
3071
3060
|
dispatch(setCompanies(companies));
|
|
3072
|
-
this.setup();
|
|
3073
3061
|
}
|
|
3074
|
-
setDefaultCompany(company) {
|
|
3075
|
-
const dispatch =
|
|
3062
|
+
static setDefaultCompany(company) {
|
|
3063
|
+
const dispatch = envStore.dispatch;
|
|
3076
3064
|
dispatch(setDefaultCompany(company));
|
|
3077
|
-
this.setup();
|
|
3078
3065
|
}
|
|
3079
|
-
setUserInfo(userInfo) {
|
|
3080
|
-
const dispatch =
|
|
3066
|
+
static setUserInfo(userInfo) {
|
|
3067
|
+
const dispatch = envStore.dispatch;
|
|
3081
3068
|
dispatch(setUser(userInfo));
|
|
3082
|
-
this.setup();
|
|
3083
3069
|
}
|
|
3084
3070
|
};
|
|
3085
3071
|
function getEnv() {
|
|
3086
|
-
|
|
3087
|
-
if (!instance) {
|
|
3088
|
-
throw new Error("EnvStore has not been initialized \u2014 call initEnv() first");
|
|
3089
|
-
}
|
|
3090
|
-
return instance;
|
|
3072
|
+
return EnvStore.getState();
|
|
3091
3073
|
}
|
|
3092
3074
|
|
|
3093
3075
|
// src/services/action-service/index.ts
|
package/dist/types.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { C as ContextApi, D as DeleteParams, F as ForgotPasswordBody,
|
|
1
|
+
export { C as ContextApi, D as DeleteParams, F as ForgotPasswordBody, e as GetAllParams, c as GetDetailParams, b as GetListParams, G as GetSelectionType, a as GetViewParams, L as LoginCredentialBody, O as OnChangeParams, R as ResetPasswordRequest, d as SaveParams, S as SocialTokenBody, f as Specification, U as UpdatePasswordRequest, g as View, V as ViewData, u as updatePasswordBody } from './view-type-D8ukwj_2.mjs';
|
|
2
2
|
|
|
3
3
|
interface Config {
|
|
4
4
|
baseUrl: string;
|
package/dist/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { C as ContextApi, D as DeleteParams, F as ForgotPasswordBody,
|
|
1
|
+
export { C as ContextApi, D as DeleteParams, F as ForgotPasswordBody, e as GetAllParams, c as GetDetailParams, b as GetListParams, G as GetSelectionType, a as GetViewParams, L as LoginCredentialBody, O as OnChangeParams, R as ResetPasswordRequest, d as SaveParams, S as SocialTokenBody, f as Specification, U as UpdatePasswordRequest, g as View, V as ViewData, u as updatePasswordBody } from './view-type-D8ukwj_2.js';
|
|
2
2
|
|
|
3
3
|
interface Config {
|
|
4
4
|
baseUrl: string;
|
|
@@ -110,4 +110,4 @@ interface GetViewParams {
|
|
|
110
110
|
aid?: number | string | null | boolean;
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
-
export type { ContextApi as C, DeleteParams as D, ForgotPasswordBody as F,
|
|
113
|
+
export type { ContextApi as C, DeleteParams as D, ForgotPasswordBody as F, GetSelectionType as G, LoginCredentialBody as L, OnChangeParams as O, ResetPasswordRequest as R, SocialTokenBody as S, UpdatePasswordRequest as U, ViewData as V, GetViewParams as a, GetListParams as b, GetDetailParams as c, SaveParams as d, GetAllParams as e, Specification as f, View as g, updatePasswordBody as u };
|
|
@@ -110,4 +110,4 @@ interface GetViewParams {
|
|
|
110
110
|
aid?: number | string | null | boolean;
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
-
export type { ContextApi as C, DeleteParams as D, ForgotPasswordBody as F,
|
|
113
|
+
export type { ContextApi as C, DeleteParams as D, ForgotPasswordBody as F, GetSelectionType as G, LoginCredentialBody as L, OnChangeParams as O, ResetPasswordRequest as R, SocialTokenBody as S, UpdatePasswordRequest as U, ViewData as V, GetViewParams as a, GetListParams as b, GetDetailParams as c, SaveParams as d, GetAllParams as e, Specification as f, View as g, updatePasswordBody as u };
|