@abp/ng.core 7.1.0 → 7.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.
Files changed (33) hide show
  1. package/esm2020/lib/core.module.mjs +11 -1
  2. package/esm2020/lib/models/common.mjs +1 -1
  3. package/esm2020/lib/models/rest.mjs +1 -1
  4. package/esm2020/lib/pipes/index.mjs +2 -1
  5. package/esm2020/lib/pipes/safe-html.pipe.mjs +23 -0
  6. package/esm2020/lib/services/config-state.service.mjs +16 -9
  7. package/esm2020/lib/services/rest.service.mjs +14 -7
  8. package/esm2020/lib/services/routes.service.mjs +21 -3
  9. package/esm2020/lib/tokens/index.mjs +2 -1
  10. package/esm2020/lib/tokens/others-group.token.mjs +3 -0
  11. package/esm2020/lib/utils/tree-utils.mjs +17 -1
  12. package/esm2020/testing/lib/services/mock-rest.service.mjs +7 -6
  13. package/fesm2015/abp-ng.core-testing.mjs +9 -8
  14. package/fesm2015/abp-ng.core-testing.mjs.map +1 -1
  15. package/fesm2015/abp-ng.core.mjs +199 -124
  16. package/fesm2015/abp-ng.core.mjs.map +1 -1
  17. package/fesm2020/abp-ng.core-testing.mjs +9 -8
  18. package/fesm2020/abp-ng.core-testing.mjs.map +1 -1
  19. package/fesm2020/abp-ng.core.mjs +145 -72
  20. package/fesm2020/abp-ng.core.mjs.map +1 -1
  21. package/lib/core.module.d.ts +13 -12
  22. package/lib/models/common.d.ts +2 -0
  23. package/lib/models/rest.d.ts +1 -0
  24. package/lib/pipes/index.d.ts +1 -0
  25. package/lib/pipes/safe-html.pipe.d.ts +9 -0
  26. package/lib/services/config-state.service.d.ts +6 -4
  27. package/lib/services/rest.service.d.ts +4 -1
  28. package/lib/services/routes.service.d.ts +6 -1
  29. package/lib/tokens/index.d.ts +1 -0
  30. package/lib/tokens/others-group.token.d.ts +2 -0
  31. package/lib/utils/tree-utils.d.ts +7 -0
  32. package/package.json +2 -2
  33. package/testing/lib/services/mock-rest.service.d.ts +3 -2
@@ -1,18 +1,19 @@
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';
3
- import { of, BehaviorSubject, Subject, throwError, Subscription, combineLatest, from, fromEvent, ReplaySubject, lastValueFrom, Observable, timer, pipe, concat } from 'rxjs';
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
+ import { of, BehaviorSubject, Subject, throwError, map as map$1, Subscription, combineLatest, from, 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';
6
- import { map, distinctUntilChanged, filter, catchError, switchMap, take, tap, debounceTime, mapTo, takeUntil, delay, retryWhen, shareReplay, finalize } from 'rxjs/operators';
7
- import { __rest, __awaiter, __classPrivateFieldGet } from 'tslib';
6
+ import { __rest, __classPrivateFieldGet, __awaiter } from 'tslib';
8
7
  import * as i1 from '@angular/common/http';
9
- import { HttpParams, HttpClient, HttpClientModule, HttpClientXsrfModule, HttpContextToken, HttpHeaders, HttpContext } from '@angular/common/http';
8
+ import { HttpContextToken, HttpClient, HttpContext, HttpParams, HttpClientModule, HttpClientXsrfModule, HttpHeaders } from '@angular/common/http';
9
+ import { map, distinctUntilChanged, filter, catchError, switchMap, take, tap, debounceTime, mapTo, takeUntil, delay, retryWhen, shareReplay, finalize } from 'rxjs/operators';
10
10
  import compare from 'just-compare';
11
11
  import * as i5 from '@angular/common';
12
12
  import { registerLocaleData, DOCUMENT, DatePipe, DATE_PIPE_DEFAULT_TIMEZONE, CommonModule } from '@angular/common';
13
13
  import * as i1$2 from '@angular/forms';
14
14
  import { FormsModule, ReactiveFormsModule, Validators } from '@angular/forms';
15
15
  import clone from 'just-clone';
16
+ import { DomSanitizer } from '@angular/platform-browser';
16
17
 
17
18
  // Not an abstract class on purpose. Do not change!
18
19
  class AbstractNgModelComponent {
@@ -128,6 +129,51 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
128
129
  }]
