@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/hooks.js CHANGED
@@ -2335,9 +2335,9 @@ var sessionStorageUtils = () => {
2335
2335
  // src/configs/axios-client.ts
2336
2336
  var axiosClient = {
2337
2337
  init(config) {
2338
- const localStorage2 = config.localStorageUtils ?? localStorageUtils();
2339
- const sessionStorage2 = config.sessionStorageUtils ?? sessionStorageUtils();
2340
- const db = config.db;
2338
+ const localStorage2 = config?.localStorageUtils ?? localStorageUtils();
2339
+ const sessionStorage2 = config?.sessionStorageUtils ?? sessionStorageUtils();
2340
+ const db = config?.db;
2341
2341
  let isRefreshing = false;
2342
2342
  let failedQueue = [];
2343
2343
  const processQueue = (error, token = null) => {
@@ -3125,97 +3125,79 @@ var envStore = (0, import_toolkit11.configureStore)({
3125
3125
  // src/environment/EnvStore.ts
3126
3126
  var EnvStore = class _EnvStore {
3127
3127
  static instance = null;
3128
- envStore;
3129
- baseUrl;
3130
- requests;
3131
- context;
3132
- defaultCompany;
3133
- config;
3134
- companies;
3135
- user;
3136
- db;
3137
- localStorageUtils;
3138
- sessionStorageUtils;
3139
- refreshTokenEndpoint;
3140
- constructor(envStore2, localStorageUtils2, sessionStorageUtils2) {
3141
- this.envStore = envStore2;
3142
- this.localStorageUtils = localStorageUtils2;
3143
- this.sessionStorageUtils = sessionStorageUtils2;
3144
- this.setup();
3145
- }
3146
- static getInstance(envStore2, localStorageUtils2, sessionStorageUtils2) {
3128
+ static localStorageUtils;
3129
+ static sessionStorageUtils;
3130
+ constructor() {
3131
+ }
3132
+ static getInstance(localStorageUtils2, sessionStorageUtils2) {
3147
3133
  if (!_EnvStore.instance) {
3148
3134
  console.log("Creating new EnvStore instance");
3149
- _EnvStore.instance = new _EnvStore(envStore2, localStorageUtils2, sessionStorageUtils2);
3135
+ _EnvStore.instance = new _EnvStore();
3136
+ _EnvStore.localStorageUtils = localStorageUtils2;
3137
+ _EnvStore.sessionStorageUtils = sessionStorageUtils2;
3150
3138
  } else {
3151
3139
  console.log("Returning existing EnvStore instance");
3152
3140
  }
3153
3141
  return _EnvStore.instance;
3154
3142
  }
3155
- setup() {
3156
- const env = this.envStore.getState().env;
3157
- console.log("Redux env state in A1:", env);
3158
- this.baseUrl = env?.baseUrl;
3159
- this.requests = env?.requests;
3160
- this.context = env?.context;
3161
- this.defaultCompany = env?.defaultCompany;
3162
- this.config = env?.config;
3163
- this.companies = env?.companies || [];
3164
- this.user = env?.user;
3165
- this.db = env?.db;
3166
- this.refreshTokenEndpoint = env?.refreshTokenEndpoint;
3167
- console.log("Env setup in A1:", this);
3168
- }
3169
- setupEnv(envConfig) {
3170
- const dispatch = this.envStore.dispatch;
3143
+ static getState() {
3144
+ const state = envStore.getState().env;
3145
+ console.log("Redux env state:", state);
3146
+ return {
3147
+ baseUrl: state?.baseUrl,
3148
+ requests: state?.requests,
3149
+ context: state?.context,
3150
+ defaultCompany: state?.defaultCompany,
3151
+ config: state?.config,
3152
+ companies: state?.companies || [],
3153
+ user: state?.user,
3154
+ db: state?.db,
3155
+ refreshTokenEndpoint: state?.refreshTokenEndpoint,
3156
+ uid: state?.uid,
3157
+ lang: state?.lang,
3158
+ allowCompanies: state?.allowCompanies
3159
+ };
3160
+ }
3161
+ static setupEnv(envConfig) {
3162
+ const dispatch = envStore.dispatch;
3171
3163
  const env = {
3164
+ ..._EnvStore.getState(),
3172
3165
  ...envConfig,
3173
- localStorageUtils: this.localStorageUtils,
3174
- sessionStorageUtils: this.sessionStorageUtils
3166
+ localStorageUtils: _EnvStore.localStorageUtils,
3167
+ sessionStorageUtils: _EnvStore.sessionStorageUtils
3175
3168
  };
3176
3169
  console.log("Setting up env with config:", envConfig);
3177
3170
  const requests = axiosClient.init(env);
3178
3171
  console.log("axiosClient.init result:", requests);
3179
3172
  dispatch(setEnv({ ...env, requests }));
3180
- this.setup();
3181
3173
  }
3182
- setUid(uid) {
3183
- const dispatch = this.envStore.dispatch;
3174
+ static setUid(uid) {
3175
+ const dispatch = envStore.dispatch;
3184
3176
  dispatch(setUid(uid));
3185
- this.setup();
3186
3177
  }
3187
- setLang(lang) {
3188
- const dispatch = this.envStore.dispatch;
3178
+ static setLang(lang) {
3179
+ const dispatch = envStore.dispatch;
3189
3180
  dispatch(setLang(lang));
3190
- this.setup();
3191
3181
  }
3192
- setAllowCompanies(allowCompanies) {
3193
- const dispatch = this.envStore.dispatch;
3182
+ static setAllowCompanies(allowCompanies) {
3183
+ const dispatch = envStore.dispatch;
3194
3184
  dispatch(setAllowCompanies(allowCompanies));
3195
- this.setup();
3196
3185
  }
3197
- setCompanies(companies) {
3198
- const dispatch = this.envStore.dispatch;
3186
+ static setCompanies(companies) {
3187
+ const dispatch = envStore.dispatch;
3199
3188
  dispatch(setCompanies(companies));
3200
- this.setup();
3201
3189
  }
3202
- setDefaultCompany(company) {
3203
- const dispatch = this.envStore.dispatch;
3190
+ static setDefaultCompany(company) {
3191
+ const dispatch = envStore.dispatch;
3204
3192
  dispatch(setDefaultCompany(company));
3205
- this.setup();
3206
3193
  }
3207
- setUserInfo(userInfo) {
3208
- const dispatch = this.envStore.dispatch;
3194
+ static setUserInfo(userInfo) {
3195
+ const dispatch = envStore.dispatch;
3209
3196
  dispatch(setUser(userInfo));
3210
- this.setup();
3211
3197
  }
3212
3198
  };
3213
3199
  function getEnv() {
3214
- const instance = EnvStore.getInstance(envStore);
3215
- if (!instance) {
3216
- throw new Error("EnvStore has not been initialized \u2014 call initEnv() first");
3217
- }
3218
- return instance;
3200
+ return EnvStore.getState();
3219
3201
  }
3220
3202
 
3221
3203
  // src/services/action-service/index.ts
package/dist/hooks.mjs CHANGED
@@ -2232,9 +2232,9 @@ var sessionStorageUtils = () => {
2232
2232
  // src/configs/axios-client.ts
2233
2233
  var axiosClient = {
2234
2234
  init(config) {
2235
- const localStorage2 = config.localStorageUtils ?? localStorageUtils();
2236
- const sessionStorage2 = config.sessionStorageUtils ?? sessionStorageUtils();
2237
- const db = config.db;
2235
+ const localStorage2 = config?.localStorageUtils ?? localStorageUtils();
2236
+ const sessionStorage2 = config?.sessionStorageUtils ?? sessionStorageUtils();
2237
+ const db = config?.db;
2238
2238
  let isRefreshing = false;
2239
2239
  let failedQueue = [];
2240
2240
  const processQueue = (error, token = null) => {
@@ -3022,97 +3022,79 @@ var envStore = configureStore({
3022
3022
  // src/environment/EnvStore.ts
3023
3023
  var EnvStore = class _EnvStore {
3024
3024
  static instance = null;
3025
- envStore;
3026
- baseUrl;
3027
- requests;
3028
- context;
3029
- defaultCompany;
3030
- config;
3031
- companies;
3032
- user;
3033
- db;
3034
- localStorageUtils;
3035
- sessionStorageUtils;
3036
- refreshTokenEndpoint;
3037
- constructor(envStore2, localStorageUtils2, sessionStorageUtils2) {
3038
- this.envStore = envStore2;
3039
- this.localStorageUtils = localStorageUtils2;
3040
- this.sessionStorageUtils = sessionStorageUtils2;
3041
- this.setup();
3042
- }
3043
- static getInstance(envStore2, localStorageUtils2, sessionStorageUtils2) {
3025
+ static localStorageUtils;
3026
+ static sessionStorageUtils;
3027
+ constructor() {
3028
+ }
3029
+ static getInstance(localStorageUtils2, sessionStorageUtils2) {
3044
3030
  if (!_EnvStore.instance) {
3045
3031
  console.log("Creating new EnvStore instance");
3046
- _EnvStore.instance = new _EnvStore(envStore2, localStorageUtils2, sessionStorageUtils2);
3032
+ _EnvStore.instance = new _EnvStore();
3033
+ _EnvStore.localStorageUtils = localStorageUtils2;
3034
+ _EnvStore.sessionStorageUtils = sessionStorageUtils2;
3047
3035
  } else {
3048
3036
  console.log("Returning existing EnvStore instance");
3049
3037
  }
3050
3038
  return _EnvStore.instance;
3051
3039
  }
3052
- setup() {
3053
- const env = this.envStore.getState().env;
3054
- console.log("Redux env state in A1:", env);
3055
- this.baseUrl = env?.baseUrl;
3056
- this.requests = env?.requests;
3057
- this.context = env?.context;
3058
- this.defaultCompany = env?.defaultCompany;
3059
- this.config = env?.config;
3060
- this.companies = env?.companies || [];
3061
- this.user = env?.user;
3062
- this.db = env?.db;
3063
- this.refreshTokenEndpoint = env?.refreshTokenEndpoint;
3064
- console.log("Env setup in A1:", this);
3065
- }
3066
- setupEnv(envConfig) {
3067
- const dispatch = this.envStore.dispatch;
3040
+ static getState() {
3041
+ const state = envStore.getState().env;
3042
+ console.log("Redux env state:", state);
3043
+ return {
3044
+ baseUrl: state?.baseUrl,
3045
+ requests: state?.requests,
3046
+ context: state?.context,
3047
+ defaultCompany: state?.defaultCompany,
3048
+ config: state?.config,
3049
+ companies: state?.companies || [],
3050
+ user: state?.user,
3051
+ db: state?.db,
3052
+ refreshTokenEndpoint: state?.refreshTokenEndpoint,
3053
+ uid: state?.uid,
3054
+ lang: state?.lang,
3055
+ allowCompanies: state?.allowCompanies
3056
+ };
3057
+ }
3058
+ static setupEnv(envConfig) {
3059
+ const dispatch = envStore.dispatch;
3068
3060
  const env = {
3061
+ ..._EnvStore.getState(),
3069
3062
  ...envConfig,
3070
- localStorageUtils: this.localStorageUtils,
3071
- sessionStorageUtils: this.sessionStorageUtils
3063
+ localStorageUtils: _EnvStore.localStorageUtils,
3064
+ sessionStorageUtils: _EnvStore.sessionStorageUtils
3072
3065
  };
3073
3066
  console.log("Setting up env with config:", envConfig);
3074
3067
  const requests = axiosClient.init(env);
3075
3068
  console.log("axiosClient.init result:", requests);
3076
3069
  dispatch(setEnv({ ...env, requests }));
3077
- this.setup();
3078
3070
  }
3079
- setUid(uid) {
3080
- const dispatch = this.envStore.dispatch;
3071
+ static setUid(uid) {
3072
+ const dispatch = envStore.dispatch;
3081
3073
  dispatch(setUid(uid));
3082
- this.setup();
3083
3074
  }
3084
- setLang(lang) {
3085
- const dispatch = this.envStore.dispatch;
3075
+ static setLang(lang) {
3076
+ const dispatch = envStore.dispatch;
3086
3077
  dispatch(setLang(lang));
3087
- this.setup();
3088
3078
  }
3089
- setAllowCompanies(allowCompanies) {
3090
- const dispatch = this.envStore.dispatch;
3079
+ static setAllowCompanies(allowCompanies) {
3080
+ const dispatch = envStore.dispatch;
3091
3081
  dispatch(setAllowCompanies(allowCompanies));
3092
- this.setup();
3093
3082
  }
3094
- setCompanies(companies) {
3095
- const dispatch = this.envStore.dispatch;
3083
+ static setCompanies(companies) {
3084
+ const dispatch = envStore.dispatch;
3096
3085
  dispatch(setCompanies(companies));
3097
- this.setup();
3098
3086
  }
3099
- setDefaultCompany(company) {
3100
- const dispatch = this.envStore.dispatch;
3087
+ static setDefaultCompany(company) {
3088
+ const dispatch = envStore.dispatch;
3101
3089
  dispatch(setDefaultCompany(company));
3102
- this.setup();
3103
3090
  }
3104
- setUserInfo(userInfo) {
3105
- const dispatch = this.envStore.dispatch;
3091
+ static setUserInfo(userInfo) {
3092
+ const dispatch = envStore.dispatch;
3106
3093
  dispatch(setUser(userInfo));
3107
- this.setup();
3108
3094
  }
3109
3095
  };
3110
3096
  function getEnv() {
3111
- const instance = EnvStore.getInstance(envStore);
3112
- if (!instance) {
3113
- throw new Error("EnvStore has not been initialized \u2014 call initEnv() first");
3114
- }
3115
- return instance;
3097
+ return EnvStore.getState();
3116
3098
  }
3117
3099
 
3118
3100
  // src/services/action-service/index.ts
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.localStorageUtils ?? localStorageUtils();
2865
- const sessionStorage2 = config.sessionStorageUtils ?? sessionStorageUtils();
2866
- const db = config.db;
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) => {
@@ -3037,97 +3037,79 @@ var axiosClient = {
3037
3037
  // src/environment/EnvStore.ts
3038
3038
  var EnvStore = class _EnvStore {
3039
3039
  static instance = null;
3040
- envStore;
3041
- baseUrl;
3042
- requests;
3043
- context;
3044
- defaultCompany;
3045
- config;
3046
- companies;
3047
- user;
3048
- db;
3049
- localStorageUtils;
3050
- sessionStorageUtils;
3051
- refreshTokenEndpoint;
3052
- constructor(envStore2, localStorageUtils2, sessionStorageUtils2) {
3053
- this.envStore = envStore2;
3054
- this.localStorageUtils = localStorageUtils2;
3055
- this.sessionStorageUtils = sessionStorageUtils2;
3056
- this.setup();
3057
- }
3058
- static getInstance(envStore2, localStorageUtils2, sessionStorageUtils2) {
3040
+ static localStorageUtils;
3041
+ static sessionStorageUtils;
3042
+ constructor() {
3043
+ }
3044
+ static getInstance(localStorageUtils2, sessionStorageUtils2) {
3059
3045
  if (!_EnvStore.instance) {
3060
3046
  console.log("Creating new EnvStore instance");
3061
- _EnvStore.instance = new _EnvStore(envStore2, localStorageUtils2, sessionStorageUtils2);
3047
+ _EnvStore.instance = new _EnvStore();
3048
+ _EnvStore.localStorageUtils = localStorageUtils2;
3049
+ _EnvStore.sessionStorageUtils = sessionStorageUtils2;
3062
3050
  } else {
3063
3051
  console.log("Returning existing EnvStore instance");
3064
3052
  }
3065
3053
  return _EnvStore.instance;
3066
3054
  }
3067
- setup() {
3068
- const env = this.envStore.getState().env;
3069
- console.log("Redux env state in A1:", env);
3070
- this.baseUrl = env?.baseUrl;
3071
- this.requests = env?.requests;
3072
- this.context = env?.context;
3073
- this.defaultCompany = env?.defaultCompany;
3074
- this.config = env?.config;
3075
- this.companies = env?.companies || [];
3076
- this.user = env?.user;
3077
- this.db = env?.db;
3078
- this.refreshTokenEndpoint = env?.refreshTokenEndpoint;
3079
- console.log("Env setup in A1:", this);
3080
- }
3081
- setupEnv(envConfig) {
3082
- const dispatch = this.envStore.dispatch;
3055
+ static getState() {
3056
+ const state = envStore.getState().env;
3057
+ console.log("Redux env state:", state);
3058
+ return {
3059
+ baseUrl: state?.baseUrl,
3060
+ requests: state?.requests,
3061
+ context: state?.context,
3062
+ defaultCompany: state?.defaultCompany,
3063
+ config: state?.config,
3064
+ companies: state?.companies || [],
3065
+ user: state?.user,
3066
+ db: state?.db,
3067
+ refreshTokenEndpoint: state?.refreshTokenEndpoint,
3068
+ uid: state?.uid,
3069
+ lang: state?.lang,
3070
+ allowCompanies: state?.allowCompanies
3071
+ };
3072
+ }
3073
+ static setupEnv(envConfig) {
3074
+ const dispatch = envStore.dispatch;
3083
3075
  const env = {
3076
+ ..._EnvStore.getState(),
3084
3077
  ...envConfig,
3085
- localStorageUtils: this.localStorageUtils,
3086
- sessionStorageUtils: this.sessionStorageUtils
3078
+ localStorageUtils: _EnvStore.localStorageUtils,
3079
+ sessionStorageUtils: _EnvStore.sessionStorageUtils
3087
3080
  };
3088
3081
  console.log("Setting up env with config:", envConfig);
3089
3082
  const requests = axiosClient.init(env);
3090
3083
  console.log("axiosClient.init result:", requests);
3091
3084
  dispatch(setEnv({ ...env, requests }));
3092
- this.setup();
3093
3085
  }
3094
- setUid(uid) {
3095
- const dispatch = this.envStore.dispatch;
3086
+ static setUid(uid) {
3087
+ const dispatch = envStore.dispatch;
3096
3088
  dispatch(setUid(uid));
3097
- this.setup();
3098
3089
  }
3099
- setLang(lang) {
3100
- const dispatch = this.envStore.dispatch;
3090
+ static setLang(lang) {
3091
+ const dispatch = envStore.dispatch;
3101
3092
  dispatch(setLang(lang));
3102
- this.setup();
3103
3093
  }
3104
- setAllowCompanies(allowCompanies) {
3105
- const dispatch = this.envStore.dispatch;
3094
+ static setAllowCompanies(allowCompanies) {
3095
+ const dispatch = envStore.dispatch;
3106
3096
  dispatch(setAllowCompanies(allowCompanies));
3107
- this.setup();
3108
3097
  }
3109
- setCompanies(companies) {
3110
- const dispatch = this.envStore.dispatch;
3098
+ static setCompanies(companies) {
3099
+ const dispatch = envStore.dispatch;
3111
3100
  dispatch(setCompanies(companies));
3112
- this.setup();
3113
3101
  }
3114
- setDefaultCompany(company) {
3115
- const dispatch = this.envStore.dispatch;
3102
+ static setDefaultCompany(company) {
3103
+ const dispatch = envStore.dispatch;
3116
3104
  dispatch(setDefaultCompany(company));
3117
- this.setup();
3118
3105
  }
3119
- setUserInfo(userInfo) {
3120
- const dispatch = this.envStore.dispatch;
3106
+ static setUserInfo(userInfo) {
3107
+ const dispatch = envStore.dispatch;
3121
3108
  dispatch(setUser(userInfo));
3122
- this.setup();
3123
3109
  }
3124
3110
  };
3125
3111
  function getEnv() {
3126
- const instance = EnvStore.getInstance(envStore);
3127
- if (!instance) {
3128
- throw new Error("EnvStore has not been initialized \u2014 call initEnv() first");
3129
- }
3130
- return instance;
3112
+ return EnvStore.getState();
3131
3113
  }
3132
3114
 
3133
3115
  // src/services/view-service/index.ts
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.localStorageUtils ?? localStorageUtils();
2827
- const sessionStorage2 = config.sessionStorageUtils ?? sessionStorageUtils();
2828
- const db = config.db;
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) => {
@@ -2999,97 +2999,79 @@ var axiosClient = {
2999
2999
  // src/environment/EnvStore.ts
3000
3000
  var EnvStore = class _EnvStore {
3001
3001
  static instance = null;
3002
- envStore;
3003
- baseUrl;
3004
- requests;
3005
- context;
3006
- defaultCompany;
3007
- config;
3008
- companies;
3009
- user;
3010
- db;
3011
- localStorageUtils;
3012
- sessionStorageUtils;
3013
- refreshTokenEndpoint;
3014
- constructor(envStore2, localStorageUtils2, sessionStorageUtils2) {
3015
- this.envStore = envStore2;
3016
- this.localStorageUtils = localStorageUtils2;
3017
- this.sessionStorageUtils = sessionStorageUtils2;
3018
- this.setup();
3019
- }
3020
- static getInstance(envStore2, localStorageUtils2, sessionStorageUtils2) {
3002
+ static localStorageUtils;
3003
+ static sessionStorageUtils;
3004
+ constructor() {
3005
+ }
3006
+ static getInstance(localStorageUtils2, sessionStorageUtils2) {
3021
3007
  if (!_EnvStore.instance) {
3022
3008
  console.log("Creating new EnvStore instance");
3023
- _EnvStore.instance = new _EnvStore(envStore2, localStorageUtils2, sessionStorageUtils2);
3009
+ _EnvStore.instance = new _EnvStore();
3010
+ _EnvStore.localStorageUtils = localStorageUtils2;
3011
+ _EnvStore.sessionStorageUtils = sessionStorageUtils2;
3024
3012
  } else {
3025
3013
  console.log("Returning existing EnvStore instance");
3026
3014
  }
3027
3015
  return _EnvStore.instance;
3028
3016
  }
3029
- setup() {
3030
- const env = this.envStore.getState().env;
3031
- console.log("Redux env state in A1:", env);
3032
- this.baseUrl = env?.baseUrl;
3033
- this.requests = env?.requests;
3034
- this.context = env?.context;
3035
- this.defaultCompany = env?.defaultCompany;
3036
- this.config = env?.config;
3037
- this.companies = env?.companies || [];
3038
- this.user = env?.user;
3039
- this.db = env?.db;
3040
- this.refreshTokenEndpoint = env?.refreshTokenEndpoint;
3041
- console.log("Env setup in A1:", this);
3042
- }
3043
- setupEnv(envConfig) {
3044
- const dispatch = this.envStore.dispatch;
3017
+ static getState() {
3018
+ const state = envStore.getState().env;
3019
+ console.log("Redux env state:", state);
3020
+ return {
3021
+ baseUrl: state?.baseUrl,
3022
+ requests: state?.requests,
3023
+ context: state?.context,
3024
+ defaultCompany: state?.defaultCompany,
3025
+ config: state?.config,
3026
+ companies: state?.companies || [],
3027
+ user: state?.user,
3028
+ db: state?.db,
3029
+ refreshTokenEndpoint: state?.refreshTokenEndpoint,
3030
+ uid: state?.uid,
3031
+ lang: state?.lang,
3032
+ allowCompanies: state?.allowCompanies
3033
+ };
3034
+ }
3035
+ static setupEnv(envConfig) {
3036
+ const dispatch = envStore.dispatch;
3045
3037
  const env = {
3038
+ ..._EnvStore.getState(),
3046
3039
  ...envConfig,
3047
- localStorageUtils: this.localStorageUtils,
3048
- sessionStorageUtils: this.sessionStorageUtils
3040
+ localStorageUtils: _EnvStore.localStorageUtils,
3041
+ sessionStorageUtils: _EnvStore.sessionStorageUtils
3049
3042
  };
3050
3043
  console.log("Setting up env with config:", envConfig);
3051
3044
  const requests = axiosClient.init(env);
3052
3045
  console.log("axiosClient.init result:", requests);
3053
3046
  dispatch(setEnv({ ...env, requests }));
3054
- this.setup();
3055
3047
  }
3056
- setUid(uid) {
3057
- const dispatch = this.envStore.dispatch;
3048
+ static setUid(uid) {
3049
+ const dispatch = envStore.dispatch;
3058
3050
  dispatch(setUid(uid));
3059
- this.setup();
3060
3051
  }
3061
- setLang(lang) {
3062
- const dispatch = this.envStore.dispatch;
3052
+ static setLang(lang) {
3053
+ const dispatch = envStore.dispatch;
3063
3054
  dispatch(setLang(lang));
3064
- this.setup();
3065
3055
  }
3066
- setAllowCompanies(allowCompanies) {
3067
- const dispatch = this.envStore.dispatch;
3056
+ static setAllowCompanies(allowCompanies) {
3057
+ const dispatch = envStore.dispatch;
3068
3058
  dispatch(setAllowCompanies(allowCompanies));
3069
- this.setup();
3070
3059
  }
3071
- setCompanies(companies) {
3072
- const dispatch = this.envStore.dispatch;
3060
+ static setCompanies(companies) {
3061
+ const dispatch = envStore.dispatch;
3073
3062
  dispatch(setCompanies(companies));
3074
- this.setup();
3075
3063
  }
3076
- setDefaultCompany(company) {
3077
- const dispatch = this.envStore.dispatch;
3064
+ static setDefaultCompany(company) {
3065
+ const dispatch = envStore.dispatch;
3078
3066
  dispatch(setDefaultCompany(company));
3079
- this.setup();
3080
3067
  }
3081
- setUserInfo(userInfo) {
3082
- const dispatch = this.envStore.dispatch;
3068
+ static setUserInfo(userInfo) {
3069
+ const dispatch = envStore.dispatch;
3083
3070
  dispatch(setUser(userInfo));
3084
- this.setup();
3085
3071
  }
3086
3072
  };
3087
3073
  function getEnv() {
3088
- const instance = EnvStore.getInstance(envStore);
3089
- if (!instance) {
3090
- throw new Error("EnvStore has not been initialized \u2014 call initEnv() first");
3091
- }
3092
- return instance;
3074
+ return EnvStore.getState();
3093
3075
  }
3094
3076
 
3095
3077
  // src/services/view-service/index.ts
@@ -1,4 +1,4 @@
1
- import { C as ContextApi, L as LoginCredentialBody, R as ResetPasswordRequest, U as UpdatePasswordRequest, b as GetListParams, a as GetDetailParams, S as SaveParams, D as DeleteParams, O as OnChangeParams, V as ViewData, f as GetViewParams, c as GetSelectionType } from './view-type-BGJfDe73.mjs';
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, }: {
@@ -1,4 +1,4 @@
1
- import { C as ContextApi, L as LoginCredentialBody, R as ResetPasswordRequest, U as UpdatePasswordRequest, b as GetListParams, a as GetDetailParams, S as SaveParams, D as DeleteParams, O as OnChangeParams, V as ViewData, f as GetViewParams, c as GetSelectionType } from './view-type-BGJfDe73.js';
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, }: {