@abp/ng.core 10.1.0-rc.3 → 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,24 +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) {
4045
+ this.vcRef.clear();
3940
4046
  this.differ = null;
3941
- this.lastItemsRef = this.items;
4047
+ this.lastItemsRef = itemsValue;
3942
4048
  }
3943
- let items = clone(this.items);
4049
+ let items = clone(itemsValue);
3944
4050
  if (!Array.isArray(items))
3945
4051
  return;
3946
4052
  const compareFn = this.compareFn;
3947
- const filterBy = this.filterBy;
4053
+ const filterBy = this.filterBy();
4054
+ const filterVal = this.filterVal();
3948
4055
  if (typeof filterBy !== 'undefined' &&
3949
- typeof this.filterVal !== 'undefined' &&
3950
- this.filterVal !== '') {
3951
- 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()));
3952
4059
  }
3953
- switch (this.orderDir) {
4060
+ switch (this.orderDir()) {
3954
4061
  case 'ASC':
3955
4062
  this.sortItems(items);
3956
4063
  this.projectItems(items);
@@ -3965,38 +4072,14 @@ class ForDirective {
3965
4072
  }
3966
4073
  }
3967
4074
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: ForDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
3968
- 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 }); }
3969
4076
  }
3970
4077
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: ForDirective, decorators: [{
3971
4078
  type: Directive,
3972
4079
  args: [{
3973
4080
  selector: '[abpFor]',
3974
4081
  }]
3975
- }], propDecorators: { items: [{
3976
- type: Input,
3977
- args: ['abpForOf']
3978
- }], orderBy: [{
3979
- type: Input,
3980
- args: ['abpForOrderBy']
3981
- }], orderDir: [{
3982
- type: Input,
3983
- args: ['abpForOrderDir']
3984
- }], filterBy: [{
3985
- type: Input,
3986
- args: ['abpForFilterBy']
3987
- }], filterVal: [{
3988
- type: Input,
3989
- args: ['abpForFilterVal']
3990
- }], trackBy: [{
3991
- type: Input,
3992
- args: ['abpForTrackBy']
3993
- }], compareBy: [{
3994
- type: Input,
3995
- args: ['abpForCompareBy']
3996
- }], emptyRef: [{
3997
- type: Input,
3998
- args: ['abpForEmptyRef']
3999
- }] } });
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 }] }] } });
4000
4083
 