129
130
  }] });
130
131
 
132
+ const APP_INIT_ERROR_HANDLERS = new InjectionToken('APP_INIT_ERROR_HANDLERS');
133
+
134
+ const COOKIE_LANGUAGE_KEY = new InjectionToken('COOKIE_LANGUAGE_KEY', {
135
+ factory: () => '.AspNetCore.Culture',
136
+ });
137
+
138
+ const LIST_QUERY_DEBOUNCE_TIME = new InjectionToken('LIST_QUERY_DEBOUNCE_TIME');
139
+
140
+ const LOCALIZATIONS = new InjectionToken('LOCALIZATIONS');
141
+ function localizationContributor(localizations) {
142
+ if (localizations) {
143
+ localizations$.next([...localizations$.value, ...localizations]);
144
+ }
145
+ }
146
+ const localizations$ = new BehaviorSubject([]);
147
+
148
+ const LOADER_DELAY = new InjectionToken('LOADER_DELAY');
149
+
150
+ const NAVIGATE_TO_MANAGE_PROFILE = new InjectionToken('NAVIGATE_TO_MANAGE_PROFILE');
151
+
152
+ const CORE_OPTIONS = new InjectionToken('CORE_OPTIONS');
153
+ function coreOptionsFactory(_a) {
154
+ var options = __rest(_a, []);
155
+ return Object.assign({}, options);
156
+ }
157
+
158
+ const QUEUE_MANAGER = new InjectionToken("QUEUE_MANAGER");
159
+
160
+ const TENANT_KEY = new InjectionToken('TENANT_KEY');
161
+
162
+ const INCUDE_LOCALIZATION_RESOURCES_TOKEN = new InjectionToken('INCUDE_LOCALIZATION_RESOURCES_TOKEN');
163
+
164
+ const PIPE_TO_LOGIN_FN_KEY = new InjectionToken('PIPE_TO_LOGIN_FN_KEY');
165
+
166
+ /**
167
+ * @deprecated The token should not be used anymore.
168
+ */
169
+ const SET_TOKEN_RESPONSE_TO_STORAGE_FN_KEY = new InjectionToken('SET_TOKEN_RESPONSE_TO_STORAGE_FN_KEY');
170
+
171
+ const CHECK_AUTHENTICATION_STATE_FN_KEY = new InjectionToken('CHECK_AUTHENTICATION_STATE_FN_KEY');
172
+
173
+ const IS_EXTERNAL_REQUEST = new HttpContextToken(() => false);
174
+
175
+ const OTHERS_GROUP = new InjectionToken('OTHERS_GROUP');
176
+
131
177
  function pushValueTo(array) {
132
178
  return (element) => {
133
179
  array.push(element);
@@ -135,6 +181,41 @@ function pushValueTo(array) {
135
181
  };
136
182
  }
137
183
 
184
+ function noop() {
185
+ const fn = function () { };
186
+ return fn;
187
+ }
188
+ function isUndefinedOrEmptyString(value) {
189
+ return value === undefined || value === '';
190
+ }
191
+ function isNullOrUndefined(obj) {
192
+ return obj === null || obj === undefined;
193
+ }
194
+ function isNullOrEmpty(obj) {
195
+ return obj === null || obj === undefined || obj === '';
196
+ }
197
+ function exists(obj) {
198
+ return !isNullOrUndefined(obj);
199
+ }
200
+ function isObject(obj) {
201
+ return obj instanceof Object;
202
+ }
203
+ function isArray(obj) {
204
+ return Array.isArray(obj);
205
+ }
206
+ function isObjectAndNotArray(obj) {
207
+ return isObject(obj) && !isArray(obj);
208
+ }
209
+ function isNode(obj) {
210
+ return obj instanceof Node;
211
+ }
212
+ function isObjectAndNotArrayNotNode(obj) {
213
+ return isObjectAndNotArray(obj) && !isNode(obj);
214
+ }
215
+ function checkHasProp(object, key) {
216
+ return Object.prototype.hasOwnProperty.call(object, key);
217
+ }
218
+
138
219
  /* eslint-disable @typescript-eslint/ban-types */
139
220
  class BaseTreeNode {
140
221
  constructor(props) {
@@ -187,47 +268,21 @@ function createTreeNodeFilterCreator(key, mapperFn) {
187
268
  return matches;
188
269
  };
189
270
  };
190
- }
191
-
192
- const CORE_OPTIONS = new InjectionToken('CORE_OPTIONS');
193
- function coreOptionsFactory(_a) {
194
- var options = __rest(_a, []);
195
- return Object.assign({}, options);
196
- }
197
-
198
- function noop() {
199
- const fn = function () { };
200
- return fn;
201
271
  }
202
- function isUndefinedOrEmptyString(value) {
203
- return value === undefined || value === '';
204
- }
205
- function isNullOrUndefined(obj) {
206
- return obj === null || obj === undefined;
207
- }
208
- function isNullOrEmpty(obj) {
209
- return obj === null || obj === undefined || obj === '';
210
- }
211
- function exists(obj) {
212
- return !isNullOrUndefined(obj);
213
- }
214
- function isObject(obj) {
215
- return obj instanceof Object;
216
- }
217
- function isArray(obj) {
218
- return Array.isArray(obj);
219
- }
220
- function isObjectAndNotArray(obj) {
221
- return isObject(obj) && !isArray(obj);
222
- }
223
- function isNode(obj) {
224
- return obj instanceof Node;
225
- }
226
- function isObjectAndNotArrayNotNode(obj) {
227
- return isObjectAndNotArray(obj) && !isNode(obj);
228
- }
229
- function checkHasProp(object, key) {
230
- return Object.prototype.hasOwnProperty.call(object, key);
272
+ function createGroupMap(list, othersGroupKey) {
273
+ if (!isArray(list) || !list.some(node => Boolean(node.group)))
274
+ return undefined;
275
+ const mapGroup = new Map();
276
+ for (const node of list) {
277
+ const group = (node === null || node === void 0 ? void 0 : node.group) || othersGroupKey;
278
+ if (typeof group !== 'string') {
279
+ throw new Error(`Invalid group: ${group}`);
280
+ }
281
+ const items = mapGroup.get(group) || [];
282
+ items.push(node);
283
+ mapGroup.set(group, items);
284
+ }
285
+ return mapGroup;
231
286
  }
232
287
 
233
288
  function deepMerge(target, source) {
@@ -299,6 +354,36 @@ class InternalStore {
299
354
  }
300
355
  }
301
356
 
357
+ var _ExternalHttpClient_instances, _ExternalHttpClient_setPlaceholderContext;
358
+ // source : https://github.com/armanozak/demo-angular-server-specific-interceptors
359
+ class ExternalHttpClient extends HttpClient {
360
+ constructor() {
361
+ super(...arguments);
362
+ _ExternalHttpClient_instances.add(this);
363
+ }
364
+ request(first, url, options = {}) {
365
+ if (typeof first === 'string') {
366
+ __classPrivateFieldGet(this, _ExternalHttpClient_instances, "m", _ExternalHttpClient_setPlaceholderContext).call(this, options);
367
+ return super.request(first, url || '', options);
368
+ }
369
+ __classPrivateFieldGet(this, _ExternalHttpClient_instances, "m", _ExternalHttpClient_setPlaceholderContext).call(this, first);
370
+ return super.request(first);
371
+ }
372
+ }
373
+ _ExternalHttpClient_instances = new WeakSet(), _ExternalHttpClient_setPlaceholderContext = function _ExternalHttpClient_setPlaceholderContext(optionsOrRequest) {
374
+ var _a;
375
+ (_a = optionsOrRequest.context) !== null && _a !== void 0 ? _a : (optionsOrRequest.context = new HttpContext());
376
+ optionsOrRequest.context.set(IS_EXTERNAL_REQUEST, true);
377
+ };
378
+ ExternalHttpClient.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ExternalHttpClient, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
379
+ ExternalHttpClient.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ExternalHttpClient, providedIn: 'root' });
380
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ExternalHttpClient, decorators: [{
381
+ type: Injectable,
382
+ args: [{
383
+ providedIn: 'root',
384
+ }]
385
+ }] });
386
+
302
387
  const mapToApiUrl = (key) => (apis) => ((key && apis[key]) || apis.default).url || apis.default.url;
