@abp/ng.core 10.1.0 → 10.2.0-rc.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.
@@ -1,6 +1,6 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, ChangeDetectorRef, Input, Component, Injectable, InjectionToken, Injector, isDevMode, NgModuleFactory, Compiler, PLATFORM_ID, makeStateKey, TransferState, REQUEST, NgZone, signal, computed, effect, LOCALE_ID, ComponentFactoryResolver, ApplicationRef, input, ElementRef, Directive, EventEmitter, Output, TemplateRef, ViewContainerRef, IterableDiffers, HostListener, provideAppInitializer, makeEnvironmentProviders, Pipe, SecurityContext, NgModule } from '@angular/core';
3
- import { of, BehaviorSubject, Subject, firstValueFrom, throwError, timeout, lastValueFrom, Observable, timer, pipe, concat, ReplaySubject, defer, EMPTY, map as map$1, Subscription, combineLatest, from, take as take$1, filter as filter$1, fromEvent, switchMap as switchMap$1, startWith, distinctUntilChanged as distinctUntilChanged$1 } from 'rxjs';
2
+ import { inject, ChangeDetectorRef, input, Component, Injectable, InjectionToken, Injector, isDevMode, NgModuleFactory, Compiler, PLATFORM_ID, makeStateKey, TransferState, REQUEST, NgZone, signal, computed, effect, LOCALE_ID, ComponentFactoryResolver, ApplicationRef, ElementRef, Directive, output, TemplateRef, ViewContainerRef, IterableDiffers, HostListener, provideAppInitializer, makeEnvironmentProviders, Pipe, SecurityContext, NgModule } from '@angular/core';
3
+ import { of, BehaviorSubject, Subject, firstValueFrom, throwError, timeout, lastValueFrom, Observable, timer, pipe, concat, ReplaySubject, defer, EMPTY, distinctUntilChanged as distinctUntilChanged$1, switchMap as switchMap$1, map as map$1, Subscription, combineLatest, from, take as take$1, filter as filter$1, fromEvent, startWith } from 'rxjs';
4
4
  import { PRIMARY_OUTLET, Router, NavigationStart, NavigationError, NavigationEnd, NavigationCancel, TitleStrategy, ActivatedRoute, RouterOutlet, RouterModule } from '@angular/router';
5
5
  import { isPlatformBrowser, DOCUMENT, registerLocaleData, NgComponentOutlet, isPlatformServer, DatePipe, DATE_PIPE_DEFAULT_TIMEZONE, CommonModule } from '@angular/common';
6
6
  import { map, distinctUntilChanged, filter, catchError, tap, take, switchMap, mapTo, takeUntil, delay, retryWhen, shareReplay, debounceTime, finalize } from 'rxjs/operators';
@@ -18,12 +18,14 @@ import { FormGroupDirective, FormsModule, ReactiveFormsModule, Validators } from
18
18
  class AbstractNgModelComponent {
19
19
  constructor() {
20
20
  this.cdRef = inject(ChangeDetectorRef);
21
- this.valueFn = value => value;
22
- this.valueLimitFn = value => false;
21
+ this.readonly = input(undefined, ...(ngDevMode ? [{ debugName: "readonly" }] : []));
22
+ this.valueFn = input(value => value, ...(ngDevMode ? [{ debugName: "valueFn" }] : []));
23
+ this.valueLimitFn = input(value => false, ...(ngDevMode ? [{ debugName: "valueLimitFn" }] : []));
23
24
  }
25
+ // Note: value needs getter/setter for ControlValueAccessor and two-way binding
24
26
  set value(value) {
25
- value = this.valueFn(value, this._value);
26
- if (this.valueLimitFn(value, this._value) !== false || this.readonly)
27
+ value = this.valueFn()(value, this._value);
28
+ if (this.valueLimitFn()(value, this._value) !== false || this.readonly())
27
29
  return;
28
30
  this._value = value;
29
31
  this.notifyValueChange();
@@ -40,7 +42,7 @@ class AbstractNgModelComponent {
40
42
  }
41
43
  }
42
44
  writeValue(value) {
43
- this._value = this.valueLimitFn(value, this._value) || value;
45
+ this._value = this.valueLimitFn()(value, this._value) || value;
44
46
  this.cdRef.markForCheck();
45
47
  }
46
48
  registerOnChange(fn) {
@@ -53,24 +55,14 @@ class AbstractNgModelComponent {
53
55
  this.disabled = isDisabled;
54
56
  }
55
57
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: AbstractNgModelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
56
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.9", type: AbstractNgModelComponent, isStandalone: true, selector: "ng-component", inputs: { disabled: "disabled", readonly: "readonly", valueFn: "valueFn", valueLimitFn: "valueLimitFn", value: "value" }, ngImport: i0, template: '', isInline: true }); }
58
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.0.9", type: AbstractNgModelComponent, isStandalone: true, selector: "ng-component", inputs: { readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, valueFn: { classPropertyName: "valueFn", publicName: "valueFn", isSignal: true, isRequired: false, transformFunction: null }, valueLimitFn: { classPropertyName: "valueLimitFn", publicName: "valueLimitFn", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: '', isInline: true }); }
57
59
  }
58
60
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: AbstractNgModelComponent, decorators: [{
59
61
  type: Component,
60
62
  args: [{
61
63
  template: '',
62
64
  }]
63
- }], propDecorators: { disabled: [{
64
- type: Input
65
- }], readonly: [{
66
- type: Input
67
- }], valueFn: [{
68
- type: Input
69
- }], valueLimitFn: [{
70
- type: Input
71
- }], value: [{
72
- type: Input
73
- }] } });
65
+ }], propDecorators: { readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], valueFn: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueFn", required: false }] }], valueLimitFn: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueLimitFn", required: false }] }] } });
74
66
 
