angular-three 1.6.8 → 1.6.9
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,
|
|
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';
|
|
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';
|
|
@@ -459,19 +459,6 @@ function applyProps(instance, props) {
|
|
|
459
459
|
return instance;
|
|
460
460
|
}
|
|
461
461
|
|
|
462
|
-
function safeDetectChanges(cdr) {
|
|
463
|
-
if (!cdr)
|
|
464
|
-
return;
|
|
465
|
-
try {
|
|
466
|
-
if (cdr['context']) {
|
|
467
|
-
cdr.detectChanges();
|
|
468
|
-
}
|
|
469
|
-
}
|
|
470
|
-
catch (e) {
|
|
471
|
-
cdr.markForCheck();
|
|
472
|
-
}
|
|
473
|
-
}
|
|
474
|
-
|
|
475
462
|
const startWithUndefined = () => startWith(undefined);
|
|
476
463
|
/**
|
|
477
464
|
* An extended `tap` operator that accepts an `effectFn` which:
|
|
@@ -529,7 +516,6 @@ function tapEffect(effectFn) {
|
|
|
529
516
|
class NgtRxStore extends RxState {
|
|
530
517
|
constructor() {
|
|
531
518
|
super();
|
|
532
|
-
const cdr = inject(ChangeDetectorRef, { optional: true });
|
|
533
519
|
// set a dummy property so that initial this.get() won't return undefined
|
|
534
520
|
this.set({ __ngt_dummy__: '__ngt_dummy__' });
|
|
535
521
|
// call initialize that might be setup by derived Stores
|
|
@@ -546,14 +532,10 @@ class NgtRxStore extends RxState {
|
|
|
546
532
|
modded[key] = value === undefined ? this.get(key) : value;
|
|
547
533
|
return modded;
|
|
548
534
|
}, {});
|
|
549
|
-
|
|
550
|
-
safeDetectChanges(cdr);
|
|
551
|
-
return value;
|
|
535
|
+
return originalSet(modArgs);
|
|
552
536
|
}
|
|
553
537
|
// @ts-expect-error not sure why ...args here doesn't pass tuple check
|
|
554
|
-
|
|
555
|
-
safeDetectChanges(cdr);
|
|
556
|
-
return value;
|
|
538
|
+
return originalSet(...args);
|
|
557
539
|
};
|
|
558
540
|
},
|
|
559
541
|
});
|
|
@@ -2600,6 +2582,19 @@ function injectBeforeRender(cb, priority = 0) {
|
|
|
2600
2582
|
}
|
|
2601
2583
|
}
|
|
2602
2584
|
|
|
2585
|
+
function safeDetectChanges(cdr) {
|
|
2586
|
+
if (!cdr)
|
|
2587
|
+
return;
|
|
2588
|
+
try {
|
|
2589
|
+
if (cdr['context']) {
|
|
2590
|
+
cdr.detectChanges();
|
|
2591
|
+
}
|
|
2592
|
+
}
|
|
2593
|
+
catch (e) {
|
|
2594
|
+
cdr.markForCheck();
|
|
2595
|
+
}
|
|
2596
|
+
}
|
|
2597
|
+
|
|
2603
2598
|
function injectNgtRef(initialValue = null) {
|
|
2604
2599
|
const ref = is.ref(initialValue) ? initialValue : new ElementRef(initialValue);
|
|
2605
2600
|
let lastValue = ref.nativeElement;
|