303
388
  const mapToIssuer = (issuer) => {
304
389
  if (!issuer) {
@@ -372,9 +457,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
372
457
  }] });
373
458
 
374
459
  class RestService {
375
- constructor(options, http, environment, httpErrorReporter) {
460
+ constructor(options, http, externalHttp, environment, httpErrorReporter) {
376
461
  this.options = options;
377
462
  this.http = http;
463
+ this.externalHttp = externalHttp;
378
464
  this.environment = environment;
379
465
  this.httpErrorReporter = httpErrorReporter;
380
466
  }
@@ -391,12 +477,16 @@ class RestService {
391
477
  const { method, params } = request, options = __rest(request, ["method", "params"]);
392
478
  const { observe = "body" /* Rest.Observe.Body */, skipHandleError } = config;
393
479
  const url = this.removeDuplicateSlashes(api + request.url);
394
- return this.http
480
+ const httpClient = this.getHttpClient(config.skipAddingHeader);
481
+ return httpClient
395
482
  .request(method, url, Object.assign(Object.assign({ observe }, (params && {
396
483
  params: this.getParams(params, config.httpParamEncoder),
397
484
  })), options))
398
485
  .pipe(catchError(err => (skipHandleError ? throwError(err) : this.handleError(err))));
399
486
  }
487
+ getHttpClient(isExternal) {
488
+ return isExternal ? this.externalHttp : this.http;
489
+ }
400
490
  getParams(params, encoder) {
401
491
  const filteredParams = Object.entries(params).reduce((acc, [key, value]) => {
402
492
  if (isUndefinedOrEmptyString(value))
@@ -414,7 +504,7 @@ class RestService {
414
504
  return url.replace(/([^:]\/)\/+/g, '$1');
415
505
  }
416
506
  }
417
- RestService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: RestService, deps: [{ token: CORE_OPTIONS }, { token: i1.HttpClient }, { token: EnvironmentService }, { token: HttpErrorReporterService }], target: i0.ɵɵFactoryTarget.Injectable });
507
+ RestService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: RestService, deps: [{ token: CORE_OPTIONS }, { token: i1.HttpClient }, { token: ExternalHttpClient }, { token: EnvironmentService }, { token: HttpErrorReporterService }], target: i0.ɵɵFactoryTarget.Injectable });
418
508
  RestService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: RestService, providedIn: 'root' });
