@fctc/interface-logic 1.6.0 → 1.6.2

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/provider.js CHANGED
@@ -3066,14 +3066,24 @@ var EnvStore = class {
3066
3066
  }
3067
3067
  setupEnv(envConfig) {
3068
3068
  const dispatch = envStore.dispatch;
3069
- const env2 = {
3069
+ let env2 = {
3070
3070
  ...envConfig,
3071
3071
  localStorageUtils: this.localStorageUtils,
3072
3072
  sessionStorageUtils: this.sessionStorageUtils
3073
3073
  };
3074
3074
  const requests = axiosClient.init(env2);
3075
- dispatch(setEnv({ ...env2, requests }));
3076
- this.setup();
3075
+ env2 = { ...env2, requests };
3076
+ this.baseUrl = env2?.baseUrl;
3077
+ this.requests = env2?.requests;
3078
+ this.context = env2?.context;
3079
+ this.defaultCompany = env2?.defaultCompany;
3080
+ this.config = env2?.config;
3081
+ this.companies = env2?.companies || [];
3082
+ this.user = env2?.user;
3083
+ this.db = env2?.db;
3084
+ this.refreshTokenEndpoint = env2?.refreshTokenEndpoint;
3085
+ console.log("env from interface-logic", env2);
3086
+ dispatch(setEnv(env2));
3077
3087
  }
3078
3088
  setUid(uid) {
3079
3089
  const dispatch = envStore.dispatch;
package/dist/provider.mjs CHANGED
@@ -3028,14 +3028,24 @@ var EnvStore = class {
3028
3028
  }
3029
3029
  setupEnv(envConfig) {
3030
3030
  const dispatch = envStore.dispatch;
3031
- const env2 = {
3031
+ let env2 = {
3032
3032
  ...envConfig,
3033
3033
  localStorageUtils: this.localStorageUtils,
3034
3034
  sessionStorageUtils: this.sessionStorageUtils
3035
3035
  };
3036
3036
  const requests = axiosClient.init(env2);
3037
- dispatch(setEnv({ ...env2, requests }));
3038
- this.setup();
3037
+ env2 = { ...env2, requests };
3038
+ this.baseUrl = env2?.baseUrl;
3039
+ this.requests = env2?.requests;
3040
+ this.context = env2?.context;
3041
+ this.defaultCompany = env2?.defaultCompany;
3042
+ this.config = env2?.config;
3043
+ this.companies = env2?.companies || [];
3044
+ this.user = env2?.user;
3045
+ this.db = env2?.db;
3046
+ this.refreshTokenEndpoint = env2?.refreshTokenEndpoint;
3047
+ console.log("env from interface-logic", env2);
3048
+ dispatch(setEnv(env2));
3039
3049
  }
3040
3050
  setUid(uid) {
3041
3051
  const dispatch = envStore.dispatch;