@abp/ng.core 7.1.0 → 7.1.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,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { ChangeDetectorRef, Component, Input, Injectable, InjectionToken, Inject, inject, isDevMode, Optional, SkipSelf, Directive, EventEmitter, Output, Self, Injector, Pipe, NgModule, APP_INITIALIZER, LOCALE_ID, NgModuleFactory, Compiler, ComponentFactoryResolver, ApplicationRef } from '@angular/core';
2
+ import { ChangeDetectorRef, Component, Input, Injectable, InjectionToken, Inject, Optional, isDevMode, SkipSelf, Directive, EventEmitter, Output, Self, Injector, Pipe, NgModule, APP_INITIALIZER, LOCALE_ID, NgModuleFactory, Compiler, inject, SecurityContext, ComponentFactoryResolver, ApplicationRef } from '@angular/core';
3
3
  import { of, BehaviorSubject, Subject, throwError, combineLatest, from, Subscription, fromEvent, ReplaySubject, lastValueFrom, Observable, timer, pipe, concat } from 'rxjs';
4
4
  import * as i1$1 from '@angular/router';
5
5
  import { PRIMARY_OUTLET, NavigationCancel, NavigationEnd, NavigationError, NavigationStart, ActivatedRoute, Router, RouterModule } from '@angular/router';
@@ -12,6 +12,7 @@ import compare from 'just-compare';
12
12
  import * as i1$2 from '@angular/forms';
13
13
  import { FormsModule, ReactiveFormsModule, Validators } from '@angular/forms';
14
14
  import clone from 'just-clone';
15
+ import { DomSanitizer } from '@angular/platform-browser';
15
16
  import { __classPrivateFieldGet } from 'tslib';
16
17
 
17
18
  // Not an abstract class on purpose. Do not change!
@@ -498,11 +499,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
498
499
  const INCUDE_LOCALIZATION_RESOURCES_TOKEN = new InjectionToken('INCUDE_LOCALIZATION_RESOURCES_TOKEN');
499
500
 
500
501
  class ConfigStateService {
501
- constructor() {
502
+ constructor(abpConfigService, abpApplicationLocalizationService, includeLocalizationResources) {
503
+ this.abpConfigService = abpConfigService;
504
+ this.abpApplicationLocalizationService = abpApplicationLocalizationService;
505
+ this.includeLocalizationResources = includeLocalizationResources;
502
506
  this.store = new InternalStore({});
503
- this.includeLocalizationResources = inject(INCUDE_LOCALIZATION_RESOURCES_TOKEN);
504
- this.abpConfigService = inject(AbpApplicationConfigurationService);
505
- this.abpApplicationLocalizationService = inject(AbpApplicationLocalizationService);
506
507
  this.updateSubject = new Subject();
507
508
  this.initUpdateStream();
508
509
  }
@@ -512,7 +513,7 @@ class ConfigStateService {
512
513
  initUpdateStream() {
513
514
  this.updateSubject
514
515
  .pipe(switchMap(() => this.abpConfigService.get({
515
- includeLocalizationResources: this.includeLocalizationResources,
516
+ includeLocalizationResources: !!this.includeLocalizationResources,
516
517
  })))
517
518
  .pipe(switchMap(appState => this.getLocalizationAndCombineWithAppState(appState)))
518
519
  .subscribe(res => this.store.set(res));
@@ -642,14 +643,19 @@ class ConfigStateService {
642
643
  return this.store.sliceState(state => this.isGlobalFeatureEnabled(key, state.globalFeatures));
643
644
  }
644
645
  }
645
- ConfigStateService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ConfigStateService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
646
+ ConfigStateService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ConfigStateService, deps: [{ token: AbpApplicationConfigurationService }, { token: AbpApplicationLocalizationService }, { token: INCUDE_LOCALIZATION_RESOURCES_TOKEN, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
646
647
  ConfigStateService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ConfigStateService, providedIn: 'root' });
647
648
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ConfigStateService, decorators: [{
648
649
  type: Injectable,
649
650
  args: [{
650
651
  providedIn: 'root',
651
652
  }]
652
- }], ctorParameters: function () { return []; } });
653
+ }], ctorParameters: function () { return [{ type: AbpApplicationConfigurationService }, { type: AbpApplicationLocalizationService }, { type: undefined, decorators: [{
654
+ type: Optional
655
+ }, {
656
+ type: Inject,
657
+ args: [INCUDE_LOCALIZATION_RESOURCES_TOKEN]
658
+ }] }]; } });
653
659
  function splitKeys(keys) {
654
660
  if (typeof keys === 'string') {
655
661
  keys = keys.split('.');
@@ -3457,6 +3463,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
3457
3463
  type: Optional
3458
3464
  }] }]; } });
3459
3465
 