419
509
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: RestService, decorators: [{
420
510
  type: Injectable,
@@ -425,7 +515,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
425
515
  return [{ type: undefined, decorators: [{
426
516
  type: Inject,
427
517
  args: [CORE_OPTIONS]
428
- }] }, { type: i1.HttpClient }, { type: EnvironmentService }, { type: HttpErrorReporterService }];
518
+ }] }, { type: i1.HttpClient }, { type: ExternalHttpClient }, { type: EnvironmentService }, { type: HttpErrorReporterService }];
429
519
  } });
430
520
 
431
521
  class AbpApplicationConfigurationService {
@@ -468,14 +558,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
468
558
  }]
469
559
  }], ctorParameters: function () { return [{ type: RestService }]; } });
470
560
 
471
- const INCUDE_LOCALIZATION_RESOURCES_TOKEN = new InjectionToken('INCUDE_LOCALIZATION_RESOURCES_TOKEN');
472
-
473
561
  class ConfigStateService {
474
- constructor() {
562
+ constructor(abpConfigService, abpApplicationLocalizationService, includeLocalizationResources) {
563
+ this.abpConfigService = abpConfigService;
564
+ this.abpApplicationLocalizationService = abpApplicationLocalizationService;
565
+ this.includeLocalizationResources = includeLocalizationResources;
475
566
  this.store = new InternalStore({});
476
- this.includeLocalizationResources = inject(INCUDE_LOCALIZATION_RESOURCES_TOKEN);
477
- this.abpConfigService = inject(AbpApplicationConfigurationService);
478
- this.abpApplicationLocalizationService = inject(AbpApplicationLocalizationService);
479
567
  this.updateSubject = new Subject();
480
568
  this.initUpdateStream();
481
569
  }
@@ -485,7 +573,7 @@ class ConfigStateService {
485
573
  initUpdateStream() {
486
574
  this.updateSubject
487
575
  .pipe(switchMap(() => this.abpConfigService.get({
488
- includeLocalizationResources: this.includeLocalizationResources,
576
+ includeLocalizationResources: !!this.includeLocalizationResources,
489
577
  })))
490
578
  .pipe(switchMap(appState => this.getLocalizationAndCombineWithAppState(appState)))
491
579
  .subscribe(res => this.store.set(res));
@@ -618,14 +706,21 @@ class ConfigStateService {
618
706
  return this.store.sliceState(state => this.isGlobalFeatureEnabled(key, state.globalFeatures));
619
707
  }
620
708
  }
621
- ConfigStateService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ConfigStateService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
709
+ 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 });
622
710
  ConfigStateService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ConfigStateService, providedIn: 'root' });
