@genesislcap/foundation-store 14.128.0 → 14.130.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -140,6 +140,22 @@ export interface Store {
140
140
  * @returns An rxjs Observable of the value.
141
141
  */
142
142
  bindingAsRx<TReturn>(token?: ((store: this) => TReturn) | keyof this): RXObservable<TReturn | this>;
143
+ /**
144
+ * Lazily add store fragments.
145
+ *
146
+ * @param storeFragments - Store fragments to add.
147
+ *
148
+ * @public
149
+ */
150
+ addStoreFragments(...storeFragments: Store[]): void;
151
+ /**
152
+ * Lazily remove store fragments.
153
+ *
154
+ * @param storeFragments - Store fragments to remove.
155
+ *
156
+ * @public
157
+ */
158
+ removeStoreFragments(...storeFragments: Store[]): void;
143
159
  }
144
160
  /**
145
161
  * Root store interface.
@@ -268,11 +284,15 @@ export declare abstract class AbstractStore<TStore extends Store, TEventDetailMa
268
284
  *
269
285
  * @internal
270
286
  */
271
- protected readonly storeFragments: Store[];
287
+ protected storeFragments: Store[];
272
288
  /**
273
289
  * @param storeFragments - The child store fragments this store fragment will manage.
274
290
  */
275
291
  constructor(...storeFragments: Store[]);
292
+ /** {@inheritDoc Store.addStoreFragments} */
293
+ addStoreFragments(...storeFragments: Store[]): void;
294
+ /** {@inheritDoc Store.removeStoreFragments} */
295
+ removeStoreFragments(...storeFragments: Store[]): void;
276
296
  /**
277
297
  * The value commit proxy handler.
278
298
  *
@@ -327,21 +347,23 @@ export declare abstract class AbstractStore<TStore extends Store, TEventDetailMa
327
347
  /**
328
348
  * Connects the store fragment's child store fragments if any.
329
349
  * @param root - The store root fragment.
350
+ * @param storeFragments - Optional store fragments. Defaults to this.storeFragments. Used for lazy add.
330
351
  *
331
352
  * @internal
332
353
  * @privateRemarks
333
354
  * We have limited the connect and disconnect apis to store root only, so we need to cast these to invoke the same.
334
355
  */
335
- protected connectStoreFragments(root: TStoreRoot): void;
356
+ protected connectStoreFragments(root: TStoreRoot, storeFragments?: Store[]): void;
336
357
  /**
337
358
  * Disconnects the store fragment's child store fragments if any.
338
359
  * @param root - The store root fragment.
360
+ * @param storeFragments - Optional store fragments. Defaults to this.storeFragments. Used for lazy remove.
339
361
  *
340
362
  * @internal
341
363
  * @privateRemarks
342
364
  * We have limited the connect and disconnect apis to store root only, so we need to cast these to invoke the same.
343
365
  */