4001
4084
  /**
4002
4085
  * @deprecated FormSubmitDirective will be removed in V7.0.0. Use `ngSubmit` instead.
@@ -4007,19 +4090,21 @@ class FormSubmitDirective {
4007
4090
  this.host = inject(ElementRef);
4008
4091
  this.cdRef = inject(ChangeDetectorRef);
4009
4092
  this.subscription = inject(SubscriptionService);
4010
- this.debounce = 200;
4011
- this.markAsDirtyWhenSubmit = true;
4012
- 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();
4013
4098
  this.executedNgSubmit = false;
4014
4099
  }
4015
4100
  ngOnInit() {
4016
4101
  this.subscription.addOne(this.formGroupDirective.ngSubmit, () => {
4017
- if (this.markAsDirtyWhenSubmit) {
4102
+ if (this.markAsDirtyWhenSubmit()) {
4018
4103
  this.markAsDirty();
4019
4104
  }
4020
4105
  this.executedNgSubmit = true;
4021
4106
  });
4022
- 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'));
4023
4108
  this.subscription.addOne(keyup$, () => {
4024
4109
  if (!this.executedNgSubmit) {
4025
4110
  this.host.nativeElement.dispatchEvent(new Event('submit', { bubbles: true, cancelable: true }));
@@ -4034,7 +4119,7 @@ class FormSubmitDirective {
4034
4119
  this.cdRef.detectChanges();
4035
4120
  }
4036
4121
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: FormSubmitDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
4037
- 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 }); }
4038
4123
  }
4039
4124
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: FormSubmitDirective, decorators: [{
4040
4125
  type: Directive,
@@ -4042,15 +4127,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImpor
4042
4127
  selector: 'form[ngSubmit][formGroup]',
4043
4128
  providers: [SubscriptionService],
4044
4129
  }]
4045
- }], propDecorators: { debounce: [{
4046
- type: Input
4047
- }], notValidateOnSubmit: [{
4048
- type: Input
4049
- }], markAsDirtyWhenSubmit: [{
4050
- type: Input
4051
- }], ngSubmit: [{
4052
- type: Output
4053
- }] } });
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"] }] } });
4054
4131
  function setDirty(controls) {
4055
4132
  if (Array.isArray(controls)) {
4056
4133
  controls.forEach(group => {
@@ -4067,7 +4144,7 @@ function setDirty(controls) {
4067
4144
  class InitDirective {
4068
4145
  constructor() {
4069
4146
  this.elRef = inject(ElementRef);
4070
- this.init = new EventEmitter();
4147
+ this.init = output({ alias: 'abpInit' });
4071
4148
  }
4072
4149
  ngAfterViewInit() {
4073
4150
  this.init.emit(this.elRef);
@@ -4080,10 +4157,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImpor
4080
4157
  args: [{
4081
4158
  selector: '[abpInit]',
4082
4159
  }]
4083
- }], propDecorators: { init: [{
4084
- type: Output,
4085
- args: ['abpInit']
4086
- }] } });
4160
+ }], propDecorators: { init: [{ type: i0.Output, args: ["abpInit"] }] } });
4087
4161
 
4088
4162
  class PermissionDirective {
4089
4163
  constructor() {
@@ -4092,7 +4166,8 @@ class PermissionDirective {
4092
4166
  this.permissionService = inject(PermissionService);
4093
4167
  this.cdRef = inject(ChangeDetectorRef);
4094
4168
  this.queue = inject(QUEUE_MANAGER);
4095
- this.runChangeDetection = true;
4169
+ this.condition = input(undefined, { ...(ngDevMode ? { debugName: "condition" } : {}), alias: "abpPermission" });
4170
+ this.runChangeDetection = input(true, { ...(ngDevMode ? { debugName: "runChangeDetection" } : {}), alias: "abpPermissionRunChangeDetection" });
4096
4171
  this.cdrSubject = new ReplaySubject();
4097
4172
  this.rendered = false;
4098
4173
  }
@@ -4101,14 +4176,14 @@ class PermissionDirective {
4101
4176
  this.subscription.unsubscribe();
4102
4177
  }
4103
4178
  this.subscription = this.permissionService
4104
- .getGrantedPolicy$(this.condition || '')
4179
+ .getGrantedPolicy$(this.condition() || '')
4105
4180
  .pipe(distinctUntilChanged())
4106
4181
  .subscribe(isGranted => {
4107
4182
  this.vcRef.clear();
4108
4183
  if (isGranted && this.templateRef) {
4109
4184
  this.vcRef.createEmbeddedView(this.templateRef);
4110
4185
  }
4111
- if (this.runChangeDetection) {
4186
+ if (this.runChangeDetection()) {
4112
4187
  if (!this.rendered) {
4113
4188
  this.cdrSubject.next();
4114
4189
  }
@@ -4133,20 +4208,14 @@ class PermissionDirective {
4133
4208
  this.rendered = true;
4134
4209
  }
4135
4210
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: PermissionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
4136
- 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 }); }
4137
4212
  }
4138
4213
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: PermissionDirective, decorators: [{
4139
4214
  type: Directive,
4140
4215
  args: [{
4141
4216
  selector: '[abpPermission]',
4142
4217
  }]
4143
- }], propDecorators: { condition: [{
4144
- type: Input,
4145
- args: ['abpPermission']
4146
- }], runChangeDetection: [{
4147
- type: Input,
4148
- args: ['abpPermissionRunChangeDetection']
4149
- }] } });
4218
+ }], propDecorators: { condition: [{ type: i0.Input, args: [{ isSignal: true, alias: "abpPermission", required: false }] }], runChangeDetection: [{ type: i0.Input, args: [{ isSignal: true, alias: "abpPermissionRunChangeDetection", required: false }] }] } });
4150
4219
 
4151
4220
  class ReplaceableTemplateDirective {
4152
4221
  constructor() {
@@ -4155,6 +4224,7 @@ class ReplaceableTemplateDirective {
4155
4224
  this.vcRef = inject(ViewContainerRef);
4156
4225
  this.replaceableComponents = inject(ReplaceableComponentsService);
4157
4226
  this.subscription = inject(SubscriptionService);
4227
+ this.data = input.required({ ...(ngDevMode ? { debugName: "data" } : {}), alias: "abpReplaceableTemplate" });
4158
4228
  this.providedData = {
4159
4229
  inputs: {},
4160
4230
  outputs: {},
@@ -4169,10 +4239,16 @@ class ReplaceableTemplateDirective {
4169
4239
  this.setDefaultComponentInputs();
4170
4240
  },
4171
4241
  };
4242
+ effect(() => {
4243
+ const data = this.data();
4244
+ if (data?.inputs && this.defaultComponentRef) {
4245
+ this.setDefaultComponentInputs();
4246
+ }
4247
+ });
4172
4248
  }
4173
4249
  ngOnInit() {
4174
4250
  const component$ = this.replaceableComponents
4175
- .get$(this.data.componentKey)
4251
+ .get$(this.data().componentKey)
4176
4252
  .pipe(filter((res = {}) => !this.initialized || !compare(res.component, this.externalComponent)));
4177
4253
  this.subscription.addOne(component$, (res = {}) => {
4178
4254
  this.vcRef.clear();
@@ -4203,23 +4279,24 @@ class ReplaceableTemplateDirective {
4203
4279
  }
4204
4280
  }
4205
4281
  setDefaultComponentInputs() {
4206
- if (!this.defaultComponentRef || (!this.data.inputs && !this.data.outputs))
4282
+ const data = this.data();
4283
+ if (!this.defaultComponentRef || (!data.inputs && !data.outputs))
4207
4284
  return;
4208
- if (this.data.inputs) {
4209
- for (const key in this.data.inputs) {
4210
- if (Object.prototype.hasOwnProperty.call(this.data.inputs, key)) {
4211
- if (!compare(this.defaultComponentRef[key], this.data.inputs[key].value)) {
4212
- 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;
4213
4290
  }
4214
4291
  }
4215
4292
  }
4216
4293
  }
4217
- if (this.data.outputs) {
4218
- for (const key in this.data.outputs) {
4219
- 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)) {
4220
4297
  if (!this.defaultComponentSubscriptions[key]) {
4221
4298
  this.defaultComponentSubscriptions[key] = this.defaultComponentRef[key].subscribe((value) => {
4222
- this.data.outputs?.[key](value);
4299
+ this.data().outputs?.[key](value);
4223
4300
  });
4224
4301
  }
4225
4302
  }
@@ -4227,23 +4304,25 @@ class ReplaceableTemplateDirective {
4227
4304
  }
4228
4305
  }
4229
4306
  setProvidedData() {
4230
- this.providedData = { outputs: {}, ...this.data, inputs: {} };
4231
- if (!this.data.inputs)
4307
+ this.providedData = { outputs: {}, ...this.data(), inputs: {} };
4308
+ const data = this.data();
4309
+ if (!data.inputs)
4232
4310
  return;
4233
4311
  Object.defineProperties(this.providedData.inputs, {
4234
- ...Object.keys(this.data.inputs).reduce((acc, key) => ({
4312
+ ...Object.keys(data.inputs).reduce((acc, key) => ({
4235
4313
  ...acc,
4236
4314
  [key]: {
4237
4315
  enumerable: true,
4238
4316
  configurable: true,
4239
- get: () => this.data.inputs?.[key]?.value,
4240
- ...(this.data.inputs?.[key]?.twoWay && {
4317
+ get: () => this.data().inputs?.[key]?.value,
4318
+ ...(this.data().inputs?.[key]?.twoWay && {
4241
4319
  set: (newValue) => {
4242
- if (this.data.inputs?.[key]) {
4243
- this.data.inputs[key].value = newValue;
4320
+ const dataValue = this.data();
4321
+ if (dataValue.inputs?.[key]) {
4322
+ dataValue.inputs[key].value = newValue;
4244
4323
  }
4245
- if (this.data.outputs?.[`${key}Change`]) {
4246
- this.data.outputs[`${key}Change`](newValue);
4324
+ if (dataValue.outputs?.[`${key}Change`]) {
4325
+ dataValue.outputs[`${key}Change`](newValue);
4247
4326
  }
4248
4327
  },
4249
4328
  }),
@@ -4259,7 +4338,7 @@ class ReplaceableTemplateDirective {
4259
4338
  this.defaultComponentRef = null;
4260
4339
  }
4261
4340
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: ReplaceableTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
4262
- 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 }); }
4263
4342
  }
4264
4343
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: ReplaceableTemplateDirective, decorators: [{
4265
4344
  type: Directive,
@@ -4267,16 +4346,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImpor
4267
4346
  selector: '[abpReplaceableTemplate]',
4268
4347
  providers: [SubscriptionService],
4269
4348
  }]
4270
- }], ctorParameters: () => [], propDecorators: { data: [{
4271
- type: Input,
4272
- args: ['abpReplaceableTemplate']
4273
- }] } });
4349
+ }], ctorParameters: () => [], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "abpReplaceableTemplate", required: true }] }] } });
4274
4350
 
4275
4351
  class StopPropagationDirective {
4276
4352
  constructor() {
4277
4353
  this.el = inject(ElementRef);
4278
4354
  this.subscription = inject(SubscriptionService);
4279
- this.stopPropEvent = new EventEmitter();
4355
+ this.stopPropEvent = output({ alias: 'click.stop' });
4280
4356
  }
4281
4357
  ngOnInit() {
4282
4358
  this.subscription.addOne(fromEvent(this.el.nativeElement, 'click'), event => {
@@ -4293,36 +4369,33 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImpor
4293
4369
  selector: '[click.stop]',
4294
4370
  providers: [SubscriptionService],
4295
4371
  }]
4296
- }], propDecorators: { stopPropEvent: [{
4297
- type: Output,
4298
- args: ['click.stop']
4299
- }] } });
4372
+ }], propDecorators: { stopPropEvent: [{ type: i0.Output, args: ["click.stop"] }] } });
4300
4373
 
4301
4374
  class ShowPasswordDirective {
4302
4375
  constructor() {
4303
4376
  this.elementRef = inject(ElementRef);
4304
- }
4305
- set abpShowPassword(visible) {
4306
- const element = this.elementRef.nativeElement;
4307
- if (!element)
4308
- return;
4309
- 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
+ });
4310
4385
  }
4311
4386
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: ShowPasswordDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
4312
- 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 }); }
4313
4388
  }
4314
4389
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: ShowPasswordDirective, decorators: [{
4315
4390
  type: Directive,
4316
4391
  args: [{
4317
4392
  selector: '[abpShowPassword]',
4318
4393
  }]
4319
- }], propDecorators: { abpShowPassword: [{
4320
- type: Input
4321
- }] } });
4394
+ }], ctorParameters: () => [], propDecorators: { abpShowPassword: [{ type: i0.Input, args: [{ isSignal: true, alias: "abpShowPassword", required: false }] }] } });
4322
4395
 
4323
4396
  class TrackCapsLockDirective {
4324
4397
  constructor() {
4325
- this.capsLock = new EventEmitter();
4398
+ this.capsLock = output({ alias: 'abpCapsLock' });
4326
4399
  }
4327
4400
  onKeyDown(event) {
4328
4401
  this.capsLock.emit(this.isCapsLockOpen(event));
@@ -4347,10 +4420,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImpor
4347
4420
  args: [{
4348
4421
  selector: '[abpCapsLock]',
4349
4422
  }]
4350
- }], propDecorators: { capsLock: [{
4351
- type: Output,
4352
- args: ['abpCapsLock']
4353
- }], onKeyDown: [{
4423
+ }], propDecorators: { capsLock: [{ type: i0.Output, args: ["abpCapsLock"] }], onKeyDown: [{
4354
4424
  type: HostListener,
4355
4425
  args: ['window:keydown', ['$event']]
4356
4426
  }], onKeyUp: [{
@@ -4574,6 +4644,11 @@ function provideAbpCore(...features) {
4574
4644
  inject(LocalizationService);
4575
4645
  inject(LocalStorageListenerService);
4576
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
+ }
4577
4652
  await getInitialData();
4578
4653
  }),
4579
4654
  LocaleProvider,
@@ -5518,5 +5593,5 @@ const AbpValidators = {
5518
5593
  * Generated bundle index. Do not edit.
5519
5594
  */
5520
5595
 
5521
- 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 };
5522
5597
  //# sourceMappingURL=abp-ng.core.mjs.map