75
67
  /**
76
68
  * @deprecated Use `authGuard` *function* instead.
@@ -1744,6 +1736,97 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImpor
1744
1736
  type: Injectable
1745
1737
  }], ctorParameters: () => [] });
1746
1738
 
1739
+ /**
1740
+ * Service for managing UI localizations in ABP Angular applications.
1741
+ * Automatically loads localization files based on selected language
1742
+ * Merges with backend localizations (UI > Backend priority)
1743
+ */
1744
+ class UILocalizationService {
1745
+ constructor() {
1746
+ this.http = inject(HttpClient);
1747
+ this.localizationService = inject(LocalizationService);
1748
+ this.sessionState = inject(SessionStateService);
1749
+ this.options = inject(CORE_OPTIONS);
1750
+ this.loadedLocalizations$ = new BehaviorSubject({});
1751
+ this.currentLanguage$ = this.sessionState.getLanguage$();
1752
+ const uiLocalization = this.options.uiLocalization;
1753
+ if (uiLocalization?.enabled) {
1754
+ this.subscribeToLanguageChanges();
1755
+ }
1756
+ }
1757
+ subscribeToLanguageChanges() {
1758
+ this.currentLanguage$
1759
+ .pipe(distinctUntilChanged$1(), switchMap$1(culture => this.loadLocalizationFile(culture)))
1760
+ .subscribe();
1761
+ }
1762
+ loadLocalizationFile(culture) {
1763
+ const config = this.options.uiLocalization;
1764
+ if (!config?.enabled)
1765
+ return of(null);
1766
+ const basePath = config.basePath || '/assets/localization';
1767
+ const url = `${basePath}/${culture}.json`;
1768
+ return this.http.get(url).pipe(catchError(() => {
1769
+ // If file not found or error occurs, return null
1770
+ return of(null);
1771
+ }), tap(data => {
1772
+ if (data) {
1773
+ this.processLocalizationData(culture, data);
1774
+ }
1775
+ }));
1776
+ }
1777
+ processLocalizationData(culture, data) {
1778
+ const abpFormat = [
1779
+ {
1780
+ culture,
1781
+ resources: Object.entries(data).map(([resourceName, texts]) => ({
1782
+ resourceName,
1783
+ texts,
1784
+ })),
1785
+ },
1786
+ ];
1787
+ this.localizationService.addLocalization(abpFormat);
1788
+ const current = this.loadedLocalizations$.value;
1789
+ current[culture] = data;
1790
+ this.loadedLocalizations$.next(current);
1791
+ }
1792
+ addAngularLocalizeLocalization(culture, resourceName, translations) {
1793
+ const abpFormat = [
1794
+ {
1795
+ culture,
1796
+ resources: [
1797
+ {
1798
+ resourceName,
1799
+ texts: translations,
1800
+ },
1801
+ ],
1802
+ },
1803
+ ];
1804
+ this.localizationService.addLocalization(abpFormat);
1805
+ const current = this.loadedLocalizations$.value;
1806
+ if (!current[culture]) {
1807
+ current[culture] = {};
1808
+ }
1809
+ if (!current[culture][resourceName]) {
1810
+ current[culture][resourceName] = {};
1811
+ }
1812
+ current[culture][resourceName] = {
1813
+ ...current[culture][resourceName],
1814
+ ...translations,
1815
+ };
1816
+ this.loadedLocalizations$.next(current);
1817
+ }
1818
+ getLoadedLocalizations(culture) {
1819
+ const lang = culture || this.sessionState.getLanguage();
1820
+ return this.loadedLocalizations$.value[lang] || {};
1821
+ }
1822
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: UILocalizationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1823
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: UILocalizationService, providedIn: 'root' }); }
1824
+ }
1825
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: UILocalizationService, decorators: [{
1826
+ type: Injectable,
1827
+ args: [{ providedIn: 'root' }]
1828
+ }], ctorParameters: () => [] });
1829
+
1747
1830
  class PermissionService {
1748
1831
  constructor() {
1749
1832
  this.configState = inject(ConfigStateService);
@@ -2918,6 +3001,7 @@ class ConfigStateService {
2918
3001
  constructor() {
2919
3002
  this.abpConfigService = inject(AbpApplicationConfigurationService);
2920
3003
  this.abpApplicationLocalizationService = inject(AbpApplicationLocalizationService);
3004
+ this.environmentService = inject(EnvironmentService);
2921
3005
  this.includeLocalizationResources = inject(INCUDE_LOCALIZATION_RESOURCES_TOKEN, { optional: true });
2922
3006
  this.updateSubject = new Subject();
2923
3007
  this.store = new InternalStore({});
@@ -2936,7 +3020,17 @@ class ConfigStateService {
2936
3020
  throw new Error('culture name should defined');
2937
3021
  }
2938
3022
  const cultureName = this.uiCultureFromAuthCodeFlow ?? appState.localization.currentCulture.cultureName;
2939
- return this.getlocalizationResource(cultureName).pipe(map(result => ({ ...appState, localization: { ...appState.localization, ...result } })), tap(() => (this.uiCultureFromAuthCodeFlow = undefined)));
3023
+ return this.getlocalizationResource(cultureName).pipe(map(result => {
3024
+ const envLocalization = this.environmentService.getEnvironment()?.localization;
3025
+ return {
3026
+ ...appState,
3027
+ localization: {
3028
+ ...appState.localization,
3029
+ ...result,
3030
+ defaultResourceName: appState.localization?.defaultResourceName ?? envLocalization?.defaultResourceName,
3031
+ },
3032
+ };
3033
+ }), tap(() => (this.uiCultureFromAuthCodeFlow = undefined)));
2940
3034
  }
2941
3035
  getlocalizationResource(cultureName) {
2942
3036
  return this.abpApplicationLocalizationService.get({
@@ -2953,7 +3047,17 @@ class ConfigStateService {
2953
3047
  return this.refreshAppState().pipe(map(() => null));
2954
3048
  }
2955
3049
  return this.getlocalizationResource(lang)
2956
- .pipe(tap(result => this.store.patch({ localization: { ...this.store.state.localization, ...result } })))
3050
+ .pipe(tap(result => {
3051
+ const envLocalization = this.environmentService.getEnvironment()?.localization;
3052
+ this.store.patch({
3053
+ localization: {
3054
+ ...this.store.state.localization,
3055
+ ...result,
3056
+ defaultResourceName: this.store.state.localization?.defaultResourceName ??
3057
+ envLocalization?.defaultResourceName,
3058
+ },
3059
+ });
3060
+ }))
2957
3061
  .pipe(map(() => null));
2958
3062
  }
2959
3063
  getOne$(key) {
@@ -3114,6 +3218,8 @@ class LocalizationService {
3114
3218
  }
3115
3219
  initLocalizationValues() {
3116
3220
  localizations$.subscribe(val => this.addLocalization(val));
3221
+ // Backend-based localization loading (always enabled)
3222
+ // UI localizations are merged via addLocalization() (UI > Backend priority)
3117
3223
  const legacyResources$ = this.configState.getDeep$('localization.values');
3118
3224
  const remoteLocalizations$ = this.configState.getDeep$('localization.resources');
3119
3225
  const currentLanguage$ = this.sessionState.getLanguage$();
@@ -3132,7 +3238,8 @@ class LocalizationService {
3132
3238
  const resourceName = entry[0];
3133
3239
  const remoteTexts = entry[1];
3134
3240
  let resource = local?.get(resourceName) || {};
3135
- resource = { ...resource, ...remoteTexts };
3241
+ // UI > Backend priority: local texts override remote texts
3242
+ resource = { ...remoteTexts, ...resource };
3136
3243
  local?.set(resourceName, resource);
3137
3244
  });
3138
3245
  }
@@ -3781,45 +3888,37 @@ const DEFAULT_DYNAMIC_LAYOUTS = new Map([
3781
3888
  class AutofocusDirective {
3782
3889
  constructor() {
3783
3890
  this.elRef = inject(ElementRef);
3784
- this._delay = 0;
3785
- }
3786
- set delay(val) {
3787
- this._delay = Number(val) || 0;
3788
- }
3789
- get delay() {
3790
- return this._delay;
3891
+ this.delay = input(0, { ...(ngDevMode ? { debugName: "delay" } : {}), alias: 'autofocus',
3892
+ transform: (v) => Number(v) || 0 });
3791
3893
  }
3792
3894
  ngAfterViewInit() {
3793
- setTimeout(() => this.elRef.nativeElement.focus(), this.delay);
3895
+ setTimeout(() => this.elRef.nativeElement.focus(), this.delay());
3794
3896
  }
3795
3897
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: AutofocusDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
3796
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.9", type: AutofocusDirective, isStandalone: true, selector: "[autofocus]", inputs: { delay: ["autofocus", "delay"] }, ngImport: i0 }); }
3898
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.9", type: AutofocusDirective, isStandalone: true, selector: "[autofocus]", inputs: { delay: { classPropertyName: "delay", publicName: "autofocus", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
3797
3899
  }
3798
3900
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: AutofocusDirective, decorators: [{
3799
3901
  type: Directive,
3800
3902
  args: [{
3801
3903
  selector: '[autofocus]',
3802
3904
  }]
3803
- }], propDecorators: { delay: [{
3804
- type: Input,
3805
- args: ['autofocus']
3806
- }] } });
3905
+ }], propDecorators: { delay: [{ type: i0.Input, args: [{ isSignal: true, alias: "autofocus", required: false }] }] } });
3807
3906
 
3808
3907
  class InputEventDebounceDirective {
3809
3908
  constructor() {
3810
3909
  this.el = inject(ElementRef);
3811
3910
  this.subscription = inject(SubscriptionService);
3812
- this.debounce = 300;
3813
- this.debounceEvent = new EventEmitter();
3911
+ this.debounce = input(300, ...(ngDevMode ? [{ debugName: "debounce" }] : []));
3912
+ this.debounceEvent = output({ alias: 'input.debounce' });
3814
3913
  }
3815
3914
  ngOnInit() {
3816
- const input$ = fromEvent(this.el.nativeElement, 'input').pipe(debounceTime(this.debounce));
3915
+ const input$ = fromEvent(this.el.nativeElement, 'input').pipe(debounceTime(this.debounce()));
3817
3916
  this.subscription.addOne(input$, (event) => {
3818
3917
  this.debounceEvent.emit(event);
3819
3918
  });
3820
3919
  }
3821
3920
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: InputEventDebounceDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
3822
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.9", type: InputEventDebounceDirective, isStandalone: true, selector: "[input.debounce]", inputs: { debounce: "debounce" }, outputs: { debounceEvent: "input.debounce" }, providers: [SubscriptionService], ngImport: i0 }); }
3921
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.9", type: InputEventDebounceDirective, isStandalone: true, selector: "[input.debounce]", inputs: { debounce: { classPropertyName: "debounce", publicName: "debounce", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { debounceEvent: "input.debounce" }, providers: [SubscriptionService], ngImport: i0 }); }
3823
3922
  }
3824
3923
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: InputEventDebounceDirective, decorators: [{
3825
3924
  type: Directive,
@@ -3827,12 +3926,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImpor
3827
3926
  selector: '[input.debounce]',
3828
3927
  providers: [SubscriptionService],
3829
3928
  }]
3830
- }], propDecorators: { debounce: [{
3831
- type: Input
3832
- }], debounceEvent: [{
3833
- type: Output,
3834
- args: ['input.debounce']
3835
- }] } });
3929
+ }], propDecorators: { debounce: [{ type: i0.Input, args: [{ isSignal: true, alias: "debounce", required: false }] }], debounceEvent: [{ type: i0.Output, args: ["input.debounce"] }] } });
3836
3930
 
