@ngxs/store 3.7.3-dev.master-6bd0acb → 3.7.3-dev.master-89968a0
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/bundles/ngxs-store-internals.umd.js +42 -0
- package/bundles/ngxs-store-internals.umd.js.map +1 -1
- package/bundles/ngxs-store-internals.umd.min.js +1 -1
- package/bundles/ngxs-store-internals.umd.min.js.map +1 -1
- package/bundles/ngxs-store-operators.umd.js +13 -12
- package/bundles/ngxs-store-operators.umd.js.map +1 -1
- package/bundles/ngxs-store-operators.umd.min.js +1 -1
- package/bundles/ngxs-store-operators.umd.min.js.map +1 -1
- package/bundles/ngxs-store.umd.js +27 -6
- package/bundles/ngxs-store.umd.js.map +1 -1
- package/bundles/ngxs-store.umd.min.js +1 -1
- package/bundles/ngxs-store.umd.min.js.map +1 -1
- package/esm2015/internals/decorator-injector-adapter.js +43 -1
- package/esm2015/internals/index.js +2 -2
- package/esm2015/internals/ngxs-store-internals.js +2 -2
- package/esm2015/operators/append.js +3 -3
- package/esm2015/operators/compose.js +1 -1
- package/esm2015/operators/iif.js +1 -1
- package/esm2015/operators/index.js +1 -1
- package/esm2015/operators/insert-item.js +3 -3
- package/esm2015/operators/patch.js +4 -5
- package/esm2015/operators/update-item.js +7 -5
- package/esm2015/operators/utils.js +1 -1
- package/esm2015/src/decorators/select/select.js +29 -8
- package/esm5/internals/decorator-injector-adapter.js +43 -1
- package/esm5/internals/index.js +2 -2
- package/esm5/internals/ngxs-store-internals.js +2 -2
- package/esm5/operators/append.js +3 -3
- package/esm5/operators/compose.js +1 -1
- package/esm5/operators/iif.js +1 -1
- package/esm5/operators/index.js +1 -1
- package/esm5/operators/insert-item.js +3 -3
- package/esm5/operators/patch.js +4 -5
- package/esm5/operators/update-item.js +7 -5
- package/esm5/operators/utils.js +1 -1
- package/esm5/src/decorators/select/select.js +30 -8
- package/fesm2015/ngxs-store-internals.js +42 -1
- package/fesm2015/ngxs-store-internals.js.map +1 -1
- package/fesm2015/ngxs-store-operators.js +13 -12
- package/fesm2015/ngxs-store-operators.js.map +1 -1
- package/fesm2015/ngxs-store.js +27 -7
- package/fesm2015/ngxs-store.js.map +1 -1
- package/fesm5/ngxs-store-internals.js +42 -1
- package/fesm5/ngxs-store-internals.js.map +1 -1
- package/fesm5/ngxs-store-operators.js +13 -12
- package/fesm5/ngxs-store-operators.js.map +1 -1
- package/fesm5/ngxs-store.js +28 -7
- package/fesm5/ngxs-store.js.map +1 -1
- package/internals/decorator-injector-adapter.d.ts +7 -0
- package/internals/index.d.ts +1 -1
- package/internals/ngxs-store-internals.metadata.json +1 -1
- package/ngxs-store.metadata.json +1 -1
- package/operators/append.d.ts +2 -2
- package/operators/compose.d.ts +2 -1
- package/operators/iif.d.ts +2 -2
- package/operators/index.d.ts +1 -1
- package/operators/insert-item.d.ts +2 -2
- package/operators/ngxs-store-operators.metadata.json +1 -1
- package/operators/patch.d.ts +2 -6
- package/operators/update-item.d.ts +2 -2
- package/operators/utils.d.ts +2 -1
- package/package.json +1 -1
package/fesm2015/ngxs-store.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { NgZone, Injectable, Inject, PLATFORM_ID, InjectionToken, Optional, SkipSelf, ErrorHandler, Injector, defineInjectable, inject, ɵivyEnabled, NgModule, APP_BOOTSTRAP_LISTENER } from '@angular/core';
|
|
2
|
-
import { memoize, INITIAL_STATE_TOKEN, NgxsBootstrapper, NGXS_STATE_CONTEXT_FACTORY, NGXS_STATE_FACTORY, InitialState, localInject, ensureLocalInjectorCaptured } from '@ngxs/store/internals';
|
|
2
|
+
import { memoize, INITIAL_STATE_TOKEN, NgxsBootstrapper, NGXS_STATE_CONTEXT_FACTORY, NGXS_STATE_FACTORY, InitialState, ensureInjectorNotifierIsCaptured, localInject, ensureLocalInjectorCaptured } from '@ngxs/store/internals';
|
|
3
3
|
import { isPlatformServer } from '@angular/common';
|
|
4
4
|
import { Observable, Subject, BehaviorSubject, of, forkJoin, throwError, EMPTY, from } from 'rxjs';
|
|
5
5
|
import { filter, map, shareReplay, take, exhaustMap, mergeMap, defaultIfEmpty, catchError, takeUntil, tap, distinctUntilChanged } from 'rxjs/operators';
|
|
@@ -3719,6 +3719,11 @@ function Select(rawSelector, ...paths) {
|
|
|
3719
3719
|
const selectorId = `__${name}__selector`;
|
|
3720
3720
|
/** @type {?} */
|
|
3721
3721
|
let selector = null;
|
|
3722
|
+
/** @type {?} */
|
|
3723
|
+
let injectorNotifier$ = null;
|
|
3724
|
+
if (ɵivyEnabled) {
|
|
3725
|
+
injectorNotifier$ = ensureInjectorNotifierIsCaptured(target);
|
|
3726
|
+
}
|
|
3722
3727
|
Object.defineProperties(target, {
|
|
3723
3728
|
[selectorId]: {
|
|
3724
3729
|
writable: true,
|
|
@@ -3732,14 +3737,29 @@ function Select(rawSelector, ...paths) {
|
|
|
3732
3737
|
* @return {?}
|
|
3733
3738
|
*/
|
|
3734
3739
|
get() {
|
|
3740
|
+
if (this[selectorId]) {
|
|
3741
|
+
return this[selectorId];
|
|
3742
|
+
}
|
|
3735
3743
|
// The `localInject` will be tree-shaken away in apps that
|
|
3736
3744
|
// still use the View Engine.
|
|
3737
|
-
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3745
|
+
if (ɵivyEnabled) {
|
|
3746
|
+
this[selectorId] = (/** @type {?} */ (injectorNotifier$)).pipe(mergeMap((/**
|
|
3747
|
+
* @return {?}
|
|
3748
|
+
*/
|
|
3749
|
+
() => {
|
|
3750
|
+
/** @type {?} */
|
|
3751
|
+
const store = localInject(this, Store);
|
|
3752
|
+
/** @type {?} */
|
|
3753
|
+
const config = localInject(this, NgxsConfig);
|
|
3754
|
+
selector = selector || createSelectorFn(config, name, rawSelector, paths);
|
|
3755
|
+
return createSelectObservable(selector, store);
|
|
3756
|
+
})));
|
|
3757
|
+
}
|
|
3758
|
+
else {
|
|
3759
|
+
selector = selector || createSelectorFn(null, name, rawSelector, paths);
|
|
3760
|
+
this[selectorId] = createSelectObservable(selector, null);
|
|
3761
|
+
}
|
|
3762
|
+
return this[selectorId];
|
|
3743
3763
|
}
|
|
3744
3764
|
}
|
|
3745
3765
|
});
|