@arrai-innovations/reactive-helpers 13.1.0 → 14.0.2

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.
Files changed (51) hide show
  1. package/README.md +11 -1
  2. package/config/listCrud.js +4 -1
  3. package/config/objectCrud.js +10 -4
  4. package/docs/README.md +1 -1
  5. package/docs/config/listCrud.md +20 -2
  6. package/docs/config/objectCrud.md +51 -15
  7. package/docs/use/list.md +6 -0
  8. package/docs/use/listCalculated.md +58 -39
  9. package/docs/use/listFilter.md +57 -39
  10. package/docs/use/listInstance.md +29 -11
  11. package/docs/use/listRelated.md +47 -28
  12. package/docs/use/listSearch.md +40 -28
  13. package/docs/use/listSort.md +58 -39
  14. package/docs/use/listSubscription.md +8 -2
  15. package/docs/use/object.md +28 -14
  16. package/docs/use/objectCalculated.md +26 -13
  17. package/docs/use/objectInstance.md +49 -24
  18. package/docs/use/objectRelated.md +27 -14
  19. package/docs/use/objectSubscription.md +18 -9
  20. package/docs/use/paginatedListInstance.md +8 -2
  21. package/docs/use/search.md +8 -2
  22. package/docs/utils/{getFakeId.md → getFakePk.md} +7 -7
  23. package/index.js +1 -1
  24. package/package.json +1 -1
  25. package/tests/unit/use/listCalculated.spec.js +4 -4
  26. package/tests/unit/use/listFilter.spec.js +10 -9
  27. package/tests/unit/use/listInstance.spec.js +147 -23
  28. package/tests/unit/use/listRelated.spec.js +5 -5
  29. package/tests/unit/use/listSearch.spec.js +14 -12
  30. package/tests/unit/use/listSort.spec.js +8 -1
  31. package/tests/unit/use/listSubscription.spec.js +119 -10
  32. package/tests/unit/use/objectInstance.spec.js +575 -46
  33. package/tests/unit/use/objectSubscription.spec.js +152 -23
  34. package/tests/unit/use/search.spec.js +11 -11
  35. package/use/list.js +1 -0
  36. package/use/listCalculated.js +3 -2
  37. package/use/listFilter.js +9 -9
  38. package/use/listInstance.js +39 -28
  39. package/use/listKeys.js +4 -3
  40. package/use/listRelated.js +23 -22
  41. package/use/listSearch.js +37 -33
  42. package/use/listSort.js +1 -0
  43. package/use/listSubscription.js +25 -15
  44. package/use/object.js +8 -13
  45. package/use/objectCalculated.js +2 -1
  46. package/use/objectInstance.js +29 -14
  47. package/use/objectRelated.js +3 -2
  48. package/use/objectSubscription.js +31 -11
  49. package/use/paginatedListInstance.js +1 -1
  50. package/use/search.js +13 -4
  51. package/utils/{getFakeId.js → getFakePk.js} +4 -4
