@ngxs/store 3.7.4-dev.master-5891501 → 3.7.4-dev.master-af4a196
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.umd.js +1 -17
- 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/src/decorators/select/select.js +1 -26
- package/esm2015/src/store.js +4 -4
- package/esm5/src/decorators/select/select.js +1 -17
- package/esm5/src/store.js +4 -4
- package/fesm2015/ngxs-store.js +3 -28
- package/fesm2015/ngxs-store.js.map +1 -1
- package/fesm5/ngxs-store.js +3 -19
- package/fesm5/ngxs-store.js.map +1 -1
- package/ngxs-store.metadata.json +1 -1
- package/package.json +1 -1
- package/src/decorators/select/select.d.ts +0 -1
package/fesm5/ngxs-store.js
CHANGED
|
@@ -2,8 +2,8 @@ import { __assign, __spread, __extends, __values } from 'tslib';
|
|
|
2
2
|
import { NgZone, Injectable, Inject, PLATFORM_ID, defineInjectable, inject, InjectionToken, INJECTOR, ɵglobal, Optional, SkipSelf, ErrorHandler, Injector, ɵivyEnabled, NgModule, APP_BOOTSTRAP_LISTENER } from '@angular/core';
|
|
3
3
|
import { memoize, INITIAL_STATE_TOKEN, NgxsBootstrapper, NGXS_STATE_CONTEXT_FACTORY, NGXS_STATE_FACTORY, InitialState } from '@ngxs/store/internals';
|
|
4
4
|
import { isPlatformServer } from '@angular/common';
|
|
5
|
-
import { Observable, Subject, BehaviorSubject, of, forkJoin, throwError, EMPTY, from } from 'rxjs';
|
|
6
|
-
import { filter, map, shareReplay, take, exhaustMap, mergeMap, defaultIfEmpty, catchError, takeUntil, tap, distinctUntilChanged } from 'rxjs/operators';
|
|
5
|
+
import { Observable, Subject, BehaviorSubject, of, forkJoin, throwError, EMPTY, from, queueScheduler } from 'rxjs';
|
|
6
|
+
import { filter, map, shareReplay, take, exhaustMap, mergeMap, defaultIfEmpty, catchError, takeUntil, tap, observeOn, distinctUntilChanged } from 'rxjs/operators';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* @fileoverview added by tsickle
|
|
@@ -3465,7 +3465,7 @@ var Store = /** @class */ (function () {
|
|
|
3465
3465
|
* because state is being changed actually within the `<root>` zone, see `InternalDispatcher#dispatchSingle`.
|
|
3466
3466
|
* All selects would use this stream, and it would call leave only once for any state change across all active selectors.
|
|
3467
3467
|
*/
|
|
3468
|
-
this._selectableStateStream = this._stateStream.pipe(leaveNgxs(this._internalExecutionStrategy), shareReplay({ bufferSize: 1, refCount: true }));
|
|
3468
|
+
this._selectableStateStream = this._stateStream.pipe(observeOn(queueScheduler), leaveNgxs(this._internalExecutionStrategy), shareReplay({ bufferSize: 1, refCount: true }));
|
|
3469
3469
|
this.initStateStream(initialStateValue);
|
|
3470
3470
|
}
|
|
3471
3471
|
/**
|
|
@@ -4230,7 +4230,6 @@ function removeDollarAtTheEnd(name) {
|
|
|
4230
4230
|
*/
|
|
4231
4231
|
/**
|
|
4232
4232
|
* Decorator for selecting a slice of state from the store.
|
|
4233
|
-
* @deprecated
|
|
4234
4233
|
* @template T
|
|
4235
4234
|
* @param {?=} rawSelector
|
|
4236
4235
|
* @param {...?} paths
|
|
@@ -4248,9 +4247,6 @@ function Select(rawSelector) {
|
|
|
4248
4247
|
*/
|
|
4249
4248
|
function (target, key) {
|
|
4250
4249
|
var _a;
|
|
4251
|
-
if (typeof ngDevMode === 'undefined' || ngDevMode) {
|
|
4252
|
-
warnSelectDeprecation();
|
|
4253
|
-
}
|
|
4254
4250
|
/** @type {?} */
|
|
4255
4251
|
var name = key.toString();
|
|
4256
4252
|
/** @type {?} */
|
|
@@ -4276,18 +4272,6 @@ function Select(rawSelector) {
|
|
|
4276
4272
|
_a));
|
|
4277
4273
|
});
|
|
4278
4274
|
}
|
|
4279
|
-
/** @type {?} */
|
|
4280
|
-
var selectDeprecatedHasBeenWarned = false;
|
|
4281
|
-
/**
|
|
4282
|
-
* @return {?}
|
|
4283
|
-
*/
|
|
4284
|
-
function warnSelectDeprecation() {
|
|
4285
|
-
if (selectDeprecatedHasBeenWarned) {
|
|
4286
|
-
return;
|
|
4287
|
-
}
|
|
4288
|
-
selectDeprecatedHasBeenWarned = true;
|
|
4289
|
-
console.warn("\n The @Select decorator is deprecated due to the following reasons:\n 1) lack of type-safety (compared to 'store.select()')\n 2) not compatible with server-side rendering because it uses a global 'Store' instance, which might change between renders\n 3) not compatible with module federation\n Consider replacing it the with store.select.\n If you're using VSCode you can replace @Select usages with the following RegExp.\n Search: @Select((.*))\n(.*): Observable<(.*)>;$\n Replace: $2 = this.store.select<$3>($1);\n ");
|
|
4290
|
-
}
|
|
4291
4275
|
|
|
4292
4276
|
/**
|
|
4293
4277
|
* @fileoverview added by tsickle
|