623
711
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ConfigStateService, decorators: [{
624
712
  type: Injectable,
625
713
  args: [{
626
714
  providedIn: 'root',
627
715
  }]
628
- }], ctorParameters: function () { return []; } });
716
+ }], ctorParameters: function () {
717
+ return [{ type: AbpApplicationConfigurationService }, { type: AbpApplicationLocalizationService }, { type: undefined, decorators: [{
718
+ type: Optional
719
+ }, {
720
+ type: Inject,
721
+ args: [INCUDE_LOCALIZATION_RESOURCES_TOKEN]
722
+ }] }];
723
+ } });
629
724
  function splitKeys(keys) {
630
725
  if (typeof keys === 'string') {
631
726
  keys = keys.split('.');
@@ -723,6 +818,13 @@ class AbstractTreeService {
723
818
  createTree(items) {
724
819
  return createTreeFromList(items, item => item[this.id], item => item[this.parentId], item => BaseTreeNode.create(item));
725
820
  }
821
+ createGroupedTree(list) {
822
+ const map = createGroupMap(list, this.othersGroup);
823
+ if (!map) {
824
+ return undefined;
825
+ }
826
+ return Array.from(map, ([key, items]) => ({ group: key, items }));
827
+ }
726
828
  filterWith(setOrMap) {
727
829
  return this._flat$.value.filter(item => !setOrMap.has(item[this.id]));
728
830
  }
@@ -802,6 +904,7 @@ class AbstractNavTreeService extends AbstractTreeService {
802
904
  .createOnUpdateStream(state => state)
803
905
  .subscribe(() => this.refresh());
804
906
  this.permissionService = injector.get(PermissionService);
907
+ this.othersGroup = injector.get(OTHERS_GROUP);
805
908
  }
806
909
  isGranted({ requiredPolicy }) {
807
910
  return this.permissionService.getGrantedPolicy(requiredPolicy);
@@ -827,6 +930,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
827
930
  type: Injectable
828
931
  }], ctorParameters: function () { return [{ type: i0.Injector }]; } });
