@fctc/interface-logic 1.7.2 → 1.7.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.
Files changed (40) hide show
  1. package/dist/{configs.d.cts → configs.d.mts} +1 -4
  2. package/dist/configs.d.ts +1 -4
  3. package/dist/configs.js +146 -124
  4. package/dist/{configs.cjs → configs.mjs} +111 -161
  5. package/dist/constants.js +41 -2
  6. package/dist/{constants.cjs → constants.mjs} +2 -40
  7. package/dist/environment.d.mts +37 -0
  8. package/dist/environment.d.ts +35 -54
  9. package/dist/environment.js +2850 -2906
  10. package/dist/{environment.cjs → environment.mjs} +2816 -2945
  11. package/dist/{hooks.d.cts → hooks.d.mts} +7 -2
  12. package/dist/hooks.d.ts +7 -2
  13. package/dist/hooks.js +4181 -4520
  14. package/dist/{hooks.cjs → hooks.mjs} +4081 -4625
  15. package/dist/{provider.d.cts → provider.d.mts} +1 -1
  16. package/dist/provider.d.ts +1 -1
  17. package/dist/provider.js +530 -854
  18. package/dist/{provider.cjs → provider.mjs} +496 -894
  19. package/dist/{services.d.cts → services.d.mts} +2 -1
  20. package/dist/services.d.ts +2 -1
  21. package/dist/services.js +3866 -4282
  22. package/dist/{services.cjs → services.mjs} +3826 -4328
  23. package/dist/{store.d.cts → store.d.mts} +323 -127
  24. package/dist/store.d.ts +323 -127
  25. package/dist/store.js +147 -45
  26. package/dist/{store.cjs → store.mjs} +46 -150
  27. package/dist/{types.d.cts → types.d.mts} +1 -1
  28. package/dist/types.d.ts +1 -1
  29. package/dist/types.js +18 -0
  30. package/dist/types.mjs +0 -0
  31. package/dist/{utils.d.cts → utils.d.mts} +2 -2
  32. package/dist/utils.d.ts +2 -2
  33. package/dist/utils.js +176 -135
  34. package/dist/{utils.cjs → utils.mjs} +115 -202
  35. package/dist/{view-type-BGJfDe73.d.ts → view-type-D8ukwj_2.d.mts} +1 -1
  36. package/dist/{view-type-BGJfDe73.d.cts → view-type-D8ukwj_2.d.ts} +1 -1
  37. package/package.json +81 -82
  38. package/dist/environment.d.cts +0 -56
  39. package/dist/types.cjs +0 -17
  40. /package/dist/{constants.d.cts → constants.d.mts} +0 -0
