@edsis/angular 0.0.2 → 21.0.1
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/README.md +77 -178
- package/fesm2022/edsis-angular-auth.mjs +992 -0
- package/fesm2022/edsis-angular-auth.mjs.map +1 -0
- package/fesm2022/edsis-angular-sdk-access.mjs +1365 -0
- package/fesm2022/edsis-angular-sdk-access.mjs.map +1 -0
- package/fesm2022/edsis-angular-sdk-approval.mjs +1259 -0
- package/fesm2022/edsis-angular-sdk-approval.mjs.map +1 -0
- package/fesm2022/edsis-angular-sdk-auth.mjs +254 -0
- package/fesm2022/edsis-angular-sdk-auth.mjs.map +1 -0
- package/fesm2022/edsis-angular-sdk-employee.mjs +284 -0
- package/fesm2022/edsis-angular-sdk-employee.mjs.map +1 -0
- package/fesm2022/edsis-angular-sdk-health.mjs +96 -0
- package/fesm2022/edsis-angular-sdk-health.mjs.map +1 -0
- package/fesm2022/edsis-angular-sdk-shared.mjs +2740 -0
- package/fesm2022/edsis-angular-sdk-shared.mjs.map +1 -0
- package/fesm2022/edsis-angular-sdk-storage.mjs +288 -0
- package/fesm2022/edsis-angular-sdk-storage.mjs.map +1 -0
- package/fesm2022/edsis-angular-sdk-user.mjs +489 -0
- package/fesm2022/edsis-angular-sdk-user.mjs.map +1 -0
- package/fesm2022/edsis-angular-sdk.mjs +75 -0
- package/fesm2022/edsis-angular-sdk.mjs.map +1 -0
- package/fesm2022/edsis-angular.mjs +0 -5707
- package/fesm2022/edsis-angular.mjs.map +1 -1
- package/package.json +51 -46
- package/types/edsis-angular-auth.d.ts +117 -0
- package/types/edsis-angular-sdk-access.d.ts +547 -0
- package/types/edsis-angular-sdk-approval.d.ts +638 -0
- package/types/edsis-angular-sdk-auth.d.ts +128 -0
- package/types/edsis-angular-sdk-employee.d.ts +159 -0
- package/types/edsis-angular-sdk-health.d.ts +35 -0
- package/types/edsis-angular-sdk-shared.d.ts +176 -0
- package/types/edsis-angular-sdk-storage.d.ts +102 -0
- package/types/edsis-angular-sdk-user.d.ts +189 -0
- package/types/edsis-angular-sdk.d.ts +26 -0
- package/types/edsis-angular.d.ts +1 -824
- package/src/lib/styles/USAGE.md +0 -238
- package/src/lib/styles/container.css +0 -38
- package/src/lib/styles/fonts/commit-mono/CommitMonoVariable.woff2 +0 -0
- package/src/lib/styles/fonts/commit-mono/commit-mono.css +0 -2
- package/src/lib/styles/fonts/inter/InterVariable-Italic.woff2 +0 -0
- package/src/lib/styles/fonts/inter/InterVariable.woff2 +0 -0
- package/src/lib/styles/fonts/inter/inter.css +0 -2
- package/src/lib/styles/icons/README.md +0 -313
- package/src/lib/styles/icons/lucide.svg +0 -9768
- package/src/lib/styles/icons/material-symbols.css +0 -48
- package/src/lib/styles/main.css +0 -24
- package/src/lib/styles/tailwind/component/card.css +0 -7
- package/src/lib/styles/tailwind/tailwind.css +0 -144
- package/src/lib/styles/theme.css +0 -406
package/package.json
CHANGED
|
@@ -1,63 +1,68 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@edsis/angular",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "Comprehensive UI Style System for Angular applications with themes, fonts, icons, and Tailwind CSS v4",
|
|
5
|
-
"keywords": [
|
|
6
|
-
"angular",
|
|
7
|
-
"ui",
|
|
8
|
-
"components",
|
|
9
|
-
"theme",
|
|
10
|
-
"tailwind",
|
|
11
|
-
"lucide",
|
|
12
|
-
"material-icons",
|
|
13
|
-
"design-system",
|
|
14
|
-
"style-system"
|
|
15
|
-
],
|
|
16
|
-
"author": "etos",
|
|
17
|
-
"license": "MIT",
|
|
18
|
-
"repository": {
|
|
19
|
-
"type": "git",
|
|
20
|
-
"url": "git+https://github.com/edsis/angular.git",
|
|
21
|
-
"directory": "projects/library/angular"
|
|
22
|
-
},
|
|
23
|
-
"homepage": "https://github.com/edsis/angular#readme",
|
|
24
|
-
"bugs": {
|
|
25
|
-
"url": "https://github.com/edsis/angular/issues"
|
|
26
|
-
},
|
|
27
|
-
"publishConfig": {
|
|
28
|
-
"registry": "https://registry.npmjs.org",
|
|
29
|
-
"access": "public"
|
|
30
|
-
},
|
|
3
|
+
"version": "21.0.1",
|
|
31
4
|
"peerDependencies": {
|
|
32
|
-
"@angular/
|
|
33
|
-
"@angular/
|
|
34
|
-
"@angular/common": "^21.0.0",
|
|
35
|
-
"@angular/core": "^21.0.0",
|
|
36
|
-
"@angular/forms": "^21.0.0",
|
|
37
|
-
"@angular/material": "^21.0.0",
|
|
38
|
-
"@angular/router": "^21.0.0",
|
|
39
|
-
"rxjs": "^7.8.0",
|
|
40
|
-
"@lucide/angular": "^1.0.0",
|
|
41
|
-
"tailwindcss": "^4.0.0"
|
|
5
|
+
"@angular/common": "^21.2.0",
|
|
6
|
+
"@angular/core": "^21.2.0"
|
|
42
7
|
},
|
|
43
8
|
"dependencies": {
|
|
44
|
-
"tslib": "^2.
|
|
9
|
+
"tslib": "^2.8.1"
|
|
10
|
+
},
|
|
11
|
+
"publishConfig": {
|
|
12
|
+
"access": "public",
|
|
13
|
+
"registry": "https://registry.npmjs.org/"
|
|
45
14
|
},
|
|
15
|
+
"sideEffects": false,
|
|
16
|
+
"module": "fesm2022/edsis-angular.mjs",
|
|
17
|
+
"typings": "types/edsis-angular.d.ts",
|
|
46
18
|
"exports": {
|
|
47
|
-
"./styles/main.css": "./src/lib/styles/main.css",
|
|
48
|
-
"./styles/*": "./src/lib/styles/*",
|
|
49
19
|
"./package.json": {
|
|
50
20
|
"default": "./package.json"
|
|
51
21
|
},
|
|
52
22
|
".": {
|
|
53
23
|
"types": "./types/edsis-angular.d.ts",
|
|
54
24
|
"default": "./fesm2022/edsis-angular.mjs"
|
|
25
|
+
},
|
|
26
|
+
"./auth": {
|
|
27
|
+
"types": "./types/edsis-angular-auth.d.ts",
|
|
28
|
+
"default": "./fesm2022/edsis-angular-auth.mjs"
|
|
29
|
+
},
|
|
30
|
+
"./sdk": {
|
|
31
|
+
"types": "./types/edsis-angular-sdk.d.ts",
|
|
32
|
+
"default": "./fesm2022/edsis-angular-sdk.mjs"
|
|
33
|
+
},
|
|
34
|
+
"./sdk/access": {
|
|
35
|
+
"types": "./types/edsis-angular-sdk-access.d.ts",
|
|
36
|
+
"default": "./fesm2022/edsis-angular-sdk-access.mjs"
|
|
37
|
+
},
|
|
38
|
+
"./sdk/approval": {
|
|
39
|
+
"types": "./types/edsis-angular-sdk-approval.d.ts",
|
|
40
|
+
"default": "./fesm2022/edsis-angular-sdk-approval.mjs"
|
|
41
|
+
},
|
|
42
|
+
"./sdk/auth": {
|
|
43
|
+
"types": "./types/edsis-angular-sdk-auth.d.ts",
|
|
44
|
+
"default": "./fesm2022/edsis-angular-sdk-auth.mjs"
|
|
45
|
+
},
|
|
46
|
+
"./sdk/employee": {
|
|
47
|
+
"types": "./types/edsis-angular-sdk-employee.d.ts",
|
|
48
|
+
"default": "./fesm2022/edsis-angular-sdk-employee.mjs"
|
|
49
|
+
},
|
|
50
|
+
"./sdk/health": {
|
|
51
|
+
"types": "./types/edsis-angular-sdk-health.d.ts",
|
|
52
|
+
"default": "./fesm2022/edsis-angular-sdk-health.mjs"
|
|
53
|
+
},
|
|
54
|
+
"./sdk/shared": {
|
|
55
|
+
"types": "./types/edsis-angular-sdk-shared.d.ts",
|
|
56
|
+
"default": "./fesm2022/edsis-angular-sdk-shared.mjs"
|
|
57
|
+
},
|
|
58
|
+
"./sdk/storage": {
|
|
59
|
+
"types": "./types/edsis-angular-sdk-storage.d.ts",
|
|
60
|
+
"default": "./fesm2022/edsis-angular-sdk-storage.mjs"
|
|
61
|
+
},
|
|
62
|
+
"./sdk/user": {
|
|
63
|
+
"types": "./types/edsis-angular-sdk-user.d.ts",
|
|
64
|
+
"default": "./fesm2022/edsis-angular-sdk-user.mjs"
|
|
55
65
|
}
|
|
56
66
|
},
|
|
57
|
-
"sideEffects": [
|
|
58
|
-
"*.css"
|
|
59
|
-
],
|
|
60
|
-
"module": "fesm2022/edsis-angular.mjs",
|
|
61
|
-
"typings": "types/edsis-angular.d.ts",
|
|
62
67
|
"type": "module"
|
|
63
68
|
}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { InjectionToken, EnvironmentProviders, OnInit } from '@angular/core';
|
|
3
|
+
import { CanActivateFn, Routes } from '@angular/router';
|
|
4
|
+
import { HttpContextToken, HttpInterceptorFn } from '@angular/common/http';
|
|
5
|
+
import * as _angular_forms from '@angular/forms';
|
|
6
|
+
import { AuthTokenResponse, AuthService } from '@edsis/angular/sdk/auth';
|
|
7
|
+
|
|
8
|
+
interface EdsisAuthConfig {
|
|
9
|
+
apiUrl: string;
|
|
10
|
+
appUrl: string;
|
|
11
|
+
loginPath?: string;
|
|
12
|
+
logoutPath?: string;
|
|
13
|
+
verifyPath?: string;
|
|
14
|
+
authenticatedHomePath?: string;
|
|
15
|
+
guestHomePath?: string;
|
|
16
|
+
}
|
|
17
|
+
interface ResolvedEdsisAuthConfig {
|
|
18
|
+
apiUrl: string;
|
|
19
|
+
appUrl: string;
|
|
20
|
+
loginPath: `/${string}`;
|
|
21
|
+
logoutPath: `/${string}`;
|
|
22
|
+
verifyPath: `/${string}`;
|
|
23
|
+
authenticatedHomePath: `/${string}`;
|
|
24
|
+
guestHomePath: `/${string}`;
|
|
25
|
+
}
|
|
26
|
+
declare const EDSIS_AUTH_CONFIG: InjectionToken<ResolvedEdsisAuthConfig>;
|
|
27
|
+
declare function resolveEdsisAuthConfig(config: EdsisAuthConfig): ResolvedEdsisAuthConfig;
|
|
28
|
+
|
|
29
|
+
declare function provideEdsisAuth(config: EdsisAuthConfig): EnvironmentProviders;
|
|
30
|
+
|
|
31
|
+
declare const authenticatedGuard: CanActivateFn;
|
|
32
|
+
declare const homeRedirectGuard: CanActivateFn;
|
|
33
|
+
declare const guestOnlyGuard: CanActivateFn;
|
|
34
|
+
|
|
35
|
+
declare const EDSIS_SKIP_AUTH: HttpContextToken<boolean>;
|
|
36
|
+
declare const edsisAuthInterceptor: HttpInterceptorFn;
|
|
37
|
+
|
|
38
|
+
declare const authRoutes: Routes;
|
|
39
|
+
|
|
40
|
+
declare class AuthShellPage {
|
|
41
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AuthShellPage, never>;
|
|
42
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AuthShellPage, "edsis-auth-shell-page", never, {}, {}, never, never, true, never>;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
declare class AuthLoginPage {
|
|
46
|
+
private readonly destroyRef;
|
|
47
|
+
private readonly formBuilder;
|
|
48
|
+
private readonly authService;
|
|
49
|
+
private readonly authConfig;
|
|
50
|
+
protected readonly form: _angular_forms.FormGroup<{
|
|
51
|
+
email: _angular_forms.FormControl<string>;
|
|
52
|
+
}>;
|
|
53
|
+
protected readonly isSubmitting: i0.WritableSignal<boolean>;
|
|
54
|
+
protected readonly responseMessage: i0.WritableSignal<string | null>;
|
|
55
|
+
protected readonly errorMessage: i0.WritableSignal<string | null>;
|
|
56
|
+
protected readonly verifyUrl: string;
|
|
57
|
+
protected readonly emailControl: _angular_forms.FormControl<string>;
|
|
58
|
+
protected submit(): void;
|
|
59
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AuthLoginPage, never>;
|
|
60
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AuthLoginPage, "edsis-auth-login-page", never, {}, {}, never, never, true, never>;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
declare class AuthLogoutPage implements OnInit {
|
|
64
|
+
private readonly destroyRef;
|
|
65
|
+
private readonly documentRef;
|
|
66
|
+
private readonly authService;
|
|
67
|
+
private readonly authConfig;
|
|
68
|
+
protected readonly guestHomePath: `/${string}`;
|
|
69
|
+
protected readonly authenticatedHomePath: `/${string}`;
|
|
70
|
+
protected readonly state: i0.WritableSignal<"error" | "pending" | "success">;
|
|
71
|
+
protected readonly message: i0.WritableSignal<string>;
|
|
72
|
+
ngOnInit(): void;
|
|
73
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AuthLogoutPage, never>;
|
|
74
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AuthLogoutPage, "edsis-auth-logout-page", never, {}, {}, never, never, true, never>;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
declare class AuthVerifyPage implements OnInit {
|
|
78
|
+
private readonly destroyRef;
|
|
79
|
+
private readonly documentRef;
|
|
80
|
+
private readonly route;
|
|
81
|
+
private readonly router;
|
|
82
|
+
private readonly location;
|
|
83
|
+
private readonly authService;
|
|
84
|
+
private readonly authConfig;
|
|
85
|
+
protected readonly guestHomePath: `/${string}`;
|
|
86
|
+
protected readonly authenticatedHomePath: `/${string}`;
|
|
87
|
+
protected readonly state: i0.WritableSignal<"error" | "pending" | "success">;
|
|
88
|
+
protected readonly message: i0.WritableSignal<string>;
|
|
89
|
+
ngOnInit(): void;
|
|
90
|
+
private clearTokenFromAddressBar;
|
|
91
|
+
private verify;
|
|
92
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AuthVerifyPage, never>;
|
|
93
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AuthVerifyPage, "edsis-auth-verify-page", never, {}, {}, never, never, true, never>;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
type AuthSessionData = NonNullable<AuthTokenResponse['data']>;
|
|
97
|
+
interface StoredAuthSession {
|
|
98
|
+
accessToken: string;
|
|
99
|
+
userId?: string;
|
|
100
|
+
role?: string;
|
|
101
|
+
}
|
|
102
|
+
declare function hasStoredSession(documentRef: Document): boolean;
|
|
103
|
+
declare function readStoredAccessToken(documentRef: Document): string;
|
|
104
|
+
declare function readStoredSession(documentRef: Document): StoredAuthSession | null;
|
|
105
|
+
declare function persistSession(documentRef: Document, sessionData: AuthSessionData | undefined): StoredAuthSession | null;
|
|
106
|
+
declare function clearStoredSession(documentRef: Document, options?: {
|
|
107
|
+
preserveFailedSessionFingerprint?: boolean;
|
|
108
|
+
}): void;
|
|
109
|
+
declare function validateStoredSession(documentRef: Document, authService: Pick<AuthService, 'refreshAuthToken'>, options?: {
|
|
110
|
+
forceRefresh?: boolean;
|
|
111
|
+
}): Promise<boolean>;
|
|
112
|
+
declare function injectSessionState(): Promise<boolean>;
|
|
113
|
+
declare function injectSessionRefresh(): Promise<boolean>;
|
|
114
|
+
declare function injectSessionClear(): void;
|
|
115
|
+
|
|
116
|
+
export { AuthLoginPage, AuthLogoutPage, AuthShellPage, AuthVerifyPage, EDSIS_AUTH_CONFIG, EDSIS_SKIP_AUTH, authRoutes, authenticatedGuard, clearStoredSession, edsisAuthInterceptor, guestOnlyGuard, hasStoredSession, homeRedirectGuard, injectSessionClear, injectSessionRefresh, injectSessionState, persistSession, provideEdsisAuth, readStoredAccessToken, readStoredSession, resolveEdsisAuthConfig, validateStoredSession };
|
|
117
|
+
export type { EdsisAuthConfig, ResolvedEdsisAuthConfig, StoredAuthSession };
|