829
932
  class RoutesService extends AbstractNavTreeService {
933
+ hasPathOrChild(item) {
934
+ return Boolean(item.path) || this.hasChildren(item.name);
935
+ }
936
+ get groupedVisible() {
937
+ return this.createGroupedTree(this.visible.filter(item => this.hasPathOrChild(item)));
938
+ }
939
+ get groupedVisible$() {
940
+ return this.visible$.pipe(map$1(items => items.filter(item => this.hasPathOrChild(item))), map$1(visible => this.createGroupedTree(visible)));
941
+ }
830
942
  }
831
943
  RoutesService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: RoutesService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
832
944
  RoutesService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: RoutesService, providedIn: 'root' });
@@ -899,14 +1011,6 @@ function reloadRoute(router, ngZone) {
899
1011
  }));
900
1012
  }
901
1013
 
902
- const LOCALIZATIONS = new InjectionToken('LOCALIZATIONS');
903
- function localizationContributor(localizations) {
904
- if (localizations) {
905
- localizations$.next([...localizations$.value, ...localizations]);
906
- }
907
- }
908
- const localizations$ = new BehaviorSubject([]);
909
-
910
1014
  // This will not be necessary when only Angukar 9.1+ is supported
911
1015
  function getLocaleDirection(locale) {
912
1016
  return /^(ar(-[A-Z]{2})?|ckb(-IR)?|fa(-AF)?|he|ks|lrc(-IQ)?|mzn|pa-Arab|ps(-PK)?|sd|ug|ur(-IN)?|uz-Arab|yi)$/.test(locale)
@@ -2142,8 +2246,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
2142
2246
  args: ['abpInit']
2143
2247
  }] } });
2144
2248
 
2145
- const QUEUE_MANAGER = new InjectionToken("QUEUE_MANAGER");
2146
-
2147
2249
  class PermissionDirective {
2148
2250
  constructor(templateRef, vcRef, permissionService, cdRef, queue) {
2149
2251
  this.templateRef = templateRef;
@@ -2520,10 +2622,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
2520
2622
  }]
2521
2623
  }], ctorParameters: function () { return [{ type: i0.Injector }]; } });
2522
2624
 
2523
- const COOKIE_LANGUAGE_KEY = new InjectionToken('COOKIE_LANGUAGE_KEY', {
2524
- factory: () => '.AspNetCore.Culture',
2525
- });
2526
-
2527
2625
  function setLanguageToCookie(injector) {
2528
2626
  return () => {
2529
2627
  const sessionState = injector.get(SessionStateService);
@@ -2564,15 +2662,11 @@ const LocaleProvider = {
2564
2662
  deps: [LocalizationService],
2565
2663
  };
2566
2664
 
2567
- const TENANT_KEY = new InjectionToken('TENANT_KEY');
2568
-
2569
2665
  Date.prototype.toLocalISOString = function () {
2570
2666
  const timezoneOffset = this.getTimezoneOffset();
2571
2667
  return new Date(this.getTime() - timezoneOffset * 60000).toISOString();
2572
2668
  };
2573
2669
 
2574
- const APP_INIT_ERROR_HANDLERS = new InjectionToken('APP_INIT_ERROR_HANDLERS');
2575
-
2576
2670
  function getRemoteEnv(injector, environment) {
2577
2671
  const environmentService = injector.get(EnvironmentService);
2578
2672
  const { remoteEnv } = environment;
@@ -2745,8 +2839,6 @@ function replaceTenantNameWithinEnvironment(injector, tenancyName, placeholder =
2745
2839
  return environmentService.setState(environment);
2746
2840
  }
2747
2841
 
2748
- const CHECK_AUTHENTICATION_STATE_FN_KEY = new InjectionToken('CHECK_AUTHENTICATION_STATE_FN_KEY');
2749
-
2750
2842
  function getInitialData(injector) {
2751
2843
  const fn = () => __awaiter(this, void 0, void 0, function* () {
2752
2844
  const environmentService = injector.get(EnvironmentService);
@@ -3091,8 +3183,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
3091
3183
  args: [{ providedIn: 'root' }]
3092
3184
  }] });
3093
3185
 
3094
- const LOADER_DELAY = new InjectionToken('LOADER_DELAY');
3095
-
3096
3186
  class HttpWaitService {
3097
3187
  constructor(injector) {
3098
3188
  this.store = new InternalStore({
@@ -3232,8 +3322,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
3232
3322
  }]
3233
3323
  }], ctorParameters: function () { return [{ type: ResourceWaitService }]; } });
