@fctc/interface-logic 1.6.5 → 1.6.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.
@@ -20,7 +20,7 @@ declare class EnvStore {
20
20
  refreshTokenEndpoint?: string;
21
21
  constructor(localStorageUtils?: any, sessionStorageUtils?: any);
22
22
  setup(): void;
23
- setupEnv(envConfig: EnvStore): void;
23
+ setupEnv(envConfig: EnvStore): any;
24
24
  setUid(uid: number): void;
25
25
  setLang(lang: string): void;
26
26
  setAllowCompanies(allowCompanies: number[]): void;
@@ -20,7 +20,7 @@ declare class EnvStore {
20
20
  refreshTokenEndpoint?: string;
21
21
  constructor(localStorageUtils?: any, sessionStorageUtils?: any);
22
22
  setup(): void;
23
- setupEnv(envConfig: EnvStore): void;
23
+ setupEnv(envConfig: EnvStore): any;
24
24
  setUid(uid: number): void;
25
25
  setLang(lang: string): void;
26
26
  setAllowCompanies(allowCompanies: number[]): void;
@@ -230,7 +230,6 @@ var breadcrums_slice_default = breadcrumbsSlice.reducer;
230
230
  var import_toolkit2 = require("@reduxjs/toolkit");
231
231
  var initialState2 = {
232
232
  baseUrl: "",
233
- requests: null,
234
233
  companies: [],
235
234
  user: {},
236
235
  db: "",
@@ -255,18 +254,7 @@ var envSlice = (0, import_toolkit2.createSlice)({
255
254
  initialState: initialState2,
256
255
  reducers: {
257
256
  setEnv: (state, action) => {
258
- console.log("state in slice", state);
259
- console.log("env in slice", action.payload);
260
- state.baseUrl = action.payload.baseUrl;
261
- state.requests = action.payload.requests;
262
- state.companies = action.payload.companies;
263
- state.user = action.payload.user;
264
- state.db = action.payload.db;
265
- state.refreshTokenEndpoint = action.payload.refreshTokenEndpoint;
266
- state.config = action.payload.config;
267
- state.envFile = action.payload.envFile;
268
- state.defaultCompany = action.payload.defaultCompany;
269
- state.context = action.payload.context;
257
+ Object.assign(state, action.payload);
270
258
  },
271
259
  setUid: (state, action) => {
272
260
  state.context.uid = action.payload;
@@ -3029,7 +3017,6 @@ var EnvStore = class {
3029
3017
  setup() {
3030
3018
  const env2 = envStore.getState().env;
3031
3019
  this.baseUrl = env2?.baseUrl;
3032
- this.requests = env2?.requests;
3033
3020
  this.context = env2?.context;
3034
3021
  this.defaultCompany = env2?.defaultCompany;
3035
3022
  this.config = env2?.config;
@@ -3040,25 +3027,16 @@ var EnvStore = class {
3040
3027
  console.log("env from interface-logic", env2);
3041
3028
  }
3042
3029
  setupEnv(envConfig) {
3043
- const dispatch = envStore.dispatch;
3044
3030
  let env2 = {
3045
3031
  ...envConfig,
3046
3032
  localStorageUtils: this.localStorageUtils,
3047
3033
  sessionStorageUtils: this.sessionStorageUtils
3048
3034
  };
3049
3035
  const requests = axiosClient.init(env2);
3050
- env2 = { ...env2, requests };
3051
- this.baseUrl = env2?.baseUrl;
3052
- this.requests = env2?.requests;
3053
- this.context = env2?.context;
3054
- this.defaultCompany = env2?.defaultCompany;
3055
- this.config = env2?.config;
3056
- this.companies = env2?.companies || [];
3057
- this.user = env2?.user;
3058
- this.db = env2?.db;
3059
- this.refreshTokenEndpoint = env2?.refreshTokenEndpoint;
3060
- console.log("env from interface-logic", env2);
3061
- dispatch(setEnv(env2));
3036
+ this.requests = requests;
3037
+ const dispatch = envStore.dispatch;
3038
+ dispatch(setEnv(envConfig));
3039
+ return { ...env2, requests };
3062
3040
  }
3063
3041
  setUid(uid) {
3064
3042
  const dispatch = envStore.dispatch;
@@ -191,7 +191,6 @@ var breadcrums_slice_default = breadcrumbsSlice.reducer;
191
191
  import { createSlice as createSlice2 } from "@reduxjs/toolkit";
192
192
  var initialState2 = {
193
193
  baseUrl: "",
194
- requests: null,
195
194
  companies: [],
196
195
  user: {},
197
196
  db: "",
@@ -216,18 +215,7 @@ var envSlice = createSlice2({
216
215
  initialState: initialState2,
217
216
  reducers: {
218
217
  setEnv: (state, action) => {
219
- console.log("state in slice", state);
220
- console.log("env in slice", action.payload);
221
- state.baseUrl = action.payload.baseUrl;
222
- state.requests = action.payload.requests;
223
- state.companies = action.payload.companies;
224
- state.user = action.payload.user;
225
- state.db = action.payload.db;
226
- state.refreshTokenEndpoint = action.payload.refreshTokenEndpoint;
227
- state.config = action.payload.config;
228
- state.envFile = action.payload.envFile;
229
- state.defaultCompany = action.payload.defaultCompany;
230
- state.context = action.payload.context;
218
+ Object.assign(state, action.payload);
231
219
  },
232
220
  setUid: (state, action) => {
233
221
  state.context.uid = action.payload;
@@ -2990,7 +2978,6 @@ var EnvStore = class {
2990
2978
  setup() {
2991
2979
  const env2 = envStore.getState().env;
2992
2980
  this.baseUrl = env2?.baseUrl;
2993
- this.requests = env2?.requests;
2994
2981
  this.context = env2?.context;
2995
2982
  this.defaultCompany = env2?.defaultCompany;
2996
2983
  this.config = env2?.config;
@@ -3001,25 +2988,16 @@ var EnvStore = class {
3001
2988
  console.log("env from interface-logic", env2);
3002
2989
  }
3003
2990
  setupEnv(envConfig) {
3004
- const dispatch = envStore.dispatch;
3005
2991
  let env2 = {
3006
2992
  ...envConfig,
3007
2993
  localStorageUtils: this.localStorageUtils,
3008
2994
  sessionStorageUtils: this.sessionStorageUtils
3009
2995
  };
3010
2996
  const requests = axiosClient.init(env2);
3011
- env2 = { ...env2, requests };
3012
- this.baseUrl = env2?.baseUrl;
3013
- this.requests = env2?.requests;
3014
- this.context = env2?.context;
3015
- this.defaultCompany = env2?.defaultCompany;
3016
- this.config = env2?.config;
3017
- this.companies = env2?.companies || [];
3018
- this.user = env2?.user;
3019
- this.db = env2?.db;
3020
- this.refreshTokenEndpoint = env2?.refreshTokenEndpoint;
3021
- console.log("env from interface-logic", env2);
3022
- dispatch(setEnv(env2));
2997
+ this.requests = requests;
2998
+ const dispatch = envStore.dispatch;
2999
+ dispatch(setEnv(envConfig));
3000
+ return { ...env2, requests };
3023
3001
  }
3024
3002
  setUid(uid) {
3025
3003
  const dispatch = envStore.dispatch;
package/dist/hooks.js CHANGED
@@ -328,7 +328,6 @@ var breadcrums_slice_default = breadcrumbsSlice.reducer;
328
328
  var import_toolkit2 = require("@reduxjs/toolkit");
329
329
  var initialState2 = {
330
330
  baseUrl: "",
331
- requests: null,
332
331
  companies: [],
333
332
  user: {},
334
333
  db: "",
@@ -353,18 +352,7 @@ var envSlice = (0, import_toolkit2.createSlice)({
353
352
  initialState: initialState2,
354
353
  reducers: {
355
354
  setEnv: (state, action) => {
356
- console.log("state in slice", state);
357
- console.log("env in slice", action.payload);
358
- state.baseUrl = action.payload.baseUrl;
359
- state.requests = action.payload.requests;
360
- state.companies = action.payload.companies;
361
- state.user = action.payload.user;
362
- state.db = action.payload.db;
363
- state.refreshTokenEndpoint = action.payload.refreshTokenEndpoint;
364
- state.config = action.payload.config;
365
- state.envFile = action.payload.envFile;
366
- state.defaultCompany = action.payload.defaultCompany;
367
- state.context = action.payload.context;
355
+ Object.assign(state, action.payload);
368
356
  },
369
357
  setUid: (state, action) => {
370
358
  state.context.uid = action.payload;
@@ -3154,7 +3142,6 @@ var EnvStore = class {
3154
3142
  setup() {
3155
3143
  const env2 = envStore.getState().env;
3156
3144
  this.baseUrl = env2?.baseUrl;
3157
- this.requests = env2?.requests;
3158
3145
  this.context = env2?.context;
3159
3146
  this.defaultCompany = env2?.defaultCompany;
3160
3147
  this.config = env2?.config;
@@ -3165,25 +3152,16 @@ var EnvStore = class {
3165
3152
  console.log("env from interface-logic", env2);
3166
3153
  }
3167
3154
  setupEnv(envConfig) {
3168
- const dispatch = envStore.dispatch;
3169
3155
  let env2 = {
3170
3156
  ...envConfig,
3171
3157
  localStorageUtils: this.localStorageUtils,
3172
3158
  sessionStorageUtils: this.sessionStorageUtils
3173
3159
  };
3174
3160
  const requests = axiosClient.init(env2);
3175
- env2 = { ...env2, requests };
3176
- this.baseUrl = env2?.baseUrl;
3177
- this.requests = env2?.requests;
3178
- this.context = env2?.context;
3179
- this.defaultCompany = env2?.defaultCompany;
3180
- this.config = env2?.config;
3181
- this.companies = env2?.companies || [];
3182
- this.user = env2?.user;
3183
- this.db = env2?.db;
3184
- this.refreshTokenEndpoint = env2?.refreshTokenEndpoint;
3185
- console.log("env from interface-logic", env2);
3186
- dispatch(setEnv(env2));
3161
+ this.requests = requests;
3162
+ const dispatch = envStore.dispatch;
3163
+ dispatch(setEnv(envConfig));
3164
+ return { ...env2, requests };
3187
3165
  }
3188
3166
  setUid(uid) {
3189
3167
  const dispatch = envStore.dispatch;
package/dist/hooks.mjs CHANGED
@@ -224,7 +224,6 @@ var breadcrums_slice_default = breadcrumbsSlice.reducer;
224
224
  import { createSlice as createSlice2 } from "@reduxjs/toolkit";
225
225
  var initialState2 = {
226
226
  baseUrl: "",
227
- requests: null,
228
227
  companies: [],
229
228
  user: {},
230
229
  db: "",
@@ -249,18 +248,7 @@ var envSlice = createSlice2({
249
248
  initialState: initialState2,
250
249
  reducers: {
251
250
  setEnv: (state, action) => {
252
- console.log("state in slice", state);
253
- console.log("env in slice", action.payload);
254
- state.baseUrl = action.payload.baseUrl;
255
- state.requests = action.payload.requests;
256
- state.companies = action.payload.companies;
257
- state.user = action.payload.user;
258
- state.db = action.payload.db;
259
- state.refreshTokenEndpoint = action.payload.refreshTokenEndpoint;
260
- state.config = action.payload.config;
261
- state.envFile = action.payload.envFile;
262
- state.defaultCompany = action.payload.defaultCompany;
263
- state.context = action.payload.context;
251
+ Object.assign(state, action.payload);
264
252
  },
265
253
  setUid: (state, action) => {
266
254
  state.context.uid = action.payload;
@@ -3050,7 +3038,6 @@ var EnvStore = class {
3050
3038
  setup() {
3051
3039
  const env2 = envStore.getState().env;
3052
3040
  this.baseUrl = env2?.baseUrl;
3053
- this.requests = env2?.requests;
3054
3041
  this.context = env2?.context;
3055
3042
  this.defaultCompany = env2?.defaultCompany;
3056
3043
  this.config = env2?.config;
@@ -3061,25 +3048,16 @@ var EnvStore = class {
3061
3048
  console.log("env from interface-logic", env2);
3062
3049
  }
3063
3050
  setupEnv(envConfig) {
3064
- const dispatch = envStore.dispatch;
3065
3051
  let env2 = {
3066
3052
  ...envConfig,
3067
3053
  localStorageUtils: this.localStorageUtils,
3068
3054
  sessionStorageUtils: this.sessionStorageUtils
3069
3055
  };
3070
3056
  const requests = axiosClient.init(env2);
3071
- env2 = { ...env2, requests };
3072
- this.baseUrl = env2?.baseUrl;
3073
- this.requests = env2?.requests;
3074
- this.context = env2?.context;
3075
- this.defaultCompany = env2?.defaultCompany;
3076
- this.config = env2?.config;
3077
- this.companies = env2?.companies || [];
3078
- this.user = env2?.user;
3079
- this.db = env2?.db;
3080
- this.refreshTokenEndpoint = env2?.refreshTokenEndpoint;
3081
- console.log("env from interface-logic", env2);
3082
- dispatch(setEnv(env2));
3057
+ this.requests = requests;
3058
+ const dispatch = envStore.dispatch;
3059
+ dispatch(setEnv(envConfig));
3060
+ return { ...env2, requests };
3083
3061
  }
3084
3062
  setUid(uid) {
3085
3063
  const dispatch = envStore.dispatch;
package/dist/provider.js CHANGED
@@ -81,7 +81,6 @@ var breadcrums_slice_default = breadcrumbsSlice.reducer;
81
81
  var import_toolkit2 = require("@reduxjs/toolkit");
82
82
  var initialState2 = {
83
83
  baseUrl: "",
84
- requests: null,
85
84
  companies: [],
86
85
  user: {},
87
86
  db: "",
@@ -106,18 +105,7 @@ var envSlice = (0, import_toolkit2.createSlice)({
106
105
  initialState: initialState2,
107
106
  reducers: {
108
107
  setEnv: (state, action) => {
109
- console.log("state in slice", state);
110
- console.log("env in slice", action.payload);
111
- state.baseUrl = action.payload.baseUrl;
112
- state.requests = action.payload.requests;
113
- state.companies = action.payload.companies;
114
- state.user = action.payload.user;
115
- state.db = action.payload.db;
116
- state.refreshTokenEndpoint = action.payload.refreshTokenEndpoint;
117
- state.config = action.payload.config;
118
- state.envFile = action.payload.envFile;
119
- state.defaultCompany = action.payload.defaultCompany;
120
- state.context = action.payload.context;
108
+ Object.assign(state, action.payload);
121
109
  },
122
110
  setUid: (state, action) => {
123
111
  state.context.uid = action.payload;
@@ -3065,7 +3053,6 @@ var EnvStore = class {
3065
3053
  setup() {
3066
3054
  const env2 = envStore.getState().env;
3067
3055
  this.baseUrl = env2?.baseUrl;
3068
- this.requests = env2?.requests;
3069
3056
  this.context = env2?.context;
3070
3057
  this.defaultCompany = env2?.defaultCompany;
3071
3058
  this.config = env2?.config;
@@ -3076,25 +3063,16 @@ var EnvStore = class {
3076
3063
  console.log("env from interface-logic", env2);
3077
3064
  }
3078
3065
  setupEnv(envConfig) {
3079
- const dispatch = envStore.dispatch;
3080
3066
  let env2 = {
3081
3067
  ...envConfig,
3082
3068
  localStorageUtils: this.localStorageUtils,
3083
3069
  sessionStorageUtils: this.sessionStorageUtils
3084
3070
  };
3085
3071
  const requests = axiosClient.init(env2);
3086
- env2 = { ...env2, requests };
3087
- this.baseUrl = env2?.baseUrl;
3088
- this.requests = env2?.requests;
3089
- this.context = env2?.context;
3090
- this.defaultCompany = env2?.defaultCompany;
3091
- this.config = env2?.config;
3092
- this.companies = env2?.companies || [];
3093
- this.user = env2?.user;
3094
- this.db = env2?.db;
3095
- this.refreshTokenEndpoint = env2?.refreshTokenEndpoint;
3096
- console.log("env from interface-logic", env2);
3097
- dispatch(setEnv(env2));
3072
+ this.requests = requests;
3073
+ const dispatch = envStore.dispatch;
3074
+ dispatch(setEnv(envConfig));
3075
+ return { ...env2, requests };
3098
3076
  }
3099
3077
  setUid(uid) {
3100
3078
  const dispatch = envStore.dispatch;
package/dist/provider.mjs CHANGED
@@ -43,7 +43,6 @@ var breadcrums_slice_default = breadcrumbsSlice.reducer;
43
43
  import { createSlice as createSlice2 } from "@reduxjs/toolkit";
44
44
  var initialState2 = {
45
45
  baseUrl: "",
46
- requests: null,
47
46
  companies: [],
48
47
  user: {},
49
48
  db: "",
@@ -68,18 +67,7 @@ var envSlice = createSlice2({
68
67
  initialState: initialState2,
69
68
  reducers: {
70
69
  setEnv: (state, action) => {
71
- console.log("state in slice", state);
72
- console.log("env in slice", action.payload);
73
- state.baseUrl = action.payload.baseUrl;
74
- state.requests = action.payload.requests;
75
- state.companies = action.payload.companies;
76
- state.user = action.payload.user;
77
- state.db = action.payload.db;
78
- state.refreshTokenEndpoint = action.payload.refreshTokenEndpoint;
79
- state.config = action.payload.config;
80
- state.envFile = action.payload.envFile;
81
- state.defaultCompany = action.payload.defaultCompany;
82
- state.context = action.payload.context;
70
+ Object.assign(state, action.payload);
83
71
  },
84
72
  setUid: (state, action) => {
85
73
  state.context.uid = action.payload;
@@ -3027,7 +3015,6 @@ var EnvStore = class {
3027
3015
  setup() {
3028
3016
  const env2 = envStore.getState().env;
3029
3017
  this.baseUrl = env2?.baseUrl;
3030
- this.requests = env2?.requests;
3031
3018
  this.context = env2?.context;
3032
3019
  this.defaultCompany = env2?.defaultCompany;
3033
3020
  this.config = env2?.config;
@@ -3038,25 +3025,16 @@ var EnvStore = class {
3038
3025
  console.log("env from interface-logic", env2);
3039
3026
  }
3040
3027
  setupEnv(envConfig) {
3041
- const dispatch = envStore.dispatch;
3042
3028
  let env2 = {
3043
3029
  ...envConfig,
3044
3030
  localStorageUtils: this.localStorageUtils,
3045
3031
  sessionStorageUtils: this.sessionStorageUtils
3046
3032
  };
3047
3033
  const requests = axiosClient.init(env2);
3048
- env2 = { ...env2, requests };
3049
- this.baseUrl = env2?.baseUrl;
3050
- this.requests = env2?.requests;
3051
- this.context = env2?.context;
3052
- this.defaultCompany = env2?.defaultCompany;
3053
- this.config = env2?.config;
3054
- this.companies = env2?.companies || [];
3055
- this.user = env2?.user;
3056
- this.db = env2?.db;
3057
- this.refreshTokenEndpoint = env2?.refreshTokenEndpoint;
3058
- console.log("env from interface-logic", env2);
3059
- dispatch(setEnv(env2));
3034
+ this.requests = requests;
3035
+ const dispatch = envStore.dispatch;
3036
+ dispatch(setEnv(envConfig));
3037
+ return { ...env2, requests };
3060
3038
  }
3061
3039
  setUid(uid) {
3062
3040
  const dispatch = envStore.dispatch;
package/dist/services.js CHANGED
@@ -265,7 +265,6 @@ var breadcrums_slice_default = breadcrumbsSlice.reducer;
265
265
  var import_toolkit2 = require("@reduxjs/toolkit");
266
266
  var initialState2 = {
267
267
  baseUrl: "",
268
- requests: null,
269
268
  companies: [],
270
269
  user: {},
271
270
  db: "",
@@ -290,18 +289,7 @@ var envSlice = (0, import_toolkit2.createSlice)({
290
289
  initialState: initialState2,
291
290
  reducers: {
292
291
  setEnv: (state, action) => {
293
- console.log("state in slice", state);
294
- console.log("env in slice", action.payload);
295
- state.baseUrl = action.payload.baseUrl;
296
- state.requests = action.payload.requests;
297
- state.companies = action.payload.companies;
298
- state.user = action.payload.user;
299
- state.db = action.payload.db;
300
- state.refreshTokenEndpoint = action.payload.refreshTokenEndpoint;
301
- state.config = action.payload.config;
302
- state.envFile = action.payload.envFile;
303
- state.defaultCompany = action.payload.defaultCompany;
304
- state.context = action.payload.context;
292
+ Object.assign(state, action.payload);
305
293
  },
306
294
  setUid: (state, action) => {
307
295
  state.context.uid = action.payload;
@@ -3069,7 +3057,6 @@ var EnvStore = class {
3069
3057
  setup() {
3070
3058
  const env2 = envStore.getState().env;
3071
3059
  this.baseUrl = env2?.baseUrl;
3072
- this.requests = env2?.requests;
3073
3060
  this.context = env2?.context;
3074
3061
  this.defaultCompany = env2?.defaultCompany;
3075
3062
  this.config = env2?.config;
@@ -3080,25 +3067,16 @@ var EnvStore = class {
3080
3067
  console.log("env from interface-logic", env2);
3081
3068
  }
3082
3069
  setupEnv(envConfig) {
3083
- const dispatch = envStore.dispatch;
3084
3070
  let env2 = {
3085
3071
  ...envConfig,
3086
3072
  localStorageUtils: this.localStorageUtils,
3087
3073
  sessionStorageUtils: this.sessionStorageUtils
3088
3074
  };
3089
3075
  const requests = axiosClient.init(env2);
3090
- env2 = { ...env2, requests };
3091
- this.baseUrl = env2?.baseUrl;
3092
- this.requests = env2?.requests;
3093
- this.context = env2?.context;
3094
- this.defaultCompany = env2?.defaultCompany;
3095
- this.config = env2?.config;
3096
- this.companies = env2?.companies || [];
3097
- this.user = env2?.user;
3098
- this.db = env2?.db;
3099
- this.refreshTokenEndpoint = env2?.refreshTokenEndpoint;
3100
- console.log("env from interface-logic", env2);
3101
- dispatch(setEnv(env2));
3076
+ this.requests = requests;
3077
+ const dispatch = envStore.dispatch;
3078
+ dispatch(setEnv(envConfig));
3079
+ return { ...env2, requests };
3102
3080
  }
3103
3081
  setUid(uid) {
3104
3082
  const dispatch = envStore.dispatch;
package/dist/services.mjs CHANGED
@@ -221,7 +221,6 @@ var breadcrums_slice_default = breadcrumbsSlice.reducer;
221
221
  import { createSlice as createSlice2 } from "@reduxjs/toolkit";
222
222
  var initialState2 = {
223
223
  baseUrl: "",
224
- requests: null,
225
224
  companies: [],
226
225
  user: {},
227
226
  db: "",
@@ -246,18 +245,7 @@ var envSlice = createSlice2({
246
245
  initialState: initialState2,
247
246
  reducers: {
248
247
  setEnv: (state, action) => {
249
- console.log("state in slice", state);
250
- console.log("env in slice", action.payload);
251
- state.baseUrl = action.payload.baseUrl;
252
- state.requests = action.payload.requests;
253
- state.companies = action.payload.companies;
254
- state.user = action.payload.user;
255
- state.db = action.payload.db;
256
- state.refreshTokenEndpoint = action.payload.refreshTokenEndpoint;
257
- state.config = action.payload.config;
258
- state.envFile = action.payload.envFile;
259
- state.defaultCompany = action.payload.defaultCompany;
260
- state.context = action.payload.context;
248
+ Object.assign(state, action.payload);
261
249
  },
262
250
  setUid: (state, action) => {
263
251
  state.context.uid = action.payload;
@@ -3025,7 +3013,6 @@ var EnvStore = class {
3025
3013
  setup() {
3026
3014
  const env2 = envStore.getState().env;
3027
3015
  this.baseUrl = env2?.baseUrl;
3028
- this.requests = env2?.requests;
3029
3016
  this.context = env2?.context;
3030
3017
  this.defaultCompany = env2?.defaultCompany;
3031
3018
  this.config = env2?.config;
@@ -3036,25 +3023,16 @@ var EnvStore = class {
3036
3023
  console.log("env from interface-logic", env2);
3037
3024
  }
3038
3025
  setupEnv(envConfig) {
3039
- const dispatch = envStore.dispatch;
3040
3026
  let env2 = {
3041
3027
  ...envConfig,
3042
3028
  localStorageUtils: this.localStorageUtils,
3043
3029
  sessionStorageUtils: this.sessionStorageUtils
3044
3030
  };
3045
3031
  const requests = axiosClient.init(env2);
3046
- env2 = { ...env2, requests };
3047
- this.baseUrl = env2?.baseUrl;
3048
- this.requests = env2?.requests;
3049
- this.context = env2?.context;
3050
- this.defaultCompany = env2?.defaultCompany;
3051
- this.config = env2?.config;
3052
- this.companies = env2?.companies || [];
3053
- this.user = env2?.user;
3054
- this.db = env2?.db;
3055
- this.refreshTokenEndpoint = env2?.refreshTokenEndpoint;
3056
- console.log("env from interface-logic", env2);
3057
- dispatch(setEnv(env2));
3032
+ this.requests = requests;
3033
+ const dispatch = envStore.dispatch;
3034
+ dispatch(setEnv(envConfig));
3035
+ return { ...env2, requests };
3058
3036
  }
3059
3037
  setUid(uid) {
3060
3038
  const dispatch = envStore.dispatch;
package/dist/store.d.mts CHANGED
@@ -255,7 +255,6 @@ declare const selectNavbar: (state: RootState) => NavbarStateType;
255
255
  declare const envStore: _reduxjs_toolkit.EnhancedStore<{
256
256
  env: {
257
257
  baseUrl: string;
258
- requests: null;
259
258
  companies: never[];
260
259
  user: {};
261
260
  db: string;
@@ -292,7 +291,6 @@ declare const envStore: _reduxjs_toolkit.EnhancedStore<{
292
291
  dispatch: redux_thunk.ThunkDispatch<{
293
292
  env: {
294
293
  baseUrl: string;
295
- requests: null;
296
294
  companies: never[];
297
295
  user: {};
298
296
  db: string;
@@ -330,7 +328,6 @@ declare const envStore: _reduxjs_toolkit.EnhancedStore<{
330
328
 
331
329
  declare const envSlice: _reduxjs_toolkit.Slice<{
332
330
  baseUrl: string;
333
- requests: null;
334
331
  companies: never[];
335
332
  user: {};
336
333
  db: string;
@@ -352,7 +349,6 @@ declare const envSlice: _reduxjs_toolkit.Slice<{
352
349
  }, {
353
350
  setEnv: (state: immer.WritableDraft<{
354
351
  baseUrl: string;
355
- requests: null;
356
352
  companies: never[];
357
353
  user: {};
358
354
  db: string;
@@ -377,7 +373,6 @@ declare const envSlice: _reduxjs_toolkit.Slice<{
377
373
  }) => void;
378
374
  setUid: (state: immer.WritableDraft<{
379
375
  baseUrl: string;
380
- requests: null;
381
376
  companies: never[];
382
377
  user: {};
383
378
  db: string;
@@ -402,7 +397,6 @@ declare const envSlice: _reduxjs_toolkit.Slice<{
402
397
  }) => void;
403
398
  setAllowCompanies: (state: immer.WritableDraft<{
404
399
  baseUrl: string;
405
- requests: null;
406
400
  companies: never[];
407
401
  user: {};
408
402
  db: string;
@@ -427,7 +421,6 @@ declare const envSlice: _reduxjs_toolkit.Slice<{
427
421
  }) => void;
428
422
  setCompanies: (state: immer.WritableDraft<{
429
423
  baseUrl: string;
430
- requests: null;
431
424
  companies: never[];
432
425
  user: {};
433
426
  db: string;
@@ -452,7 +445,6 @@ declare const envSlice: _reduxjs_toolkit.Slice<{
452
445
  }) => void;
453
446
  setDefaultCompany: (state: immer.WritableDraft<{
454
447
  baseUrl: string;
455
- requests: null;
456
448
  companies: never[];
457
449
  user: {};
458
450
  db: string;
@@ -477,7 +469,6 @@ declare const envSlice: _reduxjs_toolkit.Slice<{
477
469
  }) => void;
478
470
  setLang: (state: immer.WritableDraft<{
479
471
  baseUrl: string;
480
- requests: null;
481
472
  companies: never[];
482
473
  user: {};
483
474
  db: string;
@@ -502,7 +493,6 @@ declare const envSlice: _reduxjs_toolkit.Slice<{
502
493
  }) => void;
503
494
  setUser: (state: immer.WritableDraft<{
504
495
  baseUrl: string;
505
- requests: null;
506
496
  companies: never[];
507
497
  user: {};
508
498
  db: string;
@@ -527,7 +517,6 @@ declare const envSlice: _reduxjs_toolkit.Slice<{
527
517
  }) => void;
528
518
  setConfig: (state: immer.WritableDraft<{
529
519
  baseUrl: string;
530
- requests: null;
531
520
  companies: never[];
532
521
  user: {};
533
522
  db: string;
@@ -552,7 +541,6 @@ declare const envSlice: _reduxjs_toolkit.Slice<{
552
541
  }) => void;
553
542
  setEnvFile: (state: immer.WritableDraft<{
554
543
  baseUrl: string;
555
- requests: null;
556
544
  companies: never[];
557
545
  user: {};
558
546
  db: string;
@@ -577,7 +565,6 @@ declare const envSlice: _reduxjs_toolkit.Slice<{
577
565
  }) => void;
578
566
  }, "env", "env", _reduxjs_toolkit.SliceSelectors<{
579
567
  baseUrl: string;
580
- requests: null;
581
568
  companies: never[];
582
569
  user: {};
583
570
  db: string;
@@ -608,7 +595,6 @@ declare const setConfig: _reduxjs_toolkit.ActionCreatorWithPayload<any, "env/set
608
595
  declare const setEnvFile: _reduxjs_toolkit.ActionCreatorWithPayload<any, "env/setEnvFile">;
609
596
  declare const selectEnv: (state: RootState) => {
610
597
  baseUrl: string;
611
- requests: null;
612
598
  companies: never[];
613
599
  user: {};
614
600
  db: string;
package/dist/store.d.ts CHANGED
@@ -255,7 +255,6 @@ declare const selectNavbar: (state: RootState) => NavbarStateType;
255
255
  declare const envStore: _reduxjs_toolkit.EnhancedStore<{
256
256
  env: {
257
257
  baseUrl: string;
258
- requests: null;
259
258
  companies: never[];
260
259
  user: {};
261
260
  db: string;
@@ -292,7 +291,6 @@ declare const envStore: _reduxjs_toolkit.EnhancedStore<{
292
291
  dispatch: redux_thunk.ThunkDispatch<{
293
292
  env: {
294
293
  baseUrl: string;
295
- requests: null;
296
294
  companies: never[];
297
295
  user: {};
298
296
  db: string;
@@ -330,7 +328,6 @@ declare const envStore: _reduxjs_toolkit.EnhancedStore<{
330
328
 
331
329
  declare const envSlice: _reduxjs_toolkit.Slice<{
332
330
  baseUrl: string;
333
- requests: null;
334
331
  companies: never[];
335
332
  user: {};
336
333
  db: string;
@@ -352,7 +349,6 @@ declare const envSlice: _reduxjs_toolkit.Slice<{
352
349
  }, {
353
350
  setEnv: (state: immer.WritableDraft<{
354
351
  baseUrl: string;
355
- requests: null;
356
352
  companies: never[];
357
353
  user: {};
358
354
  db: string;
@@ -377,7 +373,6 @@ declare const envSlice: _reduxjs_toolkit.Slice<{
377
373
  }) => void;
378
374
  setUid: (state: immer.WritableDraft<{
379
375
  baseUrl: string;
380
- requests: null;
381
376
  companies: never[];
382
377
  user: {};
383
378
  db: string;
@@ -402,7 +397,6 @@ declare const envSlice: _reduxjs_toolkit.Slice<{
402
397
  }) => void;
403
398
  setAllowCompanies: (state: immer.WritableDraft<{
404
399
  baseUrl: string;
405
- requests: null;
406
400
  companies: never[];
407
401
  user: {};
408
402
  db: string;
@@ -427,7 +421,6 @@ declare const envSlice: _reduxjs_toolkit.Slice<{
427
421
  }) => void;
428
422
  setCompanies: (state: immer.WritableDraft<{
429
423
  baseUrl: string;
430
- requests: null;
431
424
  companies: never[];
432
425
  user: {};
433
426
  db: string;
@@ -452,7 +445,6 @@ declare const envSlice: _reduxjs_toolkit.Slice<{
452
445
  }) => void;
453
446
  setDefaultCompany: (state: immer.WritableDraft<{
454
447
  baseUrl: string;
455
- requests: null;
456
448
  companies: never[];
457
449
  user: {};
458
450
  db: string;
@@ -477,7 +469,6 @@ declare const envSlice: _reduxjs_toolkit.Slice<{
477
469
  }) => void;
478
470
  setLang: (state: immer.WritableDraft<{
479
471
  baseUrl: string;
480
- requests: null;
481
472
  companies: never[];
482
473
  user: {};
483
474
  db: string;
@@ -502,7 +493,6 @@ declare const envSlice: _reduxjs_toolkit.Slice<{
502
493
  }) => void;
503
494
  setUser: (state: immer.WritableDraft<{
504
495
  baseUrl: string;
505
- requests: null;
506
496
  companies: never[];
507
497
  user: {};
508
498
  db: string;
@@ -527,7 +517,6 @@ declare const envSlice: _reduxjs_toolkit.Slice<{
527
517
  }) => void;
528
518
  setConfig: (state: immer.WritableDraft<{
529
519
  baseUrl: string;
530
- requests: null;
531
520
  companies: never[];
532
521
  user: {};
533
522
  db: string;
@@ -552,7 +541,6 @@ declare const envSlice: _reduxjs_toolkit.Slice<{
552
541
  }) => void;
553
542
  setEnvFile: (state: immer.WritableDraft<{
554
543
  baseUrl: string;
555
- requests: null;
556
544
  companies: never[];
557
545
  user: {};
558
546
  db: string;
@@ -577,7 +565,6 @@ declare const envSlice: _reduxjs_toolkit.Slice<{
577
565
  }) => void;
578
566
  }, "env", "env", _reduxjs_toolkit.SliceSelectors<{
579
567
  baseUrl: string;
580
- requests: null;
581
568
  companies: never[];
582
569
  user: {};
583
570
  db: string;
@@ -608,7 +595,6 @@ declare const setConfig: _reduxjs_toolkit.ActionCreatorWithPayload<any, "env/set
608
595
  declare const setEnvFile: _reduxjs_toolkit.ActionCreatorWithPayload<any, "env/setEnvFile">;
609
596
  declare const selectEnv: (state: RootState) => {
610
597
  baseUrl: string;
611
- requests: null;
612
598
  companies: never[];
613
599
  user: {};
614
600
  db: string;
package/dist/store.js CHANGED
@@ -127,7 +127,6 @@ var breadcrums_slice_default = breadcrumbsSlice.reducer;
127
127
  var import_toolkit2 = require("@reduxjs/toolkit");
128
128
  var initialState2 = {
129
129
  baseUrl: "",
130
- requests: null,
131
130
  companies: [],
132
131
  user: {},
133
132
  db: "",
@@ -152,18 +151,7 @@ var envSlice = (0, import_toolkit2.createSlice)({
152
151
  initialState: initialState2,
153
152
  reducers: {
154
153
  setEnv: (state, action) => {
155
- console.log("state in slice", state);
156
- console.log("env in slice", action.payload);
157
- state.baseUrl = action.payload.baseUrl;
158
- state.requests = action.payload.requests;
159
- state.companies = action.payload.companies;
160
- state.user = action.payload.user;
161
- state.db = action.payload.db;
162
- state.refreshTokenEndpoint = action.payload.refreshTokenEndpoint;
163
- state.config = action.payload.config;
164
- state.envFile = action.payload.envFile;
165
- state.defaultCompany = action.payload.defaultCompany;
166
- state.context = action.payload.context;
154
+ Object.assign(state, action.payload);
167
155
  },
168
156
  setUid: (state, action) => {
169
157
  state.context.uid = action.payload;
package/dist/store.mjs CHANGED
@@ -23,7 +23,6 @@ var breadcrums_slice_default = breadcrumbsSlice.reducer;
23
23
  import { createSlice as createSlice2 } from "@reduxjs/toolkit";
24
24
  var initialState2 = {
25
25
  baseUrl: "",
26
- requests: null,
27
26
  companies: [],
28
27
  user: {},
29
28
  db: "",
@@ -48,18 +47,7 @@ var envSlice = createSlice2({
48
47
  initialState: initialState2,
49
48
  reducers: {
50
49
  setEnv: (state, action) => {
51
- console.log("state in slice", state);
52
- console.log("env in slice", action.payload);
53
- state.baseUrl = action.payload.baseUrl;
54
- state.requests = action.payload.requests;
55
- state.companies = action.payload.companies;
56
- state.user = action.payload.user;
57
- state.db = action.payload.db;
58
- state.refreshTokenEndpoint = action.payload.refreshTokenEndpoint;
59
- state.config = action.payload.config;
60
- state.envFile = action.payload.envFile;
61
- state.defaultCompany = action.payload.defaultCompany;
62
- state.context = action.payload.context;
50
+ Object.assign(state, action.payload);
63
51
  },
64
52
  setUid: (state, action) => {
65
53
  state.context.uid = action.payload;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fctc/interface-logic",
3
- "version": "1.6.5",
3
+ "version": "1.6.7",
4
4
  "types": "dist/index.d.ts",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.mjs",