@flusys/ng-auth 7.0.2 → 8.0.0-beta.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 +36 -3
- package/fesm2022/flusys-ng-auth.mjs +1271 -291
- package/fesm2022/flusys-ng-auth.mjs.map +1 -1
- package/package.json +5 -5
- package/types/flusys-ng-auth.d.ts +160 -14
|
@@ -1,20 +1,32 @@
|
|
|
1
1
|
import { HttpClient } from '@angular/common/http';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { inject,
|
|
3
|
+
import { inject, Service, signal, computed, effect, PLATFORM_ID, InjectionToken, Component, untracked, viewChild, DestroyRef, DOCUMENT, input, Injector, output, resource, makeStateKey, TransferState } from '@angular/core';
|
|
4
4
|
import { APP_CONFIG, getServiceUrl, isCompanyFeatureEnabled, isServiceEnabled, isSignUpEnabled, getPermissionMode, getDefaultCompanySlug, getDefaultBranchSlug } from '@flusys/ng-core';
|
|
5
5
|
import { of, timeout, switchMap, map, tap, catchError, shareReplay, finalize, BehaviorSubject, throwError, filter, take, from, forkJoin, firstValueFrom } from 'rxjs';
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import { PlatformService, TranslateService, PermissionValidatorService, ApiResourceService, CookieService, USER_PERMISSIONS, COMPANY_PERMISSIONS, BRANCH_PERMISSIONS, resolveTranslationModule, SHARED_MESSAGES, permissionGuard, USER_PROVIDER, COMPANY_API_PROVIDER, USER_PERMISSION_PROVIDER, AUTH_STATE_PROVIDER, RouterTabsComponent, TranslatePipe, AngularModule, HasPermissionDirective, BaseFormComponent, BaseListComponent, BaseListTemplateDirective, FileUrlService, FILE_PROVIDER, PROFILE_PERMISSION_PROVIDER, FileUploaderComponent } from '@flusys/ng-shared';
|
|
6
|
+
import { Router, RouterOutlet, ActivatedRoute, RouterLink } from '@angular/router';
|
|
7
|
+
import { PlatformService, PermissionValidatorService, ApiResourceService, CookieService, TranslateService, USER_PERMISSIONS, COMPANY_PERMISSIONS, BRANCH_PERMISSIONS, SOCIAL_AUTH_CONFIG_PERMISSIONS, resolveTranslationModule, SHARED_MESSAGES, permissionGuard, USER_PROVIDER, COMPANY_API_PROVIDER, USER_PERMISSION_PROVIDER, AUTH_STATE_PROVIDER, RouterTabsComponent, TranslatePipe, HasPermissionDirective, BaseFormComponent, BaseListComponent, BaseListTemplateDirective, FileUrlService, FILE_PROVIDER, PROFILE_PERMISSION_PROVIDER, FileUploaderComponent } from '@flusys/ng-shared';
|
|
9
8
|
import { map as map$1, catchError as catchError$1, tap as tap$1 } from 'rxjs/operators';
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
import * as i1$1 from '@flusys/ng-ui';
|
|
13
|
-
import { MessageService, UiModule, ConfirmationService } from '@flusys/ng-ui';
|
|
9
|
+
import { isPlatformBrowser, NgComponentOutlet, NgTemplateOutlet } from '@angular/common';
|
|
10
|
+
import { MessageService, CardComponent, CheckboxComponent, FButtonDirective, InputTextDirective, SelectComponent, UiIconComponent, ConfirmationService, TableComponent, TagComponent, TooltipDirective, PasswordComponent, AvatarComponent, SkeletonComponent, TextareaDirective, ToggleSwitchComponent, DialogComponent, ProgressSpinnerComponent } from '@flusys/ng-ui';
|
|
14
11
|
import { LAYOUT_AUTH_STATE, LAYOUT_AUTH_API, AppFloatingConfigurator } from '@flusys/ng-layout';
|
|
15
12
|
import { toSignal, takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
16
13
|
import { form, required, FormField, email, minLength } from '@angular/forms/signals';
|
|
17
14
|
import * as i1 from '@angular/forms';
|
|
15
|
+
import { FormsModule } from '@angular/forms';
|
|
16
|
+
|
|
17
|
+
var SocialProviderEnum;
|
|
18
|
+
(function (SocialProviderEnum) {
|
|
19
|
+
SocialProviderEnum["GOOGLE"] = "google";
|
|
20
|
+
SocialProviderEnum["FACEBOOK"] = "facebook";
|
|
21
|
+
SocialProviderEnum["LINKEDIN"] = "linkedin";
|
|
22
|
+
SocialProviderEnum["MICROSOFT"] = "microsoft";
|
|
23
|
+
})(SocialProviderEnum || (SocialProviderEnum = {}));
|
|
24
|
+
const SOCIAL_PROVIDERS = [
|
|
25
|
+
SocialProviderEnum.GOOGLE,
|
|
26
|
+
SocialProviderEnum.FACEBOOK,
|
|
27
|
+
SocialProviderEnum.LINKEDIN,
|
|
28
|
+
SocialProviderEnum.MICROSOFT,
|
|
29
|
+
];
|
|
18
30
|
|
|
19
31
|
// ─── Type guards ───────────────────────────────────────────────────────────────
|
|
20
32
|
function isEmailVerificationRequired(response) {
|
|
@@ -76,12 +88,11 @@ class AuthApiService {
|
|
|
76
88
|
verifyEmail(token) {
|
|
77
89
|
return this.http.post(`${this.baseUrl}/verify-email`, { token });
|
|
78
90
|
}
|
|
79
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
80
|
-
static ɵprov = i0.ɵɵ
|
|
91
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: AuthApiService, deps: [], target: i0.ɵɵFactoryTarget.Service });
|
|
92
|
+
static ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.1.5", ngImport: i0, type: AuthApiService });
|
|
81
93
|
}
|
|
82
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
83
|
-
type:
|
|
84
|
-
args: [{ providedIn: 'root' }]
|
|
94
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: AuthApiService, decorators: [{
|
|
95
|
+
type: Service
|
|
85
96
|
}], ctorParameters: () => [] });
|
|
86
97
|
|
|
87
98
|
/**
|
|
@@ -104,9 +115,6 @@ class AuthStateService {
|
|
|
104
115
|
appConfig = inject(APP_CONFIG);
|
|
105
116
|
router = inject(Router);
|
|
106
117
|
platform = inject(PlatformService);
|
|
107
|
-
translateAdapter = inject(TranslateService, {
|
|
108
|
-
optional: true,
|
|
109
|
-
});
|
|
110
118
|
permissionValidator = inject(PermissionValidatorService);
|
|
111
119
|
// Core State (private writable, public readonly)
|
|
112
120
|
_user = signal(null, /* @ts-ignore */
|
|
@@ -305,12 +313,11 @@ class AuthStateService {
|
|
|
305
313
|
if (!this.platform.isServer)
|
|
306
314
|
localStorage.removeItem(key);
|
|
307
315
|
}
|
|
308
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
309
|
-
static ɵprov = i0.ɵɵ
|
|
316
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: AuthStateService, deps: [], target: i0.ɵɵFactoryTarget.Service });
|
|
317
|
+
static ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.1.5", ngImport: i0, type: AuthStateService });
|
|
310
318
|
}
|
|
311
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
312
|
-
type:
|
|
313
|
-
args: [{ providedIn: 'root' }]
|
|
319
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: AuthStateService, decorators: [{
|
|
320
|
+
type: Service
|
|
314
321
|
}], ctorParameters: () => [] });
|
|
315
322
|
|
|
316
323
|
class AuthInitService {
|
|
@@ -326,6 +333,10 @@ class AuthInitService {
|
|
|
326
333
|
this._initialized.set(true);
|
|
327
334
|
return of(true);
|
|
328
335
|
}
|
|
336
|
+
if (this.authState.requiresCompanySelection()) {
|
|
337
|
+
this._initialized.set(true);
|
|
338
|
+
return of(false);
|
|
339
|
+
}
|
|
329
340
|
if (this._initialized()) {
|
|
330
341
|
return of(this.authState.isAuthenticated());
|
|
331
342
|
}
|
|
@@ -376,12 +387,11 @@ class AuthInitService {
|
|
|
376
387
|
}));
|
|
377
388
|
return this.initializationCache$;
|
|
378
389
|
}
|
|
379
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
380
|
-
static ɵprov = i0.ɵɵ
|
|
390
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: AuthInitService, deps: [], target: i0.ɵɵFactoryTarget.Service });
|
|
391
|
+
static ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.1.5", ngImport: i0, type: AuthInitService });
|
|
381
392
|
}
|
|
382
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
383
|
-
type:
|
|
384
|
-
args: [{ providedIn: 'root' }]
|
|
393
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: AuthInitService, decorators: [{
|
|
394
|
+
type: Service
|
|
385
395
|
}] });
|
|
386
396
|
|
|
387
397
|
/**
|
|
@@ -395,12 +405,11 @@ class BranchApiService extends ApiResourceService {
|
|
|
395
405
|
fetchByCompany(companyId, search = '') {
|
|
396
406
|
this.fetchList(search, { filter: { companyId } });
|
|
397
407
|
}
|
|
398
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
399
|
-
static ɵprov = i0.ɵɵ
|
|
408
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: BranchApiService, deps: [], target: i0.ɵɵFactoryTarget.Service });
|
|
409
|
+
static ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.1.5", ngImport: i0, type: BranchApiService });
|
|
400
410
|
}
|
|
401
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
402
|
-
type:
|
|
403
|
-
args: [{ providedIn: 'root' }]
|
|
411
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: BranchApiService, decorators: [{
|
|
412
|
+
type: Service
|
|
404
413
|
}], ctorParameters: () => [] });
|
|
405
414
|
|
|
406
415
|
/**
|
|
@@ -411,12 +420,93 @@ class CompanyApiService extends ApiResourceService {
|
|
|
411
420
|
constructor() {
|
|
412
421
|
super('company', 'administration');
|
|
413
422
|
}
|
|
414
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
415
|
-
static ɵprov = i0.ɵɵ
|
|
423
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: CompanyApiService, deps: [], target: i0.ɵɵFactoryTarget.Service });
|
|
424
|
+
static ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.1.5", ngImport: i0, type: CompanyApiService });
|
|
416
425
|
}
|
|
417
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
418
|
-
type:
|
|
419
|
-
|
|
426
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: CompanyApiService, decorators: [{
|
|
427
|
+
type: Service
|
|
428
|
+
}], ctorParameters: () => [] });
|
|
429
|
+
|
|
430
|
+
/**
|
|
431
|
+
* Authentication API Endpoints
|
|
432
|
+
*
|
|
433
|
+
* Centralized endpoint definitions to prevent inconsistencies across interceptors
|
|
434
|
+
* and services. All auth-related endpoints should be referenced from here.
|
|
435
|
+
*/
|
|
436
|
+
const AUTH_ENDPOINTS = {
|
|
437
|
+
LOGIN: '/auth/login',
|
|
438
|
+
LOGOUT: '/auth/logout',
|
|
439
|
+
REFRESH: '/auth/refresh',
|
|
440
|
+
REGISTER: '/auth/register',
|
|
441
|
+
ME: '/auth/me',
|
|
442
|
+
SELECT: '/auth/select',
|
|
443
|
+
SWITCH_COMPANY: '/auth/switch-company',
|
|
444
|
+
CHANGE_PASSWORD: '/auth/change-password',
|
|
445
|
+
VERIFY_EMAIL: '/auth/verify-email',
|
|
446
|
+
FORGOT_PASSWORD: '/auth/forgot-password',
|
|
447
|
+
RESET_PASSWORD: '/auth/reset-password',
|
|
448
|
+
RESEND_VERIFICATION: '/auth/resend-verification',
|
|
449
|
+
SOCIAL_CALLBACK: '/auth/social/callback',
|
|
450
|
+
};
|
|
451
|
+
/** Check if a URL matches a specific endpoint */
|
|
452
|
+
function isEndpoint(url, endpoint) {
|
|
453
|
+
return url.includes(endpoint);
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
/** Round-trips the pre-login returnUrl through the OAuth redirect, which cannot carry it itself. */
|
|
457
|
+
const SOCIAL_RETURN_URL_KEY = 'flusys_social_return_url';
|
|
458
|
+
class SocialAuthApiService {
|
|
459
|
+
appConfig = inject(APP_CONFIG);
|
|
460
|
+
http = inject(HttpClient);
|
|
461
|
+
platform = inject(PlatformService);
|
|
462
|
+
baseUrl = getServiceUrl(this.appConfig, 'auth');
|
|
463
|
+
get redirectUri() {
|
|
464
|
+
if (this.platform.isServer)
|
|
465
|
+
return '';
|
|
466
|
+
return `${window.location.origin}${AUTH_ENDPOINTS.SOCIAL_CALLBACK}`;
|
|
467
|
+
}
|
|
468
|
+
/** Called before redirecting to the provider, so the callback page can resume where the user left off. */
|
|
469
|
+
saveReturnUrl(returnUrl) {
|
|
470
|
+
if (this.platform.isServer)
|
|
471
|
+
return;
|
|
472
|
+
if (returnUrl)
|
|
473
|
+
sessionStorage.setItem(SOCIAL_RETURN_URL_KEY, returnUrl);
|
|
474
|
+
else
|
|
475
|
+
sessionStorage.removeItem(SOCIAL_RETURN_URL_KEY);
|
|
476
|
+
}
|
|
477
|
+
/** Reads and clears the returnUrl saved by {@link saveReturnUrl}. */
|
|
478
|
+
consumeReturnUrl() {
|
|
479
|
+
if (this.platform.isServer)
|
|
480
|
+
return '';
|
|
481
|
+
const returnUrl = sessionStorage.getItem(SOCIAL_RETURN_URL_KEY) ?? '';
|
|
482
|
+
sessionStorage.removeItem(SOCIAL_RETURN_URL_KEY);
|
|
483
|
+
return returnUrl;
|
|
484
|
+
}
|
|
485
|
+
getProviders() {
|
|
486
|
+
return this.http.post(`${this.baseUrl}/social/providers`, { redirectUri: this.redirectUri });
|
|
487
|
+
}
|
|
488
|
+
authorize(provider) {
|
|
489
|
+
return this.http.post(`${this.baseUrl}/social/authorize`, { provider, redirectUri: this.redirectUri });
|
|
490
|
+
}
|
|
491
|
+
callback(request) {
|
|
492
|
+
return this.http.post(`${this.baseUrl}/social/callback`, request);
|
|
493
|
+
}
|
|
494
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: SocialAuthApiService, deps: [], target: i0.ɵɵFactoryTarget.Service });
|
|
495
|
+
static ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.1.5", ngImport: i0, type: SocialAuthApiService });
|
|
496
|
+
}
|
|
497
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: SocialAuthApiService, decorators: [{
|
|
498
|
+
type: Service
|
|
499
|
+
}] });
|
|
500
|
+
|
|
501
|
+
class SocialAuthConfigApiService extends ApiResourceService {
|
|
502
|
+
constructor() {
|
|
503
|
+
super('social-config', 'auth');
|
|
504
|
+
}
|
|
505
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: SocialAuthConfigApiService, deps: [], target: i0.ɵɵFactoryTarget.Service });
|
|
506
|
+
static ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.1.5", ngImport: i0, type: SocialAuthConfigApiService });
|
|
507
|
+
}
|
|
508
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: SocialAuthConfigApiService, decorators: [{
|
|
509
|
+
type: Service
|
|
420
510
|
}], ctorParameters: () => [] });
|
|
421
511
|
|
|
422
512
|
/**
|
|
@@ -441,12 +531,11 @@ class TokenRefreshStateService {
|
|
|
441
531
|
failRefresh() {
|
|
442
532
|
this._isRefreshing.set(false);
|
|
443
533
|
}
|
|
444
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
445
|
-
static ɵprov = i0.ɵɵ
|
|
534
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: TokenRefreshStateService, deps: [], target: i0.ɵɵFactoryTarget.Service });
|
|
535
|
+
static ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.1.5", ngImport: i0, type: TokenRefreshStateService });
|
|
446
536
|
}
|
|
447
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
448
|
-
type:
|
|
449
|
-
args: [{ providedIn: 'root' }]
|
|
537
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: TokenRefreshStateService, decorators: [{
|
|
538
|
+
type: Service
|
|
450
539
|
}] });
|
|
451
540
|
|
|
452
541
|
/**
|
|
@@ -464,12 +553,11 @@ class UserApiService extends ApiResourceService {
|
|
|
464
553
|
const params = search ? { q: search } : undefined;
|
|
465
554
|
return this.http.post(`${this.baseUrl}/lookup`, filter, params ? { params } : undefined);
|
|
466
555
|
}
|
|
467
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
468
|
-
static ɵprov = i0.ɵɵ
|
|
556
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: UserApiService, deps: [], target: i0.ɵɵFactoryTarget.Service });
|
|
557
|
+
static ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.1.5", ngImport: i0, type: UserApiService });
|
|
469
558
|
}
|
|
470
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
471
|
-
type:
|
|
472
|
-
args: [{ providedIn: 'root' }]
|
|
559
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: UserApiService, decorators: [{
|
|
560
|
+
type: Service
|
|
473
561
|
}], ctorParameters: () => [] });
|
|
474
562
|
|
|
475
563
|
/**
|
|
@@ -510,46 +598,20 @@ class UserPermissionApiService {
|
|
|
510
598
|
...(companyId && { companyId }),
|
|
511
599
|
});
|
|
512
600
|
}
|
|
513
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
514
|
-
static ɵprov = i0.ɵɵ
|
|
601
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: UserPermissionApiService, deps: [], target: i0.ɵɵFactoryTarget.Service });
|
|
602
|
+
static ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.1.5", ngImport: i0, type: UserPermissionApiService });
|
|
515
603
|
}
|
|
516
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
517
|
-
type:
|
|
518
|
-
args: [{ providedIn: 'root' }]
|
|
604
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: UserPermissionApiService, decorators: [{
|
|
605
|
+
type: Service
|
|
519
606
|
}] });
|
|
520
607
|
|
|
521
|
-
/**
|
|
522
|
-
* Authentication API Endpoints
|
|
523
|
-
*
|
|
524
|
-
* Centralized endpoint definitions to prevent inconsistencies across interceptors
|
|
525
|
-
* and services. All auth-related endpoints should be referenced from here.
|
|
526
|
-
*/
|
|
527
|
-
const AUTH_ENDPOINTS = {
|
|
528
|
-
LOGIN: '/auth/login',
|
|
529
|
-
LOGOUT: '/auth/logout',
|
|
530
|
-
REFRESH: '/auth/refresh',
|
|
531
|
-
REGISTER: '/auth/register',
|
|
532
|
-
ME: '/auth/me',
|
|
533
|
-
SELECT: '/auth/select',
|
|
534
|
-
SWITCH_COMPANY: '/auth/switch-company',
|
|
535
|
-
CHANGE_PASSWORD: '/auth/change-password',
|
|
536
|
-
VERIFY_EMAIL: '/auth/verify-email',
|
|
537
|
-
FORGOT_PASSWORD: '/auth/forgot-password',
|
|
538
|
-
RESET_PASSWORD: '/auth/reset-password',
|
|
539
|
-
RESEND_VERIFICATION: '/auth/resend-verification',
|
|
540
|
-
};
|
|
541
|
-
/** Check if a URL matches a specific endpoint */
|
|
542
|
-
function isEndpoint(url, endpoint) {
|
|
543
|
-
return url.includes(endpoint);
|
|
544
|
-
}
|
|
545
|
-
|
|
546
608
|
function isValidReturnUrl(url) {
|
|
547
609
|
if (typeof url !== 'string' || !url)
|
|
548
610
|
return false;
|
|
549
611
|
return url.startsWith('/') && !url.includes('://') && !url.startsWith('//');
|
|
550
612
|
}
|
|
551
613
|
/** Protects routes requiring authentication */
|
|
552
|
-
const authGuard = (
|
|
614
|
+
const authGuard = (_route, state) => {
|
|
553
615
|
const authState = inject(AuthStateService);
|
|
554
616
|
const router = inject(Router);
|
|
555
617
|
const appConfig = inject(APP_CONFIG);
|
|
@@ -618,6 +680,7 @@ const COOKIE_ENDPOINTS = [
|
|
|
618
680
|
AUTH_ENDPOINTS.SELECT,
|
|
619
681
|
AUTH_ENDPOINTS.SWITCH_COMPANY,
|
|
620
682
|
AUTH_ENDPOINTS.VERIFY_EMAIL,
|
|
683
|
+
AUTH_ENDPOINTS.SOCIAL_CALLBACK,
|
|
621
684
|
];
|
|
622
685
|
/**
|
|
623
686
|
* Auth Interceptor - Adds auth headers and cookie credentials to requests
|
|
@@ -666,11 +729,13 @@ function tokenRefreshInterceptor(req, next) {
|
|
|
666
729
|
const isLoginRequest = isEndpoint(req.url, AUTH_ENDPOINTS.LOGIN);
|
|
667
730
|
const isSelectRequest = isEndpoint(req.url, AUTH_ENDPOINTS.SELECT);
|
|
668
731
|
const isRegisterRequest = isEndpoint(req.url, AUTH_ENDPOINTS.REGISTER);
|
|
732
|
+
const isSocialCallbackRequest = isEndpoint(req.url, AUTH_ENDPOINTS.SOCIAL_CALLBACK);
|
|
669
733
|
// Don't intercept auth-related endpoints
|
|
670
734
|
if (isRefreshRequest ||
|
|
671
735
|
isLoginRequest ||
|
|
672
736
|
isSelectRequest ||
|
|
673
|
-
isRegisterRequest
|
|
737
|
+
isRegisterRequest ||
|
|
738
|
+
isSocialCallbackRequest) {
|
|
674
739
|
return next(req);
|
|
675
740
|
}
|
|
676
741
|
// PROACTIVE REFRESH: Check if token is expired or expiring soon
|
|
@@ -1005,6 +1070,47 @@ const AUTH_MESSAGES = {
|
|
|
1005
1070
|
'administrative.user.no.users': 'No users found',
|
|
1006
1071
|
'administrative.user.details': 'User Details',
|
|
1007
1072
|
'administrative.user.delete.title': 'Delete User',
|
|
1073
|
+
// Social sign-in API keys
|
|
1074
|
+
'auth.social.providers.success': 'Social providers retrieved successfully',
|
|
1075
|
+
'auth.social.authorize.success': 'Authorization URL generated successfully',
|
|
1076
|
+
'auth.social.login.success': 'Signed in successfully',
|
|
1077
|
+
'auth.social.provider.disabled': 'Social sign-in with {{provider}} is not enabled',
|
|
1078
|
+
'auth.social.provider.not.configured': 'Social sign-in with {{provider}} is missing its client credentials',
|
|
1079
|
+
'auth.social.state.invalid': 'Social sign-in session is invalid or has expired',
|
|
1080
|
+
'auth.social.redirect.uri.mismatch': 'Redirect URI does not match the one the sign-in started with',
|
|
1081
|
+
'auth.social.exchange.failed': 'Social sign-in with {{provider}} failed',
|
|
1082
|
+
'auth.social.profile.incomplete': '{{provider}} did not return an account identifier',
|
|
1083
|
+
'auth.social.account.not.linked': 'No account is linked to this {{provider}} profile',
|
|
1084
|
+
'auth.social.company.required': 'No account is linked to this {{provider}} profile. Please sign up manually and join or create a company first, then social sign-in will work.',
|
|
1085
|
+
'auth.social.email.required': '{{provider}} did not share an email address',
|
|
1086
|
+
'auth.social.email.not.verified': '{{provider}} has not verified this email address',
|
|
1087
|
+
// components/social-login-buttons.component.ts
|
|
1088
|
+
'auth.social.continue.with': 'or continue with',
|
|
1089
|
+
'auth.social.provider.google': 'Google',
|
|
1090
|
+
'auth.social.provider.facebook': 'Facebook',
|
|
1091
|
+
'auth.social.provider.linkedin': 'LinkedIn',
|
|
1092
|
+
'auth.social.provider.microsoft': 'Microsoft',
|
|
1093
|
+
// pages/social-callback/social-callback-page.component.ts
|
|
1094
|
+
'auth.social.signing.in': 'Signing you in...',
|
|
1095
|
+
'auth.social.failed': 'Social sign-in failed',
|
|
1096
|
+
// pages/social-config/social-config-page.component.ts (API keys)
|
|
1097
|
+
'social.config.provider.already.configured': 'Social provider "{{provider}}" is already configured',
|
|
1098
|
+
'social.config.credentials.required': 'Client ID and client secret are required for {{provider}}',
|
|
1099
|
+
'social.config.title': 'Social Config',
|
|
1100
|
+
'social.config.subtitle': 'Enable the providers users may sign in with, and hold their credentials',
|
|
1101
|
+
'social.config.redirect.uri': 'Redirect URI',
|
|
1102
|
+
'social.config.client.id': 'Client ID',
|
|
1103
|
+
'social.config.client.secret': 'Client Secret',
|
|
1104
|
+
'social.config.client.secret.unchanged': 'Unchanged - leave blank to keep the saved secret',
|
|
1105
|
+
'social.config.tenant.id': 'Directory (tenant) ID',
|
|
1106
|
+
'social.config.tenant.id.example': 'common',
|
|
1107
|
+
'social.config.scopes': 'Scopes',
|
|
1108
|
+
'social.config.scopes.placeholder': 'Leave blank to use the provider defaults',
|
|
1109
|
+
'social.config.save.success': 'Social sign-in settings saved',
|
|
1110
|
+
'social.config.provider.hint.google': 'Google Cloud console, OAuth 2.0 client ID',
|
|
1111
|
+
'social.config.provider.hint.facebook': 'Meta for Developers, Facebook Login app',
|
|
1112
|
+
'social.config.provider.hint.linkedin': 'LinkedIn developers, Sign In with LinkedIn',
|
|
1113
|
+
'social.config.provider.hint.microsoft': 'Microsoft Entra ID, app registration',
|
|
1008
1114
|
};
|
|
1009
1115
|
|
|
1010
1116
|
/**
|
|
@@ -1027,6 +1133,9 @@ function resolveAdministrationDefaultTab() {
|
|
|
1027
1133
|
permissionValidator.hasPermission(BRANCH_PERMISSIONS.READ)) {
|
|
1028
1134
|
return 'branch';
|
|
1029
1135
|
}
|
|
1136
|
+
if (permissionValidator.hasPermission(SOCIAL_AUTH_CONFIG_PERMISSIONS.READ)) {
|
|
1137
|
+
return 'social-config';
|
|
1138
|
+
}
|
|
1030
1139
|
return 'users';
|
|
1031
1140
|
}
|
|
1032
1141
|
/**
|
|
@@ -1065,6 +1174,10 @@ const AUTH_ROUTES = [
|
|
|
1065
1174
|
loadComponent: () => Promise.resolve().then(function () { return resetPasswordPage_component; }).then((m) => m.ResetPasswordPageComponent),
|
|
1066
1175
|
canActivate: [emailFeatureGuard, guestGuard],
|
|
1067
1176
|
},
|
|
1177
|
+
{
|
|
1178
|
+
path: 'social/callback',
|
|
1179
|
+
loadComponent: () => Promise.resolve().then(function () { return socialCallbackPage_component; }).then((m) => m.SocialCallbackPageComponent),
|
|
1180
|
+
},
|
|
1068
1181
|
{
|
|
1069
1182
|
path: 'verify-email',
|
|
1070
1183
|
loadComponent: () => Promise.resolve().then(function () { return verifyEmailPage_component; }).then((m) => m.VerifyEmailPageComponent),
|
|
@@ -1158,6 +1271,12 @@ const ADMINISTRATION_ROUTES = [
|
|
|
1158
1271
|
},
|
|
1159
1272
|
],
|
|
1160
1273
|
},
|
|
1274
|
+
// Social sign-in provider credentials tab
|
|
1275
|
+
{
|
|
1276
|
+
path: 'social-config',
|
|
1277
|
+
canActivate: [permissionGuard(SOCIAL_AUTH_CONFIG_PERMISSIONS.READ)],
|
|
1278
|
+
loadComponent: () => Promise.resolve().then(function () { return socialConfigPage_component; }).then((m) => m.SocialConfigPageComponent),
|
|
1279
|
+
},
|
|
1161
1280
|
// Default redirect to the first tab the user has permission to see
|
|
1162
1281
|
{
|
|
1163
1282
|
path: '',
|
|
@@ -1239,12 +1358,11 @@ class AuthLayoutStateAdapter {
|
|
|
1239
1358
|
return null;
|
|
1240
1359
|
}, /* @ts-ignore */
|
|
1241
1360
|
...(ngDevMode ? [{ debugName: "loginUserData" }] : /* istanbul ignore next */ []));
|
|
1242
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
1243
|
-
static ɵprov = i0.ɵɵ
|
|
1361
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: AuthLayoutStateAdapter, deps: [], target: i0.ɵɵFactoryTarget.Service });
|
|
1362
|
+
static ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.1.5", ngImport: i0, type: AuthLayoutStateAdapter });
|
|
1244
1363
|
}
|
|
1245
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
1246
|
-
type:
|
|
1247
|
-
args: [{ providedIn: 'root' }]
|
|
1364
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: AuthLayoutStateAdapter, decorators: [{
|
|
1365
|
+
type: Service
|
|
1248
1366
|
}] });
|
|
1249
1367
|
// =============================================================================
|
|
1250
1368
|
// Layout API Adapter
|
|
@@ -1312,12 +1430,11 @@ class AuthLayoutApiAdapter {
|
|
|
1312
1430
|
imageId: branch.logoId ?? undefined,
|
|
1313
1431
|
}))));
|
|
1314
1432
|
}
|
|
1315
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
1316
|
-
static ɵprov = i0.ɵɵ
|
|
1433
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: AuthLayoutApiAdapter, deps: [], target: i0.ɵɵFactoryTarget.Service });
|
|
1434
|
+
static ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.1.5", ngImport: i0, type: AuthLayoutApiAdapter });
|
|
1317
1435
|
}
|
|
1318
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
1319
|
-
type:
|
|
1320
|
-
args: [{ providedIn: 'root' }]
|
|
1436
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: AuthLayoutApiAdapter, decorators: [{
|
|
1437
|
+
type: Service
|
|
1321
1438
|
}] });
|
|
1322
1439
|
|
|
1323
1440
|
/**
|
|
@@ -1364,11 +1481,12 @@ class AuthUserProviderAdapter {
|
|
|
1364
1481
|
meta: response.meta,
|
|
1365
1482
|
})));
|
|
1366
1483
|
}
|
|
1367
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
1368
|
-
static ɵprov = i0.ɵɵ
|
|
1484
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: AuthUserProviderAdapter, deps: [], target: i0.ɵɵFactoryTarget.Service });
|
|
1485
|
+
static ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.1.5", ngImport: i0, type: AuthUserProviderAdapter, autoProvided: false });
|
|
1369
1486
|
}
|
|
1370
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
1371
|
-
type:
|
|
1487
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: AuthUserProviderAdapter, decorators: [{
|
|
1488
|
+
type: Service,
|
|
1489
|
+
args: [{ autoProvided: false }]
|
|
1372
1490
|
}] });
|
|
1373
1491
|
// =============================================================================
|
|
1374
1492
|
// Company API Provider Adapter
|
|
@@ -1396,11 +1514,12 @@ class AuthCompanyApiProviderAdapter {
|
|
|
1396
1514
|
meta: response.meta,
|
|
1397
1515
|
})));
|
|
1398
1516
|
}
|
|
1399
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
1400
|
-
static ɵprov = i0.ɵɵ
|
|
1517
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: AuthCompanyApiProviderAdapter, deps: [], target: i0.ɵɵFactoryTarget.Service });
|
|
1518
|
+
static ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.1.5", ngImport: i0, type: AuthCompanyApiProviderAdapter, autoProvided: false });
|
|
1401
1519
|
}
|
|
1402
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
1403
|
-
type:
|
|
1520
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: AuthCompanyApiProviderAdapter, decorators: [{
|
|
1521
|
+
type: Service,
|
|
1522
|
+
args: [{ autoProvided: false }]
|
|
1404
1523
|
}] });
|
|
1405
1524
|
// =============================================================================
|
|
1406
1525
|
// User Permission Provider Adapter
|
|
@@ -1416,11 +1535,12 @@ class AuthUserPermissionProviderAdapter {
|
|
|
1416
1535
|
data: (response.data ?? []).map((c) => ({ id: c.companyId, name: c.companyName })),
|
|
1417
1536
|
})));
|
|
1418
1537
|
}
|
|
1419
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
1420
|
-
static ɵprov = i0.ɵɵ
|
|
1538
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: AuthUserPermissionProviderAdapter, deps: [], target: i0.ɵɵFactoryTarget.Service });
|
|
1539
|
+
static ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.1.5", ngImport: i0, type: AuthUserPermissionProviderAdapter, autoProvided: false });
|
|
1421
1540
|
}
|
|
1422
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
1423
|
-
type:
|
|
1541
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: AuthUserPermissionProviderAdapter, decorators: [{
|
|
1542
|
+
type: Service,
|
|
1543
|
+
args: [{ autoProvided: false }]
|
|
1424
1544
|
}] });
|
|
1425
1545
|
// =============================================================================
|
|
1426
1546
|
// Auth State Provider Adapter
|
|
@@ -1434,11 +1554,12 @@ class AuthStateProviderAdapter {
|
|
|
1434
1554
|
initialize() {
|
|
1435
1555
|
return this.authInit.initialize().pipe(map(() => undefined));
|
|
1436
1556
|
}
|
|
1437
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
1438
|
-
static ɵprov = i0.ɵɵ
|
|
1557
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: AuthStateProviderAdapter, deps: [], target: i0.ɵɵFactoryTarget.Service });
|
|
1558
|
+
static ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.1.5", ngImport: i0, type: AuthStateProviderAdapter, autoProvided: false });
|
|
1439
1559
|
}
|
|
1440
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
1441
|
-
type:
|
|
1560
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: AuthStateProviderAdapter, decorators: [{
|
|
1561
|
+
type: Service,
|
|
1562
|
+
args: [{ autoProvided: false }]
|
|
1442
1563
|
}] });
|
|
1443
1564
|
|
|
1444
1565
|
/** Provides auth integration for ng-layout */
|
|
@@ -1513,6 +1634,7 @@ function validateEmail(email, config) {
|
|
|
1513
1634
|
* - Users (always visible) - includes permission management via dialogs
|
|
1514
1635
|
* - Companies (only if company feature enabled)
|
|
1515
1636
|
* - Branches (only if company feature enabled)
|
|
1637
|
+
* - Social Config (social sign-in provider credentials)
|
|
1516
1638
|
*/
|
|
1517
1639
|
class AdministrationPageComponent {
|
|
1518
1640
|
appConfig = inject(APP_CONFIG);
|
|
@@ -1543,6 +1665,13 @@ class AdministrationPageComponent {
|
|
|
1543
1665
|
permission: BRANCH_PERMISSIONS.READ,
|
|
1544
1666
|
requiresCompanyFeature: true,
|
|
1545
1667
|
},
|
|
1668
|
+
{
|
|
1669
|
+
id: 'social-config',
|
|
1670
|
+
labelKey: 'social.config.title',
|
|
1671
|
+
icon: 'key',
|
|
1672
|
+
route: 'social-config',
|
|
1673
|
+
permission: SOCIAL_AUTH_CONFIG_PERMISSIONS.READ,
|
|
1674
|
+
},
|
|
1546
1675
|
];
|
|
1547
1676
|
/** Check if company feature is enabled */
|
|
1548
1677
|
companyFeatureEnabled = computed(() => isCompanyFeatureEnabled(this.appConfig), /* @ts-ignore */
|
|
@@ -1563,8 +1692,8 @@ class AdministrationPageComponent {
|
|
|
1563
1692
|
}));
|
|
1564
1693
|
}, /* @ts-ignore */
|
|
1565
1694
|
...(ngDevMode ? [{ debugName: "visibleTabs" }] : /* istanbul ignore next */ []));
|
|
1566
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
1567
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.
|
|
1695
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: AdministrationPageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1696
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.5", type: AdministrationPageComponent, isStandalone: true, selector: "lib-administration-page", ngImport: i0, template: `
|
|
1568
1697
|
<div class="p-4">
|
|
1569
1698
|
<div class="mb-4">
|
|
1570
1699
|
<h1 class="text-2xl font-bold m-0">{{ 'administrative.title' | translate }}</h1>
|
|
@@ -1579,7 +1708,7 @@ class AdministrationPageComponent {
|
|
|
1579
1708
|
</div>
|
|
1580
1709
|
`, isInline: true, dependencies: [{ kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name", "routerOutletData"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "component", type: RouterTabsComponent, selector: "lib-router-tabs", inputs: ["tabs"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] });
|
|
1581
1710
|
}
|
|
1582
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
1711
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: AdministrationPageComponent, decorators: [{
|
|
1583
1712
|
type: Component,
|
|
1584
1713
|
args: [{
|
|
1585
1714
|
selector: 'lib-administration-page',
|
|
@@ -1733,7 +1862,8 @@ class BranchFormComponent {
|
|
|
1733
1862
|
this.formModel.update((m) => ({ ...m, slug }));
|
|
1734
1863
|
}
|
|
1735
1864
|
}
|
|
1736
|
-
async onSubmit() {
|
|
1865
|
+
async onSubmit(event) {
|
|
1866
|
+
event.preventDefault();
|
|
1737
1867
|
if (!this.isFormValid()) {
|
|
1738
1868
|
this.messageService.add({
|
|
1739
1869
|
severity: 'error',
|
|
@@ -1809,8 +1939,8 @@ class BranchFormComponent {
|
|
|
1809
1939
|
queryParams: companyId ? { companyId } : {},
|
|
1810
1940
|
});
|
|
1811
1941
|
}
|
|
1812
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
1813
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.
|
|
1942
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: BranchFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1943
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: BranchFormComponent, isStandalone: true, selector: "lib-branch-form", ngImport: i0, template: `
|
|
1814
1944
|
<f-card>
|
|
1815
1945
|
<ng-template #header>
|
|
1816
1946
|
<div class="flex justify-between items-center p-4">
|
|
@@ -1825,7 +1955,7 @@ class BranchFormComponent {
|
|
|
1825
1955
|
</ng-template>
|
|
1826
1956
|
|
|
1827
1957
|
<form
|
|
1828
|
-
(
|
|
1958
|
+
(submit)="onSubmit($event)"
|
|
1829
1959
|
class="grid grid-cols-1 md:grid-cols-2 gap-4"
|
|
1830
1960
|
>
|
|
1831
1961
|
<!-- Company Selection -->
|
|
@@ -1946,13 +2076,22 @@ class BranchFormComponent {
|
|
|
1946
2076
|
</div>
|
|
1947
2077
|
</form>
|
|
1948
2078
|
</f-card>
|
|
1949
|
-
`, isInline: true, dependencies: [{ kind: "
|
|
2079
|
+
`, isInline: true, dependencies: [{ kind: "component", type: CardComponent, selector: "f-card", inputs: ["header", "subheader", "styleClass", "style"] }, { kind: "component", type: CheckboxComponent, selector: "f-checkbox", inputs: ["label", "binary", "disabled", "readonly", "inputId", "invalid", "indeterminate", "variant", "size", "touched", "styleClass", "style", "checked"], outputs: ["onChange", "onBlur", "touch", "checkedChange"] }, { kind: "directive", type: FButtonDirective, selector: "[fButton]", inputs: ["severity", "text", "outlined", "link", "variant", "rounded", "raised", "fluid", "disabled", "loading", "loadingIcon", "size", "label", "icon", "iconPos", "ariaLabel", "plain"] }, { kind: "directive", type: InputTextDirective, selector: "[fInputText]", inputs: ["invalid", "touched", "variant", "size", "fluid"] }, { kind: "component", type: SelectComponent, selector: "f-select", inputs: ["options", "optionLabel", "optionValue", "placeholder", "disabled", "filter", "filterBy", "filterMatchMode", "filterLocale", "filterPlaceholder", "resetFilterOnHide", "autofocusFilter", "emptyMessage", "emptyFilterMessage", "showClear", "loading", "loadingIcon", "dropdownIcon", "clearIcon", "inputId", "invalid", "touched", "styleClass", "style", "appendTo", "editable", "readonly", "autofocus", "checkmark", "group", "optionGroupLabel", "optionGroupChildren", "virtualScroll", "virtualScrollItemSize", "lazy"], outputs: ["onFilter", "onChange", "onShow", "onHide", "onBlur", "onFocus", "onClear", "onLazyLoad"] }, { kind: "component", type: UiIconComponent, selector: "ui-icon", inputs: ["name", "size", "spin", "fill", "severity"] }, { kind: "directive", type: FormField, selector: "[formField]", inputs: ["formField"], exportAs: ["formField"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] });
|
|
1950
2080
|
}
|
|
1951
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
2081
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: BranchFormComponent, decorators: [{
|
|
1952
2082
|
type: Component,
|
|
1953
2083
|
args: [{
|
|
1954
2084
|
selector: 'lib-branch-form',
|
|
1955
|
-
imports: [
|
|
2085
|
+
imports: [
|
|
2086
|
+
CardComponent,
|
|
2087
|
+
CheckboxComponent,
|
|
2088
|
+
FButtonDirective,
|
|
2089
|
+
InputTextDirective,
|
|
2090
|
+
SelectComponent,
|
|
2091
|
+
UiIconComponent,
|
|
2092
|
+
FormField,
|
|
2093
|
+
TranslatePipe,
|
|
2094
|
+
],
|
|
1956
2095
|
template: `
|
|
1957
2096
|
<f-card>
|
|
1958
2097
|
<ng-template #header>
|
|
@@ -1968,7 +2107,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
1968
2107
|
</ng-template>
|
|
1969
2108
|
|
|
1970
2109
|
<form
|
|
1971
|
-
(
|
|
2110
|
+
(submit)="onSubmit($event)"
|
|
1972
2111
|
class="grid grid-cols-1 md:grid-cols-2 gap-4"
|
|
1973
2112
|
>
|
|
1974
2113
|
<!-- Company Selection -->
|
|
@@ -2202,8 +2341,8 @@ class BranchListComponent {
|
|
|
2202
2341
|
},
|
|
2203
2342
|
});
|
|
2204
2343
|
}
|
|
2205
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
2206
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.
|
|
2344
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: BranchListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2345
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: BranchListComponent, isStandalone: true, selector: "lib-branch-list", ngImport: i0, template: `
|
|
2207
2346
|
<f-card>
|
|
2208
2347
|
<ng-template #header>
|
|
2209
2348
|
<div
|
|
@@ -2325,13 +2464,24 @@ class BranchListComponent {
|
|
|
2325
2464
|
</f-table>
|
|
2326
2465
|
</div>
|
|
2327
2466
|
</f-card>
|
|
2328
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type:
|
|
2467
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: CardComponent, selector: "f-card", inputs: ["header", "subheader", "styleClass", "style"] }, { kind: "directive", type: FButtonDirective, selector: "[fButton]", inputs: ["severity", "text", "outlined", "link", "variant", "rounded", "raised", "fluid", "disabled", "loading", "loadingIcon", "size", "label", "icon", "iconPos", "ariaLabel", "plain"] }, { kind: "component", type: SelectComponent, selector: "f-select", inputs: ["options", "optionLabel", "optionValue", "placeholder", "disabled", "filter", "filterBy", "filterMatchMode", "filterLocale", "filterPlaceholder", "resetFilterOnHide", "autofocusFilter", "emptyMessage", "emptyFilterMessage", "showClear", "loading", "loadingIcon", "dropdownIcon", "clearIcon", "inputId", "invalid", "touched", "styleClass", "style", "appendTo", "editable", "readonly", "autofocus", "checkmark", "group", "optionGroupLabel", "optionGroupChildren", "virtualScroll", "virtualScrollItemSize", "lazy"], outputs: ["onFilter", "onChange", "onShow", "onHide", "onBlur", "onFocus", "onClear", "onLazyLoad"] }, { kind: "component", type: TableComponent, selector: "f-table", inputs: ["value", "lazy", "loading", "rows", "totalRecords", "rowHover", "dataKey", "scrollable", "scrollHeight", "paginator", "first", "rowsPerPageOptions", "showCurrentPageReport", "currentPageReportTemplate", "tableStyle", "styleClass", "globalFilterFields", "filterDelay", "responsiveLayout", "selectionMode", "sortMode", "rowExpandMode", "resizableColumns", "rowStyleClass", "virtualScroll", "virtualScrollItemSize", "sortField", "sortOrder", "multiSortMeta", "filters", "selection", "expandedRowKeys", "contextMenuSelection"], outputs: ["sortFieldChange", "sortOrderChange", "multiSortMetaChange", "filtersChange", "selectionChange", "expandedRowKeysChange", "contextMenuSelectionChange", "onLazyLoad", "onSort", "onFilter", "onRowSelect", "onRowUnselect", "onSelectAllChange", "onRowExpand", "onRowCollapse", "onColResize", "onRowContextMenu"] }, { kind: "component", type: TagComponent, selector: "f-tag", inputs: ["value", "severity", "icon", "rounded", "color", "styleClass", "style"] }, { kind: "directive", type: TooltipDirective, selector: "[fTooltip]", inputs: ["fTooltip", "tooltipPosition", "positionStyle", "tooltipStyleClass", "disabled", "tooltipEvent", "showDelay", "hideDelay", "life", "autoHide", "positionTop", "positionLeft", "escape"] }, { kind: "component", type: UiIconComponent, selector: "ui-icon", inputs: ["name", "size", "spin", "fill", "severity"] }, { kind: "directive", type: HasPermissionDirective, selector: "[hasPermission]", inputs: ["hasPermission"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] });
|
|
2329
2468
|
}
|
|
2330
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
2469
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: BranchListComponent, decorators: [{
|
|
2331
2470
|
type: Component,
|
|
2332
2471
|
args: [{
|
|
2333
2472
|
selector: 'lib-branch-list',
|
|
2334
|
-
imports: [
|
|
2473
|
+
imports: [
|
|
2474
|
+
FormsModule,
|
|
2475
|
+
CardComponent,
|
|
2476
|
+
FButtonDirective,
|
|
2477
|
+
SelectComponent,
|
|
2478
|
+
TableComponent,
|
|
2479
|
+
TagComponent,
|
|
2480
|
+
TooltipDirective,
|
|
2481
|
+
UiIconComponent,
|
|
2482
|
+
HasPermissionDirective,
|
|
2483
|
+
TranslatePipe,
|
|
2484
|
+
],
|
|
2335
2485
|
template: `
|
|
2336
2486
|
<f-card>
|
|
2337
2487
|
<ng-template #header>
|
|
@@ -2554,8 +2704,8 @@ class CompanyFormComponent {
|
|
|
2554
2704
|
t(key, vars) {
|
|
2555
2705
|
return this.translateAdapter?.translate(key, vars) ?? key;
|
|
2556
2706
|
}
|
|
2557
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
2558
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.
|
|
2707
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: CompanyFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2708
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.5", type: CompanyFormComponent, isStandalone: true, selector: "lib-company-form", viewQueries: [{ propertyName: "formRef", first: true, predicate: BaseFormComponent, descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
2559
2709
|
<lib-base-form
|
|
2560
2710
|
[fields]="fields"
|
|
2561
2711
|
[service]="companyService"
|
|
@@ -2570,7 +2720,7 @@ class CompanyFormComponent {
|
|
|
2570
2720
|
/>
|
|
2571
2721
|
`, isInline: true, dependencies: [{ kind: "component", type: BaseFormComponent, selector: "lib-base-form", inputs: ["fields", "title", "createTitle", "editTitle", "columns", "submitLabel", "cancelLabel", "isLoading", "isEditMode", "initialValue", "service", "editId", "cancelRoute", "navigateOnSuccess", "mapToRequest", "mapFromEntity"], outputs: ["onSubmit", "onCancel", "onValueChange"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] });
|
|
2572
2722
|
}
|
|
2573
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
2723
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: CompanyFormComponent, decorators: [{
|
|
2574
2724
|
type: Component,
|
|
2575
2725
|
args: [{
|
|
2576
2726
|
selector: 'lib-company-form',
|
|
@@ -2649,8 +2799,8 @@ class CompanyListComponent {
|
|
|
2649
2799
|
t(key) {
|
|
2650
2800
|
return this.translateAdapter?.translate(key) ?? key;
|
|
2651
2801
|
}
|
|
2652
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
2653
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.
|
|
2802
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: CompanyListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2803
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.5", type: CompanyListComponent, isStandalone: true, selector: "lib-company-list", ngImport: i0, template: `
|
|
2654
2804
|
<lib-base-list
|
|
2655
2805
|
[columns]="columns"
|
|
2656
2806
|
[actions]="viewBranchesAction"
|
|
@@ -2676,16 +2826,16 @@ class CompanyListComponent {
|
|
|
2676
2826
|
/>
|
|
2677
2827
|
</ng-template>
|
|
2678
2828
|
</lib-base-list>
|
|
2679
|
-
`, isInline: true, dependencies: [{ kind: "component", type: BaseListComponent, selector: "lib-base-list", inputs: ["columns", "actions", "title", "showCreateButton", "searchable", "pageSize", "scrollHeight", "emptyMessage", "createButtonLabel", "createButtonIcon", "data", "total", "isLoading", "service", "filter", "createRoute", "editRoute", "deleteConfirmField", "deleteType", "idField", "canEdit", "canDelete"], outputs: ["onCreate", "onLazyLoad", "onSearch"] }, { kind: "directive", type: BaseListTemplateDirective, selector: "ng-template[baseListTemplate]", inputs: ["baseListTemplate"] }, { kind: "
|
|
2829
|
+
`, isInline: true, dependencies: [{ kind: "component", type: BaseListComponent, selector: "lib-base-list", inputs: ["columns", "actions", "title", "showCreateButton", "searchable", "pageSize", "scrollHeight", "emptyMessage", "createButtonLabel", "createButtonIcon", "data", "total", "isLoading", "service", "filter", "createRoute", "editRoute", "deleteConfirmField", "deleteType", "idField", "canEdit", "canDelete"], outputs: ["onCreate", "onLazyLoad", "onSearch"] }, { kind: "directive", type: BaseListTemplateDirective, selector: "ng-template[baseListTemplate]", inputs: ["baseListTemplate"] }, { kind: "component", type: TagComponent, selector: "f-tag", inputs: ["value", "severity", "icon", "rounded", "color", "styleClass", "style"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] });
|
|
2680
2830
|
}
|
|
2681
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
2831
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: CompanyListComponent, decorators: [{
|
|
2682
2832
|
type: Component,
|
|
2683
2833
|
args: [{
|
|
2684
2834
|
selector: 'lib-company-list',
|
|
2685
2835
|
imports: [
|
|
2686
2836
|
BaseListComponent,
|
|
2687
2837
|
BaseListTemplateDirective,
|
|
2688
|
-
|
|
2838
|
+
TagComponent,
|
|
2689
2839
|
TranslatePipe,
|
|
2690
2840
|
],
|
|
2691
2841
|
template: `
|
|
@@ -2751,7 +2901,8 @@ class ForgotPasswordPageComponent {
|
|
|
2751
2901
|
});
|
|
2752
2902
|
isFormValid = computed(() => this.forgotForm().valid(), /* @ts-ignore */
|
|
2753
2903
|
...(ngDevMode ? [{ debugName: "isFormValid" }] : /* istanbul ignore next */ []));
|
|
2754
|
-
onSubmit() {
|
|
2904
|
+
onSubmit(event) {
|
|
2905
|
+
event.preventDefault();
|
|
2755
2906
|
if (!this.isFormValid()) {
|
|
2756
2907
|
this.messageService.add({
|
|
2757
2908
|
severity: 'error',
|
|
@@ -2779,8 +2930,8 @@ class ForgotPasswordPageComponent {
|
|
|
2779
2930
|
this.submittedEmail.set('');
|
|
2780
2931
|
this.formModel.set({ email: '' });
|
|
2781
2932
|
}
|
|
2782
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
2783
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.
|
|
2933
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: ForgotPasswordPageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2934
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: ForgotPasswordPageComponent, isStandalone: true, selector: "lib-forgot-password-page", ngImport: i0, template: `
|
|
2784
2935
|
<app-floating-configurator />
|
|
2785
2936
|
<div
|
|
2786
2937
|
class="bg-surface-ground flex items-center justify-center min-h-screen"
|
|
@@ -2806,7 +2957,7 @@ class ForgotPasswordPageComponent {
|
|
|
2806
2957
|
</span>
|
|
2807
2958
|
</div>
|
|
2808
2959
|
|
|
2809
|
-
<form (
|
|
2960
|
+
<form (submit)="onSubmit($event)">
|
|
2810
2961
|
<label
|
|
2811
2962
|
for="email"
|
|
2812
2963
|
class="block text-lg font-medium mb-2 text-color"
|
|
@@ -2882,15 +3033,17 @@ class ForgotPasswordPageComponent {
|
|
|
2882
3033
|
</div>
|
|
2883
3034
|
</div>
|
|
2884
3035
|
</div>
|
|
2885
|
-
`, isInline: true, dependencies: [{ kind: "
|
|
3036
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "routerLink"] }, { kind: "directive", type: FButtonDirective, selector: "[fButton]", inputs: ["severity", "text", "outlined", "link", "variant", "rounded", "raised", "fluid", "disabled", "loading", "loadingIcon", "size", "label", "icon", "iconPos", "ariaLabel", "plain"] }, { kind: "directive", type: InputTextDirective, selector: "[fInputText]", inputs: ["invalid", "touched", "variant", "size", "fluid"] }, { kind: "component", type: UiIconComponent, selector: "ui-icon", inputs: ["name", "size", "spin", "fill", "severity"] }, { kind: "directive", type: FormField, selector: "[formField]", inputs: ["formField"], exportAs: ["formField"] }, { kind: "component", type: AppFloatingConfigurator, selector: "app-floating-configurator" }, { kind: "pipe", type: TranslatePipe, name: "translate" }] });
|
|
2886
3037
|
}
|
|
2887
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
3038
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: ForgotPasswordPageComponent, decorators: [{
|
|
2888
3039
|
type: Component,
|
|
2889
3040
|
args: [{
|
|
2890
3041
|
selector: 'lib-forgot-password-page',
|
|
2891
3042
|
imports: [
|
|
2892
|
-
|
|
2893
|
-
|
|
3043
|
+
RouterLink,
|
|
3044
|
+
FButtonDirective,
|
|
3045
|
+
InputTextDirective,
|
|
3046
|
+
UiIconComponent,
|
|
2894
3047
|
FormField,
|
|
2895
3048
|
AppFloatingConfigurator,
|
|
2896
3049
|
TranslatePipe,
|
|
@@ -2921,7 +3074,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
2921
3074
|
</span>
|
|
2922
3075
|
</div>
|
|
2923
3076
|
|
|
2924
|
-
<form (
|
|
3077
|
+
<form (submit)="onSubmit($event)">
|
|
2925
3078
|
<label
|
|
2926
3079
|
for="email"
|
|
2927
3080
|
class="block text-lg font-medium mb-2 text-color"
|
|
@@ -3006,6 +3159,240 @@ var forgotPasswordPage_component = /*#__PURE__*/Object.freeze({
|
|
|
3006
3159
|
ForgotPasswordPageComponent: ForgotPasswordPageComponent
|
|
3007
3160
|
});
|
|
3008
3161
|
|
|
3162
|
+
class SocialLoginButtonsComponent {
|
|
3163
|
+
destroyRef = inject(DestroyRef);
|
|
3164
|
+
socialApi = inject(SocialAuthApiService);
|
|
3165
|
+
messageService = inject(MessageService);
|
|
3166
|
+
platform = inject(PlatformService);
|
|
3167
|
+
document = inject(DOCUMENT);
|
|
3168
|
+
translateAdapter = inject(TranslateService, {
|
|
3169
|
+
optional: true,
|
|
3170
|
+
});
|
|
3171
|
+
returnUrl = input('', /* @ts-ignore */
|
|
3172
|
+
...(ngDevMode ? [{ debugName: "returnUrl" }] : /* istanbul ignore next */ []));
|
|
3173
|
+
providerEnum = SocialProviderEnum;
|
|
3174
|
+
_providers = signal([], /* @ts-ignore */
|
|
3175
|
+
...(ngDevMode ? [{ debugName: "_providers" }] : /* istanbul ignore next */ []));
|
|
3176
|
+
providers = this._providers.asReadonly();
|
|
3177
|
+
_pendingProvider = signal(null, /* @ts-ignore */
|
|
3178
|
+
...(ngDevMode ? [{ debugName: "_pendingProvider" }] : /* istanbul ignore next */ []));
|
|
3179
|
+
pendingProvider = this._pendingProvider.asReadonly();
|
|
3180
|
+
showLabels = computed(() => this.providers().length <= 2, /* @ts-ignore */
|
|
3181
|
+
...(ngDevMode ? [{ debugName: "showLabels" }] : /* istanbul ignore next */ []));
|
|
3182
|
+
layoutClass = computed(() => {
|
|
3183
|
+
switch (this.providers().length) {
|
|
3184
|
+
case 1:
|
|
3185
|
+
return 'grid grid-cols-1';
|
|
3186
|
+
case 2:
|
|
3187
|
+
return 'grid grid-cols-2 gap-3';
|
|
3188
|
+
default:
|
|
3189
|
+
return 'flex flex-wrap justify-center gap-3';
|
|
3190
|
+
}
|
|
3191
|
+
}, /* @ts-ignore */
|
|
3192
|
+
...(ngDevMode ? [{ debugName: "layoutClass" }] : /* istanbul ignore next */ []));
|
|
3193
|
+
constructor() {
|
|
3194
|
+
if (this.platform.isServer)
|
|
3195
|
+
return;
|
|
3196
|
+
this.socialApi
|
|
3197
|
+
.getProviders()
|
|
3198
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
3199
|
+
.subscribe({
|
|
3200
|
+
next: (response) => this._providers.set(response.data ?? []),
|
|
3201
|
+
error: () => this._providers.set([]),
|
|
3202
|
+
});
|
|
3203
|
+
}
|
|
3204
|
+
onSelect(provider) {
|
|
3205
|
+
this._pendingProvider.set(provider);
|
|
3206
|
+
this.socialApi.saveReturnUrl(this.returnUrl());
|
|
3207
|
+
this.socialApi
|
|
3208
|
+
.authorize(provider)
|
|
3209
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
3210
|
+
.subscribe({
|
|
3211
|
+
next: (response) => {
|
|
3212
|
+
const url = response.data?.authorizationUrl;
|
|
3213
|
+
if (!url) {
|
|
3214
|
+
this._pendingProvider.set(null);
|
|
3215
|
+
return;
|
|
3216
|
+
}
|
|
3217
|
+
this.redirectTo(url);
|
|
3218
|
+
},
|
|
3219
|
+
error: (error) => {
|
|
3220
|
+
this._pendingProvider.set(null);
|
|
3221
|
+
const messageKey = error?.error?.messageKey;
|
|
3222
|
+
this.messageService.add({
|
|
3223
|
+
severity: 'error',
|
|
3224
|
+
summary: this.translate('auth.login.title'),
|
|
3225
|
+
detail: messageKey
|
|
3226
|
+
? this.translate(messageKey, { provider })
|
|
3227
|
+
: error?.error?.message,
|
|
3228
|
+
});
|
|
3229
|
+
},
|
|
3230
|
+
});
|
|
3231
|
+
}
|
|
3232
|
+
redirectTo(url) {
|
|
3233
|
+
this.document.location.assign(url);
|
|
3234
|
+
}
|
|
3235
|
+
translate(key, vars) {
|
|
3236
|
+
return this.translateAdapter?.translate(key, vars) ?? key;
|
|
3237
|
+
}
|
|
3238
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: SocialLoginButtonsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3239
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: SocialLoginButtonsComponent, isStandalone: true, selector: "lib-social-login-buttons", inputs: { returnUrl: { classPropertyName: "returnUrl", publicName: "returnUrl", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
3240
|
+
@if (providers().length) {
|
|
3241
|
+
<div class="mt-6">
|
|
3242
|
+
<div class="flex items-center gap-3 mb-4">
|
|
3243
|
+
<span class="flex-1 h-px bg-surface-200 dark:bg-surface-700"></span>
|
|
3244
|
+
<span class="text-muted-color text-sm">{{
|
|
3245
|
+
'auth.social.continue.with' | translate
|
|
3246
|
+
}}</span>
|
|
3247
|
+
<span class="flex-1 h-px bg-surface-200 dark:bg-surface-700"></span>
|
|
3248
|
+
</div>
|
|
3249
|
+
|
|
3250
|
+
<div [class]="layoutClass()">
|
|
3251
|
+
@for (info of providers(); track info.provider) {
|
|
3252
|
+
<button
|
|
3253
|
+
fButton
|
|
3254
|
+
type="button"
|
|
3255
|
+
severity="secondary"
|
|
3256
|
+
[outlined]="true"
|
|
3257
|
+
[class]="showLabels() ? 'w-full' : 'shrink-0'"
|
|
3258
|
+
[attr.aria-label]="
|
|
3259
|
+
showLabels()
|
|
3260
|
+
? null
|
|
3261
|
+
: ('auth.social.provider.' + info.provider | translate)
|
|
3262
|
+
"
|
|
3263
|
+
[attr.title]="
|
|
3264
|
+
showLabels()
|
|
3265
|
+
? null
|
|
3266
|
+
: ('auth.social.provider.' + info.provider | translate)
|
|
3267
|
+
"
|
|
3268
|
+
[disabled]="pendingProvider() !== null && pendingProvider() !== info.provider"
|
|
3269
|
+
[loading]="pendingProvider() === info.provider"
|
|
3270
|
+
(click)="onSelect(info.provider)"
|
|
3271
|
+
>
|
|
3272
|
+
@if (pendingProvider() !== info.provider) {
|
|
3273
|
+
@switch (info.provider) {
|
|
3274
|
+
@case (providerEnum.GOOGLE) {
|
|
3275
|
+
<svg class="shrink-0" width="18" height="18" viewBox="0 0 48 48" aria-hidden="true">
|
|
3276
|
+
<path fill="#EA4335" d="M24 9.5c3.54 0 6.71 1.22 9.21 3.6l6.85-6.85C35.9 2.38 30.47 0 24 0 14.62 0 6.51 5.38 2.56 13.22l7.98 6.19C12.43 13.72 17.74 9.5 24 9.5z" />
|
|
3277
|
+
<path fill="#4285F4" d="M46.98 24.55c0-1.57-.15-3.09-.38-4.55H24v9.02h12.94c-.58 3-2.26 5.54-4.78 7.25l7.73 6c4.51-4.18 7.09-10.36 7.09-17.72z" />
|
|
3278
|
+
<path fill="#FBBC05" d="M10.53 28.59A14.5 14.5 0 0 1 9.77 24c0-1.6.29-3.14.76-4.59l-7.98-6.19A23.94 23.94 0 0 0 0 24c0 3.88.93 7.54 2.56 10.78l7.97-6.19z" />
|
|
3279
|
+
<path fill="#34A853" d="M24 48c6.48 0 11.93-2.13 15.89-5.81l-7.73-6c-2.15 1.45-4.92 2.3-8.16 2.3-6.26 0-11.57-4.22-13.47-9.91l-7.98 6.19C6.51 42.62 14.62 48 24 48z" />
|
|
3280
|
+
</svg>
|
|
3281
|
+
}
|
|
3282
|
+
@case (providerEnum.FACEBOOK) {
|
|
3283
|
+
<svg class="shrink-0" width="18" height="18" viewBox="0 0 24 24" aria-hidden="true">
|
|
3284
|
+
<path fill="#1877F2" d="M24 12.07C24 5.4 18.63 0 12 0S0 5.4 0 12.07C0 18.1 4.39 23.1 10.13 24v-8.44H7.08v-3.49h3.05V9.41c0-3.02 1.79-4.69 4.53-4.69 1.31 0 2.69.24 2.69.24v2.96h-1.51c-1.49 0-1.96.93-1.96 1.88v2.25h3.33l-.53 3.49h-2.8V24C19.61 23.1 24 18.1 24 12.07z" />
|
|
3285
|
+
</svg>
|
|
3286
|
+
}
|
|
3287
|
+
@case (providerEnum.LINKEDIN) {
|
|
3288
|
+
<svg class="shrink-0" width="18" height="18" viewBox="0 0 24 24" aria-hidden="true">
|
|
3289
|
+
<path fill="#0A66C2" d="M20.45 20.45h-3.56v-5.57c0-1.33-.03-3.04-1.85-3.04-1.86 0-2.14 1.45-2.14 2.94v5.67H9.35V9h3.41v1.56h.05a3.74 3.74 0 0 1 3.37-1.85c3.6 0 4.27 2.37 4.27 5.46v6.28zM5.34 7.43a2.06 2.06 0 1 1 0-4.13 2.06 2.06 0 0 1 0 4.13zM7.12 20.45H3.55V9h3.57v11.45zM22.22 0H1.77C.79 0 0 .78 0 1.73v20.54C0 23.22.79 24 1.77 24h20.45c.98 0 1.78-.78 1.78-1.73V1.73C24 .78 23.2 0 22.22 0z" />
|
|
3290
|
+
</svg>
|
|
3291
|
+
}
|
|
3292
|
+
@case (providerEnum.MICROSOFT) {
|
|
3293
|
+
<svg class="shrink-0" width="18" height="18" viewBox="0 0 23 23" aria-hidden="true">
|
|
3294
|
+
<path fill="#F25022" d="M0 0h11v11H0z" />
|
|
3295
|
+
<path fill="#7FBA00" d="M12 0h11v11H12z" />
|
|
3296
|
+
<path fill="#00A4EF" d="M0 12h11v11H0z" />
|
|
3297
|
+
<path fill="#FFB900" d="M12 12h11v11H12z" />
|
|
3298
|
+
</svg>
|
|
3299
|
+
}
|
|
3300
|
+
}
|
|
3301
|
+
}
|
|
3302
|
+
@if (showLabels()) {
|
|
3303
|
+
<span>{{
|
|
3304
|
+
'auth.social.provider.' + info.provider | translate
|
|
3305
|
+
}}</span>
|
|
3306
|
+
}
|
|
3307
|
+
</button>
|
|
3308
|
+
}
|
|
3309
|
+
</div>
|
|
3310
|
+
</div>
|
|
3311
|
+
}
|
|
3312
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: FButtonDirective, selector: "[fButton]", inputs: ["severity", "text", "outlined", "link", "variant", "rounded", "raised", "fluid", "disabled", "loading", "loadingIcon", "size", "label", "icon", "iconPos", "ariaLabel", "plain"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] });
|
|
3313
|
+
}
|
|
3314
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: SocialLoginButtonsComponent, decorators: [{
|
|
3315
|
+
type: Component,
|
|
3316
|
+
args: [{
|
|
3317
|
+
selector: 'lib-social-login-buttons',
|
|
3318
|
+
imports: [FButtonDirective, TranslatePipe],
|
|
3319
|
+
template: `
|
|
3320
|
+
@if (providers().length) {
|
|
3321
|
+
<div class="mt-6">
|
|
3322
|
+
<div class="flex items-center gap-3 mb-4">
|
|
3323
|
+
<span class="flex-1 h-px bg-surface-200 dark:bg-surface-700"></span>
|
|
3324
|
+
<span class="text-muted-color text-sm">{{
|
|
3325
|
+
'auth.social.continue.with' | translate
|
|
3326
|
+
}}</span>
|
|
3327
|
+
<span class="flex-1 h-px bg-surface-200 dark:bg-surface-700"></span>
|
|
3328
|
+
</div>
|
|
3329
|
+
|
|
3330
|
+
<div [class]="layoutClass()">
|
|
3331
|
+
@for (info of providers(); track info.provider) {
|
|
3332
|
+
<button
|
|
3333
|
+
fButton
|
|
3334
|
+
type="button"
|
|
3335
|
+
severity="secondary"
|
|
3336
|
+
[outlined]="true"
|
|
3337
|
+
[class]="showLabels() ? 'w-full' : 'shrink-0'"
|
|
3338
|
+
[attr.aria-label]="
|
|
3339
|
+
showLabels()
|
|
3340
|
+
? null
|
|
3341
|
+
: ('auth.social.provider.' + info.provider | translate)
|
|
3342
|
+
"
|
|
3343
|
+
[attr.title]="
|
|
3344
|
+
showLabels()
|
|
3345
|
+
? null
|
|
3346
|
+
: ('auth.social.provider.' + info.provider | translate)
|
|
3347
|
+
"
|
|
3348
|
+
[disabled]="pendingProvider() !== null && pendingProvider() !== info.provider"
|
|
3349
|
+
[loading]="pendingProvider() === info.provider"
|
|
3350
|
+
(click)="onSelect(info.provider)"
|
|
3351
|
+
>
|
|
3352
|
+
@if (pendingProvider() !== info.provider) {
|
|
3353
|
+
@switch (info.provider) {
|
|
3354
|
+
@case (providerEnum.GOOGLE) {
|
|
3355
|
+
<svg class="shrink-0" width="18" height="18" viewBox="0 0 48 48" aria-hidden="true">
|
|
3356
|
+
<path fill="#EA4335" d="M24 9.5c3.54 0 6.71 1.22 9.21 3.6l6.85-6.85C35.9 2.38 30.47 0 24 0 14.62 0 6.51 5.38 2.56 13.22l7.98 6.19C12.43 13.72 17.74 9.5 24 9.5z" />
|
|
3357
|
+
<path fill="#4285F4" d="M46.98 24.55c0-1.57-.15-3.09-.38-4.55H24v9.02h12.94c-.58 3-2.26 5.54-4.78 7.25l7.73 6c4.51-4.18 7.09-10.36 7.09-17.72z" />
|
|
3358
|
+
<path fill="#FBBC05" d="M10.53 28.59A14.5 14.5 0 0 1 9.77 24c0-1.6.29-3.14.76-4.59l-7.98-6.19A23.94 23.94 0 0 0 0 24c0 3.88.93 7.54 2.56 10.78l7.97-6.19z" />
|
|
3359
|
+
<path fill="#34A853" d="M24 48c6.48 0 11.93-2.13 15.89-5.81l-7.73-6c-2.15 1.45-4.92 2.3-8.16 2.3-6.26 0-11.57-4.22-13.47-9.91l-7.98 6.19C6.51 42.62 14.62 48 24 48z" />
|
|
3360
|
+
</svg>
|
|
3361
|
+
}
|
|
3362
|
+
@case (providerEnum.FACEBOOK) {
|
|
3363
|
+
<svg class="shrink-0" width="18" height="18" viewBox="0 0 24 24" aria-hidden="true">
|
|
3364
|
+
<path fill="#1877F2" d="M24 12.07C24 5.4 18.63 0 12 0S0 5.4 0 12.07C0 18.1 4.39 23.1 10.13 24v-8.44H7.08v-3.49h3.05V9.41c0-3.02 1.79-4.69 4.53-4.69 1.31 0 2.69.24 2.69.24v2.96h-1.51c-1.49 0-1.96.93-1.96 1.88v2.25h3.33l-.53 3.49h-2.8V24C19.61 23.1 24 18.1 24 12.07z" />
|
|
3365
|
+
</svg>
|
|
3366
|
+
}
|
|
3367
|
+
@case (providerEnum.LINKEDIN) {
|
|
3368
|
+
<svg class="shrink-0" width="18" height="18" viewBox="0 0 24 24" aria-hidden="true">
|
|
3369
|
+
<path fill="#0A66C2" d="M20.45 20.45h-3.56v-5.57c0-1.33-.03-3.04-1.85-3.04-1.86 0-2.14 1.45-2.14 2.94v5.67H9.35V9h3.41v1.56h.05a3.74 3.74 0 0 1 3.37-1.85c3.6 0 4.27 2.37 4.27 5.46v6.28zM5.34 7.43a2.06 2.06 0 1 1 0-4.13 2.06 2.06 0 0 1 0 4.13zM7.12 20.45H3.55V9h3.57v11.45zM22.22 0H1.77C.79 0 0 .78 0 1.73v20.54C0 23.22.79 24 1.77 24h20.45c.98 0 1.78-.78 1.78-1.73V1.73C24 .78 23.2 0 22.22 0z" />
|
|
3370
|
+
</svg>
|
|
3371
|
+
}
|
|
3372
|
+
@case (providerEnum.MICROSOFT) {
|
|
3373
|
+
<svg class="shrink-0" width="18" height="18" viewBox="0 0 23 23" aria-hidden="true">
|
|
3374
|
+
<path fill="#F25022" d="M0 0h11v11H0z" />
|
|
3375
|
+
<path fill="#7FBA00" d="M12 0h11v11H12z" />
|
|
3376
|
+
<path fill="#00A4EF" d="M0 12h11v11H0z" />
|
|
3377
|
+
<path fill="#FFB900" d="M12 12h11v11H12z" />
|
|
3378
|
+
</svg>
|
|
3379
|
+
}
|
|
3380
|
+
}
|
|
3381
|
+
}
|
|
3382
|
+
@if (showLabels()) {
|
|
3383
|
+
<span>{{
|
|
3384
|
+
'auth.social.provider.' + info.provider | translate
|
|
3385
|
+
}}</span>
|
|
3386
|
+
}
|
|
3387
|
+
</button>
|
|
3388
|
+
}
|
|
3389
|
+
</div>
|
|
3390
|
+
</div>
|
|
3391
|
+
}
|
|
3392
|
+
`,
|
|
3393
|
+
}]
|
|
3394
|
+
}], ctorParameters: () => [], propDecorators: { returnUrl: [{ type: i0.Input, args: [{ isSignal: true, alias: "returnUrl", required: false }] }] } });
|
|
3395
|
+
|
|
3009
3396
|
class LoginPageComponent {
|
|
3010
3397
|
destroyRef = inject(DestroyRef);
|
|
3011
3398
|
appConfig = inject(APP_CONFIG);
|
|
@@ -3031,6 +3418,8 @@ class LoginPageComponent {
|
|
|
3031
3418
|
...(ngDevMode ? [{ debugName: "unverifiedEmail" }] : /* istanbul ignore next */ []));
|
|
3032
3419
|
savedUserName = signal(this.authState.getSavedUserName(), /* @ts-ignore */
|
|
3033
3420
|
...(ngDevMode ? [{ debugName: "savedUserName" }] : /* istanbul ignore next */ []));
|
|
3421
|
+
welcomeBackText = computed(() => this.translate('auth.login.welcome.back', { name: this.savedUserName() }), /* @ts-ignore */
|
|
3422
|
+
...(ngDevMode ? [{ debugName: "welcomeBackText" }] : /* istanbul ignore next */ []));
|
|
3034
3423
|
loginFormModel = signal({
|
|
3035
3424
|
email: '',
|
|
3036
3425
|
password: '',
|
|
@@ -3136,7 +3525,8 @@ class LoginPageComponent {
|
|
|
3136
3525
|
this.autoSelectIfSingle();
|
|
3137
3526
|
}
|
|
3138
3527
|
}
|
|
3139
|
-
onSubmit() {
|
|
3528
|
+
onSubmit(event) {
|
|
3529
|
+
event.preventDefault();
|
|
3140
3530
|
if (!this.isLoginFormValid()) {
|
|
3141
3531
|
this.messageService.add({
|
|
3142
3532
|
severity: 'error',
|
|
@@ -3215,7 +3605,8 @@ class LoginPageComponent {
|
|
|
3215
3605
|
}));
|
|
3216
3606
|
}
|
|
3217
3607
|
}
|
|
3218
|
-
onSelectCompany() {
|
|
3608
|
+
onSelectCompany(event) {
|
|
3609
|
+
event.preventDefault();
|
|
3219
3610
|
if (!this.isSelectionFormValid()) {
|
|
3220
3611
|
this.messageService.add({
|
|
3221
3612
|
severity: 'warn',
|
|
@@ -3328,8 +3719,8 @@ class LoginPageComponent {
|
|
|
3328
3719
|
}
|
|
3329
3720
|
}
|
|
3330
3721
|
}
|
|
3331
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
3332
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.
|
|
3722
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: LoginPageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3723
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: LoginPageComponent, isStandalone: true, selector: "lib-login-page", inputs: { returnUrl: { classPropertyName: "returnUrl", publicName: "returnUrl", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
3333
3724
|
<app-floating-configurator />
|
|
3334
3725
|
<div
|
|
3335
3726
|
class="bg-surface-ground flex items-center justify-center min-h-screen"
|
|
@@ -3381,12 +3772,12 @@ class LoginPageComponent {
|
|
|
3381
3772
|
<!-- Step 1: Credentials -->
|
|
3382
3773
|
@if (currentStep() === 'credentials') {
|
|
3383
3774
|
<div class="text-center mb-8">
|
|
3384
|
-
<div
|
|
3775
|
+
<div
|
|
3776
|
+
class="text-3xl font-medium mb-4 text-color truncate"
|
|
3777
|
+
[title]="savedUserName() ? welcomeBackText() : null"
|
|
3778
|
+
>
|
|
3385
3779
|
@if (savedUserName()) {
|
|
3386
|
-
{{
|
|
3387
|
-
'auth.login.welcome.back'
|
|
3388
|
-
| translate: { name: savedUserName()! }
|
|
3389
|
-
}}
|
|
3780
|
+
{{ welcomeBackText() }}
|
|
3390
3781
|
} @else {
|
|
3391
3782
|
{{ 'auth.login.welcome' | translate }}
|
|
3392
3783
|
}
|
|
@@ -3396,7 +3787,7 @@ class LoginPageComponent {
|
|
|
3396
3787
|
}}</span>
|
|
3397
3788
|
</div>
|
|
3398
3789
|
|
|
3399
|
-
<form (
|
|
3790
|
+
<form (submit)="onSubmit($event)">
|
|
3400
3791
|
<label
|
|
3401
3792
|
for="email"
|
|
3402
3793
|
class="block text-lg font-medium mb-2 text-color"
|
|
@@ -3467,6 +3858,8 @@ class LoginPageComponent {
|
|
|
3467
3858
|
<span pButtonLabel>{{ 'auth.login.sign.in' | translate }}</span>
|
|
3468
3859
|
</button>
|
|
3469
3860
|
|
|
3861
|
+
<lib-social-login-buttons [returnUrl]="returnUrl()" />
|
|
3862
|
+
|
|
3470
3863
|
@if (signUpEnabled()) {
|
|
3471
3864
|
<div class="flex items-center justify-center mt-4 gap-2">
|
|
3472
3865
|
<span class="font-medium">{{
|
|
@@ -3528,7 +3921,7 @@ class LoginPageComponent {
|
|
|
3528
3921
|
</div>
|
|
3529
3922
|
</div>
|
|
3530
3923
|
|
|
3531
|
-
<form (
|
|
3924
|
+
<form (submit)="onSelectCompany($event)">
|
|
3532
3925
|
<label
|
|
3533
3926
|
for="company"
|
|
3534
3927
|
class="block text-lg font-medium mb-2 text-color"
|
|
@@ -3598,16 +3991,25 @@ class LoginPageComponent {
|
|
|
3598
3991
|
</div>
|
|
3599
3992
|
</div>
|
|
3600
3993
|
</div>
|
|
3601
|
-
`, isInline: true, dependencies: [{ kind: "
|
|
3994
|
+
`, isInline: true, dependencies: [{ kind: "component", type: CheckboxComponent, selector: "f-checkbox", inputs: ["label", "binary", "disabled", "readonly", "inputId", "invalid", "indeterminate", "variant", "size", "touched", "styleClass", "style", "checked"], outputs: ["onChange", "onBlur", "touch", "checkedChange"] }, { kind: "directive", type: FButtonDirective, selector: "[fButton]", inputs: ["severity", "text", "outlined", "link", "variant", "rounded", "raised", "fluid", "disabled", "loading", "loadingIcon", "size", "label", "icon", "iconPos", "ariaLabel", "plain"] }, { kind: "directive", type: InputTextDirective, selector: "[fInputText]", inputs: ["invalid", "touched", "variant", "size", "fluid"] }, { kind: "component", type: PasswordComponent, selector: "f-password", inputs: ["toggleMask", "feedback", "disabled", "placeholder", "inputId", "invalid", "touched", "inputStyleClass", "styleClass", "style", "ariaDescribedby", "autocomplete", "variant", "size", "fluid", "appendTo", "promptLabel", "weakLabel", "mediumLabel", "strongLabel", "mediumRegex", "strongRegex"], outputs: ["onBlur", "onFocus"] }, { kind: "component", type: SelectComponent, selector: "f-select", inputs: ["options", "optionLabel", "optionValue", "placeholder", "disabled", "filter", "filterBy", "filterMatchMode", "filterLocale", "filterPlaceholder", "resetFilterOnHide", "autofocusFilter", "emptyMessage", "emptyFilterMessage", "showClear", "loading", "loadingIcon", "dropdownIcon", "clearIcon", "inputId", "invalid", "touched", "styleClass", "style", "appendTo", "editable", "readonly", "autofocus", "checkmark", "group", "optionGroupLabel", "optionGroupChildren", "virtualScroll", "virtualScrollItemSize", "lazy"], outputs: ["onFilter", "onChange", "onShow", "onHide", "onBlur", "onFocus", "onClear", "onLazyLoad"] }, { kind: "component", type: UiIconComponent, selector: "ui-icon", inputs: ["name", "size", "spin", "fill", "severity"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "routerLink"] }, { kind: "directive", type: FormField, selector: "[formField]", inputs: ["formField"], exportAs: ["formField"] }, { kind: "component", type: AppFloatingConfigurator, selector: "app-floating-configurator" }, { kind: "component", type: SocialLoginButtonsComponent, selector: "lib-social-login-buttons", inputs: ["returnUrl"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] });
|
|
3602
3995
|
}
|
|
3603
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
3996
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: LoginPageComponent, decorators: [{
|
|
3604
3997
|
type: Component,
|
|
3605
3998
|
args: [{
|
|
3606
3999
|
selector: 'lib-login-page',
|
|
3607
|
-
imports: [
|
|
4000
|
+
imports: [
|
|
4001
|
+
CheckboxComponent,
|
|
4002
|
+
FButtonDirective,
|
|
4003
|
+
InputTextDirective,
|
|
4004
|
+
PasswordComponent,
|
|
4005
|
+
SelectComponent,
|
|
4006
|
+
UiIconComponent,
|
|
4007
|
+
RouterLink,
|
|
3608
4008
|
FormField,
|
|
3609
4009
|
AppFloatingConfigurator,
|
|
3610
|
-
|
|
4010
|
+
SocialLoginButtonsComponent,
|
|
4011
|
+
TranslatePipe,
|
|
4012
|
+
],
|
|
3611
4013
|
template: `
|
|
3612
4014
|
<app-floating-configurator />
|
|
3613
4015
|
<div
|
|
@@ -3660,12 +4062,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
3660
4062
|
<!-- Step 1: Credentials -->
|
|
3661
4063
|
@if (currentStep() === 'credentials') {
|
|
3662
4064
|
<div class="text-center mb-8">
|
|
3663
|
-
<div
|
|
4065
|
+
<div
|
|
4066
|
+
class="text-3xl font-medium mb-4 text-color truncate"
|
|
4067
|
+
[title]="savedUserName() ? welcomeBackText() : null"
|
|
4068
|
+
>
|
|
3664
4069
|
@if (savedUserName()) {
|
|
3665
|
-
{{
|
|
3666
|
-
'auth.login.welcome.back'
|
|
3667
|
-
| translate: { name: savedUserName()! }
|
|
3668
|
-
}}
|
|
4070
|
+
{{ welcomeBackText() }}
|
|
3669
4071
|
} @else {
|
|
3670
4072
|
{{ 'auth.login.welcome' | translate }}
|
|
3671
4073
|
}
|
|
@@ -3675,7 +4077,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
3675
4077
|
}}</span>
|
|
3676
4078
|
</div>
|
|
3677
4079
|
|
|
3678
|
-
<form (
|
|
4080
|
+
<form (submit)="onSubmit($event)">
|
|
3679
4081
|
<label
|
|
3680
4082
|
for="email"
|
|
3681
4083
|
class="block text-lg font-medium mb-2 text-color"
|
|
@@ -3746,6 +4148,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
3746
4148
|
<span pButtonLabel>{{ 'auth.login.sign.in' | translate }}</span>
|
|
3747
4149
|
</button>
|
|
3748
4150
|
|
|
4151
|
+
<lib-social-login-buttons [returnUrl]="returnUrl()" />
|
|
4152
|
+
|
|
3749
4153
|
@if (signUpEnabled()) {
|
|
3750
4154
|
<div class="flex items-center justify-center mt-4 gap-2">
|
|
3751
4155
|
<span class="font-medium">{{
|
|
@@ -3807,7 +4211,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
3807
4211
|
</div>
|
|
3808
4212
|
</div>
|
|
3809
4213
|
|
|
3810
|
-
<form (
|
|
4214
|
+
<form (submit)="onSelectCompany($event)">
|
|
3811
4215
|
<label
|
|
3812
4216
|
for="company"
|
|
3813
4217
|
class="block text-lg font-medium mb-2 text-color"
|
|
@@ -4085,6 +4489,14 @@ class ProfilePageComponent {
|
|
|
4085
4489
|
confirmPassword: '',
|
|
4086
4490
|
}, /* @ts-ignore */
|
|
4087
4491
|
...(ngDevMode ? [{ debugName: "passwordModel" }] : /* istanbul ignore next */ []));
|
|
4492
|
+
passwordForm = form(this.passwordModel, (f) => {
|
|
4493
|
+
required(f.currentPassword, {
|
|
4494
|
+
message: this.translate('profile.current.password.required'),
|
|
4495
|
+
});
|
|
4496
|
+
required(f.newPassword, {
|
|
4497
|
+
message: this.translate('profile.new.password.required'),
|
|
4498
|
+
});
|
|
4499
|
+
});
|
|
4088
4500
|
isPasswordLoading = signal(false, /* @ts-ignore */
|
|
4089
4501
|
...(ngDevMode ? [{ debugName: "isPasswordLoading" }] : /* istanbul ignore next */ []));
|
|
4090
4502
|
isPasswordFormValid = computed(() => {
|
|
@@ -4317,8 +4729,8 @@ class ProfilePageComponent {
|
|
|
4317
4729
|
error: () => { },
|
|
4318
4730
|
});
|
|
4319
4731
|
}
|
|
4320
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
4321
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.
|
|
4732
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: ProfilePageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4733
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: ProfilePageComponent, isStandalone: true, selector: "lib-profile-page", ngImport: i0, template: `
|
|
4322
4734
|
<div class="mb-4 md:mb-6">
|
|
4323
4735
|
<h1 class="text-2xl font-bold text-color mb-2">
|
|
4324
4736
|
{{ 'profile.title' | translate }}
|
|
@@ -4431,10 +4843,8 @@ class ProfilePageComponent {
|
|
|
4431
4843
|
</label>
|
|
4432
4844
|
@if (field.component) {
|
|
4433
4845
|
<ng-container
|
|
4434
|
-
|
|
4435
|
-
|
|
4436
|
-
injector: getFieldInjector(field)
|
|
4437
|
-
"
|
|
4846
|
+
[ngComponentOutlet]="field.component"
|
|
4847
|
+
[ngComponentOutletInjector]="getFieldInjector(field)"
|
|
4438
4848
|
/>
|
|
4439
4849
|
} @else if (field.template) {
|
|
4440
4850
|
<ng-container
|
|
@@ -4649,9 +5059,7 @@ class ProfilePageComponent {
|
|
|
4649
5059
|
>
|
|
4650
5060
|
<f-password
|
|
4651
5061
|
[inputId]="'currentPassword'"
|
|
4652
|
-
|
|
4653
|
-
[ngModel]="passwordModel().currentPassword"
|
|
4654
|
-
(ngModelChange)="updatePasswordField('currentPassword', $event)"
|
|
5062
|
+
[formField]="passwordForm.currentPassword"
|
|
4655
5063
|
[placeholder]="'profile.current.password.placeholder' | translate"
|
|
4656
5064
|
class="w-full"
|
|
4657
5065
|
autocomplete="current-password"
|
|
@@ -4664,9 +5072,7 @@ class ProfilePageComponent {
|
|
|
4664
5072
|
>
|
|
4665
5073
|
<f-password
|
|
4666
5074
|
[inputId]="'newPassword'"
|
|
4667
|
-
|
|
4668
|
-
[ngModel]="passwordModel().newPassword"
|
|
4669
|
-
(ngModelChange)="updatePasswordField('newPassword', $event)"
|
|
5075
|
+
[formField]="passwordForm.newPassword"
|
|
4670
5076
|
[placeholder]="'shared.min.characters' | translate: { count: 6 }"
|
|
4671
5077
|
class="w-full"
|
|
4672
5078
|
autocomplete="new-password"
|
|
@@ -4679,9 +5085,7 @@ class ProfilePageComponent {
|
|
|
4679
5085
|
>
|
|
4680
5086
|
<f-password
|
|
4681
5087
|
[inputId]="'confirmPassword'"
|
|
4682
|
-
|
|
4683
|
-
[ngModel]="passwordModel().confirmPassword"
|
|
4684
|
-
(ngModelChange)="updatePasswordField('confirmPassword', $event)"
|
|
5088
|
+
[formField]="passwordForm.confirmPassword"
|
|
4685
5089
|
[placeholder]="'profile.confirm.password.placeholder' | translate"
|
|
4686
5090
|
class="w-full"
|
|
4687
5091
|
autocomplete="new-password"
|
|
@@ -4726,7 +5130,7 @@ class ProfilePageComponent {
|
|
|
4726
5130
|
</div>
|
|
4727
5131
|
<div class="section-content">
|
|
4728
5132
|
@if (section.component) {
|
|
4729
|
-
<ng-container
|
|
5133
|
+
<ng-container [ngComponentOutlet]="section.component" />
|
|
4730
5134
|
}
|
|
4731
5135
|
</div>
|
|
4732
5136
|
</div>
|
|
@@ -4742,7 +5146,7 @@ class ProfilePageComponent {
|
|
|
4742
5146
|
</div>
|
|
4743
5147
|
<div class="section-content">
|
|
4744
5148
|
@if (section.component) {
|
|
4745
|
-
<ng-container
|
|
5149
|
+
<ng-container [ngComponentOutlet]="section.component" />
|
|
4746
5150
|
}
|
|
4747
5151
|
</div>
|
|
4748
5152
|
</div>
|
|
@@ -4861,15 +5265,26 @@ class ProfilePageComponent {
|
|
|
4861
5265
|
}
|
|
4862
5266
|
</div>
|
|
4863
5267
|
}
|
|
4864
|
-
`, isInline: true, dependencies: [{ kind: "
|
|
5268
|
+
`, isInline: true, dependencies: [{ kind: "component", type: AvatarComponent, selector: "f-avatar", inputs: ["label", "icon", "image", "shape", "size", "color", "styleClass", "ariaLabel", "ariaLabelledBy"], outputs: ["onImageError"] }, { kind: "component", type: CheckboxComponent, selector: "f-checkbox", inputs: ["label", "binary", "disabled", "readonly", "inputId", "invalid", "indeterminate", "variant", "size", "touched", "styleClass", "style", "checked"], outputs: ["onChange", "onBlur", "touch", "checkedChange"] }, { kind: "directive", type: FButtonDirective, selector: "[fButton]", inputs: ["severity", "text", "outlined", "link", "variant", "rounded", "raised", "fluid", "disabled", "loading", "loadingIcon", "size", "label", "icon", "iconPos", "ariaLabel", "plain"] }, { kind: "directive", type: InputTextDirective, selector: "[fInputText]", inputs: ["invalid", "touched", "variant", "size", "fluid"] }, { kind: "component", type: PasswordComponent, selector: "f-password", inputs: ["toggleMask", "feedback", "disabled", "placeholder", "inputId", "invalid", "touched", "inputStyleClass", "styleClass", "style", "ariaDescribedby", "autocomplete", "variant", "size", "fluid", "appendTo", "promptLabel", "weakLabel", "mediumLabel", "strongLabel", "mediumRegex", "strongRegex"], outputs: ["onBlur", "onFocus"] }, { kind: "component", type: SelectComponent, selector: "f-select", inputs: ["options", "optionLabel", "optionValue", "placeholder", "disabled", "filter", "filterBy", "filterMatchMode", "filterLocale", "filterPlaceholder", "resetFilterOnHide", "autofocusFilter", "emptyMessage", "emptyFilterMessage", "showClear", "loading", "loadingIcon", "dropdownIcon", "clearIcon", "inputId", "invalid", "touched", "styleClass", "style", "appendTo", "editable", "readonly", "autofocus", "checkmark", "group", "optionGroupLabel", "optionGroupChildren", "virtualScroll", "virtualScrollItemSize", "lazy"], outputs: ["onFilter", "onChange", "onShow", "onHide", "onBlur", "onFocus", "onClear", "onLazyLoad"] }, { kind: "component", type: SkeletonComponent, selector: "f-skeleton", inputs: ["width", "height", "size", "borderRadius", "shape", "animation", "styleClass"] }, { kind: "component", type: TagComponent, selector: "f-tag", inputs: ["value", "severity", "icon", "rounded", "color", "styleClass", "style"] }, { kind: "directive", type: TextareaDirective, selector: "[fTextarea]", inputs: ["invalid", "touched", "variant", "fluid", "autoResize"], outputs: ["onResize"] }, { kind: "component", type: UiIconComponent, selector: "ui-icon", inputs: ["name", "size", "spin", "fill", "severity"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i1.NgForm, selector: "form:not([ngNoForm]):not([formGroup]):not([formArray]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule"], exportAs: ["ngComponentOutlet"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: FormField, selector: "[formField]", inputs: ["formField"], exportAs: ["formField"] }, { kind: "component", type: FileUploaderComponent, selector: "lib-file-uploader", inputs: ["uploadFile", "uploadMultipleFiles", "acceptTypes", "multiple", "maxFiles", "maxSizeMb", "uploadOptions", "disabled", "showPreview", "autoUpload"], outputs: ["fileUploaded", "filesUploaded", "onError", "fileSelected"] }, { kind: "directive", type: HasPermissionDirective, selector: "[hasPermission]", inputs: ["hasPermission"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] });
|
|
4865
5269
|
}
|
|
4866
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
5270
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: ProfilePageComponent, decorators: [{
|
|
4867
5271
|
type: Component,
|
|
4868
5272
|
args: [{
|
|
4869
5273
|
selector: 'lib-profile-page',
|
|
4870
5274
|
imports: [
|
|
4871
|
-
|
|
4872
|
-
|
|
5275
|
+
AvatarComponent,
|
|
5276
|
+
CheckboxComponent,
|
|
5277
|
+
FButtonDirective,
|
|
5278
|
+
InputTextDirective,
|
|
5279
|
+
PasswordComponent,
|
|
5280
|
+
SelectComponent,
|
|
5281
|
+
SkeletonComponent,
|
|
5282
|
+
TagComponent,
|
|
5283
|
+
TextareaDirective,
|
|
5284
|
+
UiIconComponent,
|
|
5285
|
+
FormsModule,
|
|
5286
|
+
NgComponentOutlet,
|
|
5287
|
+
NgTemplateOutlet,
|
|
4873
5288
|
FormField,
|
|
4874
5289
|
FileUploaderComponent,
|
|
4875
5290
|
HasPermissionDirective,
|
|
@@ -4988,10 +5403,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
4988
5403
|
</label>
|
|
4989
5404
|
@if (field.component) {
|
|
4990
5405
|
<ng-container
|
|
4991
|
-
|
|
4992
|
-
|
|
4993
|
-
injector: getFieldInjector(field)
|
|
4994
|
-
"
|
|
5406
|
+
[ngComponentOutlet]="field.component"
|
|
5407
|
+
[ngComponentOutletInjector]="getFieldInjector(field)"
|
|
4995
5408
|
/>
|
|
4996
5409
|
} @else if (field.template) {
|
|
4997
5410
|
<ng-container
|
|
@@ -5206,9 +5619,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
5206
5619
|
>
|
|
5207
5620
|
<f-password
|
|
5208
5621
|
[inputId]="'currentPassword'"
|
|
5209
|
-
|
|
5210
|
-
[ngModel]="passwordModel().currentPassword"
|
|
5211
|
-
(ngModelChange)="updatePasswordField('currentPassword', $event)"
|
|
5622
|
+
[formField]="passwordForm.currentPassword"
|
|
5212
5623
|
[placeholder]="'profile.current.password.placeholder' | translate"
|
|
5213
5624
|
class="w-full"
|
|
5214
5625
|
autocomplete="current-password"
|
|
@@ -5221,9 +5632,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
5221
5632
|
>
|
|
5222
5633
|
<f-password
|
|
5223
5634
|
[inputId]="'newPassword'"
|
|
5224
|
-
|
|
5225
|
-
[ngModel]="passwordModel().newPassword"
|
|
5226
|
-
(ngModelChange)="updatePasswordField('newPassword', $event)"
|
|
5635
|
+
[formField]="passwordForm.newPassword"
|
|
5227
5636
|
[placeholder]="'shared.min.characters' | translate: { count: 6 }"
|
|
5228
5637
|
class="w-full"
|
|
5229
5638
|
autocomplete="new-password"
|
|
@@ -5236,9 +5645,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
5236
5645
|
>
|
|
5237
5646
|
<f-password
|
|
5238
5647
|
[inputId]="'confirmPassword'"
|
|
5239
|
-
|
|
5240
|
-
[ngModel]="passwordModel().confirmPassword"
|
|
5241
|
-
(ngModelChange)="updatePasswordField('confirmPassword', $event)"
|
|
5648
|
+
[formField]="passwordForm.confirmPassword"
|
|
5242
5649
|
[placeholder]="'profile.confirm.password.placeholder' | translate"
|
|
5243
5650
|
class="w-full"
|
|
5244
5651
|
autocomplete="new-password"
|
|
@@ -5283,7 +5690,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
5283
5690
|
</div>
|
|
5284
5691
|
<div class="section-content">
|
|
5285
5692
|
@if (section.component) {
|
|
5286
|
-
<ng-container
|
|
5693
|
+
<ng-container [ngComponentOutlet]="section.component" />
|
|
5287
5694
|
}
|
|
5288
5695
|
</div>
|
|
5289
5696
|
</div>
|
|
@@ -5299,7 +5706,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
5299
5706
|
</div>
|
|
5300
5707
|
<div class="section-content">
|
|
5301
5708
|
@if (section.component) {
|
|
5302
|
-
<ng-container
|
|
5709
|
+
<ng-container [ngComponentOutlet]="section.component" />
|
|
5303
5710
|
}
|
|
5304
5711
|
</div>
|
|
5305
5712
|
</div>
|
|
@@ -5753,8 +6160,8 @@ class RegisterPageComponent {
|
|
|
5753
6160
|
},
|
|
5754
6161
|
});
|
|
5755
6162
|
}
|
|
5756
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
5757
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.
|
|
6163
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: RegisterPageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6164
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: RegisterPageComponent, isStandalone: true, selector: "lib-register-page", inputs: { returnUrl: { classPropertyName: "returnUrl", publicName: "returnUrl", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
5758
6165
|
<app-floating-configurator />
|
|
5759
6166
|
<div
|
|
5760
6167
|
class="bg-surface-ground flex items-center justify-center min-h-screen py-8"
|
|
@@ -5881,10 +6288,8 @@ class RegisterPageComponent {
|
|
|
5881
6288
|
</label>
|
|
5882
6289
|
@if (field.component) {
|
|
5883
6290
|
<ng-container
|
|
5884
|
-
|
|
5885
|
-
|
|
5886
|
-
injector: getFieldInjector(field)
|
|
5887
|
-
"
|
|
6291
|
+
[ngComponentOutlet]="field.component"
|
|
6292
|
+
[ngComponentOutletInjector]="getFieldInjector(field)"
|
|
5888
6293
|
></ng-container>
|
|
5889
6294
|
} @else if (field.template) {
|
|
5890
6295
|
<ng-container
|
|
@@ -6222,15 +6627,24 @@ class RegisterPageComponent {
|
|
|
6222
6627
|
</div>
|
|
6223
6628
|
</div>
|
|
6224
6629
|
</div>
|
|
6225
|
-
`, isInline: true, dependencies: [{ kind: "
|
|
6630
|
+
`, isInline: true, dependencies: [{ kind: "component", type: CheckboxComponent, selector: "f-checkbox", inputs: ["label", "binary", "disabled", "readonly", "inputId", "invalid", "indeterminate", "variant", "size", "touched", "styleClass", "style", "checked"], outputs: ["onChange", "onBlur", "touch", "checkedChange"] }, { kind: "directive", type: FButtonDirective, selector: "[fButton]", inputs: ["severity", "text", "outlined", "link", "variant", "rounded", "raised", "fluid", "disabled", "loading", "loadingIcon", "size", "label", "icon", "iconPos", "ariaLabel", "plain"] }, { kind: "directive", type: InputTextDirective, selector: "[fInputText]", inputs: ["invalid", "touched", "variant", "size", "fluid"] }, { kind: "component", type: PasswordComponent, selector: "f-password", inputs: ["toggleMask", "feedback", "disabled", "placeholder", "inputId", "invalid", "touched", "inputStyleClass", "styleClass", "style", "ariaDescribedby", "autocomplete", "variant", "size", "fluid", "appendTo", "promptLabel", "weakLabel", "mediumLabel", "strongLabel", "mediumRegex", "strongRegex"], outputs: ["onBlur", "onFocus"] }, { kind: "component", type: SelectComponent, selector: "f-select", inputs: ["options", "optionLabel", "optionValue", "placeholder", "disabled", "filter", "filterBy", "filterMatchMode", "filterLocale", "filterPlaceholder", "resetFilterOnHide", "autofocusFilter", "emptyMessage", "emptyFilterMessage", "showClear", "loading", "loadingIcon", "dropdownIcon", "clearIcon", "inputId", "invalid", "touched", "styleClass", "style", "appendTo", "editable", "readonly", "autofocus", "checkmark", "group", "optionGroupLabel", "optionGroupChildren", "virtualScroll", "virtualScrollItemSize", "lazy"], outputs: ["onFilter", "onChange", "onShow", "onHide", "onBlur", "onFocus", "onClear", "onLazyLoad"] }, { kind: "directive", type: TextareaDirective, selector: "[fTextarea]", inputs: ["invalid", "touched", "variant", "fluid", "autoResize"], outputs: ["onResize"] }, { kind: "component", type: UiIconComponent, selector: "ui-icon", inputs: ["name", "size", "spin", "fill", "severity"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i1.NgForm, selector: "form:not([ngNoForm]):not([formGroup]):not([formArray]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule"], exportAs: ["ngComponentOutlet"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "routerLink"] }, { kind: "directive", type: FormField, selector: "[formField]", inputs: ["formField"], exportAs: ["formField"] }, { kind: "component", type: AppFloatingConfigurator, selector: "app-floating-configurator" }, { kind: "pipe", type: TranslatePipe, name: "translate" }] });
|
|
6226
6631
|
}
|
|
6227
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
6632
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: RegisterPageComponent, decorators: [{
|
|
6228
6633
|
type: Component,
|
|
6229
6634
|
args: [{
|
|
6230
6635
|
selector: 'lib-register-page',
|
|
6231
6636
|
imports: [
|
|
6232
|
-
|
|
6233
|
-
|
|
6637
|
+
CheckboxComponent,
|
|
6638
|
+
FButtonDirective,
|
|
6639
|
+
InputTextDirective,
|
|
6640
|
+
PasswordComponent,
|
|
6641
|
+
SelectComponent,
|
|
6642
|
+
TextareaDirective,
|
|
6643
|
+
UiIconComponent,
|
|
6644
|
+
FormsModule,
|
|
6645
|
+
NgComponentOutlet,
|
|
6646
|
+
NgTemplateOutlet,
|
|
6647
|
+
RouterLink,
|
|
6234
6648
|
FormField,
|
|
6235
6649
|
AppFloatingConfigurator,
|
|
6236
6650
|
TranslatePipe,
|
|
@@ -6362,10 +6776,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
6362
6776
|
</label>
|
|
6363
6777
|
@if (field.component) {
|
|
6364
6778
|
<ng-container
|
|
6365
|
-
|
|
6366
|
-
|
|
6367
|
-
injector: getFieldInjector(field)
|
|
6368
|
-
"
|
|
6779
|
+
[ngComponentOutlet]="field.component"
|
|
6780
|
+
[ngComponentOutletInjector]="getFieldInjector(field)"
|
|
6369
6781
|
></ng-container>
|
|
6370
6782
|
} @else if (field.template) {
|
|
6371
6783
|
<ng-container
|
|
@@ -6768,7 +7180,8 @@ class ResetPasswordPageComponent {
|
|
|
6768
7180
|
}
|
|
6769
7181
|
});
|
|
6770
7182
|
}
|
|
6771
|
-
onSubmit() {
|
|
7183
|
+
onSubmit(event) {
|
|
7184
|
+
event.preventDefault();
|
|
6772
7185
|
if (!this.canSubmit()) {
|
|
6773
7186
|
this.messageService.add({
|
|
6774
7187
|
severity: 'error',
|
|
@@ -6808,8 +7221,8 @@ class ResetPasswordPageComponent {
|
|
|
6808
7221
|
},
|
|
6809
7222
|
});
|
|
6810
7223
|
}
|
|
6811
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
6812
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.
|
|
7224
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: ResetPasswordPageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
7225
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: ResetPasswordPageComponent, isStandalone: true, selector: "lib-reset-password-page", ngImport: i0, template: `
|
|
6813
7226
|
<app-floating-configurator />
|
|
6814
7227
|
<div
|
|
6815
7228
|
class="bg-surface-ground flex items-center justify-center min-h-screen"
|
|
@@ -6836,7 +7249,7 @@ class ResetPasswordPageComponent {
|
|
|
6836
7249
|
</span>
|
|
6837
7250
|
</div>
|
|
6838
7251
|
|
|
6839
|
-
<form (
|
|
7252
|
+
<form (submit)="onSubmit($event)">
|
|
6840
7253
|
<label
|
|
6841
7254
|
for="newPassword"
|
|
6842
7255
|
class="block text-lg font-medium mb-2 text-color"
|
|
@@ -6957,15 +7370,17 @@ class ResetPasswordPageComponent {
|
|
|
6957
7370
|
</div>
|
|
6958
7371
|
</div>
|
|
6959
7372
|
</div>
|
|
6960
|
-
`, isInline: true, dependencies: [{ kind: "
|
|
7373
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "routerLink"] }, { kind: "directive", type: FButtonDirective, selector: "[fButton]", inputs: ["severity", "text", "outlined", "link", "variant", "rounded", "raised", "fluid", "disabled", "loading", "loadingIcon", "size", "label", "icon", "iconPos", "ariaLabel", "plain"] }, { kind: "component", type: PasswordComponent, selector: "f-password", inputs: ["toggleMask", "feedback", "disabled", "placeholder", "inputId", "invalid", "touched", "inputStyleClass", "styleClass", "style", "ariaDescribedby", "autocomplete", "variant", "size", "fluid", "appendTo", "promptLabel", "weakLabel", "mediumLabel", "strongLabel", "mediumRegex", "strongRegex"], outputs: ["onBlur", "onFocus"] }, { kind: "component", type: UiIconComponent, selector: "ui-icon", inputs: ["name", "size", "spin", "fill", "severity"] }, { kind: "directive", type: FormField, selector: "[formField]", inputs: ["formField"], exportAs: ["formField"] }, { kind: "component", type: AppFloatingConfigurator, selector: "app-floating-configurator" }, { kind: "pipe", type: TranslatePipe, name: "translate" }] });
|
|
6961
7374
|
}
|
|
6962
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
7375
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: ResetPasswordPageComponent, decorators: [{
|
|
6963
7376
|
type: Component,
|
|
6964
7377
|
args: [{
|
|
6965
7378
|
selector: 'lib-reset-password-page',
|
|
6966
7379
|
imports: [
|
|
6967
|
-
|
|
6968
|
-
|
|
7380
|
+
RouterLink,
|
|
7381
|
+
FButtonDirective,
|
|
7382
|
+
PasswordComponent,
|
|
7383
|
+
UiIconComponent,
|
|
6969
7384
|
FormField,
|
|
6970
7385
|
AppFloatingConfigurator,
|
|
6971
7386
|
TranslatePipe,
|
|
@@ -6997,7 +7412,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
6997
7412
|
</span>
|
|
6998
7413
|
</div>
|
|
6999
7414
|
|
|
7000
|
-
<form (
|
|
7415
|
+
<form (submit)="onSubmit($event)">
|
|
7001
7416
|
<label
|
|
7002
7417
|
for="newPassword"
|
|
7003
7418
|
class="block text-lg font-medium mb-2 text-color"
|
|
@@ -7127,6 +7542,550 @@ var resetPasswordPage_component = /*#__PURE__*/Object.freeze({
|
|
|
7127
7542
|
ResetPasswordPageComponent: ResetPasswordPageComponent
|
|
7128
7543
|
});
|
|
7129
7544
|
|
|
7545
|
+
class SocialCallbackPageComponent {
|
|
7546
|
+
destroyRef = inject(DestroyRef);
|
|
7547
|
+
route = inject(ActivatedRoute);
|
|
7548
|
+
router = inject(Router);
|
|
7549
|
+
platform = inject(PlatformService);
|
|
7550
|
+
socialApi = inject(SocialAuthApiService);
|
|
7551
|
+
authState = inject(AuthStateService);
|
|
7552
|
+
messageService = inject(MessageService);
|
|
7553
|
+
translateAdapter = inject(TranslateService, {
|
|
7554
|
+
optional: true,
|
|
7555
|
+
});
|
|
7556
|
+
_error = signal(null, /* @ts-ignore */
|
|
7557
|
+
...(ngDevMode ? [{ debugName: "_error" }] : /* istanbul ignore next */ []));
|
|
7558
|
+
errorDetail = computed(() => {
|
|
7559
|
+
const error = this._error();
|
|
7560
|
+
if (!error)
|
|
7561
|
+
return null;
|
|
7562
|
+
return 'key' in error ? this.translate(error.key, error.vars) : error.raw;
|
|
7563
|
+
}, /* @ts-ignore */
|
|
7564
|
+
...(ngDevMode ? [{ debugName: "errorDetail" }] : /* istanbul ignore next */ []));
|
|
7565
|
+
constructor() {
|
|
7566
|
+
if (this.platform.isServer)
|
|
7567
|
+
return;
|
|
7568
|
+
this.exchangeCode();
|
|
7569
|
+
}
|
|
7570
|
+
backToLogin() {
|
|
7571
|
+
this.router.navigate(['/auth/login']);
|
|
7572
|
+
}
|
|
7573
|
+
exchangeCode() {
|
|
7574
|
+
const params = this.route.snapshot.queryParamMap;
|
|
7575
|
+
const providerError = params.get('error_description') ?? params.get('error');
|
|
7576
|
+
if (providerError) {
|
|
7577
|
+
this._error.set({ raw: providerError });
|
|
7578
|
+
return;
|
|
7579
|
+
}
|
|
7580
|
+
const code = params.get('code');
|
|
7581
|
+
const state = params.get('state');
|
|
7582
|
+
if (!code || !state) {
|
|
7583
|
+
this._error.set({ key: 'auth.social.state.invalid' });
|
|
7584
|
+
return;
|
|
7585
|
+
}
|
|
7586
|
+
this.socialApi
|
|
7587
|
+
.callback({ code, state, redirectUri: this.socialApi.redirectUri })
|
|
7588
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
7589
|
+
.subscribe({
|
|
7590
|
+
next: (response) => {
|
|
7591
|
+
if (!response.data) {
|
|
7592
|
+
this._error.set({ key: 'auth.social.failed' });
|
|
7593
|
+
return;
|
|
7594
|
+
}
|
|
7595
|
+
if (isCompanySelectionResponse(response)) {
|
|
7596
|
+
this.authState.setSelectionState(response.data);
|
|
7597
|
+
this.router.navigate(['/auth/login']);
|
|
7598
|
+
return;
|
|
7599
|
+
}
|
|
7600
|
+
if (isLoginResponse(response)) {
|
|
7601
|
+
this.authState.setLoginState(response.data);
|
|
7602
|
+
this.messageService.add({
|
|
7603
|
+
severity: 'success',
|
|
7604
|
+
summary: this.translate('shared.success'),
|
|
7605
|
+
detail: response.messageKey
|
|
7606
|
+
? this.translate(response.messageKey)
|
|
7607
|
+
: (response.message ?? this.translate('auth.login.success')),
|
|
7608
|
+
});
|
|
7609
|
+
this.authState.navigateAfterLogin(this.returnUrl());
|
|
7610
|
+
}
|
|
7611
|
+
},
|
|
7612
|
+
error: (error) => {
|
|
7613
|
+
const messageKey = error?.error?.messageKey;
|
|
7614
|
+
if (messageKey) {
|
|
7615
|
+
this._error.set({ key: messageKey, vars: error?.error?.messageVariables });
|
|
7616
|
+
}
|
|
7617
|
+
else if (error?.error?.message) {
|
|
7618
|
+
this._error.set({ raw: error.error.message });
|
|
7619
|
+
}
|
|
7620
|
+
else {
|
|
7621
|
+
this._error.set({ key: 'auth.social.failed' });
|
|
7622
|
+
}
|
|
7623
|
+
},
|
|
7624
|
+
});
|
|
7625
|
+
}
|
|
7626
|
+
returnUrl() {
|
|
7627
|
+
return this.socialApi.consumeReturnUrl();
|
|
7628
|
+
}
|
|
7629
|
+
translate(key, vars) {
|
|
7630
|
+
return this.translateAdapter?.translate(key, vars) ?? key;
|
|
7631
|
+
}
|
|
7632
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: SocialCallbackPageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
7633
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: SocialCallbackPageComponent, isStandalone: true, selector: "lib-social-callback-page", ngImport: i0, template: `
|
|
7634
|
+
<app-floating-configurator />
|
|
7635
|
+
<div class="bg-surface-ground flex items-center justify-center min-h-screen">
|
|
7636
|
+
<div class="flex flex-col items-center gap-4 text-center px-4">
|
|
7637
|
+
@if (errorDetail()) {
|
|
7638
|
+
<ui-icon name="exclamation-circle" class="text-6xl text-danger"></ui-icon>
|
|
7639
|
+
<div class="text-2xl font-medium text-color">
|
|
7640
|
+
{{ 'auth.social.failed' | translate }}
|
|
7641
|
+
</div>
|
|
7642
|
+
<p class="text-muted-color font-medium">{{ errorDetail() }}</p>
|
|
7643
|
+
<button fButton severity="secondary" [outlined]="true" (click)="backToLogin()">
|
|
7644
|
+
<span>{{ 'auth.login.back.to.sign.in' | translate }}</span>
|
|
7645
|
+
</button>
|
|
7646
|
+
} @else {
|
|
7647
|
+
<ui-icon name="spinner" [spin]="true" class="text-5xl text-primary"></ui-icon>
|
|
7648
|
+
<div class="text-2xl font-medium text-color">
|
|
7649
|
+
{{ 'auth.social.signing.in' | translate }}
|
|
7650
|
+
</div>
|
|
7651
|
+
}
|
|
7652
|
+
</div>
|
|
7653
|
+
</div>
|
|
7654
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: FButtonDirective, selector: "[fButton]", inputs: ["severity", "text", "outlined", "link", "variant", "rounded", "raised", "fluid", "disabled", "loading", "loadingIcon", "size", "label", "icon", "iconPos", "ariaLabel", "plain"] }, { kind: "component", type: UiIconComponent, selector: "ui-icon", inputs: ["name", "size", "spin", "fill", "severity"] }, { kind: "component", type: AppFloatingConfigurator, selector: "app-floating-configurator" }, { kind: "pipe", type: TranslatePipe, name: "translate" }] });
|
|
7655
|
+
}
|
|
7656
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: SocialCallbackPageComponent, decorators: [{
|
|
7657
|
+
type: Component,
|
|
7658
|
+
args: [{
|
|
7659
|
+
selector: 'lib-social-callback-page',
|
|
7660
|
+
imports: [FButtonDirective, UiIconComponent, TranslatePipe, AppFloatingConfigurator],
|
|
7661
|
+
template: `
|
|
7662
|
+
<app-floating-configurator />
|
|
7663
|
+
<div class="bg-surface-ground flex items-center justify-center min-h-screen">
|
|
7664
|
+
<div class="flex flex-col items-center gap-4 text-center px-4">
|
|
7665
|
+
@if (errorDetail()) {
|
|
7666
|
+
<ui-icon name="exclamation-circle" class="text-6xl text-danger"></ui-icon>
|
|
7667
|
+
<div class="text-2xl font-medium text-color">
|
|
7668
|
+
{{ 'auth.social.failed' | translate }}
|
|
7669
|
+
</div>
|
|
7670
|
+
<p class="text-muted-color font-medium">{{ errorDetail() }}</p>
|
|
7671
|
+
<button fButton severity="secondary" [outlined]="true" (click)="backToLogin()">
|
|
7672
|
+
<span>{{ 'auth.login.back.to.sign.in' | translate }}</span>
|
|
7673
|
+
</button>
|
|
7674
|
+
} @else {
|
|
7675
|
+
<ui-icon name="spinner" [spin]="true" class="text-5xl text-primary"></ui-icon>
|
|
7676
|
+
<div class="text-2xl font-medium text-color">
|
|
7677
|
+
{{ 'auth.social.signing.in' | translate }}
|
|
7678
|
+
</div>
|
|
7679
|
+
}
|
|
7680
|
+
</div>
|
|
7681
|
+
</div>
|
|
7682
|
+
`,
|
|
7683
|
+
}]
|
|
7684
|
+
}], ctorParameters: () => [] });
|
|
7685
|
+
|
|
7686
|
+
var socialCallbackPage_component = /*#__PURE__*/Object.freeze({
|
|
7687
|
+
__proto__: null,
|
|
7688
|
+
SocialCallbackPageComponent: SocialCallbackPageComponent
|
|
7689
|
+
});
|
|
7690
|
+
|
|
7691
|
+
const TENANT_PROVIDER = SocialProviderEnum.MICROSOFT;
|
|
7692
|
+
class SocialConfigPageComponent {
|
|
7693
|
+
configService = inject(SocialAuthConfigApiService);
|
|
7694
|
+
socialApi = inject(SocialAuthApiService);
|
|
7695
|
+
messageService = inject(MessageService);
|
|
7696
|
+
translateAdapter = inject(TranslateService, {
|
|
7697
|
+
optional: true,
|
|
7698
|
+
});
|
|
7699
|
+
tenantProvider = TENANT_PROVIDER;
|
|
7700
|
+
_forms = signal(SOCIAL_PROVIDERS.map(emptyForm), /* @ts-ignore */
|
|
7701
|
+
...(ngDevMode ? [{ debugName: "_forms" }] : /* istanbul ignore next */ []));
|
|
7702
|
+
forms = this._forms.asReadonly();
|
|
7703
|
+
_isLoading = signal(true, /* @ts-ignore */
|
|
7704
|
+
...(ngDevMode ? [{ debugName: "_isLoading" }] : /* istanbul ignore next */ []));
|
|
7705
|
+
isLoading = this._isLoading.asReadonly();
|
|
7706
|
+
_isSaving = signal(false, /* @ts-ignore */
|
|
7707
|
+
...(ngDevMode ? [{ debugName: "_isSaving" }] : /* istanbul ignore next */ []));
|
|
7708
|
+
isSaving = this._isSaving.asReadonly();
|
|
7709
|
+
redirectUri = this.socialApi.redirectUri;
|
|
7710
|
+
constructor() {
|
|
7711
|
+
void this.loadConfigs();
|
|
7712
|
+
}
|
|
7713
|
+
updateField(provider, field, value) {
|
|
7714
|
+
this._forms.update((forms) => forms.map((form) => form.provider === provider ? { ...form, [field]: value } : form));
|
|
7715
|
+
}
|
|
7716
|
+
async onSave() {
|
|
7717
|
+
const invalid = this._forms().find((form) => form.isEnabled &&
|
|
7718
|
+
(!form.clientId.trim() || (!form.hasClientSecret && !form.clientSecret.trim())));
|
|
7719
|
+
if (invalid) {
|
|
7720
|
+
this.messageService.add({
|
|
7721
|
+
severity: 'warn',
|
|
7722
|
+
summary: this.translate('shared.validation'),
|
|
7723
|
+
detail: this.translate('social.config.credentials.required', {
|
|
7724
|
+
provider: this.translate(`auth.social.provider.${invalid.provider}`),
|
|
7725
|
+
}),
|
|
7726
|
+
});
|
|
7727
|
+
return;
|
|
7728
|
+
}
|
|
7729
|
+
this._isSaving.set(true);
|
|
7730
|
+
try {
|
|
7731
|
+
const pending = this._forms().filter((form) => form.id || form.isEnabled);
|
|
7732
|
+
await this.configService.bulkUpsert(pending.filter((form) => !form.id).map(toCreateDto), pending.filter((form) => form.id).map(toUpdateDto));
|
|
7733
|
+
this.messageService.add({
|
|
7734
|
+
severity: 'success',
|
|
7735
|
+
summary: this.translate('shared.success'),
|
|
7736
|
+
detail: this.translate('social.config.save.success'),
|
|
7737
|
+
});
|
|
7738
|
+
await this.loadConfigs();
|
|
7739
|
+
}
|
|
7740
|
+
catch {
|
|
7741
|
+
// Error toast handled by global interceptor
|
|
7742
|
+
}
|
|
7743
|
+
finally {
|
|
7744
|
+
this._isSaving.set(false);
|
|
7745
|
+
}
|
|
7746
|
+
}
|
|
7747
|
+
async loadConfigs() {
|
|
7748
|
+
this._isLoading.set(true);
|
|
7749
|
+
try {
|
|
7750
|
+
const response = await this.configService.getAll({
|
|
7751
|
+
pagination: { currentPage: 0, pageSize: SOCIAL_PROVIDERS.length },
|
|
7752
|
+
filter: {},
|
|
7753
|
+
select: [],
|
|
7754
|
+
sort: {},
|
|
7755
|
+
});
|
|
7756
|
+
this._forms.set(mergeConfigs(response.data ?? []));
|
|
7757
|
+
}
|
|
7758
|
+
catch {
|
|
7759
|
+
// Error toast handled by global interceptor
|
|
7760
|
+
}
|
|
7761
|
+
finally {
|
|
7762
|
+
this._isLoading.set(false);
|
|
7763
|
+
}
|
|
7764
|
+
}
|
|
7765
|
+
translate(key, vars) {
|
|
7766
|
+
return this.translateAdapter?.translate(key, vars) ?? key;
|
|
7767
|
+
}
|
|
7768
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: SocialConfigPageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
7769
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: SocialConfigPageComponent, isStandalone: true, selector: "lib-social-config-page", providers: [MessageService], ngImport: i0, template: `
|
|
7770
|
+
<div class="card">
|
|
7771
|
+
<div class="flex flex-col sm:flex-row justify-between items-start sm:items-center gap-3 mb-4">
|
|
7772
|
+
<div>
|
|
7773
|
+
<h3 class="text-lg sm:text-xl font-semibold m-0">
|
|
7774
|
+
{{ 'social.config.title' | translate }}
|
|
7775
|
+
</h3>
|
|
7776
|
+
<p class="text-sm text-muted-color mt-1">
|
|
7777
|
+
{{ 'social.config.subtitle' | translate }}
|
|
7778
|
+
</p>
|
|
7779
|
+
</div>
|
|
7780
|
+
<button fButton (click)="onSave()" [disabled]="isSaving()" [loading]="isSaving()">
|
|
7781
|
+
@if (!isSaving()) {
|
|
7782
|
+
<ui-icon pButtonIcon name="save"></ui-icon>
|
|
7783
|
+
}
|
|
7784
|
+
<span pButtonLabel>{{ 'shared.save' | translate }}</span>
|
|
7785
|
+
</button>
|
|
7786
|
+
</div>
|
|
7787
|
+
|
|
7788
|
+
<p class="text-sm text-muted-color mb-4">
|
|
7789
|
+
{{ 'social.config.redirect.uri' | translate }}:
|
|
7790
|
+
<code class="text-color">{{ redirectUri }}</code>
|
|
7791
|
+
</p>
|
|
7792
|
+
|
|
7793
|
+
@if (isLoading()) {
|
|
7794
|
+
<div class="flex justify-center py-8">
|
|
7795
|
+
<ui-icon name="spinner" [spin]="true" class="text-3xl text-primary"></ui-icon>
|
|
7796
|
+
</div>
|
|
7797
|
+
} @else {
|
|
7798
|
+
<div class="flex flex-col gap-4">
|
|
7799
|
+
@for (form of forms(); track form.provider) {
|
|
7800
|
+
<div class="border border-surface rounded p-4">
|
|
7801
|
+
<div class="flex items-center justify-between gap-3">
|
|
7802
|
+
<div>
|
|
7803
|
+
<div class="font-semibold">
|
|
7804
|
+
{{ 'auth.social.provider.' + form.provider | translate }}
|
|
7805
|
+
</div>
|
|
7806
|
+
<div class="text-sm text-muted-color">
|
|
7807
|
+
{{ 'social.config.provider.hint.' + form.provider | translate }}
|
|
7808
|
+
</div>
|
|
7809
|
+
</div>
|
|
7810
|
+
<f-toggleswitch
|
|
7811
|
+
[ngModel]="form.isEnabled"
|
|
7812
|
+
(ngModelChange)="updateField(form.provider, 'isEnabled', $event)"
|
|
7813
|
+
/>
|
|
7814
|
+
</div>
|
|
7815
|
+
|
|
7816
|
+
@if (form.isEnabled) {
|
|
7817
|
+
<div class="grid grid-cols-1 md:grid-cols-2 gap-4 mt-4 pt-4 border-t border-surface">
|
|
7818
|
+
<div class="field">
|
|
7819
|
+
<label [for]="form.provider + '-client-id'" class="block font-medium mb-2">
|
|
7820
|
+
{{ 'social.config.client.id' | translate }} *
|
|
7821
|
+
</label>
|
|
7822
|
+
<input
|
|
7823
|
+
fInputText
|
|
7824
|
+
[id]="form.provider + '-client-id'"
|
|
7825
|
+
class="w-full"
|
|
7826
|
+
[ngModel]="form.clientId"
|
|
7827
|
+
(ngModelChange)="updateField(form.provider, 'clientId', $event)"
|
|
7828
|
+
/>
|
|
7829
|
+
</div>
|
|
7830
|
+
|
|
7831
|
+
<div class="field">
|
|
7832
|
+
<label [for]="form.provider + '-client-secret'" class="block font-medium mb-2">
|
|
7833
|
+
{{ 'social.config.client.secret' | translate }}
|
|
7834
|
+
@if (!form.hasClientSecret) {
|
|
7835
|
+
*
|
|
7836
|
+
}
|
|
7837
|
+
</label>
|
|
7838
|
+
<f-password
|
|
7839
|
+
[inputId]="form.provider + '-client-secret'"
|
|
7840
|
+
styleClass="w-full"
|
|
7841
|
+
[placeholder]="
|
|
7842
|
+
form.hasClientSecret
|
|
7843
|
+
? ('social.config.client.secret.unchanged' | translate)
|
|
7844
|
+
: ''
|
|
7845
|
+
"
|
|
7846
|
+
[ngModel]="form.clientSecret"
|
|
7847
|
+
(ngModelChange)="updateField(form.provider, 'clientSecret', $event)"
|
|
7848
|
+
/>
|
|
7849
|
+
</div>
|
|
7850
|
+
|
|
7851
|
+
@if (form.provider === tenantProvider) {
|
|
7852
|
+
<div class="field">
|
|
7853
|
+
<label [for]="form.provider + '-tenant'" class="block font-medium mb-2">
|
|
7854
|
+
{{ 'social.config.tenant.id' | translate }}
|
|
7855
|
+
</label>
|
|
7856
|
+
<input
|
|
7857
|
+
fInputText
|
|
7858
|
+
[id]="form.provider + '-tenant'"
|
|
7859
|
+
class="w-full"
|
|
7860
|
+
[placeholder]="'social.config.tenant.id.example' | translate"
|
|
7861
|
+
[ngModel]="form.tenantId"
|
|
7862
|
+
(ngModelChange)="updateField(form.provider, 'tenantId', $event)"
|
|
7863
|
+
/>
|
|
7864
|
+
</div>
|
|
7865
|
+
}
|
|
7866
|
+
|
|
7867
|
+
<div class="field">
|
|
7868
|
+
<label [for]="form.provider + '-scopes'" class="block font-medium mb-2">
|
|
7869
|
+
{{ 'social.config.scopes' | translate }}
|
|
7870
|
+
</label>
|
|
7871
|
+
<input
|
|
7872
|
+
fInputText
|
|
7873
|
+
[id]="form.provider + '-scopes'"
|
|
7874
|
+
class="w-full"
|
|
7875
|
+
[placeholder]="'social.config.scopes.placeholder' | translate"
|
|
7876
|
+
[ngModel]="form.scopes"
|
|
7877
|
+
(ngModelChange)="updateField(form.provider, 'scopes', $event)"
|
|
7878
|
+
/>
|
|
7879
|
+
</div>
|
|
7880
|
+
|
|
7881
|
+
</div>
|
|
7882
|
+
}
|
|
7883
|
+
</div>
|
|
7884
|
+
}
|
|
7885
|
+
</div>
|
|
7886
|
+
}
|
|
7887
|
+
</div>
|
|
7888
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: FButtonDirective, selector: "[fButton]", inputs: ["severity", "text", "outlined", "link", "variant", "rounded", "raised", "fluid", "disabled", "loading", "loadingIcon", "size", "label", "icon", "iconPos", "ariaLabel", "plain"] }, { kind: "directive", type: InputTextDirective, selector: "[fInputText]", inputs: ["invalid", "touched", "variant", "size", "fluid"] }, { kind: "component", type: PasswordComponent, selector: "f-password", inputs: ["toggleMask", "feedback", "disabled", "placeholder", "inputId", "invalid", "touched", "inputStyleClass", "styleClass", "style", "ariaDescribedby", "autocomplete", "variant", "size", "fluid", "appendTo", "promptLabel", "weakLabel", "mediumLabel", "strongLabel", "mediumRegex", "strongRegex"], outputs: ["onBlur", "onFocus"] }, { kind: "component", type: ToggleSwitchComponent, selector: "f-toggleswitch", inputs: ["disabled", "readonly", "invalid", "ariaLabel", "trueValue", "falseValue", "inputId", "size", "tabindex", "styleClass", "style"] }, { kind: "component", type: UiIconComponent, selector: "ui-icon", inputs: ["name", "size", "spin", "fill", "severity"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] });
|
|
7889
|
+
}
|
|
7890
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: SocialConfigPageComponent, decorators: [{
|
|
7891
|
+
type: Component,
|
|
7892
|
+
args: [{
|
|
7893
|
+
selector: 'lib-social-config-page',
|
|
7894
|
+
imports: [
|
|
7895
|
+
FButtonDirective,
|
|
7896
|
+
InputTextDirective,
|
|
7897
|
+
PasswordComponent,
|
|
7898
|
+
ToggleSwitchComponent,
|
|
7899
|
+
UiIconComponent,
|
|
7900
|
+
FormsModule,
|
|
7901
|
+
TranslatePipe,
|
|
7902
|
+
],
|
|
7903
|
+
providers: [MessageService],
|
|
7904
|
+
template: `
|
|
7905
|
+
<div class="card">
|
|
7906
|
+
<div class="flex flex-col sm:flex-row justify-between items-start sm:items-center gap-3 mb-4">
|
|
7907
|
+
<div>
|
|
7908
|
+
<h3 class="text-lg sm:text-xl font-semibold m-0">
|
|
7909
|
+
{{ 'social.config.title' | translate }}
|
|
7910
|
+
</h3>
|
|
7911
|
+
<p class="text-sm text-muted-color mt-1">
|
|
7912
|
+
{{ 'social.config.subtitle' | translate }}
|
|
7913
|
+
</p>
|
|
7914
|
+
</div>
|
|
7915
|
+
<button fButton (click)="onSave()" [disabled]="isSaving()" [loading]="isSaving()">
|
|
7916
|
+
@if (!isSaving()) {
|
|
7917
|
+
<ui-icon pButtonIcon name="save"></ui-icon>
|
|
7918
|
+
}
|
|
7919
|
+
<span pButtonLabel>{{ 'shared.save' | translate }}</span>
|
|
7920
|
+
</button>
|
|
7921
|
+
</div>
|
|
7922
|
+
|
|
7923
|
+
<p class="text-sm text-muted-color mb-4">
|
|
7924
|
+
{{ 'social.config.redirect.uri' | translate }}:
|
|
7925
|
+
<code class="text-color">{{ redirectUri }}</code>
|
|
7926
|
+
</p>
|
|
7927
|
+
|
|
7928
|
+
@if (isLoading()) {
|
|
7929
|
+
<div class="flex justify-center py-8">
|
|
7930
|
+
<ui-icon name="spinner" [spin]="true" class="text-3xl text-primary"></ui-icon>
|
|
7931
|
+
</div>
|
|
7932
|
+
} @else {
|
|
7933
|
+
<div class="flex flex-col gap-4">
|
|
7934
|
+
@for (form of forms(); track form.provider) {
|
|
7935
|
+
<div class="border border-surface rounded p-4">
|
|
7936
|
+
<div class="flex items-center justify-between gap-3">
|
|
7937
|
+
<div>
|
|
7938
|
+
<div class="font-semibold">
|
|
7939
|
+
{{ 'auth.social.provider.' + form.provider | translate }}
|
|
7940
|
+
</div>
|
|
7941
|
+
<div class="text-sm text-muted-color">
|
|
7942
|
+
{{ 'social.config.provider.hint.' + form.provider | translate }}
|
|
7943
|
+
</div>
|
|
7944
|
+
</div>
|
|
7945
|
+
<f-toggleswitch
|
|
7946
|
+
[ngModel]="form.isEnabled"
|
|
7947
|
+
(ngModelChange)="updateField(form.provider, 'isEnabled', $event)"
|
|
7948
|
+
/>
|
|
7949
|
+
</div>
|
|
7950
|
+
|
|
7951
|
+
@if (form.isEnabled) {
|
|
7952
|
+
<div class="grid grid-cols-1 md:grid-cols-2 gap-4 mt-4 pt-4 border-t border-surface">
|
|
7953
|
+
<div class="field">
|
|
7954
|
+
<label [for]="form.provider + '-client-id'" class="block font-medium mb-2">
|
|
7955
|
+
{{ 'social.config.client.id' | translate }} *
|
|
7956
|
+
</label>
|
|
7957
|
+
<input
|
|
7958
|
+
fInputText
|
|
7959
|
+
[id]="form.provider + '-client-id'"
|
|
7960
|
+
class="w-full"
|
|
7961
|
+
[ngModel]="form.clientId"
|
|
7962
|
+
(ngModelChange)="updateField(form.provider, 'clientId', $event)"
|
|
7963
|
+
/>
|
|
7964
|
+
</div>
|
|
7965
|
+
|
|
7966
|
+
<div class="field">
|
|
7967
|
+
<label [for]="form.provider + '-client-secret'" class="block font-medium mb-2">
|
|
7968
|
+
{{ 'social.config.client.secret' | translate }}
|
|
7969
|
+
@if (!form.hasClientSecret) {
|
|
7970
|
+
*
|
|
7971
|
+
}
|
|
7972
|
+
</label>
|
|
7973
|
+
<f-password
|
|
7974
|
+
[inputId]="form.provider + '-client-secret'"
|
|
7975
|
+
styleClass="w-full"
|
|
7976
|
+
[placeholder]="
|
|
7977
|
+
form.hasClientSecret
|
|
7978
|
+
? ('social.config.client.secret.unchanged' | translate)
|
|
7979
|
+
: ''
|
|
7980
|
+
"
|
|
7981
|
+
[ngModel]="form.clientSecret"
|
|
7982
|
+
(ngModelChange)="updateField(form.provider, 'clientSecret', $event)"
|
|
7983
|
+
/>
|
|
7984
|
+
</div>
|
|
7985
|
+
|
|
7986
|
+
@if (form.provider === tenantProvider) {
|
|
7987
|
+
<div class="field">
|
|
7988
|
+
<label [for]="form.provider + '-tenant'" class="block font-medium mb-2">
|
|
7989
|
+
{{ 'social.config.tenant.id' | translate }}
|
|
7990
|
+
</label>
|
|
7991
|
+
<input
|
|
7992
|
+
fInputText
|
|
7993
|
+
[id]="form.provider + '-tenant'"
|
|
7994
|
+
class="w-full"
|
|
7995
|
+
[placeholder]="'social.config.tenant.id.example' | translate"
|
|
7996
|
+
[ngModel]="form.tenantId"
|
|
7997
|
+
(ngModelChange)="updateField(form.provider, 'tenantId', $event)"
|
|
7998
|
+
/>
|
|
7999
|
+
</div>
|
|
8000
|
+
}
|
|
8001
|
+
|
|
8002
|
+
<div class="field">
|
|
8003
|
+
<label [for]="form.provider + '-scopes'" class="block font-medium mb-2">
|
|
8004
|
+
{{ 'social.config.scopes' | translate }}
|
|
8005
|
+
</label>
|
|
8006
|
+
<input
|
|
8007
|
+
fInputText
|
|
8008
|
+
[id]="form.provider + '-scopes'"
|
|
8009
|
+
class="w-full"
|
|
8010
|
+
[placeholder]="'social.config.scopes.placeholder' | translate"
|
|
8011
|
+
[ngModel]="form.scopes"
|
|
8012
|
+
(ngModelChange)="updateField(form.provider, 'scopes', $event)"
|
|
8013
|
+
/>
|
|
8014
|
+
</div>
|
|
8015
|
+
|
|
8016
|
+
</div>
|
|
8017
|
+
}
|
|
8018
|
+
</div>
|
|
8019
|
+
}
|
|
8020
|
+
</div>
|
|
8021
|
+
}
|
|
8022
|
+
</div>
|
|
8023
|
+
`,
|
|
8024
|
+
}]
|
|
8025
|
+
}], ctorParameters: () => [] });
|
|
8026
|
+
function emptyForm(provider) {
|
|
8027
|
+
return {
|
|
8028
|
+
provider,
|
|
8029
|
+
id: null,
|
|
8030
|
+
isEnabled: false,
|
|
8031
|
+
clientId: '',
|
|
8032
|
+
clientSecret: '',
|
|
8033
|
+
hasClientSecret: false,
|
|
8034
|
+
tenantId: '',
|
|
8035
|
+
scopes: '',
|
|
8036
|
+
};
|
|
8037
|
+
}
|
|
8038
|
+
function mergeConfigs(configs) {
|
|
8039
|
+
return SOCIAL_PROVIDERS.map((provider) => {
|
|
8040
|
+
const config = configs.find((entry) => entry.provider === provider);
|
|
8041
|
+
if (!config)
|
|
8042
|
+
return emptyForm(provider);
|
|
8043
|
+
return {
|
|
8044
|
+
provider,
|
|
8045
|
+
id: config.id,
|
|
8046
|
+
isEnabled: config.isEnabled,
|
|
8047
|
+
clientId: config.clientId ?? '',
|
|
8048
|
+
clientSecret: '',
|
|
8049
|
+
hasClientSecret: config.hasClientSecret,
|
|
8050
|
+
tenantId: config.extraConfig?.['tenantId'] ?? '',
|
|
8051
|
+
scopes: (config.scopes ?? []).join(', '),
|
|
8052
|
+
};
|
|
8053
|
+
});
|
|
8054
|
+
}
|
|
8055
|
+
/** clientSecret is omitted here; callers decide whether to include a newly typed value. */
|
|
8056
|
+
function toBaseDto(form) {
|
|
8057
|
+
const scopes = form.scopes
|
|
8058
|
+
.split(',')
|
|
8059
|
+
.map((scope) => scope.trim())
|
|
8060
|
+
.filter(Boolean);
|
|
8061
|
+
return {
|
|
8062
|
+
provider: form.provider,
|
|
8063
|
+
isEnabled: form.isEnabled,
|
|
8064
|
+
clientId: form.clientId.trim(),
|
|
8065
|
+
...(scopes.length ? { scopes } : {}),
|
|
8066
|
+
...(form.provider === TENANT_PROVIDER && form.tenantId.trim()
|
|
8067
|
+
? { extraConfig: { tenantId: form.tenantId.trim() } }
|
|
8068
|
+
: {}),
|
|
8069
|
+
};
|
|
8070
|
+
}
|
|
8071
|
+
function toCreateDto(form) {
|
|
8072
|
+
return { ...toBaseDto(form), clientSecret: form.clientSecret.trim() };
|
|
8073
|
+
}
|
|
8074
|
+
function toUpdateDto(form) {
|
|
8075
|
+
const trimmedSecret = form.clientSecret.trim();
|
|
8076
|
+
return {
|
|
8077
|
+
id: form.id,
|
|
8078
|
+
...toBaseDto(form),
|
|
8079
|
+
// Blank means "keep the previously stored secret" - never overwrite it with an empty value.
|
|
8080
|
+
...(trimmedSecret ? { clientSecret: trimmedSecret } : {}),
|
|
8081
|
+
};
|
|
8082
|
+
}
|
|
8083
|
+
|
|
8084
|
+
var socialConfigPage_component = /*#__PURE__*/Object.freeze({
|
|
8085
|
+
__proto__: null,
|
|
8086
|
+
SocialConfigPageComponent: SocialConfigPageComponent
|
|
8087
|
+
});
|
|
8088
|
+
|
|
7130
8089
|
class UserFormComponent {
|
|
7131
8090
|
destroyRef = inject(DestroyRef);
|
|
7132
8091
|
router = inject(Router);
|
|
@@ -7436,8 +8395,8 @@ class UserFormComponent {
|
|
|
7436
8395
|
onCancel() {
|
|
7437
8396
|
this.router.navigate(['/administration/users']);
|
|
7438
8397
|
}
|
|
7439
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
7440
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.
|
|
8398
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: UserFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
8399
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: UserFormComponent, isStandalone: true, selector: "lib-user-form", ngImport: i0, template: `
|
|
7441
8400
|
<f-card>
|
|
7442
8401
|
<ng-template #header>
|
|
7443
8402
|
<div class="flex justify-between items-center p-4">
|
|
@@ -7532,10 +8491,8 @@ class UserFormComponent {
|
|
|
7532
8491
|
</label>
|
|
7533
8492
|
@if (field.component) {
|
|
7534
8493
|
<ng-container
|
|
7535
|
-
|
|
7536
|
-
|
|
7537
|
-
injector: getFieldInjector(field)
|
|
7538
|
-
"
|
|
8494
|
+
[ngComponentOutlet]="field.component"
|
|
8495
|
+
[ngComponentOutletInjector]="getFieldInjector(field)"
|
|
7539
8496
|
/>
|
|
7540
8497
|
} @else if (field.template) {
|
|
7541
8498
|
<ng-container
|
|
@@ -7732,13 +8689,28 @@ class UserFormComponent {
|
|
|
7732
8689
|
</div>
|
|
7733
8690
|
</form>
|
|
7734
8691
|
</f-card>
|
|
7735
|
-
`, isInline: true, dependencies: [{ kind: "
|
|
8692
|
+
`, isInline: true, dependencies: [{ kind: "component", type: CardComponent, selector: "f-card", inputs: ["header", "subheader", "styleClass", "style"] }, { kind: "component", type: CheckboxComponent, selector: "f-checkbox", inputs: ["label", "binary", "disabled", "readonly", "inputId", "invalid", "indeterminate", "variant", "size", "touched", "styleClass", "style", "checked"], outputs: ["onChange", "onBlur", "touch", "checkedChange"] }, { kind: "directive", type: FButtonDirective, selector: "[fButton]", inputs: ["severity", "text", "outlined", "link", "variant", "rounded", "raised", "fluid", "disabled", "loading", "loadingIcon", "size", "label", "icon", "iconPos", "ariaLabel", "plain"] }, { kind: "directive", type: InputTextDirective, selector: "[fInputText]", inputs: ["invalid", "touched", "variant", "size", "fluid"] }, { kind: "component", type: PasswordComponent, selector: "f-password", inputs: ["toggleMask", "feedback", "disabled", "placeholder", "inputId", "invalid", "touched", "inputStyleClass", "styleClass", "style", "ariaDescribedby", "autocomplete", "variant", "size", "fluid", "appendTo", "promptLabel", "weakLabel", "mediumLabel", "strongLabel", "mediumRegex", "strongRegex"], outputs: ["onBlur", "onFocus"] }, { kind: "component", type: SelectComponent, selector: "f-select", inputs: ["options", "optionLabel", "optionValue", "placeholder", "disabled", "filter", "filterBy", "filterMatchMode", "filterLocale", "filterPlaceholder", "resetFilterOnHide", "autofocusFilter", "emptyMessage", "emptyFilterMessage", "showClear", "loading", "loadingIcon", "dropdownIcon", "clearIcon", "inputId", "invalid", "touched", "styleClass", "style", "appendTo", "editable", "readonly", "autofocus", "checkmark", "group", "optionGroupLabel", "optionGroupChildren", "virtualScroll", "virtualScrollItemSize", "lazy"], outputs: ["onFilter", "onChange", "onShow", "onHide", "onBlur", "onFocus", "onClear", "onLazyLoad"] }, { kind: "component", type: SkeletonComponent, selector: "f-skeleton", inputs: ["width", "height", "size", "borderRadius", "shape", "animation", "styleClass"] }, { kind: "directive", type: TextareaDirective, selector: "[fTextarea]", inputs: ["invalid", "touched", "variant", "fluid", "autoResize"], outputs: ["onResize"] }, { kind: "component", type: UiIconComponent, selector: "ui-icon", inputs: ["name", "size", "spin", "fill", "severity"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i1.NgForm, selector: "form:not([ngNoForm]):not([formGroup]):not([formArray]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule"], exportAs: ["ngComponentOutlet"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: FormField, selector: "[formField]", inputs: ["formField"], exportAs: ["formField"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] });
|
|
7736
8693
|
}
|
|
7737
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
8694
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: UserFormComponent, decorators: [{
|
|
7738
8695
|
type: Component,
|
|
7739
8696
|
args: [{
|
|
7740
8697
|
selector: 'lib-user-form',
|
|
7741
|
-
imports: [
|
|
8698
|
+
imports: [
|
|
8699
|
+
CardComponent,
|
|
8700
|
+
CheckboxComponent,
|
|
8701
|
+
FButtonDirective,
|
|
8702
|
+
InputTextDirective,
|
|
8703
|
+
PasswordComponent,
|
|
8704
|
+
SelectComponent,
|
|
8705
|
+
SkeletonComponent,
|
|
8706
|
+
TextareaDirective,
|
|
8707
|
+
UiIconComponent,
|
|
8708
|
+
FormsModule,
|
|
8709
|
+
NgComponentOutlet,
|
|
8710
|
+
NgTemplateOutlet,
|
|
8711
|
+
FormField,
|
|
8712
|
+
TranslatePipe,
|
|
8713
|
+
],
|
|
7742
8714
|
template: `
|
|
7743
8715
|
<f-card>
|
|
7744
8716
|
<ng-template #header>
|
|
@@ -7834,10 +8806,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
7834
8806
|
</label>
|
|
7835
8807
|
@if (field.component) {
|
|
7836
8808
|
<ng-container
|
|
7837
|
-
|
|
7838
|
-
|
|
7839
|
-
injector: getFieldInjector(field)
|
|
7840
|
-
"
|
|
8809
|
+
[ngComponentOutlet]="field.component"
|
|
8810
|
+
[ngComponentOutletInjector]="getFieldInjector(field)"
|
|
7841
8811
|
/>
|
|
7842
8812
|
} @else if (field.template) {
|
|
7843
8813
|
<ng-container
|
|
@@ -8150,8 +9120,8 @@ class UserBranchPermissionDialogComponent {
|
|
|
8150
9120
|
onClose() {
|
|
8151
9121
|
this.closed.emit();
|
|
8152
9122
|
}
|
|
8153
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
8154
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.
|
|
9123
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: UserBranchPermissionDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
9124
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: UserBranchPermissionDialogComponent, isStandalone: true, selector: "lib-user-branch-permission-dialog", inputs: { visible: { classPropertyName: "visible", publicName: "visible", isSignal: true, isRequired: true, transformFunction: null }, user: { classPropertyName: "user", publicName: "user", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { closed: "closed", permissionsChanged: "permissionsChanged" }, ngImport: i0, template: `
|
|
8155
9125
|
<f-dialog
|
|
8156
9126
|
[visible]="visible()"
|
|
8157
9127
|
[modal]="true"
|
|
@@ -8238,15 +9208,19 @@ class UserBranchPermissionDialogComponent {
|
|
|
8238
9208
|
</button>
|
|
8239
9209
|
</ng-template>
|
|
8240
9210
|
</f-dialog>
|
|
8241
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type:
|
|
9211
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: CheckboxComponent, selector: "f-checkbox", inputs: ["label", "binary", "disabled", "readonly", "inputId", "invalid", "indeterminate", "variant", "size", "touched", "styleClass", "style", "checked"], outputs: ["onChange", "onBlur", "touch", "checkedChange"] }, { kind: "component", type: DialogComponent, selector: "f-dialog", inputs: ["header", "visible", "modal", "closable", "closeOnEscape", "dismissableMask", "resizable", "draggable", "maximizable", "blockScroll", "returnFocusOnClose", "position", "style", "styleClass", "breakpoints"], outputs: ["visibleChange", "onShow", "onHide", "onMaximize"] }, { kind: "directive", type: FButtonDirective, selector: "[fButton]", inputs: ["severity", "text", "outlined", "link", "variant", "rounded", "raised", "fluid", "disabled", "loading", "loadingIcon", "size", "label", "icon", "iconPos", "ariaLabel", "plain"] }, { kind: "component", type: ProgressSpinnerComponent, selector: "f-progressspinner", inputs: ["size", "strokeWidth", "animationDuration", "styleClass", "ariaLabel"] }, { kind: "component", type: SelectComponent, selector: "f-select", inputs: ["options", "optionLabel", "optionValue", "placeholder", "disabled", "filter", "filterBy", "filterMatchMode", "filterLocale", "filterPlaceholder", "resetFilterOnHide", "autofocusFilter", "emptyMessage", "emptyFilterMessage", "showClear", "loading", "loadingIcon", "dropdownIcon", "clearIcon", "inputId", "invalid", "touched", "styleClass", "style", "appendTo", "editable", "readonly", "autofocus", "checkmark", "group", "optionGroupLabel", "optionGroupChildren", "virtualScroll", "virtualScrollItemSize", "lazy"], outputs: ["onFilter", "onChange", "onShow", "onHide", "onBlur", "onFocus", "onClear", "onLazyLoad"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] });
|
|
8242
9212
|
}
|
|
8243
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
9213
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: UserBranchPermissionDialogComponent, decorators: [{
|
|
8244
9214
|
type: Component,
|
|
8245
9215
|
args: [{
|
|
8246
9216
|
selector: 'lib-user-branch-permission-dialog',
|
|
8247
9217
|
imports: [
|
|
8248
|
-
|
|
8249
|
-
|
|
9218
|
+
FormsModule,
|
|
9219
|
+
CheckboxComponent,
|
|
9220
|
+
DialogComponent,
|
|
9221
|
+
FButtonDirective,
|
|
9222
|
+
ProgressSpinnerComponent,
|
|
9223
|
+
SelectComponent,
|
|
8250
9224
|
TranslatePipe,
|
|
8251
9225
|
],
|
|
8252
9226
|
template: `
|
|
@@ -8401,43 +9375,34 @@ class UserCompanyPermissionDialogComponent {
|
|
|
8401
9375
|
this.isLoading.set(false);
|
|
8402
9376
|
}
|
|
8403
9377
|
}
|
|
8404
|
-
async onCompanyToggle(company) {
|
|
9378
|
+
async onCompanyToggle(company, isAssigned) {
|
|
8405
9379
|
const currentUser = this.user();
|
|
8406
9380
|
if (!currentUser)
|
|
8407
9381
|
return;
|
|
8408
9382
|
this.isSaving.set(true);
|
|
8409
9383
|
try {
|
|
8410
|
-
|
|
8411
|
-
|
|
8412
|
-
|
|
9384
|
+
const response = isAssigned
|
|
9385
|
+
? await firstValueFrom(this.permissionApi.assignUserToCompany(currentUser.id, company.id))
|
|
9386
|
+
: await firstValueFrom(this.permissionApi.revokeUserFromCompany(currentUser.id, company.id));
|
|
9387
|
+
if (response.success) {
|
|
9388
|
+
if (isAssigned)
|
|
8413
9389
|
this.assignedCompanyIds.add(company.id);
|
|
8414
|
-
|
|
8415
|
-
severity: 'success',
|
|
8416
|
-
summary: this.t('shared.success'),
|
|
8417
|
-
detail: response?.messageKey
|
|
8418
|
-
? this.t(response.messageKey, response.messageVariables)
|
|
8419
|
-
: (response?.message ?? ''),
|
|
8420
|
-
});
|
|
8421
|
-
this.permissionsChanged.emit();
|
|
8422
|
-
}
|
|
8423
|
-
}
|
|
8424
|
-
else {
|
|
8425
|
-
const response = await firstValueFrom(this.permissionApi.revokeUserFromCompany(currentUser.id, company.id));
|
|
8426
|
-
if (response.success) {
|
|
9390
|
+
else
|
|
8427
9391
|
this.assignedCompanyIds.delete(company.id);
|
|
8428
|
-
|
|
8429
|
-
|
|
8430
|
-
|
|
8431
|
-
|
|
8432
|
-
|
|
8433
|
-
|
|
8434
|
-
|
|
8435
|
-
|
|
8436
|
-
|
|
9392
|
+
this.companies.update((list) => list.map((c) => (c.id === company.id ? { ...c, isAssigned } : c)));
|
|
9393
|
+
this.messageService.add({
|
|
9394
|
+
severity: 'success',
|
|
9395
|
+
summary: this.t('shared.success'),
|
|
9396
|
+
detail: response?.messageKey
|
|
9397
|
+
? this.t(response.messageKey, response.messageVariables)
|
|
9398
|
+
: (response?.message ?? ''),
|
|
9399
|
+
});
|
|
9400
|
+
this.permissionsChanged.emit();
|
|
8437
9401
|
}
|
|
8438
9402
|
}
|
|
8439
9403
|
catch {
|
|
8440
|
-
|
|
9404
|
+
// Signal was never optimistically updated, so the checkbox already
|
|
9405
|
+
// reflects the pre-toggle state once change detection re-runs below.
|
|
8441
9406
|
}
|
|
8442
9407
|
finally {
|
|
8443
9408
|
this.isSaving.set(false);
|
|
@@ -8446,8 +9411,8 @@ class UserCompanyPermissionDialogComponent {
|
|
|
8446
9411
|
onClose() {
|
|
8447
9412
|
this.closed.emit();
|
|
8448
9413
|
}
|
|
8449
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
8450
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.
|
|
9414
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: UserCompanyPermissionDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
9415
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: UserCompanyPermissionDialogComponent, isStandalone: true, selector: "lib-user-company-permission-dialog", inputs: { visible: { classPropertyName: "visible", publicName: "visible", isSignal: true, isRequired: true, transformFunction: null }, user: { classPropertyName: "user", publicName: "user", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { closed: "closed", permissionsChanged: "permissionsChanged" }, ngImport: i0, template: `
|
|
8451
9416
|
<f-dialog
|
|
8452
9417
|
[visible]="visible()"
|
|
8453
9418
|
[modal]="true"
|
|
@@ -8473,11 +9438,11 @@ class UserCompanyPermissionDialogComponent {
|
|
|
8473
9438
|
@for (company of companies(); track company.id) {
|
|
8474
9439
|
<div class="flex items-center p-3 border border-surface rounded">
|
|
8475
9440
|
<f-checkbox
|
|
8476
|
-
[
|
|
9441
|
+
[ngModel]="company.isAssigned"
|
|
8477
9442
|
[binary]="true"
|
|
8478
9443
|
[inputId]="'company-' + company.id"
|
|
8479
9444
|
[disabled]="isSaving()"
|
|
8480
|
-
(onChange)="onCompanyToggle(company)"
|
|
9445
|
+
(onChange)="onCompanyToggle(company, $event.checked)"
|
|
8481
9446
|
/>
|
|
8482
9447
|
<label
|
|
8483
9448
|
[for]="'company-' + company.id"
|
|
@@ -8507,15 +9472,18 @@ class UserCompanyPermissionDialogComponent {
|
|
|
8507
9472
|
</button>
|
|
8508
9473
|
</ng-template>
|
|
8509
9474
|
</f-dialog>
|
|
8510
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type:
|
|
9475
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: CheckboxComponent, selector: "f-checkbox", inputs: ["label", "binary", "disabled", "readonly", "inputId", "invalid", "indeterminate", "variant", "size", "touched", "styleClass", "style", "checked"], outputs: ["onChange", "onBlur", "touch", "checkedChange"] }, { kind: "component", type: DialogComponent, selector: "f-dialog", inputs: ["header", "visible", "modal", "closable", "closeOnEscape", "dismissableMask", "resizable", "draggable", "maximizable", "blockScroll", "returnFocusOnClose", "position", "style", "styleClass", "breakpoints"], outputs: ["visibleChange", "onShow", "onHide", "onMaximize"] }, { kind: "directive", type: FButtonDirective, selector: "[fButton]", inputs: ["severity", "text", "outlined", "link", "variant", "rounded", "raised", "fluid", "disabled", "loading", "loadingIcon", "size", "label", "icon", "iconPos", "ariaLabel", "plain"] }, { kind: "component", type: ProgressSpinnerComponent, selector: "f-progressspinner", inputs: ["size", "strokeWidth", "animationDuration", "styleClass", "ariaLabel"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] });
|
|
8511
9476
|
}
|
|
8512
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
9477
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: UserCompanyPermissionDialogComponent, decorators: [{
|
|
8513
9478
|
type: Component,
|
|
8514
9479
|
args: [{
|
|
8515
9480
|
selector: 'lib-user-company-permission-dialog',
|
|
8516
9481
|
imports: [
|
|
8517
|
-
|
|
8518
|
-
|
|
9482
|
+
FormsModule,
|
|
9483
|
+
CheckboxComponent,
|
|
9484
|
+
DialogComponent,
|
|
9485
|
+
FButtonDirective,
|
|
9486
|
+
ProgressSpinnerComponent,
|
|
8519
9487
|
TranslatePipe,
|
|
8520
9488
|
],
|
|
8521
9489
|
template: `
|
|
@@ -8544,11 +9512,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
8544
9512
|
@for (company of companies(); track company.id) {
|
|
8545
9513
|
<div class="flex items-center p-3 border border-surface rounded">
|
|
8546
9514
|
<f-checkbox
|
|
8547
|
-
[
|
|
9515
|
+
[ngModel]="company.isAssigned"
|
|
8548
9516
|
[binary]="true"
|
|
8549
9517
|
[inputId]="'company-' + company.id"
|
|
8550
9518
|
[disabled]="isSaving()"
|
|
8551
|
-
(onChange)="onCompanyToggle(company)"
|
|
9519
|
+
(onChange)="onCompanyToggle(company, $event.checked)"
|
|
8552
9520
|
/>
|
|
8553
9521
|
<label
|
|
8554
9522
|
[for]="'company-' + company.id"
|
|
@@ -8722,8 +9690,8 @@ class UserListComponent {
|
|
|
8722
9690
|
},
|
|
8723
9691
|
});
|
|
8724
9692
|
}
|
|
8725
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
8726
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.
|
|
9693
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: UserListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
9694
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: UserListComponent, isStandalone: true, selector: "lib-user-list", ngImport: i0, template: `
|
|
8727
9695
|
<f-card>
|
|
8728
9696
|
<ng-template #header>
|
|
8729
9697
|
<div
|
|
@@ -9013,17 +9981,26 @@ class UserListComponent {
|
|
|
9013
9981
|
}
|
|
9014
9982
|
</f-dialog>
|
|
9015
9983
|
}
|
|
9016
|
-
`, isInline: true, dependencies: [{ kind: "
|
|
9984
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: CardComponent, selector: "f-card", inputs: ["header", "subheader", "styleClass", "style"] }, { kind: "component", type: DialogComponent, selector: "f-dialog", inputs: ["header", "visible", "modal", "closable", "closeOnEscape", "dismissableMask", "resizable", "draggable", "maximizable", "blockScroll", "returnFocusOnClose", "position", "style", "styleClass", "breakpoints"], outputs: ["visibleChange", "onShow", "onHide", "onMaximize"] }, { kind: "directive", type: FButtonDirective, selector: "[fButton]", inputs: ["severity", "text", "outlined", "link", "variant", "rounded", "raised", "fluid", "disabled", "loading", "loadingIcon", "size", "label", "icon", "iconPos", "ariaLabel", "plain"] }, { kind: "component", type: TableComponent, selector: "f-table", inputs: ["value", "lazy", "loading", "rows", "totalRecords", "rowHover", "dataKey", "scrollable", "scrollHeight", "paginator", "first", "rowsPerPageOptions", "showCurrentPageReport", "currentPageReportTemplate", "tableStyle", "styleClass", "globalFilterFields", "filterDelay", "responsiveLayout", "selectionMode", "sortMode", "rowExpandMode", "resizableColumns", "rowStyleClass", "virtualScroll", "virtualScrollItemSize", "sortField", "sortOrder", "multiSortMeta", "filters", "selection", "expandedRowKeys", "contextMenuSelection"], outputs: ["sortFieldChange", "sortOrderChange", "multiSortMetaChange", "filtersChange", "selectionChange", "expandedRowKeysChange", "contextMenuSelectionChange", "onLazyLoad", "onSort", "onFilter", "onRowSelect", "onRowUnselect", "onSelectAllChange", "onRowExpand", "onRowCollapse", "onColResize", "onRowContextMenu"] }, { kind: "component", type: TagComponent, selector: "f-tag", inputs: ["value", "severity", "icon", "rounded", "color", "styleClass", "style"] }, { kind: "directive", type: TooltipDirective, selector: "[fTooltip]", inputs: ["fTooltip", "tooltipPosition", "positionStyle", "tooltipStyleClass", "disabled", "tooltipEvent", "showDelay", "hideDelay", "life", "autoHide", "positionTop", "positionLeft", "escape"] }, { kind: "component", type: UiIconComponent, selector: "ui-icon", inputs: ["name", "size", "spin", "fill", "severity"] }, { kind: "directive", type: HasPermissionDirective, selector: "[hasPermission]", inputs: ["hasPermission"] }, { kind: "component", type: UserCompanyPermissionDialogComponent, selector: "lib-user-company-permission-dialog", inputs: ["visible", "user"], outputs: ["closed", "permissionsChanged"] }, { kind: "component", type: UserBranchPermissionDialogComponent, selector: "lib-user-branch-permission-dialog", inputs: ["visible", "user"], outputs: ["closed", "permissionsChanged"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] });
|
|
9017
9985
|
}
|
|
9018
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
9986
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: UserListComponent, decorators: [{
|
|
9019
9987
|
type: Component,
|
|
9020
9988
|
args: [{
|
|
9021
9989
|
selector: 'lib-user-list',
|
|
9022
|
-
imports: [
|
|
9990
|
+
imports: [
|
|
9991
|
+
NgTemplateOutlet,
|
|
9992
|
+
CardComponent,
|
|
9993
|
+
DialogComponent,
|
|
9994
|
+
FButtonDirective,
|
|
9995
|
+
TableComponent,
|
|
9996
|
+
TagComponent,
|
|
9997
|
+
TooltipDirective,
|
|
9998
|
+
UiIconComponent,
|
|
9023
9999
|
HasPermissionDirective,
|
|
9024
10000
|
TranslatePipe,
|
|
9025
10001
|
UserCompanyPermissionDialogComponent,
|
|
9026
|
-
UserBranchPermissionDialogComponent,
|
|
10002
|
+
UserBranchPermissionDialogComponent,
|
|
10003
|
+
],
|
|
9027
10004
|
template: `
|
|
9028
10005
|
<f-card>
|
|
9029
10006
|
<ng-template #header>
|
|
@@ -9419,7 +10396,8 @@ class VerifyEmailPageComponent {
|
|
|
9419
10396
|
this.pageState.set('resend');
|
|
9420
10397
|
this.resendSuccess.set(false);
|
|
9421
10398
|
}
|
|
9422
|
-
onResend() {
|
|
10399
|
+
onResend(event) {
|
|
10400
|
+
event.preventDefault();
|
|
9423
10401
|
if (!this.isResendFormValid()) {
|
|
9424
10402
|
this.messageService.add({
|
|
9425
10403
|
severity: 'error',
|
|
@@ -9452,8 +10430,8 @@ class VerifyEmailPageComponent {
|
|
|
9452
10430
|
this.submittedEmail.set(email);
|
|
9453
10431
|
this.resendSuccess.set(true);
|
|
9454
10432
|
}
|
|
9455
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
9456
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.
|
|
10433
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: VerifyEmailPageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
10434
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: VerifyEmailPageComponent, isStandalone: true, selector: "lib-verify-email-page", ngImport: i0, template: `
|
|
9457
10435
|
<app-floating-configurator />
|
|
9458
10436
|
<div
|
|
9459
10437
|
class="bg-surface-ground flex items-center justify-center min-h-screen"
|
|
@@ -9546,7 +10524,7 @@ class VerifyEmailPageComponent {
|
|
|
9546
10524
|
</div>
|
|
9547
10525
|
|
|
9548
10526
|
@if (!resendSuccess()) {
|
|
9549
|
-
<form (
|
|
10527
|
+
<form (submit)="onResend($event)">
|
|
9550
10528
|
<label
|
|
9551
10529
|
for="email"
|
|
9552
10530
|
class="block text-lg font-medium mb-2 text-color"
|
|
@@ -9606,15 +10584,17 @@ class VerifyEmailPageComponent {
|
|
|
9606
10584
|
</div>
|
|
9607
10585
|
</div>
|
|
9608
10586
|
</div>
|
|
9609
|
-
`, isInline: true, dependencies: [{ kind: "
|
|
10587
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "routerLink"] }, { kind: "directive", type: FButtonDirective, selector: "[fButton]", inputs: ["severity", "text", "outlined", "link", "variant", "rounded", "raised", "fluid", "disabled", "loading", "loadingIcon", "size", "label", "icon", "iconPos", "ariaLabel", "plain"] }, { kind: "directive", type: InputTextDirective, selector: "[fInputText]", inputs: ["invalid", "touched", "variant", "size", "fluid"] }, { kind: "component", type: UiIconComponent, selector: "ui-icon", inputs: ["name", "size", "spin", "fill", "severity"] }, { kind: "directive", type: FormField, selector: "[formField]", inputs: ["formField"], exportAs: ["formField"] }, { kind: "component", type: AppFloatingConfigurator, selector: "app-floating-configurator" }, { kind: "pipe", type: TranslatePipe, name: "translate" }] });
|
|
9610
10588
|
}
|
|
9611
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
10589
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: VerifyEmailPageComponent, decorators: [{
|
|
9612
10590
|
type: Component,
|
|
9613
10591
|
args: [{
|
|
9614
10592
|
selector: 'lib-verify-email-page',
|
|
9615
10593
|
imports: [
|
|
9616
|
-
|
|
9617
|
-
|
|
10594
|
+
RouterLink,
|
|
10595
|
+
FButtonDirective,
|
|
10596
|
+
InputTextDirective,
|
|
10597
|
+
UiIconComponent,
|
|
9618
10598
|
FormField,
|
|
9619
10599
|
AppFloatingConfigurator,
|
|
9620
10600
|
TranslatePipe,
|
|
@@ -9712,7 +10692,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
9712
10692
|
</div>
|
|
9713
10693
|
|
|
9714
10694
|
@if (!resendSuccess()) {
|
|
9715
|
-
<form (
|
|
10695
|
+
<form (submit)="onResend($event)">
|
|
9716
10696
|
<label
|
|
9717
10697
|
for="email"
|
|
9718
10698
|
class="block text-lg font-medium mb-2 text-color"
|
|
@@ -9784,11 +10764,11 @@ var verifyEmailPage_component = /*#__PURE__*/Object.freeze({
|
|
|
9784
10764
|
// =============================================================================
|
|
9785
10765
|
// @flusys/ng-auth - Authentication Package
|
|
9786
10766
|
// =============================================================================
|
|
9787
|
-
//
|
|
10767
|
+
// Enums
|
|
9788
10768
|
|
|
9789
10769
|
/**
|
|
9790
10770
|
* Generated bundle index. Do not edit.
|
|
9791
10771
|
*/
|
|
9792
10772
|
|
|
9793
|
-
export { ADMINISTRATION_ROUTES, AUTH_ENDPOINTS, AUTH_MESSAGES, AUTH_PROFILE_EXTENSION, AUTH_REGISTRATION_EXTENSION, AUTH_ROUTES, AUTH_USER_DETAIL_CONFIG, AUTH_USER_FORM_EXTENSION, AUTH_USER_LIST_EXTENSION, AUTH_VALIDATION_CONFIG, AdministrationPageComponent, AuthApiService, AuthCompanyApiProviderAdapter, AuthInitService, AuthLayoutApiAdapter, AuthLayoutStateAdapter, AuthStateProviderAdapter, AuthStateService, AuthUserPermissionProviderAdapter, AuthUserProviderAdapter, BranchApiService, BranchFormComponent, BranchListComponent, CompanyApiService, CompanyFormComponent, CompanyListComponent, ForgotPasswordPageComponent, LoginPageComponent, PROFILE_FIELD_CONTEXT, PROFILE_ROUTES, ProfilePageComponent, REGISTRATION_FIELD_CONTEXT, RegisterPageComponent, ResetPasswordPageComponent, TokenRefreshStateService, USER_FORM_FIELD_CONTEXT, UserApiService, UserBranchPermissionDialogComponent, UserCompanyPermissionDialogComponent, UserFormComponent, UserListComponent, UserPermissionApiService, VerifyEmailPageComponent, authGuard, authInterceptor, companyFeatureGuard, emailFeatureGuard, guestGuard, isCompanySelectionResponse, isEmailVerificationRequired, isEndpoint, isLoginResponse, provideAuthLayoutIntegration, provideAuthProviders, signUpFeatureGuard, tokenRefreshInterceptor, validateEmail, validatePassword };
|
|
10773
|
+
export { ADMINISTRATION_ROUTES, AUTH_ENDPOINTS, AUTH_MESSAGES, AUTH_PROFILE_EXTENSION, AUTH_REGISTRATION_EXTENSION, AUTH_ROUTES, AUTH_USER_DETAIL_CONFIG, AUTH_USER_FORM_EXTENSION, AUTH_USER_LIST_EXTENSION, AUTH_VALIDATION_CONFIG, AdministrationPageComponent, AuthApiService, AuthCompanyApiProviderAdapter, AuthInitService, AuthLayoutApiAdapter, AuthLayoutStateAdapter, AuthStateProviderAdapter, AuthStateService, AuthUserPermissionProviderAdapter, AuthUserProviderAdapter, BranchApiService, BranchFormComponent, BranchListComponent, CompanyApiService, CompanyFormComponent, CompanyListComponent, ForgotPasswordPageComponent, LoginPageComponent, PROFILE_FIELD_CONTEXT, PROFILE_ROUTES, ProfilePageComponent, REGISTRATION_FIELD_CONTEXT, RegisterPageComponent, ResetPasswordPageComponent, SOCIAL_PROVIDERS, SOCIAL_RETURN_URL_KEY, SocialAuthApiService, SocialAuthConfigApiService, SocialCallbackPageComponent, SocialConfigPageComponent, SocialLoginButtonsComponent, SocialProviderEnum, TokenRefreshStateService, USER_FORM_FIELD_CONTEXT, UserApiService, UserBranchPermissionDialogComponent, UserCompanyPermissionDialogComponent, UserFormComponent, UserListComponent, UserPermissionApiService, VerifyEmailPageComponent, authGuard, authInterceptor, companyFeatureGuard, emailFeatureGuard, guestGuard, isCompanySelectionResponse, isEmailVerificationRequired, isEndpoint, isLoginResponse, provideAuthLayoutIntegration, provideAuthProviders, signUpFeatureGuard, tokenRefreshInterceptor, validateEmail, validatePassword };
|
|
9794
10774
|
//# sourceMappingURL=flusys-ng-auth.mjs.map
|