3234
3324
 
3235
- const LIST_QUERY_DEBOUNCE_TIME = new InjectionToken('LIST_QUERY_DEBOUNCE_TIME');
3236
-
3237
3325
  class ListService {
3238
3326
  constructor(injector) {
3239
3327
  this._filter = '';
@@ -3482,6 +3570,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
3482
3570
  }] }];
3483
3571
  } });
3484
3572
 
3573
+ class SafeHtmlPipe {
3574
+ constructor() {
3575
+ this.sanitizer = inject(DomSanitizer);
3576
+ }
3577
+ transform(value) {
3578
+ if (typeof value !== 'string')
3579
+ return '';
3580
+ return this.sanitizer.sanitize(SecurityContext.HTML, value);
3581
+ }
3582
+ }
3583
+ SafeHtmlPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: SafeHtmlPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
3584
+ SafeHtmlPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.4", ngImport: i0, type: SafeHtmlPipe, name: "abpSafeHtml" });
3585
+ SafeHtmlPipe.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: SafeHtmlPipe });
3586
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: SafeHtmlPipe, decorators: [{
3587
+ type: Injectable
3588
+ }, {
3589
+ type: Pipe,
3590
+ args: [{ name: 'abpSafeHtml' }]
3591
+ }] });
3592
+
3485
3593
  const IncludeLocalizationResourcesProvider = {
3486
3594
  provide: INCUDE_LOCALIZATION_RESOURCES_TOKEN,
3487
3595
  useValue: false,
@@ -3508,6 +3616,7 @@ BaseCoreModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version:
3508
3616
  ReplaceableTemplateDirective,
3509
3617
  RouterOutletComponent,
3510
3618
  SortPipe,
3619
+ SafeHtmlPipe,
3511
3620
  StopPropagationDirective,
3512
3621
  ToInjectorPipe,
3513
3622
  ShortDateTimePipe,
@@ -3535,6 +3644,7 @@ BaseCoreModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version:
3535
3644
  ReplaceableTemplateDirective,
3536
3645
  RouterOutletComponent,
3537
3646
  SortPipe,
3647
+ SafeHtmlPipe,
3538
3648
  StopPropagationDirective,
3539
3649
  ToInjectorPipe,
3540
3650
  ShortDateTimePipe,
@@ -3573,6 +3683,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
3573
3683
  ReplaceableTemplateDirective,
3574
3684
  RouterOutletComponent,
3575
3685
  SortPipe,
3686
+ SafeHtmlPipe,
3576
3687
  StopPropagationDirective,
3577
3688
  ToInjectorPipe,
3578
3689
  ShortDateTimePipe,
@@ -3600,6 +3711,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
3600
3711
  ReplaceableTemplateDirective,
3601
3712
  RouterOutletComponent,
3602
3713
  SortPipe,
3714
+ SafeHtmlPipe,
3603
3715
  StopPropagationDirective,
3604
3716
  ToInjectorPipe,
3605
3717
  ShortDateTimePipe,
@@ -3691,6 +3803,10 @@ class CoreModule {
3691
3803
  provide: QUEUE_MANAGER,
3692
3804
  useClass: DefaultQueueManager,
3693
3805
  },
3806
+ {
3807
+ provide: OTHERS_GROUP,
3808
+ useValue: options.othersGroup || 'AbpUi::OthersGroup',
3809
+ },
3694
3810
  IncludeLocalizationResourcesProvider,
3695
3811
  ],
