@arrai-innovations/reactive-helpers 17.0.1 → 17.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.
- package/.circleci/config.yml +4 -4
- package/docs/config/listCrud.md +1 -1
- package/docs/config/objectCrud.md +2 -2
- package/docs/use/list.md +3 -3
- package/docs/use/listCalculated.md +17 -17
- package/docs/use/listFilter.md +18 -18
- package/docs/use/listInstance.md +2 -2
- package/docs/use/listRelated.md +9 -9
- package/docs/use/listSearch.md +13 -13
- package/docs/use/listSort.md +18 -18
- package/docs/use/object.md +3 -3
- package/docs/use/objectCalculated.md +7 -7
- package/docs/use/objectInstance.md +2 -2
- package/docs/use/objectRelated.md +5 -5
- package/docs/use/objectSubscription.md +1 -1
- package/docs/utils/relatedCalculatedHelpers.md +4 -4
- package/docs/utils/watches.md +4 -4
- package/lint-staged.config.js +1 -1
- package/make_type_doc.js +59 -0
- package/package.json +11 -11
- package/tests/unit/use/listInstance.spec.js +20 -12
- package/use/listInstance.js +4 -0
package/.circleci/config.yml
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
version: 2.1
|
|
2
2
|
orbs:
|
|
3
|
-
eslint: arrai/eslint@
|
|
4
|
-
prettier: arrai/prettier@5.
|
|
5
|
-
npm: arrai/npm@
|
|
6
|
-
github: arrai/github@
|
|
3
|
+
eslint: arrai/eslint@8.1.0
|
|
4
|
+
prettier: arrai/prettier@5.10.0
|
|
5
|
+
npm: arrai/npm@3.1.0
|
|
6
|
+
github: arrai/github@5.0.0
|
|
7
7
|
workflows:
|
|
8
8
|
test:
|
|
9
9
|
jobs:
|
package/docs/config/listCrud.md
CHANGED
|
@@ -380,13 +380,13 @@ Any functions to override the default crud functions.
|
|
|
380
380
|
|
|
381
381
|
###### props
|
|
382
382
|
|
|
383
|
-
\{`crudArgs`: \{`args`: `any`; \}; \}
|
|
383
|
+
\{ `crudArgs`: \{ `args`: `any`; \}; \}
|
|
384
384
|
|
|
385
385
|
The props with any passed crudArgs.
|
|
386
386
|
|
|
387
387
|
###### props.crudArgs
|
|
388
388
|
|
|
389
|
-
\{`args`: `any`; \}
|
|
389
|
+
\{ `args`: `any`; \}
|
|
390
390
|
|
|
391
391
|
###### props.crudArgs.args
|
|
392
392
|
|
package/docs/use/list.md
CHANGED
|
@@ -152,7 +152,7 @@ Function or rule to determine if an item should be included based on inclusion c
|
|
|
152
152
|
|
|
153
153
|
##### calculatedObjectsRules
|
|
154
154
|
|
|
155
|
-
> **calculatedObjectsRules**: `Ref
|
|
155
|
+
> **calculatedObjectsRules**: `Ref`\<\{\}, \{\}\>
|
|
156
156
|
|
|
157
157
|
Defines rules for dynamically calculating properties of list items.
|
|
158
158
|
|
|
@@ -218,7 +218,7 @@ Defines rules for associating related objects with list items.
|
|
|
218
218
|
|
|
219
219
|
###### Index Signature
|
|
220
220
|
|
|
221
|
-
|
|
221
|
+
\[`rule`: `string`\]: [`ListRelatedRule`](listRelated.md#listrelatedrule)
|
|
222
222
|
|
|
223
223
|
##### retrieveArgs
|
|
224
224
|
|
|
@@ -228,7 +228,7 @@ The arguments to pass to the registered list crud functions, related to the item
|
|
|
228
228
|
|
|
229
229
|
##### textSearchRules
|
|
230
230
|
|
|
231
|
-
> **textSearchRules**: [`TextSearchRules`](listSearch.md#textsearchrules-
|
|
231
|
+
> **textSearchRules**: [`TextSearchRules`](listSearch.md#textsearchrules-3)
|
|
232
232
|
|
|
233
233
|
Defines the properties and conditions used to filter the list via text search.
|
|
234
234
|
|
|
@@ -16,7 +16,7 @@ Options to configure the behavior of the list calculated properties.
|
|
|
16
16
|
|
|
17
17
|
##### calculatedObjectsRules
|
|
18
18
|
|
|
19
|
-
> **calculatedObjectsRules**: `Ref
|
|
19
|
+
> **calculatedObjectsRules**: `Ref`\<\{\}, \{\}\>
|
|
20
20
|
|
|
21
21
|
A reactive reference to rules used for dynamic calculations
|
|
22
22
|
within list objects. Proper setup of this reference ensures that updates are managed reactively, including deep
|
|
@@ -66,7 +66,7 @@ Maintains computed references to the foreign keys for each object pk and rule, c
|
|
|
66
66
|
|
|
67
67
|
###### Index Signature
|
|
68
68
|
|
|
69
|
-
|
|
69
|
+
\[`pk`: `string`\]: `object`
|
|
70
70
|
|
|
71
71
|
###### intendToList?
|
|
72
72
|
|
|
@@ -100,7 +100,7 @@ Maps each object pk and rule to a tuple consisting of the related object and its
|
|
|
100
100
|
|
|
101
101
|
###### Index Signature
|
|
102
102
|
|
|
103
|
-
|
|
103
|
+
\[`pk`: `string`\]: `object`
|
|
104
104
|
|
|
105
105
|
###### objects
|
|
106
106
|
|
|
@@ -134,7 +134,7 @@ Stores computed references to related objects, allowing for dynamic access based
|
|
|
134
134
|
|
|
135
135
|
###### Index Signature
|
|
136
136
|
|
|
137
|
-
|
|
137
|
+
\[`pk`: `string`\]: `object`
|
|
138
138
|
|
|
139
139
|
###### relatedObjectsParentStateObjectsWatchRunning?
|
|
140
140
|
|
|
@@ -150,7 +150,7 @@ Defines the rules for establishing relationships, such as foreign key links and
|
|
|
150
150
|
|
|
151
151
|
###### Index Signature
|
|
152
152
|
|
|
153
|
-
|
|
153
|
+
\[`rule`: `string`\]: [`ListRelatedRule`](listRelated.md#listrelatedrule)
|
|
154
154
|
|
|
155
155
|
###### relatedObjectsWatchRunning?
|
|
156
156
|
|
|
@@ -256,7 +256,7 @@ Maintains computed references to the foreign keys for each object pk and rule, c
|
|
|
256
256
|
|
|
257
257
|
###### Index Signature
|
|
258
258
|
|
|
259
|
-
|
|
259
|
+
\[`pk`: `string`\]: `object`
|
|
260
260
|
|
|
261
261
|
###### intendToList?
|
|
262
262
|
|
|
@@ -290,7 +290,7 @@ Maps each object pk and rule to a tuple consisting of the related object and its
|
|
|
290
290
|
|
|
291
291
|
###### Index Signature
|
|
292
292
|
|
|
293
|
-
|
|
293
|
+
\[`pk`: `string`\]: `object`
|
|
294
294
|
|
|
295
295
|
###### objects
|
|
296
296
|
|
|
@@ -324,7 +324,7 @@ Stores computed references to related objects, allowing for dynamic access based
|
|
|
324
324
|
|
|
325
325
|
###### Index Signature
|
|
326
326
|
|
|
327
|
-
|
|
327
|
+
\[`pk`: `string`\]: `object`
|
|
328
328
|
|
|
329
329
|
###### relatedObjectsParentStateObjectsWatchRunning?
|
|
330
330
|
|
|
@@ -340,7 +340,7 @@ Defines the rules for establishing relationships, such as foreign key links and
|
|
|
340
340
|
|
|
341
341
|
###### Index Signature
|
|
342
342
|
|
|
343
|
-
|
|
343
|
+
\[`rule`: `string`\]: [`ListRelatedRule`](listRelated.md#listrelatedrule)
|
|
344
344
|
|
|
345
345
|
###### relatedObjectsWatchRunning?
|
|
346
346
|
|
|
@@ -404,7 +404,7 @@ The calculated objects.
|
|
|
404
404
|
|
|
405
405
|
###### Index Signature
|
|
406
406
|
|
|
407
|
-
|
|
407
|
+
\[`pk`: `string`\]: `object`
|
|
408
408
|
|
|
409
409
|
###### calculatedObjectsParentStateObjectsWatchRunning
|
|
410
410
|
|
|
@@ -420,7 +420,7 @@ The rules for the calculated objects.
|
|
|
420
420
|
|
|
421
421
|
###### Index Signature
|
|
422
422
|
|
|
423
|
-
|
|
423
|
+
\[`rule`: `string`\]: (`object`, `relatedObject`, `calculatedObjects`) => `any`
|
|
424
424
|
|
|
425
425
|
###### calculatedObjectsWatchRunning
|
|
426
426
|
|
|
@@ -472,7 +472,7 @@ Maintains computed references to the foreign keys for each object pk and rule, c
|
|
|
472
472
|
|
|
473
473
|
###### Index Signature
|
|
474
474
|
|
|
475
|
-
|
|
475
|
+
\[`pk`: `string`\]: `object`
|
|
476
476
|
|
|
477
477
|
###### intendToList?
|
|
478
478
|
|
|
@@ -506,7 +506,7 @@ Maps each object pk and rule to a tuple consisting of the related object and its
|
|
|
506
506
|
|
|
507
507
|
###### Index Signature
|
|
508
508
|
|
|
509
|
-
|
|
509
|
+
\[`pk`: `string`\]: `object`
|
|
510
510
|
|
|
511
511
|
###### objects
|
|
512
512
|
|
|
@@ -540,7 +540,7 @@ Stores computed references to related objects, allowing for dynamic access based
|
|
|
540
540
|
|
|
541
541
|
###### Index Signature
|
|
542
542
|
|
|
543
|
-
|
|
543
|
+
\[`pk`: `string`\]: `object`
|
|
544
544
|
|
|
545
545
|
###### relatedObjectsParentStateObjectsWatchRunning?
|
|
546
546
|
|
|
@@ -556,7 +556,7 @@ Defines the rules for establishing relationships, such as foreign key links and
|
|
|
556
556
|
|
|
557
557
|
###### Index Signature
|
|
558
558
|
|
|
559
|
-
|
|
559
|
+
\[`rule`: `string`\]: [`ListRelatedRule`](listRelated.md#listrelatedrule)
|
|
560
560
|
|
|
561
561
|
###### relatedObjectsWatchRunning?
|
|
562
562
|
|
|
@@ -628,7 +628,7 @@ The calculated objects.
|
|
|
628
628
|
|
|
629
629
|
###### Index Signature
|
|
630
630
|
|
|
631
|
-
|
|
631
|
+
\[`pk`: `string`\]: `object`
|
|
632
632
|
|
|
633
633
|
##### calculatedObjectsParentStateObjectsWatchRunning
|
|
634
634
|
|
|
@@ -638,7 +638,7 @@ Whether the parent state objects watch is running.
|
|
|
638
638
|
|
|
639
639
|
##### calculatedObjectsRules
|
|
640
640
|
|
|
641
|
-
> **calculatedObjectsRules**: `Ref
|
|
641
|
+
> **calculatedObjectsRules**: `Ref`\<\{\}, \{\}\>
|
|
642
642
|
|
|
643
643
|
The rules for the calculated objects.
|
|
644
644
|
|
package/docs/use/listFilter.md
CHANGED
|
@@ -38,7 +38,7 @@ The calculated objects.
|
|
|
38
38
|
|
|
39
39
|
###### Index Signature
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
\[`pk`: `string`\]: `object`
|
|
42
42
|
|
|
43
43
|
###### calculatedObjectsParentStateObjectsWatchRunning?
|
|
44
44
|
|
|
@@ -54,7 +54,7 @@ The rules for the calculated objects.
|
|
|
54
54
|
|
|
55
55
|
###### Index Signature
|
|
56
56
|
|
|
57
|
-
|
|
57
|
+
\[`rule`: `string`\]: (`object`, `relatedObject`, `calculatedObjects`) => `any`
|
|
58
58
|
|
|
59
59
|
###### calculatedObjectsWatchRunning?
|
|
60
60
|
|
|
@@ -106,7 +106,7 @@ Maintains computed references to the foreign keys for each object pk and rule, c
|
|
|
106
106
|
|
|
107
107
|
###### Index Signature
|
|
108
108
|
|
|
109
|
-
|
|
109
|
+
\[`pk`: `string`\]: `object`
|
|
110
110
|
|
|
111
111
|
###### intendToList?
|
|
112
112
|
|
|
@@ -140,7 +140,7 @@ Maps each object pk and rule to a tuple consisting of the related object and its
|
|
|
140
140
|
|
|
141
141
|
###### Index Signature
|
|
142
142
|
|
|
143
|
-
|
|
143
|
+
\[`pk`: `string`\]: `object`
|
|
144
144
|
|
|
145
145
|
###### objects
|
|
146
146
|
|
|
@@ -174,7 +174,7 @@ Stores computed references to related objects, allowing for dynamic access based
|
|
|
174
174
|
|
|
175
175
|
###### Index Signature
|
|
176
176
|
|
|
177
|
-
|
|
177
|
+
\[`pk`: `string`\]: `object`
|
|
178
178
|
|
|
179
179
|
###### relatedObjectsParentStateObjectsWatchRunning?
|
|
180
180
|
|
|
@@ -190,7 +190,7 @@ Defines the rules for establishing relationships, such as foreign key links and
|
|
|
190
190
|
|
|
191
191
|
###### Index Signature
|
|
192
192
|
|
|
193
|
-
|
|
193
|
+
\[`rule`: `string`\]: [`ListRelatedRule`](listRelated.md#listrelatedrule)
|
|
194
194
|
|
|
195
195
|
###### relatedObjectsWatchRunning?
|
|
196
196
|
|
|
@@ -266,7 +266,7 @@ The calculated objects.
|
|
|
266
266
|
|
|
267
267
|
###### Index Signature
|
|
268
268
|
|
|
269
|
-
|
|
269
|
+
\[`pk`: `string`\]: `object`
|
|
270
270
|
|
|
271
271
|
###### calculatedObjectsParentStateObjectsWatchRunning?
|
|
272
272
|
|
|
@@ -282,7 +282,7 @@ The rules for the calculated objects.
|
|
|
282
282
|
|
|
283
283
|
###### Index Signature
|
|
284
284
|
|
|
285
|
-
|
|
285
|
+
\[`rule`: `string`\]: (`object`, `relatedObject`, `calculatedObjects`) => `any`
|
|
286
286
|
|
|
287
287
|
###### calculatedObjectsWatchRunning?
|
|
288
288
|
|
|
@@ -334,7 +334,7 @@ Maintains computed references to the foreign keys for each object pk and rule, c
|
|
|
334
334
|
|
|
335
335
|
###### Index Signature
|
|
336
336
|
|
|
337
|
-
|
|
337
|
+
\[`pk`: `string`\]: `object`
|
|
338
338
|
|
|
339
339
|
###### intendToList?
|
|
340
340
|
|
|
@@ -368,7 +368,7 @@ Maps each object pk and rule to a tuple consisting of the related object and its
|
|
|
368
368
|
|
|
369
369
|
###### Index Signature
|
|
370
370
|
|
|
371
|
-
|
|
371
|
+
\[`pk`: `string`\]: `object`
|
|
372
372
|
|
|
373
373
|
###### objects
|
|
374
374
|
|
|
@@ -402,7 +402,7 @@ Stores computed references to related objects, allowing for dynamic access based
|
|
|
402
402
|
|
|
403
403
|
###### Index Signature
|
|
404
404
|
|
|
405
|
-
|
|
405
|
+
\[`pk`: `string`\]: `object`
|
|
406
406
|
|
|
407
407
|
###### relatedObjectsParentStateObjectsWatchRunning?
|
|
408
408
|
|
|
@@ -418,7 +418,7 @@ Defines the rules for establishing relationships, such as foreign key links and
|
|
|
418
418
|
|
|
419
419
|
###### Index Signature
|
|
420
420
|
|
|
421
|
-
|
|
421
|
+
\[`rule`: `string`\]: [`ListRelatedRule`](listRelated.md#listrelatedrule)
|
|
422
422
|
|
|
423
423
|
###### relatedObjectsWatchRunning?
|
|
424
424
|
|
|
@@ -488,7 +488,7 @@ The calculated objects.
|
|
|
488
488
|
|
|
489
489
|
###### Index Signature
|
|
490
490
|
|
|
491
|
-
|
|
491
|
+
\[`pk`: `string`\]: `object`
|
|
492
492
|
|
|
493
493
|
###### calculatedObjectsParentStateObjectsWatchRunning?
|
|
494
494
|
|
|
@@ -504,7 +504,7 @@ The rules for the calculated objects.
|
|
|
504
504
|
|
|
505
505
|
###### Index Signature
|
|
506
506
|
|
|
507
|
-
|
|
507
|
+
\[`rule`: `string`\]: (`object`, `relatedObject`, `calculatedObjects`) => `any`
|
|
508
508
|
|
|
509
509
|
###### calculatedObjectsWatchRunning?
|
|
510
510
|
|
|
@@ -562,7 +562,7 @@ Maintains computed references to the foreign keys for each object pk and rule, c
|
|
|
562
562
|
|
|
563
563
|
###### Index Signature
|
|
564
564
|
|
|
565
|
-
|
|
565
|
+
\[`pk`: `string`\]: `object`
|
|
566
566
|
|
|
567
567
|
###### inResults
|
|
568
568
|
|
|
@@ -602,7 +602,7 @@ Maps each object pk and rule to a tuple consisting of the related object and its
|
|
|
602
602
|
|
|
603
603
|
###### Index Signature
|
|
604
604
|
|
|
605
|
-
|
|
605
|
+
\[`pk`: `string`\]: `object`
|
|
606
606
|
|
|
607
607
|
###### objects
|
|
608
608
|
|
|
@@ -648,7 +648,7 @@ Stores computed references to related objects, allowing for dynamic access based
|
|
|
648
648
|
|
|
649
649
|
###### Index Signature
|
|
650
650
|
|
|
651
|
-
|
|
651
|
+
\[`pk`: `string`\]: `object`
|
|
652
652
|
|
|
653
653
|
###### relatedObjectsParentStateObjectsWatchRunning?
|
|
654
654
|
|
|
@@ -664,7 +664,7 @@ Defines the rules for establishing relationships, such as foreign key links and
|
|
|
664
664
|
|
|
665
665
|
###### Index Signature
|
|
666
666
|
|
|
667
|
-
|
|
667
|
+
\[`rule`: `string`\]: [`ListRelatedRule`](listRelated.md#listrelatedrule)
|
|
668
668
|
|
|
669
669
|
###### relatedObjectsWatchRunning?
|
|
670
670
|
|
package/docs/use/listInstance.md
CHANGED
|
@@ -429,7 +429,7 @@ Indicates if there are ongoing reactive updates.
|
|
|
429
429
|
|
|
430
430
|
#### Index Signature
|
|
431
431
|
|
|
432
|
-
|
|
432
|
+
\[`key`: `string`\]: `any`
|
|
433
433
|
|
|
434
434
|
##### pk
|
|
435
435
|
|
|
@@ -453,7 +453,7 @@ Indicates if there are ongoing reactive updates.
|
|
|
453
453
|
|
|
454
454
|
#### Index Signature
|
|
455
455
|
|
|
456
|
-
|
|
456
|
+
\[`pk`: `string`\]: [`ListObject`](listInstance.md#listobject)
|
|
457
457
|
|
|
458
458
|
***
|
|
459
459
|
|
package/docs/use/listRelated.md
CHANGED
|
@@ -134,7 +134,7 @@ Whether the subscription is loading.
|
|
|
134
134
|
|
|
135
135
|
##### relatedObjectsRules
|
|
136
136
|
|
|
137
|
-
> **relatedObjectsRules**: `Ref
|
|
137
|
+
> **relatedObjectsRules**: `Ref`\<\{\}, \{\}\>
|
|
138
138
|
|
|
139
139
|
The rules for the related objects.
|
|
140
140
|
|
|
@@ -314,7 +314,7 @@ Maintains computed references to the foreign keys for each object pk and rule, c
|
|
|
314
314
|
|
|
315
315
|
###### Index Signature
|
|
316
316
|
|
|
317
|
-
|
|
317
|
+
\[`pk`: `string`\]: `object`
|
|
318
318
|
|
|
319
319
|
###### intendToList?
|
|
320
320
|
|
|
@@ -348,7 +348,7 @@ Maps each object pk and rule to a tuple consisting of the related object and its
|
|
|
348
348
|
|
|
349
349
|
###### Index Signature
|
|
350
350
|
|
|
351
|
-
|
|
351
|
+
\[`pk`: `string`\]: `object`
|
|
352
352
|
|
|
353
353
|
###### objects
|
|
354
354
|
|
|
@@ -382,7 +382,7 @@ Stores computed references to related objects, allowing for dynamic access based
|
|
|
382
382
|
|
|
383
383
|
###### Index Signature
|
|
384
384
|
|
|
385
|
-
|
|
385
|
+
\[`pk`: `string`\]: `object`
|
|
386
386
|
|
|
387
387
|
###### relatedObjectsParentStateObjectsWatchRunning
|
|
388
388
|
|
|
@@ -398,7 +398,7 @@ Defines the rules for establishing relationships, such as foreign key links and
|
|
|
398
398
|
|
|
399
399
|
###### Index Signature
|
|
400
400
|
|
|
401
|
-
|
|
401
|
+
\[`rule`: `string`\]: [`ListRelatedRule`](listRelated.md#listrelatedrule)
|
|
402
402
|
|
|
403
403
|
###### relatedObjectsWatchRunning
|
|
404
404
|
|
|
@@ -468,7 +468,7 @@ Maintains computed references to the foreign keys for each object pk and rule, c
|
|
|
468
468
|
|
|
469
469
|
###### Index Signature
|
|
470
470
|
|
|
471
|
-
|
|
471
|
+
\[`pk`: `string`\]: `object`
|
|
472
472
|
|
|
473
473
|
##### objAndKeyForPkAndRule
|
|
474
474
|
|
|
@@ -478,7 +478,7 @@ Maps each object pk and rule to a tuple consisting of the related object and its
|
|
|
478
478
|
|
|
479
479
|
###### Index Signature
|
|
480
480
|
|
|
481
|
-
|
|
481
|
+
\[`pk`: `string`\]: `object`
|
|
482
482
|
|
|
483
483
|
##### relatedObjects
|
|
484
484
|
|
|
@@ -488,7 +488,7 @@ Stores computed references to related objects, allowing for dynamic access based
|
|
|
488
488
|
|
|
489
489
|
###### Index Signature
|
|
490
490
|
|
|
491
|
-
|
|
491
|
+
\[`pk`: `string`\]: `object`
|
|
492
492
|
|
|
493
493
|
##### relatedObjectsParentStateObjectsWatchRunning
|
|
494
494
|
|
|
@@ -504,7 +504,7 @@ Defines the rules for establishing relationships, such as foreign key links and
|
|
|
504
504
|
|
|
505
505
|
###### Index Signature
|
|
506
506
|
|
|
507
|
-
|
|
507
|
+
\[`rule`: `string`\]: [`ListRelatedRule`](listRelated.md#listrelatedrule)
|
|
508
508
|
|
|
509
509
|
##### relatedObjectsWatchRunning
|
|
510
510
|
|
package/docs/use/listSearch.md
CHANGED
|
@@ -64,7 +64,7 @@ The calculated objects.
|
|
|
64
64
|
|
|
65
65
|
###### Index Signature
|
|
66
66
|
|
|
67
|
-
|
|
67
|
+
\[`pk`: `string`\]: `object`
|
|
68
68
|
|
|
69
69
|
###### calculatedObjectsParentStateObjectsWatchRunning?
|
|
70
70
|
|
|
@@ -80,7 +80,7 @@ The rules for the calculated objects.
|
|
|
80
80
|
|
|
81
81
|
###### Index Signature
|
|
82
82
|
|
|
83
|
-
|
|
83
|
+
\[`rule`: `string`\]: (`object`, `relatedObject`, `calculatedObjects`) => `any`
|
|
84
84
|
|
|
85
85
|
###### calculatedObjectsWatchRunning?
|
|
86
86
|
|
|
@@ -138,7 +138,7 @@ Maintains computed references to the foreign keys for each object pk and rule, c
|
|
|
138
138
|
|
|
139
139
|
###### Index Signature
|
|
140
140
|
|
|
141
|
-
|
|
141
|
+
\[`pk`: `string`\]: `object`
|
|
142
142
|
|
|
143
143
|
###### inResults?
|
|
144
144
|
|
|
@@ -178,7 +178,7 @@ Maps each object pk and rule to a tuple consisting of the related object and its
|
|
|
178
178
|
|
|
179
179
|
###### Index Signature
|
|
180
180
|
|
|
181
|
-
|
|
181
|
+
\[`pk`: `string`\]: `object`
|
|
182
182
|
|
|
183
183
|
###### objects
|
|
184
184
|
|
|
@@ -224,7 +224,7 @@ Stores computed references to related objects, allowing for dynamic access based
|
|
|
224
224
|
|
|
225
225
|
###### Index Signature
|
|
226
226
|
|
|
227
|
-
|
|
227
|
+
\[`pk`: `string`\]: `object`
|
|
228
228
|
|
|
229
229
|
###### relatedObjectsParentStateObjectsWatchRunning?
|
|
230
230
|
|
|
@@ -240,7 +240,7 @@ Defines the rules for establishing relationships, such as foreign key links and
|
|
|
240
240
|
|
|
241
241
|
###### Index Signature
|
|
242
242
|
|
|
243
|
-
|
|
243
|
+
\[`rule`: `string`\]: [`ListRelatedRule`](listRelated.md#listrelatedrule)
|
|
244
244
|
|
|
245
245
|
###### relatedObjectsWatchRunning?
|
|
246
246
|
|
|
@@ -376,7 +376,7 @@ The calculated objects.
|
|
|
376
376
|
|
|
377
377
|
###### Index Signature
|
|
378
378
|
|
|
379
|
-
|
|
379
|
+
\[`pk`: `string`\]: `object`
|
|
380
380
|
|
|
381
381
|
###### calculatedObjectsParentStateObjectsWatchRunning?
|
|
382
382
|
|
|
@@ -392,7 +392,7 @@ The rules for the calculated objects.
|
|
|
392
392
|
|
|
393
393
|
###### Index Signature
|
|
394
394
|
|
|
395
|
-
|
|
395
|
+
\[`rule`: `string`\]: (`object`, `relatedObject`, `calculatedObjects`) => `any`
|
|
396
396
|
|
|
397
397
|
###### calculatedObjectsWatchRunning?
|
|
398
398
|
|
|
@@ -462,7 +462,7 @@ Maintains computed references to the foreign keys for each object pk and rule, c
|
|
|
462
462
|
|
|
463
463
|
###### Index Signature
|
|
464
464
|
|
|
465
|
-
|
|
465
|
+
\[`pk`: `string`\]: `object`
|
|
466
466
|
|
|
467
467
|
###### inResults?
|
|
468
468
|
|
|
@@ -502,7 +502,7 @@ Maps each object pk and rule to a tuple consisting of the related object and its
|
|
|
502
502
|
|
|
503
503
|
###### Index Signature
|
|
504
504
|
|
|
505
|
-
|
|
505
|
+
\[`pk`: `string`\]: `object`
|
|
506
506
|
|
|
507
507
|
###### objectIndexes
|
|
508
508
|
|
|
@@ -554,7 +554,7 @@ Stores computed references to related objects, allowing for dynamic access based
|
|
|
554
554
|
|
|
555
555
|
###### Index Signature
|
|
556
556
|
|
|
557
|
-
|
|
557
|
+
\[`pk`: `string`\]: `object`
|
|
558
558
|
|
|
559
559
|
###### relatedObjectsParentStateObjectsWatchRunning?
|
|
560
560
|
|
|
@@ -570,7 +570,7 @@ Defines the rules for establishing relationships, such as foreign key links and
|
|
|
570
570
|
|
|
571
571
|
###### Index Signature
|
|
572
572
|
|
|
573
|
-
|
|
573
|
+
\[`rule`: `string`\]: [`ListRelatedRule`](listRelated.md#listrelatedrule)
|
|
574
574
|
|
|
575
575
|
###### relatedObjectsWatchRunning?
|
|
576
576
|
|
|
@@ -677,7 +677,7 @@ FlexSearch.Search options.
|
|
|
677
677
|
|
|
678
678
|
##### textSearchRules
|
|
679
679
|
|
|
680
|
-
> **textSearchRules**: [`TextSearchRules`](listSearch.md#textsearchrules-
|
|
680
|
+
> **textSearchRules**: [`TextSearchRules`](listSearch.md#textsearchrules-3)
|
|
681
681
|
|
|
682
682
|
Rules for what to search for. Keys are the keys to search for, values are functions that take the object and return The value to search for.
|
|
683
683
|
|
package/docs/use/listSort.md
CHANGED
|
@@ -38,7 +38,7 @@ The calculated objects.
|
|
|
38
38
|
|
|
39
39
|
###### Index Signature
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
\[`pk`: `string`\]: `object`
|
|
42
42
|
|
|
43
43
|
###### calculatedObjectsParentStateObjectsWatchRunning?
|
|
44
44
|
|
|
@@ -54,7 +54,7 @@ The rules for the calculated objects.
|
|
|
54
54
|
|
|
55
55
|
###### Index Signature
|
|
56
56
|
|
|
57
|
-
|
|
57
|
+
\[`rule`: `string`\]: (`object`, `relatedObject`, `calculatedObjects`) => `any`
|
|
58
58
|
|
|
59
59
|
###### calculatedObjectsWatchRunning?
|
|
60
60
|
|
|
@@ -124,7 +124,7 @@ Maintains computed references to the foreign keys for each object pk and rule, c
|
|
|
124
124
|
|
|
125
125
|
###### Index Signature
|
|
126
126
|
|
|
127
|
-
|
|
127
|
+
\[`pk`: `string`\]: `object`
|
|
128
128
|
|
|
129
129
|
###### inResults?
|
|
130
130
|
|
|
@@ -164,7 +164,7 @@ Maps each object pk and rule to a tuple consisting of the related object and its
|
|
|
164
164
|
|
|
165
165
|
###### Index Signature
|
|
166
166
|
|
|
167
|
-
|
|
167
|
+
\[`pk`: `string`\]: `object`
|
|
168
168
|
|
|
169
169
|
###### objectIndexes?
|
|
170
170
|
|
|
@@ -216,7 +216,7 @@ Stores computed references to related objects, allowing for dynamic access based
|
|
|
216
216
|
|
|
217
217
|
###### Index Signature
|
|
218
218
|
|
|
219
|
-
|
|
219
|
+
\[`pk`: `string`\]: `object`
|
|
220
220
|
|
|
221
221
|
###### relatedObjectsParentStateObjectsWatchRunning?
|
|
222
222
|
|
|
@@ -232,7 +232,7 @@ Defines the rules for establishing relationships, such as foreign key links and
|
|
|
232
232
|
|
|
233
233
|
###### Index Signature
|
|
234
234
|
|
|
235
|
-
|
|
235
|
+
\[`rule`: `string`\]: [`ListRelatedRule`](listRelated.md#listrelatedrule)
|
|
236
236
|
|
|
237
237
|
###### relatedObjectsWatchRunning?
|
|
238
238
|
|
|
@@ -345,7 +345,7 @@ The calculated objects.
|
|
|
345
345
|
|
|
346
346
|
###### Index Signature
|
|
347
347
|
|
|
348
|
-
|
|
348
|
+
\[`pk`: `string`\]: `object`
|
|
349
349
|
|
|
350
350
|
###### calculatedObjectsParentStateObjectsWatchRunning?
|
|
351
351
|
|
|
@@ -361,7 +361,7 @@ The rules for the calculated objects.
|
|
|
361
361
|
|
|
362
362
|
###### Index Signature
|
|
363
363
|
|
|
364
|
-
|
|
364
|
+
\[`rule`: `string`\]: (`object`, `relatedObject`, `calculatedObjects`) => `any`
|
|
365
365
|
|
|
366
366
|
###### calculatedObjectsWatchRunning?
|
|
367
367
|
|
|
@@ -431,7 +431,7 @@ Maintains computed references to the foreign keys for each object pk and rule, c
|
|
|
431
431
|
|
|
432
432
|
###### Index Signature
|
|
433
433
|
|
|
434
|
-
|
|
434
|
+
\[`pk`: `string`\]: `object`
|
|
435
435
|
|
|
436
436
|
###### inResults?
|
|
437
437
|
|
|
@@ -471,7 +471,7 @@ Maps each object pk and rule to a tuple consisting of the related object and its
|
|
|
471
471
|
|
|
472
472
|
###### Index Signature
|
|
473
473
|
|
|
474
|
-
|
|
474
|
+
\[`pk`: `string`\]: `object`
|
|
475
475
|
|
|
476
476
|
###### objectIndexes?
|
|
477
477
|
|
|
@@ -523,7 +523,7 @@ Stores computed references to related objects, allowing for dynamic access based
|
|
|
523
523
|
|
|
524
524
|
###### Index Signature
|
|
525
525
|
|
|
526
|
-
|
|
526
|
+
\[`pk`: `string`\]: `object`
|
|
527
527
|
|
|
528
528
|
###### relatedObjectsParentStateObjectsWatchRunning?
|
|
529
529
|
|
|
@@ -539,7 +539,7 @@ Defines the rules for establishing relationships, such as foreign key links and
|
|
|
539
539
|
|
|
540
540
|
###### Index Signature
|
|
541
541
|
|
|
542
|
-
|
|
542
|
+
\[`rule`: `string`\]: [`ListRelatedRule`](listRelated.md#listrelatedrule)
|
|
543
543
|
|
|
544
544
|
###### relatedObjectsWatchRunning?
|
|
545
545
|
|
|
@@ -634,7 +634,7 @@ The calculated objects.
|
|
|
634
634
|
|
|
635
635
|
###### Index Signature
|
|
636
636
|
|
|
637
|
-
|
|
637
|
+
\[`pk`: `string`\]: `object`
|
|
638
638
|
|
|
639
639
|
###### calculatedObjectsParentStateObjectsWatchRunning?
|
|
640
640
|
|
|
@@ -650,7 +650,7 @@ The rules for the calculated objects.
|
|
|
650
650
|
|
|
651
651
|
###### Index Signature
|
|
652
652
|
|
|
653
|
-
|
|
653
|
+
\[`rule`: `string`\]: (`object`, `relatedObject`, `calculatedObjects`) => `any`
|
|
654
654
|
|
|
655
655
|
###### calculatedObjectsWatchRunning?
|
|
656
656
|
|
|
@@ -720,7 +720,7 @@ Maintains computed references to the foreign keys for each object pk and rule, c
|
|
|
720
720
|
|
|
721
721
|
###### Index Signature
|
|
722
722
|
|
|
723
|
-
|
|
723
|
+
\[`pk`: `string`\]: `object`
|
|
724
724
|
|
|
725
725
|
###### inResults?
|
|
726
726
|
|
|
@@ -760,7 +760,7 @@ Maps each object pk and rule to a tuple consisting of the related object and its
|
|
|
760
760
|
|
|
761
761
|
###### Index Signature
|
|
762
762
|
|
|
763
|
-
|
|
763
|
+
\[`pk`: `string`\]: `object`
|
|
764
764
|
|
|
765
765
|
###### objectIndexes?
|
|
766
766
|
|
|
@@ -830,7 +830,7 @@ Stores computed references to related objects, allowing for dynamic access based
|
|
|
830
830
|
|
|
831
831
|
###### Index Signature
|
|
832
832
|
|
|
833
|
-
|
|
833
|
+
\[`pk`: `string`\]: `object`
|
|
834
834
|
|
|
835
835
|
###### relatedObjectsParentStateObjectsWatchRunning?
|
|
836
836
|
|
|
@@ -846,7 +846,7 @@ Defines the rules for establishing relationships, such as foreign key links and
|
|
|
846
846
|
|
|
847
847
|
###### Index Signature
|
|
848
848
|
|
|
849
|
-
|
|
849
|
+
\[`rule`: `string`\]: [`ListRelatedRule`](listRelated.md#listrelatedrule)
|
|
850
850
|
|
|
851
851
|
###### relatedObjectsWatchRunning?
|
|
852
852
|
|
package/docs/use/object.md
CHANGED
|
@@ -206,7 +206,7 @@ The calculated object.
|
|
|
206
206
|
|
|
207
207
|
###### Index Signature
|
|
208
208
|
|
|
209
|
-
|
|
209
|
+
\[`ruleKey`: `string`\]: `ComputedRef`
|
|
210
210
|
|
|
211
211
|
###### calculatedObjectRules
|
|
212
212
|
|
|
@@ -372,7 +372,7 @@ Whether the object is loading.
|
|
|
372
372
|
|
|
373
373
|
###### object
|
|
374
374
|
|
|
375
|
-
> **object**: \{\} \| \{`[key: string]`: `any`;
|
|
375
|
+
> **object**: \{\} \| \{ `[key: string]`: `any`; `pkKey`: `string`; \}
|
|
376
376
|
|
|
377
377
|
The object.
|
|
378
378
|
|
|
@@ -402,7 +402,7 @@ The related objects, indexed by the key in the related object.
|
|
|
402
402
|
|
|
403
403
|
###### Index Signature
|
|
404
404
|
|
|
405
|
-
|
|
405
|
+
\[`rule`: `string`\]: `ComputedRef`
|
|
406
406
|
|
|
407
407
|
###### relatedObjectRules
|
|
408
408
|
|
|
@@ -170,7 +170,7 @@ Whether the object is loading.
|
|
|
170
170
|
|
|
171
171
|
###### object
|
|
172
172
|
|
|
173
|
-
> **object**: \{\} \| \{`[key: string]`: `any`;
|
|
173
|
+
> **object**: \{\} \| \{ `[key: string]`: `any`; `pkKey`: `string`; \}
|
|
174
174
|
|
|
175
175
|
The object.
|
|
176
176
|
|
|
@@ -200,7 +200,7 @@ The related objects, indexed by the key in the related object.
|
|
|
200
200
|
|
|
201
201
|
###### Index Signature
|
|
202
202
|
|
|
203
|
-
|
|
203
|
+
\[`rule`: `string`\]: `ComputedRef`
|
|
204
204
|
|
|
205
205
|
###### relatedObjectRules?
|
|
206
206
|
|
|
@@ -270,7 +270,7 @@ The calculated object.
|
|
|
270
270
|
|
|
271
271
|
###### Index Signature
|
|
272
272
|
|
|
273
|
-
|
|
273
|
+
\[`ruleKey`: `string`\]: `ComputedRef`
|
|
274
274
|
|
|
275
275
|
###### calculatedObjectRules
|
|
276
276
|
|
|
@@ -436,7 +436,7 @@ Whether the object is loading.
|
|
|
436
436
|
|
|
437
437
|
###### object
|
|
438
438
|
|
|
439
|
-
> **object**: \{\} \| \{`[key: string]`: `any`;
|
|
439
|
+
> **object**: \{\} \| \{ `[key: string]`: `any`; `pkKey`: `string`; \}
|
|
440
440
|
|
|
441
441
|
The object.
|
|
442
442
|
|
|
@@ -466,7 +466,7 @@ The related objects, indexed by the key in the related object.
|
|
|
466
466
|
|
|
467
467
|
###### Index Signature
|
|
468
468
|
|
|
469
|
-
|
|
469
|
+
\[`rule`: `string`\]: `ComputedRef`
|
|
470
470
|
|
|
471
471
|
###### relatedObjectRules?
|
|
472
472
|
|
|
@@ -556,7 +556,7 @@ The calculated object.
|
|
|
556
556
|
|
|
557
557
|
###### Index Signature
|
|
558
558
|
|
|
559
|
-
|
|
559
|
+
\[`ruleKey`: `string`\]: `ComputedRef`
|
|
560
560
|
|
|
561
561
|
##### calculatedObjectRules
|
|
562
562
|
|
|
@@ -638,7 +638,7 @@ The object calculated options.
|
|
|
638
638
|
|
|
639
639
|
#### Index Signature
|
|
640
640
|
|
|
641
|
-
|
|
641
|
+
\[`ruleKey`: `string`\]: (`object`, `relatedObject`) => `any`
|
|
642
642
|
|
|
643
643
|
***
|
|
644
644
|
|
|
@@ -447,7 +447,7 @@ Whether the object is loading.
|
|
|
447
447
|
|
|
448
448
|
###### object
|
|
449
449
|
|
|
450
|
-
> **object**: \{\} \| \{`[key: string]`: `any`;
|
|
450
|
+
> **object**: \{\} \| \{ `[key: string]`: `any`; `pkKey`: `string`; \}
|
|
451
451
|
|
|
452
452
|
The object.
|
|
453
453
|
|
|
@@ -563,7 +563,7 @@ The arguments to be passed to the retrieve function.
|
|
|
563
563
|
|
|
564
564
|
### CrudObject
|
|
565
565
|
|
|
566
|
-
> **CrudObject**\<\>: \{`[key: string]`: `any`;
|
|
566
|
+
> **CrudObject**\<\>: \{ `[key: string]`: `any`; `pkKey`: `string`; \} \| \{\}
|
|
567
567
|
|
|
568
568
|
#### Type Parameters
|
|
569
569
|
|
|
@@ -170,7 +170,7 @@ Whether the object is loading.
|
|
|
170
170
|
|
|
171
171
|
###### object
|
|
172
172
|
|
|
173
|
-
> **object**: \{\} \| \{`[key: string]`: `any`;
|
|
173
|
+
> **object**: \{\} \| \{ `[key: string]`: `any`; `pkKey`: `string`; \}
|
|
174
174
|
|
|
175
175
|
The object.
|
|
176
176
|
|
|
@@ -368,7 +368,7 @@ Whether the object is loading.
|
|
|
368
368
|
|
|
369
369
|
###### object
|
|
370
370
|
|
|
371
|
-
> **object**: \{\} \| \{`[key: string]`: `any`;
|
|
371
|
+
> **object**: \{\} \| \{ `[key: string]`: `any`; `pkKey`: `string`; \}
|
|
372
372
|
|
|
373
373
|
The object.
|
|
374
374
|
|
|
@@ -398,7 +398,7 @@ The related objects, indexed by the key in the related object.
|
|
|
398
398
|
|
|
399
399
|
###### Index Signature
|
|
400
400
|
|
|
401
|
-
|
|
401
|
+
\[`rule`: `string`\]: `ComputedRef`
|
|
402
402
|
|
|
403
403
|
###### relatedObjectRules
|
|
404
404
|
|
|
@@ -492,7 +492,7 @@ The related objects, indexed by the key in the related object.
|
|
|
492
492
|
|
|
493
493
|
###### Index Signature
|
|
494
494
|
|
|
495
|
-
|
|
495
|
+
\[`rule`: `string`\]: `ComputedRef`
|
|
496
496
|
|
|
497
497
|
##### relatedObjectRules
|
|
498
498
|
|
|
@@ -590,7 +590,7 @@ The key in the managed object that corresponds to the key in the related object.
|
|
|
590
590
|
|
|
591
591
|
#### Index Signature
|
|
592
592
|
|
|
593
|
-
|
|
593
|
+
\[`rule`: `string`\]: [`ObjectRelatedRule`](objectRelated.md#objectrelatedrule)
|
|
594
594
|
|
|
595
595
|
***
|
|
596
596
|
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
|
|
23
23
|
### getObjectRelatedByKey()
|
|
24
24
|
|
|
25
|
-
> **getObjectRelatedByKey**(`obj`, `relatedObj`, `key`): [`any`, `string
|
|
25
|
+
> **getObjectRelatedByKey**(`obj`, `relatedObj`, `key`): \[`any`, `string`\]
|
|
26
26
|
|
|
27
27
|
Get the object and key of a related item.
|
|
28
28
|
|
|
@@ -48,7 +48,7 @@ The key to get the related item from.
|
|
|
48
48
|
|
|
49
49
|
#### Returns
|
|
50
50
|
|
|
51
|
-
[`any`, `string
|
|
51
|
+
\[`any`, `string`\]
|
|
52
52
|
|
|
53
53
|
The object and key of the related item.
|
|
54
54
|
|
|
@@ -56,7 +56,7 @@ The object and key of the related item.
|
|
|
56
56
|
|
|
57
57
|
### getObjectRelatedCalculatedByKey()
|
|
58
58
|
|
|
59
|
-
> **getObjectRelatedCalculatedByKey**(`obj`, `relatedObj`, `calculatedObj`, `key`): [`any`, `string
|
|
59
|
+
> **getObjectRelatedCalculatedByKey**(`obj`, `relatedObj`, `calculatedObj`, `key`): \[`any`, `string`\]
|
|
60
60
|
|
|
61
61
|
Get the object and key of a calculated item.
|
|
62
62
|
|
|
@@ -88,6 +88,6 @@ The key to get the calculated item from.
|
|
|
88
88
|
|
|
89
89
|
#### Returns
|
|
90
90
|
|
|
91
|
-
[`any`, `string
|
|
91
|
+
\[`any`, `string`\]
|
|
92
92
|
|
|
93
93
|
The object and key of the calculated item.
|
package/docs/utils/watches.md
CHANGED
|
@@ -47,7 +47,7 @@ The property name to watch within the object.
|
|
|
47
47
|
|
|
48
48
|
###### ref
|
|
49
49
|
|
|
50
|
-
`Ref
|
|
50
|
+
`Ref`
|
|
51
51
|
|
|
52
52
|
A Vue ref to directly watch if provided.
|
|
53
53
|
|
|
@@ -77,7 +77,7 @@ The timeout in milliseconds before the promise is rejected.
|
|
|
77
77
|
|
|
78
78
|
##### ref
|
|
79
79
|
|
|
80
|
-
> **ref**: `Readonly`\<`Ref
|
|
80
|
+
> **ref**: `Readonly`\<`Ref`\>
|
|
81
81
|
|
|
82
82
|
##### reject()
|
|
83
83
|
|
|
@@ -398,7 +398,7 @@ Optional arguments to pass to the watch function.
|
|
|
398
398
|
|
|
399
399
|
###### watchOptions?
|
|
400
400
|
|
|
401
|
-
`WatchOptions
|
|
401
|
+
`WatchOptions` = `{}`
|
|
402
402
|
|
|
403
403
|
Optional watch options.
|
|
404
404
|
|
|
@@ -450,7 +450,7 @@ The property name to watch within the object.
|
|
|
450
450
|
|
|
451
451
|
###### ref
|
|
452
452
|
|
|
453
|
-
`Ref
|
|
453
|
+
`Ref`
|
|
454
454
|
|
|
455
455
|
A Vue ref to directly watch if provided.
|
|
456
456
|
|
package/lint-staged.config.js
CHANGED
package/make_type_doc.js
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { execSync } from "child_process";
|
|
4
|
+
import fs from "fs";
|
|
5
|
+
import os from "os";
|
|
6
|
+
import path from "path";
|
|
7
|
+
import { fileURLToPath } from "url";
|
|
8
|
+
|
|
9
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
10
|
+
const scriptName = path.basename(__filename);
|
|
11
|
+
|
|
12
|
+
const BLUE_COLOR = "\u001b[1;38;2;0;119;247m";
|
|
13
|
+
const ORANGE_COLOR = "\u001b[1;38;2;255;127;0m";
|
|
14
|
+
const RESET_COLOR = "\u001b[0m";
|
|
15
|
+
|
|
16
|
+
const tempDir = fs.mkdtempSync(path.join(os.tmpdir(), "docs-"));
|
|
17
|
+
const docsDir = path.resolve("./docs");
|
|
18
|
+
|
|
19
|
+
function cleanup() {
|
|
20
|
+
fs.rmSync(tempDir, { recursive: true, force: true });
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
process.on("exit", cleanup);
|
|
24
|
+
process.on("SIGINT", () => {
|
|
25
|
+
cleanup();
|
|
26
|
+
process.exit(1);
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
execSync(`npx --no-install typedoc --out "${tempDir}" --plugin typedoc-plugin-markdown --disableSources`, {
|
|
30
|
+
stdio: "inherit",
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
let docsAreDifferent = false;
|
|
34
|
+
|
|
35
|
+
try {
|
|
36
|
+
execSync(`git diff --no-index --quiet "${tempDir}" "${docsDir}"`, {
|
|
37
|
+
stdio: "inherit",
|
|
38
|
+
});
|
|
39
|
+
} catch (error) {
|
|
40
|
+
if (error.status === 1) {
|
|
41
|
+
// Differences found
|
|
42
|
+
docsAreDifferent = true;
|
|
43
|
+
} else {
|
|
44
|
+
// Unexpected error
|
|
45
|
+
throw error;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
if (docsAreDifferent) {
|
|
50
|
+
console.log(`[${scriptName}] ${ORANGE_COLOR}Docs are out of date, updating...${RESET_COLOR}`);
|
|
51
|
+
fs.rmSync("./docs", { recursive: true, force: true });
|
|
52
|
+
fs.renameSync(tempDir, "./docs");
|
|
53
|
+
execSync(`git add ./docs`, { stdio: "inherit" });
|
|
54
|
+
} else {
|
|
55
|
+
console.log(`[${scriptName}] ${BLUE_COLOR}Docs are up to date${RESET_COLOR}`);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
cleanup();
|
|
59
|
+
process.exit(0);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arrai-innovations/reactive-helpers",
|
|
3
|
-
"version": "17.0.
|
|
3
|
+
"version": "17.0.2",
|
|
4
4
|
"description": "VueJS 3 utility composition functions to help manipulate objects and lists.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -10,13 +10,13 @@
|
|
|
10
10
|
"tests": "tests"
|
|
11
11
|
},
|
|
12
12
|
"scripts": {
|
|
13
|
-
"test": "vitest",
|
|
13
|
+
"test": "npx vitest",
|
|
14
14
|
"eslint": "npx --no-install eslint --fix index.js config/**/*.js tests/**/*.js use/**/*.js utils/**/*.js",
|
|
15
15
|
"prettier": "npx --no-install prettier --write .",
|
|
16
16
|
"coverage": "npm run coverage:clean; npm test -- --coverage=true",
|
|
17
17
|
"coverage:clean": "rm -rf coverage",
|
|
18
|
-
"prepare": "
|
|
19
|
-
"docs": "
|
|
18
|
+
"prepare": "npx --no-install husky",
|
|
19
|
+
"docs": "node make_type_doc.js"
|
|
20
20
|
},
|
|
21
21
|
"repository": {
|
|
22
22
|
"type": "git",
|
|
@@ -32,12 +32,12 @@
|
|
|
32
32
|
"@arrai-innovations/commitlint-config": "^1.1.0",
|
|
33
33
|
"@commitlint/cli": "^19.4.0",
|
|
34
34
|
"@godaddy/dmd": "^1.0.4",
|
|
35
|
-
"@trivago/prettier-plugin-sort-imports": "^
|
|
35
|
+
"@trivago/prettier-plugin-sort-imports": "^5.2.1",
|
|
36
36
|
"@types/browser-util-inspect": "^0.2.4",
|
|
37
37
|
"@types/lodash-es": "^4.17.12",
|
|
38
38
|
"@typescript-eslint/eslint-plugin": "^7.18.0",
|
|
39
39
|
"@typescript-eslint/parser": "^7.18.0",
|
|
40
|
-
"@vitest/coverage-v8": "^1.
|
|
40
|
+
"@vitest/coverage-v8": "^2.1.8",
|
|
41
41
|
"@vue/compiler-sfc": "^3.4.37",
|
|
42
42
|
"@vue/eslint-config-prettier": "^9.0.0",
|
|
43
43
|
"@vue/test-utils": "^2.3.2",
|
|
@@ -48,24 +48,24 @@
|
|
|
48
48
|
"eslint-plugin-vitest-globals": "^1.3.1",
|
|
49
49
|
"eslint-plugin-vue": "^9.27.0",
|
|
50
50
|
"flush-promises": "^1.0.2",
|
|
51
|
-
"globals": "^15.
|
|
52
|
-
"
|
|
51
|
+
"globals": "^15.14.0",
|
|
52
|
+
"husky": "^9.1.7",
|
|
53
|
+
"jsdom": "^26.0.0",
|
|
53
54
|
"lint-staged": "^15.2.8",
|
|
54
55
|
"prettier": "^3.3.3",
|
|
55
56
|
"typedoc": "^0.27.1",
|
|
56
57
|
"typedoc-plugin-markdown": "^4.3.0",
|
|
57
58
|
"typescript": "^5.5.4",
|
|
58
|
-
"vitest": "^1.
|
|
59
|
+
"vitest": "^2.1.8"
|
|
59
60
|
},
|
|
60
61
|
"dependencies": {
|
|
61
62
|
"@jcoreio/async-throttle": "^1.6.0",
|
|
62
63
|
"browser-util-inspect": "^0.2.0",
|
|
63
64
|
"flexsearch": "0.7.21",
|
|
64
|
-
"husky": "^9.0.11",
|
|
65
65
|
"vue-deepunref": "^1.0.1"
|
|
66
66
|
},
|
|
67
67
|
"peerDependencies": {
|
|
68
|
-
"@vueuse/core": "^
|
|
68
|
+
"@vueuse/core": "^12.4.0",
|
|
69
69
|
"lodash-es": "^4.17.21",
|
|
70
70
|
"vue": "^3.4.30"
|
|
71
71
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { doAwaitNot } from "../../../utils/watches.js";
|
|
1
|
+
import { doAwaitNot, doAwaitTimeout } from "../../../utils/watches.js";
|
|
2
2
|
import { expectErrorToBeNull } from "../expectHelpers.js";
|
|
3
3
|
import flushPromises from "flush-promises";
|
|
4
4
|
import keyBy from "lodash-es/keyBy.js";
|
|
@@ -274,30 +274,38 @@ describe("use/listInstance.spec.js", function () {
|
|
|
274
274
|
expect({ ...listInstance.state.objects }).toEqual({});
|
|
275
275
|
});
|
|
276
276
|
it("already loading", async function () {
|
|
277
|
-
const listArgs = reactive({
|
|
278
|
-
|
|
279
|
-
});
|
|
280
|
-
const retrieveArgs = reactive({
|
|
281
|
-
fields,
|
|
282
|
-
});
|
|
277
|
+
const listArgs = reactive({ user: 1 });
|
|
278
|
+
const retrieveArgs = reactive({ fields });
|
|
283
279
|
const listInstance = useListInstance({
|
|
284
280
|
props: { pkKey: "id", listArgs, retrieveArgs },
|
|
285
281
|
keepOldPages: false,
|
|
286
282
|
});
|
|
283
|
+
|
|
287
284
|
expectErrorToBeNull(listInstance.state.error);
|
|
288
285
|
expect(listInstance.state.errored).toBe(false);
|
|
289
286
|
expect(listInstance.state.loading).toBeUndefined();
|
|
290
|
-
|
|
291
|
-
|
|
287
|
+
|
|
288
|
+
let bulkDeleteResolve;
|
|
289
|
+
const bulkDeletePromise = new Promise((resolve) => {
|
|
290
|
+
bulkDeleteResolve = resolve;
|
|
291
|
+
});
|
|
292
|
+
globalBulkDelete.mockImplementation(() => bulkDeletePromise);
|
|
292
293
|
listInstance.bulkDelete();
|
|
293
294
|
|
|
294
|
-
expectErrorToBeNull(listInstance.state.error);
|
|
295
|
-
expect(listInstance.state.errored).toBe(false);
|
|
296
295
|
expect(listInstance.state.loading).toBe(true);
|
|
296
|
+
|
|
297
297
|
await expect(() => listInstance.list()).rejects.toThrow(ListInstanceError);
|
|
298
|
+
|
|
299
|
+
expect(listInstance.state.loading).toBe(true);
|
|
300
|
+
|
|
301
|
+
// @ts-ignore - bulkDeleteResolve is set in a promise. promise executors run immediately
|
|
302
|
+
bulkDeleteResolve();
|
|
303
|
+
await flushPromises();
|
|
304
|
+
|
|
305
|
+
expect(globalBulkDelete).toHaveBeenCalledTimes(1);
|
|
298
306
|
expectErrorToBeNull(listInstance.state.error);
|
|
299
307
|
expect(listInstance.state.errored).toBe(false);
|
|
300
|
-
expect(listInstance.state.loading).toBe(
|
|
308
|
+
expect(listInstance.state.loading).toBe(false);
|
|
301
309
|
});
|
|
302
310
|
it("errored", async function () {
|
|
303
311
|
const listArgs = reactive({
|
package/use/listInstance.js
CHANGED
|
@@ -463,6 +463,10 @@ export function useListInstance({ props, functions = {}, keepOldPages }) {
|
|
|
463
463
|
|
|
464
464
|
function clearList() {
|
|
465
465
|
assignReactiveObject(state.objects, {});
|
|
466
|
+
// to avoid objectsInOrderRefs from being in a broken state
|
|
467
|
+
// for a tick or two, where all the elements are undefined
|
|
468
|
+
// we need to clear it as well
|
|
469
|
+
objectsInOrderRefs.value = [];
|
|
466
470
|
loadingError.clearError();
|
|
467
471
|
}
|
|
468
472
|
|