@abp/ng.core 7.1.0-rc.1 → 7.1.0-rc.3
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.
- package/esm2020/lib/abstracts/auth-response.model.mjs +2 -0
- package/esm2020/lib/abstracts/auth.service.mjs +6 -3
- package/esm2020/lib/abstracts/index.mjs +2 -1
- package/esm2020/lib/abstracts/ng-model.component.mjs +1 -1
- package/esm2020/lib/clients/http.client.mjs +2 -2
- package/esm2020/lib/components/dynamic-layout.component.mjs +6 -4
- package/esm2020/lib/components/replaceable-route-container.component.mjs +1 -1
- package/esm2020/lib/directives/debounce.directive.mjs +1 -1
- package/esm2020/lib/directives/for.directive.mjs +20 -12
- package/esm2020/lib/directives/form-submit.directive.mjs +2 -2
- package/esm2020/lib/directives/replaceable-template.directive.mjs +9 -5
- package/esm2020/lib/directives/stop-propagation.directive.mjs +2 -2
- package/esm2020/lib/handlers/routes.handler.mjs +9 -7
- package/esm2020/lib/interceptors/api.interceptor.mjs +3 -2
- package/esm2020/lib/models/auth.mjs +1 -1
- package/esm2020/lib/models/dtos.mjs +6 -6
- package/esm2020/lib/models/environment.mjs +1 -1
- package/esm2020/lib/models/session.mjs +1 -1
- package/esm2020/lib/providers/locale.provider.mjs +6 -2
- package/esm2020/lib/services/config-state.service.mjs +4 -1
- package/esm2020/lib/services/dom-insertion.service.mjs +6 -4
- package/esm2020/lib/services/environment.service.mjs +5 -5
- package/esm2020/lib/services/http-wait.service.mjs +4 -1
- package/esm2020/lib/services/index.mjs +2 -1
- package/esm2020/lib/services/lazy-load.service.mjs +6 -4
- package/esm2020/lib/services/local-storage.service.mjs +32 -0
- package/esm2020/lib/services/localization.service.mjs +7 -7
- package/esm2020/lib/services/multi-tenancy.service.mjs +1 -1
- package/esm2020/lib/services/permission.service.mjs +1 -1
- package/esm2020/lib/services/replaceable-components.service.mjs +1 -1
- package/esm2020/lib/services/resource-wait.service.mjs +2 -2
- package/esm2020/lib/services/rest.service.mjs +2 -3
- package/esm2020/lib/services/router-events.service.mjs +2 -2
- package/esm2020/lib/services/routes.service.mjs +2 -2
- package/esm2020/lib/services/session-state.service.mjs +9 -6
- package/esm2020/lib/services/subscription.service.mjs +4 -2
- package/esm2020/lib/strategies/content-security.strategy.mjs +4 -2
- package/esm2020/lib/strategies/content.strategy.mjs +6 -2
- package/esm2020/lib/strategies/context.strategy.mjs +1 -1
- package/esm2020/lib/strategies/cross-origin.strategy.mjs +4 -2
- package/esm2020/lib/strategies/loading.strategy.mjs +1 -1
- package/esm2020/lib/tokens/localization.token.mjs +1 -1
- package/esm2020/lib/tokens/set-token-response-to-storage.token.mjs +4 -1
- package/esm2020/lib/utils/common-utils.mjs +4 -1
- package/esm2020/lib/utils/date-utils.mjs +3 -3
- package/esm2020/lib/utils/environment-utils.mjs +2 -2
- package/esm2020/lib/utils/factory-utils.mjs +2 -2
- package/esm2020/lib/utils/internal-store-utils.mjs +2 -1
- package/esm2020/lib/utils/lazy-load-utils.mjs +2 -2
- package/esm2020/lib/utils/localization-utils.mjs +1 -1
- package/esm2020/lib/utils/multi-tenancy-utils.mjs +7 -4
- package/esm2020/lib/utils/object-utils.mjs +1 -1
- package/esm2020/lib/utils/route-utils.mjs +2 -2
- package/esm2020/lib/utils/tree-utils.mjs +1 -1
- package/esm2020/lib/validators/range.validator.mjs +1 -1
- package/esm2020/lib/validators/required.validator.mjs +1 -1
- package/esm2020/lib/validators/string-length.validator.mjs +1 -1
- package/esm2020/lib/validators/username.validator.mjs +2 -2
- package/esm2020/locale/utils/register-locale.mjs +2 -2
- package/esm2020/testing/lib/services/mock-permission.service.mjs +1 -1
- package/esm2020/testing/lib/services/mock-rest.service.mjs +2 -2
- package/fesm2015/abp-ng.core-locale.mjs +1 -1
- package/fesm2015/abp-ng.core-locale.mjs.map +1 -1
- package/fesm2015/abp-ng.core-testing.mjs.map +1 -1
- package/fesm2015/abp-ng.core.mjs +167 -80
- package/fesm2015/abp-ng.core.mjs.map +1 -1
- package/fesm2020/abp-ng.core-locale.mjs +1 -1
- package/fesm2020/abp-ng.core-locale.mjs.map +1 -1
- package/fesm2020/abp-ng.core-testing.mjs.map +1 -1
- package/fesm2020/abp-ng.core.mjs +158 -77
- package/fesm2020/abp-ng.core.mjs.map +1 -1
- package/lib/abstracts/auth-response.model.d.ts +10 -0
- package/lib/abstracts/auth.service.d.ts +4 -1
- package/lib/abstracts/index.d.ts +1 -0
- package/lib/abstracts/ng-model.component.d.ts +4 -4
- package/lib/components/dynamic-layout.component.d.ts +2 -2
- package/lib/components/replaceable-route-container.component.d.ts +1 -1
- package/lib/directives/for.directive.d.ts +6 -6
- package/lib/directives/form-submit.directive.d.ts +1 -1
- package/lib/models/auth.d.ts +4 -1
- package/lib/models/dtos.d.ts +11 -11
- package/lib/models/environment.d.ts +3 -1
- package/lib/models/session.d.ts +1 -1
- package/lib/services/config-state.service.d.ts +5 -3
- package/lib/services/dom-insertion.service.d.ts +1 -1
- package/lib/services/environment.service.d.ts +1 -1
- package/lib/services/index.d.ts +1 -0
- package/lib/services/local-storage.service.d.ts +13 -0
- package/lib/services/localization.service.d.ts +5 -2
- package/lib/services/multi-tenancy.service.d.ts +1 -1
- package/lib/services/permission.service.d.ts +2 -2
- package/lib/services/replaceable-components.service.d.ts +2 -2
- package/lib/services/rest.service.d.ts +1 -1
- package/lib/services/router-events.service.d.ts +2 -2
- package/lib/services/routes.service.d.ts +3 -1
- package/lib/services/session-state.service.d.ts +4 -2
- package/lib/services/subscription.service.d.ts +1 -1
- package/lib/strategies/cross-origin.strategy.d.ts +2 -2
- package/lib/tokens/localization.token.d.ts +2 -2
- package/lib/tokens/set-token-response-to-storage.token.d.ts +3 -0
- package/lib/utils/common-utils.d.ts +9 -8
- package/lib/utils/factory-utils.d.ts +3 -1
- package/lib/utils/localization-utils.d.ts +1 -1
- package/lib/utils/object-utils.d.ts +2 -1
- package/lib/utils/route-utils.d.ts +2 -2
- package/lib/utils/tree-utils.d.ts +3 -3
- package/package.json +3 -3
package/fesm2015/abp-ng.core.mjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { ChangeDetectorRef, Component, Input, Injectable, InjectionToken, 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, concat } from 'rxjs';
|
|
3
|
+
import { of, BehaviorSubject, Subject, throwError, 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,
|
|
6
|
+
import { map, distinctUntilChanged, filter, catchError, switchMap, take, tap, debounceTime, mapTo, takeUntil, delay, retryWhen, shareReplay, finalize } from 'rxjs/operators';
|
|
7
7
|
import compare from 'just-compare';
|
|
8
8
|
import { __rest, __awaiter, __classPrivateFieldGet } from 'tslib';
|
|
9
9
|
import * as i1 from '@angular/common/http';
|
|
10
|
-
import { HttpParams, HttpClient, HttpClientModule, HttpClientXsrfModule, HttpContextToken, HttpContext } from '@angular/common/http';
|
|
10
|
+
import { HttpParams, HttpClient, HttpClientModule, HttpClientXsrfModule, HttpContextToken, HttpHeaders, HttpContext } from '@angular/common/http';
|
|
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';
|
|
@@ -90,7 +90,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
|
|
|
90
90
|
* Abstract service for Authentication.
|
|
91
91
|
*/
|
|
92
92
|
class AuthService {
|
|
93
|
-
constructor() { }
|
|
94
93
|
warningMessage() {
|
|
95
94
|
console.error('You should add @abp/ng-oauth packages or create your own auth packages.');
|
|
96
95
|
}
|
|
@@ -115,6 +114,10 @@ class AuthService {
|
|
|
115
114
|
this.warningMessage();
|
|
116
115
|
return false;
|
|
117
116
|
}
|
|
117
|
+
loginUsingGrant(grantType, parameters, headers) {
|
|
118
|
+
console.log({ grantType, parameters, headers });
|
|
119
|
+
return Promise.reject(new Error('not implemented'));
|
|
120
|
+
}
|
|
118
121
|
}
|
|
119
122
|
AuthService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AuthService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
120
123
|
AuthService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AuthService, providedIn: 'root' });
|
|
@@ -123,7 +126,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
|
|
|
123
126
|
args: [{
|
|
124
127
|
providedIn: 'root',
|
|
125
128
|
}]
|
|
126
|
-
}]
|
|
129
|
+
}] });
|
|
127
130
|
|
|
128
131
|
function pushValueTo(array) {
|
|
129
132
|
return (element) => {
|
|
@@ -218,6 +221,9 @@ function isNode(obj) {
|
|
|
218
221
|
}
|
|
219
222
|
function isObjectAndNotArrayNotNode(obj) {
|
|
220
223
|
return isObjectAndNotArray(obj) && !isNode(obj);
|
|
224
|
+
}
|
|
225
|
+
function checkHasProp(object, key) {
|
|
226
|
+
return Object.prototype.hasOwnProperty.call(object, key);
|
|
221
227
|
}
|
|
222
228
|
|
|
223
229
|
function deepMerge(target, source) {
|
|
@@ -276,6 +282,7 @@ class InternalStore {
|
|
|
276
282
|
this.update$.next(patchedState);
|
|
277
283
|
}
|
|
278
284
|
deepPatch(state) {
|
|
285
|
+
// TODO: Strict improve deepMerge
|
|
279
286
|
this.state$.next(deepMerge(this.state, state));
|
|
280
287
|
this.update$.next(state);
|
|
281
288
|
}
|
|
@@ -294,7 +301,7 @@ function coreOptionsFactory(_a) {
|
|
|
294
301
|
return Object.assign({}, options);
|
|
295
302
|
}
|
|
296
303
|
|
|
297
|
-
const mapToApiUrl = (key) => (apis) => (apis[key] || apis.default).url || apis.default.url;
|
|
304
|
+
const mapToApiUrl = (key) => (apis) => ((key && apis[key]) || apis.default).url || apis.default.url;
|
|
298
305
|
const mapToIssuer = (issuer) => {
|
|
299
306
|
if (!issuer) {
|
|
300
307
|
return issuer;
|
|
@@ -315,7 +322,8 @@ class EnvironmentService {
|
|
|
315
322
|
return this.store.state;
|
|
316
323
|
}
|
|
317
324
|
getApiUrl(key) {
|
|
318
|
-
|
|
325
|
+
var _a;
|
|
326
|
+
return mapToApiUrl(key)((_a = this.store.state) === null || _a === void 0 ? void 0 : _a.apis);
|
|
319
327
|
}
|
|
320
328
|
getApiUrl$(key) {
|
|
321
329
|
return this.store.sliceState(state => state.apis).pipe(map(mapToApiUrl(key)));
|
|
@@ -324,11 +332,12 @@ class EnvironmentService {
|
|
|
324
332
|
this.store.set(environment);
|
|
325
333
|
}
|
|
326
334
|
getIssuer() {
|
|
327
|
-
|
|
335
|
+
var _a, _b;
|
|
336
|
+
const issuer = (_b = (_a = this.store.state) === null || _a === void 0 ? void 0 : _a.oAuthConfig) === null || _b === void 0 ? void 0 : _b.issuer;
|
|
328
337
|
return mapToIssuer(issuer);
|
|
329
338
|
}
|
|
330
339
|
getIssuer$() {
|
|
331
|
-
return this.store.sliceState(state => state.oAuthConfig.issuer).pipe(map(mapToIssuer));
|
|
340
|
+
return this.store.sliceState(state => { var _a; return (_a = state === null || state === void 0 ? void 0 : state.oAuthConfig) === null || _a === void 0 ? void 0 : _a.issuer; }).pipe(map(mapToIssuer));
|
|
332
341
|
}
|
|
333
342
|
}
|
|
334
343
|
EnvironmentService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: EnvironmentService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
@@ -391,8 +400,7 @@ class RestService {
|
|
|
391
400
|
.pipe(catchError(err => (skipHandleError ? throwError(err) : this.handleError(err))));
|
|
392
401
|
}
|
|
393
402
|
getParams(params, encoder) {
|
|
394
|
-
const filteredParams = Object.
|
|
395
|
-
const value = params[key];
|
|
403
|
+
const filteredParams = Object.entries(params).reduce((acc, [key, value]) => {
|
|
396
404
|
if (isUndefinedOrEmptyString(value))
|
|
397
405
|
return acc;
|
|
398
406
|
if (value === null && !this.options.sendNullsAsQueryParam)
|
|
@@ -483,6 +491,9 @@ class ConfigStateService {
|
|
|
483
491
|
.subscribe(res => this.store.set(res));
|
|
484
492
|
}
|
|
485
493
|
getLocalizationAndCombineWithAppState(appState) {
|
|
494
|
+
if (!appState.localization.currentCulture.cultureName) {
|
|
495
|
+
throw new Error('culture name should defined');
|
|
496
|
+
}
|
|
486
497
|
return this.getlocalizationResource(appState.localization.currentCulture.cultureName).pipe(map(result => (Object.assign(Object.assign({}, appState), { localization: Object.assign(Object.assign({}, appState.localization), result) }))));
|
|
487
498
|
}
|
|
488
499
|
getlocalizationResource(cultureName) {
|
|
@@ -808,7 +819,7 @@ class AbstractNavTreeService extends AbstractTreeService {
|
|
|
808
819
|
hasInvisibleChild(identifier) {
|
|
809
820
|
var _a;
|
|
810
821
|
const node = this.find(item => item[this.id] === identifier);
|
|
811
|
-
return (_a = node === null || node === void 0 ? void 0 : node.children) === null || _a === void 0 ? void 0 : _a.some(child => child.invisible);
|
|
822
|
+
return ((_a = node === null || node === void 0 ? void 0 : node.children) === null || _a === void 0 ? void 0 : _a.some(child => child.invisible)) || false;
|
|
812
823
|
}
|
|
813
824
|
/* istanbul ignore next */
|
|
814
825
|
ngOnDestroy() {
|
|
@@ -846,7 +857,9 @@ class SubscriptionService {
|
|
|
846
857
|
}
|
|
847
858
|
closeOne(subscription) {
|
|
848
859
|
this.removeOne(subscription);
|
|
849
|
-
subscription
|
|
860
|
+
if (subscription) {
|
|
861
|
+
subscription.unsubscribe();
|
|
862
|
+
}
|
|
850
863
|
}
|
|
851
864
|
ngOnDestroy() {
|
|
852
865
|
this.subscription.unsubscribe();
|
|
@@ -979,18 +992,49 @@ function escapeHtmlChars(value) {
|
|
|
979
992
|
: value;
|
|
980
993
|
}
|
|
981
994
|
|
|
995
|
+
class AbpLocalStorageService {
|
|
996
|
+
constructor() { }
|
|
997
|
+
get length() {
|
|
998
|
+
return localStorage.length;
|
|
999
|
+
}
|
|
1000
|
+
clear() {
|
|
1001
|
+
localStorage.clear();
|
|
1002
|
+
}
|
|
1003
|
+
getItem(key) {
|
|
1004
|
+
return localStorage.getItem(key);
|
|
1005
|
+
}
|
|
1006
|
+
key(index) {
|
|
1007
|
+
return localStorage.key(index);
|
|
1008
|
+
}
|
|
1009
|
+
removeItem(key) {
|
|
1010
|
+
localStorage.removeItem(key);
|
|
1011
|
+
}
|
|
1012
|
+
setItem(key, value) {
|
|
1013
|
+
localStorage.setItem(key, value);
|
|
1014
|
+
}
|
|
1015
|
+
}
|
|
1016
|
+
AbpLocalStorageService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AbpLocalStorageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1017
|
+
AbpLocalStorageService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AbpLocalStorageService, providedIn: 'root' });
|
|
1018
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AbpLocalStorageService, decorators: [{
|
|
1019
|
+
type: Injectable,
|
|
1020
|
+
args: [{
|
|
1021
|
+
providedIn: 'root',
|
|
1022
|
+
}]
|
|
1023
|
+
}], ctorParameters: function () { return []; } });
|
|
1024
|
+
|
|
982
1025
|
class SessionStateService {
|
|
983
|
-
constructor(configState) {
|
|
1026
|
+
constructor(configState, localStorageService) {
|
|
984
1027
|
this.configState = configState;
|
|
1028
|
+
this.localStorageService = localStorageService;
|
|
985
1029
|
this.store = new InternalStore({});
|
|
986
1030
|
this.updateLocalStorage = () => {
|
|
987
|
-
|
|
1031
|
+
this.localStorageService.setItem('abpSession', JSON.stringify(this.store.state));
|
|
988
1032
|
};
|
|
989
1033
|
this.init();
|
|
990
1034
|
this.setInitialLanguage();
|
|
991
1035
|
}
|
|
992
1036
|
init() {
|
|
993
|
-
const session =
|
|
1037
|
+
const session = this.localStorageService.getItem('abpSession');
|
|
994
1038
|
if (session) {
|
|
995
1039
|
this.store.set(JSON.parse(session));
|
|
996
1040
|
}
|
|
@@ -1040,14 +1084,14 @@ class SessionStateService {
|
|
|
1040
1084
|
document.documentElement.setAttribute('lang', language);
|
|
1041
1085
|
}
|
|
1042
1086
|
}
|
|
1043
|
-
SessionStateService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: SessionStateService, deps: [{ token: ConfigStateService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1087
|
+
SessionStateService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: SessionStateService, deps: [{ token: ConfigStateService }, { token: AbpLocalStorageService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1044
1088
|
SessionStateService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: SessionStateService, providedIn: 'root' });
|
|
1045
1089
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: SessionStateService, decorators: [{
|
|
1046
1090
|
type: Injectable,
|
|
1047
1091
|
args: [{
|
|
1048
1092
|
providedIn: 'root',
|
|
1049
1093
|
}]
|
|
1050
|
-
}], ctorParameters: function () { return [{ type: ConfigStateService }]; } });
|
|
1094
|
+
}], ctorParameters: function () { return [{ type: ConfigStateService }, { type: AbpLocalStorageService }]; } });
|
|
1051
1095
|
|
|
1052
1096
|
class LocalizationService {
|
|
1053
1097
|
constructor(sessionState, injector, otherInstance, configState) {
|
|
@@ -1097,13 +1141,13 @@ class LocalizationService {
|
|
|
1097
1141
|
Object.entries(remote).forEach(entry => {
|
|
1098
1142
|
const resourceName = entry[0];
|
|
1099
1143
|
const remoteTexts = entry[1];
|
|
1100
|
-
let resource = local.get(resourceName) || {};
|
|
1144
|
+
let resource = (local === null || local === void 0 ? void 0 : local.get(resourceName)) || {};
|
|
1101
1145
|
resource = Object.assign(Object.assign({}, resource), remoteTexts);
|
|
1102
|
-
local.set(resourceName, resource);
|
|
1146
|
+
local === null || local === void 0 ? void 0 : local.set(resourceName, resource);
|
|
1103
1147
|
});
|
|
1104
1148
|
}
|
|
1105
1149
|
return local;
|
|
1106
|
-
}))
|
|
1150
|
+
}), filter(Boolean))
|
|
1107
1151
|
.subscribe(val => this.localizations$.next(val));
|
|
1108
1152
|
}
|
|
1109
1153
|
addLocalization(localizations) {
|
|
@@ -1124,7 +1168,7 @@ class LocalizationService {
|
|
|
1124
1168
|
listenToSetLanguage() {
|
|
1125
1169
|
this.sessionState
|
|
1126
1170
|
.onLanguageChange$()
|
|
1127
|
-
.pipe(filter(lang => this.configState.getDeep('localization.currentCulture.cultureName') !== lang), switchMap(lang => this.configState.refreshAppState().pipe(map(() => lang))), switchMap(lang => from(this.registerLocale(lang).then(() => lang))))
|
|
1171
|
+
.pipe(filter(lang => this.configState.getDeep('localization.currentCulture.cultureName') !== lang), switchMap(lang => this.configState.refreshAppState().pipe(map(() => lang))), filter(Boolean), switchMap(lang => from(this.registerLocale(lang).then(() => lang))))
|
|
1128
1172
|
.subscribe(lang => this._languageChange$.next(lang));
|
|
1129
1173
|
}
|
|
1130
1174
|
registerLocale(locale) {
|
|
@@ -1176,14 +1220,14 @@ class LocalizationService {
|
|
|
1176
1220
|
getLocalization(state, key, ...interpolateParams) {
|
|
1177
1221
|
if (!key)
|
|
1178
1222
|
key = '';
|
|
1179
|
-
let defaultValue;
|
|
1223
|
+
let defaultValue = '';
|
|
1180
1224
|
if (typeof key !== 'string') {
|
|
1181
1225
|
defaultValue = key.defaultValue;
|
|
1182
1226
|
key = key.key;
|
|
1183
1227
|
}
|
|
1184
1228
|
const keys = key.split('::');
|
|
1185
1229
|
const warn = (message) => {
|
|
1186
|
-
if (isDevMode)
|
|
1230
|
+
if (isDevMode())
|
|
1187
1231
|
console.warn(message);
|
|
1188
1232
|
};
|
|
1189
1233
|
if (keys.length < 2) {
|
|
@@ -1344,7 +1388,7 @@ class DynamicLayoutComponent {
|
|
|
1344
1388
|
]);
|
|
1345
1389
|
this.isLayoutVisible = true;
|
|
1346
1390
|
if (dynamicLayoutComponent) {
|
|
1347
|
-
if (isDevMode)
|
|
1391
|
+
if (isDevMode())
|
|
1348
1392
|
console.warn('DynamicLayoutComponent must be used only in AppComponent.');
|
|
1349
1393
|
return;
|
|
1350
1394
|
}
|
|
@@ -1377,8 +1421,10 @@ class DynamicLayoutComponent {
|
|
|
1377
1421
|
if (this.layoutKey === expectedLayout)
|
|
1378
1422
|
return;
|
|
1379
1423
|
const key = this.layouts.get(expectedLayout);
|
|
1380
|
-
|
|
1381
|
-
|
|
1424
|
+
if (key) {
|
|
1425
|
+
this.layout = (_a = this.getComponent(key)) === null || _a === void 0 ? void 0 : _a.component;
|
|
1426
|
+
this.layoutKey = expectedLayout;
|
|
1427
|
+
}
|
|
1382
1428
|
if (!this.layout) {
|
|
1383
1429
|
this.showLayoutNotFoundError(expectedLayout);
|
|
1384
1430
|
}
|
|
@@ -1886,16 +1932,20 @@ class ForDirective {
|
|
|
1886
1932
|
const rw = [];
|
|
1887
1933
|
changes.forEachOperation((record, previousIndex, currentIndex) => {
|
|
1888
1934
|
if (record.previousIndex == null) {
|
|
1889
|
-
const view = this.vcRef.createEmbeddedView(this.tempRef, new AbpForContext(null, -1, -1, this.items), currentIndex);
|
|
1935
|
+
const view = this.vcRef.createEmbeddedView(this.tempRef, new AbpForContext(null, -1, -1, this.items), currentIndex || 0);
|
|
1890
1936
|
rw.push(new RecordView(record, view));
|
|
1891
1937
|
}
|
|
1892
|
-
else if (currentIndex == null) {
|
|
1938
|
+
else if (currentIndex == null && previousIndex !== null) {
|
|
1893
1939
|
this.vcRef.remove(previousIndex);
|
|
1894
1940
|
}
|
|
1895
1941
|
else {
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1942
|
+
if (previousIndex !== null) {
|
|
1943
|
+
const view = this.vcRef.get(previousIndex);
|
|
1944
|
+
if (view && currentIndex !== null) {
|
|
1945
|
+
this.vcRef.move(view, currentIndex);
|
|
1946
|
+
rw.push(new RecordView(record, view));
|
|
1947
|
+
}
|
|
1948
|
+
}
|
|
1899
1949
|
}
|
|
1900
1950
|
});
|
|
1901
1951
|
for (let i = 0, l = rw.length; i < l; i++) {
|
|
@@ -1910,8 +1960,10 @@ class ForDirective {
|
|
|
1910
1960
|
viewRef.context.list = this.items;
|
|
1911
1961
|
}
|
|
1912
1962
|
changes.forEachIdentityChange((record) => {
|
|
1913
|
-
|
|
1914
|
-
|
|
1963
|
+
if (record.currentIndex !== null) {
|
|
1964
|
+
const viewRef = this.vcRef.get(record.currentIndex);
|
|
1965
|
+
viewRef.context.$implicit = record.item;
|
|
1966
|
+
}
|
|
1915
1967
|
});
|
|
1916
1968
|
}
|
|
1917
1969
|
projectItems(items) {
|
|
@@ -1938,8 +1990,9 @@ class ForDirective {
|
|
|
1938
1990
|
}
|
|
1939
1991
|
}
|
|
1940
1992
|
sortItems(items) {
|
|
1941
|
-
|
|
1942
|
-
|
|
1993
|
+
const orderBy = this.orderBy;
|
|
1994
|
+
if (orderBy) {
|
|
1995
|
+
items.sort((a, b) => (a[orderBy] > b[orderBy] ? 1 : a[orderBy] < b[orderBy] ? -1 : 0));
|
|
1943
1996
|
}
|
|
1944
1997
|
else {
|
|
1945
1998
|
items.sort();
|
|
@@ -1950,10 +2003,11 @@ class ForDirective {
|
|
|
1950
2003
|
if (!Array.isArray(items))
|
|
1951
2004
|
return;
|
|
1952
2005
|
const compareFn = this.compareFn;
|
|
1953
|
-
|
|
2006
|
+
const filterBy = this.filterBy;
|
|
2007
|
+
if (typeof filterBy !== 'undefined' &&
|
|
1954
2008
|
typeof this.filterVal !== 'undefined' &&
|
|
1955
2009
|
this.filterVal !== '') {
|
|
1956
|
-
items = items.filter(item => compareFn(item[
|
|
2010
|
+
items = items.filter(item => compareFn(item[filterBy], this.filterVal));
|
|
1957
2011
|
}
|
|
1958
2012
|
switch (this.orderDir) {
|
|
1959
2013
|
case 'ASC':
|
|
@@ -2024,7 +2078,7 @@ class FormSubmitDirective {
|
|
|
2024
2078
|
}
|
|
2025
2079
|
this.executedNgSubmit = true;
|
|
2026
2080
|
});
|
|
2027
|
-
const keyup$ = fromEvent(this.host.nativeElement, 'keyup').pipe(debounceTime(this.debounce), filter(event => !(event.target instanceof HTMLTextAreaElement)), filter(
|
|
2081
|
+
const keyup$ = fromEvent(this.host.nativeElement, 'keyup').pipe(debounceTime(this.debounce), filter(event => !(event.target instanceof HTMLTextAreaElement)), filter(event => event && event.key === 'Enter'));
|
|
2028
2082
|
this.subscription.addOne(keyup$, () => {
|
|
2029
2083
|
if (!this.executedNgSubmit) {
|
|
2030
2084
|
this.host.nativeElement.dispatchEvent(new Event('submit', { bubbles: true, cancelable: true }));
|
|
@@ -2249,11 +2303,16 @@ class ReplaceableTemplateDirective {
|
|
|
2249
2303
|
if (!this.data.inputs)
|
|
2250
2304
|
return;
|
|
2251
2305
|
Object.defineProperties(this.providedData.inputs, Object.assign({}, Object.keys(this.data.inputs).reduce((acc, key) => {
|
|
2252
|
-
var _a;
|
|
2253
|
-
return (Object.assign(Object.assign({}, acc), { [key]: Object.assign({ enumerable: true, configurable: true, get: () => { var _a; return (_a = this.data.inputs[key]) === null ||
|
|
2306
|
+
var _a, _b;
|
|
2307
|
+
return (Object.assign(Object.assign({}, acc), { [key]: Object.assign({ enumerable: true, configurable: true, get: () => { var _a, _b; return (_b = (_a = this.data.inputs) === null || _a === void 0 ? void 0 : _a[key]) === null || _b === void 0 ? void 0 : _b.value; } }, (((_b = (_a = this.data.inputs) === null || _a === void 0 ? void 0 : _a[key]) === null || _b === void 0 ? void 0 : _b.twoWay) && {
|
|
2254
2308
|
set: (newValue) => {
|
|
2255
|
-
|
|
2256
|
-
this.data.
|
|
2309
|
+
var _a, _b;
|
|
2310
|
+
if ((_a = this.data.inputs) === null || _a === void 0 ? void 0 : _a[key]) {
|
|
2311
|
+
this.data.inputs[key].value = newValue;
|
|
2312
|
+
}
|
|
2313
|
+
if ((_b = this.data.outputs) === null || _b === void 0 ? void 0 : _b[`${key}Change`]) {
|
|
2314
|
+
this.data.outputs[`${key}Change`](newValue);
|
|
2315
|
+
}
|
|
2257
2316
|
},
|
|
2258
2317
|
})) }));
|
|
2259
2318
|
}, {})));
|
|
@@ -2286,7 +2345,7 @@ class StopPropagationDirective {
|
|
|
2286
2345
|
this.stopPropEvent = new EventEmitter();
|
|
2287
2346
|
}
|
|
2288
2347
|
ngOnInit() {
|
|
2289
|
-
this.subscription.addOne(fromEvent(this.el.nativeElement, 'click'),
|
|
2348
|
+
this.subscription.addOne(fromEvent(this.el.nativeElement, 'click'), event => {
|
|
2290
2349
|
event.stopPropagation();
|
|
2291
2350
|
this.stopPropEvent.emit(event);
|
|
2292
2351
|
});
|
|
@@ -2315,14 +2374,16 @@ class RoutesHandler {
|
|
|
2315
2374
|
addRoutes() {
|
|
2316
2375
|
var _a, _b;
|
|
2317
2376
|
(_b = (_a = this.router) === null || _a === void 0 ? void 0 : _a.config) === null || _b === void 0 ? void 0 : _b.forEach(({ path = '', data }) => {
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
if (Array.isArray(data.routes)) {
|
|
2321
|
-
this.routes.add(data.routes);
|
|
2377
|
+
const routes = data === null || data === void 0 ? void 0 : data.routes;
|
|
2378
|
+
if (!routes)
|
|
2322
2379
|
return;
|
|
2380
|
+
if (Array.isArray(routes)) {
|
|
2381
|
+
this.routes.add(routes);
|
|
2382
|
+
}
|
|
2383
|
+
else {
|
|
2384
|
+
const routesFlatten = flatRoutes([Object.assign({ path }, routes)], { path: '' });
|
|
2385
|
+
this.routes.add(routesFlatten);
|
|
2323
2386
|
}
|
|
2324
|
-
const routes = flatRoutes([Object.assign({ path }, data.routes)], { path: '' });
|
|
2325
|
-
this.routes.add(routes);
|
|
2326
2387
|
});
|
|
2327
2388
|
}
|
|
2328
2389
|
}
|
|
@@ -2493,7 +2554,10 @@ class LocaleId extends String {
|
|
|
2493
2554
|
}
|
|
2494
2555
|
toString() {
|
|
2495
2556
|
const { currentLang } = this.localizationService;
|
|
2496
|
-
|
|
2557
|
+
if (checkHasProp(differentLocales, currentLang)) {
|
|
2558
|
+
return differentLocales[currentLang];
|
|
2559
|
+
}
|
|
2560
|
+
return currentLang;
|
|
2497
2561
|
}
|
|
2498
2562
|
valueOf() {
|
|
2499
2563
|
return this.toString();
|
|
@@ -2528,7 +2592,7 @@ function getRemoteEnv(injector, environment) {
|
|
|
2528
2592
|
httpErrorReporter.reportError(err);
|
|
2529
2593
|
return of(null);
|
|
2530
2594
|
}), // TODO: Consider get handle function from a provider
|
|
2531
|
-
tap(env => environmentService.setState(mergeEnvironments(environment, env, remoteEnv))))
|
|
2595
|
+
tap(env => environmentService.setState(mergeEnvironments(environment, env || {}, remoteEnv))))
|
|
2532
2596
|
.toPromise();
|
|
2533
2597
|
}
|
|
2534
2598
|
function mergeEnvironments(local, remote, config) {
|
|
@@ -2665,18 +2729,22 @@ function parseTenantFromUrl(injector) {
|
|
|
2665
2729
|
});
|
|
2666
2730
|
}
|
|
2667
2731
|
function replaceTenantNameWithinEnvironment(injector, tenancyName, placeholder = tenancyPlaceholder) {
|
|
2732
|
+
var _a;
|
|
2668
2733
|
const environmentService = injector.get(EnvironmentService);
|
|
2669
2734
|
const environment = clone(environmentService.getEnvironment());
|
|
2670
2735
|
if (environment.application.baseUrl) {
|
|
2671
2736
|
environment.application.baseUrl = environment.application.baseUrl.replace(placeholder, tenancyName);
|
|
2672
2737
|
}
|
|
2673
|
-
if (environment.oAuthConfig.redirectUri) {
|
|
2738
|
+
if ((_a = environment.oAuthConfig) === null || _a === void 0 ? void 0 : _a.redirectUri) {
|
|
2674
2739
|
environment.oAuthConfig.redirectUri = environment.oAuthConfig.redirectUri.replace(placeholder, tenancyName);
|
|
2675
2740
|
}
|
|
2676
|
-
|
|
2741
|
+
if (!environment.oAuthConfig) {
|
|
2742
|
+
environment.oAuthConfig = {};
|
|
2743
|
+
}
|
|
2744
|
+
environment.oAuthConfig.issuer = (environment.oAuthConfig.issuer || '').replace(placeholder, tenancyName);
|
|
2677
2745
|
Object.keys(environment.apis).forEach(api => {
|
|
2678
2746
|
Object.keys(environment.apis[api]).forEach(key => {
|
|
2679
|
-
environment.apis[api][key] = environment.apis[api][key].replace(placeholder, tenancyName);
|
|
2747
|
+
environment.apis[api][key] = (environment.apis[api][key] || '').replace(placeholder, tenancyName);
|
|
2680
2748
|
});
|
|
2681
2749
|
});
|
|
2682
2750
|
return environmentService.setState(environment);
|
|
@@ -2736,12 +2804,14 @@ function getShortDateFormat(configStateService) {
|
|
|
2736
2804
|
return dateTimeFormat.shortDatePattern;
|
|
2737
2805
|
}
|
|
2738
2806
|
function getShortTimeFormat(configStateService) {
|
|
2807
|
+
var _a;
|
|
2739
2808
|
const dateTimeFormat = configStateService.getDeep('localization.currentCulture.dateTimeFormat');
|
|
2740
|
-
return dateTimeFormat.shortTimePattern.replace('tt', 'a');
|
|
2809
|
+
return (_a = dateTimeFormat === null || dateTimeFormat === void 0 ? void 0 : dateTimeFormat.shortTimePattern) === null || _a === void 0 ? void 0 : _a.replace('tt', 'a');
|
|
2741
2810
|
}
|
|
2742
2811
|
function getShortDateShortTimeFormat(configStateService) {
|
|
2812
|
+
var _a;
|
|
2743
2813
|
const dateTimeFormat = configStateService.getDeep('localization.currentCulture.dateTimeFormat');
|
|
2744
|
-
return `${dateTimeFormat.shortDatePattern} ${dateTimeFormat.shortTimePattern.replace('tt', 'a')}`;
|
|
2814
|
+
return `${dateTimeFormat.shortDatePattern} ${(_a = dateTimeFormat === null || dateTimeFormat === void 0 ? void 0 : dateTimeFormat.shortTimePattern) === null || _a === void 0 ? void 0 : _a.replace('tt', 'a')}`;
|
|
2745
2815
|
}
|
|
2746
2816
|
|
|
2747
2817
|
class ContentProjectionService {
|
|
@@ -2768,10 +2838,7 @@ class LazyModuleFactory extends NgModuleFactory {
|
|
|
2768
2838
|
return this.moduleWithProviders.ngModule;
|
|
2769
2839
|
}
|
|
2770
2840
|
create(parentInjector) {
|
|
2771
|
-
const injector = Injector.create({
|
|
2772
|
-
parent: parentInjector,
|
|
2773
|
-
providers: this.moduleWithProviders.providers,
|
|
2774
|
-
});
|
|
2841
|
+
const injector = Injector.create(Object.assign(Object.assign({}, (parentInjector && { parent: parentInjector })), { providers: this.moduleWithProviders.providers }));
|
|
2775
2842
|
const compiler = injector.get(Compiler);
|
|
2776
2843
|
const factory = compiler.compileModuleSync(this.moduleType);
|
|
2777
2844
|
return factory.create(injector);
|
|
@@ -2871,7 +2938,9 @@ class CrossOriginStrategy {
|
|
|
2871
2938
|
setCrossOrigin(element) {
|
|
2872
2939
|
if (this.integrity)
|
|
2873
2940
|
element.setAttribute('integrity', this.integrity);
|
|
2874
|
-
|
|
2941
|
+
if (this.crossorigin) {
|
|
2942
|
+
element.setAttribute('crossorigin', this.crossorigin);
|
|
2943
|
+
}
|
|
2875
2944
|
}
|
|
2876
2945
|
}
|
|
2877
2946
|
class NoCrossOriginStrategy extends CrossOriginStrategy {
|
|
@@ -2939,8 +3008,9 @@ function fromLazyLoad(element, domStrategy = DOM_STRATEGY.AppendToHead(), crossO
|
|
|
2939
3008
|
}
|
|
2940
3009
|
function createErrorHandler(observer, element) {
|
|
2941
3010
|
return function (event) {
|
|
3011
|
+
var _a;
|
|
2942
3012
|
clearCallbacks(element);
|
|
2943
|
-
element.parentNode.removeChild(element);
|
|
3013
|
+
(_a = element.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(element);
|
|
2944
3014
|
observer.error(event);
|
|
2945
3015
|
};
|
|
2946
3016
|
}
|
|
@@ -3007,9 +3077,12 @@ class DomInsertionService {
|
|
|
3007
3077
|
return element;
|
|
3008
3078
|
}
|
|
3009
3079
|
removeContent(element) {
|
|
3010
|
-
|
|
3011
|
-
|
|
3012
|
-
|
|
3080
|
+
var _a;
|
|
3081
|
+
if (element.textContent) {
|
|
3082
|
+
const hash = generateHash(element.textContent);
|
|
3083
|
+
this.inserted.delete(hash);
|
|
3084
|
+
(_a = element.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(element);
|
|
3085
|
+
}
|
|
3013
3086
|
}
|
|
3014
3087
|
has(content) {
|
|
3015
3088
|
const hash = generateHash(content);
|
|
@@ -3073,6 +3146,9 @@ class HttpWaitService {
|
|
|
3073
3146
|
this.store.patch({ filteredRequests });
|
|
3074
3147
|
}
|
|
3075
3148
|
applyFilter(requests) {
|
|
3149
|
+
if (!requests) {
|
|
3150
|
+
return [];
|
|
3151
|
+
}
|
|
3076
3152
|
const { filteredRequests } = this.store.state;
|
|
3077
3153
|
return requests.filter(({ method, url }) => !filteredRequests.find(filteredRequest => this.isSameRequest(filteredRequest, { method, endpoint: getPathName(url) })));
|
|
3078
3154
|
}
|
|
@@ -3101,7 +3177,7 @@ class ResourceWaitService {
|
|
|
3101
3177
|
return this.store.sliceState(({ resources }) => !!resources.size);
|
|
3102
3178
|
}
|
|
3103
3179
|
updateLoading$() {
|
|
3104
|
-
return this.store.sliceUpdate(({ resources }) => !!resources.size);
|
|
3180
|
+
return this.store.sliceUpdate(({ resources }) => !!(resources === null || resources === void 0 ? void 0 : resources.size));
|
|
3105
3181
|
}
|
|
3106
3182
|
clearLoading() {
|
|
3107
3183
|
this.store.patch({ resources: new Set() });
|
|
@@ -3135,16 +3211,19 @@ class LazyLoadService {
|
|
|
3135
3211
|
if (this.loaded.has(strategy.path))
|
|
3136
3212
|
return of(new CustomEvent('load'));
|
|
3137
3213
|
this.resourceWaitService.addResource(strategy.path);
|
|
3138
|
-
|
|
3214
|
+
const delayOperator = retryDelay ? pipe(delay(retryDelay)) : pipe();
|
|
3215
|
+
const takeOp = retryTimes ? pipe(take(retryTimes)) : pipe();
|
|
3216
|
+
return strategy.createStream().pipe(retryWhen(error$ => concat(error$.pipe(delayOperator, takeOp), throwError(() => new CustomEvent('error')))), tap(() => {
|
|
3139
3217
|
this.loaded.set(strategy.path, strategy.element);
|
|
3140
3218
|
this.resourceWaitService.deleteResource(strategy.path);
|
|
3141
3219
|
}), delay(100), shareReplay({ bufferSize: 1, refCount: true }));
|
|
3142
3220
|
}
|
|
3143
3221
|
remove(path) {
|
|
3222
|
+
var _a;
|
|
3144
3223
|
const element = this.loaded.get(path);
|
|
3145
3224
|
if (!element)
|
|
3146
3225
|
return false;
|
|
3147
|
-
element.parentNode.removeChild(element);
|
|
3226
|
+
(_a = element.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(element);
|
|
3148
3227
|
this.loaded.delete(path);
|
|
3149
3228
|
return true;
|
|
3150
3229
|
}
|
|
@@ -3680,7 +3759,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
|
|
|
3680
3759
|
class ListResultDto {
|
|
3681
3760
|
constructor(initialValues = {}) {
|
|
3682
3761
|
for (const key in initialValues) {
|
|
3683
|
-
if (
|
|
3762
|
+
if (checkHasProp(initialValues, key)) {
|
|
3684
3763
|
this[key] = initialValues[key];
|
|
3685
3764
|
}
|
|
3686
3765
|
}
|
|
@@ -3695,8 +3774,7 @@ class LimitedResultRequestDto {
|
|
|
3695
3774
|
constructor(initialValues = {}) {
|
|
3696
3775
|
this.maxResultCount = 10;
|
|
3697
3776
|
for (const key in initialValues) {
|
|
3698
|
-
if (
|
|
3699
|
-
initialValues[key] !== undefined) {
|
|
3777
|
+
if (checkHasProp(initialValues, key) && initialValues[key] !== undefined) {
|
|
3700
3778
|
this[key] = initialValues[key];
|
|
3701
3779
|
}
|
|
3702
3780
|
}
|
|
@@ -3715,7 +3793,7 @@ class PagedAndSortedResultRequestDto extends PagedResultRequestDto {
|
|
|
3715
3793
|
class EntityDto {
|
|
3716
3794
|
constructor(initialValues = {}) {
|
|
3717
3795
|
for (const key in initialValues) {
|
|
3718
|
-
if (
|
|
3796
|
+
if (checkHasProp(initialValues, key)) {
|
|
3719
3797
|
this[key] = initialValues[key];
|
|
3720
3798
|
}
|
|
3721
3799
|
}
|
|
@@ -3754,7 +3832,7 @@ class FullAuditedEntityWithUserDto extends FullAuditedEntityDto {
|
|
|
3754
3832
|
class ExtensibleObject {
|
|
3755
3833
|
constructor(initialValues = {}) {
|
|
3756
3834
|
for (const key in initialValues) {
|
|
3757
|
-
if (
|
|
3835
|
+
if (checkHasProp(initialValues, key)) {
|
|
3758
3836
|
this[key] = initialValues[key];
|
|
3759
3837
|
}
|
|
3760
3838
|
}
|
|
@@ -3868,7 +3946,9 @@ class LooseContentSecurityStrategy extends ContentSecurityStrategy {
|
|
|
3868
3946
|
super(nonce);
|
|
3869
3947
|
}
|
|
3870
3948
|
applyCSP(element) {
|
|
3871
|
-
|
|
3949
|
+
if (this.nonce) {
|
|
3950
|
+
element.setAttribute('nonce', this.nonce);
|
|
3951
|
+
}
|
|
3872
3952
|
}
|
|
3873
3953
|
}
|
|
3874
3954
|
class NoContentSecurityStrategy extends ContentSecurityStrategy {
|
|
@@ -3896,7 +3976,11 @@ class ContentStrategy {
|
|
|
3896
3976
|
insertElement() {
|
|
3897
3977
|
const element = this.createElement();
|
|
3898
3978
|
if (this.options && Object.keys(this.options).length > 0) {
|
|
3899
|
-
Object.keys(this.options).forEach(key =>
|
|
3979
|
+
Object.keys(this.options).forEach(key => {
|
|
3980
|
+
if (this.options[key]) {
|
|
3981
|
+
element[key] = this.options[key];
|
|
3982
|
+
}
|
|
3983
|
+
});
|
|
3900
3984
|
}
|
|
3901
3985
|
this.contentSecurityStrategy.applyCSP(element);
|
|
3902
3986
|
this.domStrategy.insertElement(element);
|
|
@@ -4102,6 +4186,9 @@ const NAVIGATE_TO_MANAGE_PROFILE = new InjectionToken('NAVIGATE_TO_MANAGE_PROFIL
|
|
|
4102
4186
|
|
|
4103
4187
|
const PIPE_TO_LOGIN_FN_KEY = new InjectionToken('PIPE_TO_LOGIN_FN_KEY');
|
|
4104
4188
|
|
|
4189
|
+
/**
|
|
4190
|
+
* @deprecated The token should not be used anymore.
|
|
4191
|
+
*/
|
|
4105
4192
|
const SET_TOKEN_RESPONSE_TO_STORAGE_FN_KEY = new InjectionToken('SET_TOKEN_RESPONSE_TO_STORAGE_FN_KEY');
|
|
4106
4193
|
|
|
4107
4194
|
const IS_EXTERNAL_REQUEST = new HttpContextToken(() => false);
|
|
@@ -4203,7 +4290,7 @@ function isValidUrl(value) {
|
|
|
4203
4290
|
}
|
|
4204
4291
|
|
|
4205
4292
|
const onlyLetterAndNumberRegex = /^[a-zA-Z0-9]+$/;
|
|
4206
|
-
function validateUsername({ pattern } = { pattern: onlyLetterAndNumberRegex }) {
|
|
4293
|
+
function validateUsername({ pattern = /.*/ } = { pattern: onlyLetterAndNumberRegex }) {
|
|
4207
4294
|
return (control) => {
|
|
4208
4295
|
const isValid = isValidUserName(control.value, pattern);
|
|
4209
4296
|
return isValid ? null : { usernamePattern: { actualValue: control.value } };
|
|
@@ -4231,7 +4318,7 @@ class ApiInterceptor {
|
|
|
4231
4318
|
this.httpWaitService = httpWaitService;
|
|
4232
4319
|
}
|
|
4233
4320
|
getAdditionalHeaders(existingHeaders) {
|
|
4234
|
-
return existingHeaders;
|
|
4321
|
+
return existingHeaders || new HttpHeaders();
|
|
4235
4322
|
}
|
|
4236
4323
|
intercept(request, next) {
|
|
4237
4324
|
this.httpWaitService.addRequest(request);
|
|
@@ -4257,7 +4344,7 @@ class ExternalHttpClient extends HttpClient {
|
|
|
4257
4344
|
request(first, url, options = {}) {
|
|
4258
4345
|
if (typeof first === 'string') {
|
|
4259
4346
|
__classPrivateFieldGet(this, _ExternalHttpClient_instances, "m", _ExternalHttpClient_setPlaceholderContext).call(this, options);
|
|
4260
|
-
return super.request(first, url, options);
|
|
4347
|
+
return super.request(first, url || '', options);
|
|
4261
4348
|
}
|
|
4262
4349
|
__classPrivateFieldGet(this, _ExternalHttpClient_instances, "m", _ExternalHttpClient_setPlaceholderContext).call(this, first);
|
|
4263
4350
|
return super.request(first);
|
|
@@ -4283,5 +4370,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
|
|
|
4283
4370
|
* Generated bundle index. Do not edit.
|
|
4284
4371
|
*/
|
|
4285
4372
|
|
|
4286
|
-
export { APP_INIT_ERROR_HANDLERS, AbpApiDefinitionService, AbpApplicationConfigurationService, AbpApplicationLocalizationService, 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, 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 };
|
|
4373
|
+
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 };
|
|
4287
4374
|
//# sourceMappingURL=abp-ng.core.mjs.map
|