3696
3812
  };
@@ -4177,17 +4293,6 @@ const PROJECTION_STRATEGY = {
4177
4293
  },
4178
4294
  };
4179
4295
 
4180
- const NAVIGATE_TO_MANAGE_PROFILE = new InjectionToken('NAVIGATE_TO_MANAGE_PROFILE');
4181
-
4182
- const PIPE_TO_LOGIN_FN_KEY = new InjectionToken('PIPE_TO_LOGIN_FN_KEY');
4183
-
4184
- /**
4185
- * @deprecated The token should not be used anymore.
4186
- */
4187
- const SET_TOKEN_RESPONSE_TO_STORAGE_FN_KEY = new InjectionToken('SET_TOKEN_RESPONSE_TO_STORAGE_FN_KEY');
4188
-
4189
- const IS_EXTERNAL_REQUEST = new HttpContextToken(() => false);
4190
-
4191
4296
  function validateMinAge({ age = 18 } = {}) {
4192
4297
  return (control) => {
4193
4298
  if (['', null, undefined].indexOf(control.value) > -1)
@@ -4329,41 +4434,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
4329
4434
  }]
4330
4435
  }], ctorParameters: function () { return [{ type: HttpWaitService }]; } });
4331
4436
 
4332
- var _ExternalHttpClient_instances, _ExternalHttpClient_setPlaceholderContext;
4333
- // source : https://github.com/armanozak/demo-angular-server-specific-interceptors
4334
- class ExternalHttpClient extends HttpClient {
4335
- constructor() {
4336
- super(...arguments);
4337
- _ExternalHttpClient_instances.add(this);
4338
- }
4339
- request(first, url, options = {}) {
4340
- if (typeof first === 'string') {
4341
- __classPrivateFieldGet(this, _ExternalHttpClient_instances, "m", _ExternalHttpClient_setPlaceholderContext).call(this, options);
4342
- return super.request(first, url || '', options);
4343
- }
4344
- __classPrivateFieldGet(this, _ExternalHttpClient_instances, "m", _ExternalHttpClient_setPlaceholderContext).call(this, first);
4345
- return super.request(first);
4346
- }
4347
- }
4348
- _ExternalHttpClient_instances = new WeakSet(), _ExternalHttpClient_setPlaceholderContext = function _ExternalHttpClient_setPlaceholderContext(optionsOrRequest) {
4349
- var _a;
4350
- (_a = optionsOrRequest.context) !== null && _a !== void 0 ? _a : (optionsOrRequest.context = new HttpContext());
4351
- optionsOrRequest.context.set(IS_EXTERNAL_REQUEST, true);
4352
- };
4353
- ExternalHttpClient.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ExternalHttpClient, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
4354
- ExternalHttpClient.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ExternalHttpClient, providedIn: 'root' });
4355
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ExternalHttpClient, decorators: [{
4356
- type: Injectable,
4357
- args: [{
4358
- providedIn: 'root',
4359
- }]
4360
- }] });
4361
-
4362
4437
  // export * from './lib/handlers';
4363
4438
 
4364
4439
  /**
4365
4440
  * Generated bundle index. Do not edit.
4366
4441
  */
4367
4442
 
4368
- 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 };
4443
+ 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, 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, SafeHtmlPipe, ScriptContentStrategy, ScriptLoadingStrategy, SessionStateService, ShortDatePipe, ShortDateTimePipe, ShortTimePipe, SortPipe, StopPropagationDirective, StyleContentStrategy, StyleLoadingStrategy, SubscriptionService, TENANT_KEY, TemplateContextStrategy, TemplateProjectionStrategy, ToInjectorPipe, TrackByService, WebHttpUrlEncodingCodec, checkHasProp, coreOptionsFactory, createGroupMap, 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 };
4369
4444
  //# sourceMappingURL=abp-ng.core.mjs.map