@ngxs/store 3.7.6-dev.master-fb318b1 → 3.7.6-dev.master-40a2210
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-testing.umd.js +409 -420
- package/bundles/ngxs-store-internals-testing.umd.js.map +1 -1
- package/bundles/ngxs-store-internals.umd.js +48 -117
- package/bundles/ngxs-store-internals.umd.js.map +1 -1
- package/bundles/ngxs-store-operators.umd.js +61 -402
- package/bundles/ngxs-store-operators.umd.js.map +1 -1
- package/bundles/ngxs-store.umd.js +1041 -3269
- package/bundles/ngxs-store.umd.js.map +1 -1
- package/esm2015/index.js +7 -7
- package/esm2015/internals/angular.js +1 -8
- package/esm2015/internals/index.js +2 -6
- package/esm2015/internals/initial-state.js +1 -21
- package/esm2015/internals/internal-tokens.js +4 -15
- package/esm2015/internals/memoize.js +8 -33
- package/esm2015/internals/ngxs-bootstrapper.js +7 -20
- package/esm2015/internals/ngxs-store-internals.js +2 -6
- package/esm2015/internals/src/symbols.js +2 -14
- package/esm2015/internals/symbols.js +2 -14
- package/esm2015/internals/testing/fresh-platform.js +13 -53
- package/esm2015/internals/testing/helpers/ngxs-test.component.js +11 -17
- package/esm2015/internals/testing/helpers/ngxs-test.module.js +13 -16
- package/esm2015/internals/testing/index.js +1 -5
- package/esm2015/internals/testing/ngxs-store-internals-testing.js +2 -6
- package/esm2015/internals/testing/ngxs.setup.js +1 -31
- package/esm2015/internals/testing/skip-console-logging.js +7 -42
- package/esm2015/internals/testing/symbol.js +2 -29
- package/esm2015/ngxs-store.js +2 -23
- package/esm2015/operators/append.js +7 -18
- package/esm2015/operators/compose.js +4 -22
- package/esm2015/operators/iif.js +12 -30
- package/esm2015/operators/index.js +2 -6
- package/esm2015/operators/insert-item.js +10 -22
- package/esm2015/operators/ngxs-store-operators.js +2 -6
- package/esm2015/operators/patch.js +5 -22
- package/esm2015/operators/remove-item.js +5 -17
- package/esm2015/operators/types.js +2 -5
- package/esm2015/operators/update-item.js +12 -26
- package/esm2015/operators/utils.js +1 -32
- package/esm2015/src/actions/actions.js +1 -18
- package/esm2015/src/actions/symbols.js +2 -39
- package/esm2015/src/actions-stream.js +24 -90
- package/esm2015/src/configs/messages.config.js +1 -44
- package/esm2015/src/decorators/action.js +3 -18
- package/esm2015/src/decorators/select/select-factory.js +10 -27
- package/esm2015/src/decorators/select/select.js +3 -22
- package/esm2015/src/decorators/select/symbols.js +4 -25
- package/esm2015/src/decorators/selector/selector.js +5 -29
- package/esm2015/src/decorators/selector/symbols.js +2 -5
- package/esm2015/src/decorators/selector-options.js +4 -18
- package/esm2015/src/decorators/state.js +5 -44
- package/esm2015/src/dev-features/ngxs-development.module.js +8 -12
- package/esm2015/src/dev-features/ngxs-unhandled-actions-logger.js +12 -37
- package/esm2015/src/dev-features/symbols.js +2 -18
- package/esm2015/src/execution/dispatch-outside-zone-ngxs-execution-strategy.js +10 -56
- package/esm2015/src/execution/internal-ngxs-execution-strategy.js +10 -32
- package/esm2015/src/execution/noop-ngxs-execution-strategy.js +7 -19
- package/esm2015/src/execution/symbols.js +3 -32
- package/esm2015/src/internal/dispatcher.js +26 -121
- package/esm2015/src/internal/error-handler.js +18 -72
- package/esm2015/src/internal/internals.js +24 -244
- package/esm2015/src/internal/lifecycle-state-manager.js +19 -117
- package/esm2015/src/internal/state-context-factory.js +9 -67
- package/esm2015/src/internal/state-factory.js +42 -225
- package/esm2015/src/internal/state-operations.js +19 -80
- package/esm2015/src/internal/state-operators.js +6 -20
- package/esm2015/src/internal/state-stream.js +7 -13
- package/esm2015/src/ivy/ivy-enabled-in-dev-mode.js +7 -17
- package/esm2015/src/module.js +12 -47
- package/esm2015/src/modules/ngxs-feature.module.js +18 -36
- package/esm2015/src/modules/ngxs-root.module.js +18 -26
- package/esm2015/src/operators/leave-ngxs.js +8 -43
- package/esm2015/src/operators/of-action.js +16 -111
- package/esm2015/src/plugin-manager.js +17 -50
- package/esm2015/src/plugin_api.js +1 -5
- package/esm2015/src/private_api.js +3 -0
- package/esm2015/src/public_api.js +1 -5
- package/esm2015/src/public_to_deprecate.js +1 -51
- package/esm2015/src/state-token/state-token.js +4 -32
- package/esm2015/src/state-token/symbols.js +2 -5
- package/esm2015/src/store.js +20 -104
- package/esm2015/src/symbols.js +7 -177
- package/esm2015/src/utils/compose.js +5 -23
- package/esm2015/src/utils/freeze.js +5 -20
- package/esm2015/src/utils/selector-utils.js +23 -136
- package/esm2015/src/utils/store-validators.js +3 -36
- package/esm2015/src/utils/utils.js +13 -64
- package/fesm2015/ngxs-store-internals-testing.js +38 -159
- package/fesm2015/ngxs-store-internals-testing.js.map +1 -1
- package/fesm2015/ngxs-store-internals.js +18 -100
- package/fesm2015/ngxs-store-internals.js.map +1 -1
- package/fesm2015/ngxs-store-operators.js +53 -186
- package/fesm2015/ngxs-store-operators.js.map +1 -1
- package/fesm2015/ngxs-store.js +400 -2473
- package/fesm2015/ngxs-store.js.map +1 -1
- package/index.d.ts +4 -0
- package/internals/index.d.ts +1 -1
- package/internals/internal-tokens.d.ts +2 -8
- package/internals/ngxs-bootstrapper.d.ts +4 -1
- package/internals/ngxs-store-internals.d.ts +1 -0
- package/internals/package.json +2 -5
- package/internals/testing/helpers/ngxs-test.component.d.ts +3 -0
- package/internals/testing/helpers/ngxs-test.module.d.ts +6 -0
- package/internals/testing/ngxs-store-internals-testing.d.ts +1 -0
- package/internals/testing/package.json +2 -5
- package/ngxs-store.d.ts +1 -18
- package/operators/index.d.ts +2 -2
- package/operators/ngxs-store-operators.d.ts +1 -0
- package/operators/package.json +2 -5
- package/operators/patch.d.ts +2 -2
- package/operators/types.d.ts +6 -3
- package/package.json +3 -6
- package/src/actions/actions.d.ts +2 -2
- package/src/actions-stream.d.ts +5 -0
- package/src/decorators/select/select-factory.d.ts +3 -0
- package/src/decorators/state.d.ts +1 -1
- package/src/dev-features/ngxs-development.module.d.ts +4 -0
- package/src/dev-features/ngxs-unhandled-actions-logger.d.ts +3 -0
- package/src/execution/dispatch-outside-zone-ngxs-execution-strategy.d.ts +3 -0
- package/src/execution/internal-ngxs-execution-strategy.d.ts +3 -0
- package/src/execution/noop-ngxs-execution-strategy.d.ts +3 -0
- package/src/internal/dispatcher.d.ts +5 -0
- package/src/internal/error-handler.d.ts +4 -1
- package/src/internal/lifecycle-state-manager.d.ts +3 -0
- package/src/internal/state-context-factory.d.ts +3 -0
- package/src/internal/state-factory.d.ts +7 -4
- package/src/internal/state-operations.d.ts +3 -0
- package/src/internal/state-stream.d.ts +3 -0
- package/src/module.d.ts +4 -0
- package/src/modules/ngxs-feature.module.d.ts +4 -0
- package/src/modules/ngxs-root.module.d.ts +4 -0
- package/src/plugin-manager.d.ts +4 -1
- package/src/private_api.d.ts +2 -0
- package/src/store.d.ts +3 -0
- package/src/symbols.d.ts +4 -1
- package/src/utils/utils.d.ts +1 -1
- package/bundles/ngxs-store-internals-testing.umd.min.js +0 -16
- package/bundles/ngxs-store-internals-testing.umd.min.js.map +0 -1
- package/bundles/ngxs-store-internals.umd.min.js +0 -2
- package/bundles/ngxs-store-internals.umd.min.js.map +0 -1
- package/bundles/ngxs-store-operators.umd.min.js +0 -16
- package/bundles/ngxs-store-operators.umd.min.js.map +0 -1
- package/bundles/ngxs-store.umd.min.js +0 -16
- package/bundles/ngxs-store.umd.min.js.map +0 -1
- package/esm5/index.js +0 -13
- package/esm5/internals/angular.js +0 -20
- package/esm5/internals/index.js +0 -10
- package/esm5/internals/initial-state.js +0 -45
- package/esm5/internals/internal-tokens.js +0 -16
- package/esm5/internals/memoize.js +0 -71
- package/esm5/internals/ngxs-bootstrapper.js +0 -56
- package/esm5/internals/ngxs-store-internals.js +0 -9
- package/esm5/internals/src/symbols.js +0 -14
- package/esm5/internals/symbols.js +0 -14
- package/esm5/internals/testing/fresh-platform.js +0 -121
- package/esm5/internals/testing/helpers/ngxs-test.component.js +0 -32
- package/esm5/internals/testing/helpers/ngxs-test.module.js +0 -32
- package/esm5/internals/testing/index.js +0 -8
- package/esm5/internals/testing/ngxs-store-internals-testing.js +0 -9
- package/esm5/internals/testing/ngxs.setup.js +0 -98
- package/esm5/internals/testing/skip-console-logging.js +0 -62
- package/esm5/internals/testing/symbol.js +0 -29
- package/esm5/ngxs-store.js +0 -26
- package/esm5/operators/append.js +0 -31
- package/esm5/operators/compose.js +0 -28
- package/esm5/operators/iif.js +0 -56
- package/esm5/operators/index.js +0 -18
- package/esm5/operators/insert-item.js +0 -41
- package/esm5/operators/ngxs-store-operators.js +0 -9
- package/esm5/operators/patch.js +0 -39
- package/esm5/operators/remove-item.js +0 -34
- package/esm5/operators/types.js +0 -5
- package/esm5/operators/update-item.js +0 -54
- package/esm5/operators/utils.js +0 -50
- package/esm5/src/actions/actions.js +0 -62
- package/esm5/src/actions/symbols.js +0 -39
- package/esm5/src/actions-stream.js +0 -201
- package/esm5/src/configs/messages.config.js +0 -79
- package/esm5/src/decorators/action.js +0 -60
- package/esm5/src/decorators/select/select-factory.js +0 -46
- package/esm5/src/decorators/select/select.js +0 -50
- package/esm5/src/decorators/select/symbols.js +0 -51
- package/esm5/src/decorators/selector/selector.js +0 -59
- package/esm5/src/decorators/selector/symbols.js +0 -5
- package/esm5/src/decorators/selector-options.js +0 -34
- package/esm5/src/decorators/state.js +0 -78
- package/esm5/src/dev-features/ngxs-development.module.js +0 -34
- package/esm5/src/dev-features/ngxs-unhandled-actions-logger.js +0 -100
- package/esm5/src/dev-features/symbols.js +0 -22
- package/esm5/src/execution/dispatch-outside-zone-ngxs-execution-strategy.js +0 -123
- package/esm5/src/execution/internal-ngxs-execution-strategy.js +0 -54
- package/esm5/src/execution/noop-ngxs-execution-strategy.js +0 -43
- package/esm5/src/execution/symbols.js +0 -52
- package/esm5/src/internal/dispatcher.js +0 -231
- package/esm5/src/internal/error-handler.js +0 -125
- package/esm5/src/internal/internals.js +0 -470
- package/esm5/src/internal/lifecycle-state-manager.js +0 -224
- package/esm5/src/internal/state-context-factory.js +0 -135
- package/esm5/src/internal/state-factory.js +0 -599
- package/esm5/src/internal/state-operations.js +0 -134
- package/esm5/src/internal/state-operators.js +0 -34
- package/esm5/src/internal/state-stream.js +0 -37
- package/esm5/src/ivy/ivy-enabled-in-dev-mode.js +0 -28
- package/esm5/src/module.js +0 -202
- package/esm5/src/modules/ngxs-feature.module.js +0 -65
- package/esm5/src/modules/ngxs-root.module.js +0 -44
- package/esm5/src/operators/leave-ngxs.js +0 -58
- package/esm5/src/operators/of-action.js +0 -223
- package/esm5/src/plugin-manager.js +0 -82
- package/esm5/src/plugin_api.js +0 -10
- package/esm5/src/public_api.js +0 -31
- package/esm5/src/public_to_deprecate.js +0 -64
- package/esm5/src/state-token/state-token.js +0 -57
- package/esm5/src/state-token/symbols.js +0 -5
- package/esm5/src/store.js +0 -241
- package/esm5/src/symbols.js +0 -230
- package/esm5/src/utils/compose.js +0 -55
- package/esm5/src/utils/freeze.js +0 -35
- package/esm5/src/utils/selector-utils.js +0 -230
- package/esm5/src/utils/store-validators.js +0 -78
- package/esm5/src/utils/utils.js +0 -151
- package/fesm5/ngxs-store-internals-testing.js +0 -345
- package/fesm5/ngxs-store-internals-testing.js.map +0 -1
- package/fesm5/ngxs-store-internals.js +0 -217
- package/fesm5/ngxs-store-internals.js.map +0 -1
- package/fesm5/ngxs-store-operators.js +0 -341
- package/fesm5/ngxs-store-operators.js.map +0 -1
- package/fesm5/ngxs-store.js +0 -4783
- package/fesm5/ngxs-store.js.map +0 -1
- package/internals/ngxs-store-internals.metadata.json +0 -1
- package/internals/testing/ngxs-store-internals-testing.metadata.json +0 -1
- package/ngxs-store.metadata.json +0 -1
- package/operators/ngxs-store-operators.metadata.json +0 -1
- package/types/index.d.ts +0 -2
|
@@ -1,506 +1,167 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
2
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
|
3
3
|
typeof define === 'function' && define.amd ? define('@ngxs/store/operators', ['exports'], factory) :
|
|
4
|
-
(global = global || self, factory((global.ngxs = global.ngxs || {}, global.ngxs.store = global.ngxs.store || {}, global.ngxs.store.operators = {})));
|
|
5
|
-
}(this, function (exports) { 'use strict';
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.ngxs = global.ngxs || {}, global.ngxs.store = global.ngxs.store || {}, global.ngxs.store.operators = {})));
|
|
5
|
+
})(this, (function (exports) { 'use strict';
|
|
6
6
|
|
|
7
|
-
/*! *****************************************************************************
|
|
8
|
-
Copyright (c) Microsoft Corporation.
|
|
9
|
-
|
|
10
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
11
|
-
purpose with or without fee is hereby granted.
|
|
12
|
-
|
|
13
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
14
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
15
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
16
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
17
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
18
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
19
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
20
|
-
***************************************************************************** */
|
|
21
|
-
/* global Reflect, Promise */
|
|
22
|
-
|
|
23
|
-
var extendStatics = function(d, b) {
|
|
24
|
-
extendStatics = Object.setPrototypeOf ||
|
|
25
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
26
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
27
|
-
return extendStatics(d, b);
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
function __extends(d, b) {
|
|
31
|
-
extendStatics(d, b);
|
|
32
|
-
function __() { this.constructor = d; }
|
|
33
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
var __assign = function() {
|
|
37
|
-
__assign = Object.assign || function __assign(t) {
|
|
38
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
39
|
-
s = arguments[i];
|
|
40
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
41
|
-
}
|
|
42
|
-
return t;
|
|
43
|
-
};
|
|
44
|
-
return __assign.apply(this, arguments);
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
function __rest(s, e) {
|
|
48
|
-
var t = {};
|
|
49
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
50
|
-
t[p] = s[p];
|
|
51
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
52
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
53
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
54
|
-
t[p[i]] = s[p[i]];
|
|
55
|
-
}
|
|
56
|
-
return t;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
function __decorate(decorators, target, key, desc) {
|
|
60
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
61
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
62
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
63
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
function __param(paramIndex, decorator) {
|
|
67
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
function __metadata(metadataKey, metadataValue) {
|
|
71
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
|
75
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
76
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
77
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
78
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
79
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
80
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
function __generator(thisArg, body) {
|
|
85
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
86
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
87
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
88
|
-
function step(op) {
|
|
89
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
90
|
-
while (_) try {
|
|
91
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
92
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
93
|
-
switch (op[0]) {
|
|
94
|
-
case 0: case 1: t = op; break;
|
|
95
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
96
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
97
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
98
|
-
default:
|
|
99
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
100
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
101
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
102
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
103
|
-
if (t[2]) _.ops.pop();
|
|
104
|
-
_.trys.pop(); continue;
|
|
105
|
-
}
|
|
106
|
-
op = body.call(thisArg, _);
|
|
107
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
108
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
function __createBinding(o, m, k, k2) {
|
|
113
|
-
if (k2 === undefined) k2 = k;
|
|
114
|
-
o[k2] = m[k];
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
function __exportStar(m, exports) {
|
|
118
|
-
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) exports[p] = m[p];
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
function __values(o) {
|
|
122
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
123
|
-
if (m) return m.call(o);
|
|
124
|
-
if (o && typeof o.length === "number") return {
|
|
125
|
-
next: function () {
|
|
126
|
-
if (o && i >= o.length) o = void 0;
|
|
127
|
-
return { value: o && o[i++], done: !o };
|
|
128
|
-
}
|
|
129
|
-
};
|
|
130
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
function __read(o, n) {
|
|
134
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
135
|
-
if (!m) return o;
|
|
136
|
-
var i = m.call(o), r, ar = [], e;
|
|
137
|
-
try {
|
|
138
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
139
|
-
}
|
|
140
|
-
catch (error) { e = { error: error }; }
|
|
141
|
-
finally {
|
|
142
|
-
try {
|
|
143
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
144
|
-
}
|
|
145
|
-
finally { if (e) throw e.error; }
|
|
146
|
-
}
|
|
147
|
-
return ar;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
function __spread() {
|
|
151
|
-
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
152
|
-
ar = ar.concat(__read(arguments[i]));
|
|
153
|
-
return ar;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
function __spreadArrays() {
|
|
157
|
-
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
|
|
158
|
-
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
159
|
-
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
160
|
-
r[k] = a[j];
|
|
161
|
-
return r;
|
|
162
|
-
};
|
|
163
|
-
|
|
164
|
-
function __await(v) {
|
|
165
|
-
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
function __asyncGenerator(thisArg, _arguments, generator) {
|
|
169
|
-
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
170
|
-
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
171
|
-
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
172
|
-
function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
|
173
|
-
function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
|
|
174
|
-
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
175
|
-
function fulfill(value) { resume("next", value); }
|
|
176
|
-
function reject(value) { resume("throw", value); }
|
|
177
|
-
function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
function __asyncDelegator(o) {
|
|
181
|
-
var i, p;
|
|
182
|
-
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
|
183
|
-
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
function __asyncValues(o) {
|
|
187
|
-
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
188
|
-
var m = o[Symbol.asyncIterator], i;
|
|
189
|
-
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
|
190
|
-
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
|
191
|
-
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
function __makeTemplateObject(cooked, raw) {
|
|
195
|
-
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
196
|
-
return cooked;
|
|
197
|
-
};
|
|
198
|
-
|
|
199
|
-
function __importStar(mod) {
|
|
200
|
-
if (mod && mod.__esModule) return mod;
|
|
201
|
-
var result = {};
|
|
202
|
-
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
|
203
|
-
result.default = mod;
|
|
204
|
-
return result;
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
function __importDefault(mod) {
|
|
208
|
-
return (mod && mod.__esModule) ? mod : { default: mod };
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
function __classPrivateFieldGet(receiver, privateMap) {
|
|
212
|
-
if (!privateMap.has(receiver)) {
|
|
213
|
-
throw new TypeError("attempted to get private field on non-instance");
|
|
214
|
-
}
|
|
215
|
-
return privateMap.get(receiver);
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
function __classPrivateFieldSet(receiver, privateMap, value) {
|
|
219
|
-
if (!privateMap.has(receiver)) {
|
|
220
|
-
throw new TypeError("attempted to set private field on non-instance");
|
|
221
|
-
}
|
|
222
|
-
privateMap.set(receiver, value);
|
|
223
|
-
return value;
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
/**
|
|
227
|
-
* @fileoverview added by tsickle
|
|
228
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
229
|
-
*/
|
|
230
7
|
/**
|
|
231
|
-
* @
|
|
232
|
-
* @param {?} items - Specific items to append to the end of an array
|
|
233
|
-
* @return {?}
|
|
8
|
+
* @param items - Specific items to append to the end of an array
|
|
234
9
|
*/
|
|
235
10
|
function append(items) {
|
|
236
|
-
return (
|
|
237
|
-
* @param {?} existing
|
|
238
|
-
* @return {?}
|
|
239
|
-
*/
|
|
240
|
-
function appendOperator(existing) {
|
|
11
|
+
return function appendOperator(existing) {
|
|
241
12
|
// If `items` is `undefined` or `null` or `[]` but `existing` is provided
|
|
242
13
|
// just return `existing`
|
|
243
|
-
/** @type {?} */
|
|
244
14
|
var itemsNotProvidedButExistingIs = (!items || !items.length) && existing;
|
|
245
15
|
if (itemsNotProvidedButExistingIs) {
|
|
246
|
-
return
|
|
16
|
+
return existing;
|
|
247
17
|
}
|
|
248
18
|
if (Array.isArray(existing)) {
|
|
249
|
-
return existing.concat(
|
|
19
|
+
return existing.concat(items);
|
|
250
20
|
}
|
|
251
21
|
// For example if some property is added dynamically
|
|
252
22
|
// and didn't exist before thus it's not `ArrayLike`
|
|
253
|
-
return
|
|
254
|
-
}
|
|
23
|
+
return items;
|
|
24
|
+
};
|
|
255
25
|
}
|
|
256
26
|
|
|
257
|
-
/**
|
|
258
|
-
* @fileoverview added by tsickle
|
|
259
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
260
|
-
*/
|
|
261
|
-
/**
|
|
262
|
-
* @template T
|
|
263
|
-
* @param {...?} operators
|
|
264
|
-
* @return {?}
|
|
265
|
-
*/
|
|
266
27
|
function compose() {
|
|
267
28
|
var operators = [];
|
|
268
29
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
269
30
|
operators[_i] = arguments[_i];
|
|
270
31
|
}
|
|
271
|
-
return (
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
*/
|
|
275
|
-
function composeOperator(existing) {
|
|
276
|
-
return operators.reduce((/**
|
|
277
|
-
* @param {?} accumulator
|
|
278
|
-
* @param {?} operator
|
|
279
|
-
* @return {?}
|
|
280
|
-
*/
|
|
281
|
-
function (accumulator, operator) { return operator((/** @type {?} */ (accumulator))); }), (/** @type {?} */ (existing)));
|
|
282
|
-
});
|
|
32
|
+
return function composeOperator(existing) {
|
|
33
|
+
return operators.reduce(function (accumulator, operator) { return operator(accumulator); }, existing);
|
|
34
|
+
};
|
|
283
35
|
}
|
|
284
36
|
|
|
285
|
-
/**
|
|
286
|
-
* @fileoverview added by tsickle
|
|
287
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
288
|
-
*/
|
|
289
|
-
/**
|
|
290
|
-
* @template T
|
|
291
|
-
* @param {?} value
|
|
292
|
-
* @return {?}
|
|
293
|
-
*/
|
|
294
37
|
function isStateOperator(value) {
|
|
295
38
|
return typeof value === 'function';
|
|
296
39
|
}
|
|
297
|
-
/**
|
|
298
|
-
* @param {?} value
|
|
299
|
-
* @return {?}
|
|
300
|
-
*/
|
|
301
40
|
function isUndefined(value) {
|
|
302
41
|
return typeof value === 'undefined';
|
|
303
42
|
}
|
|
304
|
-
/**
|
|
305
|
-
* @template T
|
|
306
|
-
* @param {?} value
|
|
307
|
-
* @return {?}
|
|
308
|
-
*/
|
|
309
43
|
function isPredicate(value) {
|
|
310
44
|
return typeof value === 'function';
|
|
311
45
|
}
|
|
312
|
-
/**
|
|
313
|
-
* @param {?} value
|
|
314
|
-
* @return {?}
|
|
315
|
-
*/
|
|
316
46
|
function isNumber(value) {
|
|
317
47
|
return typeof value === 'number';
|
|
318
48
|
}
|
|
319
|
-
/**
|
|
320
|
-
* @param {?} index
|
|
321
|
-
* @return {?}
|
|
322
|
-
*/
|
|
323
49
|
function invalidIndex(index) {
|
|
324
50
|
return Number.isNaN(index) || index === -1;
|
|
325
51
|
}
|
|
326
|
-
/**
|
|
327
|
-
* @template T
|
|
328
|
-
* @param {?} value
|
|
329
|
-
* @return {?}
|
|
330
|
-
*/
|
|
331
52
|
function isNil(value) {
|
|
332
53
|
return value === null || isUndefined(value);
|
|
333
54
|
}
|
|
334
55
|
|
|
335
|
-
/**
|
|
336
|
-
* @fileoverview added by tsickle
|
|
337
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
338
|
-
*/
|
|
339
|
-
/**
|
|
340
|
-
* @template T
|
|
341
|
-
* @param {?} operatorOrValue
|
|
342
|
-
* @param {?} existing
|
|
343
|
-
* @return {?}
|
|
344
|
-
*/
|
|
345
56
|
function retrieveValue(operatorOrValue, existing) {
|
|
346
57
|
// If state operator is a function
|
|
347
58
|
// then call it with an original value
|
|
348
59
|
if (isStateOperator(operatorOrValue)) {
|
|
349
|
-
/** @type {?} */
|
|
350
60
|
var value = operatorOrValue(existing);
|
|
351
|
-
return
|
|
61
|
+
return value;
|
|
352
62
|
}
|
|
353
63
|
// If operator or value was not provided
|
|
354
64
|
// e.g. `elseOperatorOrValue` is `undefined`
|
|
355
65
|
// then we just return an original value
|
|
356
66
|
if (isUndefined(operatorOrValue)) {
|
|
357
|
-
return
|
|
67
|
+
return existing;
|
|
358
68
|
}
|
|
359
|
-
return
|
|
69
|
+
return operatorOrValue;
|
|
360
70
|
}
|
|
361
71
|
/**
|
|
362
|
-
* @
|
|
363
|
-
* @param {?} condition - Condition can be a plain boolean value or a function,
|
|
72
|
+
* @param condition - Condition can be a plain boolean value or a function,
|
|
364
73
|
* that returns boolean, also this function can take a value as an argument
|
|
365
74
|
* to which this state operator applies
|
|
366
|
-
* @param
|
|
367
|
-
* @param
|
|
368
|
-
* @return {?}
|
|
75
|
+
* @param trueOperatorOrValue - Any value or a state operator
|
|
76
|
+
* @param elseOperatorOrValue - Any value or a state operator
|
|
369
77
|
*/
|
|
370
78
|
function iif(condition, trueOperatorOrValue, elseOperatorOrValue) {
|
|
371
|
-
return (
|
|
372
|
-
* @param {?} existing
|
|
373
|
-
* @return {?}
|
|
374
|
-
*/
|
|
375
|
-
function iifOperator(existing) {
|
|
79
|
+
return function iifOperator(existing) {
|
|
376
80
|
// Convert the value to a boolean
|
|
377
|
-
/** @type {?} */
|
|
378
81
|
var result = !!condition;
|
|
379
82
|
// but if it is a function then run it to get the result
|
|
380
83
|
if (isPredicate(condition)) {
|
|
381
|
-
result = condition(
|
|
84
|
+
result = condition(existing);
|
|
382
85
|
}
|
|
383
86
|
if (result) {
|
|
384
|
-
return retrieveValue(
|
|
87
|
+
return retrieveValue(trueOperatorOrValue, existing);
|
|
385
88
|
}
|
|
386
|
-
return retrieveValue(
|
|
387
|
-
}
|
|
89
|
+
return retrieveValue(elseOperatorOrValue, existing);
|
|
90
|
+
};
|
|
388
91
|
}
|
|
389
92
|
|
|
390
93
|
/**
|
|
391
|
-
* @
|
|
392
|
-
* @
|
|
393
|
-
*/
|
|
394
|
-
/**
|
|
395
|
-
* @template T
|
|
396
|
-
* @param {?} value - Value to insert
|
|
397
|
-
* @param {?=} beforePosition
|
|
398
|
-
* @return {?}
|
|
94
|
+
* @param value - Value to insert
|
|
95
|
+
* @param [beforePosition] - Specified index to insert value before, optional
|
|
399
96
|
*/
|
|
400
97
|
function insertItem(value, beforePosition) {
|
|
401
|
-
return (
|
|
402
|
-
* @param {?} existing
|
|
403
|
-
* @return {?}
|
|
404
|
-
*/
|
|
405
|
-
function insertItemOperator(existing) {
|
|
98
|
+
return function insertItemOperator(existing) {
|
|
406
99
|
// Have to check explicitly for `null` and `undefined`
|
|
407
100
|
// because `value` can be `0`, thus `!value` will return `true`
|
|
408
101
|
if (isNil(value) && existing) {
|
|
409
|
-
return
|
|
102
|
+
return existing;
|
|
410
103
|
}
|
|
411
104
|
// Property may be dynamic and might not existed before
|
|
412
105
|
if (!Array.isArray(existing)) {
|
|
413
|
-
return [
|
|
106
|
+
return [value];
|
|
414
107
|
}
|
|
415
|
-
/** @type {?} */
|
|
416
108
|
var clone = existing.slice();
|
|
417
|
-
/** @type {?} */
|
|
418
109
|
var index = 0;
|
|
419
110
|
// No need to call `isNumber`
|
|
420
111
|
// as we are checking `> 0` not `>= 0`
|
|
421
112
|
// everything except number will return false here
|
|
422
|
-
if (
|
|
423
|
-
index =
|
|
113
|
+
if (beforePosition > 0) {
|
|
114
|
+
index = beforePosition;
|
|
424
115
|
}
|
|
425
|
-
clone.splice(index, 0,
|
|
116
|
+
clone.splice(index, 0, value);
|
|
426
117
|
return clone;
|
|
427
|
-
}
|
|
118
|
+
};
|
|
428
119
|
}
|
|
429
120
|
|
|
430
|
-
/**
|
|
431
|
-
* @fileoverview added by tsickle
|
|
432
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
433
|
-
*/
|
|
434
|
-
/**
|
|
435
|
-
* @template T
|
|
436
|
-
* @param {?} patchObject
|
|
437
|
-
* @return {?}
|
|
438
|
-
*/
|
|
439
121
|
function patch(patchObject) {
|
|
440
|
-
return (
|
|
441
|
-
* @param {?} existing
|
|
442
|
-
* @return {?}
|
|
443
|
-
*/
|
|
444
|
-
function patchStateOperator(existing) {
|
|
445
|
-
/** @type {?} */
|
|
122
|
+
return function patchStateOperator(existing) {
|
|
446
123
|
var clone = null;
|
|
447
124
|
for (var k in patchObject) {
|
|
448
|
-
/** @type {?} */
|
|
449
125
|
var newValue = patchObject[k];
|
|
450
|
-
/** @type {?} */
|
|
451
126
|
var existingPropValue = existing[k];
|
|
452
|
-
/** @type {?} */
|
|
453
127
|
var newPropValue = isStateOperator(newValue)
|
|
454
|
-
? newValue(
|
|
128
|
+
? newValue(existingPropValue)
|
|
455
129
|
: newValue;
|
|
456
130
|
if (newPropValue !== existingPropValue) {
|
|
457
131
|
if (!clone) {
|
|
458
|
-
clone =
|
|
132
|
+
clone = Object.assign({}, existing);
|
|
459
133
|
}
|
|
460
134
|
clone[k] = newPropValue;
|
|
461
135
|
}
|
|
462
136
|
}
|
|
463
137
|
return clone || existing;
|
|
464
|
-
}
|
|
138
|
+
};
|
|
465
139
|
}
|
|
466
140
|
|
|
467
141
|
/**
|
|
468
|
-
* @
|
|
469
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
470
|
-
*/
|
|
471
|
-
/**
|
|
472
|
-
* @template T
|
|
473
|
-
* @param {?} selector - Index of item in the array or a predicate function
|
|
142
|
+
* @param selector - Index of item in the array or a predicate function
|
|
474
143
|
* that can be provided in `Array.prototype.findIndex`
|
|
475
|
-
* @param
|
|
144
|
+
* @param operatorOrValue - New value under the `selector` index or a
|
|
476
145
|
* function that can be applied to an existing value
|
|
477
|
-
* @return {?}
|
|
478
146
|
*/
|
|
479
147
|
function updateItem(selector, operatorOrValue) {
|
|
480
|
-
return (
|
|
481
|
-
* @param {?} existing
|
|
482
|
-
* @return {?}
|
|
483
|
-
*/
|
|
484
|
-
function updateItemOperator(existing) {
|
|
485
|
-
/** @type {?} */
|
|
148
|
+
return function updateItemOperator(existing) {
|
|
486
149
|
var index = -1;
|
|
487
150
|
if (isPredicate(selector)) {
|
|
488
|
-
index = existing.findIndex(
|
|
151
|
+
index = existing.findIndex(selector);
|
|
489
152
|
}
|
|
490
153
|
else if (isNumber(selector)) {
|
|
491
154
|
index = selector;
|
|
492
155
|
}
|
|
493
156
|
if (invalidIndex(index)) {
|
|
494
|
-
return
|
|
157
|
+
return existing;
|
|
495
158
|
}
|
|
496
|
-
|
|
497
|
-
var value = (/** @type {?} */ (null));
|
|
159
|
+
var value = null;
|
|
498
160
|
// Need to check if the new item value will change the existing item value
|
|
499
161
|
// then, only if it will change it then clone the array and set the item
|
|
500
|
-
|
|
501
|
-
var theOperatorOrValue = (/** @type {?} */ (operatorOrValue));
|
|
162
|
+
var theOperatorOrValue = operatorOrValue;
|
|
502
163
|
if (isStateOperator(theOperatorOrValue)) {
|
|
503
|
-
value = theOperatorOrValue(
|
|
164
|
+
value = theOperatorOrValue(existing[index]);
|
|
504
165
|
}
|
|
505
166
|
else {
|
|
506
167
|
value = theOperatorOrValue;
|
|
@@ -508,31 +169,19 @@
|
|
|
508
169
|
// If the value hasn't been mutated
|
|
509
170
|
// then we just return `existing` array
|
|
510
171
|
if (value === existing[index]) {
|
|
511
|
-
return
|
|
172
|
+
return existing;
|
|
512
173
|
}
|
|
513
|
-
/** @type {?} */
|
|
514
174
|
var clone = existing.slice();
|
|
515
|
-
clone[index] =
|
|
175
|
+
clone[index] = value;
|
|
516
176
|
return clone;
|
|
517
|
-
}
|
|
177
|
+
};
|
|
518
178
|
}
|
|
519
179
|
|
|
520
180
|
/**
|
|
521
|
-
* @
|
|
522
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
523
|
-
*/
|
|
524
|
-
/**
|
|
525
|
-
* @template T
|
|
526
|
-
* @param {?} selector - index or predicate to remove an item from an array by
|
|
527
|
-
* @return {?}
|
|
181
|
+
* @param selector - index or predicate to remove an item from an array by
|
|
528
182
|
*/
|
|
529
183
|
function removeItem(selector) {
|
|
530
|
-
return (
|
|
531
|
-
* @param {?} existing
|
|
532
|
-
* @return {?}
|
|
533
|
-
*/
|
|
534
|
-
function removeItemOperator(existing) {
|
|
535
|
-
/** @type {?} */
|
|
184
|
+
return function removeItemOperator(existing) {
|
|
536
185
|
var index = -1;
|
|
537
186
|
if (isPredicate(selector)) {
|
|
538
187
|
index = existing.findIndex(selector);
|
|
@@ -541,19 +190,29 @@
|
|
|
541
190
|
index = selector;
|
|
542
191
|
}
|
|
543
192
|
if (invalidIndex(index)) {
|
|
544
|
-
return
|
|
193
|
+
return existing;
|
|
545
194
|
}
|
|
546
|
-
/** @type {?} */
|
|
547
195
|
var clone = existing.slice();
|
|
548
196
|
clone.splice(index, 1);
|
|
549
197
|
return clone;
|
|
550
|
-
}
|
|
198
|
+
};
|
|
551
199
|
}
|
|
552
200
|
|
|
201
|
+
/**
|
|
202
|
+
* @module
|
|
203
|
+
* @description
|
|
204
|
+
* Entry point for all public APIs of this package.
|
|
205
|
+
*/
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* Generated bundle index. Do not edit.
|
|
209
|
+
*/
|
|
210
|
+
|
|
553
211
|
exports.append = append;
|
|
554
212
|
exports.compose = compose;
|
|
555
213
|
exports.iif = iif;
|
|
556
214
|
exports.insertItem = insertItem;
|
|
215
|
+
exports.isPredicate = isPredicate;
|
|
557
216
|
exports.isStateOperator = isStateOperator;
|
|
558
217
|
exports.patch = patch;
|
|
559
218
|
exports.removeItem = removeItem;
|