package/README.md CHANGED
@@ -90,6 +90,7 @@ const listProps = reactive({
90
90
  crudArgs: {
91
91
  stream: "contacts",
92
92
  },
93
+ pkKey: "id",
93
94
  retrieveArgs: {
94
95
  fields: ["id", "has_name", "lexical_name", "organization", "phone"],
95
96
  },
@@ -156,6 +157,7 @@ const listProps = reactive({
156
157
  subscribeAction: "subscribe_contacts",
157
158
  unsubscribeAction: "unsubscribe_contacts",
158
159
  },
160
+ pkKey: "id",
159
161
  retrieveArgs: {
160
162
  fields: ["id", "has_name", "lexical_name", "organization", "phone"],
161
163
  },
@@ -218,6 +220,7 @@ import { useListInstance, useListRelated, doAwaitNot } from "@arrai-innovations/
218
220
  import { reactive, toRef } from "vue";
219
221
 
220
222
  const organizationsProps = reactive({
223
+ pkKey: "id",
221
224
  retrieveArgs: {
222
225
  fields: ["id", "name"],
223
226
  },
@@ -226,6 +229,7 @@ const organizations = useListInstance({
226
229
  props: organizationsProps,
227
230
  });
228
231
  const contactsProps = reactive({
232
+ pkKey: "id",
229
233
  retrieveArgs: {
230
234
  fields: ["id", "lexical_name", "organization"],
231
235
  },
@@ -301,6 +305,7 @@ import { useListInstance, useListCalculated } from "@arrai-innovations/reactive-
301
305
  import { nextTick, reactive } from "vue";
302
306
 
303
307
  const contactsProps = reactive({
308
+ pkKey: "id",
304
309
  retrieveArgs: {
305
310
  fields: ["id", "has_name", "has_billing", "lexical_name", "organization"],
306
311
  },
@@ -355,6 +360,7 @@ import { useListInstance, useListFilter, doAwaitNot } from "@arrai-innovations/r
355
360
  import { reactive, ref } from "vue";
356
361
 
357
362
  const contactsProps = reactive({
363
+ pkKey: "id",
358
364
  retrieveArgs: {
359
365
  fields: ["id", "has_name", "has_billing", "lexical_name", "organization"],
360
366
  },
@@ -399,6 +405,7 @@ import { useListInstance, useListSearch, doAwaitNot } from "@arrai-innovations/r
399
405
  import { reactive } from "vue";
400
406
 
401
407
  const contactsProps = reactive({
408
+ pkKey: "id",
402
409
  retrieveArgs: {
403
410
  fields: ["id", "has_name", "has_billing", "lexical_name", "organization"],
404
411
  },
@@ -443,6 +450,7 @@ import { useListInstance, useListSort, doAwaitNot } from "@arrai-innovations/rea
443
450
  import { reactive } from "vue";
444
451
 
445
452
  const contactsProps = reactive({
453
+ pkKey: "id",
446
454
  retrieveArgs: {
447
455
  fields: ["id", "has_name", "lexical_name", "organization"],
448
456
  },
@@ -487,6 +495,7 @@ const managedListProps = reactive({
487
495
  subscribeAction: "subscribe_contacts",
488
496
  unsubscribeAction: "unsubscribe_contacts",
489
497
  },
498
+ pkKey: "id",
490
499
  retrieveArgs: {
491
500
  fields: ["id", "has_name", "lexical_name", "organization", "phone"],
492
501
  },
@@ -664,7 +673,8 @@ const managedObjectProps = reactive({
664
673
  retrieveArgs: {
665
674
  fields: ["id", "has_name", "lexical_name", "organization", "phone"],
666
675
  },
667
- id: contactId,
676
+ pk: contactId,
677
+ pkKey: "id",
668
678
  relatedObjectRules: {
669
679
  organization: {
670
680
  // desired key on relatedObjects
@@ -33,6 +33,7 @@ const defaultCrud = {
33
33
  /**
34
34
  * @typedef {object} ListFnArgs
35
35
  * @property {object} crudArgs - The arguments to be passed to the crud functions.
36
+ * @property {string} pkKey - The key name of the primary key.
36
37
  * @property {object} retrieveArgs - The arguments to be passed to the retrieve function.
37
38
  * @property {object} listArgs - The arguments to be passed for list crud functions.
38
39
  * @property {PageCallback} pageCallback - The method to call with new page(s) of data received.
@@ -43,7 +44,8 @@ const defaultCrud = {
43
44
  /**
44
45
  * @typedef {object} DeleteFnArgs
45
46
  * @property {object} crudArgs - The arguments to be passed to the crud functions.
46
- * @property {string[]} ids - The ids of the objects to be deleted.
47
+ * @property {string[]} pks - The ids of the objects to be deleted.
48
+ * @property {string} pkKey - The key name of the primary key.
47
49
  */
48
50
 
49
51
  /**
@@ -56,6 +58,7 @@ const defaultCrud = {
56
58
  /**
57
59
  * @typedef {object} SubscribeFnArgs
58
60
  * @property {object} crudArgs - The arguments to be passed to the crud functions.
61
+ * @property {string} pkKey - The key name of the primary key.
59
62
  * @property {object} retrieveArgs - The arguments to be passed to the retrieve function.
60
63
  * @property {object} listArgs - The arguments to be passed for list crud functions.
61
64
  * @property {SubscriptionEventCallback} subscriptionEventCallback - The method to call when new data is received.
@@ -31,12 +31,14 @@ const defaultCrud = {
31
31
  * @property {object} crudArgs - The arguments to be passed to the crud functions.
32
32
  * @property {object} object - The data to be acted upon.
33
33
  * @property {object} retrieveArgs - The arguments to be passed to the retrieve function.
34
+ * @property {string} pkKey - The key name of the primary key.
34
35
  */
35
36
 
36
37
  /**
37
38
  * @typedef {object} RetrieveDetailArgs
38
39
  * @property {object} crudArgs - The arguments to be passed to the crud functions.
39
- * @property {string} id - The id of the object to be acted upon.
40
+ * @property {string} pk - The pk of the object to be acted upon.
41
+ * @property {string} pkKey - The key name of the primary key.
40
42
  * @property {object} retrieveArgs - The arguments to be passed to the retrieve function.
41
43
  */
42
44
 
@@ -45,19 +47,22 @@ const defaultCrud = {
45
47
  * @property {object} crudArgs - The arguments to be passed to the crud functions.
46
48
  * @property {import('../use/objectInstance.js').CrudObject} object - The data to be acted upon.
47
49
  * @property {object} retrieveArgs - The arguments to be passed to the retrieve function.
50
+ * @property {string} pkKey - The key name of the primary key.
48
51
  */
49
52
 
50
53
  /**
51
54
  * @typedef {object} DeleteDetailArgs
52
55
  * @property {object} crudArgs - The arguments to be passed to the crud functions.
53
- * @property {string} id - The id of the object to be acted upon.
56
+ * @property {string} pk - The pk of the object to be acted upon.
57
+ * @property {string} pkKey - The key name of the primary key.
54
58
  * @property {object} retrieveArgs - The arguments to be passed to the retrieve function.
55
59
  */
56
60
 
57
61
  /**
58
62
  * @typedef {object} PartialDetailArgs
59
63
  * @property {object} crudArgs - The arguments to be passed to the crud functions.
60
- * @property {string} id - The id of the object to be acted upon.
64
+ * @property {string} pk - The pk of the object to be acted upon.
65
+ * @property {string} pkKey - The key name of the primary key.
61
66
  * @property {object} partialObject - The data to be acted upon.
62
67
  * @property {object} retrieveArgs - The arguments to be passed to the retrieve function.
63
68
  */
@@ -65,7 +70,8 @@ const defaultCrud = {
65
70
  /**
66
71
  * @typedef {object} SubscribeArgs
67
72
  * @property {object} crudArgs - The arguments to be passed to the crud functions.
68
- * @property {string} id - The id of the object to be acted upon.
73
+ * @property {string} pk - The pk of the object to be acted upon.
74
+ * @property {string} pkKey - The key name of the primary key.
69
75
  * @property {object} retrieveArgs - The arguments to be passed to the retrieve function.
70
76
  * @property {(
71
77
  * data:import('../use/objectInstance.js').CrudObject, action:string
package/docs/README.md CHANGED
@@ -34,7 +34,7 @@
34
34
  - [utils/compact](utils/compact.md)
35
35
  - [utils/deleteKey](utils/deleteKey.md)
36
36
  - [utils/flattenPaths](utils/flattenPaths.md)
37
- - [utils/getFakeId](utils/getFakeId.md)
37
+ - [utils/getFakePk](utils/getFakePk.md)
38
38
  - [utils/keyDiff](utils/keyDiff.md)
39
39
  - [utils/loadingCombine](utils/loadingCombine.md)
40
40
  - [utils/proxyRunning](utils/proxyRunning.md)
@@ -18,9 +18,15 @@
18
18
 
19
19
  The arguments to be passed to the crud functions.
20
20
 
21
- ##### ids
21
+ ##### pkKey
22
22
 
23
- > **ids**: `string`[]
23
+ > **pkKey**: `string`
24
+
25
+ The key name of the primary key.
26
+
27
+ ##### pks
28
+
29
+ > **pks**: `string`[]
24
30
 
25
31
  The ids of the objects to be deleted.
26
32
 
@@ -91,6 +97,12 @@ The arguments to be passed for list crud functions.
91
97
 
92
98
  The method to call with new page(s) of data received.
93
99
 
100
+ ##### pkKey
101
+
102
+ > **pkKey**: `string`
103
+
104
+ The key name of the primary key.
105
+
94
106
  ##### retrieveArgs
95
107
 
96
108
  > **retrieveArgs**: `any`
@@ -139,6 +151,12 @@ The arguments to be passed to the crud functions.
139
151
 
140
152
  The arguments to be passed for list crud functions.
141
153
 
154
+ ##### pkKey
155
+
156
+ > **pkKey**: `string`
157
+
158
+ The key name of the primary key.
159
+
142
160
  ##### retrieveArgs
143
161
 
144
162
  > **retrieveArgs**: `any`
@@ -24,6 +24,12 @@ The arguments to be passed to the crud functions.
24
24
 
25
25
  The data to be acted upon.
26
26
 
27
+ ##### pkKey
28
+
29
+ > **pkKey**: `string`
30
+
31
+ The key name of the primary key.
32
+
27
33
  ##### retrieveArgs
28
34
 
29
35
  > **retrieveArgs**: `any`
@@ -42,11 +48,17 @@ The arguments to be passed to the retrieve function.
42
48
 
43
49
  The arguments to be passed to the crud functions.
44
50
 
45
- ##### id
51
+ ##### pk
52
+
53
+ > **pk**: `string`
54
+
55
+ The pk of the object to be acted upon.
56
+
57
+ ##### pkKey
46
58
 
47
- > **id**: `string`
59
+ > **pkKey**: `string`
48
60
 
49
- The id of the object to be acted upon.
61
+ The key name of the primary key.
50
62
 
51
63
  ##### retrieveArgs
52
64
 
@@ -168,18 +180,24 @@ A function to be used instead of the default crud update function.
168
180
 
169
181
  The arguments to be passed to the crud functions.
170
182
 
171
- ##### id
172
-
173
- > **id**: `string`
174
-
175
- The id of the object to be acted upon.
176
-
177
183
  ##### partialObject
178
184
 
179
185
  > **partialObject**: `any`
180
186
 
181
187
  The data to be acted upon.
182
188
 
189
+ ##### pk
190
+
191
+ > **pk**: `string`
192
+
193
+ The pk of the object to be acted upon.
194
+
195
+ ##### pkKey
196
+
197
+ > **pkKey**: `string`
198
+
199
+ The key name of the primary key.
200
+
183
201
  ##### retrieveArgs
184
202
 
185
203
  > **retrieveArgs**: `any`
@@ -198,11 +216,17 @@ The arguments to be passed to the retrieve function.
198
216
 
199
217
  The arguments to be passed to the crud functions.
200
218
 
201
- ##### id
219
+ ##### pk
220
+
221
+ > **pk**: `string`
222
+
223
+ The pk of the object to be acted upon.
224
+
225
+ ##### pkKey
202
226
 
203
- > **id**: `string`
227
+ > **pkKey**: `string`
204
228
 
205
- The id of the object to be acted upon.
229
+ The key name of the primary key.
206
230
 
207
231
  ##### retrieveArgs
208
232
 
@@ -238,11 +262,17 @@ The callback to be called when the object is updated.
238
262
 
239
263
  The arguments to be passed to the crud functions.
240
264
 
241
- ##### id
265
+ ##### pk
242
266
 
243
- > **id**: `string`
267
+ > **pk**: `string`
244
268
 
245
- The id of the object to be acted upon.
269
+ The pk of the object to be acted upon.
270
+
271
+ ##### pkKey
272
+
273
+ > **pkKey**: `string`
274
+
275
+ The key name of the primary key.
246
276
 
247
277
  ##### retrieveArgs
248
278
 
@@ -268,6 +298,12 @@ The arguments to be passed to the crud functions.
268
298
 
269
299
  The data to be acted upon.
270
300
 
301
+ ##### pkKey
302
+
303
+ > **pkKey**: `string`
304
+
305
+ The key name of the primary key.
306
+
271
307
  ##### retrieveArgs
272
308
 
273
309
  > **retrieveArgs**: `any`
package/docs/use/list.md CHANGED
@@ -150,6 +150,12 @@ The arguments to pass to the registered list crud functions, related to the list
150
150
 
151
151
  Sorting rules that define the order of list items.
152
152
 
153
+ ##### pkKey
154
+
155
+ > **pkKey**: `string`
156
+
157
+ The primary key for the list items.
158
+
153
159
  ##### relatedObjectsRules
154
160
 
155
161
  > **relatedObjectsRules**: `object`
@@ -58,15 +58,15 @@ The last error encountered.
58
58
 
59
59
  Indicates if an error occurred during the last operation.
60
60
 
61
- ###### fkForIdAndRule
61
+ ###### fkForPkAndRule
62
62
 
63
- > **fkForIdAndRule**: `object`
63
+ > **fkForPkAndRule**: `object`
64
64
 
65
- Maintains computed references to the foreign keys for each object ID and rule, crucial for navigating complex data relationships.
65
+ Maintains computed references to the foreign keys for each object pk and rule, crucial for navigating complex data relationships.
66
66
 
67
67
  ###### Index Signature
68
68
 
69
- \[`id`: `string`\]: `object`
69
+ \[`pk`: `string`\]: `object`
70
70
 
71
71
  ###### intendToList
72
72
 
@@ -92,21 +92,21 @@ Arguments passed to the server for listing operations.
92
92
 
93
93
  Indicates if the list is currently loading.
94
94
 
95
- ###### objAndKeyForIdAndRule
95
+ ###### objAndKeyForPkAndRule
96
96
 
97
- > **objAndKeyForIdAndRule**: `object`
97
+ > **objAndKeyForPkAndRule**: `object`
98
98
 
99
- Maps each object ID and rule to a tuple consisting of the related object and its respective key, facilitating direct data manipulation.
99
+ Maps each object pk and rule to a tuple consisting of the related object and its respective key, facilitating direct data manipulation.
100
100
 
101
101
  ###### Index Signature
102
102
 
103
- \[`id`: `string`\]: `object`
103
+ \[`pk`: `string`\]: `object`
104
104
 
105
105
  ###### objects
106
106
 
107
- > **objects**: [`ObjectsById`](listInstance.md#objectsbyid)
107
+ > **objects**: [`ObjectsByPk`](listInstance.md#objectsbypk)
108
108
 
109
- The list objects stored by their IDs.
109
+ The list objects stored by their pks.
110
110
 
111
111
  ###### objectsInOrder
112
112
 
@@ -120,15 +120,21 @@ The objects in the order specified by the list.
120
120
 
121
121
  The order of objects in the list.
122
122
 
123
+ ###### pkKey
124
+
125
+ > **pkKey**: `string`
126
+
127
+ The primary key field for the list objects.
128
+
123
129
  ###### relatedObjects
124
130
 
125
131
  > **relatedObjects**: `object`
126
132
 
127
- Stores computed references to related objects, allowing for dynamic access based on object ID and specific rules.
133
+ Stores computed references to related objects, allowing for dynamic access based on object pk and specific rules.
128
134
 
129
135
  ###### Index Signature
130
136
 
131
- \[`id`: `string`\]: `object`
137
+ \[`pk`: `string`\]: `object`
132
138
 
133
139
  ###### relatedObjectsParentStateObjectsWatchRunning
134
140
 
@@ -242,15 +248,15 @@ The last error encountered.
242
248
 
243
249
  Indicates if an error occurred during the last operation.
244
250
 
245
- ###### fkForIdAndRule
251
+ ###### fkForPkAndRule
246
252
 
247
- > **fkForIdAndRule**: `object`
253
+ > **fkForPkAndRule**: `object`
248
254
 
249
- Maintains computed references to the foreign keys for each object ID and rule, crucial for navigating complex data relationships.
255
+ Maintains computed references to the foreign keys for each object pk and rule, crucial for navigating complex data relationships.
250
256
 
251
257
  ###### Index Signature
252
258
 
253
- \[`id`: `string`\]: `object`
259
+ \[`pk`: `string`\]: `object`
254
260
 
255
261
  ###### intendToList
256
262
 
@@ -276,21 +282,21 @@ Arguments passed to the server for listing operations.
276
282
 
277
283
  Indicates if the list is currently loading.
278
284
 
279
- ###### objAndKeyForIdAndRule
285
+ ###### objAndKeyForPkAndRule
280
286
 
281
- > **objAndKeyForIdAndRule**: `object`
287
+ > **objAndKeyForPkAndRule**: `object`
282
288
 
283
- Maps each object ID and rule to a tuple consisting of the related object and its respective key, facilitating direct data manipulation.
289
+ Maps each object pk and rule to a tuple consisting of the related object and its respective key, facilitating direct data manipulation.
284
290
 
285
291
  ###### Index Signature
286
292
 
287
- \[`id`: `string`\]: `object`
293
+ \[`pk`: `string`\]: `object`
288
294
 
289
295
  ###### objects
290
296
 
291
- > **objects**: [`ObjectsById`](listInstance.md#objectsbyid)
297
+ > **objects**: [`ObjectsByPk`](listInstance.md#objectsbypk)
292
298
 
293
- The list objects stored by their IDs.
299
+ The list objects stored by their pks.
294
300
 
295
301
  ###### objectsInOrder
296
302
 
@@ -304,15 +310,21 @@ The objects in the order specified by the list.
304
310
 
305
311
  The order of objects in the list.
306
312
 
313
+ ###### pkKey
314
+
315
+ > **pkKey**: `string`
316
+
317
+ The primary key field for the list objects.
318
+
307
319
  ###### relatedObjects
308
320
 
309
321
  > **relatedObjects**: `object`
310
322
 
311
- Stores computed references to related objects, allowing for dynamic access based on object ID and specific rules.
323
+ Stores computed references to related objects, allowing for dynamic access based on object pk and specific rules.
312
324
 
313
325
  ###### Index Signature
314
326
 
315
- \[`id`: `string`\]: `object`
327
+ \[`pk`: `string`\]: `object`
316
328
 
317
329
  ###### relatedObjectsParentStateObjectsWatchRunning
318
330
 
@@ -392,7 +404,7 @@ The calculated objects.
392
404
 
393
405
  ###### Index Signature
394
406
 
395
- \[`id`: `string`\]: `object`
407
+ \[`pk`: `string`\]: `object`
396
408
 
397
409
  ###### calculatedObjectsParentStateObjectsWatchRunning
398
410
 
@@ -452,15 +464,15 @@ The last error encountered.
452
464
 
453
465
  Indicates if an error occurred during the last operation.
454
466
 
455
- ###### fkForIdAndRule
467
+ ###### fkForPkAndRule
456
468
 
457
- > **fkForIdAndRule**: `object`
469
+ > **fkForPkAndRule**: `object`
458
470
 
459
- Maintains computed references to the foreign keys for each object ID and rule, crucial for navigating complex data relationships.
471
+ Maintains computed references to the foreign keys for each object pk and rule, crucial for navigating complex data relationships.
460
472
 
461
473
  ###### Index Signature
462
474
 
463
- \[`id`: `string`\]: `object`
475
+ \[`pk`: `string`\]: `object`
464
476
 
465
477
  ###### intendToList
466
478
 
@@ -486,21 +498,21 @@ Arguments passed to the server for listing operations.
486
498
 
487
499
  Indicates if the list is currently loading.
488
500
 
489
- ###### objAndKeyForIdAndRule
501
+ ###### objAndKeyForPkAndRule
490
502
 
491
- > **objAndKeyForIdAndRule**: `object`
503
+ > **objAndKeyForPkAndRule**: `object`
492
504
 
493
- Maps each object ID and rule to a tuple consisting of the related object and its respective key, facilitating direct data manipulation.
505
+ Maps each object pk and rule to a tuple consisting of the related object and its respective key, facilitating direct data manipulation.
494
506
 
495
507
  ###### Index Signature
496
508
 
497
- \[`id`: `string`\]: `object`
509
+ \[`pk`: `string`\]: `object`
498
510
 
499
511
  ###### objects
500
512
 
501
- > **objects**: [`ObjectsById`](listInstance.md#objectsbyid)
513
+ > **objects**: [`ObjectsByPk`](listInstance.md#objectsbypk)
502
514
 
503
- The list objects stored by their IDs.
515
+ The list objects stored by their pks.
504
516
 
505
517
  ###### objectsInOrder
506
518
 
@@ -514,15 +526,21 @@ The objects in the order specified by the list.
514
526
 
515
527
  The order of objects in the list.
516
528
 
529
+ ###### pkKey
530
+
531
+ > **pkKey**: `string`
532
+
533
+ The primary key field for the list objects.
534
+
517
535
  ###### relatedObjects
518
536
 
519
537
  > **relatedObjects**: `object`
520
538
 
521
- Stores computed references to related objects, allowing for dynamic access based on object ID and specific rules.
539
+ Stores computed references to related objects, allowing for dynamic access based on object pk and specific rules.
522
540
 
523
541
  ###### Index Signature
524
542
 
525
- \[`id`: `string`\]: `object`
543
+ \[`pk`: `string`\]: `object`
526
544
 
527
545
  ###### relatedObjectsParentStateObjectsWatchRunning
528
546
 
@@ -610,7 +628,7 @@ The calculated objects.
610
628
 
611
629
  ###### Index Signature
612
630
 
613
- \[`id`: `string`\]: `object`
631
+ \[`pk`: `string`\]: `object`
614
632
 
615
633
  ##### calculatedObjectsParentStateObjectsWatchRunning
616
634
 
@@ -720,6 +738,7 @@ const listSubscriptionProps = reactive({
720
738
  // whatever props you need to get the list to work with your crud implementation
721
739
  crudArgs: {},
722
740
  listArgs: {},
741
+ pkKey: "pk",
723
742
  retrieveArgs: {},
724
743
  intendToList: true,
725
744
  });
@@ -745,7 +764,7 @@ const listComputed = useListComputed(listComputedProps);
745
764
  {{ obj }}
746
765
  <div>
747
766
  <!-- the computed object or objects based on the rule -->
748
- {{ listComputed.state.computedObjects[obj.id].someRule }}
767
+ {{ listComputed.state.computedObjects[obj.pk].someRule }}
749
768
  </div>
750
769
  </li>
751
770
  </ul>