3837
3931
  class AbpForContext {
3838
3932
  constructor($implicit, index, count, list) {
@@ -3853,19 +3947,28 @@ class ForDirective {
3853
3947
  this.tempRef = inject(TemplateRef);
3854
3948
  this.vcRef = inject(ViewContainerRef);
3855
3949
  this.differs = inject(IterableDiffers);
3950
+ // eslint-disable-next-line @angular-eslint/no-input-rename
3951
+ this.items = input.required({ ...(ngDevMode ? { debugName: "items" } : {}), alias: "abpForOf" });
3952
+ this.orderBy = input(undefined, { ...(ngDevMode ? { debugName: "orderBy" } : {}), alias: "abpForOrderBy" });
3953
+ this.orderDir = input(undefined, { ...(ngDevMode ? { debugName: "orderDir" } : {}), alias: "abpForOrderDir" });
3954
+ this.filterBy = input(undefined, { ...(ngDevMode ? { debugName: "filterBy" } : {}), alias: "abpForFilterBy" });
3955
+ this.filterVal = input(undefined, { ...(ngDevMode ? { debugName: "filterVal" } : {}), alias: "abpForFilterVal" });
3956
+ this.trackBy = input(undefined, { ...(ngDevMode ? { debugName: "trackBy" } : {}), alias: "abpForTrackBy" });
3957
+ this.compareBy = input(undefined, { ...(ngDevMode ? { debugName: "compareBy" } : {}), alias: "abpForCompareBy" });
3958
+ this.emptyRef = input(undefined, { ...(ngDevMode ? { debugName: "emptyRef" } : {}), alias: "abpForEmptyRef" });
3856
3959
  this.lastItemsRef = null;
3857
3960
  }
3858
3961
  get compareFn() {
3859
- return this.compareBy || compare;
3962
+ return this.compareBy() || compare;
3860
3963
  }
3861
3964
  get trackByFn() {
3862
- return this.trackBy || ((index, item) => item.id || index);
3965
+ return this.trackBy() || ((index, item) => item.id || index);
3863
3966
  }
3864
3967
  iterateOverAppliedOperations(changes) {
3865
3968
  const rw = [];
3866
3969
  changes.forEachOperation((record, previousIndex, currentIndex) => {
3867
3970
  if (record.previousIndex == null) {
3868
- const view = this.vcRef.createEmbeddedView(this.tempRef, new AbpForContext(null, -1, -1, this.items), currentIndex || 0);
3971
+ const view = this.vcRef.createEmbeddedView(this.tempRef, new AbpForContext(null, -1, -1, this.items()), currentIndex || 0);
3869
3972
  rw.push(new RecordView(record, view));
3870
3973
  }
3871
3974
  else if (currentIndex == null && previousIndex !== null) {
@@ -3890,7 +3993,7 @@ class ForDirective {
3890
3993
  const viewRef = this.vcRef.get(i);
3891
3994
  viewRef.context.index = i;
3892
3995
  viewRef.context.count = l;
3893
- viewRef.context.list = this.items;
3996
+ viewRef.context.list = this.items();
3894
3997
  }
3895
3998
  changes.forEachIdentityChange((record) => {
3896
3999
  if (record.currentIndex !== null) {
@@ -3900,15 +4003,16 @@ class ForDirective {
3900
4003
  });
3901
4004
  }
3902
4005
  projectItems(items) {
3903
- if (!items.length && this.emptyRef) {
4006
+ const emptyRef = this.emptyRef();
4007
+ if (!items.length && emptyRef) {
3904
4008
  this.vcRef.clear();
3905
- this.vcRef.createEmbeddedView(this.emptyRef).rootNodes;
4009
+ this.vcRef.createEmbeddedView(emptyRef).rootNodes;
3906
4010
  this.isShowEmptyRef = true;
3907
4011
  this.differ = null;
3908
4012
  this.lastItemsRef = null;
3909
4013
  return;
3910
4014
  }
3911
- if (this.emptyRef && this.isShowEmptyRef) {
4015
+ if (emptyRef && this.isShowEmptyRef) {
3912
4016
  this.vcRef.clear();
3913
4017
  this.isShowEmptyRef = false;
3914
4018
  }
@@ -3924,7 +4028,7 @@ class ForDirective {
3924
4028
  }
3925
4029
  }
3926
4030
  sortItems(items) {
3927
- const orderBy = this.orderBy;
4031
+ const orderBy = this.orderBy();
3928
4032
  if (orderBy) {
3929
4033
  items.sort((a, b) => (a[orderBy] > b[orderBy] ? 1 : a[orderBy] < b[orderBy] ? -1 : 0));
3930
4034
  }
@@ -3933,25 +4037,27 @@ class ForDirective {
3933
4037
  }
3934
4038
  }
3935
4039
  ngOnChanges() {
3936
- if (!this.items)
4040
+ const itemsValue = this.items();
4041
+ if (!itemsValue)
3937
4042
  return;
3938
4043
  // Recreate differ if items array reference changed
3939
- if (this.lastItemsRef !== this.items) {
4044
+ if (this.lastItemsRef !== itemsValue) {
3940
4045
  this.vcRef.clear();
3941
4046
  this.differ = null;
3942
- this.lastItemsRef = this.items;
4047
+ this.lastItemsRef = itemsValue;
3943
4048
  }
3944
- let items = clone(this.items);
4049
+ let items = clone(itemsValue);
3945
4050
  if (!Array.isArray(items))
3946
4051
  return;
3947
4052
  const compareFn = this.compareFn;
3948
- const filterBy = this.filterBy;
4053
+ const filterBy = this.filterBy();
4054
+ const filterVal = this.filterVal();
3949
4055
  if (typeof filterBy !== 'undefined' &&
3950
- typeof this.filterVal !== 'undefined' &&
3951
- this.filterVal !== '') {
3952
- items = items.filter(item => compareFn(item[filterBy], this.filterVal));
4056
+ typeof filterVal !== 'undefined' &&
4057
+ filterVal !== '') {
4058
+ items = items.filter(item => compareFn(item[filterBy], this.filterVal()));
3953
4059
  }
3954
- switch (this.orderDir) {
4060
+ switch (this.orderDir()) {
3955
4061
  case 'ASC':
3956
4062
  this.sortItems(items);
3957
4063
  this.projectItems(items);
@@ -3966,38 +4072,14 @@ class ForDirective {
3966
4072
  }
3967
4073
  }
3968
4074
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: ForDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
3969
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.9", type: ForDirective, isStandalone: true, selector: "[abpFor]", inputs: { items: ["abpForOf", "items"], orderBy: ["abpForOrderBy", "orderBy"], orderDir: ["abpForOrderDir", "orderDir"], filterBy: ["abpForFilterBy", "filterBy"], filterVal: ["abpForFilterVal", "filterVal"], trackBy: ["abpForTrackBy", "trackBy"], compareBy: ["abpForCompareBy", "compareBy"], emptyRef: ["abpForEmptyRef", "emptyRef"] }, usesOnChanges: true, ngImport: i0 }); }
4075
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.9", type: ForDirective, isStandalone: true, selector: "[abpFor]", inputs: { items: { classPropertyName: "items", publicName: "abpForOf", isSignal: true, isRequired: true, transformFunction: null }, orderBy: { classPropertyName: "orderBy", publicName: "abpForOrderBy", isSignal: true, isRequired: false, transformFunction: null }, orderDir: { classPropertyName: "orderDir", publicName: "abpForOrderDir", isSignal: true, isRequired: false, transformFunction: null }, filterBy: { classPropertyName: "filterBy", publicName: "abpForFilterBy", isSignal: true, isRequired: false, transformFunction: null }, filterVal: { classPropertyName: "filterVal", publicName: "abpForFilterVal", isSignal: true, isRequired: false, transformFunction: null }, trackBy: { classPropertyName: "trackBy", publicName: "abpForTrackBy", isSignal: true, isRequired: false, transformFunction: null }, compareBy: { classPropertyName: "compareBy", publicName: "abpForCompareBy", isSignal: true, isRequired: false, transformFunction: null }, emptyRef: { classPropertyName: "emptyRef", publicName: "abpForEmptyRef", isSignal: true, isRequired: false, transformFunction: null } }, usesOnChanges: true, ngImport: i0 }); }
3970
4076
  }
3971
4077
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: ForDirective, decorators: [{
3972
4078
  type: Directive,
3973
4079
  args: [{
3974
4080
  selector: '[abpFor]',
3975
4081
  }]
3976
- }], propDecorators: { items: [{
3977
- type: Input,
3978
- args: ['abpForOf']
3979
- }], orderBy: [{
3980
- type: Input,
3981
- args: ['abpForOrderBy']
3982
- }], orderDir: [{
3983
- type: Input,
3984
- args: ['abpForOrderDir']
3985
- }], filterBy: [{
3986
- type: Input,
3987
- args: ['abpForFilterBy']
3988
- }], filterVal: [{
3989
- type: Input,
3990
- args: ['abpForFilterVal']
3991
- }], trackBy: [{
3992
- type: Input,
3993
- args: ['abpForTrackBy']
3994
- }], compareBy: [{
3995
- type: Input,
3996
- args: ['abpForCompareBy']
3997
- }], emptyRef: [{
3998
- type: Input,
3999
- args: ['abpForEmptyRef']
4000
- }] } });
4082
+ }], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "abpForOf", required: true }] }], orderBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "abpForOrderBy", required: false }] }], orderDir: [{ type: i0.Input, args: [{ isSignal: true, alias: "abpForOrderDir", required: false }] }], filterBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "abpForFilterBy", required: false }] }], filterVal: [{ type: i0.Input, args: [{ isSignal: true, alias: "abpForFilterVal", required: false }] }], trackBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "abpForTrackBy", required: false }] }], compareBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "abpForCompareBy", required: false }] }], emptyRef: [{ type: i0.Input, args: [{ isSignal: true, alias: "abpForEmptyRef", required: false }] }] } });
4001
4083
 
