@edsis/angular 22.0.68 → 22.0.69
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/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@edsis/angular",
|
|
3
|
-
"version": "22.0.
|
|
3
|
+
"version": "22.0.69",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": ">=22.0.0",
|
|
6
6
|
"@angular/core": ">=22.0.0",
|
|
7
7
|
"@angular/forms": ">=22.0.0",
|
|
8
8
|
"@angular/router": ">=22.0.0",
|
|
9
|
-
"@edsis/navigation": "^22.0.
|
|
10
|
-
"@edsis/sdk": "^22.0.
|
|
11
|
-
"@edsis/theme": "^22.0.
|
|
12
|
-
"@edsis/component": "^22.0.
|
|
9
|
+
"@edsis/navigation": "^22.0.69",
|
|
10
|
+
"@edsis/sdk": "^22.0.69",
|
|
11
|
+
"@edsis/theme": "^22.0.69",
|
|
12
|
+
"@edsis/component": "^22.0.69",
|
|
13
13
|
"rxjs": ">=7.8.0"
|
|
14
14
|
},
|
|
15
15
|
"peerDependenciesMeta": {
|
|
@@ -74,7 +74,7 @@ declare class BlockShellTopNavigationComponent {
|
|
|
74
74
|
protected readonly desktopFlyoutTriggerRadiusClass: _angular_core.Signal<"" | "rounded-base">;
|
|
75
75
|
protected readonly desktopFlyoutTriggerSizeClass: _angular_core.Signal<"" | "size-11">;
|
|
76
76
|
protected readonly desktopFlyoutIconSize: _angular_core.Signal<20 | 18>;
|
|
77
|
-
protected readonly desktopAvatarRadiusClass: _angular_core.Signal<"rounded-
|
|
77
|
+
protected readonly desktopAvatarRadiusClass: _angular_core.Signal<"rounded-none" | "rounded-base">;
|
|
78
78
|
protected readonly desktopAvatarButtonLabel: _angular_core.Signal<string>;
|
|
79
79
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BlockShellTopNavigationComponent, never>;
|
|
80
80
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<BlockShellTopNavigationComponent, "block-shell-top-navigation", never, { "navigation": { "alias": "navigation"; "required": true; "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; }; "userPhotoUrl": { "alias": "userPhotoUrl"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "flyoutLabel": { "alias": "flyoutLabel"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { HttpInterceptorFn, HttpContextToken } from '@angular/common/http';
|
|
2
2
|
import * as _angular_core from '@angular/core';
|
|
3
3
|
import { InjectionToken, EnvironmentProviders, OnInit } from '@angular/core';
|
|
4
|
+
import { PersistentAuthLoginRequest, PersistentAuthUser } from '@edsis/sdk/auth';
|
|
4
5
|
import { CanActivateFn, Routes } from '@angular/router';
|
|
5
6
|
import * as _edsis_angular_module_auth from '@edsis/angular/module/auth';
|
|
6
7
|
import * as _angular_forms from '@angular/forms';
|
|
7
|
-
import { AuthTokenResponse, AuthSessionService } from '@edsis/sdk/auth';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Seluruh teks yang tampil di halaman auth (login, logout, verify).
|
|
@@ -176,12 +176,63 @@ declare function resolveEdsisAuthConfig(config: EdsisAuthConfig): ResolvedEdsisA
|
|
|
176
176
|
|
|
177
177
|
declare function provideEdsisAuth(config: EdsisAuthConfig): EnvironmentProviders;
|
|
178
178
|
|
|
179
|
+
interface AuthCredentials extends PersistentAuthLoginRequest {
|
|
180
|
+
/** Send exactly one of `email` or `username`. */
|
|
181
|
+
email?: string;
|
|
182
|
+
/** Send exactly one of `email` or `username`. */
|
|
183
|
+
username?: string;
|
|
184
|
+
}
|
|
185
|
+
interface AuthUser extends PersistentAuthUser {
|
|
186
|
+
readonly role?: string;
|
|
187
|
+
}
|
|
188
|
+
interface EdsisDesktopBridge {
|
|
189
|
+
setNotificationBadge(unreadCount: number): Promise<void>;
|
|
190
|
+
}
|
|
191
|
+
declare global {
|
|
192
|
+
interface Window {
|
|
193
|
+
EDSIS_DESKTOP?: EdsisDesktopBridge;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
/** Native desktop features are optional; browser consumers have no bridge. */
|
|
197
|
+
declare function setAuthNotificationBadge(unreadCount: number): Promise<void>;
|
|
198
|
+
/**
|
|
199
|
+
* Cookie-backed authentication state. The access token intentionally exists
|
|
200
|
+
* only in this service instance; the long-lived refresh token is an HttpOnly
|
|
201
|
+
* cookie owned by the server.
|
|
202
|
+
*/
|
|
203
|
+
declare class AuthService {
|
|
204
|
+
private readonly http;
|
|
205
|
+
private readonly config;
|
|
206
|
+
private readonly router;
|
|
207
|
+
private readonly accessTokenState;
|
|
208
|
+
private readonly userState;
|
|
209
|
+
private refreshInFlight;
|
|
210
|
+
private initialized;
|
|
211
|
+
readonly accessToken: _angular_core.Signal<string>;
|
|
212
|
+
readonly user: _angular_core.Signal<AuthUser | null>;
|
|
213
|
+
readonly isAuthenticated: _angular_core.Signal<boolean>;
|
|
214
|
+
get apiUrl(): string;
|
|
215
|
+
login(credentials: AuthCredentials): Promise<AuthUser | null>;
|
|
216
|
+
/** Restores an existing cookie session. A missing/expired cookie is normal. */
|
|
217
|
+
initialize(): Promise<void>;
|
|
218
|
+
/** One shared refresh operation for initializer and concurrent 401 retries. */
|
|
219
|
+
refresh(): Promise<boolean>;
|
|
220
|
+
loadCurrentUser(): Promise<AuthUser | null>;
|
|
221
|
+
logout(): Promise<void>;
|
|
222
|
+
clearSession(): void;
|
|
223
|
+
/** Allows existing OAuth exchanges to establish the same memory-only state. */
|
|
224
|
+
acceptTokenResponse(response: unknown): void;
|
|
225
|
+
redirectToLogin(): void;
|
|
226
|
+
private applyTokenResponse;
|
|
227
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AuthService, never>;
|
|
228
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<AuthService>;
|
|
229
|
+
}
|
|
230
|
+
|
|
179
231
|
declare const authenticatedGuard: CanActivateFn;
|
|
180
232
|
declare const homeRedirectGuard: CanActivateFn;
|
|
181
233
|
declare const guestOnlyGuard: CanActivateFn;
|
|
182
234
|
|
|
183
235
|
declare const EDSIS_SKIP_AUTH: HttpContextToken<boolean>;
|
|
184
|
-
declare const EDSIS_SKIP_SESSION_REFRESH: HttpContextToken<boolean>;
|
|
185
236
|
declare const edsisAuthInterceptor: HttpInterceptorFn;
|
|
186
237
|
|
|
187
238
|
declare const GOOGLE_OAUTH_STATE_STORAGE_KEY = "auth-google-state";
|
|
@@ -216,6 +267,7 @@ declare class AuthGoogleCallbackPage {
|
|
|
216
267
|
private readonly router;
|
|
217
268
|
private readonly location;
|
|
218
269
|
private readonly authSessionService;
|
|
270
|
+
private readonly authService;
|
|
219
271
|
private readonly authConfig;
|
|
220
272
|
protected readonly messages: _edsis_angular_module_auth.EdsisAuthMessages;
|
|
221
273
|
protected readonly loginPath: `/${string}`;
|
|
@@ -291,9 +343,8 @@ declare class AuthLoginPage {
|
|
|
291
343
|
|
|
292
344
|
declare class AuthLogoutPage implements OnInit {
|
|
293
345
|
private readonly destroyRef;
|
|
294
|
-
private readonly documentRef;
|
|
295
346
|
private readonly router;
|
|
296
|
-
private readonly
|
|
347
|
+
private readonly authService;
|
|
297
348
|
private readonly authConfig;
|
|
298
349
|
protected readonly messages: _edsis_angular_module_auth.EdsisAuthMessages;
|
|
299
350
|
protected readonly guestHomePath: `/${string}`;
|
|
@@ -313,6 +364,7 @@ declare class AuthVerifyPage {
|
|
|
313
364
|
private readonly location;
|
|
314
365
|
private readonly authMagicLinkService;
|
|
315
366
|
private readonly authConfig;
|
|
367
|
+
private readonly authService;
|
|
316
368
|
protected readonly messages: _edsis_angular_module_auth.EdsisAuthMessages;
|
|
317
369
|
private readonly queryParamMap;
|
|
318
370
|
private readonly fragment;
|
|
@@ -330,34 +382,5 @@ declare class AuthVerifyPage {
|
|
|
330
382
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AuthVerifyPage, "edsis-auth-verify-page", never, { "token": { "alias": "token"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
331
383
|
}
|
|
332
384
|
|
|
333
|
-
|
|
334
|
-
type
|
|
335
|
-
interface AuthSessionMonitorOptions {
|
|
336
|
-
onSessionInvalid?: () => void;
|
|
337
|
-
validateSession?: () => Promise<boolean>;
|
|
338
|
-
}
|
|
339
|
-
interface StoredAuthSession {
|
|
340
|
-
accessToken: string;
|
|
341
|
-
userId?: string;
|
|
342
|
-
role?: string;
|
|
343
|
-
name?: string;
|
|
344
|
-
}
|
|
345
|
-
declare function ɵresetAuthSessionModuleState(): void;
|
|
346
|
-
declare function shouldClearSessionAfterRefreshFailure(error: unknown): boolean;
|
|
347
|
-
declare function hasStoredSession(documentRef: Document): boolean;
|
|
348
|
-
declare function readStoredAccessToken(documentRef: Document): string;
|
|
349
|
-
declare function readStoredSession(documentRef: Document): StoredAuthSession | null;
|
|
350
|
-
declare function persistSession(documentRef: Document, sessionData: AuthSessionData | undefined): StoredAuthSession | null;
|
|
351
|
-
declare function clearStoredSession(documentRef: Document, options?: {
|
|
352
|
-
preserveFailedSessionFingerprint?: boolean;
|
|
353
|
-
}): void;
|
|
354
|
-
declare function startAuthSessionMonitor(documentRef: Document, authSessionService: Pick<AuthSessionService, 'refreshAuthToken'>, options?: AuthSessionMonitorOptions): void;
|
|
355
|
-
declare function validateStoredSession(documentRef: Document, authSessionService: Pick<AuthSessionService, 'refreshAuthToken'>, options?: {
|
|
356
|
-
forceRefresh?: boolean;
|
|
357
|
-
}): Promise<boolean>;
|
|
358
|
-
declare function injectSessionState(): Promise<boolean>;
|
|
359
|
-
declare function injectSessionRefresh(): Promise<boolean>;
|
|
360
|
-
declare function injectSessionClear(): void;
|
|
361
|
-
|
|
362
|
-
export { AUTH_SESSION_CHANGE_EVENT, AuthGoogleCallbackPage, AuthLoginPage, AuthLogoutPage, AuthShellPage, AuthVerifyPage, DEFAULT_EDSIS_AUTH_MESSAGES, EDSIS_AUTH_CONFIG, EDSIS_AUTH_MESSAGES, EDSIS_SKIP_AUTH, EDSIS_SKIP_SESSION_REFRESH, GOOGLE_OAUTH_AUTHORIZE_URL, GOOGLE_OAUTH_CALLBACK_ROUTE_PATH, GOOGLE_OAUTH_STATE_STORAGE_KEY, authRoutes, authenticatedGuard, buildGoogleAuthorizeUrl, clearStoredSession, consumeGoogleOauthState, createGoogleOauthState, edsisAuthInterceptor, guestOnlyGuard, hasStoredSession, homeRedirectGuard, injectSessionClear, injectSessionRefresh, injectSessionState, mergeEdsisAuthMessages, persistSession, provideEdsisAuth, readStoredAccessToken, readStoredSession, resolveEdsisAuthConfig, shouldClearSessionAfterRefreshFailure, startAuthSessionMonitor, storeGoogleOauthState, validateStoredSession, ɵresetAuthSessionModuleState };
|
|
363
|
-
export type { EdsisAuthConfig, EdsisAuthGoogleOauthConfig, EdsisAuthHealthCheckConfig, EdsisAuthMessages, EdsisAuthMessagesOverride, EdsisAuthOauthConfig, GoogleAuthorizeUrlOptions, ResolvedEdsisAuthConfig, ResolvedEdsisAuthGoogleOauth, ResolvedEdsisAuthHealthCheck, ResolvedEdsisAuthOauth, StoredAuthSession };
|
|
385
|
+
export { AuthGoogleCallbackPage, AuthLoginPage, AuthLogoutPage, AuthService, AuthShellPage, AuthVerifyPage, DEFAULT_EDSIS_AUTH_MESSAGES, EDSIS_AUTH_CONFIG, EDSIS_AUTH_MESSAGES, EDSIS_SKIP_AUTH, GOOGLE_OAUTH_AUTHORIZE_URL, GOOGLE_OAUTH_CALLBACK_ROUTE_PATH, GOOGLE_OAUTH_STATE_STORAGE_KEY, authRoutes, authenticatedGuard, buildGoogleAuthorizeUrl, consumeGoogleOauthState, createGoogleOauthState, edsisAuthInterceptor, guestOnlyGuard, homeRedirectGuard, mergeEdsisAuthMessages, provideEdsisAuth, resolveEdsisAuthConfig, setAuthNotificationBadge, storeGoogleOauthState };
|
|
386
|
+
export type { AuthCredentials, AuthUser, EdsisAuthConfig, EdsisAuthGoogleOauthConfig, EdsisAuthHealthCheckConfig, EdsisAuthMessages, EdsisAuthMessagesOverride, EdsisAuthOauthConfig, GoogleAuthorizeUrlOptions, ResolvedEdsisAuthConfig, ResolvedEdsisAuthGoogleOauth, ResolvedEdsisAuthHealthCheck, ResolvedEdsisAuthOauth };
|