@@ -34,6 +34,10 @@ Some of them are listed below:
34
34
| ` value ` | string \| number \| undefined | undefined | New Key/Name of Collection | Yes |
35
35
36
36
### 📄 Return
37
+
38
+ ``` ts
39
+ Collection
40
+ ```
37
41
Returns the [ Collection] ( ./Introduction.md ) it was called on.
38
42
39
43
@@ -87,6 +91,10 @@ MY_COLLECTION.createGroup('myGroup', ['item1', 'item2']);
87
91
| ` config ` | [ GroupConfig] ( ../../../../Interfaces.md#groupconfig ) | {} | Configuration | No |
88
92
89
93
### 📄 Return
94
+
95
+ ``` ts
96
+ Group
97
+ ```
90
98
Returns a fresh [ Group] ( ./group/Introduction.md ) .
91
99
92
100
@@ -141,6 +149,10 @@ MY_COLLECTION.createSelector('mySelector', 'toSelectKey');
141
149
| ` config ` | [ SelectorConfig] ( ../../../../Interfaces.md#selectorconfig ) | {} | Configuration | No |
142
150
143
151
### 📄 Return
152
+
153
+ ``` ts
154
+ Selector
155
+ ```
144
156
Returns a fresh [ Selector] ( ./selector/Introduction.md ) .
145
157
146
158
@@ -180,7 +192,6 @@ and binds them to the Collection.
180
192
and binds them to the Collection. It also takes care creating the ` default ` Group,
181
193
which is like an interface to all collected data.
182
194
183
-
184
195
:::
185
196
186
197
@@ -270,6 +281,9 @@ App.createCollection({
270
281
271
282
### 📄 Return
272
283
284
+ ``` ts
285
+ Collection
286
+ ```
273
287
Returns the [ Collection] ( ./Introduction.md ) it was called on.
274
288
275
289
@@ -329,6 +343,9 @@ MY_COLLECTION.update(1, {name: "frank"}, {patch: {addNewProperties: false}}); //
329
343
330
344
### 📄 Return
331
345
346
+ ``` ts
347
+ Collection
348
+ ```
332
349
Returns the [ Collection] ( ./Introduction.md ) it was called on.
333
350
334
351
@@ -384,6 +401,9 @@ and trigger a rerender on all subscribed UI-Components whenever the missing Item
384
401
385
402
### 📄 Return
386
403
404
+ ``` ts
405
+ Group
406
+ ```
387
407
Returns a fresh [ Group] ( ./group/Introduction.md ) .
388
408
389
409
@@ -414,6 +434,9 @@ MY_COLLECTION.hasGroup('group6'); // Returns true
414
434
415
435
### 📄 Return
416
436
437
+ ``` ts
438
+ boolean
439
+ ```
417
440
` true ` if the Group exists and ` false ` if the Group doesn't exist.
418
441
419
442
@@ -454,7 +477,10 @@ Such reference allows AgileTs to rerender the UI-Component, whenever the missing
454
477
455
478
### 📄 Return
456
479
457
- A Group fitting to the passed ` groupKey ` or ` undefined ` .
480
+ ``` ts
481
+ Group | undefined
482
+ ```
483
+ A [ Group] ( ./group/Introduction.md ) fitting to the passed ` groupKey ` or ` undefined ` .
458
484
459
485
460
486
@@ -491,7 +517,10 @@ const myGroupWithReference = useAgile(MY_COLLECTION.getGroupWithReferenece('myGr
491
517
492
518
### 📄 Return
493
519
494
- A Group fitting to the passed ` groupKey ` or a ` placeholder ` Group.
520
+ ``` ts
521
+ Group
522
+ ```
523
+ A [ Group] ( ./group/Introduction.md ) fitting to the passed ` groupKey ` or a ` placeholder ` Group.
495
524
496
525
497
526
@@ -518,6 +547,9 @@ MY_COLLECTION.removeGroup('myGroup');
518
547
519
548
### 📄 Return
520
549
550
+ ``` ts
551
+ Collection
552
+ ```
521
553
Returns the [ Collection] ( ./Introduction.md ) it was called on.
522
554
523
555
@@ -566,6 +598,9 @@ const MY_SELECTOR = MY_COLLECTION.select('itemKey');
566
598
567
599
### 📄 Return
568
600
601
+ ``` ts
602
+ Selector
603
+ ```
569
604
Returns a fresh [ Selector] ( ./selector/Introduction.md ) .
570
605
571
606
@@ -600,6 +635,9 @@ MY_SELECOTR.key; // Returns 'itemKey'
600
635
601
636
### 📄 Return
602
637
638
+ ``` ts
639
+ Selector
640
+ ```
603
641
Returns a fresh [ Selector] ( ./selector/Introduction.md ) .
604
642
605
643
@@ -630,6 +668,9 @@ MY_COLLECTION.hasSelector('selector8'); // Returns true
630
668
631
669
### 📄 Return
632
670
671
+ ``` ts
672
+ boolean
673
+ ```
633
674
Returns ` true ` if the Selector exists and ` false ` if the Selector doesn't exist.
634
675
635
676
@@ -670,7 +711,10 @@ Such reference allows AgileTs to rerender the UI-Component, whenever the missing
670
711
671
712
### 📄 Return
672
713
673
- A Selector fitting to the passed ` selectorKey ` or ` undefined ` .
714
+ ``` ts
715
+ Selector | undefined
716
+ ```
717
+ A [ Selector] ( ./selector/Introduction.md ) fitting to the passed ` selectorKey ` or ` undefined ` .
674
718
675
719
676
720
@@ -707,7 +751,10 @@ const mySelectorWithReference = useAgile(MY_COLLECTION.getSelectorWithReferenece
707
751
708
752
### 📄 Return
709
753
710
- A Selector fitting to the passed ` selectorKey ` or a ` placeholder ` Selector.
754
+ ``` ts
755
+ Selector
756
+ ```
757
+ A [ Selector] ( ./selector/Introduction.md ) fitting to the passed ` selectorKey ` or a ` placeholder ` Selector.
711
758
712
759
713
760
@@ -734,6 +781,9 @@ MY_COLLECTION.removeSelector('mySelector');
734
781
735
782
### 📄 Return
736
783
784
+ ``` ts
785
+ Collection
786
+ ```
737
787
Returns the [ Collection] ( ./Introduction.md ) it was called on.
738
788
739
789
@@ -764,6 +814,9 @@ MY_COLLECTION.hasItem(1); // Returns true
764
814
765
815
### 📄 Return
766
816
817
+ ``` ts
818
+ boolean
819
+ ```
767
820
` true ` if the Item exists and ` false ` if the Item doesn't exist.
768
821
769
822
@@ -804,7 +857,10 @@ Such reference allows AgileTs to rerender the UI-Component, whenever the missing
804
857
805
858
### 📄 Return
806
859
807
- An Item fitting to the passed ` itemKey ` or ` undefined ` .
860
+ ``` ts
861
+ Item | undefined
862
+ ```
863
+ An [ Item] ( ./Introduction.md#-item ) fitting to the passed ` itemKey ` or ` undefined ` .
808
864
809
865
810
866
@@ -841,7 +897,10 @@ const myItemWithReference = useAgile(MY_COLLECTION.getItemWithReferenece('myItem
841
897
842
898
### 📄 Return
843
899
844
- An Item fitting to the passed ` itemKey ` or a ` placeholder ` Item.
900
+ ``` ts
901
+ Item
902
+ ```
903
+ An [ Item] ( ./Introduction.md#-item ) fitting to the passed ` itemKey ` or a ` placeholder ` Item.
845
904
846
905
847
906
@@ -875,6 +934,9 @@ MY_COLLECTION.getAllItems(); // Returns something like (see below)
875
934
876
935
### 📄 Return
877
936
937
+ ``` ts
938
+ Array < Item >
939
+ ```
878
940
All Items of the Collection.
879
941
880
942
@@ -909,6 +971,9 @@ MY_COLLECTION.getAllItemValues(); // Returns something like (see below)
909
971
910
972
### 📄 Return
911
973
974
+ ``` ts
975
+ Array < DataType > // DataType is by default '{[key: string]: any}'
976
+ ```
912
977
All Item ` values ` of the Collection.
913
978
914
979
@@ -997,6 +1062,10 @@ By `default`, it will be stored in the `default` Storage.
997
1062
| ` config ` | [ StatePersistentConfig] ( ../../../../Interfaces.md#statepersistentconfig ) | {} | Configuration | No |
998
1063
999
1064
### 📄 Return
1065
+
1066
+ ``` ts
1067
+ Collection
1068
+ ```
1000
1069
Returns the [ Collection] ( ./Introduction.md ) it was called on.
1001
1070
1002
1071
@@ -1028,6 +1097,9 @@ the persisted value got loaded.
1028
1097
1029
1098
### 📄 Return
1030
1099
1100
+ ``` ts
1101
+ Collection
1102
+ ```
1031
1103
Returns the [ Collection] ( ./Introduction.md ) it was called on.
1032
1104
1033
1105
@@ -1052,7 +1124,9 @@ since each Collection has a `default` Group.
1052
1124
1053
1125
### 📄 Return
1054
1126
1055
- ` number `
1127
+ ``` ts
1128
+ number
1129
+ ```
1056
1130
1057
1131
1058
1132
@@ -1074,7 +1148,9 @@ MY_COLLECTION.getSelectorCount(); // Returns 1
1074
1148
1075
1149
### 📄 Return
1076
1150
1077
- ` number `
1151
+ ``` ts
1152
+ number
1153
+ ```
1078
1154
1079
1155
1080
1156
@@ -1102,6 +1178,9 @@ MY_COLLECTION.reset(); //️ Collection Data is empty
1102
1178
1103
1179
### 📄 Return
1104
1180
1181
+ ``` ts
1182
+ Collection
1183
+ ```
1105
1184
Returns the [ Collection] ( ./Introduction.md ) it was called on.
1106
1185
1107
1186
@@ -1137,6 +1216,9 @@ Now `itemKey1`, `itemKey2`, `itemKey3` will be added to the Groups at `groupKey1
1137
1216
1138
1217
### 📄 Return
1139
1218
1219
+ ``` ts
1220
+ Collection
1221
+ ```
1140
1222
Returns the [ Collection] ( ./Introduction.md ) it was called on.
1141
1223
1142
1224
@@ -1173,6 +1255,9 @@ It takes care of:
1173
1255
1174
1256
### 📄 Return
1175
1257
1258
+ ``` ts
1259
+ Collection
1260
+ ```
1176
1261
Returns the [ Collection] ( ./Introduction.md ) it was called on.
1177
1262
1178
1263
@@ -1204,7 +1289,9 @@ MY_COLLECTION.getGroupKeysThatHaveItemKey('itemKey1'); // Returns '['group1']'
1204
1289
### 📄 Return
1205
1290
1206
1291
Returns an Array of ` itemKeys ` and if it couldn't find any ` itemKey ` it returns an empty Array.
1207
-
1292
+ ``` ts
1293
+ Array < number | string >
1294
+ ```
1208
1295
1209
1296
1210
1297
<br />
@@ -1220,31 +1307,33 @@ Returns an Array of `itemKeys` and if it couldn't find any `itemKey` it returns
1220
1307
With ` remove() ` we are able to remove Item/s from
1221
1308
1222
1309
- ### ` everywhere() `
1223
- Removes the Item/s at ` itemKey/s ` from the whole Collection and all Groups/Selectors, so from everywhere.
1310
+ Removes the Item/s at ` itemKey/s ` from the whole Collection and all [ Groups] ( ./group/Introduction.md ) / [ Selectors] ( ./selector/Introduction.md ) ,
1311
+ so from everywhere.
1224
1312
``` ts
1225
1313
MY_COLLECTION .remove (' item1' ).everywhere ();
1226
1314
```
1227
1315
1228
1316
- ### ` fromGroups() `
1229
- Removes the Item/s at ` itemKey/s ` only from specific Groups.
1317
+ Removes the Item/s at ` itemKey/s ` only from specific [ Groups] ( ./group/Introduction.md ) .
1230
1318
``` ts
1231
1319
MY_COLLECTION .remove (' item1' ).fromGroups ([' group1' , ' group2' ]);
1232
1320
```
1233
1321
1234
1322
::: info
1235
1323
1236
1324
Be aware that a standalone ` remove() ` doesn't do anything,
1237
- so we have always to add ` everywhere() ` or ` fromGroups() ` .
1325
+ so we always have to add ` . everywhere()` or ` . fromGroups()` .
1238
1326
1239
1327
:::
1240
1328
1241
1329
### 📭 Props
1242
1330
1243
1331
| Prop | Type | Default | Description | Required |
1244
1332
| ----------------------| -----------------------------------------------------------------------------------| ------------| -----------------------------------------------------------------------------------------------| ----------|
1245
- | ` itemKeys ` | number \| string | Array<number \| string \> | undefined | itemKey/s that get removed | Yes |
1333
+ | ` itemKeys ` | number \| string | Array<number \| string\> | undefined | itemKey/s that get removed | Yes |
1246
1334
1247
1335
### 📄 Return
1336
+
1248
1337
``` ts
1249
1338
{
1250
1339
fromGroups : (groups : Array <ItemKey > | ItemKey ) => this ;
0 commit comments