4002
4084
  /**
4003
4085
  * @deprecated FormSubmitDirective will be removed in V7.0.0. Use `ngSubmit` instead.
@@ -4008,19 +4090,21 @@ class FormSubmitDirective {
4008
4090
  this.host = inject(ElementRef);
4009
4091
  this.cdRef = inject(ChangeDetectorRef);
4010
4092
  this.subscription = inject(SubscriptionService);
4011
- this.debounce = 200;
4012
- this.markAsDirtyWhenSubmit = true;
4013
- this.ngSubmit = new EventEmitter();
4093
+ this.debounce = input(200, ...(ngDevMode ? [{ debugName: "debounce" }] : []));
4094
+ // TODO: Remove unused input
4095
+ this.notValidateOnSubmit = input(undefined, ...(ngDevMode ? [{ debugName: "notValidateOnSubmit" }] : []));
4096
+ this.markAsDirtyWhenSubmit = input(true, ...(ngDevMode ? [{ debugName: "markAsDirtyWhenSubmit" }] : []));
4097
+ this.ngSubmit = output();
4014
4098
  this.executedNgSubmit = false;
4015
4099
  }
4016
4100
  ngOnInit() {
4017
4101
  this.subscription.addOne(this.formGroupDirective.ngSubmit, () => {
4018
- if (this.markAsDirtyWhenSubmit) {
4102
+ if (this.markAsDirtyWhenSubmit()) {
4019
4103
  this.markAsDirty();
4020
4104
  }
4021
4105
  this.executedNgSubmit = true;
4022
4106
  });
4023
- const keyup$ = fromEvent(this.host.nativeElement, 'keyup').pipe(debounceTime(this.debounce), filter(event => !(event.target instanceof HTMLTextAreaElement)), filter(event => event && event.key === 'Enter'));
4107
+ const keyup$ = fromEvent(this.host.nativeElement, 'keyup').pipe(debounceTime(this.debounce()), filter(event => !(event.target instanceof HTMLTextAreaElement)), filter(event => event && event.key === 'Enter'));
4024
4108
  this.subscription.addOne(keyup$, () => {
4025
4109
  if (!this.executedNgSubmit) {
4026
4110
  this.host.nativeElement.dispatchEvent(new Event('submit', { bubbles: true, cancelable: true }));
@@ -4035,7 +4119,7 @@ class FormSubmitDirective {
4035
4119
  this.cdRef.detectChanges();
4036
4120
  }
4037
4121
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: FormSubmitDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
4038
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.9", type: FormSubmitDirective, isStandalone: true, selector: "form[ngSubmit][formGroup]", inputs: { debounce: "debounce", notValidateOnSubmit: "notValidateOnSubmit", markAsDirtyWhenSubmit: "markAsDirtyWhenSubmit" }, outputs: { ngSubmit: "ngSubmit" }, providers: [SubscriptionService], ngImport: i0 }); }
4122
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.9", type: FormSubmitDirective, isStandalone: true, selector: "form[ngSubmit][formGroup]", inputs: { debounce: { classPropertyName: "debounce", publicName: "debounce", isSignal: true, isRequired: false, transformFunction: null }, notValidateOnSubmit: { classPropertyName: "notValidateOnSubmit", publicName: "notValidateOnSubmit", isSignal: true, isRequired: false, transformFunction: null }, markAsDirtyWhenSubmit: { classPropertyName: "markAsDirtyWhenSubmit", publicName: "markAsDirtyWhenSubmit", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { ngSubmit: "ngSubmit" }, providers: [SubscriptionService], ngImport: i0 }); }
4039
4123
  }
4040
4124
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: FormSubmitDirective, decorators: [{
4041
4125
  type: Directive,
@@ -4043,15 +4127,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImpor
4043
4127
  selector: 'form[ngSubmit][formGroup]',
4044
4128
  providers: [SubscriptionService],
4045
4129
  }]
4046
- }], propDecorators: { debounce: [{
4047
- type: Input
4048
- }], notValidateOnSubmit: [{
4049
- type: Input
4050
- }], markAsDirtyWhenSubmit: [{
4051
- type: Input
4052
- }], ngSubmit: [{
4053
- type: Output
4054
- }] } });
4130
+ }], propDecorators: { debounce: [{ type: i0.Input, args: [{ isSignal: true, alias: "debounce", required: false }] }], notValidateOnSubmit: [{ type: i0.Input, args: [{ isSignal: true, alias: "notValidateOnSubmit", required: false }] }], markAsDirtyWhenSubmit: [{ type: i0.Input, args: [{ isSignal: true, alias: "markAsDirtyWhenSubmit", required: false }] }], ngSubmit: [{ type: i0.Output, args: ["ngSubmit"] }] } });
4055
4131
  function setDirty(controls) {
4056
4132
  if (Array.isArray(controls)) {
4057
4133
  controls.forEach(group => {
@@ -4068,7 +4144,7 @@ function setDirty(controls) {
4068
4144
  class InitDirective {
4069
4145
  constructor() {
4070
4146
  this.elRef = inject(ElementRef);
4071
- this.init = new EventEmitter();
4147
+ this.init = output({ alias: 'abpInit' });
4072
4148
  }
4073
4149
  ngAfterViewInit() {
4074
4150
  this.init.emit(this.elRef);
@@ -4081,10 +4157,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImpor
4081
4157
  args: [{
4082
4158
  selector: '[abpInit]',
4083
4159
  }]
4084
- }], propDecorators: { init: [{
4085
- type: Output,
4086
- args: ['abpInit']
4087
- }] } });
4160
+ }], propDecorators: { init: [{ type: i0.Output, args: ["abpInit"] }] } });
4088
4161
 
4089
4162
  class PermissionDirective {
4090
4163
  constructor() {
@@ -4093,7 +4166,8 @@ class PermissionDirective {
4093
4166
  this.permissionService = inject(PermissionService);
4094
4167
  this.cdRef = inject(ChangeDetectorRef);
4095
4168
  this.queue = inject(QUEUE_MANAGER);
4096
- this.runChangeDetection = true;
4169
+ this.condition = input(undefined, { ...(ngDevMode ? { debugName: "condition" } : {}), alias: "abpPermission" });
4170
+ this.runChangeDetection = input(true, { ...(ngDevMode ? { debugName: "runChangeDetection" } : {}), alias: "abpPermissionRunChangeDetection" });
4097
4171
  this.cdrSubject = new ReplaySubject();
4098
4172
  this.rendered = false;
4099
4173
  }
@@ -4102,14 +4176,14 @@ class PermissionDirective {
4102
4176
  this.subscription.unsubscribe();
4103
4177
  }
4104
4178
  this.subscription = this.permissionService
4105
- .getGrantedPolicy$(this.condition || '')
4179
+ .getGrantedPolicy$(this.condition() || '')
4106
4180
  .pipe(distinctUntilChanged())
4107
4181
  .subscribe(isGranted => {
4108
4182
  this.vcRef.clear();
4109
4183
  if (isGranted && this.templateRef) {
4110
4184
  this.vcRef.createEmbeddedView(this.templateRef);
4111
4185
  }
4112
- if (this.runChangeDetection) {
4186
+ if (this.runChangeDetection()) {
4113
4187
  if (!this.rendered) {
4114
4188
  this.cdrSubject.next();
4115
4189
  }
@@ -4134,20 +4208,14 @@ class PermissionDirective {
4134
4208
  this.rendered = true;
4135
4209
  }
4136
4210
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: PermissionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
4137
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.9", type: PermissionDirective, isStandalone: true, selector: "[abpPermission]", inputs: { condition: ["abpPermission", "condition"], runChangeDetection: ["abpPermissionRunChangeDetection", "runChangeDetection"] }, usesOnChanges: true, ngImport: i0 }); }
4211
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.9", type: PermissionDirective, isStandalone: true, selector: "[abpPermission]", inputs: { condition: { classPropertyName: "condition", publicName: "abpPermission", isSignal: true, isRequired: false, transformFunction: null }, runChangeDetection: { classPropertyName: "runChangeDetection", publicName: "abpPermissionRunChangeDetection", isSignal: true, isRequired: false, transformFunction: null } }, usesOnChanges: true, ngImport: i0 }); }
4138
4212
  }
4139
4213
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: PermissionDirective, decorators: [{
4140
4214
  type: Directive,
4141
4215
  args: [{
4142
4216
  selector: '[abpPermission]',
4143
4217
  }]
4144
- }], propDecorators: { condition: [{
4145
- type: Input,
4146
- args: ['abpPermission']
4147
- }], runChangeDetection: [{
4148
- type: Input,
4149
- args: ['abpPermissionRunChangeDetection']
4150
- }] } });
4218
+ }], propDecorators: { condition: [{ type: i0.Input, args: [{ isSignal: true, alias: "abpPermission", required: false }] }], runChangeDetection: [{ type: i0.Input, args: [{ isSignal: true, alias: "abpPermissionRunChangeDetection", required: false }] }] } });
4151
4219
 
4152
4220
  class ReplaceableTemplateDirective {
4153
4221
  constructor() {
@@ -4156,6 +4224,7 @@ class ReplaceableTemplateDirective {
4156
4224
  this.vcRef = inject(ViewContainerRef);
4157
4225
  this.replaceableComponents = inject(ReplaceableComponentsService);
4158
4226
  this.subscription = inject(SubscriptionService);
4227
+ this.data = input.required({ ...(ngDevMode ? { debugName: "data" } : {}), alias: "abpReplaceableTemplate" });
4159
4228
  this.providedData = {
4160
4229
  inputs: {},
4161
4230
  outputs: {},
@@ -4170,10 +4239,16 @@ class ReplaceableTemplateDirective {
4170
4239
  this.setDefaultComponentInputs();
4171
4240
  },
4172
4241
  };
4242
+ effect(() => {
4243
+ const data = this.data();
4244
+ if (data?.inputs && this.defaultComponentRef) {
4245
+ this.setDefaultComponentInputs();
4246
+ }
4247
+ });
4173
4248
  }
4174
4249
  ngOnInit() {
4175
4250
  const component$ = this.replaceableComponents
4176
- .get$(this.data.componentKey)
4251
+ .get$(this.data().componentKey)
4177
4252
  .pipe(filter((res = {}) => !this.initialized || !compare(res.component, this.externalComponent)));
4178
4253
  this.subscription.addOne(component$, (res = {}) => {
4179
4254
  this.vcRef.clear();
@@ -4204,23 +4279,24 @@ class ReplaceableTemplateDirective {
4204
4279
  }
4205
4280
  }
4206
4281
  setDefaultComponentInputs() {
4207
- if (!this.defaultComponentRef || (!this.data.inputs && !this.data.outputs))
4282
+ const data = this.data();
4283
+ if (!this.defaultComponentRef || (!data.inputs && !data.outputs))
4208
4284
  return;
4209
- if (this.data.inputs) {
4210
- for (const key in this.data.inputs) {
4211
- if (Object.prototype.hasOwnProperty.call(this.data.inputs, key)) {
4212
- if (!compare(this.defaultComponentRef[key], this.data.inputs[key].value)) {
4213
- this.defaultComponentRef[key] = this.data.inputs[key].value;
4285
+ if (data.inputs) {
4286
+ for (const key in data.inputs) {
4287
+ if (Object.prototype.hasOwnProperty.call(data.inputs, key)) {
4288
+ if (!compare(this.defaultComponentRef[key], data.inputs[key].value)) {
4289
+ this.defaultComponentRef[key] = data.inputs[key].value;
4214
4290
  }
4215
4291
  }
4216
4292
  }
4217
4293
  }
4218
- if (this.data.outputs) {
4219
- for (const key in this.data.outputs) {
4220
- if (Object.prototype.hasOwnProperty.call(this.data.outputs, key)) {
4294
+ if (data.outputs) {
4295
+ for (const key in data.outputs) {
4296
+ if (Object.prototype.hasOwnProperty.call(data.outputs, key)) {
4221
4297
  if (!this.defaultComponentSubscriptions[key]) {
4222
4298
  this.defaultComponentSubscriptions[key] = this.defaultComponentRef[key].subscribe((value) => {
4223
- this.data.outputs?.[key](value);
4299
+ this.data().outputs?.[key](value);
4224
4300
  });
4225
4301
  }
4226
4302
  }
@@ -4228,23 +4304,25 @@ class ReplaceableTemplateDirective {
4228
4304
  }
4229
4305
  }
4230
4306
  setProvidedData() {
4231
- this.providedData = { outputs: {}, ...this.data, inputs: {} };
4232
- if (!this.data.inputs)
4307
+ this.providedData = { outputs: {}, ...this.data(), inputs: {} };
4308
+ const data = this.data();
4309
+ if (!data.inputs)
4233
4310
  return;
4234
4311
  Object.defineProperties(this.providedData.inputs, {
4235
- ...Object.keys(this.data.inputs).reduce((acc, key) => ({
4312
+ ...Object.keys(data.inputs).reduce((acc, key) => ({
4236
4313
  ...acc,
4237
4314
  [key]: {
4238
4315
  enumerable: true,
4239
4316
  configurable: true,
4240
- get: () => this.data.inputs?.[key]?.value,
4241
- ...(this.data.inputs?.[key]?.twoWay && {
4317
+ get: () => this.data().inputs?.[key]?.value,
4318
+ ...(this.data().inputs?.[key]?.twoWay && {
4242
4319
  set: (newValue) => {
4243
- if (this.data.inputs?.[key]) {
4244
- this.data.inputs[key].value = newValue;
4320
+ const dataValue = this.data();
4321
+ if (dataValue.inputs?.[key]) {
4322
+ dataValue.inputs[key].value = newValue;
4245
4323
  }
4246
- if (this.data.outputs?.[`${key}Change`]) {
4247
- this.data.outputs[`${key}Change`](newValue);
4324
+ if (dataValue.outputs?.[`${key}Change`]) {
4325
+ dataValue.outputs[`${key}Change`](newValue);
4248
4326
  }
4249
4327
  },
4250
4328
  }),
@@ -4260,7 +4338,7 @@ class ReplaceableTemplateDirective {
4260
4338
  this.defaultComponentRef = null;
4261
4339
  }
4262
4340
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: ReplaceableTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
4263
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.9", type: ReplaceableTemplateDirective, isStandalone: true, selector: "[abpReplaceableTemplate]", inputs: { data: ["abpReplaceableTemplate", "data"] }, providers: [SubscriptionService], usesOnChanges: true, ngImport: i0 }); }
4341
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.9", type: ReplaceableTemplateDirective, isStandalone: true, selector: "[abpReplaceableTemplate]", inputs: { data: { classPropertyName: "data", publicName: "abpReplaceableTemplate", isSignal: true, isRequired: true, transformFunction: null } }, providers: [SubscriptionService], usesOnChanges: true, ngImport: i0 }); }
4264
4342
  }
4265
4343
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: ReplaceableTemplateDirective, decorators: [{
4266
4344
  type: Directive,
@@ -4268,16 +4346,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImpor
4268
4346
  selector: '[abpReplaceableTemplate]',
4269
4347
  providers: [SubscriptionService],
4270
4348
  }]
4271
- }], ctorParameters: () => [], propDecorators: { data: [{
4272
- type: Input,
4273
- args: ['abpReplaceableTemplate']
4274
- }] } });
4349
+ }], ctorParameters: () => [], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "abpReplaceableTemplate", required: true }] }] } });
4275
4350
 
4276
4351
  class StopPropagationDirective {
4277
4352
  constructor() {
4278
4353
  this.el = inject(ElementRef);
4279
4354
  this.subscription = inject(SubscriptionService);
4280
- this.stopPropEvent = new EventEmitter();
4355
+ this.stopPropEvent = output({ alias: 'click.stop' });
4281
4356
  }
4282
4357
  ngOnInit() {
4283
4358
  this.subscription.addOne(fromEvent(this.el.nativeElement, 'click'), event => {
@@ -4294,36 +4369,33 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImpor
4294
4369
  selector: '[click.stop]',
4295
4370
  providers: [SubscriptionService],
4296
4371
  }]
4297
- }], propDecorators: { stopPropEvent: [{
4298
- type: Output,
4299
- args: ['click.stop']
4300
- }] } });
4372
+ }], propDecorators: { stopPropEvent: [{ type: i0.Output, args: ["click.stop"] }] } });
4301
4373
 
4302
4374
  class ShowPasswordDirective {
4303
4375
  constructor() {
4304
4376
  this.elementRef = inject(ElementRef);
4305
- }
4306
- set abpShowPassword(visible) {
4307
- const element = this.elementRef.nativeElement;
4308
- if (!element)
4309
- return;
4310
- element.type = visible ? 'text' : 'password';
4377
+ this.abpShowPassword = input(false, ...(ngDevMode ? [{ debugName: "abpShowPassword" }] : []));
4378
+ effect(() => {
4379
+ const visible = this.abpShowPassword();
4380
+ const element = this.elementRef.nativeElement;
4381
+ if (!element)
4382
+ return;
4383
+ element.type = visible ? 'text' : 'password';
4384
+ });
4311
4385
  }
4312
4386
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: ShowPasswordDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
4313
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.9", type: ShowPasswordDirective, isStandalone: true, selector: "[abpShowPassword]", inputs: { abpShowPassword: "abpShowPassword" }, ngImport: i0 }); }
4387
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.9", type: ShowPasswordDirective, isStandalone: true, selector: "[abpShowPassword]", inputs: { abpShowPassword: { classPropertyName: "abpShowPassword", publicName: "abpShowPassword", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
4314
4388
  }
4315
4389
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: ShowPasswordDirective, decorators: [{
4316
4390
  type: Directive,
4317
4391
  args: [{
4318
4392
  selector: '[abpShowPassword]',
4319
4393
  }]
4320
- }], propDecorators: { abpShowPassword: [{
4321
- type: Input
4322
- }] } });
4394
+ }], ctorParameters: () => [], propDecorators: { abpShowPassword: [{ type: i0.Input, args: [{ isSignal: true, alias: "abpShowPassword", required: false }] }] } });
4323
4395
 
4324
4396
  class TrackCapsLockDirective {
4325
4397
  constructor() {
4326
- this.capsLock = new EventEmitter();
4398
+ this.capsLock = output({ alias: 'abpCapsLock' });
4327
4399
  }
4328
4400
  onKeyDown(event) {
4329
4401
  this.capsLock.emit(this.isCapsLockOpen(event));
@@ -4348,10 +4420,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImpor
4348
4420
  args: [{
4349
4421
  selector: '[abpCapsLock]',
4350
4422
  }]
4351
- }], propDecorators: { capsLock: [{
4352
- type: Output,
4353
- args: ['abpCapsLock']
4354
- }], onKeyDown: [{
4423
+ }], propDecorators: { capsLock: [{ type: i0.Output, args: ["abpCapsLock"] }], onKeyDown: [{
4355
4424
  type: HostListener,
4356
4425
  args: ['window:keydown', ['$event']]
4357
4426
  }], onKeyUp: [{
@@ -4575,6 +4644,11 @@ function provideAbpCore(...features) {
4575
4644
  inject(LocalizationService);
4576
4645
  inject(LocalStorageListenerService);
4577
4646
  inject(RoutesHandler);
4647
+ // Initialize UILocalizationService if UI-only mode is enabled
4648
+ const options = inject(CORE_OPTIONS);
4649
+ if (options?.uiLocalization?.enabled) {
4650
+ inject(UILocalizationService);
4651
+ }
4578
4652
  await getInitialData();
4579
4653
  }),
4580
4654
  LocaleProvider,
@@ -5519,5 +5593,5 @@ const AbpValidators = {
5519
5593
  * Generated bundle index. Do not edit.
5520
5594
  */
