@flusys/ng-auth 5.0.1 → 5.0.4

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.
@@ -1,11 +1,11 @@
1
1
  import { HttpClient } from '@angular/common/http';
2
2
  import * as i0 from '@angular/core';
3
3
  import { inject, Injectable, signal, computed, effect, PLATFORM_ID, InjectionToken, Component, untracked, DestroyRef, input, Injector, output, resource, makeStateKey, TransferState } from '@angular/core';
4
- import { APP_CONFIG, getServiceUrl, TRANSLATE_ADAPTER, isCompanyFeatureEnabled, isEmailFeatureEnabled, isSignUpEnabled, isFeatureEnabled, getPermissionMode, getDefaultCompanySlug, getDefaultBranchSlug } from '@flusys/ng-core';
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
6
  import * as i2$1 from '@angular/router';
7
7
  import { Router, RouterOutlet, RouterLink, RouterLinkActive, ActivatedRoute } from '@angular/router';
8
- import { PlatformService, ApiResourceService, CookieService, resolveTranslationModule, SHARED_MESSAGES, permissionGuard, USER_PERMISSIONS, COMPANY_PERMISSIONS, BRANCH_PERMISSIONS, USER_PROVIDER, COMPANY_API_PROVIDER, USER_PERMISSION_PROVIDER, AUTH_STATE_PROVIDER, PermissionValidatorService, TranslatePipe, AngularModule, PrimeModule, HasPermissionDirective, FileUrlService, FILE_PROVIDER, PROFILE_PERMISSION_PROVIDER, FileUploaderComponent } from '@flusys/ng-shared';
8
+ import { PlatformService, TranslateService, ApiResourceService, CookieService, resolveTranslationModule, SHARED_MESSAGES, permissionGuard, USER_PERMISSIONS, COMPANY_PERMISSIONS, BRANCH_PERMISSIONS, USER_PROVIDER, COMPANY_API_PROVIDER, USER_PERMISSION_PROVIDER, AUTH_STATE_PROVIDER, PermissionValidatorService, TranslatePipe, AngularModule, PrimeModule, HasPermissionDirective, FileUrlService, FILE_PROVIDER, PROFILE_PERMISSION_PROVIDER, FileUploaderComponent } from '@flusys/ng-shared';
9
9
  import { map as map$1, catchError as catchError$1, tap as tap$1 } from 'rxjs/operators';
10
10
  import * as i1$1 from '@angular/common';
11
11
  import { isPlatformBrowser, CommonModule } from '@angular/common';