package/package.json CHANGED
@@ -1,82 +1,81 @@
1
- {
2
- "name": "@fctc/interface-logic",
3
- "version": "1.7.2",
4
- "types": "dist/index.d.ts",
5
- "main": "dist/index.cjs",
6
- "module": "dist/index.mjs",
7
- "type": "module",
8
- "exports": {
9
- ".": {
10
- "types": "./dist/index.d.ts",
11
- "import": "./dist/index.mjs",
12
- "require": "./dist/index.cjs"
13
- },
14
- "./configs": {
15
- "types": "./dist/configs.d.ts",
16
- "import": "./dist/configs.mjs",
17
- "require": "./dist/configs.cjs"
18
- },
19
- "./constants": {
20
- "types": "./dist/constants.d.ts",
21
- "import": "./dist/constants.mjs",
22
- "require": "./dist/constants.cjs"
23
- },
24
- "./environment": {
25
- "types": "./dist/environment.d.ts",
26
- "import": "./dist/environment.mjs",
27
- "require": "./dist/environment.cjs"
28
- },
29
- "./hooks": {
30
- "types": "./dist/hooks.d.ts",
31
- "import": "./dist/hooks.mjs",
32
- "require": "./dist/hooks.cjs"
33
- },
34
- "./provider": {
35
- "types": "./dist/provider.d.ts",
36
- "import": "./dist/provider.mjs",
37
- "require": "./dist/provider.cjs"
38
- },
39
- "./services": {
40
- "types": "./dist/services.d.ts",
41
- "import": "./dist/services.mjs",
42
- "require": "./dist/services.cjs"
43
- },
44
- "./store": {
45
- "types": "./dist/store.d.ts",
46
- "import": "./dist/store.mjs",
47
- "require": "./dist/store.cjs"
48
- },
49
- "./utils": {
50
- "types": "./dist/utils.d.ts",
51
- "import": "./dist/utils.mjs",
52
- "require": "./dist/utils.cjs"
53
- },
54
- "./types": {
55
- "types": "./dist/types.d.ts",
56
- "import": "./dist/types.mjs",
57
- "require": "./dist/types.cjs"
58
- }
59
- },
60
- "files": [
61
- "dist"
62
- ],
63
- "scripts": {
64
- "build": "tsup",
65
- "test": "jest"
66
- },
67
- "dependencies": {
68
- "@reduxjs/toolkit": "^2.8.2",
69
- "@tanstack/react-query": "^5.83.0",
70
- "axios": "^1.11.0",
71
- "moment": "^2.30.1",
72
- "react-redux": "^9.2.0"
73
- },
74
- "devDependencies": {
75
- "@types/react": "^18.3.1",
76
- "react": "18.0.0",
77
- "jest": "^29.7.0",
78
- "tsup": "^8.0.0",
79
- "typescript": "^5.8.2"
80
- },
81
- "packageManager": "yarn@1.22.0"
82
- }
1
+ {
2
+ "name": "@fctc/interface-logic",
3
+ "version": "1.7.4",
4
+ "types": "dist/index.d.ts",
5
+ "main": "dist/index.cjs",
6
+ "module": "dist/index.mjs",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./dist/index.d.ts",
10
+ "import": "./dist/index.mjs",
11
+ "require": "./dist/index.cjs"
12
+ },
13
+ "./configs": {
14
+ "types": "./dist/configs.d.ts",
15
+ "import": "./dist/configs.mjs",
16
+ "require": "./dist/configs.cjs"
17
+ },
18
+ "./constants": {
19
+ "types": "./dist/constants.d.ts",
20
+ "import": "./dist/constants.mjs",
21
+ "require": "./dist/constants.cjs"
22
+ },
23
+ "./environment": {
24
+ "types": "./dist/environment.d.ts",
25
+ "import": "./dist/environment.mjs",
26
+ "require": "./dist/environment.cjs"
27
+ },
28
+ "./hooks": {
29
+ "types": "./dist/hooks.d.ts",
30
+ "import": "./dist/hooks.mjs",
31
+ "require": "./dist/hooks.cjs"
32
+ },
33
+ "./provider": {
34
+ "types": "./dist/provider.d.ts",
35
+ "import": "./dist/provider.mjs",
36
+ "require": "./dist/provider.cjs"
37
+ },
38
+ "./services": {
39
+ "types": "./dist/services.d.ts",
40
+ "import": "./dist/services.mjs",
41
+ "require": "./dist/services.cjs"
42
+ },
43
+ "./store": {
44
+ "types": "./dist/store.d.ts",
45
+ "import": "./dist/store.mjs",
46
+ "require": "./dist/store.cjs"
47
+ },
48
+ "./utils": {
49
+ "types": "./dist/utils.d.ts",
50
+ "import": "./dist/utils.mjs",
51
+ "require": "./dist/utils.cjs"
52
+ },
53
+ "./types": {
54
+ "types": "./dist/types.d.ts",
55
+ "import": "./dist/types.mjs",
56
+ "require": "./dist/types.cjs"
57
+ }
58
+ },
59
+ "files": [
60
+ "dist"
61
+ ],
62
+ "scripts": {
63
+ "build": "tsup",
64
+ "test": "jest"
65
+ },
66
+ "dependencies": {
67
+ "@reduxjs/toolkit": "^2.8.2",
68
+ "@tanstack/react-query": "^5.83.0",
69
+ "axios": "^1.11.0",
70
+ "moment": "^2.30.1",
71
+ "react-redux": "^9.2.0"
72
+ },
73
+ "devDependencies": {
74
+ "@types/react": "^18.3.1",
75
+ "react": "18.0.0",
76
+ "jest": "^29.7.0",
77
+ "tsup": "^8.0.0",
78
+ "typescript": "^5.8.2"
79
+ },
80
+ "packageManager": "yarn@1.22.0"
81
+ }
@@ -1,56 +0,0 @@
1
- import { EnhancedStore } from '@reduxjs/toolkit';
2
-
3
- declare const localStorageUtils: () => {
4
- setToken: (access_token: string) => Promise<void>;
5
- setRefreshToken: (refresh_token: string) => Promise<void>;
6
- getAccessToken: () => Promise<string | null>;
7
- getRefreshToken: () => Promise<string | null>;
8
- clearToken: () => Promise<void>;
9
- };
10
- type LocalStorageUtilsType = ReturnType<typeof localStorageUtils>;
11
-
12
- declare const sessionStorageUtils: () => {
13
- getBrowserSession: () => Promise<string | null>;
14
- };
15
- type SessionStorageUtilsType = ReturnType<typeof sessionStorageUtils>;
16
-
17
- declare global {
18
- interface Global {
19
- envStore?: EnvStore;
20
- }
21
- interface Window {
22
- envStore?: EnvStore;
23
- }
24
- }
25
- declare class EnvStore {
26
- private static instance;
27
- envStore: EnhancedStore | any;
28
- baseUrl?: string;
29
- requests?: any;
30
- context?: any;
31
- defaultCompany?: any;
32
- config?: any;
33
- companies?: any[];
34
- user?: any;
35
- db?: string;
36
- localStorageUtils?: any;
37
- sessionStorageUtils?: any;
38
- refreshTokenEndpoint?: string;
39
- private constructor();
40
- static getInstance(envStore: EnhancedStore, localStorageUtils?: any, sessionStorageUtils?: any): EnvStore;
41
- setup(): void;
42
- setupEnv(envConfig: Partial<EnvStore>): void;
43
- setUid(uid: number): void;
44
- setLang(lang: string): void;
45
- setAllowCompanies(allowCompanies: number[]): void;
46
- setCompanies(companies: any[]): void;
47
- setDefaultCompany(company: any): void;
48
- setUserInfo(userInfo: any): void;
49
- }
50
- declare function initEnv({ localStorageUtils, sessionStorageUtils, }: {
51
- localStorageUtils?: LocalStorageUtilsType;
52
- sessionStorageUtils?: SessionStorageUtilsType;
53
- }): EnvStore;
54
- declare function getEnv(): EnvStore;
55
-
56
- export { EnvStore, getEnv, initEnv };
package/dist/types.cjs DELETED
@@ -1,17 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __copyProps = (to, from, except, desc) => {
6
- if (from && typeof from === "object" || typeof from === "function") {
7
- for (let key of __getOwnPropNames(from))
8
- if (!__hasOwnProp.call(to, key) && key !== except)
9
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
10
- }
11
- return to;
12
- };
13
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
14
-
15
- // src/types.ts
16
- var types_exports = {};
17
- module.exports = __toCommonJS(types_exports);
File without changes