5521
5595
 
5522
- export { APP_INIT_ERROR_HANDLERS, APP_STARTED_WITH_SSR, AbpApiDefinitionService, AbpApplicationConfigurationService, AbpApplicationLocalizationService, AbpCookieStorageService, AbpLocalStorageService, AbpTenantService, AbpTitleStrategy, AbpValidators, AbpWindowService, AbstractAuthErrorFilter, AbstractNavTreeService, AbstractNgModelComponent, AbstractTreeService, ApiInterceptor, AsyncLocalizationPipe, AuditedEntityDto, AuditedEntityWithUserDto, AuthErrorEvent, AuthErrorFilterService, AuthEvent, AuthGuard, AuthInfoEvent, AuthService, AuthSuccessEvent, AutofocusDirective, BaseCoreModule, BaseTreeNode, CHECK_AUTHENTICATION_STATE_FN_KEY, CONTAINER_STRATEGY, CONTENT_SECURITY_STRATEGY, CONTENT_STRATEGY, CONTEXT_STRATEGY, COOKIE_LANGUAGE_KEY, CORE_OPTIONS, CROSS_ORIGIN_STRATEGY, ClearContainerStrategy, ComponentContextStrategy, ComponentProjectionStrategy, ConfigStateService, ContainerStrategy, ContentProjectionService, ContentSecurityStrategy, ContentStrategy, ContextStrategy, CookieLanguageProvider, CoreFeatureKind, CoreModule, CreationAuditedEntityDto, CreationAuditedEntityWithUserDto, CrossOriginStrategy, DEFAULT_DYNAMIC_LAYOUTS, DISABLE_PROJECT_NAME, DOM_STRATEGY, DYNAMIC_LAYOUTS_TOKEN, DefaultQueueManager, DomInsertionService, DomStrategy, DomStrategyService, DynamicLayoutComponent, EntityDto, EnvironmentService, ExtensibleAuditedEntityDto, ExtensibleAuditedEntityWithUserDto, ExtensibleCreationAuditedEntityDto, ExtensibleCreationAuditedEntityWithUserDto, ExtensibleEntityDto, ExtensibleFullAuditedEntityDto, ExtensibleFullAuditedEntityWithUserDto, ExtensibleLimitedResultRequestDto, ExtensibleObject, ExtensiblePagedAndSortedResultRequestDto, ExtensiblePagedResultRequestDto, ExternalHttpClient, ForDirective, FormSubmitDirective, FullAuditedEntityDto, FullAuditedEntityWithUserDto, HtmlEncodePipe, HtmlEncodingService, HttpErrorReporterService, HttpWaitService, INCUDE_LOCALIZATION_RESOURCES_TOKEN, INJECTOR_PIPE_DATA_TOKEN, IS_EXTERNAL_REQUEST, IncludeLocalizationResourcesProvider, InitDirective, InputEventDebounceDirective, InsertIntoContainerStrategy, InternalStore, InternetConnectionService, LIST_QUERY_DEBOUNCE_TIME, LOADER_DELAY, LOADING_STRATEGY, LOCALIZATIONS, LazyLoadService, LazyLocalizationPipe, LazyModuleFactory, LimitedResultRequestDto, ListResultDto, ListService, LoadingStrategy, LocalStorageListenerService, LocaleId, LocaleProvider, LocalizationModule, LocalizationPipe, LocalizationService, LooseContentSecurityStrategy, MultiTenancyService, NAVIGATE_TO_MANAGE_PROFILE, NavigationEvent, NoContentSecurityStrategy, NoContextStrategy, NoCrossOriginStrategy, OTHERS_GROUP, index as ObjectExtending, PIPE_TO_LOGIN_FN_KEY, PROJECTION_STRATEGY, PagedAndSortedResultRequestDto, PagedResultDto, PagedResultRequestDto, PermissionDirective, PermissionGuard, PermissionService, ProjectionStrategy, QUEUE_MANAGER, ReplaceableComponentsService, ReplaceableRouteContainerComponent, ReplaceableTemplateDirective, ResourceWaitService, RestService, RootComponentProjectionStrategy, RootCoreModule, RouterEvents, RouterOutletComponent, RouterWaitService, RoutesService, SET_TOKEN_RESPONSE_TO_STORAGE_FN_KEY, SORT_COMPARE_FUNC, SSR_FLAG, SafeHtmlPipe, ScriptContentStrategy, ScriptLoadingStrategy, ServerCookieParser, SessionStateService, ShortDatePipe, ShortDateTimePipe, ShortTimePipe, ShowPasswordDirective, SortPipe, StopPropagationDirective, StyleContentStrategy, StyleLoadingStrategy, SubscriptionService, TENANT_KEY, TENANT_NOT_FOUND_BY_NAME, TemplateContextStrategy, TemplateProjectionStrategy, TimeService, TimezoneService, ToInjectorPipe, TrackByService, TrackCapsLockDirective, UtcToLocalPipe, WebHttpUrlEncodingCodec, asyncAuthGuard, authGuard, checkHasProp, compareFuncFactory, coreOptionsFactory, createGroupMap, createLocalizationPipeKeyGenerator, createLocalizer, createLocalizerWithFallback, createMapFromList, createTokenParser, createTreeFromList, createTreeNodeFilterCreator, deepMerge, differentLocales, downloadBlob, escapeHtmlChars, exists, featuresFactory, findRoute, fromLazyLoad, generateHash, generatePassword, getCurrentTenancyNameFromUrl, getInitialData, getLocaleDirection, getPathName, getRemoteEnv, getRoutePath, getShortDateFormat, getShortDateShortTimeFormat, getShortTimeFormat, interpolate, isArray, isNode, isNullOrEmpty, isNullOrUndefined, isNumber, isObject, isObjectAndNotArray, isObjectAndNotArrayNotNode, isUndefinedOrEmptyString, localeInitializer, localizationContributor, localizations$, mapEnumToOptions, noop, parseTenantFromUrl, permissionGuard, provideAbpCore, provideAbpCoreChild, pushValueTo, reloadRoute, setLanguageToCookie, timezoneInterceptor, trackBy, trackByDeep, transferStateInterceptor, uuid, validateCreditCard, validateMinAge, validateRange, validateRequired, validateStringLength, validateUniqueCharacter, validateUrl, withCompareFuncFactory, withOptions, withTitleStrategy };
5596
+ export { APP_INIT_ERROR_HANDLERS, APP_STARTED_WITH_SSR, AbpApiDefinitionService, AbpApplicationConfigurationService, AbpApplicationLocalizationService, AbpCookieStorageService, AbpLocalStorageService, AbpTenantService, AbpTitleStrategy, AbpValidators, AbpWindowService, AbstractAuthErrorFilter, AbstractNavTreeService, AbstractNgModelComponent, AbstractTreeService, ApiInterceptor, AsyncLocalizationPipe, AuditedEntityDto, AuditedEntityWithUserDto, AuthErrorEvent, AuthErrorFilterService, AuthEvent, AuthGuard, AuthInfoEvent, AuthService, AuthSuccessEvent, AutofocusDirective, BaseCoreModule, BaseTreeNode, CHECK_AUTHENTICATION_STATE_FN_KEY, CONTAINER_STRATEGY, CONTENT_SECURITY_STRATEGY, CONTENT_STRATEGY, CONTEXT_STRATEGY, COOKIE_LANGUAGE_KEY, CORE_OPTIONS, CROSS_ORIGIN_STRATEGY, ClearContainerStrategy, ComponentContextStrategy, ComponentProjectionStrategy, ConfigStateService, ContainerStrategy, ContentProjectionService, ContentSecurityStrategy, ContentStrategy, ContextStrategy, CookieLanguageProvider, CoreFeatureKind, CoreModule, CreationAuditedEntityDto, CreationAuditedEntityWithUserDto, CrossOriginStrategy, DEFAULT_DYNAMIC_LAYOUTS, DISABLE_PROJECT_NAME, DOM_STRATEGY, DYNAMIC_LAYOUTS_TOKEN, DefaultQueueManager, DomInsertionService, DomStrategy, DomStrategyService, DynamicLayoutComponent, EntityDto, EnvironmentService, ExtensibleAuditedEntityDto, ExtensibleAuditedEntityWithUserDto, ExtensibleCreationAuditedEntityDto, ExtensibleCreationAuditedEntityWithUserDto, ExtensibleEntityDto, ExtensibleFullAuditedEntityDto, ExtensibleFullAuditedEntityWithUserDto, ExtensibleLimitedResultRequestDto, ExtensibleObject, ExtensiblePagedAndSortedResultRequestDto, ExtensiblePagedResultRequestDto, ExternalHttpClient, ForDirective, FormSubmitDirective, FullAuditedEntityDto, FullAuditedEntityWithUserDto, HtmlEncodePipe, HtmlEncodingService, HttpErrorReporterService, HttpWaitService, INCUDE_LOCALIZATION_RESOURCES_TOKEN, INJECTOR_PIPE_DATA_TOKEN, IS_EXTERNAL_REQUEST, IncludeLocalizationResourcesProvider, InitDirective, InputEventDebounceDirective, InsertIntoContainerStrategy, InternalStore, InternetConnectionService, LIST_QUERY_DEBOUNCE_TIME, LOADER_DELAY, LOADING_STRATEGY, LOCALIZATIONS, LazyLoadService, LazyLocalizationPipe, LazyModuleFactory, LimitedResultRequestDto, ListResultDto, ListService, LoadingStrategy, LocalStorageListenerService, LocaleId, LocaleProvider, LocalizationModule, LocalizationPipe, LocalizationService, LooseContentSecurityStrategy, MultiTenancyService, NAVIGATE_TO_MANAGE_PROFILE, NavigationEvent, NoContentSecurityStrategy, NoContextStrategy, NoCrossOriginStrategy, OTHERS_GROUP, index as ObjectExtending, PIPE_TO_LOGIN_FN_KEY, PROJECTION_STRATEGY, PagedAndSortedResultRequestDto, PagedResultDto, PagedResultRequestDto, PermissionDirective, PermissionGuard, PermissionService, ProjectionStrategy, QUEUE_MANAGER, ReplaceableComponentsService, ReplaceableRouteContainerComponent, ReplaceableTemplateDirective, ResourceWaitService, RestService, RootComponentProjectionStrategy, RootCoreModule, RouterEvents, RouterOutletComponent, RouterWaitService, RoutesService, SET_TOKEN_RESPONSE_TO_STORAGE_FN_KEY, SORT_COMPARE_FUNC, SSR_FLAG, SafeHtmlPipe, ScriptContentStrategy, ScriptLoadingStrategy, ServerCookieParser, SessionStateService, ShortDatePipe, ShortDateTimePipe, ShortTimePipe, ShowPasswordDirective, SortPipe, StopPropagationDirective, StyleContentStrategy, StyleLoadingStrategy, SubscriptionService, TENANT_KEY, TENANT_NOT_FOUND_BY_NAME, TemplateContextStrategy, TemplateProjectionStrategy, TimeService, TimezoneService, ToInjectorPipe, TrackByService, TrackCapsLockDirective, UILocalizationService, UtcToLocalPipe, WebHttpUrlEncodingCodec, asyncAuthGuard, authGuard, checkHasProp, compareFuncFactory, coreOptionsFactory, createGroupMap, createLocalizationPipeKeyGenerator, createLocalizer, createLocalizerWithFallback, createMapFromList, createTokenParser, createTreeFromList, createTreeNodeFilterCreator, deepMerge, differentLocales, downloadBlob, escapeHtmlChars, exists, featuresFactory, findRoute, fromLazyLoad, generateHash, generatePassword, getCurrentTenancyNameFromUrl, getInitialData, getLocaleDirection, getPathName, getRemoteEnv, getRoutePath, getShortDateFormat, getShortDateShortTimeFormat, getShortTimeFormat, interpolate, isArray, isNode, isNullOrEmpty, isNullOrUndefined, isNumber, isObject, isObjectAndNotArray, isObjectAndNotArrayNotNode, isUndefinedOrEmptyString, localeInitializer, localizationContributor, localizations$, mapEnumToOptions, noop, parseTenantFromUrl, permissionGuard, provideAbpCore, provideAbpCoreChild, pushValueTo, reloadRoute, setLanguageToCookie, timezoneInterceptor, trackBy, trackByDeep, transferStateInterceptor, uuid, validateCreditCard, validateMinAge, validateRange, validateRequired, validateStringLength, validateUniqueCharacter, validateUrl, withCompareFuncFactory, withOptions, withTitleStrategy };
5523
5597
  //# sourceMappingURL=abp-ng.core.mjs.map