@edsis/angular 22.0.11 → 22.0.13
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 +26 -4
- package/fesm2022/edsis-angular-block-shell.mjs.map +1 -1
- package/fesm2022/edsis-angular-module-auth.mjs +136 -72
- package/fesm2022/edsis-angular-module-auth.mjs.map +1 -1
- package/package.json +5 -5
- package/types/edsis-angular-block-shell.d.ts +5 -0
- package/types/edsis-angular-module-auth.d.ts +69 -3
|
@@ -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 };
|