344
- protected disconnectStoreFragments(root: TStoreRoot): void;
366
+ protected disconnectStoreFragments(root: TStoreRoot, storeFragments?: Store[]): void;
345
367
  /**
346
368
  * Logs events.
347
369
  * @param key - The event key from the store fragment's event detail map.
@@ -1 +1 @@
1
- {"version":3,"file":"foundationStore.d.ts","sourceRoot":"","sources":["../../../src/store/foundationStore.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,EAAkB,QAAQ,EAAS,MAAM,+BAA+B,CAAC;AAChF,OAAO,EACL,eAAe,EACf,aAAa,EAEb,gBAAgB,EAGjB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAM,GAAG,EAAE,MAAM,4BAA4B,CAAC;AAErD,OAAO,EAAE,UAAU,IAAI,YAAY,EAAM,MAAM,MAAM,CAAC;AAItD;;;;GAIG;AACH,MAAM,MAAM,wBAAwB,CAAC,OAAO,GAAG,GAAG,IAAI,CACpD,KAAK,EAAE,OAAO,EACd,IAAI,EAAE,eAAe,KAClB,IAAI,CAAC;AAEV;;;;;;GAMG;AACH,MAAM,WAAW,KAAK;IACpB;;;;;;;OAOG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAEvB;;;;;;;;;;;;;;;;OAgBG;IACH,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,cAAc,CAAC,CAAC;IAE1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAgDG;IACH,OAAO,CAAC,OAAO,GAAG,GAAG,EAAE,OAAO,GAAG,GAAG,EAClC,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE,IAAI,KAAK,OAAO,CAAC,GAAG,M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AAM,CAAC,eAAe,GAAG,uBAAuB,CAAC;CAW9D;AAED;;;GAGG;AACH,MAAM,MAAM,uBAAuB,GAAG;IACpC,iBAAiB,EAAE,WAAW,CAAC;IAC/B,oBAAoB,EAAE,IAAI,CAAC;IAC3B,aAAa,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF;;;;;;;GAOG;AACH,8BAAsB,iBAAiB,CACnC,MAAM,SAAS,SAAS,EACxB,eAAe,SAAS,uBAAuB,GAAG,uBAAuB,EACzE,uBAAuB,SAAS,cAAc,GAAG,eAAe,CAElE,SAAQ,aAAa,CAAC,MAAM,EAAE,eAAe,EAAE,uBAAuB,CACtE,YAAW,SAAS;IAEpB,oCAAoC;IACxB,KAAK,EAAE,OAAO,CAAS;IAEnC,sCAAsC;IAC1B,OAAO,EAAE,WAAW,CAAC;IAEjC;;;;OAIG;IACH,SAAS,CAAC,IAAI,OAAQ;IAEtB;;;;;;;;OAQG;IACH,OAAO,CAAC,cAAc;IAWtB,WAAW,gBAGT;IACF,cAAc,gBAGZ;IACF,OAAO,gBAAuF;CAC/F"}
@@ -249,7 +249,21 @@ export class AbstractStore {
249
249
  * co-exist, and be presentable to the user via the UI for further action or dismissal.
250
250
  */
251
251
  this.createErrorListener = (keys, token) => this.createListenerType(EventListenerType.error, keys, token);
252
- this.storeFragments = storeFragments;
252
+ this.storeFragments = [...this.storeFragments, ...storeFragments];
253
+ }
254
+ /** {@inheritDoc Store.addStoreFragments} */
255
+ addStoreFragments(...storeFragments) {
256
+ this.storeFragments = [...this.storeFragments, ...storeFragments];
257
+ if (this.root.element) {
258
+ this.connectStoreFragments(this.root, storeFragments);
259
+ }
260
+ }
261
+ /** {@inheritDoc Store.removeStoreFragments} */
262
+ removeStoreFragments(...storeFragments) {
263
+ this.storeFragments = this.storeFragments.filter((store) => !storeFragments.includes(store));
264
+ if (this.root.element) {
265
+ this.disconnectStoreFragments(this.root, storeFragments);
266
+ }
253
267
  }
254
268
  /**
255
269
  * Alternative value commit api.
@@ -301,13 +315,14 @@ export class AbstractStore {
301
315
  /**
302
316
  * Connects the store fragment's child store fragments if any.
303
317
  * @param root - The store root fragment.
318
+ * @param storeFragments - Optional store fragments. Defaults to this.storeFragments. Used for lazy add.
304
319
  *
305
320
  * @internal
306
321
  * @privateRemarks
307
322
  * We have limited the connect and disconnect apis to store root only, so we need to cast these to invoke the same.
308
323
  */
