angular-three 1.6.6 → 1.6.7

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,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { ElementRef, Injectable, inject, InjectionToken, ViewContainerRef, TemplateRef, Directive, Input, EventEmitter, getDebugNode, RendererFactory2, ChangeDetectorRef, makeEnvironmentProviders, EnvironmentInjector, createEnvironmentInjector, Component, HostBinding, Output, ViewChild, Injector, Pipe, SkipSelf, ContentChild } from '@angular/core';
2
+ import { ElementRef, inject, ChangeDetectorRef, Injectable, InjectionToken, ViewContainerRef, TemplateRef, Directive, Input, EventEmitter, getDebugNode, RendererFactory2, makeEnvironmentProviders, EnvironmentInjector, createEnvironmentInjector, Component, HostBinding, Output, ViewChild, Injector, Pipe, SkipSelf, ContentChild } from '@angular/core';
3
3
  import { provideNgxResizeOptions, NgxResize } from 'ngx-resize';
4
4
  import { isObservable, of, map, from, tap, retry, catchError, share, ReplaySubject, switchMap, forkJoin, take, BehaviorSubject, startWith, combineLatest, filter, distinctUntilChanged, takeUntil, merge } from 'rxjs';
5
5
  import * as THREE from 'three';
@@ -516,6 +516,7 @@ function tapEffect(effectFn) {
516
516
  class NgtRxStore extends RxState {
517
517
  constructor() {
518
518
  super();
519
+ const cdr = inject(ChangeDetectorRef, { optional: true });
519
520
  // set a dummy property so that initial this.get() won't return undefined
520
521
  this.set({ __ngt_dummy__: '__ngt_dummy__' });
521
522
  // call initialize that might be setup by derived Stores
@@ -532,10 +533,14 @@ class NgtRxStore extends RxState {
532
533
  modded[key] = value === undefined ? this.get(key) : value;
533
534
  return modded;
534
535
  }, {});
535
- return originalSet(modArgs);
536
+ const value = originalSet(modArgs);
537
+ cdr?.detectChanges();
538
+ return value;
536
539
  }
537
540
  // @ts-expect-error not sure why ...args here doesn't pass tuple check
538
- return originalSet(...args);
541
+ const value = originalSet(...args);
542
+ cdr?.detectChanges();
543
+ return value;
539
544
  };
540
545
  },
541
546
  });