@abp/ng.core 10.0.1 → 10.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { inject, ChangeDetectorRef, Input, Component, Injectable, InjectionToken, Injector, NgModuleFactory, Compiler, PLATFORM_ID, makeStateKey, TransferState, REQUEST, NgZone, signal, computed, effect, LOCALE_ID, ComponentFactoryResolver, ApplicationRef, isDevMode, input, ElementRef, Directive, EventEmitter, Output, TemplateRef, ViewContainerRef, IterableDiffers, HostListener, provideAppInitializer, makeEnvironmentProviders, Pipe, SecurityContext, NgModule } from '@angular/core';
3
- import { of, BehaviorSubject, Subject, firstValueFrom, throwError, Observable, timer, pipe, concat, ReplaySubject, 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';
3
+ import { of, BehaviorSubject, Subject, firstValueFrom, throwError, timeout, lastValueFrom, Observable, timer, pipe, concat, ReplaySubject, 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';
6
6
  import { map, distinctUntilChanged, filter, catchError, tap, take, switchMap, mapTo, takeUntil, delay, retryWhen, shareReplay, debounceTime, finalize } from 'rxjs/operators';
@@ -1102,6 +1102,7 @@ async function getInitialData() {
1102
1102
  const environmentService = injector.get(EnvironmentService);
1103
1103
  const configState = injector.get(ConfigStateService);
1104
1104
  const options = injector.get(CORE_OPTIONS);
1105
+ const appStartedWithSSR = injector.get(APP_STARTED_WITH_SSR);
1105
1106
  environmentService.setState(options.environment);
1106
1107
  await getRemoteEnv(injector, options.environment);
1107
1108
  await parseTenantFromUrl(injector);
@@ -1124,8 +1125,12 @@ async function getInitialData() {
1124
1125
  }
1125
1126
  return throwError(() => error);
1126
1127
  }));
1127
- // TODO: Not working with SSR
1128
- // await lastValueFrom(result$);
1128
+ if (appStartedWithSSR) {
1129
+ await firstValueFrom(result$.pipe(timeout(0), catchError(() => of(null))));
1130
+ }
1131
+ else {
1132
+ await lastValueFrom(result$);
1133
+ }
1129
1134
  await localeInitializer(injector);
1130
1135
  }
1131
1136
  function localeInitializer(injector) {