@ngxs/store 3.7.4-dev.master-310a613 → 3.7.4-dev.master-770aa34
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 +33 -31
- 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/state.js +1 -7
- package/esm2015/src/internal/state-factory.js +10 -2
- package/esm2015/src/ivy/ivy-enabled-in-dev-mode.js +5 -5
- package/esm5/src/decorators/state.js +1 -7
- package/esm5/src/internal/state-factory.js +10 -2
- package/esm5/src/ivy/ivy-enabled-in-dev-mode.js +5 -5
- package/fesm2015/ngxs-store.js +33 -31
- package/fesm2015/ngxs-store.js.map +1 -1
- package/fesm5/ngxs-store.js +33 -31
- package/fesm5/ngxs-store.js.map +1 -1
- package/ngxs-store.metadata.json +1 -1
- package/package.json +1 -1
- package/src/ivy/ivy-enabled-in-dev-mode.d.ts +1 -1
package/fesm5/ngxs-store.js
CHANGED
|
@@ -2464,6 +2464,32 @@ if (false) {
|
|
|
2464
2464
|
StoreValidators.stateNameRegex;
|
|
2465
2465
|
}
|
|
2466
2466
|
|
|
2467
|
+
/**
|
|
2468
|
+
* @fileoverview added by tsickle
|
|
2469
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2470
|
+
*/
|
|
2471
|
+
/**
|
|
2472
|
+
* All provided or injected tokens must have `\@Injectable` decorator
|
|
2473
|
+
* (previously, injected tokens without `\@Injectable` were allowed
|
|
2474
|
+
* if another decorator was used, e.g. pipes).
|
|
2475
|
+
* @param {?} stateClass
|
|
2476
|
+
* @return {?}
|
|
2477
|
+
*/
|
|
2478
|
+
function ensureStateClassIsInjectable(stateClass) {
|
|
2479
|
+
// `ɵprov` is a static property added by the NGCC compiler. It always exists in
|
|
2480
|
+
// AOT mode because this property is added before runtime. If an application is running in
|
|
2481
|
+
// JIT mode then this property can be added by the `@Injectable()` decorator. The `@Injectable()`
|
|
2482
|
+
// decorator has to go after the `@State()` decorator, thus we prevent users from unwanted DI errors.
|
|
2483
|
+
if (ɵivyEnabled) {
|
|
2484
|
+
/** @type {?} */
|
|
2485
|
+
/** @nocollapse */ var ngInjectableDef = stateClass.ɵprov;
|
|
2486
|
+
if (!ngInjectableDef) {
|
|
2487
|
+
// Don't warn if Ivy is disabled or `ɵprov` exists on the class
|
|
2488
|
+
console.warn(getUndecoratedStateInIvyWarningMessage(stateClass.name));
|
|
2489
|
+
}
|
|
2490
|
+
}
|
|
2491
|
+
}
|
|
2492
|
+
|
|
2467
2493
|
/**
|
|
2468
2494
|
* @fileoverview added by tsickle
|
|
2469
2495
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
@@ -2658,6 +2684,13 @@ var StateFactory = /** @class */ (function () {
|
|
|
2658
2684
|
/** @type {?} */
|
|
2659
2685
|
var meta = (/** @type {?} */ (stateClass[META_KEY]));
|
|
2660
2686
|
this.addRuntimeInfoToMeta(meta, path);
|
|
2687
|
+
// Note: previously we called `ensureStateClassIsInjectable` within the
|
|
2688
|
+
// `State` decorator. This check is moved here because the `ɵprov` property
|
|
2689
|
+
// will not exist on the class in JIT mode (because it's set asynchronously
|
|
2690
|
+
// during JIT compilation through `Object.defineProperty`).
|
|
2691
|
+
if (typeof ngDevMode === 'undefined' || ngDevMode) {
|
|
2692
|
+
ensureStateClassIsInjectable(stateClass);
|
|
2693
|
+
}
|
|
2661
2694
|
/** @type {?} */
|
|
2662
2695
|
var stateMap = {
|
|
2663
2696
|
name: name_1,
|
|
@@ -4078,32 +4111,6 @@ function Action(actions, options) {
|
|
|
4078
4111
|
});
|
|
4079
4112
|
}
|
|
4080
4113
|
|
|
4081
|
-
/**
|
|
4082
|
-
* @fileoverview added by tsickle
|
|
4083
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
4084
|
-
*/
|
|
4085
|
-
/**
|
|
4086
|
-
* All provided or injected tokens must have `\@Injectable` decorator
|
|
4087
|
-
* (previously, injected tokens without `\@Injectable` were allowed
|
|
4088
|
-
* if another decorator was used, e.g. pipes).
|
|
4089
|
-
* @param {?} target
|
|
4090
|
-
* @return {?}
|
|
4091
|
-
*/
|
|
4092
|
-
function ensureStateClassIsInjectable(target) {
|
|
4093
|
-
// `ɵprov` is a static property added by the NGCC compiler. It always exists in
|
|
4094
|
-
// AOT mode because this property is added before runtime. If an application is running in
|
|
4095
|
-
// JIT mode then this property can be added by the `@Injectable()` decorator. The `@Injectable()`
|
|
4096
|
-
// decorator has to go after the `@State()` decorator, thus we prevent users from unwanted DI errors.
|
|
4097
|
-
if (ɵivyEnabled) {
|
|
4098
|
-
/** @type {?} */
|
|
4099
|
-
/** @nocollapse */ var ngInjectableDef = target.ɵprov;
|
|
4100
|
-
if (!ngInjectableDef) {
|
|
4101
|
-
// Don't warn if Ivy is disabled or `ɵprov` exists on the class
|
|
4102
|
-
console.warn(getUndecoratedStateInIvyWarningMessage(target.name));
|
|
4103
|
-
}
|
|
4104
|
-
}
|
|
4105
|
-
}
|
|
4106
|
-
|
|
4107
4114
|
/**
|
|
4108
4115
|
* @fileoverview added by tsickle
|
|
4109
4116
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
@@ -4165,11 +4172,6 @@ function State(options) {
|
|
|
4165
4172
|
* @return {?}
|
|
4166
4173
|
*/
|
|
4167
4174
|
function (target) {
|
|
4168
|
-
// Caretaker note: we have still left the `typeof` condition in order to avoid
|
|
4169
|
-
// creating a breaking change for projects that still use the View Engine.
|
|
4170
|
-
if (typeof ngDevMode === 'undefined' || ngDevMode) {
|
|
4171
|
-
ensureStateClassIsInjectable(target);
|
|
4172
|
-
}
|
|
4173
4175
|
/** @type {?} */
|
|
4174
4176
|
var stateClass = target;
|
|
4175
4177
|
/** @type {?} */
|