@@ -113,7 +113,7 @@ class AuthStateService {
113
113
  appConfig = inject(APP_CONFIG);
114
114
  router = inject(Router);
115
115
  platform = inject(PlatformService);
116
- translateAdapter = inject(TRANSLATE_ADAPTER, {
116
+ translateAdapter = inject(TranslateService, {
117
117
  optional: true,
118
118
  });
119
119
  // Core State (private writable, public readonly)
@@ -372,7 +372,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
372
372
  */
373
373
  class BranchApiService extends ApiResourceService {
374
374
  constructor() {
375
- super('branch', inject(HttpClient), 'administration');
375
+ super('branch', 'administration');
376
376
  }
377
377
  fetchByCompany(companyId, search = '') {
378
378
  this.fetchList(search, { filter: { companyId } });
@@ -391,7 +391,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
391
391
  */
392
392
  class CompanyApiService extends ApiResourceService {
393
393
  constructor() {
394
- super('company', inject(HttpClient), 'administration');
394
+ super('company', 'administration');
395
395
  }
396
396
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: CompanyApiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
397
397
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: CompanyApiService, providedIn: 'root' });
@@ -436,7 +436,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
436
436
  */
437
437
  class UserApiService extends ApiResourceService {
438
438
  constructor() {
439
- super('users', inject(HttpClient), 'administration');
439
+ super('users', 'administration');
440
440
  }
441
441
  updateProfile(data) {
442
442
  return this.http.post(`${this.baseUrl}/profile`, data);
@@ -636,7 +636,7 @@ function tokenRefreshInterceptor(req, next) {
636
636
  const platformId = inject(PLATFORM_ID);
637
637
  const isBrowser = isPlatformBrowser(platformId);
638
638
  const refreshState = inject(TokenRefreshStateService);
639
- const translateAdapter = inject(TRANSLATE_ADAPTER, { optional: true });
639
+ const translateAdapter = inject(TranslateService, { optional: true });
640
640
  const t = (key) => translateAdapter?.translate(key) ?? key;
641
641
  // Skip refresh for these endpoints to prevent infinite loops
642
642
  const isRefreshRequest = isEndpoint(req.url, AUTH_ENDPOINTS.REFRESH);
@@ -1274,19 +1274,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
1274
1274
  class AuthUserProviderAdapter {
1275
1275
  userApi = inject(UserApiService);
1276
1276
  getUsers(filter) {
1277
+ const { search, page, pageSize, isActive, ...extraFilters } = filter || {};
1277
1278
  const apiFilter = {
1278
1279
  pagination: {
1279
- currentPage: filter?.page ?? 0,
1280
- pageSize: filter?.pageSize ?? 50,
1280
+ currentPage: page ?? 0,
1281
+ pageSize: pageSize ?? 50,
1281
1282
  },
1282
1283
  filter: {
1283
- ...(filter?.companyId && { companyId: filter.companyId }),
1284
- ...(filter?.branchId && { branchId: filter.branchId }),
1285
- ...(filter?.isActive !== undefined && { isActive: filter.isActive }),
1284
+ ...(isActive !== undefined && { isActive }),
1285
+ // ✅ include all additional dynamic filters
1286
+ ...Object.fromEntries(Object.entries(extraFilters).filter(([_, v]) => v !== undefined && v !== null)),
1286
1287
  },
1287
1288
  sort: { name: 'ASC' },
1288
1289
  };
1289
- return from(this.userApi.getAll(apiFilter, filter?.search ?? '')).pipe(map((response) => ({
1290
+ return from(this.userApi.getAll(apiFilter, search ?? '')).pipe(map((response) => ({
1290
1291
  success: response.success,
1291
1292
  message: response.message,
1292
1293
  messageKey: response.messageKey,
@@ -1553,7 +1554,7 @@ class BranchFormComponent {
1553
1554
  branchService = inject(BranchApiService);
1554
1555
  companyService = inject(CompanyApiService);
1555
1556
  authState = inject(AuthStateService);
1556
- translateAdapter = inject(TRANSLATE_ADAPTER, {
1557
+ translateAdapter = inject(TranslateService, {
1557
1558
  optional: true,
1558
1559
  });
1559
1560
  translate(key, vars) {
@@ -2046,7 +2047,7 @@ class BranchListComponent {
2046
2047
  branchService = inject(BranchApiService);
2047
2048
  companyService = inject(CompanyApiService);
2048
2049
  authState = inject(AuthStateService);
2049
- translateAdapter = inject(TRANSLATE_ADAPTER, {
2050
+ translateAdapter = inject(TranslateService, {
2050
2051
  optional: true,
2051
2052
  });
2052
2053
  translate(key, vars) {
@@ -2407,7 +2408,7 @@ class CompanyFormComponent {
2407
2408
  route = inject(ActivatedRoute);
2408
2409
  messageService = inject(MessageService);
2409
2410
  companyService = inject(CompanyApiService);
2410
- translateAdapter = inject(TRANSLATE_ADAPTER, {
2411
+ translateAdapter = inject(TranslateService, {
2411
2412
  optional: true,
2412
2413
  });
2413
2414
  translate(key, vars) {
@@ -2846,7 +2847,7 @@ class CompanyListComponent {
2846
2847
  messageService = inject(MessageService);
2847
2848
  confirmationService = inject(ConfirmationService);
2848
2849
  companyService = inject(CompanyApiService);
2849
- translateAdapter = inject(TRANSLATE_ADAPTER, {
2850
+ translateAdapter = inject(TranslateService, {
2850
2851
  optional: true,
2851
2852
  });
2852
2853
  translate(key, vars) {
@@ -3141,7 +3142,7 @@ class ForgotPasswordPageComponent {
3141
3142
  destroyRef = inject(DestroyRef);
3142
3143
  messageService = inject(MessageService);
3143
3144
  authApi = inject(AuthApiService);
3144
- translateAdapter = inject(TRANSLATE_ADAPTER, {
3145
+ translateAdapter = inject(TranslateService, {
3145
3146
  optional: true,
3146
3147
  });
3147
3148
  translate(key, vars) {
@@ -3414,7 +3415,7 @@ class LoginPageComponent {
3414
3415
  messageService = inject(MessageService);
3415
3416
  authApi = inject(AuthApiService);
3416
3417
  authState = inject(AuthStateService);
3417
- translateAdapter = inject(TRANSLATE_ADAPTER, {
3418
+ translateAdapter = inject(TranslateService, {
3418
3419
  optional: true,
3419
3420
  });
3420
3421
  validationConfig = inject(AUTH_VALIDATION_CONFIG, {
@@ -3486,7 +3487,7 @@ class LoginPageComponent {
3486
3487
  });
3487
3488
  isSelectionFormValid = computed(() => this.selectionForm().valid(), ...(ngDevMode ? [{ debugName: "isSelectionFormValid" }] : []));
3488
3489
  companyFeatureEnabled = computed(() => isCompanyFeatureEnabled(this.appConfig), ...(ngDevMode ? [{ debugName: "companyFeatureEnabled" }] : []));
3489
- emailFeatureEnabled = computed(() => isEmailFeatureEnabled(this.appConfig), ...(ngDevMode ? [{ debugName: "emailFeatureEnabled" }] : []));
3490
+ emailFeatureEnabled = computed(() => isServiceEnabled(this.appConfig, 'email'), ...(ngDevMode ? [{ debugName: "emailFeatureEnabled" }] : []));
3490
3491
  signUpEnabled = computed(() => isSignUpEnabled(this.appConfig), ...(ngDevMode ? [{ debugName: "signUpEnabled" }] : []));
3491
3492
  sessionId = null;
3492
3493
  companies = signal([], ...(ngDevMode ? [{ debugName: "companies" }] : []));
@@ -4272,7 +4273,7 @@ class ProfilePageComponent {
4272
4273
  userFormExtension = inject(AUTH_USER_FORM_EXTENSION, {
4273
4274
  optional: true,
4274
4275
  });
4275
- translateAdapter = inject(TRANSLATE_ADAPTER, {
4276
+ translateAdapter = inject(TranslateService, {
4276
4277
  optional: true,
4277
4278
  });
4278
4279
  translate(key, vars) {
@@ -4334,9 +4335,9 @@ class ProfilePageComponent {
4334
4335
  }, ...(ngDevMode ? [{ debugName: "userInitials" }] : []));
4335
4336
  companyName = computed(() => this.authState.companyName(), ...(ngDevMode ? [{ debugName: "companyName" }] : []));
4336
4337
  branchName = computed(() => this.authState.branchName(), ...(ngDevMode ? [{ debugName: "branchName" }] : []));
4337
- showUploadSection = computed(() => isFeatureEnabled(this.appConfig, 'storage') && this.fileProvider !== null, ...(ngDevMode ? [{ debugName: "showUploadSection" }] : []));
4338
+ showUploadSection = computed(() => isServiceEnabled(this.appConfig, 'storage') && this.fileProvider !== null, ...(ngDevMode ? [{ debugName: "showUploadSection" }] : []));
4338
4339
  showCompanySection = computed(() => isCompanyFeatureEnabled(this.appConfig), ...(ngDevMode ? [{ debugName: "showCompanySection" }] : []));
4339
- showPermissionsSection = computed(() => isFeatureEnabled(this.appConfig, 'iam') &&
4340
+ showPermissionsSection = computed(() => isServiceEnabled(this.appConfig, 'iam') &&
4340
4341
  this.permissionProvider !== null, ...(ngDevMode ? [{ debugName: "showPermissionsSection" }] : []));
4341
4342
  permissionMode = computed(() => getPermissionMode(this.appConfig), ...(ngDevMode ? [{ debugName: "permissionMode" }] : []));
4342
4343
  showRoles = computed(() => {
@@ -4445,7 +4446,7 @@ class ProfilePageComponent {
4445
4446
  this.originalFormModel.set(initialValues);
4446
4447
  this.formModel.set(initialValues);
4447
4448
  if (user.profilePictureId &&
4448
- isFeatureEnabled(this.appConfig, 'storage')) {
4449
+ isServiceEnabled(this.appConfig, 'storage')) {
4449
4450
  this.fileUrlService
4450
4451
  .fetchSingleFileUrl(user.profilePictureId)
4451
4452
  .pipe(takeUntilDestroyed(this.destroyRef))
@@ -4739,7 +4740,7 @@ class ProfilePageComponent {
4739
4740
  @for (field of editableFields(); track field.key) {
4740
4741
  <div class="flex flex-col gap-2">
4741
4742
  <label [for]="field.key" class="font-medium text-color">
4742
- {{ field.labelKey | translate : null : field.label
4743
+ {{ field.labelKey | translate: null : field.label
4743
4744
  }}{{ field.required ? ' *' : '' }}
4744
4745
  </label>
4745
4746
  @if (field.component) {
@@ -4793,7 +4794,9 @@ class ProfilePageComponent {
4793
4794
  <div class="grid grid-cols-1 md:grid-cols-2 gap-4">
4794
4795
  @for (field of viewOnlyFields(); track field.key) {
4795
4796
  <div class="flex flex-col gap-1">
4796
- <label class="text-sm text-muted-color">{{ field.labelKey | translate : null : field.label }}</label>
4797
+ <label class="text-sm text-muted-color">{{
4798
+ field.labelKey | translate: null : field.label
4799
+ }}</label>
4797
4800
  <span class="text-color font-medium">
4798
4801
  @if (field.type === 'select') {
4799
4802
  {{
@@ -4820,7 +4823,8 @@ class ProfilePageComponent {
4820
4823
  pInputText
4821
4824
  [id]="field.key"
4822
4825
  [placeholder]="
4823
- field.placeholderKey | translate : null : (field.placeholder ?? '')
4826
+ field.placeholderKey
4827
+ | translate: null : field.placeholder ?? ''
4824
4828
  "
4825
4829
  [value]="getExtraFieldValue(field.key) ?? ''"
4826
4830
  [disabled]="field.editable === false"
@@ -4836,7 +4840,8 @@ class ProfilePageComponent {
4836
4840
  type="number"
4837
4841
  [id]="field.key"
4838
4842
  [placeholder]="
4839
- field.placeholderKey | translate : null : (field.placeholder ?? '')
4843
+ field.placeholderKey
4844
+ | translate: null : field.placeholder ?? ''
4840
4845
  "
4841
4846
  [value]="getExtraFieldValue(field.key) ?? ''"
4842
4847
  [disabled]="field.editable === false"
@@ -4854,7 +4859,8 @@ class ProfilePageComponent {
4854
4859
  pInputTextarea
4855
4860
  [id]="field.key"
4856
4861
  [placeholder]="
4857
- field.placeholderKey | translate : null : (field.placeholder ?? '')
4862
+ field.placeholderKey
4863
+ | translate: null : field.placeholder ?? ''
4858
4864
  "
4859
4865
  [value]="getExtraFieldValue(field.key) ?? ''"
4860
4866
  [disabled]="field.editable === false"
@@ -4875,11 +4881,16 @@ class ProfilePageComponent {
4875
4881
  (ngModelChange)="updateExtraField(field.key, $event)"
4876
4882
  >
4877
4883
  <option value="">
4878
- {{ field.placeholderKey | translate : null : (field.placeholder ?? ('shared.select' | translate)) }}
4884
+ {{
4885
+ field.placeholderKey
4886
+ | translate
4887
+ : null
4888
+ : field.placeholder ?? ('shared.select' | translate)
4889
+ }}
4879
4890
  </option>
4880
4891
  @for (opt of field.options; track opt.value) {
4881
4892
  <option [value]="opt.value">
4882
- {{ opt.labelKey | translate : null : opt.label }}
4893
+ {{ opt.labelKey | translate: null : opt.label }}
4883
4894
  </option>
4884
4895
  }
4885
4896
  </select>
@@ -4895,7 +4906,13 @@ class ProfilePageComponent {
4895
4906
  updateExtraField(field.key, $any($event.target).checked)
4896
4907
  "
4897
4908
  />
4898
- <span>{{ field.placeholderKey | translate : null : (field.placeholder ?? (field.labelKey | translate : null : field.label)) }}</span>
4909
+ <span>{{
4910
+ field.placeholderKey
4911
+ | translate
4912
+ : null
4913
+ : field.placeholder ??
4914
+ (field.labelKey | translate: null : field.label)
4915
+ }}</span>
4899
4916
  </label>
4900
4917
  }
4901
4918
  @case ('date') {
@@ -5013,7 +5030,9 @@ class ProfilePageComponent {
5013
5030
  @if (section.icon) {
5014
5031
  <i [class]="section.icon + ' text-primary'"></i>
5015
5032
  }
5016
- <span class="font-semibold text-color">{{ section.titleKey | translate : null : section.title }}</span>
5033
+ <span class="font-semibold text-color">{{
5034
+ section.titleKey | translate: null : section.title
5035
+ }}</span>
5017
5036
  </div>
5018
5037
  <div class="section-content">
5019
5038
  @if (section.component) {
@@ -5027,7 +5046,9 @@ class ProfilePageComponent {
5027
5046
  @if (section.icon) {
5028
5047
  <i [class]="section.icon + ' text-primary'"></i>
5029
5048
  }
5030
- <span class="font-semibold text-color">{{ section.titleKey | translate : null : section.title }}</span>
5049
+ <span class="font-semibold text-color">{{
5050
+ section.titleKey | translate: null : section.title
5051
+ }}</span>
5031
5052
  </div>
5032
5053
  <div class="section-content">
5033
5054
  @if (section.component) {
@@ -5269,7 +5290,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
5269
5290
  @for (field of editableFields(); track field.key) {
5270
5291
  <div class="flex flex-col gap-2">
5271
5292
  <label [for]="field.key" class="font-medium text-color">
5272
- {{ field.labelKey | translate : null : field.label
5293
+ {{ field.labelKey | translate: null : field.label
5273
5294
  }}{{ field.required ? ' *' : '' }}
5274
5295
  </label>
5275
5296
  @if (field.component) {
@@ -5323,7 +5344,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
5323
5344
  <div class="grid grid-cols-1 md:grid-cols-2 gap-4">
5324
5345
  @for (field of viewOnlyFields(); track field.key) {
5325
5346
  <div class="flex flex-col gap-1">
5326
- <label class="text-sm text-muted-color">{{ field.labelKey | translate : null : field.label }}</label>
5347
+ <label class="text-sm text-muted-color">{{
5348
+ field.labelKey | translate: null : field.label
5349
+ }}</label>
5327
5350
  <span class="text-color font-medium">
5328
5351
  @if (field.type === 'select') {
5329
5352
  {{
@@ -5350,7 +5373,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
5350
5373
  pInputText
5351
5374
  [id]="field.key"
5352
5375
  [placeholder]="
5353
- field.placeholderKey | translate : null : (field.placeholder ?? '')
5376
+ field.placeholderKey
5377
+ | translate: null : field.placeholder ?? ''
5354
5378
  "
5355
5379
  [value]="getExtraFieldValue(field.key) ?? ''"
5356
5380
  [disabled]="field.editable === false"
@@ -5366,7 +5390,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
5366
5390
  type="number"
5367
5391
  [id]="field.key"
5368
5392
  [placeholder]="
5369
- field.placeholderKey | translate : null : (field.placeholder ?? '')
5393
+ field.placeholderKey
5394
+ | translate: null : field.placeholder ?? ''
5370
5395
  "
5371
5396
  [value]="getExtraFieldValue(field.key) ?? ''"
5372
5397
  [disabled]="field.editable === false"
@@ -5384,7 +5409,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
5384
5409
  pInputTextarea
5385
5410
  [id]="field.key"
5386
5411
  [placeholder]="
5387
- field.placeholderKey | translate : null : (field.placeholder ?? '')
5412
+ field.placeholderKey
5413
+ | translate: null : field.placeholder ?? ''
5388
5414
  "
5389
5415
  [value]="getExtraFieldValue(field.key) ?? ''"
5390
5416
  [disabled]="field.editable === false"
@@ -5405,11 +5431,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
5405
5431
  (ngModelChange)="updateExtraField(field.key, $event)"
5406
5432
  >
5407
5433
  <option value="">
5408
- {{ field.placeholderKey | translate : null : (field.placeholder ?? ('shared.select' | translate)) }}
5434
+ {{
5435
+ field.placeholderKey
5436
+ | translate
5437
+ : null
5438
+ : field.placeholder ?? ('shared.select' | translate)
5439
+ }}
5409
5440
  </option>
5410
5441
  @for (opt of field.options; track opt.value) {
5411
5442
  <option [value]="opt.value">
5412
- {{ opt.labelKey | translate : null : opt.label }}
5443
+ {{ opt.labelKey | translate: null : opt.label }}
5413
5444
  </option>
5414
5445
  }
5415
5446
  </select>
@@ -5425,7 +5456,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
5425
5456
  updateExtraField(field.key, $any($event.target).checked)
5426
5457
  "
5427
5458
  />
5428
- <span>{{ field.placeholderKey | translate : null : (field.placeholder ?? (field.labelKey | translate : null : field.label)) }}</span>
5459
+ <span>{{
5460
+ field.placeholderKey
5461
+ | translate
5462
+ : null
5463
+ : field.placeholder ??
5464
+ (field.labelKey | translate: null : field.label)
5465
+ }}</span>
5429
5466
  </label>
5430
5467
  }
5431
5468
  @case ('date') {
@@ -5543,7 +5580,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
5543
5580
  @if (section.icon) {
5544
5581
  <i [class]="section.icon + ' text-primary'"></i>
5545
5582
  }
5546
- <span class="font-semibold text-color">{{ section.titleKey | translate : null : section.title }}</span>
5583
+ <span class="font-semibold text-color">{{
5584
+ section.titleKey | translate: null : section.title
5585
+ }}</span>
5547
5586
  </div>
5548
5587
  <div class="section-content">
5549
5588
  @if (section.component) {
@@ -5557,7 +5596,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
5557
5596
  @if (section.icon) {
5558
5597
  <i [class]="section.icon + ' text-primary'"></i>
5559
5598
  }
5560
- <span class="font-semibold text-color">{{ section.titleKey | translate : null : section.title }}</span>
5599
+ <span class="font-semibold text-color">{{
5600
+ section.titleKey | translate: null : section.title
5601
+ }}</span>
5561
5602
  </div>
5562
5603
  <div class="section-content">
5563
5604
  @if (section.component) {
@@ -5703,7 +5744,7 @@ class RegisterPageComponent {
5703
5744
  registrationExtension = inject(AUTH_REGISTRATION_EXTENSION, {
5704
5745
  optional: true,
5705
5746
  });
5706
- translateAdapter = inject(TRANSLATE_ADAPTER, {
5747
+ translateAdapter = inject(TranslateService, {
5707
5748
  optional: true,
5708
5749
  });
5709
5750
  translate(key, vars) {
@@ -6101,7 +6142,7 @@ class RegisterPageComponent {
6101
6142
  @for (field of extraFields(); track field.key) {
6102
6143
  <div [class]="field.containerClass ?? ''">
6103
6144
  <label [for]="field.key" class="block font-medium mb-2">
6104
- {{ field.labelKey | translate : null : field.label
6145
+ {{ field.labelKey | translate: null : field.label
6105
6146
  }}{{ field.required ? ' *' : '' }}
6106
6147
  </label>
6107
6148
  @if (field.component) {
@@ -6125,7 +6166,8 @@ class RegisterPageComponent {
6125
6166
  pInputText
6126
6167
  [id]="field.key"
6127
6168
  [placeholder]="
6128
- field.placeholderKey | translate : null : (field.placeholder ?? '')
6169
+ field.placeholderKey
6170
+ | translate: null : field.placeholder ?? ''
6129
6171
  "
6130
6172
  [value]="
6131
6173
  extraFieldsModel()[field.key] ??
@@ -6147,7 +6189,8 @@ class RegisterPageComponent {
6147
6189
  type="number"
6148
6190
  [id]="field.key"
6149
6191
  [placeholder]="
6150
- field.placeholderKey | translate : null : (field.placeholder ?? '')
6192
+ field.placeholderKey
6193
+ | translate: null : field.placeholder ?? ''
6151
6194
  "
6152
6195
  [value]="
6153
6196
  extraFieldsModel()[field.key] ??
@@ -6168,7 +6211,8 @@ class RegisterPageComponent {
6168
6211
  pInputTextarea
6169
6212
  [id]="field.key"
6170
6213
  [placeholder]="
6171
- field.placeholderKey | translate : null : (field.placeholder ?? '')
6214
+ field.placeholderKey
6215
+ | translate: null : field.placeholder ?? ''
6172
6216
  "
6173
6217
  [value]="
6174
6218
  extraFieldsModel()[field.key] ??
@@ -6202,11 +6246,19 @@ class RegisterPageComponent {
6202
6246
  "
6203
6247
  >
6204
6248
  <option value="">
6205
- {{ field.placeholderKey | translate : null : (field.placeholder ?? ('shared.select' | translate)) }}
6249
+ {{
6250
+ field.placeholderKey
6251
+ | translate
6252
+ : null
6253
+ : field.placeholder ??
6254
+ ('shared.select' | translate)
6255
+ }}
6206
6256
  </option>
6207
6257
  @for (opt of field.options; track opt.value) {
6208
6258
  <option [value]="opt.value">
6209
- {{ opt.labelKey | translate : null : opt.label }}
6259
+ {{
6260
+ opt.labelKey | translate: null : opt.label
6261
+ }}
6210
6262
  </option>
6211
6263
  }
6212
6264
  </select>
@@ -6228,7 +6280,14 @@ class RegisterPageComponent {
6228
6280
  )
6229
6281
  "
6230
6282
  />
6231
- <span>{{ field.placeholderKey | translate : null : (field.placeholder ?? (field.labelKey | translate : null : field.label)) }}</span>
6283
+ <span>{{
6284
+ field.placeholderKey
6285
+ | translate
6286
+ : null
6287
+ : field.placeholder ??
6288
+ (field.labelKey
6289
+ | translate: null : field.label)
6290
+ }}</span>
6232
6291
  </label>
6233
6292
  }
6234
6293
  @case ('date') {
@@ -6576,7 +6635,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
6576
6635
  @for (field of extraFields(); track field.key) {
6577
6636
  <div [class]="field.containerClass ?? ''">
6578
6637
  <label [for]="field.key" class="block font-medium mb-2">
6579
- {{ field.labelKey | translate : null : field.label
6638
+ {{ field.labelKey | translate: null : field.label
6580
6639
  }}{{ field.required ? ' *' : '' }}
6581
6640
  </label>
6582
6641
  @if (field.component) {
@@ -6600,7 +6659,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
6600
6659
  pInputText
6601
6660
  [id]="field.key"
6602
6661
  [placeholder]="
6603
- field.placeholderKey | translate : null : (field.placeholder ?? '')
6662
+ field.placeholderKey
6663
+ | translate: null : field.placeholder ?? ''
6604
6664
  "
6605
6665
  [value]="
6606
6666
  extraFieldsModel()[field.key] ??
@@ -6622,7 +6682,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
6622
6682
  type="number"
6623
6683
  [id]="field.key"
6624
6684
  [placeholder]="
6625
- field.placeholderKey | translate : null : (field.placeholder ?? '')
6685
+ field.placeholderKey
6686
+ | translate: null : field.placeholder ?? ''
6626
6687
  "
6627
6688
  [value]="
6628
6689
  extraFieldsModel()[field.key] ??
@@ -6643,7 +6704,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
6643
6704
  pInputTextarea
6644
6705
  [id]="field.key"
6645
6706
  [placeholder]="
6646
- field.placeholderKey | translate : null : (field.placeholder ?? '')
6707
+ field.placeholderKey
6708
+ | translate: null : field.placeholder ?? ''
6647
6709
  "
6648
6710
  [value]="
6649
6711
  extraFieldsModel()[field.key] ??
@@ -6677,11 +6739,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
6677
6739
  "
6678
6740
  >
6679
6741
  <option value="">
6680
- {{ field.placeholderKey | translate : null : (field.placeholder ?? ('shared.select' | translate)) }}
6742
+ {{
6743
+ field.placeholderKey
6744
+ | translate
6745
+ : null
6746
+ : field.placeholder ??
6747
+ ('shared.select' | translate)
6748
+ }}
6681
6749
  </option>
6682
6750
  @for (opt of field.options; track opt.value) {
6683
6751
  <option [value]="opt.value">
6684
- {{ opt.labelKey | translate : null : opt.label }}
6752
+ {{
6753
+ opt.labelKey | translate: null : opt.label
6754
+ }}
6685
6755
  </option>
6686
6756
  }
6687
6757
  </select>
@@ -6703,7 +6773,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
6703
6773
  )
6704
6774
  "
6705
6775
  />
6706
- <span>{{ field.placeholderKey | translate : null : (field.placeholder ?? (field.labelKey | translate : null : field.label)) }}</span>
6776
+ <span>{{
6777
+ field.placeholderKey
6778
+ | translate
6779
+ : null
6780
+ : field.placeholder ??
6781
+ (field.labelKey
6782
+ | translate: null : field.label)
6783
+ }}</span>
6707
6784
  </label>
6708
6785
  }
6709
6786
  @case ('date') {
@@ -6926,7 +7003,7 @@ class ResetPasswordPageComponent {
6926
7003
  route = inject(ActivatedRoute);
6927
7004
  messageService = inject(MessageService);
6928
7005
  authApi = inject(AuthApiService);
6929
- translateAdapter = inject(TRANSLATE_ADAPTER, {
7006
+ translateAdapter = inject(TranslateService, {
6930
7007
  optional: true,
6931
7008
  });
6932
7009
  translate(key, vars) {
@@ -7332,7 +7409,7 @@ class UserFormComponent {
7332
7409
  userService = inject(UserApiService);
7333
7410
  permissionService = inject(UserPermissionApiService);
7334
7411
  authState = inject(AuthStateService);
7335
- translateAdapter = inject(TRANSLATE_ADAPTER, {
7412
+ translateAdapter = inject(TranslateService, {
7336
7413
  optional: true,
7337
7414
  });
7338
7415
  userFormExtension = inject(AUTH_USER_FORM_EXTENSION, {
@@ -7691,7 +7768,7 @@ class UserFormComponent {
7691
7768
  @for (field of extraFields(); track field.key) {
7692
7769
  <div class="flex flex-col gap-2">
7693
7770
  <label [for]="field.key" class="font-medium text-color">
7694
- {{ field.labelKey | translate : null : field.label
7771
+ {{ field.labelKey | translate: null : field.label
7695
7772
  }}{{ field.required ? ' *' : '' }}
7696
7773
  </label>
7697
7774
  @if (field.component) {
@@ -7715,7 +7792,8 @@ class UserFormComponent {
7715
7792
  pInputText
7716
7793
  [id]="field.key"
7717
7794
  [placeholder]="
7718
- field.placeholderKey | translate : null : (field.placeholder ?? '')
7795
+ field.placeholderKey
7796
+ | translate: null : field.placeholder ?? ''
7719
7797
  "
7720
7798
  [value]="getExtraFieldValue(field.key) ?? ''"
7721
7799
  (input)="
@@ -7733,7 +7811,8 @@ class UserFormComponent {
7733
7811
  type="number"
7734
7812
  [id]="field.key"
7735
7813
  [placeholder]="
7736
- field.placeholderKey | translate : null : (field.placeholder ?? '')
7814
+ field.placeholderKey
7815
+ | translate: null : field.placeholder ?? ''
7737
7816
  "
7738
7817
  [value]="getExtraFieldValue(field.key) ?? ''"
7739
7818
  (input)="
@@ -7750,7 +7829,8 @@ class UserFormComponent {
7750
7829
  pInputTextarea
7751
7830
  [id]="field.key"
7752
7831
  [placeholder]="
7753
- field.placeholderKey | translate : null : (field.placeholder ?? '')
7832
+ field.placeholderKey
7833
+ | translate: null : field.placeholder ?? ''
7754
7834
  "
7755
7835
  [value]="getExtraFieldValue(field.key) ?? ''"
7756
7836
  (input)="
@@ -7774,11 +7854,17 @@ class UserFormComponent {
7774
7854
  "
7775
7855
  >
7776
7856
  <option value="">
7777
- {{ field.placeholderKey | translate : null : (field.placeholder ?? ('shared.select' | translate)) }}
7857
+ {{
7858
+ field.placeholderKey
7859
+ | translate
7860
+ : null
7861
+ : field.placeholder ??
7862
+ ('shared.select' | translate)
7863
+ }}
7778
7864
  </option>
7779
7865
  @for (opt of field.options; track opt.value) {
7780
7866
  <option [value]="opt.value">
7781
- {{ opt.labelKey | translate : null : opt.label }}
7867
+ {{ opt.labelKey | translate: null : opt.label }}
7782
7868
  </option>
7783
7869
  }
7784
7870
  </select>
@@ -7796,7 +7882,14 @@ class UserFormComponent {
7796
7882
  )
7797
7883
  "
7798
7884
  />
7799
- <span>{{ field.placeholderKey | translate : null : (field.placeholder ?? (field.labelKey | translate : null : field.label)) }}</span>
7885
+ <span>{{
7886
+ field.placeholderKey
7887
+ | translate
7888
+ : null
7889
+ : field.placeholder ??
7890
+ (field.labelKey
7891
+ | translate: null : field.label)
7892
+ }}</span>
7800
7893
  </label>
7801
7894
  }
7802
7895
  @case ('date') {
@@ -7974,7 +8067,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
7974
8067
  @for (field of extraFields(); track field.key) {
7975
8068
  <div class="flex flex-col gap-2">
7976
8069
  <label [for]="field.key" class="font-medium text-color">
7977
- {{ field.labelKey | translate : null : field.label
8070
+ {{ field.labelKey | translate: null : field.label
7978
8071
  }}{{ field.required ? ' *' : '' }}
7979
8072
  </label>
7980
8073
  @if (field.component) {
@@ -7998,7 +8091,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
7998
8091
  pInputText
7999
8092
  [id]="field.key"
8000
8093
  [placeholder]="
8001
- field.placeholderKey | translate : null : (field.placeholder ?? '')
8094
+ field.placeholderKey
8095
+ | translate: null : field.placeholder ?? ''
8002
8096
  "
8003
8097
  [value]="getExtraFieldValue(field.key) ?? ''"
8004
8098
  (input)="
@@ -8016,7 +8110,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
8016
8110
  type="number"
8017
8111
  [id]="field.key"
8018
8112
  [placeholder]="
8019
- field.placeholderKey | translate : null : (field.placeholder ?? '')
8113
+ field.placeholderKey
8114
+ | translate: null : field.placeholder ?? ''
8020
8115
  "
8021
8116
  [value]="getExtraFieldValue(field.key) ?? ''"
8022
8117
  (input)="
@@ -8033,7 +8128,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
8033
8128
  pInputTextarea
8034
8129
  [id]="field.key"
8035
8130
  [placeholder]="
8036
- field.placeholderKey | translate : null : (field.placeholder ?? '')
8131
+ field.placeholderKey
8132
+ | translate: null : field.placeholder ?? ''
8037
8133
  "
8038
8134
  [value]="getExtraFieldValue(field.key) ?? ''"
8039
8135
  (input)="
@@ -8057,11 +8153,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
8057
8153
  "
8058
8154
  >
8059
8155
  <option value="">
8060
- {{ field.placeholderKey | translate : null : (field.placeholder ?? ('shared.select' | translate)) }}
8156
+ {{
8157
+ field.placeholderKey
8158
+ | translate
8159
+ : null
8160
+ : field.placeholder ??
8161
+ ('shared.select' | translate)
8162
+ }}
8061
8163
  </option>
8062
8164
  @for (opt of field.options; track opt.value) {
8063
8165
  <option [value]="opt.value">
8064
- {{ opt.labelKey | translate : null : opt.label }}
8166
+ {{ opt.labelKey | translate: null : opt.label }}
8065
8167
  </option>
8066
8168
  }
8067
8169
  </select>
@@ -8079,7 +8181,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
8079
8181
  )
8080
8182
  "
8081
8183
  />
8082
- <span>{{ field.placeholderKey | translate : null : (field.placeholder ?? (field.labelKey | translate : null : field.label)) }}</span>
8184
+ <span>{{
8185
+ field.placeholderKey
8186
+ | translate
8187
+ : null
8188
+ : field.placeholder ??
8189
+ (field.labelKey
8190
+ | translate: null : field.label)
8191
+ }}</span>
8083
8192
  </label>
8084
8193
  }
8085
8194
  @case ('date') {
@@ -8172,7 +8281,7 @@ class UserBranchPermissionDialogComponent {
8172
8281
  branchApi = inject(BranchApiService);
8173
8282
  permissionApi = inject(UserPermissionApiService);
8174
8283
  messageService = inject(MessageService);
8175
- translateAdapter = inject(TRANSLATE_ADAPTER, {
8284
+ translateAdapter = inject(TranslateService, {
8176
8285
  optional: true,
8177
8286
  });
8178
8287
  t(key, params) {
@@ -8462,7 +8571,7 @@ class UserCompanyPermissionDialogComponent {
8462
8571
  companyApi = inject(CompanyApiService);
8463
8572
  permissionApi = inject(UserPermissionApiService);
8464
8573
  messageService = inject(MessageService);
8465
- translateAdapter = inject(TRANSLATE_ADAPTER, {
8574
+ translateAdapter = inject(TranslateService, {
8466
8575
  optional: true,
8467
8576
  });
8468
8577
  t(key, params) {
@@ -8706,7 +8815,7 @@ class UserListComponent {
8706
8815
  userDetailConfig = inject(AUTH_USER_DETAIL_CONFIG, {
8707
8816
  optional: true,
8708
8817
  });
8709
- translateAdapter = inject(TRANSLATE_ADAPTER, {
8818
+ translateAdapter = inject(TranslateService, {
8710
8819
  optional: true,
8711
8820
  });
8712
8821
  translate(key, vars) {
@@ -8820,8 +8929,7 @@ class UserListComponent {
8820
8929
  });
8821
8930
  this.userService.reload();
8822
8931
  }
8823
- catch {
8824
- }
8932
+ catch { }
8825
8933
  },
8826
8934
  });
8827
8935
  }
@@ -8869,7 +8977,7 @@ class UserListComponent {
8869
8977
  [class]="col.styleClass ?? ''"
8870
8978
  [style.width]="col.width ?? 'auto'"
8871
8979
  >
8872
- {{ col.headerKey | translate : null : col.header }}
8980
+ {{ col.headerKey | translate: null : col.header }}
8873
8981
  </th>
8874
8982
  }
8875
8983
  <th class="w-[180px]">{{ 'shared.actions' | translate }}</th>
@@ -8966,7 +9074,9 @@ class UserListComponent {
8966
9074
  [rounded]="true"
8967
9075
  [text]="true"
8968
9076
  [severity]="action.severity ?? 'secondary'"
8969
- [pTooltip]="action.labelKey | translate : null : action.label"
9077
+ [pTooltip]="
9078
+ action.labelKey | translate: null : action.label
9079
+ "
8970
9080
  [disabled]="isActionDisabled(action, user)"
8971
9081
  (onClick)="onExtraAction(action, user)"
8972
9082
  />
@@ -9070,7 +9180,9 @@ class UserListComponent {
9070
9180
  </div>
9071
9181
  @for (col of extraColumns(); track col.key) {
9072
9182
  <div class="flex flex-col gap-2">
9073
- <label class="font-medium text-muted-color">{{ col.headerKey | translate : null : col.header }}</label>
9183
+ <label class="font-medium text-muted-color">{{
9184
+ col.headerKey | translate: null : col.header
9185
+ }}</label>
9074
9186
  <span class="text-color">{{
9075
9187
  getFieldValue(user, col.field ?? col.key) ?? '-'
9076
9188
  }}</span>
@@ -9152,7 +9264,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
9152
9264
  [class]="col.styleClass ?? ''"
9153
9265
  [style.width]="col.width ?? 'auto'"
9154
9266
  >
9155
- {{ col.headerKey | translate : null : col.header }}
9267
+ {{ col.headerKey | translate: null : col.header }}
9156
9268
  </th>
9157
9269
  }
9158
9270
  <th class="w-[180px]">{{ 'shared.actions' | translate }}</th>
@@ -9249,7 +9361,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
9249
9361
  [rounded]="true"
9250
9362
  [text]="true"
9251
9363
  [severity]="action.severity ?? 'secondary'"
9252
- [pTooltip]="action.labelKey | translate : null : action.label"
9364
+ [pTooltip]="
9365
+ action.labelKey | translate: null : action.label
9366
+ "
9253
9367
  [disabled]="isActionDisabled(action, user)"
9254
9368
  (onClick)="onExtraAction(action, user)"
9255
9369
  />
@@ -9353,7 +9467,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
9353
9467
  </div>
9354
9468
  @for (col of extraColumns(); track col.key) {
9355
9469
  <div class="flex flex-col gap-2">
9356
- <label class="font-medium text-muted-color">{{ col.headerKey | translate : null : col.header }}</label>
9470
+ <label class="font-medium text-muted-color">{{
9471
+ col.headerKey | translate: null : col.header
9472
+ }}</label>
9357
9473
  <span class="text-color">{{
9358
9474
  getFieldValue(user, col.field ?? col.key) ?? '-'
9359
9475
  }}</span>
@@ -9395,7 +9511,7 @@ class VerifyEmailPageComponent {
9395
9511
  route = inject(ActivatedRoute);
9396
9512
  messageService = inject(MessageService);
9397
9513
  authApi = inject(AuthApiService);
9398
- translateAdapter = inject(TRANSLATE_ADAPTER, {
9514
+ translateAdapter = inject(TranslateService, {
9399
9515
  optional: true,
9400
9516
  });
9401
9517
  translate(key, vars) {