@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.
- package/dist/{configs.d.cts → configs.d.mts} +1 -4
- package/dist/configs.d.ts +1 -4
- package/dist/configs.js +146 -124
- package/dist/{configs.cjs → configs.mjs} +111 -161
- package/dist/constants.js +41 -2
- package/dist/{constants.cjs → constants.mjs} +2 -40
- package/dist/environment.d.mts +37 -0
- package/dist/environment.d.ts +35 -54
- package/dist/environment.js +2850 -2906
- package/dist/{environment.cjs → environment.mjs} +2816 -2945
- package/dist/{hooks.d.cts → hooks.d.mts} +7 -2
- package/dist/hooks.d.ts +7 -2
- package/dist/hooks.js +4181 -4520
- package/dist/{hooks.cjs → hooks.mjs} +4081 -4625
- package/dist/{provider.d.cts → provider.d.mts} +1 -1
- package/dist/provider.d.ts +1 -1
- package/dist/provider.js +530 -854
- package/dist/{provider.cjs → provider.mjs} +496 -894
- package/dist/{services.d.cts → services.d.mts} +2 -1
- package/dist/services.d.ts +2 -1
- package/dist/services.js +3866 -4282
- package/dist/{services.cjs → services.mjs} +3826 -4328
- package/dist/{store.d.cts → store.d.mts} +323 -127
- package/dist/store.d.ts +323 -127
- package/dist/store.js +147 -45
- package/dist/{store.cjs → store.mjs} +46 -150
- package/dist/{types.d.cts → types.d.mts} +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/types.js +18 -0
- package/dist/types.mjs +0 -0
- package/dist/{utils.d.cts → utils.d.mts} +2 -2
- package/dist/utils.d.ts +2 -2
- package/dist/utils.js +176 -135
- package/dist/{utils.cjs → utils.mjs} +115 -202
- package/dist/{view-type-BGJfDe73.d.ts → view-type-D8ukwj_2.d.mts} +1 -1
- package/dist/{view-type-BGJfDe73.d.cts → view-type-D8ukwj_2.d.ts} +1 -1
- package/package.json +81 -82
- package/dist/environment.d.cts +0 -56
- package/dist/types.cjs +0 -17
- /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.
|
|
4
|
-
"types": "dist/index.d.ts",
|
|
5
|
-
"main": "dist/index.cjs",
|
|
6
|
-
"module": "dist/index.mjs",
|
|
7
|
-
"
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
"
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
"@
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
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
|
+
}
|
package/dist/environment.d.cts
DELETED
|
@@ -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
|