@ngrx/entity 11.0.0-rc.0 → 11.1.1
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/ngrx-entity.umd.js +39 -637
- package/bundles/ngrx-entity.umd.js.map +1 -1
- package/bundles/ngrx-entity.umd.min.js +1 -1
- package/bundles/ngrx-entity.umd.min.js.map +1 -1
- package/esm2015/index.js +2 -7
- package/esm2015/ngrx-entity.js +2 -7
- package/esm2015/public_api.js +2 -7
- package/esm2015/src/create_adapter.js +2 -19
- package/esm2015/src/entity_state.js +1 -18
- package/esm2015/src/index.js +1 -6
- package/esm2015/src/models.js +1 -245
- package/esm2015/src/sorted_state_adapter.js +11 -139
- package/esm2015/src/state_adapter.js +9 -31
- package/esm2015/src/state_selectors.js +5 -43
- package/esm2015/src/unsorted_state_adapter.js +11 -151
- package/esm2015/src/utils.js +1 -13
- package/fesm2015/ngrx-entity.js +37 -668
- package/fesm2015/ngrx-entity.js.map +1 -1
- package/package.json +3 -3
- package/schematics-core/index.js +4 -1
- package/schematics-core/index.js.map +1 -1
- package/schematics-core/utility/ast-utils.js +127 -1
- package/schematics-core/utility/ast-utils.js.map +1 -1
- package/schematics-core/utility/config.js +1 -1
- package/schematics-core/utility/config.js.map +1 -1
- package/schematics-core/utility/find-component.js +101 -0
- package/schematics-core/utility/find-component.js.map +1 -0
- package/schematics-core/utility/libs-version.js +1 -1
- package/schematics-core/utility/libs-version.js.map +1 -1
- package/schematics-core/utility/project.js +4 -2
- package/schematics-core/utility/project.js.map +1 -1
- package/CHANGELOG.md +0 -3
- package/esm2015/index.ngsummary.json +0 -1
- package/esm2015/ngrx-entity.ngsummary.json +0 -1
- package/esm2015/public_api.ngsummary.json +0 -1
- package/esm2015/src/create_adapter.ngsummary.json +0 -1
- package/esm2015/src/entity_state.ngsummary.json +0 -1
- package/esm2015/src/index.ngsummary.json +0 -1
- package/esm2015/src/models.ngsummary.json +0 -1
- package/esm2015/src/sorted_state_adapter.ngsummary.json +0 -1
- package/esm2015/src/state_adapter.ngsummary.json +0 -1
- package/esm2015/src/state_selectors.ngsummary.json +0 -1
- package/esm2015/src/unsorted_state_adapter.ngsummary.json +0 -1
- package/esm2015/src/utils.ngsummary.json +0 -1
|
@@ -1,33 +1,16 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
2
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@ngrx/store'), require('@angular/core')) :
|
|
3
3
|
typeof define === 'function' && define.amd ? define('@ngrx/entity', ['exports', '@ngrx/store', '@angular/core'], factory) :
|
|
4
|
-
(global = global || self, factory((global.ngrx = global.ngrx || {}, global.ngrx.entity = {}), global.ngrx.store, global.ng.core));
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.ngrx = global.ngrx || {}, global.ngrx.entity = {}), global.ngrx.store, global.ng.core));
|
|
5
5
|
}(this, (function (exports, store, core) { 'use strict';
|
|
6
6
|
|
|
7
|
-
/**
|
|
8
|
-
* @fileoverview added by tsickle
|
|
9
|
-
* Generated from: src/entity_state.ts
|
|
10
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
11
|
-
*/
|
|
12
|
-
/**
|
|
13
|
-
* @template V
|
|
14
|
-
* @return {?}
|
|
15
|
-
*/
|
|
16
7
|
function getInitialEntityState() {
|
|
17
8
|
return {
|
|
18
9
|
ids: [],
|
|
19
10
|
entities: {},
|
|
20
11
|
};
|
|
21
12
|
}
|
|
22
|
-
/**
|
|
23
|
-
* @template V
|
|
24
|
-
* @return {?}
|
|
25
|
-
*/
|
|
26
13
|
function createInitialStateFactory() {
|
|
27
|
-
/**
|
|
28
|
-
* @param {?=} additionalState
|
|
29
|
-
* @return {?}
|
|
30
|
-
*/
|
|
31
14
|
function getInitialState(additionalState) {
|
|
32
15
|
if (additionalState === void 0) { additionalState = {}; }
|
|
33
16
|
return Object.assign(getInitialEntityState(), additionalState);
|
|
@@ -35,45 +18,12 @@
|
|
|
35
18
|
return { getInitialState: getInitialState };
|
|
36
19
|
}
|
|
37
20
|
|
|
38
|
-
/**
|
|
39
|
-
* @fileoverview added by tsickle
|
|
40
|
-
* Generated from: src/state_selectors.ts
|
|
41
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
42
|
-
*/
|
|
43
|
-
/**
|
|
44
|
-
* @template T
|
|
45
|
-
* @return {?}
|
|
46
|
-
*/
|
|
47
21
|
function createSelectorsFactory() {
|
|
48
|
-
/**
|
|
49
|
-
* @param {?=} selectState
|
|
50
|
-
* @return {?}
|
|
51
|
-
*/
|
|
52
22
|
function getSelectors(selectState) {
|
|
53
|
-
|
|
54
|
-
var
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
*/function (state) { return state.ids; });
|
|
58
|
-
/** @type {?} */
|
|
59
|
-
var selectEntities = ( /**
|
|
60
|
-
* @param {?} state
|
|
61
|
-
* @return {?}
|
|
62
|
-
*/function (state) { return state.entities; });
|
|
63
|
-
/** @type {?} */
|
|
64
|
-
var selectAll = store.createSelector(selectIds, selectEntities, ( /**
|
|
65
|
-
* @param {?} ids
|
|
66
|
-
* @param {?} entities
|
|
67
|
-
* @return {?}
|
|
68
|
-
*/function (ids, entities) { return ids.map(( /**
|
|
69
|
-
* @param {?} id
|
|
70
|
-
* @return {?}
|
|
71
|
-
*/function (id) { return (( /** @type {?} */(entities)))[id]; })); }));
|
|
72
|
-
/** @type {?} */
|
|
73
|
-
var selectTotal = store.createSelector(selectIds, ( /**
|
|
74
|
-
* @param {?} ids
|
|
75
|
-
* @return {?}
|
|
76
|
-
*/function (ids) { return ids.length; }));
|
|
23
|
+
var selectIds = function (state) { return state.ids; };
|
|
24
|
+
var selectEntities = function (state) { return state.entities; };
|
|
25
|
+
var selectAll = store.createSelector(selectIds, selectEntities, function (ids, entities) { return ids.map(function (id) { return entities[id]; }); });
|
|
26
|
+
var selectTotal = store.createSelector(selectIds, function (ids) { return ids.length; });
|
|
77
27
|
if (!selectState) {
|
|
78
28
|
return {
|
|
79
29
|
selectIds: selectIds,
|
|
@@ -393,38 +343,18 @@
|
|
|
393
343
|
return value;
|
|
394
344
|
}
|
|
395
345
|
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
var DidMutate = {
|
|
403
|
-
EntitiesOnly: 0,
|
|
404
|
-
Both: 1,
|
|
405
|
-
None: 2,
|
|
406
|
-
};
|
|
407
|
-
DidMutate[DidMutate.EntitiesOnly] = 'EntitiesOnly';
|
|
408
|
-
DidMutate[DidMutate.Both] = 'Both';
|
|
409
|
-
DidMutate[DidMutate.None] = 'None';
|
|
410
|
-
/**
|
|
411
|
-
* @template V, R
|
|
412
|
-
* @param {?} mutator
|
|
413
|
-
* @return {?}
|
|
414
|
-
*/
|
|
346
|
+
var DidMutate;
|
|
347
|
+
(function (DidMutate) {
|
|
348
|
+
DidMutate[DidMutate["EntitiesOnly"] = 0] = "EntitiesOnly";
|
|
349
|
+
DidMutate[DidMutate["Both"] = 1] = "Both";
|
|
350
|
+
DidMutate[DidMutate["None"] = 2] = "None";
|
|
351
|
+
})(DidMutate || (DidMutate = {}));
|
|
415
352
|
function createStateOperator(mutator) {
|
|
416
|
-
return (
|
|
417
|
-
* @template S
|
|
418
|
-
* @param {?} arg
|
|
419
|
-
* @param {?} state
|
|
420
|
-
* @return {?}
|
|
421
|
-
*/function operation(arg, state) {
|
|
422
|
-
/** @type {?} */
|
|
353
|
+
return function operation(arg, state) {
|
|
423
354
|
var clonedEntityState = {
|
|
424
355
|
ids: __spread(state.ids),
|
|
425
356
|
entities: Object.assign({}, state.entities),
|
|
426
357
|
};
|
|
427
|
-
/** @type {?} */
|
|
428
358
|
var didMutate = mutator(arg, clonedEntityState);
|
|
429
359
|
if (didMutate === DidMutate.Both) {
|
|
430
360
|
return Object.assign({}, state, clonedEntityState);
|
|
@@ -433,22 +363,10 @@
|
|
|
433
363
|
return Object.assign(Object.assign({}, state), { entities: clonedEntityState.entities });
|
|
434
364
|
}
|
|
435
365
|
return state;
|
|
436
|
-
}
|
|
366
|
+
};
|
|
437
367
|
}
|
|
438
368
|
|
|
439
|
-
/**
|
|
440
|
-
* @fileoverview added by tsickle
|
|
441
|
-
* Generated from: src/utils.ts
|
|
442
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
443
|
-
*/
|
|
444
|
-
/**
|
|
445
|
-
* @template T
|
|
446
|
-
* @param {?} entity
|
|
447
|
-
* @param {?} selectId
|
|
448
|
-
* @return {?}
|
|
449
|
-
*/
|
|
450
369
|
function selectIdValue(entity, selectId) {
|
|
451
|
-
/** @type {?} */
|
|
452
370
|
var key = selectId(entity);
|
|
453
371
|
if (core.isDevMode() && key === undefined) {
|
|
454
372
|
console.warn('@ngrx/entity: The entity passed to the `selectId` implementation returned undefined.', 'You should probably provide your own `selectId` implementation.', 'The entity that was passed:', entity, 'The `selectId` implementation:', selectId.toString());
|
|
@@ -456,19 +374,8 @@
|
|
|
456
374
|
return key;
|
|
457
375
|
}
|
|
458
376
|
|
|
459
|
-
/**
|
|
460
|
-
* @template T
|
|
461
|
-
* @param {?} selectId
|
|
462
|
-
* @return {?}
|
|
463
|
-
*/
|
|
464
377
|
function createUnsortedStateAdapter(selectId) {
|
|
465
|
-
/**
|
|
466
|
-
* @param {?} entity
|
|
467
|
-
* @param {?} state
|
|
468
|
-
* @return {?}
|
|
469
|
-
*/
|
|
470
378
|
function addOneMutably(entity, state) {
|
|
471
|
-
/** @type {?} */
|
|
472
379
|
var key = selectIdValue(entity, selectId);
|
|
473
380
|
if (key in state.entities) {
|
|
474
381
|
return DidMutate.None;
|
|
@@ -477,14 +384,8 @@
|
|
|
477
384
|
state.entities[key] = entity;
|
|
478
385
|
return DidMutate.Both;
|
|
479
386
|
}
|
|
480
|
-
/**
|
|
481
|
-
* @param {?} entities
|
|
482
|
-
* @param {?} state
|
|
483
|
-
* @return {?}
|
|
484
|
-
*/
|
|
485
387
|
function addManyMutably(entities, state) {
|
|
486
388
|
var e_1, _a;
|
|
487
|
-
/** @type {?} */
|
|
488
389
|
var didMutate = false;
|
|
489
390
|
try {
|
|
490
391
|
for (var entities_1 = __values(entities), entities_1_1 = entities_1.next(); !entities_1_1.done; entities_1_1 = entities_1.next()) {
|
|
@@ -501,24 +402,13 @@
|
|
|
501
402
|
}
|
|
502
403
|
return didMutate ? DidMutate.Both : DidMutate.None;
|
|
503
404
|
}
|
|
504
|
-
/**
|
|
505
|
-
* @param {?} entities
|
|
506
|
-
* @param {?} state
|
|
507
|
-
* @return {?}
|
|
508
|
-
*/
|
|
509
405
|
function setAllMutably(entities, state) {
|
|
510
406
|
state.ids = [];
|
|
511
407
|
state.entities = {};
|
|
512
408
|
addManyMutably(entities, state);
|
|
513
409
|
return DidMutate.Both;
|
|
514
410
|
}
|
|
515
|
-
/**
|
|
516
|
-
* @param {?} entity
|
|
517
|
-
* @param {?} state
|
|
518
|
-
* @return {?}
|
|
519
|
-
*/
|
|
520
411
|
function setOneMutably(entity, state) {
|
|
521
|
-
/** @type {?} */
|
|
522
412
|
var key = selectIdValue(entity, selectId);
|
|
523
413
|
if (key in state.entities) {
|
|
524
414
|
state.entities[key] = entity;
|
|
@@ -528,70 +418,31 @@
|
|
|
528
418
|
state.entities[key] = entity;
|
|
529
419
|
return DidMutate.Both;
|
|
530
420
|
}
|
|
531
|
-
/**
|
|
532
|
-
* @param {?} key
|
|
533
|
-
* @param {?} state
|
|
534
|
-
* @return {?}
|
|
535
|
-
*/
|
|
536
421
|
function removeOneMutably(key, state) {
|
|
537
422
|
return removeManyMutably([key], state);
|
|
538
423
|
}
|
|
539
|
-
/**
|
|
540
|
-
* @param {?} keysOrPredicate
|
|
541
|
-
* @param {?} state
|
|
542
|
-
* @return {?}
|
|
543
|
-
*/
|
|
544
424
|
function removeManyMutably(keysOrPredicate, state) {
|
|
545
|
-
/** @type {?} */
|
|
546
425
|
var keys = keysOrPredicate instanceof Array
|
|
547
426
|
? keysOrPredicate
|
|
548
|
-
: state.ids.filter((
|
|
549
|
-
* @param {?} key
|
|
550
|
-
* @return {?}
|
|
551
|
-
*/function (key) { return keysOrPredicate(state.entities[key]); }));
|
|
552
|
-
/** @type {?} */
|
|
427
|
+
: state.ids.filter(function (key) { return keysOrPredicate(state.entities[key]); });
|
|
553
428
|
var didMutate = keys
|
|
554
|
-
.filter((
|
|
555
|
-
|
|
556
|
-
* @return {?}
|
|
557
|
-
*/function (key) { return key in state.entities; }))
|
|
558
|
-
.map(( /**
|
|
559
|
-
* @param {?} key
|
|
560
|
-
* @return {?}
|
|
561
|
-
*/function (key) { return delete state.entities[key]; })).length > 0;
|
|
429
|
+
.filter(function (key) { return key in state.entities; })
|
|
430
|
+
.map(function (key) { return delete state.entities[key]; }).length > 0;
|
|
562
431
|
if (didMutate) {
|
|
563
|
-
state.ids = state.ids.filter((
|
|
564
|
-
* @param {?} id
|
|
565
|
-
* @return {?}
|
|
566
|
-
*/function (id) { return id in state.entities; }));
|
|
432
|
+
state.ids = state.ids.filter(function (id) { return id in state.entities; });
|
|
567
433
|
}
|
|
568
434
|
return didMutate ? DidMutate.Both : DidMutate.None;
|
|
569
435
|
}
|
|
570
|
-
/**
|
|
571
|
-
* @template S
|
|
572
|
-
* @param {?} state
|
|
573
|
-
* @return {?}
|
|
574
|
-
*/
|
|
575
436
|
function removeAll(state) {
|
|
576
437
|
return Object.assign({}, state, {
|
|
577
438
|
ids: [],
|
|
578
439
|
entities: {},
|
|
579
440
|
});
|
|
580
441
|
}
|
|
581
|
-
/**
|
|
582
|
-
* @param {?} keys
|
|
583
|
-
* @param {?} update
|
|
584
|
-
* @param {?} state
|
|
585
|
-
* @return {?}
|
|
586
|
-
*/
|
|
587
442
|
function takeNewKey(keys, update, state) {
|
|
588
|
-
/** @type {?} */
|
|
589
443
|
var original = state.entities[update.id];
|
|
590
|
-
/** @type {?} */
|
|
591
444
|
var updated = Object.assign({}, original, update.changes);
|
|
592
|
-
/** @type {?} */
|
|
593
445
|
var newKey = selectIdValue(updated, selectId);
|
|
594
|
-
/** @type {?} */
|
|
595
446
|
var hasNewKey = newKey !== update.id;
|
|
596
447
|
if (hasNewKey) {
|
|
597
448
|
keys[update.id] = newKey;
|
|
@@ -600,40 +451,18 @@
|
|
|
600
451
|
state.entities[newKey] = updated;
|
|
601
452
|
return hasNewKey;
|
|
602
453
|
}
|
|
603
|
-
/**
|
|
604
|
-
* @param {?} update
|
|
605
|
-
* @param {?} state
|
|
606
|
-
* @return {?}
|
|
607
|
-
*/
|
|
608
454
|
function updateOneMutably(update, state) {
|
|
609
455
|
return updateManyMutably([update], state);
|
|
610
456
|
}
|
|
611
|
-
/**
|
|
612
|
-
* @param {?} updates
|
|
613
|
-
* @param {?} state
|
|
614
|
-
* @return {?}
|
|
615
|
-
*/
|
|
616
457
|
function updateManyMutably(updates, state) {
|
|
617
|
-
/** @type {?} */
|
|
618
458
|
var newKeys = {};
|
|
619
|
-
updates = updates.filter((
|
|
620
|
-
* @param {?} update
|
|
621
|
-
* @return {?}
|
|
622
|
-
*/function (update) { return update.id in state.entities; }));
|
|
623
|
-
/** @type {?} */
|
|
459
|
+
updates = updates.filter(function (update) { return update.id in state.entities; });
|
|
624
460
|
var didMutateEntities = updates.length > 0;
|
|
625
461
|
if (didMutateEntities) {
|
|
626
|
-
|
|
627
|
-
var didMutateIds = updates.filter(( /**
|
|
628
|
-
* @param {?} update
|
|
629
|
-
* @return {?}
|
|
630
|
-
*/function (update) { return takeNewKey(newKeys, update, state); })).length >
|
|
462
|
+
var didMutateIds = updates.filter(function (update) { return takeNewKey(newKeys, update, state); }).length >
|
|
631
463
|
0;
|
|
632
464
|
if (didMutateIds) {
|
|
633
|
-
state.ids = state.ids.map((
|
|
634
|
-
* @param {?} id
|
|
635
|
-
* @return {?}
|
|
636
|
-
*/function (id) { return newKeys[id] || id; }));
|
|
465
|
+
state.ids = state.ids.map(function (id) { return newKeys[id] || id; });
|
|
637
466
|
return DidMutate.Both;
|
|
638
467
|
}
|
|
639
468
|
else {
|
|
@@ -642,77 +471,42 @@
|
|
|
642
471
|
}
|
|
643
472
|
return DidMutate.None;
|
|
644
473
|
}
|
|
645
|
-
/**
|
|
646
|
-
* @param {?} map
|
|
647
|
-
* @param {?} state
|
|
648
|
-
* @return {?}
|
|
649
|
-
*/
|
|
650
474
|
function mapMutably(map, state) {
|
|
651
|
-
|
|
652
|
-
var changes = state.ids.reduce(( /**
|
|
653
|
-
* @param {?} changes
|
|
654
|
-
* @param {?} id
|
|
655
|
-
* @return {?}
|
|
656
|
-
*/function (changes, id) {
|
|
657
|
-
/** @type {?} */
|
|
475
|
+
var changes = state.ids.reduce(function (changes, id) {
|
|
658
476
|
var change = map(state.entities[id]);
|
|
659
477
|
if (change !== state.entities[id]) {
|
|
660
478
|
changes.push({ id: id, changes: change });
|
|
661
479
|
}
|
|
662
480
|
return changes;
|
|
663
|
-
}
|
|
664
|
-
|
|
665
|
-
var updates = changes.filter(( /**
|
|
666
|
-
* @param {?} __0
|
|
667
|
-
* @return {?}
|
|
668
|
-
*/function (_a) {
|
|
481
|
+
}, []);
|
|
482
|
+
var updates = changes.filter(function (_a) {
|
|
669
483
|
var id = _a.id;
|
|
670
484
|
return id in state.entities;
|
|
671
|
-
})
|
|
485
|
+
});
|
|
672
486
|
return updateManyMutably(updates, state);
|
|
673
487
|
}
|
|
674
|
-
/**
|
|
675
|
-
* @param {?} __0
|
|
676
|
-
* @param {?} state
|
|
677
|
-
* @return {?}
|
|
678
|
-
*/
|
|
679
488
|
function mapOneMutably(_a, state) {
|
|
680
489
|
var map = _a.map, id = _a.id;
|
|
681
|
-
/** @type {?} */
|
|
682
490
|
var entity = state.entities[id];
|
|
683
491
|
if (!entity) {
|
|
684
492
|
return DidMutate.None;
|
|
685
493
|
}
|
|
686
|
-
/** @type {?} */
|
|
687
494
|
var updatedEntity = map(entity);
|
|
688
495
|
return updateOneMutably({
|
|
689
496
|
id: id,
|
|
690
497
|
changes: updatedEntity,
|
|
691
498
|
}, state);
|
|
692
499
|
}
|
|
693
|
-
/**
|
|
694
|
-
* @param {?} entity
|
|
695
|
-
* @param {?} state
|
|
696
|
-
* @return {?}
|
|
697
|
-
*/
|
|
698
500
|
function upsertOneMutably(entity, state) {
|
|
699
501
|
return upsertManyMutably([entity], state);
|
|
700
502
|
}
|
|
701
|
-
/**
|
|
702
|
-
* @param {?} entities
|
|
703
|
-
* @param {?} state
|
|
704
|
-
* @return {?}
|
|
705
|
-
*/
|
|
706
503
|
function upsertManyMutably(entities, state) {
|
|
707
504
|
var e_2, _a;
|
|
708
|
-
/** @type {?} */
|
|
709
505
|
var added = [];
|
|
710
|
-
/** @type {?} */
|
|
711
506
|
var updated = [];
|
|
712
507
|
try {
|
|
713
508
|
for (var entities_2 = __values(entities), entities_2_1 = entities_2.next(); !entities_2_1.done; entities_2_1 = entities_2.next()) {
|
|
714
509
|
var entity = entities_2_1.value;
|
|
715
|
-
/** @type {?} */
|
|
716
510
|
var id = selectIdValue(entity, selectId);
|
|
717
511
|
if (id in state.entities) {
|
|
718
512
|
updated.push({ id: id, changes: entity });
|
|
@@ -729,9 +523,7 @@
|
|
|
729
523
|
}
|
|
730
524
|
finally { if (e_2) throw e_2.error; }
|
|
731
525
|
}
|
|
732
|
-
/** @type {?} */
|
|
733
526
|
var didMutateByUpdated = updateManyMutably(updated, state);
|
|
734
|
-
/** @type {?} */
|
|
735
527
|
var didMutateByAdded = addManyMutably(added, state);
|
|
736
528
|
switch (true) {
|
|
737
529
|
case didMutateByAdded === DidMutate.None &&
|
|
@@ -761,33 +553,13 @@
|
|
|
761
553
|
};
|
|
762
554
|
}
|
|
763
555
|
|
|
764
|
-
/**
|
|
765
|
-
* @template T
|
|
766
|
-
* @param {?} selectId
|
|
767
|
-
* @param {?} sort
|
|
768
|
-
* @return {?}
|
|
769
|
-
*/
|
|
770
556
|
function createSortedStateAdapter(selectId, sort) {
|
|
771
557
|
var _a = createUnsortedStateAdapter(selectId), removeOne = _a.removeOne, removeMany = _a.removeMany, removeAll = _a.removeAll;
|
|
772
|
-
/**
|
|
773
|
-
* @param {?} entity
|
|
774
|
-
* @param {?} state
|
|
775
|
-
* @return {?}
|
|
776
|
-
*/
|
|
777
558
|
function addOneMutably(entity, state) {
|
|
778
559
|
return addManyMutably([entity], state);
|
|
779
560
|
}
|
|
780
|
-
/**
|
|
781
|
-
* @param {?} newModels
|
|
782
|
-
* @param {?} state
|
|
783
|
-
* @return {?}
|
|
784
|
-
*/
|
|
785
561
|
function addManyMutably(newModels, state) {
|
|
786
|
-
|
|
787
|
-
var models = newModels.filter(( /**
|
|
788
|
-
* @param {?} model
|
|
789
|
-
* @return {?}
|
|
790
|
-
*/function (model) { return !(selectIdValue(model, selectId) in state.entities); }));
|
|
562
|
+
var models = newModels.filter(function (model) { return !(selectIdValue(model, selectId) in state.entities); });
|
|
791
563
|
if (models.length === 0) {
|
|
792
564
|
return DidMutate.None;
|
|
793
565
|
}
|
|
@@ -796,30 +568,16 @@
|
|
|
796
568
|
return DidMutate.Both;
|
|
797
569
|
}
|
|
798
570
|
}
|
|
799
|
-
/**
|
|
800
|
-
* @param {?} models
|
|
801
|
-
* @param {?} state
|
|
802
|
-
* @return {?}
|
|
803
|
-
*/
|
|
804
571
|
function setAllMutably(models, state) {
|
|
805
572
|
state.entities = {};
|
|
806
573
|
state.ids = [];
|
|
807
574
|
addManyMutably(models, state);
|
|
808
575
|
return DidMutate.Both;
|
|
809
576
|
}
|
|
810
|
-
/**
|
|
811
|
-
* @param {?} entity
|
|
812
|
-
* @param {?} state
|
|
813
|
-
* @return {?}
|
|
814
|
-
*/
|
|
815
577
|
function setOneMutably(entity, state) {
|
|
816
|
-
/** @type {?} */
|
|
817
578
|
var id = selectIdValue(entity, selectId);
|
|
818
579
|
if (id in state.entities) {
|
|
819
|
-
state.ids = state.ids.filter((
|
|
820
|
-
* @param {?} val
|
|
821
|
-
* @return {?}
|
|
822
|
-
*/function (val) { return val !== id; }));
|
|
580
|
+
state.ids = state.ids.filter(function (val) { return val !== id; });
|
|
823
581
|
merge([entity], state);
|
|
824
582
|
return DidMutate.Both;
|
|
825
583
|
}
|
|
@@ -827,61 +585,31 @@
|
|
|
827
585
|
return addOneMutably(entity, state);
|
|
828
586
|
}
|
|
829
587
|
}
|
|
830
|
-
/**
|
|
831
|
-
* @param {?} update
|
|
832
|
-
* @param {?} state
|
|
833
|
-
* @return {?}
|
|
834
|
-
*/
|
|
835
588
|
function updateOneMutably(update, state) {
|
|
836
589
|
return updateManyMutably([update], state);
|
|
837
590
|
}
|
|
838
|
-
/**
|
|
839
|
-
* @param {?} models
|
|
840
|
-
* @param {?} update
|
|
841
|
-
* @param {?} state
|
|
842
|
-
* @return {?}
|
|
843
|
-
*/
|
|
844
591
|
function takeUpdatedModel(models, update, state) {
|
|
845
592
|
if (!(update.id in state.entities)) {
|
|
846
593
|
return false;
|
|
847
594
|
}
|
|
848
|
-
/** @type {?} */
|
|
849
595
|
var original = state.entities[update.id];
|
|
850
|
-
/** @type {?} */
|
|
851
596
|
var updated = Object.assign({}, original, update.changes);
|
|
852
|
-
/** @type {?} */
|
|
853
597
|
var newKey = selectIdValue(updated, selectId);
|
|
854
598
|
delete state.entities[update.id];
|
|
855
599
|
models.push(updated);
|
|
856
600
|
return newKey !== update.id;
|
|
857
601
|
}
|
|
858
|
-
/**
|
|
859
|
-
* @param {?} updates
|
|
860
|
-
* @param {?} state
|
|
861
|
-
* @return {?}
|
|
862
|
-
*/
|
|
863
602
|
function updateManyMutably(updates, state) {
|
|
864
|
-
/** @type {?} */
|
|
865
603
|
var models = [];
|
|
866
|
-
|
|
867
|
-
var didMutateIds = updates.filter(( /**
|
|
868
|
-
* @param {?} update
|
|
869
|
-
* @return {?}
|
|
870
|
-
*/function (update) { return takeUpdatedModel(models, update, state); }))
|
|
604
|
+
var didMutateIds = updates.filter(function (update) { return takeUpdatedModel(models, update, state); })
|
|
871
605
|
.length > 0;
|
|
872
606
|
if (models.length === 0) {
|
|
873
607
|
return DidMutate.None;
|
|
874
608
|
}
|
|
875
609
|
else {
|
|
876
|
-
/** @type {?} */
|
|
877
610
|
var originalIds_1 = state.ids;
|
|
878
|
-
/** @type {?} */
|
|
879
611
|
var updatedIndexes_1 = [];
|
|
880
|
-
state.ids = state.ids.filter((
|
|
881
|
-
* @param {?} id
|
|
882
|
-
* @param {?} index
|
|
883
|
-
* @return {?}
|
|
884
|
-
*/function (id, index) {
|
|
612
|
+
state.ids = state.ids.filter(function (id, index) {
|
|
885
613
|
if (id in state.entities) {
|
|
886
614
|
return true;
|
|
887
615
|
}
|
|
@@ -889,13 +617,10 @@
|
|
|
889
617
|
updatedIndexes_1.push(index);
|
|
890
618
|
return false;
|
|
891
619
|
}
|
|
892
|
-
})
|
|
620
|
+
});
|
|
893
621
|
merge(models, state);
|
|
894
622
|
if (!didMutateIds &&
|
|
895
|
-
updatedIndexes_1.every((
|
|
896
|
-
* @param {?} i
|
|
897
|
-
* @return {?}
|
|
898
|
-
*/function (i) { return state.ids[i] === originalIds_1[i]; }))) {
|
|
623
|
+
updatedIndexes_1.every(function (i) { return state.ids[i] === originalIds_1[i]; })) {
|
|
899
624
|
return DidMutate.EntitiesOnly;
|
|
900
625
|
}
|
|
901
626
|
else {
|
|
@@ -903,69 +628,38 @@
|
|
|
903
628
|
}
|
|
904
629
|
}
|
|
905
630
|
}
|
|
906
|
-
/**
|
|
907
|
-
* @param {?} updatesOrMap
|
|
908
|
-
* @param {?} state
|
|
909
|
-
* @return {?}
|
|
910
|
-
*/
|
|
911
631
|
function mapMutably(updatesOrMap, state) {
|
|
912
|
-
|
|
913
|
-
var updates = state.ids.reduce(( /**
|
|
914
|
-
* @param {?} changes
|
|
915
|
-
* @param {?} id
|
|
916
|
-
* @return {?}
|
|
917
|
-
*/function (changes, id) {
|
|
918
|
-
/** @type {?} */
|
|
632
|
+
var updates = state.ids.reduce(function (changes, id) {
|
|
919
633
|
var change = updatesOrMap(state.entities[id]);
|
|
920
634
|
if (change !== state.entities[id]) {
|
|
921
635
|
changes.push({ id: id, changes: change });
|
|
922
636
|
}
|
|
923
637
|
return changes;
|
|
924
|
-
}
|
|
638
|
+
}, []);
|
|
925
639
|
return updateManyMutably(updates, state);
|
|
926
640
|
}
|
|
927
|
-
/**
|
|
928
|
-
* @param {?} __0
|
|
929
|
-
* @param {?} state
|
|
930
|
-
* @return {?}
|
|
931
|
-
*/
|
|
932
641
|
function mapOneMutably(_a, state) {
|
|
933
642
|
var map = _a.map, id = _a.id;
|
|
934
|
-
/** @type {?} */
|
|
935
643
|
var entity = state.entities[id];
|
|
936
644
|
if (!entity) {
|
|
937
645
|
return DidMutate.None;
|
|
938
646
|
}
|
|
939
|
-
/** @type {?} */
|
|
940
647
|
var updatedEntity = map(entity);
|
|
941
648
|
return updateOneMutably({
|
|
942
649
|
id: id,
|
|
943
650
|
changes: updatedEntity,
|
|
944
651
|
}, state);
|
|
945
652
|
}
|
|
946
|
-
/**
|
|
947
|
-
* @param {?} entity
|
|
948
|
-
* @param {?} state
|
|
949
|
-
* @return {?}
|
|
950
|
-
*/
|
|
951
653
|
function upsertOneMutably(entity, state) {
|
|
952
654
|
return upsertManyMutably([entity], state);
|
|
953
655
|
}
|
|
954
|
-
/**
|
|
955
|
-
* @param {?} entities
|
|
956
|
-
* @param {?} state
|
|
957
|
-
* @return {?}
|
|
958
|
-
*/
|
|
959
656
|
function upsertManyMutably(entities, state) {
|
|
960
657
|
var e_1, _a;
|
|
961
|
-
/** @type {?} */
|
|
962
658
|
var added = [];
|
|
963
|
-
/** @type {?} */
|
|
964
659
|
var updated = [];
|
|
965
660
|
try {
|
|
966
661
|
for (var entities_1 = __values(entities), entities_1_1 = entities_1.next(); !entities_1_1.done; entities_1_1 = entities_1.next()) {
|
|
967
662
|
var entity = entities_1_1.value;
|
|
968
|
-
/** @type {?} */
|
|
969
663
|
var id = selectIdValue(entity, selectId);
|
|
970
664
|
if (id in state.entities) {
|
|
971
665
|
updated.push({ id: id, changes: entity });
|
|
@@ -982,9 +676,7 @@
|
|
|
982
676
|
}
|
|
983
677
|
finally { if (e_1) throw e_1.error; }
|
|
984
678
|
}
|
|
985
|
-
/** @type {?} */
|
|
986
679
|
var didMutateByUpdated = updateManyMutably(updated, state);
|
|
987
|
-
/** @type {?} */
|
|
988
680
|
var didMutateByAdded = addManyMutably(added, state);
|
|
989
681
|
switch (true) {
|
|
990
682
|
case didMutateByAdded === DidMutate.None &&
|
|
@@ -997,27 +689,15 @@
|
|
|
997
689
|
return DidMutate.EntitiesOnly;
|
|
998
690
|
}
|
|
999
691
|
}
|
|
1000
|
-
/**
|
|
1001
|
-
* @param {?} models
|
|
1002
|
-
* @param {?} state
|
|
1003
|
-
* @return {?}
|
|
1004
|
-
*/
|
|
1005
692
|
function merge(models, state) {
|
|
1006
693
|
models.sort(sort);
|
|
1007
|
-
/** @type {?} */
|
|
1008
694
|
var ids = [];
|
|
1009
|
-
/** @type {?} */
|
|
1010
695
|
var i = 0;
|
|
1011
|
-
/** @type {?} */
|
|
1012
696
|
var j = 0;
|
|
1013
697
|
while (i < models.length && j < state.ids.length) {
|
|
1014
|
-
/** @type {?} */
|
|
1015
698
|
var model = models[i];
|
|
1016
|
-
/** @type {?} */
|
|
1017
699
|
var modelId = selectIdValue(model, selectId);
|
|
1018
|
-
/** @type {?} */
|
|
1019
700
|
var entityId = state.ids[j];
|
|
1020
|
-
/** @type {?} */
|
|
1021
701
|
var entity = state.entities[entityId];
|
|
1022
702
|
if (sort(model, entity) <= 0) {
|
|
1023
703
|
ids.push(modelId);
|
|
@@ -1034,13 +714,9 @@
|
|
|
1034
714
|
else {
|
|
1035
715
|
state.ids = ids.concat(state.ids.slice(j));
|
|
1036
716
|
}
|
|
1037
|
-
models.forEach((
|
|
1038
|
-
* @param {?} model
|
|
1039
|
-
* @param {?} i
|
|
1040
|
-
* @return {?}
|
|
1041
|
-
*/function (model, i) {
|
|
717
|
+
models.forEach(function (model, i) {
|
|
1042
718
|
state.entities[selectId(model)] = model;
|
|
1043
|
-
})
|
|
719
|
+
});
|
|
1044
720
|
}
|
|
1045
721
|
return {
|
|
1046
722
|
removeOne: removeOne,
|
|
@@ -1059,27 +735,11 @@
|
|
|
1059
735
|
};
|
|
1060
736
|
}
|
|
1061
737
|
|
|
1062
|
-
/**
|
|
1063
|
-
* @fileoverview added by tsickle
|
|
1064
|
-
* Generated from: src/create_adapter.ts
|
|
1065
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1066
|
-
*/
|
|
1067
|
-
/**
|
|
1068
|
-
* @template T
|
|
1069
|
-
* @param {?=} options
|
|
1070
|
-
* @return {?}
|
|
1071
|
-
*/
|
|
1072
738
|
function createEntityAdapter(options) {
|
|
1073
739
|
if (options === void 0) { options = {}; }
|
|
1074
|
-
var _a = Object.assign({ sortComparer: false, selectId: (
|
|
1075
|
-
* @param {?} instance
|
|
1076
|
-
* @return {?}
|
|
1077
|
-
*/function (instance) { return instance.id; }) }, options), selectId = _a.selectId, sortComparer = _a.sortComparer;
|
|
1078
|
-
/** @type {?} */
|
|
740
|
+
var _a = Object.assign({ sortComparer: false, selectId: function (instance) { return instance.id; } }, options), selectId = _a.selectId, sortComparer = _a.sortComparer;
|
|
1079
741
|
var stateFactory = createInitialStateFactory();
|
|
1080
|
-
/** @type {?} */
|
|
1081
742
|
var selectorsFactory = createSelectorsFactory();
|
|
1082
|
-
/** @type {?} */
|
|
1083
743
|
var stateAdapter = sortComparer
|
|
1084
744
|
? createSortedStateAdapter(selectId, sortComparer)
|
|
1085
745
|
: createUnsortedStateAdapter(selectId);
|
|
@@ -1087,278 +747,20 @@
|
|
|
1087
747
|
sortComparer: sortComparer }, stateFactory), selectorsFactory), stateAdapter);
|
|
1088
748
|
}
|
|
1089
749
|
|
|
1090
|
-
/**
|
|
1091
|
-
* @fileoverview added by tsickle
|
|
1092
|
-
* Generated from: src/models.ts
|
|
1093
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1094
|
-
*/
|
|
1095
|
-
/**
|
|
1096
|
-
* @record
|
|
1097
|
-
* @template T
|
|
1098
|
-
*/
|
|
1099
|
-
function DictionaryNum() { }
|
|
1100
|
-
/**
|
|
1101
|
-
* @abstract
|
|
1102
|
-
* @template T
|
|
1103
|
-
*/
|
|
1104
750
|
var Dictionary = /** @class */ (function () {
|
|
1105
751
|
function Dictionary() {
|
|
1106
752
|
}
|
|
1107
753
|
return Dictionary;
|
|
1108
754
|
}());
|
|
1109
|
-
/**
|
|
1110
|
-
* @record
|
|
1111
|
-
* @template T
|
|
1112
|
-
*/
|
|
1113
|
-
function UpdateStr() { }
|
|
1114
|
-
if (false) {
|
|
1115
|
-
/** @type {?} */
|
|
1116
|
-
UpdateStr.prototype.id;
|
|
1117
|
-
/** @type {?} */
|
|
1118
|
-
UpdateStr.prototype.changes;
|
|
1119
|
-
}
|
|
1120
|
-
/**
|
|
1121
|
-
* @record
|
|
1122
|
-
* @template T
|
|
1123
|
-
*/
|
|
1124
|
-
function UpdateNum() { }
|
|
1125
|
-
if (false) {
|
|
1126
|
-
/** @type {?} */
|
|
1127
|
-
UpdateNum.prototype.id;
|
|
1128
|
-
/** @type {?} */
|
|
1129
|
-
UpdateNum.prototype.changes;
|
|
1130
|
-
}
|
|
1131
|
-
/**
|
|
1132
|
-
* @record
|
|
1133
|
-
* @template T
|
|
1134
|
-
*/
|
|
1135
|
-
function EntityMapOneNum() { }
|
|
1136
|
-
if (false) {
|
|
1137
|
-
/** @type {?} */
|
|
1138
|
-
EntityMapOneNum.prototype.id;
|
|
1139
|
-
/** @type {?} */
|
|
1140
|
-
EntityMapOneNum.prototype.map;
|
|
1141
|
-
}
|
|
1142
|
-
/**
|
|
1143
|
-
* @record
|
|
1144
|
-
* @template T
|
|
1145
|
-
*/
|
|
1146
|
-
function EntityMapOneStr() { }
|
|
1147
|
-
if (false) {
|
|
1148
|
-
/** @type {?} */
|
|
1149
|
-
EntityMapOneStr.prototype.id;
|
|
1150
|
-
/** @type {?} */
|
|
1151
|
-
EntityMapOneStr.prototype.map;
|
|
1152
|
-
}
|
|
1153
|
-
/**
|
|
1154
|
-
* @record
|
|
1155
|
-
* @template T
|
|
1156
|
-
*/
|
|
1157
|
-
function EntityState() { }
|
|
1158
|
-
if (false) {
|
|
1159
|
-
/** @type {?} */
|
|
1160
|
-
EntityState.prototype.ids;
|
|
1161
|
-
/** @type {?} */
|
|
1162
|
-
EntityState.prototype.entities;
|
|
1163
|
-
}
|
|
1164
|
-
/**
|
|
1165
|
-
* @record
|
|
1166
|
-
* @template T
|
|
1167
|
-
*/
|
|
1168
|
-
function EntityDefinition() { }
|
|
1169
|
-
if (false) {
|
|
1170
|
-
/** @type {?} */
|
|
1171
|
-
EntityDefinition.prototype.selectId;
|
|
1172
|
-
/** @type {?} */
|
|
1173
|
-
EntityDefinition.prototype.sortComparer;
|
|
1174
|
-
}
|
|
1175
|
-
/**
|
|
1176
|
-
* @record
|
|
1177
|
-
* @template T
|
|
1178
|
-
*/
|
|
1179
|
-
function EntityStateAdapter() { }
|
|
1180
|
-
if (false) {
|
|
1181
|
-
/**
|
|
1182
|
-
* @template S
|
|
1183
|
-
* @param {?} entity
|
|
1184
|
-
* @param {?} state
|
|
1185
|
-
* @return {?}
|
|
1186
|
-
*/
|
|
1187
|
-
EntityStateAdapter.prototype.addOne = function (entity, state) { };
|
|
1188
|
-
/**
|
|
1189
|
-
* @template S
|
|
1190
|
-
* @param {?} entities
|
|
1191
|
-
* @param {?} state
|
|
1192
|
-
* @return {?}
|
|
1193
|
-
*/
|
|
1194
|
-
EntityStateAdapter.prototype.addMany = function (entities, state) { };
|
|
1195
|
-
/**
|
|
1196
|
-
* @template S
|
|
1197
|
-
* @param {?} entities
|
|
1198
|
-
* @param {?} state
|
|
1199
|
-
* @return {?}
|
|
1200
|
-
*/
|
|
1201
|
-
EntityStateAdapter.prototype.setAll = function (entities, state) { };
|
|
1202
|
-
/**
|
|
1203
|
-
* @template S
|
|
1204
|
-
* @param {?} entity
|
|
1205
|
-
* @param {?} state
|
|
1206
|
-
* @return {?}
|
|
1207
|
-
*/
|
|
1208
|
-
EntityStateAdapter.prototype.setOne = function (entity, state) { };
|
|
1209
|
-
/**
|
|
1210
|
-
* @template S
|
|
1211
|
-
* @param {?} key
|
|
1212
|
-
* @param {?} state
|
|
1213
|
-
* @return {?}
|
|
1214
|
-
*/
|
|
1215
|
-
EntityStateAdapter.prototype.removeOne = function (key, state) { };
|
|
1216
|
-
/**
|
|
1217
|
-
* @template S
|
|
1218
|
-
* @param {?} key
|
|
1219
|
-
* @param {?} state
|
|
1220
|
-
* @return {?}
|
|
1221
|
-
*/
|
|
1222
|
-
EntityStateAdapter.prototype.removeOne = function (key, state) { };
|
|
1223
|
-
/**
|
|
1224
|
-
* @template S
|
|
1225
|
-
* @param {?} keys
|
|
1226
|
-
* @param {?} state
|
|
1227
|
-
* @return {?}
|
|
1228
|
-
*/
|
|
1229
|
-
EntityStateAdapter.prototype.removeMany = function (keys, state) { };
|
|
1230
|
-
/**
|
|
1231
|
-
* @template S
|
|
1232
|
-
* @param {?} keys
|
|
1233
|
-
* @param {?} state
|
|
1234
|
-
* @return {?}
|
|
1235
|
-
*/
|
|
1236
|
-
EntityStateAdapter.prototype.removeMany = function (keys, state) { };
|
|
1237
|
-
/**
|
|
1238
|
-
* @template S
|
|
1239
|
-
* @param {?} predicate
|
|
1240
|
-
* @param {?} state
|
|
1241
|
-
* @return {?}
|
|
1242
|
-
*/
|
|
1243
|
-
EntityStateAdapter.prototype.removeMany = function (predicate, state) { };
|
|
1244
|
-
/**
|
|
1245
|
-
* @template S
|
|
1246
|
-
* @param {?} state
|
|
1247
|
-
* @return {?}
|
|
1248
|
-
*/
|
|
1249
|
-
EntityStateAdapter.prototype.removeAll = function (state) { };
|
|
1250
|
-
/**
|
|
1251
|
-
* @template S
|
|
1252
|
-
* @param {?} update
|
|
1253
|
-
* @param {?} state
|
|
1254
|
-
* @return {?}
|
|
1255
|
-
*/
|
|
1256
|
-
EntityStateAdapter.prototype.updateOne = function (update, state) { };
|
|
1257
|
-
/**
|
|
1258
|
-
* @template S
|
|
1259
|
-
* @param {?} updates
|
|
1260
|
-
* @param {?} state
|
|
1261
|
-
* @return {?}
|
|
1262
|
-
*/
|
|
1263
|
-
EntityStateAdapter.prototype.updateMany = function (updates, state) { };
|
|
1264
|
-
/**
|
|
1265
|
-
* @template S
|
|
1266
|
-
* @param {?} entity
|
|
1267
|
-
* @param {?} state
|
|
1268
|
-
* @return {?}
|
|
1269
|
-
*/
|
|
1270
|
-
EntityStateAdapter.prototype.upsertOne = function (entity, state) { };
|
|
1271
|
-
/**
|
|
1272
|
-
* @template S
|
|
1273
|
-
* @param {?} entities
|
|
1274
|
-
* @param {?} state
|
|
1275
|
-
* @return {?}
|
|
1276
|
-
*/
|
|
1277
|
-
EntityStateAdapter.prototype.upsertMany = function (entities, state) { };
|
|
1278
|
-
/**
|
|
1279
|
-
* @template S
|
|
1280
|
-
* @param {?} map
|
|
1281
|
-
* @param {?} state
|
|
1282
|
-
* @return {?}
|
|
1283
|
-
*/
|
|
1284
|
-
EntityStateAdapter.prototype.mapOne = function (map, state) { };
|
|
1285
|
-
/**
|
|
1286
|
-
* @template S
|
|
1287
|
-
* @param {?} map
|
|
1288
|
-
* @param {?} state
|
|
1289
|
-
* @return {?}
|
|
1290
|
-
*/
|
|
1291
|
-
EntityStateAdapter.prototype.map = function (map, state) { };
|
|
1292
|
-
}
|
|
1293
|
-
/**
|
|
1294
|
-
* @record
|
|
1295
|
-
* @template T, V
|
|
1296
|
-
*/
|
|
1297
|
-
function EntitySelectors() { }
|
|
1298
|
-
if (false) {
|
|
1299
|
-
/** @type {?} */
|
|
1300
|
-
EntitySelectors.prototype.selectIds;
|
|
1301
|
-
/** @type {?} */
|
|
1302
|
-
EntitySelectors.prototype.selectEntities;
|
|
1303
|
-
/** @type {?} */
|
|
1304
|
-
EntitySelectors.prototype.selectAll;
|
|
1305
|
-
/** @type {?} */
|
|
1306
|
-
EntitySelectors.prototype.selectTotal;
|
|
1307
|
-
}
|
|
1308
|
-
/**
|
|
1309
|
-
* @record
|
|
1310
|
-
* @template T
|
|
1311
|
-
*/
|
|
1312
|
-
function EntityAdapter() { }
|
|
1313
|
-
if (false) {
|
|
1314
|
-
/** @type {?} */
|
|
1315
|
-
EntityAdapter.prototype.selectId;
|
|
1316
|
-
/** @type {?} */
|
|
1317
|
-
EntityAdapter.prototype.sortComparer;
|
|
1318
|
-
/**
|
|
1319
|
-
* @return {?}
|
|
1320
|
-
*/
|
|
1321
|
-
EntityAdapter.prototype.getInitialState = function () { };
|
|
1322
|
-
/**
|
|
1323
|
-
* @template S
|
|
1324
|
-
* @param {?} state
|
|
1325
|
-
* @return {?}
|
|
1326
|
-
*/
|
|
1327
|
-
EntityAdapter.prototype.getInitialState = function (state) { };
|
|
1328
|
-
/**
|
|
1329
|
-
* @return {?}
|
|
1330
|
-
*/
|
|
1331
|
-
EntityAdapter.prototype.getSelectors = function () { };
|
|
1332
|
-
/**
|
|
1333
|
-
* @template V
|
|
1334
|
-
* @param {?} selectState
|
|
1335
|
-
* @return {?}
|
|
1336
|
-
*/
|
|
1337
|
-
EntityAdapter.prototype.getSelectors = function (selectState) { };
|
|
1338
|
-
}
|
|
1339
|
-
|
|
1340
|
-
/**
|
|
1341
|
-
* @fileoverview added by tsickle
|
|
1342
|
-
* Generated from: src/index.ts
|
|
1343
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1344
|
-
*/
|
|
1345
|
-
|
|
1346
|
-
/**
|
|
1347
|
-
* @fileoverview added by tsickle
|
|
1348
|
-
* Generated from: public_api.ts
|
|
1349
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1350
|
-
*/
|
|
1351
755
|
|
|
1352
756
|
/**
|
|
1353
|
-
*
|
|
1354
|
-
*
|
|
1355
|
-
*
|
|
757
|
+
* DO NOT EDIT
|
|
758
|
+
*
|
|
759
|
+
* This file is automatically generated at build
|
|
1356
760
|
*/
|
|
1357
761
|
|
|
1358
762
|
/**
|
|
1359
|
-
*
|
|
1360
|
-
* Generated from: ngrx-entity.ts
|
|
1361
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
763
|
+
* Generated bundle index. Do not edit.
|
|
1362
764
|
*/
|
|
1363
765
|
|
|
1364
766
|
exports.Dictionary = Dictionary;
|