@abp/ng.core 10.1.0-rc.2 → 10.1.0
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/fesm2022/abp-ng.core.mjs +34 -31
- package/fesm2022/abp-ng.core.mjs.map +1 -1
- package/package.json +2 -2
package/fesm2022/abp-ng.core.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, ChangeDetectorRef, Input, Component, Injectable, InjectionToken, Injector, NgModuleFactory, Compiler, PLATFORM_ID, makeStateKey, TransferState, REQUEST, NgZone, signal, computed, effect, LOCALE_ID, ComponentFactoryResolver, ApplicationRef,
|
|
2
|
+
import { inject, ChangeDetectorRef, Input, Component, Injectable, InjectionToken, Injector, isDevMode, NgModuleFactory, Compiler, PLATFORM_ID, makeStateKey, TransferState, REQUEST, NgZone, signal, computed, effect, LOCALE_ID, ComponentFactoryResolver, ApplicationRef, input, ElementRef, Directive, EventEmitter, Output, TemplateRef, ViewContainerRef, IterableDiffers, HostListener, provideAppInitializer, makeEnvironmentProviders, Pipe, SecurityContext, NgModule } from '@angular/core';
|
|
3
3
|
import { of, BehaviorSubject, Subject, firstValueFrom, throwError, timeout, lastValueFrom, Observable, timer, pipe, concat, ReplaySubject, defer, EMPTY, map as map$1, Subscription, combineLatest, from, take as take$1, filter as filter$1, fromEvent, switchMap as switchMap$1, startWith, distinctUntilChanged as distinctUntilChanged$1 } from 'rxjs';
|
|
4
4
|
import { PRIMARY_OUTLET, Router, NavigationStart, NavigationError, NavigationEnd, NavigationCancel, TitleStrategy, ActivatedRoute, RouterOutlet, RouterModule } from '@angular/router';
|
|
5
5
|
import { isPlatformBrowser, DOCUMENT, registerLocaleData, NgComponentOutlet, isPlatformServer, DatePipe, DATE_PIPE_DEFAULT_TIMEZONE, CommonModule } from '@angular/common';
|
|
@@ -470,32 +470,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImpor
|
|
|
470
470
|
args: [{ providedIn: 'root' }]
|
|
471
471
|
}] });
|
|
472
472
|
|
|
473
|
-
class HttpErrorReporterService {
|
|
474
|
-
constructor() {
|
|
475
|
-
this._reporter$ = new Subject();
|
|
476
|
-
this._errors$ = new BehaviorSubject([]);
|
|
477
|
-
}
|
|
478
|
-
get reporter$() {
|
|
479
|
-
return this._reporter$.asObservable();
|
|
480
|
-
}
|
|
481
|
-
get errors$() {
|
|
482
|
-
return this._errors$.asObservable();
|
|
483
|
-
}
|
|
484
|
-
get errors() {
|
|
485
|
-
return this._errors$.value;
|
|
486
|
-
}
|
|
487
|
-
reportError(error) {
|
|
488
|
-
this._reporter$.next(error);
|
|
489
|
-
this._errors$.next([...this.errors, error]);
|
|
490
|
-
}
|
|
491
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: HttpErrorReporterService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
492
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: HttpErrorReporterService, providedIn: 'root' }); }
|
|
493
|
-
}
|
|
494
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: HttpErrorReporterService, decorators: [{
|
|
495
|
-
type: Injectable,
|
|
496
|
-
args: [{ providedIn: 'root' }]
|
|
497
|
-
}] });
|
|
498
|
-
|
|
499
473
|
function getRemoteEnv(injector, environment) {
|
|
500
474
|
const environmentService = injector.get(EnvironmentService);
|
|
501
475
|
const { remoteEnv } = environment;
|
|
@@ -503,14 +477,16 @@ function getRemoteEnv(injector, environment) {
|
|
|
503
477
|
if (!url)
|
|
504
478
|
return Promise.resolve();
|
|
505
479
|
const http = injector.get(HttpClient);
|
|
506
|
-
const httpErrorReporter = injector.get(HttpErrorReporterService);
|
|
507
480
|
return http
|
|
508
481
|
.request(method, url, { headers })
|
|
509
482
|
.pipe(catchError(err => {
|
|
510
|
-
|
|
483
|
+
if (isDevMode()) {
|
|
484
|
+
console.warn(`[ABP Environment] Failed to fetch remote environment from "${url}". ` +
|
|
485
|
+
`Error: ${err.message || err}\n` +
|
|
486
|
+
`See https://abp.io/docs/latest/framework/ui/angular/environment#example-remoteenv-configuration for configuration details.`);
|
|
487
|
+
}
|
|
511
488
|
return of(null);
|
|
512
|
-
}),
|
|
513
|
-
tap(env => environmentService.setState(mergeEnvironments(environment, env || {}, remoteEnv))))
|
|
489
|
+
}), tap(env => environmentService.setState(mergeEnvironments(environment, env || {}, remoteEnv))))
|
|
514
490
|
.toPromise();
|
|
515
491
|
}
|
|
516
492
|
function mergeEnvironments(local, remote, config) {
|
|
@@ -1482,6 +1458,32 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImpor
|
|
|
1482
1458
|
}]
|
|
1483
1459
|
}] });
|
|
1484
1460
|
|
|
1461
|
+
class HttpErrorReporterService {
|
|
1462
|
+
constructor() {
|
|
1463
|
+
this._reporter$ = new Subject();
|
|
1464
|
+
this._errors$ = new BehaviorSubject([]);
|
|
1465
|
+
}
|
|
1466
|
+
get reporter$() {
|
|
1467
|
+
return this._reporter$.asObservable();
|
|
1468
|
+
}
|
|
1469
|
+
get errors$() {
|
|
1470
|
+
return this._errors$.asObservable();
|
|
1471
|
+
}
|
|
1472
|
+
get errors() {
|
|
1473
|
+
return this._errors$.value;
|
|
1474
|
+
}
|
|
1475
|
+
reportError(error) {
|
|
1476
|
+
this._reporter$.next(error);
|
|
1477
|
+
this._errors$.next([...this.errors, error]);
|
|
1478
|
+
}
|
|
1479
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: HttpErrorReporterService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1480
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: HttpErrorReporterService, providedIn: 'root' }); }
|
|
1481
|
+
}
|
|
1482
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: HttpErrorReporterService, decorators: [{
|
|
1483
|
+
type: Injectable,
|
|
1484
|
+
args: [{ providedIn: 'root' }]
|
|
1485
|
+
}] });
|
|
1486
|
+
|
|
1485
1487
|
class HttpWaitService {
|
|
1486
1488
|
constructor() {
|
|
1487
1489
|
this.store = new InternalStore({
|
|
@@ -3935,6 +3937,7 @@ class ForDirective {
|
|
|
3935
3937
|
return;
|
|
3936
3938
|
// Recreate differ if items array reference changed
|
|
3937
3939
|
if (this.lastItemsRef !== this.items) {
|
|
3940
|
+
this.vcRef.clear();
|
|
3938
3941
|
this.differ = null;
|
|
3939
3942
|
this.lastItemsRef = this.items;
|
|
3940
3943
|
}
|