309
- connectStoreFragments(root) {
310
- this.storeFragments.forEach((store) => {
324
+ connectStoreFragments(root, storeFragments = this.storeFragments) {
325
+ storeFragments.forEach((store) => {
311
326
  const connectableStore = store;
312
327
  connectableStore.connect(root);
313
328
  });
@@ -315,13 +330,14 @@ export class AbstractStore {
315
330
  /**
316
331
  * Disconnects the store fragment's child store fragments if any.
317
332
  * @param root - The store root fragment.
333
+ * @param storeFragments - Optional store fragments. Defaults to this.storeFragments. Used for lazy remove.
318
334
  *
319
335
  * @internal
320
336
  * @privateRemarks
321
337
  * We have limited the connect and disconnect apis to store root only, so we need to cast these to invoke the same.
322
338
  */
323
- disconnectStoreFragments(root) {
324
- this.storeFragments.forEach((store) => {
339
+ disconnectStoreFragments(root, storeFragments = this.storeFragments) {
340
+ storeFragments.forEach((store) => {
325
341
  const connectableStore = store;
326
342
  connectableStore.disconnect(root);
327
343
  });
@@ -333,6 +333,59 @@
333
333
  }
334
334
  ]
335
335
  },
336
+ {
337
+ "kind": "Method",
338
+ "canonicalReference": "@genesislcap/foundation-store!AbstractStore#addStoreFragments:member(1)",
339
+ "docComment": "/**\n * Lazily add store fragments.\n *\n * @param storeFragments - Store fragments to add.\n */\n",
340
+ "excerptTokens": [
341
+ {
342
+ "kind": "Content",
343
+ "text": "addStoreFragments(...storeFragments: "
344
+ },
345
+ {
346
+ "kind": "Reference",
347
+ "text": "Store",
348
+ "canonicalReference": "@genesislcap/foundation-store!Store:interface"
349
+ },
350
+ {
351
+ "kind": "Content",
352
+ "text": "[]"
353
+ },
354
+ {
355
+ "kind": "Content",
356
+ "text": "): "
357
+ },
358
+ {
359
+ "kind": "Content",
360
+ "text": "void"
361
+ },
362
+ {
363
+ "kind": "Content",
364
+ "text": ";"
365
+ }
366
+ ],
367
+ "isStatic": false,
368
+ "returnTypeTokenRange": {
369
+ "startIndex": 4,
370
+ "endIndex": 5
371
+ },
372
+ "releaseTag": "Public",
373
+ "isProtected": false,
374
+ "overloadIndex": 1,
375
+ "parameters": [
376
+ {
377
+ "parameterName": "storeFragments",
378
+ "parameterTypeTokenRange": {
379
+ "startIndex": 1,
380
+ "endIndex": 3
381
+ },
382
+ "isOptional": false
383
+ }
384
+ ],
385
+ "isOptional": false,
386
+ "isAbstract": false,
387
+ "name": "addStoreFragments"
388
+ },
336
389
  {
337
390
  "kind": "Method",
338
391
  "canonicalReference": "@genesislcap/foundation-store!AbstractStore#binding:member(1)",
@@ -1294,6 +1347,59 @@
1294
1347
  "isProtected": false,
1295
1348
  "isAbstract": false
1296
1349
  },
1350
+ {
1351
+ "kind": "Method",
1352
+ "canonicalReference": "@genesislcap/foundation-store!AbstractStore#removeStoreFragments:member(1)",
1353
+ "docComment": "/**\n * Lazily remove store fragments.\n *\n * @param storeFragments - Store fragments to remove.\n */\n",
1354
+ "excerptTokens": [
1355
+ {
1356
+ "kind": "Content",
1357
+ "text": "removeStoreFragments(...storeFragments: "
1358
+ },
1359
+ {
1360
+ "kind": "Reference",
1361
+ "text": "Store",
1362
+ "canonicalReference": "@genesislcap/foundation-store!Store:interface"
1363
+ },
1364
+ {
1365
+ "kind": "Content",
1366
+ "text": "[]"
1367
+ },
1368
+ {
1369
+ "kind": "Content",
1370
+ "text": "): "
1371
+ },
1372
+ {
1373
+ "kind": "Content",
1374
+ "text": "void"
1375
+ },
1376
+ {
1377
+ "kind": "Content",
1378
+ "text": ";"
1379
+ }
1380
+ ],
1381
+ "isStatic": false,
1382
+ "returnTypeTokenRange": {
1383
+ "startIndex": 4,
1384
+ "endIndex": 5
1385
+ },
1386
+ "releaseTag": "Public",
1387
+ "isProtected": false,
1388
+ "overloadIndex": 1,
1389
+ "parameters": [
1390
+ {
1391
+ "parameterName": "storeFragments",
1392
+ "parameterTypeTokenRange": {
1393
+ "startIndex": 1,
1394
+ "endIndex": 3
1395
+ },
1396
+ "isOptional": false
1397
+ }
1398
+ ],
1399
+ "isOptional": false,
1400
+ "isAbstract": false,
1401
+ "name": "removeStoreFragments"
1402
+ },
1297
1403
  {
1298
1404
  "kind": "Property",
1299
1405
  "canonicalReference": "@genesislcap/foundation-store!AbstractStore#root:member",
@@ -1991,6 +2097,56 @@
1991
2097
  "name": "Store",
1992
2098
  "preserveMemberOrder": false,
1993
2099
  "members": [
2100
+ {
2101
+ "kind": "MethodSignature",
2102
+ "canonicalReference": "@genesislcap/foundation-store!Store#addStoreFragments:member(1)",
2103
+ "docComment": "/**\n * Lazily add store fragments.\n *\n * @param storeFragments - Store fragments to add.\n *\n * @public\n */\n",
2104
+ "excerptTokens": [
2105
+ {
2106
+ "kind": "Content",
2107
+ "text": "addStoreFragments(...storeFragments: "
2108
+ },
2109
+ {
2110
+ "kind": "Reference",
2111
+ "text": "Store",
2112
+ "canonicalReference": "@genesislcap/foundation-store!Store:interface"
2113
+ },
2114
+ {
2115
+ "kind": "Content",
2116
+ "text": "[]"
2117
+ },
2118
+ {
2119
+ "kind": "Content",
2120
+ "text": "): "
2121
+ },
2122
+ {
2123
+ "kind": "Content",
2124
+ "text": "void"
2125
+ },
2126
+ {
2127
+ "kind": "Content",
2128
+ "text": ";"
2129
+ }
2130
+ ],
2131
+ "isOptional": false,
2132
+ "returnTypeTokenRange": {
2133
+ "startIndex": 4,
2134
+ "endIndex": 5
2135
+ },
2136
+ "releaseTag": "Public",
2137
+ "overloadIndex": 1,
2138
+ "parameters": [
2139
+ {
2140
+ "parameterName": "storeFragments",
2141
+ "parameterTypeTokenRange": {
2142
+ "startIndex": 1,
2143
+ "endIndex": 3
2144
+ },
2145
+ "isOptional": false
2146
+ }
2147
+ ],
2148
+ "name": "addStoreFragments"
2149
+ },
1994
2150
  {
1995
2151
  "kind": "MethodSignature",
1996
2152
  "canonicalReference": "@genesislcap/foundation-store!Store#binding:member(1)",
@@ -2432,6 +2588,56 @@
2432
2588
  "startIndex": 1,
2433
2589
  "endIndex": 2
2434
2590
  }
2591
+ },
2592
+ {
2593
+ "kind": "MethodSignature",
2594
+ "canonicalReference": "@genesislcap/foundation-store!Store#removeStoreFragments:member(1)",
2595
+ "docComment": "/**\n * Lazily remove store fragments.\n *\n * @param storeFragments - Store fragments to remove.\n *\n * @public\n */\n",
2596
+ "excerptTokens": [
2597
+ {
2598
+ "kind": "Content",
2599
+ "text": "removeStoreFragments(...storeFragments: "
2600
+ },
2601
+ {
2602
+ "kind": "Reference",
2603
+ "text": "Store",
2604
+ "canonicalReference": "@genesislcap/foundation-store!Store:interface"
2605
+ },
2606
+ {
2607
+ "kind": "Content",
2608
+ "text": "[]"
2609
+ },
2610
+ {
2611
+ "kind": "Content",
2612
+ "text": "): "
2613
+ },
2614
+ {
2615
+ "kind": "Content",
2616
+ "text": "void"
2617
+ },
2618
+ {
2619
+ "kind": "Content",
2620
+ "text": ";"
2621
+ }
2622
+ ],
2623
+ "isOptional": false,
2624
+ "returnTypeTokenRange": {
2625
+ "startIndex": 4,
2626
+ "endIndex": 5
2627
+ },
2628
+ "releaseTag": "Public",
2629
+ "overloadIndex": 1,
2630
+ "parameters": [
2631
+ {
2632
+ "parameterName": "storeFragments",
2633
+ "parameterTypeTokenRange": {
2634
+ "startIndex": 1,
2635
+ "endIndex": 3
2636
+ },
2637
+ "isOptional": false
2638
+ }
2639
+ ],
2640
+ "name": "removeStoreFragments"
2435
2641
  }
2436
2642
  ],
2437
2643
  "extendsTokenRanges": []
@@ -38,11 +38,15 @@ export declare abstract class AbstractStore<TStore extends Store, TEventDetailMa
38
38
  *
39
39
  * @internal
40
40
  */
41
- protected readonly storeFragments: Store[];
41
+ protected storeFragments: Store[];
42
42
  /**
43
43
  * @param storeFragments - The child store fragments this store fragment will manage.
44
44
  */
45
45
  constructor(...storeFragments: Store[]);
46
+ /** {@inheritDoc Store.addStoreFragments} */
47
+ addStoreFragments(...storeFragments: Store[]): void;
48
+ /** {@inheritDoc Store.removeStoreFragments} */
49
+ removeStoreFragments(...storeFragments: Store[]): void;
46
50
  /**
47
51
  * The value commit proxy handler.
48
52
  *
@@ -97,21 +101,23 @@ export declare abstract class AbstractStore<TStore extends Store, TEventDetailMa
97
101
  /**
98
102
  * Connects the store fragment's child store fragments if any.
99
103
  * @param root - The store root fragment.
104
+ * @param storeFragments - Optional store fragments. Defaults to this.storeFragments. Used for lazy add.
100
105
  *
101
106
  * @internal
102
107
  * @privateRemarks
103
108
  * We have limited the connect and disconnect apis to store root only, so we need to cast these to invoke the same.
104
109
  */
105
- protected connectStoreFragments(root: TStoreRoot): void;
110
+ protected connectStoreFragments(root: TStoreRoot, storeFragments?: Store[]): void;
106
111
  /**
107
112
  * Disconnects the store fragment's child store fragments if any.
108
113
  * @param root - The store root fragment.
114
+ * @param storeFragments - Optional store fragments. Defaults to this.storeFragments. Used for lazy remove.
109
115
  *
110
116
  * @internal
111
117
  * @privateRemarks
112
118
  * We have limited the connect and disconnect apis to store root only, so we need to cast these to invoke the same.
113
119
  */
114
- protected disconnectStoreFragments(root: TStoreRoot): void;
120
+ protected disconnectStoreFragments(root: TStoreRoot, storeFragments?: Store[]): void;
115
121
  /**
116
122
  * Logs events.
117
123
  * @param key - The event key from the store fragment's event detail map.
@@ -519,6 +525,22 @@ export declare interface Store {
519
525
  * @returns An rxjs Observable of the value.
520
526
  */
521
527
  bindingAsRx<TReturn>(token?: ((store: this) => TReturn) | keyof this): Observable<TReturn | this>;
528
+ /**
529
+ * Lazily add store fragments.
530
+ *
531
+ * @param storeFragments - Store fragments to add.
532
+ *
533
+ * @public
534
+ */
535
+ addStoreFragments(...storeFragments: Store[]): void;
536
+ /**
537
+ * Lazily remove store fragments.
538
+ *
539
+ * @param storeFragments - Store fragments to remove.
540
+ *
541
+ * @public
542
+ */
543
+ removeStoreFragments(...storeFragments: Store[]): void;
522
544
  }
523
545
 
524
546
  /**
@@ -0,0 +1,24 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@genesislcap/foundation-store](./foundation-store.md) &gt; [AbstractStore](./foundation-store.abstractstore.md) &gt; [addStoreFragments](./foundation-store.abstractstore.addstorefragments.md)
4
+
5
+ ## AbstractStore.addStoreFragments() method
6
+
7
+ Lazily add store fragments.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ addStoreFragments(...storeFragments: Store[]): void;
13
+ ```
14
+
15
+ ## Parameters
16
+
17
+ | Parameter | Type | Description |
18
+ | --- | --- | --- |
19
+ | storeFragments | [Store](./foundation-store.store.md)<!-- -->\[\] | Store fragments to add. |
20
+
21
+ **Returns:**
22
+
23
+ void
24
+
@@ -35,6 +35,7 @@ export declare abstract class AbstractStore<TStore extends Store, TEventDetailMa
35
35
 
36
36
  | Method | Modifiers | Description |
37
37
  | --- | --- | --- |
38
+ | [addStoreFragments(storeFragments)](./foundation-store.abstractstore.addstorefragments.md) | | Lazily add store fragments. |
38
39
  | [binding(token, subscriberChangeCallback, isVolatileBinding, context)](./foundation-store.abstractstore.binding.md) | | An api to allow the observation of values and arbitrary bindings outside the template engine. |
39
40
  | [bindingAsRx()](./foundation-store.abstractstore.bindingasrx.md) | | |
40
41
  | [bindingAsRx(key)](./foundation-store.abstractstore.bindingasrx_1.md) | | |
@@ -44,4 +45,5 @@ export declare abstract class AbstractStore<TStore extends Store, TEventDetailMa
44
45
  | [disconnect(root)](./foundation-store.abstractstore.disconnect.md) | | Disconnects this store fragment. |
45
46
  | [emit(args)](./foundation-store.abstractstore.emit.md) | <code>protected</code> | Emit events to the stores directly via the standard event flow. |
46
47
  | [invokeAsyncAPI(api, error, success)](./foundation-store.abstractstore.invokeasyncapi.md) | <code>protected</code> | A convenience method to invoke an async api and emit success and error events. |
48
+ | [removeStoreFragments(storeFragments)](./foundation-store.abstractstore.removestorefragments.md) | | Lazily remove store fragments. |
47
49
 
@@ -0,0 +1,24 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@genesislcap/foundation-store](./foundation-store.md) &gt; [AbstractStore](./foundation-store.abstractstore.md) &gt; [removeStoreFragments](./foundation-store.abstractstore.removestorefragments.md)
4
+
5
+ ## AbstractStore.removeStoreFragments() method
6
+
7
+ Lazily remove store fragments.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ removeStoreFragments(...storeFragments: Store[]): void;
13
+ ```
14
+
15
+ ## Parameters
16
+
17
+ | Parameter | Type | Description |
18
+ | --- | --- | --- |
19
+ | storeFragments | [Store](./foundation-store.store.md)<!-- -->\[\] | Store fragments to remove. |
20
+
21
+ **Returns:**
22
+
23
+ void
24
+
@@ -0,0 +1,24 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@genesislcap/foundation-store](./foundation-store.md) &gt; [Store](./foundation-store.store.md) &gt; [addStoreFragments](./foundation-store.store.addstorefragments.md)
4
+
5
+ ## Store.addStoreFragments() method
6
+
7
+ Lazily add store fragments.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ addStoreFragments(...storeFragments: Store[]): void;
13
+ ```
14
+
15
+ ## Parameters
16
+
17
+ | Parameter | Type | Description |
18
+ | --- | --- | --- |
19
+ | storeFragments | [Store](./foundation-store.store.md)<!-- -->\[\] | Store fragments to add. |
20
+
21
+ **Returns:**
22
+
23
+ void
24
+
@@ -27,9 +27,11 @@ The public interface available on the injected store fragment.
27
27
 
28
28
  | Method | Description |
29
29
  | --- | --- |
30
+ | [addStoreFragments(storeFragments)](./foundation-store.store.addstorefragments.md) | Lazily add store fragments. |
30
31
  | [binding(token, subscriberChangeCallback, isVolatileBinding, context)](./foundation-store.store.binding.md) | An api to allow the observation of values and arbitrary bindings outside the template engine. |
31
32
  | [bindingAsRx()](./foundation-store.store.bindingasrx.md) | An api to allow the observation of values and arbitrary bindings as Rx observables. |
32
33
  | [bindingAsRx(key)](./foundation-store.store.bindingasrx_1.md) | |
33
34
  | [bindingAsRx(getter)](./foundation-store.store.bindingasrx_2.md) | |
34
35
  | [bindingAsRx(token)](./foundation-store.store.bindingasrx_3.md) | |
36
+ | [removeStoreFragments(storeFragments)](./foundation-store.store.removestorefragments.md) | Lazily remove store fragments. |
35
37
 
@@ -0,0 +1,24 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@genesislcap/foundation-store](./foundation-store.md) &gt; [Store](./foundation-store.store.md) &gt; [removeStoreFragments](./foundation-store.store.removestorefragments.md)
4
+
5
+ ## Store.removeStoreFragments() method
6
+
7
+ Lazily remove store fragments.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ removeStoreFragments(...storeFragments: Store[]): void;
13
+ ```
14
+
15
+ ## Parameters
16
+
17
+ | Parameter | Type | Description |
18
+ | --- | --- | --- |
19
+ | storeFragments | [Store](./foundation-store.store.md)<!-- -->\[\] | Store fragments to remove. |
20
+
21
+ **Returns:**
22
+
23
+ void
24
+
@@ -18,6 +18,7 @@ export abstract class AbstractStore<TStore extends Store, TEventDetailMap extend
18
18
  constructor(...storeFragments: Store[]);
19
19
  // @internal
20
20
  protected addEventListeners(element: HTMLElement): void;
21
+ addStoreFragments(...storeFragments: Store[]): void;
21
22
  binding<TReturn = any, TParent = any>(token: ((store: this) => TReturn) | keyof this, subscriberChangeCallback?: SubscriberChangeCallback<TReturn> | undefined, isVolatileBinding?: boolean, context?: ExecutionContext): BindingObserver<this, TReturn, TParent>;
22
23
  // Warning: (ae-unresolved-inheritdoc-reference) The @inheritDoc reference could not be resolved: The reference is ambiguous because "bindingAsRx" has more than one declaration; you need to add a TSDoc member reference selector
23
24
  //
@@ -39,7 +40,7 @@ export abstract class AbstractStore<TStore extends Store, TEventDetailMap extend
39
40
  protected commitValue<K extends keyof TStore>(key: K, value: TStore[K]): void;
40
41
  connect(root: TStoreRoot): void;
41
42
  // @internal
42
- protected connectStoreFragments(root: TStoreRoot): void;
43
+ protected connectStoreFragments(root: TStoreRoot, storeFragments?: Store[]): void;
43
44
  // Warning: (ae-incompatible-release-tags) The symbol "createAsyncListener" is marked as @public, but its signature references "KeyOrKeys" which is marked as @internal
44
45
  protected createAsyncListener: <TDetail = void, TReturn = void>(keys: KeyOrKeys<TEventDetailMap & TInternalEventDetailMap>, token: (detail: TDetail, event?: CustomEvent<TDetail>) => Promise<TReturn>) => EventListener;
45
46
  // Warning: (ae-incompatible-release-tags) The symbol "createErrorListener" is marked as @public, but its signature references "KeyOrKeys" which is marked as @internal
@@ -48,16 +49,17 @@ export abstract class AbstractStore<TStore extends Store, TEventDetailMap extend
48
49
  protected createListener: <TDetail = void>(keys: KeyOrKeys<TEventDetailMap & TInternalEventDetailMap>, token: (detail: TDetail, event?: CustomEvent<TDetail>) => void) => EventListener;
49
50
  disconnect(root: TStoreRoot): void;
50
51
  // @internal
51
- protected disconnectStoreFragments(root: TStoreRoot): void;
52
+ protected disconnectStoreFragments(root: TStoreRoot, storeFragments?: Store[]): void;
52
53
  protected emit<K extends keyof (TEventDetailMap & TInternalEventDetailMap) & string>(...args: (TEventDetailMap & TInternalEventDetailMap)[K] extends void ? [key: K] : [key: K, detail: (TEventDetailMap & TInternalEventDetailMap)[K]]): void;
53
54
  errors: ErrorMap_2<TEventDetailMap & TInternalEventDetailMap>;
54
55
  protected invokeAsyncAPI<TResult>(api: () => Promise<TResult>, error: keyof (TEventDetailMap & TInternalEventDetailMap), success?: keyof (TEventDetailMap & TInternalEventDetailMap)): Promise<void>;
55
56
  get name(): string;
56
57
  // @internal
57
58
  protected removeEventListeners(element: HTMLElement): void;
59
+ removeStoreFragments(...storeFragments: Store[]): void;
58
60
  protected root: TStoreRoot;
59
61
  // @internal
60
- protected readonly storeFragments: Store[];
62
+ protected storeFragments: Store[];
61
63
  }
62
64
 
63
65
  // @public
@@ -111,6 +113,7 @@ export const registerStore: <K extends Key>(Base: Constructable<Store>, name?: s
111
113
 
112
114
  // @public
113
115
  export interface Store {
116
+ addStoreFragments(...storeFragments: Store[]): void;
114
117
  binding<TReturn = any, TParent = any>(token: ((store: this) => TReturn) | keyof this, subscriberChangeCallback?: SubscriberChangeCallback<TReturn> | undefined, isVolatileBinding?: boolean, context?: ExecutionContext): BindingObserver<this, TReturn, TParent>;
115
118
  bindingAsRx(): Observable<this>;
116
119
  // Warning: (ae-unresolved-inheritdoc-reference) The @inheritDoc reference could not be resolved: The reference is ambiguous because "bindingAsRx" has more than one declaration; you need to add a TSDoc member reference selector
@@ -128,6 +131,7 @@ export interface Store {
128
131
  readonly errors: ErrorMap_2<EventDetailMap>;
129
132
  // @virtual
130
133
  readonly name?: string;
134
+ removeStoreFragments(...storeFragments: Store[]): void;
131
135
  }
132
136
 
133
137
  // @public (undocumented)
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@genesislcap/foundation-store",
3
3
  "description": "Genesis Foundation Store",
4
- "version": "14.128.0",
4
+ "version": "14.130.0",
5
5
  "sideEffects": false,
6
6
  "license": "SEE LICENSE IN license.txt",
7
7
  "main": "dist/esm/index.js",
@@ -27,14 +27,14 @@
27
27
  "test:coverage": "genx test --coverage"
28
28
  },
29
29
  "devDependencies": {
30
- "@genesislcap/foundation-testing": "14.128.0",
31
- "@genesislcap/genx": "14.128.0",
30
+ "@genesislcap/foundation-testing": "14.130.0",
31
+ "@genesislcap/genx": "14.130.0",
32
32
  "rimraf": "^3.0.2"
33
33
  },
34
34
  "dependencies": {
35
- "@genesislcap/foundation-events": "14.128.0",
36
- "@genesislcap/foundation-logger": "14.128.0",
37
- "@genesislcap/foundation-utils": "14.128.0",
35
+ "@genesislcap/foundation-events": "14.130.0",
36
+ "@genesislcap/foundation-logger": "14.130.0",
37
+ "@genesislcap/foundation-utils": "14.130.0",
38
38
  "@microsoft/fast-element": "^1.12.0",
39
39
  "@microsoft/fast-foundation": "^2.49.4",
40
40
  "@microsoft/fast-web-utilities": "^5.4.1",
@@ -50,5 +50,5 @@
50
50
  "publishConfig": {
51
51
  "access": "public"
52
52
  },
53
- "gitHead": "5fc8cef3a47b0b518e28d67f03b3ac7f4df99b38"
53
+ "gitHead": "71ae81e8e14cdc1564c23459c56db3b53b1f1109"
54
54
  }