3466
+ class SafeHtmlPipe {
3467
+ constructor() {
3468
+ this.sanitizer = inject(DomSanitizer);
3469
+ }
3470
+ transform(value) {
3471
+ if (typeof value !== 'string')
3472
+ return '';
3473
+ return this.sanitizer.sanitize(SecurityContext.HTML, value);
3474
+ }
3475
+ }
3476
+ SafeHtmlPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: SafeHtmlPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
3477
+ SafeHtmlPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.4", ngImport: i0, type: SafeHtmlPipe, name: "abpSafeHtml" });
3478
+ SafeHtmlPipe.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: SafeHtmlPipe });
3479
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: SafeHtmlPipe, decorators: [{
3480
+ type: Injectable
3481
+ }, {
3482
+ type: Pipe,
3483
+ args: [{ name: 'abpSafeHtml' }]
3484
+ }] });
3485
+
3460
3486
  const IncludeLocalizationResourcesProvider = {
3461
3487
  provide: INCUDE_LOCALIZATION_RESOURCES_TOKEN,
3462
3488
  useValue: false,
@@ -3483,6 +3509,7 @@ BaseCoreModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version:
3483
3509
  ReplaceableTemplateDirective,
3484
3510
  RouterOutletComponent,
3485
3511
  SortPipe,
3512
+ SafeHtmlPipe,
3486
3513
  StopPropagationDirective,
3487
3514
  ToInjectorPipe,
3488
3515
  ShortDateTimePipe,
@@ -3510,6 +3537,7 @@ BaseCoreModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version:
3510
3537
  ReplaceableTemplateDirective,
3511
3538
  RouterOutletComponent,
3512
3539
  SortPipe,
3540
+ SafeHtmlPipe,
3513
3541
  StopPropagationDirective,
3514
3542
  ToInjectorPipe,
3515
3543
  ShortDateTimePipe,
@@ -3548,6 +3576,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
3548
3576
  ReplaceableTemplateDirective,
3549
3577
  RouterOutletComponent,
3550
3578
  SortPipe,
3579
+ SafeHtmlPipe,
3551
3580
  StopPropagationDirective,
3552
3581
  ToInjectorPipe,
3553
3582
  ShortDateTimePipe,
@@ -3575,6 +3604,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
3575
3604
  ReplaceableTemplateDirective,
3576
3605
  RouterOutletComponent,
3577
3606
  SortPipe,
3607
+ SafeHtmlPipe,
3578
3608
  StopPropagationDirective,
3579
3609
  ToInjectorPipe,
3580
3610
  ShortDateTimePipe,
@@ -4339,5 +4369,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
4339
4369
  * Generated bundle index. Do not edit.
4340
4370
  */
4341
4371
 
4342
- export { APP_INIT_ERROR_HANDLERS, AbpApiDefinitionService, AbpApplicationConfigurationService, AbpApplicationLocalizationService, AbpLocalStorageService, AbpTenantService, AbpValidators, AbstractNavTreeService, AbstractNgModelComponent, AbstractTreeService, ApiInterceptor, AuditedEntityDto, AuditedEntityWithUserDto, AuthGuard, AuthService, 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, CoreModule, CreationAuditedEntityDto, CreationAuditedEntityWithUserDto, CrossOriginStrategy, DOM_STRATEGY, DefaultQueueManager, DomInsertionService, DomStrategy, DynamicLayoutComponent, EntityDto, EnvironmentService, ExtensibleAuditedEntityDto, ExtensibleAuditedEntityWithUserDto, ExtensibleCreationAuditedEntityDto, ExtensibleCreationAuditedEntityWithUserDto, ExtensibleEntityDto, ExtensibleFullAuditedEntityDto, ExtensibleFullAuditedEntityWithUserDto, ExtensibleObject, ExternalHttpClient, ForDirective, FormSubmitDirective, FullAuditedEntityDto, FullAuditedEntityWithUserDto, HttpErrorReporterService, HttpWaitService, INCUDE_LOCALIZATION_RESOURCES_TOKEN, INJECTOR_PIPE_DATA_TOKEN, IS_EXTERNAL_REQUEST, InitDirective, InputEventDebounceDirective, InsertIntoContainerStrategy, InternalStore, LIST_QUERY_DEBOUNCE_TIME, LOADER_DELAY, LOADING_STRATEGY, LOCALIZATIONS, LazyLoadService, LazyModuleFactory, LimitedResultRequestDto, ListResultDto, ListService, LoadingStrategy, LocalizationModule, LocalizationPipe, LocalizationService, LooseContentSecurityStrategy, MultiTenancyService, NAVIGATE_TO_MANAGE_PROFILE, NavigationEvent, NoContentSecurityStrategy, NoContextStrategy, NoCrossOriginStrategy, 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, ScriptContentStrategy, ScriptLoadingStrategy, SessionStateService, ShortDatePipe, ShortDateTimePipe, ShortTimePipe, SortPipe, StopPropagationDirective, StyleContentStrategy, StyleLoadingStrategy, SubscriptionService, TENANT_KEY, TemplateContextStrategy, TemplateProjectionStrategy, ToInjectorPipe, TrackByService, WebHttpUrlEncodingCodec, checkHasProp, coreOptionsFactory, createLocalizationPipeKeyGenerator, createLocalizer, createLocalizerWithFallback, createMapFromList, createTokenParser, createTreeFromList, createTreeNodeFilterCreator, deepMerge, differentLocales, downloadBlob, escapeHtmlChars, exists, featuresFactory, findRoute, fromLazyLoad, generateHash, generatePassword, getInitialData, getLocaleDirection, getPathName, getRemoteEnv, getRoutePath, getShortDateFormat, getShortDateShortTimeFormat, getShortTimeFormat, interpolate, isArray, isNode, isNullOrEmpty, isNullOrUndefined, isNumber, isObject, isObjectAndNotArray, isObjectAndNotArrayNotNode, isUndefinedOrEmptyString, localeInitializer, localizationContributor, localizations$, mapEnumToOptions, noop, parseTenantFromUrl, pushValueTo, reloadRoute, trackBy, trackByDeep, uuid, validateCreditCard, validateMinAge, validateRange, validateRequired, validateStringLength, validateUrl };
4372
+ export { APP_INIT_ERROR_HANDLERS, AbpApiDefinitionService, AbpApplicationConfigurationService, AbpApplicationLocalizationService, AbpLocalStorageService, AbpTenantService, AbpValidators, AbstractNavTreeService, AbstractNgModelComponent, AbstractTreeService, ApiInterceptor, AuditedEntityDto, AuditedEntityWithUserDto, AuthGuard, AuthService, 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, CoreModule, CreationAuditedEntityDto, CreationAuditedEntityWithUserDto, CrossOriginStrategy, DOM_STRATEGY, DefaultQueueManager, DomInsertionService, DomStrategy, DynamicLayoutComponent, EntityDto, EnvironmentService, ExtensibleAuditedEntityDto, ExtensibleAuditedEntityWithUserDto, ExtensibleCreationAuditedEntityDto, ExtensibleCreationAuditedEntityWithUserDto, ExtensibleEntityDto, ExtensibleFullAuditedEntityDto, ExtensibleFullAuditedEntityWithUserDto, ExtensibleObject, ExternalHttpClient, ForDirective, FormSubmitDirective, FullAuditedEntityDto, FullAuditedEntityWithUserDto, HttpErrorReporterService, HttpWaitService, INCUDE_LOCALIZATION_RESOURCES_TOKEN, INJECTOR_PIPE_DATA_TOKEN, IS_EXTERNAL_REQUEST, InitDirective, InputEventDebounceDirective, InsertIntoContainerStrategy, InternalStore, LIST_QUERY_DEBOUNCE_TIME, LOADER_DELAY, LOADING_STRATEGY, LOCALIZATIONS, LazyLoadService, LazyModuleFactory, LimitedResultRequestDto, ListResultDto, ListService, LoadingStrategy, LocalizationModule, LocalizationPipe, LocalizationService, LooseContentSecurityStrategy, MultiTenancyService, NAVIGATE_TO_MANAGE_PROFILE, NavigationEvent, NoContentSecurityStrategy, NoContextStrategy, NoCrossOriginStrategy, 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, SafeHtmlPipe, ScriptContentStrategy, ScriptLoadingStrategy, SessionStateService, ShortDatePipe, ShortDateTimePipe, ShortTimePipe, SortPipe, StopPropagationDirective, StyleContentStrategy, StyleLoadingStrategy, SubscriptionService, TENANT_KEY, TemplateContextStrategy, TemplateProjectionStrategy, ToInjectorPipe, TrackByService, WebHttpUrlEncodingCodec, checkHasProp, coreOptionsFactory, createLocalizationPipeKeyGenerator, createLocalizer, createLocalizerWithFallback, createMapFromList, createTokenParser, createTreeFromList, createTreeNodeFilterCreator, deepMerge, differentLocales, downloadBlob, escapeHtmlChars, exists, featuresFactory, findRoute, fromLazyLoad, generateHash, generatePassword, getInitialData, getLocaleDirection, getPathName, getRemoteEnv, getRoutePath, getShortDateFormat, getShortDateShortTimeFormat, getShortTimeFormat, interpolate, isArray, isNode, isNullOrEmpty, isNullOrUndefined, isNumber, isObject, isObjectAndNotArray, isObjectAndNotArrayNotNode, isUndefinedOrEmptyString, localeInitializer, localizationContributor, localizations$, mapEnumToOptions, noop, parseTenantFromUrl, pushValueTo, reloadRoute, trackBy, trackByDeep, uuid, validateCreditCard, validateMinAge, validateRange, validateRequired, validateStringLength, validateUrl };
4343
4373
  //# sourceMappingURL=abp-ng.core.mjs.map