@ngxs/store 3.7.3-dev.master-33cace6 → 3.7.3-dev.master-b00eeb3

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.
@@ -1391,6 +1391,7 @@
1391
1391
  * RxJS operator for selecting out specific actions.
1392
1392
  *
1393
1393
  * This will grab actions that have just been dispatched as well as actions that have completed
1394
+ * @template T
1394
1395
  * @param {...?} allowedTypes
1395
1396
  * @return {?}
1396
1397
  */
@@ -1405,6 +1406,7 @@
1405
1406
  * RxJS operator for selecting out specific actions.
1406
1407
  *
1407
1408
  * This will ONLY grab actions that have just been dispatched
1409
+ * @template T
1408
1410
  * @param {...?} allowedTypes
1409
1411
  * @return {?}
1410
1412
  */
@@ -1419,6 +1421,7 @@
1419
1421
  * RxJS operator for selecting out specific actions.
1420
1422
  *
1421
1423
  * This will ONLY grab actions that have just been successfully completed
1424
+ * @template T
1422
1425
  * @param {...?} allowedTypes
1423
1426
  * @return {?}
1424
1427
  */
@@ -1433,6 +1436,7 @@
1433
1436
  * RxJS operator for selecting out specific actions.
1434
1437
  *
1435
1438
  * This will ONLY grab actions that have just been canceled
1439
+ * @template T
1436
1440
  * @param {...?} allowedTypes
1437
1441
  * @return {?}
1438
1442
  */
@@ -1447,6 +1451,7 @@
1447
1451
  * RxJS operator for selecting out specific actions.
1448
1452
  *
1449
1453
  * This will ONLY grab actions that have just been completed
1454
+ * @template T
1450
1455
  * @param {...?} allowedTypes
1451
1456
  * @return {?}
1452
1457
  */
@@ -1467,6 +1472,7 @@
1467
1472
  * RxJS operator for selecting out specific actions.
1468
1473
  *
1469
1474
  * This will ONLY grab actions that have just thrown an error
1475
+ * @template T
1470
1476
  * @param {...?} allowedTypes
1471
1477
  * @return {?}
1472
1478
  */
@@ -3644,6 +3650,12 @@
3644
3650
  this._config = _config;
3645
3651
  this._internalExecutionStrategy = _internalExecutionStrategy;
3646
3652
  this._stateFactory = _stateFactory;
3653
+ /**
3654
+ * This is a derived state stream that leaves NGXS execution strategy to emit state changes within the Angular zone,
3655
+ * because state is being changed actually within the `<root>` zone, see `InternalDispatcher#dispatchSingle`.
3656
+ * All selects would use this stream, and it would call leave only once for any state change across all active selectors.
3657
+ */
3658
+ this._selectableStateStream = this._stateStream.pipe(leaveNgxs(this._internalExecutionStrategy), operators.publishReplay(1), operators.refCount());
3647
3659
  this.initStateStream(initialStateValue);
3648
3660
  }
3649
3661
  /**
@@ -3674,7 +3686,7 @@
3674
3686
  var _this = this;
3675
3687
  /** @type {?} */
3676
3688
  var selectorFn = this.getStoreBoundSelectorFn(selector);
3677
- return this._stateStream.pipe(operators.map(selectorFn), operators.catchError((/**
3689
+ return this._selectableStateStream.pipe(operators.map(selectorFn), operators.catchError((/**
3678
3690
  * @param {?} err
3679
3691
  * @return {?}
3680
3692
  */
@@ -3726,7 +3738,9 @@
3726
3738
  * @return {?}
3727
3739
  */
3728
3740
  function (fn) {
3729
- return this._stateStream.pipe(leaveNgxs(this._internalExecutionStrategy)).subscribe(fn);
3741
+ return this._selectableStateStream
3742
+ .pipe(leaveNgxs(this._internalExecutionStrategy))
3743
+ .subscribe(fn);
3730
3744
  };
3731
3745
  /**
3732
3746
  * Return the raw value of the state.
@@ -3817,6 +3831,14 @@
3817
3831
  return Store;
3818
3832
  }());
3819
3833
  if (false) {
3834
+ /**
3835
+ * This is a derived state stream that leaves NGXS execution strategy to emit state changes within the Angular zone,
3836
+ * because state is being changed actually within the `<root>` zone, see `InternalDispatcher#dispatchSingle`.
3837
+ * All selects would use this stream, and it would call leave only once for any state change across all active selectors.
3838
+ * @type {?}
3839
+ * @private
3840
+ */
3841
+ Store.prototype._selectableStateStream;
3820
3842
  /**
3821
3843
  * @type {?}
3822
3844
  * @private