@edsis/angular 22.0.12 → 22.0.14
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/fesm2022/edsis-angular-block-shell.mjs +146 -146
- package/fesm2022/edsis-angular-block-shell.mjs.map +1 -1
- package/fesm2022/edsis-angular-module-auth.mjs +296 -232
- package/fesm2022/edsis-angular-module-auth.mjs.map +1 -1
- package/package.json +5 -5
- package/types/edsis-angular-block-shell.d.ts +23 -23
- package/types/edsis-angular-module-auth.d.ts +69 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
2
|
import { LayoutService } from '@edsis/theme/layout';
|
|
3
|
-
import {
|
|
3
|
+
import { NavigationItem } from '@edsis/navigation';
|
|
4
4
|
|
|
5
5
|
type BlockShellWorkspaceLink = {
|
|
6
6
|
readonly id: string;
|
|
@@ -10,7 +10,7 @@ type BlockShellWorkspaceLink = {
|
|
|
10
10
|
};
|
|
11
11
|
|
|
12
12
|
declare class BlockShellComponent {
|
|
13
|
-
readonly navigation: _angular_core.InputSignal<readonly
|
|
13
|
+
readonly navigation: _angular_core.InputSignal<readonly NavigationItem[]>;
|
|
14
14
|
readonly workspaceLinks: _angular_core.InputSignal<readonly BlockShellWorkspaceLink[]>;
|
|
15
15
|
readonly navbarId: _angular_core.InputSignal<string>;
|
|
16
16
|
readonly sidebarNavId: _angular_core.InputSignal<string>;
|
|
@@ -39,24 +39,24 @@ declare class BlockShellLogoComponent {
|
|
|
39
39
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<BlockShellLogoComponent, "block-shell-logo", never, { "text": { "alias": "text"; "required": false; "isSignal": true; }; "homePath": { "alias": "homePath"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
declare class
|
|
42
|
+
declare class BlockShellNavigationAvatarComponent {
|
|
43
43
|
readonly initials: _angular_core.InputSignal<string>;
|
|
44
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<
|
|
45
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<
|
|
44
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BlockShellNavigationAvatarComponent, never>;
|
|
45
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<BlockShellNavigationAvatarComponent, "block-shell-navigation-avatar", never, { "initials": { "alias": "initials"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
declare class
|
|
48
|
+
declare class BlockShellNavigationFooterComponent {
|
|
49
49
|
readonly name: _angular_core.InputSignal<string>;
|
|
50
50
|
readonly subtitle: _angular_core.InputSignal<string>;
|
|
51
51
|
readonly initials: _angular_core.InputSignal<string | undefined>;
|
|
52
52
|
readonly collapsible: _angular_core.InputSignal<boolean>;
|
|
53
53
|
readonly desktopOnly: _angular_core.InputSignal<boolean>;
|
|
54
54
|
protected readonly resolvedInitials: _angular_core.Signal<string>;
|
|
55
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<
|
|
56
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<
|
|
55
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BlockShellNavigationFooterComponent, never>;
|
|
56
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<BlockShellNavigationFooterComponent, "block-shell-navigation-footer", never, { "name": { "alias": "name"; "required": true; "isSignal": true; }; "subtitle": { "alias": "subtitle"; "required": true; "isSignal": true; }; "initials": { "alias": "initials"; "required": false; "isSignal": true; }; "collapsible": { "alias": "collapsible"; "required": false; "isSignal": true; }; "desktopOnly": { "alias": "desktopOnly"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
declare class
|
|
59
|
+
declare class BlockShellNavigationHeaderComponent {
|
|
60
60
|
readonly name: _angular_core.InputSignal<string>;
|
|
61
61
|
readonly subtitle: _angular_core.InputSignal<string>;
|
|
62
62
|
readonly logoText: _angular_core.InputSignal<string>;
|
|
@@ -67,23 +67,23 @@ declare class BlockShellNavHeaderComponent {
|
|
|
67
67
|
protected readonly hasWorkspaceLinks: _angular_core.Signal<boolean>;
|
|
68
68
|
protected readonly workspaceTriggerAriaLabel: _angular_core.Signal<string>;
|
|
69
69
|
protected isActiveWorkspace(path: `/${string}`): boolean;
|
|
70
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<
|
|
71
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<
|
|
70
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BlockShellNavigationHeaderComponent, never>;
|
|
71
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<BlockShellNavigationHeaderComponent, "block-shell-navigation-header", never, { "name": { "alias": "name"; "required": true; "isSignal": true; }; "subtitle": { "alias": "subtitle"; "required": true; "isSignal": true; }; "logoText": { "alias": "logoText"; "required": false; "isSignal": true; }; "homePath": { "alias": "homePath"; "required": false; "isSignal": true; }; "collapsible": { "alias": "collapsible"; "required": false; "isSignal": true; }; "workspaceLinks": { "alias": "workspaceLinks"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
declare class
|
|
74
|
+
declare class BlockShellNavigationMetaComponent {
|
|
75
75
|
readonly name: _angular_core.InputSignal<string>;
|
|
76
76
|
readonly subtitle: _angular_core.InputSignal<string>;
|
|
77
77
|
readonly containerClass: _angular_core.InputSignal<string>;
|
|
78
78
|
readonly subtitleClass: _angular_core.InputSignal<string>;
|
|
79
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<
|
|
80
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<
|
|
79
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BlockShellNavigationMetaComponent, never>;
|
|
80
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<BlockShellNavigationMetaComponent, "block-shell-navigation-meta", never, { "name": { "alias": "name"; "required": true; "isSignal": true; }; "subtitle": { "alias": "subtitle"; "required": true; "isSignal": true; }; "containerClass": { "alias": "containerClass"; "required": false; "isSignal": true; }; "subtitleClass": { "alias": "subtitleClass"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
declare class
|
|
83
|
+
declare class BlockShellSidebarNavigationComponent {
|
|
84
84
|
private readonly documentRef;
|
|
85
85
|
private readonly destroyRef;
|
|
86
|
-
readonly navigation: _angular_core.InputSignal<readonly
|
|
86
|
+
readonly navigation: _angular_core.InputSignal<readonly NavigationItem[]>;
|
|
87
87
|
readonly workspaceLinks: _angular_core.InputSignal<readonly BlockShellWorkspaceLink[]>;
|
|
88
88
|
readonly sidebarNavId: _angular_core.InputSignal<string>;
|
|
89
89
|
readonly shellName: _angular_core.InputSignal<string>;
|
|
@@ -96,12 +96,12 @@ declare class BlockShellSidebarNavComponent {
|
|
|
96
96
|
protected readonly responsiveCollapsed: _angular_core.WritableSignal<boolean>;
|
|
97
97
|
constructor();
|
|
98
98
|
private readResponsiveCollapsed;
|
|
99
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<
|
|
100
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<
|
|
99
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BlockShellSidebarNavigationComponent, never>;
|
|
100
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<BlockShellSidebarNavigationComponent, "block-shell-sidebar-navigation", never, { "navigation": { "alias": "navigation"; "required": true; "isSignal": true; }; "workspaceLinks": { "alias": "workspaceLinks"; "required": false; "isSignal": true; }; "sidebarNavId": { "alias": "sidebarNavId"; "required": false; "isSignal": true; }; "shellName": { "alias": "shellName"; "required": true; "isSignal": true; }; "brandSubtitle": { "alias": "brandSubtitle"; "required": false; "isSignal": true; }; "logoText": { "alias": "logoText"; "required": false; "isSignal": true; }; "homePath": { "alias": "homePath"; "required": false; "isSignal": true; }; "userName": { "alias": "userName"; "required": true; "isSignal": true; }; "userPosition": { "alias": "userPosition"; "required": true; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
-
declare class
|
|
104
|
-
readonly navigation: _angular_core.InputSignal<readonly
|
|
103
|
+
declare class BlockShellTopNavigationComponent {
|
|
104
|
+
readonly navigation: _angular_core.InputSignal<readonly NavigationItem[]>;
|
|
105
105
|
readonly workspaceLinks: _angular_core.InputSignal<readonly BlockShellWorkspaceLink[]>;
|
|
106
106
|
readonly navbarId: _angular_core.InputSignal<string>;
|
|
107
107
|
readonly shellName: _angular_core.InputSignal<string>;
|
|
@@ -111,9 +111,9 @@ declare class BlockShellTopNavComponent {
|
|
|
111
111
|
readonly userName: _angular_core.InputSignal<string>;
|
|
112
112
|
readonly userPosition: _angular_core.InputSignal<string>;
|
|
113
113
|
readonly ariaLabel: _angular_core.InputSignal<string>;
|
|
114
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<
|
|
115
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<
|
|
114
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BlockShellTopNavigationComponent, never>;
|
|
115
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<BlockShellTopNavigationComponent, "block-shell-top-navigation", never, { "navigation": { "alias": "navigation"; "required": true; "isSignal": true; }; "workspaceLinks": { "alias": "workspaceLinks"; "required": false; "isSignal": true; }; "navbarId": { "alias": "navbarId"; "required": false; "isSignal": true; }; "shellName": { "alias": "shellName"; "required": true; "isSignal": true; }; "brandSubtitle": { "alias": "brandSubtitle"; "required": false; "isSignal": true; }; "logoText": { "alias": "logoText"; "required": false; "isSignal": true; }; "homePath": { "alias": "homePath"; "required": false; "isSignal": true; }; "userName": { "alias": "userName"; "required": true; "isSignal": true; }; "userPosition": { "alias": "userPosition"; "required": true; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
116
116
|
}
|
|
117
117
|
|
|
118
|
-
export { BlockShellComponent, BlockShellLogoComponent,
|
|
118
|
+
export { BlockShellComponent, BlockShellLogoComponent, BlockShellNavigationAvatarComponent, BlockShellNavigationFooterComponent, BlockShellNavigationHeaderComponent, BlockShellNavigationMetaComponent, BlockShellSidebarNavigationComponent, BlockShellTopNavigationComponent, MAIN_SIDEBAR_NAV_ID, workspaceNavbarId };
|
|
119
119
|
export type { BlockShellWorkspaceLink };
|
|
@@ -3,8 +3,69 @@ import { InjectionToken, EnvironmentProviders, OnInit } from '@angular/core';
|
|
|
3
3
|
import { CanActivateFn, Routes } from '@angular/router';
|
|
4
4
|
import { HttpContextToken, HttpInterceptorFn } from '@angular/common/http';
|
|
5
5
|
import * as _angular_forms from '@angular/forms';
|
|
6
|
+
import * as _edsis_angular_module_auth from '@edsis/angular/module/auth';
|
|
6
7
|
import { AuthTokenResponse, AuthSessionService } from '@edsis/sdk/auth';
|
|
7
8
|
|
|
9
|
+
/**
|
|
10
|
+
* Seluruh teks yang tampil di halaman auth (login, logout, verify).
|
|
11
|
+
* Override sebagian/seluruhnya lewat `provideEdsisAuth({ messages: ... })`
|
|
12
|
+
* untuk deployment berbahasa lain atau branding berbeda.
|
|
13
|
+
*/
|
|
14
|
+
interface EdsisAuthMessages {
|
|
15
|
+
readonly brand: {
|
|
16
|
+
/** Teks singkat di kotak logo (mis. inisial produk). */
|
|
17
|
+
readonly mark: string;
|
|
18
|
+
};
|
|
19
|
+
readonly login: {
|
|
20
|
+
readonly title: string;
|
|
21
|
+
readonly intro: string;
|
|
22
|
+
readonly badge: string;
|
|
23
|
+
readonly emailPlaceholder: string;
|
|
24
|
+
readonly submit: string;
|
|
25
|
+
readonly submitting: string;
|
|
26
|
+
readonly emailRequired: string;
|
|
27
|
+
readonly emailInvalid: string;
|
|
28
|
+
readonly magicLinkSent: string;
|
|
29
|
+
readonly magicLinkFailed: string;
|
|
30
|
+
readonly oauthComingSoon: string;
|
|
31
|
+
readonly oauthGoogleAria: string;
|
|
32
|
+
readonly oauthMicrosoftAria: string;
|
|
33
|
+
readonly oauthAppleAria: string;
|
|
34
|
+
};
|
|
35
|
+
readonly logout: {
|
|
36
|
+
readonly title: string;
|
|
37
|
+
readonly intro: string;
|
|
38
|
+
readonly badge: string;
|
|
39
|
+
readonly pending: string;
|
|
40
|
+
readonly pendingAria: string;
|
|
41
|
+
readonly success: string;
|
|
42
|
+
readonly failed: string;
|
|
43
|
+
readonly failedNote: string;
|
|
44
|
+
readonly backToLogin: string;
|
|
45
|
+
readonly openDashboard: string;
|
|
46
|
+
};
|
|
47
|
+
readonly verify: {
|
|
48
|
+
readonly title: string;
|
|
49
|
+
readonly intro: string;
|
|
50
|
+
readonly badge: string;
|
|
51
|
+
readonly pending: string;
|
|
52
|
+
readonly pendingAria: string;
|
|
53
|
+
readonly tokenMissing: string;
|
|
54
|
+
readonly invalidOrExpired: string;
|
|
55
|
+
readonly successRedirect: string;
|
|
56
|
+
readonly missingAccessToken: string;
|
|
57
|
+
readonly requestNewLink: string;
|
|
58
|
+
readonly openDashboard: string;
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
declare const DEFAULT_EDSIS_AUTH_MESSAGES: EdsisAuthMessages;
|
|
62
|
+
/** Override per-bagian; field yang tidak diisi memakai default. */
|
|
63
|
+
type EdsisAuthMessagesOverride = {
|
|
64
|
+
readonly [K in keyof EdsisAuthMessages]?: Partial<EdsisAuthMessages[K]>;
|
|
65
|
+
};
|
|
66
|
+
declare const EDSIS_AUTH_MESSAGES: InjectionToken<EdsisAuthMessages>;
|
|
67
|
+
declare function mergeEdsisAuthMessages(override?: EdsisAuthMessagesOverride): EdsisAuthMessages;
|
|
68
|
+
|
|
8
69
|
interface EdsisAuthConfig {
|
|
9
70
|
apiUrl: string;
|
|
10
71
|
appUrl: string;
|
|
@@ -13,6 +74,8 @@ interface EdsisAuthConfig {
|
|
|
13
74
|
verifyPath?: string;
|
|
14
75
|
authenticatedHomePath?: string;
|
|
15
76
|
guestHomePath?: string;
|
|
77
|
+
/** Override teks UI halaman auth (i18n/branding). */
|
|
78
|
+
messages?: EdsisAuthMessagesOverride;
|
|
16
79
|
}
|
|
17
80
|
interface ResolvedEdsisAuthConfig {
|
|
18
81
|
apiUrl: string;
|
|
@@ -48,6 +111,7 @@ declare class AuthLoginPage {
|
|
|
48
111
|
private readonly formBuilder;
|
|
49
112
|
private readonly authMagicLinkService;
|
|
50
113
|
private readonly authConfig;
|
|
114
|
+
protected readonly messages: _edsis_angular_module_auth.EdsisAuthMessages;
|
|
51
115
|
protected readonly form: _angular_forms.FormGroup<{
|
|
52
116
|
email: _angular_forms.FormControl<string>;
|
|
53
117
|
}>;
|
|
@@ -58,7 +122,7 @@ declare class AuthLoginPage {
|
|
|
58
122
|
protected readonly emailFeedbackId = "email-feedback";
|
|
59
123
|
private readonly emailControlState;
|
|
60
124
|
protected readonly hasInlineError: _angular_core.Signal<boolean>;
|
|
61
|
-
protected readonly inlineErrorMessage: _angular_core.Signal<
|
|
125
|
+
protected readonly inlineErrorMessage: _angular_core.Signal<string | null>;
|
|
62
126
|
protected readonly feedbackMessage: _angular_core.Signal<string | null>;
|
|
63
127
|
protected readonly feedbackTone: _angular_core.Signal<"error" | "success" | null>;
|
|
64
128
|
protected readonly fieldTone: _angular_core.Signal<"error" | "success" | "idle">;
|
|
@@ -74,6 +138,7 @@ declare class AuthLogoutPage implements OnInit {
|
|
|
74
138
|
private readonly router;
|
|
75
139
|
private readonly authSessionService;
|
|
76
140
|
private readonly authConfig;
|
|
141
|
+
protected readonly messages: _edsis_angular_module_auth.EdsisAuthMessages;
|
|
77
142
|
protected readonly guestHomePath: `/${string}`;
|
|
78
143
|
protected readonly authenticatedHomePath: `/${string}`;
|
|
79
144
|
protected readonly state: _angular_core.WritableSignal<"error" | "success" | "pending">;
|
|
@@ -91,6 +156,7 @@ declare class AuthVerifyPage {
|
|
|
91
156
|
private readonly location;
|
|
92
157
|
private readonly authMagicLinkService;
|
|
93
158
|
private readonly authConfig;
|
|
159
|
+
protected readonly messages: _edsis_angular_module_auth.EdsisAuthMessages;
|
|
94
160
|
private readonly queryParamMap;
|
|
95
161
|
private readonly fragment;
|
|
96
162
|
private handledToken;
|
|
@@ -136,5 +202,5 @@ declare function injectSessionState(): Promise<boolean>;
|
|
|
136
202
|
declare function injectSessionRefresh(): Promise<boolean>;
|
|
137
203
|
declare function injectSessionClear(): void;
|
|
138
204
|
|
|
139
|
-
export { AUTH_SESSION_CHANGE_EVENT, AuthLoginPage, AuthLogoutPage, AuthShellPage, AuthVerifyPage, EDSIS_AUTH_CONFIG, EDSIS_SKIP_AUTH, EDSIS_SKIP_SESSION_REFRESH, authRoutes, authenticatedGuard, clearStoredSession, edsisAuthInterceptor, guestOnlyGuard, hasStoredSession, homeRedirectGuard, injectSessionClear, injectSessionRefresh, injectSessionState, persistSession, provideEdsisAuth, readStoredAccessToken, readStoredSession, resolveEdsisAuthConfig, shouldClearSessionAfterRefreshFailure, startAuthSessionMonitor, validateStoredSession, ɵresetAuthSessionModuleState };
|
|
140
|
-
export type { EdsisAuthConfig, ResolvedEdsisAuthConfig, StoredAuthSession };
|
|
205
|
+
export { AUTH_SESSION_CHANGE_EVENT, AuthLoginPage, AuthLogoutPage, AuthShellPage, AuthVerifyPage, DEFAULT_EDSIS_AUTH_MESSAGES, EDSIS_AUTH_CONFIG, EDSIS_AUTH_MESSAGES, EDSIS_SKIP_AUTH, EDSIS_SKIP_SESSION_REFRESH, authRoutes, authenticatedGuard, clearStoredSession, edsisAuthInterceptor, guestOnlyGuard, hasStoredSession, homeRedirectGuard, injectSessionClear, injectSessionRefresh, injectSessionState, mergeEdsisAuthMessages, persistSession, provideEdsisAuth, readStoredAccessToken, readStoredSession, resolveEdsisAuthConfig, shouldClearSessionAfterRefreshFailure, startAuthSessionMonitor, validateStoredSession, ɵresetAuthSessionModuleState };
|
|
206
|
+
export type { EdsisAuthConfig, EdsisAuthMessages, EdsisAuthMessagesOverride, ResolvedEdsisAuthConfig, StoredAuthSession };
|