nectiasw 0.0.4 → 0.0.6
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/components/Checkbox/index.d.ts +24 -0
- package/dist/components/Checkbox/styled.d.ts +6 -0
- package/dist/components/Checkbox/styles.d.ts +7 -0
- package/dist/index.d.ts +5 -3
- package/dist/index.es.js +1742 -470
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +94 -10
- package/dist/index.umd.js.map +1 -1
- package/dist/main.d.ts +5 -3
- package/dist/typings/index.d.ts +140 -0
- package/package.json +5 -1
- package/dist/components/Button/index.d.ts +0 -6
package/dist/main.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
|
|
2
|
-
export { Item, Text, Error, Success, Subtitle, Description, } from './components/Text';
|
|
3
|
-
export {
|
|
4
|
-
export type { ButtonProps } from './components/Button';
|
|
2
|
+
export { Item, Text, Error, Title, Success, Subtitle, Description, } from './components/Text';
|
|
3
|
+
export { Checkbox } from './components/Checkbox';
|
|
5
4
|
export type { CommonTextProps } from './components/Text';
|
|
5
|
+
export type { CheckboxProps, CheckboxIconProps } from './components/Checkbox';
|
|
6
|
+
export type { Session, Systems, SystemRole, UserSystem, SessionState, SignalConnection, CommonSignalConnection, } from './typings';
|
|
7
|
+
export { LocalStorageKeys, UrlSSOParams } from './typings';
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description: Response interface for all API responses.
|
|
3
|
+
*/
|
|
4
|
+
export interface Response<T> {
|
|
5
|
+
status?: number;
|
|
6
|
+
message: string;
|
|
7
|
+
result: T;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* @description
|
|
11
|
+
* Session interface for SSO confirmation.
|
|
12
|
+
*/
|
|
13
|
+
export type Session = Partial<{
|
|
14
|
+
exp: number;
|
|
15
|
+
iat: number;
|
|
16
|
+
jti: string;
|
|
17
|
+
iss: string;
|
|
18
|
+
aud: string;
|
|
19
|
+
sub: string;
|
|
20
|
+
typ: string;
|
|
21
|
+
azp: string;
|
|
22
|
+
acr: string;
|
|
23
|
+
sid: string;
|
|
24
|
+
name: string;
|
|
25
|
+
email: string;
|
|
26
|
+
scope: string;
|
|
27
|
+
given_name: string;
|
|
28
|
+
family_name: string;
|
|
29
|
+
session_state: string;
|
|
30
|
+
email_verified: boolean;
|
|
31
|
+
preferred_username: string;
|
|
32
|
+
realm_access: {
|
|
33
|
+
account: {
|
|
34
|
+
roles: string[];
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
}>;
|
|
38
|
+
/**
|
|
39
|
+
* @description
|
|
40
|
+
* Local storage keys for CCC.
|
|
41
|
+
* - TOKEN: Token for API calls.
|
|
42
|
+
* - REFRESH_TOKEN: Refresh token for API calls.
|
|
43
|
+
*/
|
|
44
|
+
export declare enum LocalStorageKeys {
|
|
45
|
+
TOKEN = "@CCC/token",
|
|
46
|
+
REFRESH_TOKEN = "@CCC/refresh_token"
|
|
47
|
+
}
|
|
48
|
+
export declare enum UrlSSOParams {
|
|
49
|
+
token = "token",
|
|
50
|
+
access = "access"
|
|
51
|
+
}
|
|
52
|
+
export type Role = {
|
|
53
|
+
id: number;
|
|
54
|
+
name: string;
|
|
55
|
+
description: string;
|
|
56
|
+
};
|
|
57
|
+
export type Profile = {
|
|
58
|
+
id: number;
|
|
59
|
+
key: string;
|
|
60
|
+
name: string;
|
|
61
|
+
category: string;
|
|
62
|
+
description: string;
|
|
63
|
+
system: number;
|
|
64
|
+
};
|
|
65
|
+
export type SystemRole = {
|
|
66
|
+
id: number;
|
|
67
|
+
name: string;
|
|
68
|
+
description: string;
|
|
69
|
+
profiles: Profile[];
|
|
70
|
+
};
|
|
71
|
+
export type Systems = {
|
|
72
|
+
id: number;
|
|
73
|
+
name: string;
|
|
74
|
+
description: string;
|
|
75
|
+
url: string;
|
|
76
|
+
acronym: string;
|
|
77
|
+
isExternal: boolean;
|
|
78
|
+
urlSlug: string;
|
|
79
|
+
functions: Profile[];
|
|
80
|
+
}[];
|
|
81
|
+
export type UserSystem = Partial<{
|
|
82
|
+
roles: Role[];
|
|
83
|
+
id: string;
|
|
84
|
+
rut: string;
|
|
85
|
+
email: string;
|
|
86
|
+
holdings: [];
|
|
87
|
+
lastName: string;
|
|
88
|
+
firstName: string;
|
|
89
|
+
enterprises: [];
|
|
90
|
+
enterprise: string | null;
|
|
91
|
+
role: SystemRole;
|
|
92
|
+
systems: Systems;
|
|
93
|
+
}>;
|
|
94
|
+
export interface Info {
|
|
95
|
+
exp: number;
|
|
96
|
+
iat: number;
|
|
97
|
+
jti: string;
|
|
98
|
+
iss: string;
|
|
99
|
+
aud: string;
|
|
100
|
+
sub: string;
|
|
101
|
+
typ: string;
|
|
102
|
+
azp: string;
|
|
103
|
+
session_state: string;
|
|
104
|
+
acr: string;
|
|
105
|
+
"allowed-origins": string[];
|
|
106
|
+
realm_access: RealmAccess;
|
|
107
|
+
resource_access: ResourceAccess;
|
|
108
|
+
scope: string;
|
|
109
|
+
sid: string;
|
|
110
|
+
email_verified: boolean;
|
|
111
|
+
name: string;
|
|
112
|
+
preferred_username: string;
|
|
113
|
+
given_name: string;
|
|
114
|
+
family_name: string;
|
|
115
|
+
email: string;
|
|
116
|
+
}
|
|
117
|
+
export interface RealmAccess {
|
|
118
|
+
roles: string[];
|
|
119
|
+
}
|
|
120
|
+
export interface ResourceAccess {
|
|
121
|
+
account: Account;
|
|
122
|
+
}
|
|
123
|
+
export interface Account {
|
|
124
|
+
roles: string[];
|
|
125
|
+
}
|
|
126
|
+
export type SessionState = {
|
|
127
|
+
token?: string;
|
|
128
|
+
expiresAt?: string;
|
|
129
|
+
refreshToken?: string;
|
|
130
|
+
};
|
|
131
|
+
export interface CommonSignalConnection {
|
|
132
|
+
info?: Info;
|
|
133
|
+
user?: UserSystem;
|
|
134
|
+
session?: SessionState;
|
|
135
|
+
environment: Record<string, string>;
|
|
136
|
+
loading: boolean;
|
|
137
|
+
}
|
|
138
|
+
export interface SignalConnection extends CommonSignalConnection {
|
|
139
|
+
onSignal?: (data: CommonSignalConnection) => void;
|
|
140
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nectiasw",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.6",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"main": "dist/index.umd.js",
|
|
@@ -29,10 +29,14 @@
|
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@types/node": "^22.0.0",
|
|
31
31
|
"autoprefixer": "^10.4.19",
|
|
32
|
+
"axios": "^1.7.2",
|
|
32
33
|
"clsx": "^2.1.1",
|
|
34
|
+
"nectiasw": "^0.0.4",
|
|
33
35
|
"postcss": "^8.4.40",
|
|
36
|
+
"primereact": "^10.8.0",
|
|
34
37
|
"react": "^18.3.1",
|
|
35
38
|
"react-dom": "^18.3.1",
|
|
39
|
+
"react-icons": "^5.2.1",
|
|
36
40
|
"styled-components": "^6.1.12",
|
|
37
41
|
"tailwindcss": "^3.4.7",
|
|
38
42
|
"tailwindcss-classnames": "^3.1.0",
|