@geexcode/geex-angular 0.0.41 → 0.0.53

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,13 +1,12 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { signal, InjectionToken, runInInjectionContext, makeEnvironmentProviders, Injector, inject, Injectable, provideAppInitializer, importProvidersFrom, ChangeDetectorRef, effect, computed, Component, input, output, contentChild, untracked, isSignal } from '@angular/core';
3
3
  import { fromEvent, Subject, Observable, throwError, of, firstValueFrom, interval, filter, map, takeUntil, timer, BehaviorSubject, isObservable, lastValueFrom, switchMap as switchMap$1 } from 'rxjs';
4
- import { debounceTime, switchMap, distinctUntilChanged, share, mergeMap, catchError, finalize, filter as filter$1 } from 'rxjs/operators';
4
+ import { debounceTime, switchMap, exhaustMap, mergeMap, catchError, finalize, filter as filter$1 } from 'rxjs/operators';
5
5
  import { toSignal } from '@angular/core/rxjs-interop';
6
6
  import { HttpContextToken, HttpErrorResponse, HttpContext, HttpResponseBase, HTTP_INTERCEPTORS } from '@angular/common/http';
7
7
  import { InMemoryCache, ApolloLink, CombinedGraphQLErrors } from '@apollo/client';
8
8
  import { ErrorLink } from '@apollo/client/link/error';
9
9
  import { GraphQLWsLink } from '@apollo/client/link/subscriptions';
10
- import { LocalState } from '@apollo/client/local-state';
11
10
  import { Apollo, APOLLO_OPTIONS, APOLLO_NAMED_OPTIONS, gql as gql$1 } from 'apollo-angular';
12
11
  import { HttpLink } from 'apollo-angular/http';
13
12
  import extractFiles from 'extract-files/extractFiles.mjs';
@@ -238,7 +237,7 @@ class GeexHttpInterceptor {
238
237
  loginTrigger$ = new Subject();
239
238
  loginModal$;
240
239
  constructor() {
241
- this.loginModal$ = this.loginTrigger$.pipe(debounceTime(100), distinctUntilChanged(), switchMap(() => {
240
+ this.loginModal$ = this.loginTrigger$.pipe(debounceTime(100), exhaustMap(() => {
242
241
  return new Observable(subscriber => {
243
242
  const options = this.buildLoginConfirmOptions();
244
243
  const modal = this.modalSrv.confirm({
@@ -264,7 +263,7 @@ class GeexHttpInterceptor {
264
263
  modal?.destroy();
265
264
  };
266
265
  });
267
- }), share());
266
+ }));
268
267
  this.loginModal$.subscribe();
269
268
  }
270
269
  get notification() {
@@ -496,8 +495,6 @@ function createGeexHttpApolloOptions(options) {
496
495
  return {
497
496
  link: ApolloLink.from(links),
498
497
  cache: options.cache,
499
- // Apollo Client 4: `@client` requires an explicit LocalState opt-in.
500
- localState: new LocalState(),
501
498
  defaultOptions: geexApolloDefaultOptions,
502
499
  };
503
500
  }
@@ -554,7 +551,6 @@ function createGeexWsApolloOptions(options) {
554
551
  return {
555
552
  link: new GraphQLWsLink(client),
556
553
  cache: options.cache,
557
- localState: new LocalState(),
558
554
  defaultOptions: geexApolloDefaultOptions,
559
555
  };
560
556
  }
@@ -1920,22 +1916,26 @@ class RoutedComponent extends BusinessComponentBase {
1920
1916
  async handleRouteReload() {
1921
1917
  this.router.navigationReload();
1922
1918
  this.loading.set(true);
1923
- const routeParams = {
1924
- pathParams: await this.route.params.firstValuePromise(),
1925
- queryParams: await this.route.queryParams.firstValuePromise(),
1926
- fragment: await this.route.fragment.firstValuePromise(),
1927
- };
1928
- const params = await this.resolve(routeParams);
1929
- this.paramsForm.reset(params, { emitEvent: false });
1930
- this.params.set(params);
1931
- await this.beforeOnRouted(params);
1932
- await this.onRouted(params);
1933
- await this.afterOnRouted(params);
1934
- this.loading.set(false);
1935
- const title = this.title();
1936
- if (title)
1937
- this.reuseTabSrv.title = title;
1938
- this.cdr.detectChanges();
1919
+ try {
1920
+ const routeParams = {
1921
+ pathParams: await this.route.params.firstValuePromise(),
1922
+ queryParams: await this.route.queryParams.firstValuePromise(),
1923
+ fragment: await this.route.fragment.firstValuePromise(),
1924
+ };
1925
+ const params = await this.resolve(routeParams);
1926
+ this.paramsForm.reset(params, { emitEvent: false });
1927
+ this.params.set(params);
1928
+ await this.beforeOnRouted(params);
1929
+ await this.onRouted(params);
1930
+ await this.afterOnRouted(params);
1931
+ const title = this.title();
1932
+ if (title)
1933
+ this.reuseTabSrv.title = title;
1934
+ }
1935
+ finally {
1936
+ this.loading.set(false);
1937
+ this.cdr.detectChanges();
1938
+ }
1939
1939
  }
1940
1940
  beforeOnRouted(_params) { }
1941
1941
  afterOnRouted(_params) { }