@arrai-innovations/reactive-helpers 16.0.0 → 17.0.0
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/.husky/commit-msg +0 -1
- package/.husky/pre-commit +0 -1
- package/docs/README.md +1 -1
- package/docs/config/listCrud.md +67 -33
- package/docs/config/objectCrud.md +58 -30
- package/docs/use/cancellableIntent.md +10 -8
- package/docs/use/combineClasses.md +7 -5
- package/docs/use/list.md +24 -18
- package/docs/use/listCalculated.md +103 -101
- package/docs/use/listFilter.md +138 -136
- package/docs/use/listInstance.md +44 -28
- package/docs/use/listKeys.md +1 -1
- package/docs/use/listRelated.md +58 -56
- package/docs/use/listSearch.md +124 -122
- package/docs/use/listSort.md +209 -201
- package/docs/use/listSubscription.md +19 -13
- package/docs/use/loadingError.md +7 -5
- package/docs/use/object.md +85 -59
- package/docs/use/objectCalculated.md +122 -96
- package/docs/use/objectInstance.md +97 -61
- package/docs/use/objectRelated.md +99 -73
- package/docs/use/objectSubscription.md +59 -37
- package/docs/use/paginatedListInstance.md +8 -6
- package/docs/use/proxyLoadingError.md +11 -9
- package/docs/use/search.md +16 -12
- package/docs/use/watchesRunning.md +8 -4
- package/docs/utils/assignReactiveObject.md +96 -48
- package/docs/utils/classes.md +43 -17
- package/docs/utils/compact.md +10 -4
- package/docs/utils/deleteKey.md +13 -5
- package/docs/utils/flattenPaths.md +14 -6
- package/docs/utils/getFakePk.md +7 -3
- package/docs/utils/keepAliveTry.md +13 -5
- package/docs/utils/keyDiff.md +30 -18
- package/docs/utils/loadingCombine.md +4 -2
- package/docs/utils/proxyRunning.md +10 -4
- package/docs/utils/relatedCalculatedHelpers.md +22 -8
- package/docs/utils/set.md +37 -13
- package/docs/utils/transformWalk.md +10 -4
- package/docs/utils/watches.md +77 -31
- package/package.json +3 -3
- package/tests/unit/use/listInstance.spec.js +4 -5
- package/tests/unit/use/listSubscription.spec.js +7 -7
- package/tests/unit/use/objectInstance.spec.js +3 -3
- package/tests/unit/use/objectSubscription.spec.js +4 -3
- package/tests/unit/utils/classes.spec.js +304 -14
- package/use/list.js +3 -4
- package/use/listCalculated.js +6 -6
- package/use/listRelated.js +6 -3
- package/use/listSearch.js +1 -1
- package/use/objectRelated.js +6 -3
- package/utils/classes.js +127 -116
package/.husky/commit-msg
CHANGED
package/.husky/pre-commit
CHANGED
package/docs/README.md
CHANGED
package/docs/config/listCrud.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[**@arrai-innovations/reactive-helpers**](../README.md)
|
|
1
|
+
[**@arrai-innovations/reactive-helpers**](../README.md)
|
|
2
2
|
|
|
3
3
|
***
|
|
4
4
|
|
|
@@ -66,9 +66,9 @@ The ids of the objects to be acted upon.
|
|
|
66
66
|
|
|
67
67
|
#### Properties
|
|
68
68
|
|
|
69
|
-
##### args
|
|
69
|
+
##### args?
|
|
70
70
|
|
|
71
|
-
> **args**: `any`
|
|
71
|
+
> `optional` **args**: `any`
|
|
72
72
|
|
|
73
73
|
The default arguments for the crud functions.
|
|
74
74
|
|
|
@@ -78,27 +78,27 @@ The default arguments for the crud functions.
|
|
|
78
78
|
|
|
79
79
|
#### Properties
|
|
80
80
|
|
|
81
|
-
##### bulkDelete
|
|
81
|
+
##### bulkDelete?
|
|
82
82
|
|
|
83
|
-
> **bulkDelete**: [`BulkDeleteFn`](listCrud.md#bulkdeletefn)
|
|
83
|
+
> `optional` **bulkDelete**: [`BulkDeleteFn`](listCrud.md#bulkdeletefn)
|
|
84
84
|
|
|
85
85
|
The delete function to bulk delete a list of items.
|
|
86
86
|
|
|
87
|
-
##### executeAction
|
|
87
|
+
##### executeAction?
|
|
88
88
|
|
|
89
|
-
> **executeAction**: [`ExecuteActionFn`](listCrud.md#executeactionfn)
|
|
89
|
+
> `optional` **executeAction**: [`ExecuteActionFn`](listCrud.md#executeactionfn)
|
|
90
90
|
|
|
91
91
|
The function to execute a certain action on a list of items.
|
|
92
92
|
|
|
93
|
-
##### list
|
|
93
|
+
##### list?
|
|
94
94
|
|
|
95
|
-
> **list**: [`ListFn`](listCrud.md#listfn)
|
|
95
|
+
> `optional` **list**: [`ListFn`](listCrud.md#listfn)
|
|
96
96
|
|
|
97
97
|
The list function to get a list of items.
|
|
98
98
|
|
|
99
|
-
##### subscribe
|
|
99
|
+
##### subscribe?
|
|
100
100
|
|
|
101
|
-
> **subscribe**: [`SubscribeFn`](listCrud.md#subscribefn)
|
|
101
|
+
> `optional` **subscribe**: [`SubscribeFn`](listCrud.md#subscribefn)
|
|
102
102
|
|
|
103
103
|
The subscribe function to get a subscription to a list of items.
|
|
104
104
|
|
|
@@ -116,7 +116,7 @@ The arguments to be passed to the crud functions.
|
|
|
116
116
|
|
|
117
117
|
##### isCancelled
|
|
118
118
|
|
|
119
|
-
> **isCancelled**: `Readonly`\<`Ref`\<`boolean`\>\>
|
|
119
|
+
> **isCancelled**: `Readonly`\<`Ref`\<`boolean`, `boolean`\>\>
|
|
120
120
|
|
|
121
121
|
A ref to a boolean indicating whether the request has
|
|
122
122
|
been cancelled.
|
|
@@ -217,7 +217,9 @@ The delete function to bulk delete a list of items.
|
|
|
217
217
|
|
|
218
218
|
#### Parameters
|
|
219
219
|
|
|
220
|
-
|
|
220
|
+
##### DeleteFnArgs
|
|
221
|
+
|
|
222
|
+
`any`
|
|
221
223
|
|
|
222
224
|
#### Returns
|
|
223
225
|
|
|
@@ -227,7 +229,7 @@ The delete function to bulk delete a list of items.
|
|
|
227
229
|
|
|
228
230
|
### ExecuteActionFn()
|
|
229
231
|
|
|
230
|
-
> **ExecuteActionFn**\<\>: (`ExecuteActionFnArgs`) => `Promise`\<[`
|
|
232
|
+
> **ExecuteActionFn**\<\>: (`ExecuteActionFnArgs`) => `Promise`\<[`ResponseData`](objectCrud.md#responsedata) \| `false`\> & `object`
|
|
231
233
|
|
|
232
234
|
The function to execute a certain action on a list of items, returning the response data or false.
|
|
233
235
|
|
|
@@ -235,11 +237,13 @@ The function to execute a certain action on a list of items, returning the respo
|
|
|
235
237
|
|
|
236
238
|
#### Parameters
|
|
237
239
|
|
|
238
|
-
|
|
240
|
+
##### ExecuteActionFnArgs
|
|
241
|
+
|
|
242
|
+
`any`
|
|
239
243
|
|
|
240
244
|
#### Returns
|
|
241
245
|
|
|
242
|
-
`Promise`\<[`
|
|
246
|
+
`Promise`\<[`ResponseData`](objectCrud.md#responsedata) \| `false`\> & `object`
|
|
243
247
|
|
|
244
248
|
***
|
|
245
249
|
|
|
@@ -253,7 +257,9 @@ The list function to get a list of items, returning a boolean indicating success
|
|
|
253
257
|
|
|
254
258
|
#### Parameters
|
|
255
259
|
|
|
256
|
-
|
|
260
|
+
##### ListFnArgs
|
|
261
|
+
|
|
262
|
+
`any`
|
|
257
263
|
|
|
258
264
|
#### Returns
|
|
259
265
|
|
|
@@ -269,9 +275,13 @@ The list function to get a list of items, returning a boolean indicating success
|
|
|
269
275
|
|
|
270
276
|
#### Parameters
|
|
271
277
|
|
|
272
|
-
|
|
278
|
+
##### newObjects
|
|
279
|
+
|
|
280
|
+
[`ListObject`](../use/listInstance.md#listobject)
|
|
281
|
+
|
|
282
|
+
##### paginationInfo
|
|
273
283
|
|
|
274
|
-
|
|
284
|
+
[`PaginateInfo`](listCrud.md#paginateinfo) | `undefined`
|
|
275
285
|
|
|
276
286
|
#### Returns
|
|
277
287
|
|
|
@@ -289,7 +299,9 @@ The subscribe function to set up a subscription to a list of items.
|
|
|
289
299
|
|
|
290
300
|
#### Parameters
|
|
291
301
|
|
|
292
|
-
|
|
302
|
+
##### SubscribeFnArgs
|
|
303
|
+
|
|
304
|
+
`any`
|
|
293
305
|
|
|
294
306
|
#### Returns
|
|
295
307
|
|
|
@@ -305,9 +317,13 @@ The subscribe function to set up a subscription to a list of items.
|
|
|
305
317
|
|
|
306
318
|
#### Parameters
|
|
307
319
|
|
|
308
|
-
|
|
320
|
+
##### newOrUpdatedOrDeleteObject
|
|
321
|
+
|
|
322
|
+
[`ListObject`](../use/listInstance.md#listobject) | `string`
|
|
323
|
+
|
|
324
|
+
##### action
|
|
309
325
|
|
|
310
|
-
|
|
326
|
+
`"create"` | `"update"` | `"delete"`
|
|
311
327
|
|
|
312
328
|
#### Returns
|
|
313
329
|
|
|
@@ -323,43 +339,59 @@ Get the previously set list and subscribe functions for the default crud.
|
|
|
323
339
|
|
|
324
340
|
#### Parameters
|
|
325
341
|
|
|
326
|
-
|
|
342
|
+
##### reactiveCrud
|
|
327
343
|
|
|
328
344
|
The reactive crud object, which will be mutated.
|
|
329
345
|
|
|
330
|
-
|
|
346
|
+
###### reactiveCrud.args
|
|
347
|
+
|
|
348
|
+
`any`
|
|
331
349
|
|
|
332
350
|
The default arguments for the crud functions.
|
|
333
351
|
|
|
334
|
-
|
|
352
|
+
###### reactiveCrud.bulkDelete
|
|
353
|
+
|
|
354
|
+
[`BulkDeleteFn`](listCrud.md#bulkdeletefn)
|
|
335
355
|
|
|
336
356
|
The delete function to bulk delete a list of items.
|
|
337
357
|
|
|
338
|
-
|
|
358
|
+
###### reactiveCrud.executeAction
|
|
359
|
+
|
|
360
|
+
[`ExecuteActionFn`](listCrud.md#executeactionfn)
|
|
339
361
|
|
|
340
362
|
The function to execute a certain action on a list of items.
|
|
341
363
|
|
|
342
|
-
|
|
364
|
+
###### reactiveCrud.list
|
|
365
|
+
|
|
366
|
+
[`ListFn`](listCrud.md#listfn)
|
|
343
367
|
|
|
344
368
|
The list function to get a list of items.
|
|
345
369
|
|
|
346
|
-
|
|
370
|
+
###### reactiveCrud.subscribe
|
|
371
|
+
|
|
372
|
+
[`SubscribeFn`](listCrud.md#subscribefn)
|
|
347
373
|
|
|
348
374
|
The subscribe function to get a subscription to a list of items.
|
|
349
375
|
|
|
350
|
-
|
|
376
|
+
##### options
|
|
351
377
|
|
|
352
378
|
The options for the default crud.
|
|
353
379
|
|
|
354
|
-
|
|
380
|
+
###### options.functions
|
|
381
|
+
|
|
382
|
+
[`ListCrudFunctions`](listCrud.md#listcrudfunctions) & [`ListCrudArgs`](listCrud.md#listcrudargs)
|
|
355
383
|
|
|
356
384
|
The functions to set for the crud.
|
|
357
385
|
|
|
358
|
-
|
|
386
|
+
###### options.props
|
|
387
|
+
|
|
388
|
+
`object`
|
|
359
389
|
|
|
360
390
|
The props to set for the crud.
|
|
361
391
|
|
|
362
|
-
|
|
392
|
+
###### options.props.crudArgs
|
|
393
|
+
|
|
394
|
+
`any`
|
|
363
395
|
|
|
364
396
|
#### Returns
|
|
365
397
|
|
|
@@ -375,7 +407,9 @@ Set the list and subscribe functions for the default crud.
|
|
|
375
407
|
|
|
376
408
|
#### Parameters
|
|
377
409
|
|
|
378
|
-
|
|
410
|
+
##### options
|
|
411
|
+
|
|
412
|
+
[`ListCrudFunctions`](listCrud.md#listcrudfunctions) & `Partial`\<[`ListCrudArgs`](listCrud.md#listcrudargs)\>
|
|
379
413
|
|
|
380
414
|
The options for the default crud.
|
|
381
415
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[**@arrai-innovations/reactive-helpers**](../README.md)
|
|
1
|
+
[**@arrai-innovations/reactive-helpers**](../README.md)
|
|
2
2
|
|
|
3
3
|
***
|
|
4
4
|
|
|
@@ -72,9 +72,9 @@ The arguments to be passed to the retrieve function.
|
|
|
72
72
|
|
|
73
73
|
#### Properties
|
|
74
74
|
|
|
75
|
-
##### args
|
|
75
|
+
##### args?
|
|
76
76
|
|
|
77
|
-
> **args**: `any`
|
|
77
|
+
> `optional` **args**: `any`
|
|
78
78
|
|
|
79
79
|
The arguments to be passed to the crud functions.
|
|
80
80
|
|
|
@@ -84,85 +84,97 @@ The arguments to be passed to the crud functions.
|
|
|
84
84
|
|
|
85
85
|
#### Properties
|
|
86
86
|
|
|
87
|
-
##### create()
|
|
87
|
+
##### create()?
|
|
88
88
|
|
|
89
|
-
> **create**: (`CreateDetailArgs`) => [`ResponseData`](objectCrud.md#responsedata)
|
|
89
|
+
> `optional` **create**: (`CreateDetailArgs`) => [`ResponseData`](objectCrud.md#responsedata)
|
|
90
90
|
|
|
91
91
|
A function to be used instead of the default crud create function.
|
|
92
92
|
|
|
93
93
|
###### Parameters
|
|
94
94
|
|
|
95
|
-
|
|
95
|
+
###### CreateDetailArgs
|
|
96
|
+
|
|
97
|
+
`any`
|
|
96
98
|
|
|
97
99
|
###### Returns
|
|
98
100
|
|
|
99
101
|
[`ResponseData`](objectCrud.md#responsedata)
|
|
100
102
|
|
|
101
|
-
##### delete()
|
|
103
|
+
##### delete()?
|
|
102
104
|
|
|
103
|
-
> **delete**: (`DeleteDetailArgs`) => [`ResponseData`](objectCrud.md#responsedata)
|
|
105
|
+
> `optional` **delete**: (`DeleteDetailArgs`) => [`ResponseData`](objectCrud.md#responsedata)
|
|
104
106
|
|
|
105
107
|
A function to be used instead of the default crud delete function.
|
|
106
108
|
|
|
107
109
|
###### Parameters
|
|
108
110
|
|
|
109
|
-
|
|
111
|
+
###### DeleteDetailArgs
|
|
112
|
+
|
|
113
|
+
`any`
|
|
110
114
|
|
|
111
115
|
###### Returns
|
|
112
116
|
|
|
113
117
|
[`ResponseData`](objectCrud.md#responsedata)
|
|
114
118
|
|
|
115
|
-
##### patch()
|
|
119
|
+
##### patch()?
|
|
116
120
|
|
|
117
|
-
> **patch**: (`PartialDetailArgs`) => [`ResponseData`](objectCrud.md#responsedata)
|
|
121
|
+
> `optional` **patch**: (`PartialDetailArgs`) => [`ResponseData`](objectCrud.md#responsedata)
|
|
118
122
|
|
|
119
123
|
A function to be used instead of the default crud patch function.
|
|
120
124
|
|
|
121
125
|
###### Parameters
|
|
122
126
|
|
|
123
|
-
|
|
127
|
+
###### PartialDetailArgs
|
|
128
|
+
|
|
129
|
+
`any`
|
|
124
130
|
|
|
125
131
|
###### Returns
|
|
126
132
|
|
|
127
133
|
[`ResponseData`](objectCrud.md#responsedata)
|
|
128
134
|
|
|
129
|
-
##### retrieve()
|
|
135
|
+
##### retrieve()?
|
|
130
136
|
|
|
131
|
-
> **retrieve**: (`RetrieveDetailArgs`) => [`ResponseData`](objectCrud.md#responsedata)
|
|
137
|
+
> `optional` **retrieve**: (`RetrieveDetailArgs`) => [`ResponseData`](objectCrud.md#responsedata)
|
|
132
138
|
|
|
133
139
|
A function to be used instead of the default crud retrieve function.
|
|
134
140
|
|
|
135
141
|
###### Parameters
|
|
136
142
|
|
|
137
|
-
|
|
143
|
+
###### RetrieveDetailArgs
|
|
144
|
+
|
|
145
|
+
`any`
|
|
138
146
|
|
|
139
147
|
###### Returns
|
|
140
148
|
|
|
141
149
|
[`ResponseData`](objectCrud.md#responsedata)
|
|
142
150
|
|
|
143
|
-
##### subscribe()
|
|
151
|
+
##### subscribe()?
|
|
144
152
|
|
|
145
|
-
> **subscribe**: (`SubscribeArgs`) => `void` & `object`
|
|
153
|
+
> `optional` **subscribe**: (`SubscribeArgs`) => `void` & `object`
|
|
146
154
|
|
|
147
155
|
A function to be used instead of the default crud subscribe function.
|
|
148
156
|
|
|
149
157
|
###### Parameters
|
|
150
158
|
|
|
151
|
-
|
|
159
|
+
###### SubscribeArgs
|
|
160
|
+
|
|
161
|
+
`any`
|
|
152
162
|
|
|
153
163
|
###### Returns
|
|
154
164
|
|
|
155
165
|
`void` & `object`
|
|
156
166
|
|
|
157
|
-
##### update()
|
|
167
|
+
##### update()?
|
|
158
168
|
|
|
159
|
-
> **update**: (`UpdateDetailArgs`) => [`ResponseData`](objectCrud.md#responsedata)
|
|
169
|
+
> `optional` **update**: (`UpdateDetailArgs`) => [`ResponseData`](objectCrud.md#responsedata)
|
|
160
170
|
|
|
161
171
|
A function to be used instead of the default crud update function.
|
|
162
172
|
|
|
163
173
|
###### Parameters
|
|
164
174
|
|
|
165
|
-
|
|
175
|
+
###### UpdateDetailArgs
|
|
176
|
+
|
|
177
|
+
`any`
|
|
166
178
|
|
|
167
179
|
###### Returns
|
|
168
180
|
|
|
@@ -248,9 +260,13 @@ The callback to be called when the object is updated.
|
|
|
248
260
|
|
|
249
261
|
###### Parameters
|
|
250
262
|
|
|
251
|
-
|
|
263
|
+
###### data
|
|
264
|
+
|
|
265
|
+
[`CrudObject`](../use/objectInstance.md#crudobject)
|
|
252
266
|
|
|
253
|
-
|
|
267
|
+
###### action
|
|
268
|
+
|
|
269
|
+
`string`
|
|
254
270
|
|
|
255
271
|
###### Returns
|
|
256
272
|
|
|
@@ -346,25 +362,35 @@ Get the previously set object crud functions.
|
|
|
346
362
|
|
|
347
363
|
#### Parameters
|
|
348
364
|
|
|
349
|
-
|
|
365
|
+
##### reactiveCrud
|
|
366
|
+
|
|
367
|
+
`any`
|
|
350
368
|
|
|
351
369
|
The reactive object you want to add the resulting crud to.
|
|
352
370
|
|
|
353
|
-
|
|
371
|
+
##### options
|
|
354
372
|
|
|
355
373
|
The options for the reactive crud object.
|
|
356
374
|
|
|
357
|
-
|
|
375
|
+
###### options.functions
|
|
376
|
+
|
|
377
|
+
[`ObjectCrudFunctions`](objectCrud.md#objectcrudfunctions)
|
|
358
378
|
|
|
359
379
|
Any functions to override the default crud functions.
|
|
360
380
|
|
|
361
|
-
|
|
381
|
+
###### options.props
|
|
382
|
+
|
|
383
|
+
`object`
|
|
362
384
|
|
|
363
385
|
The props with any passed crudArgs.
|
|
364
386
|
|
|
365
|
-
|
|
387
|
+
###### options.props.crudArgs
|
|
366
388
|
|
|
367
|
-
|
|
389
|
+
`object`
|
|
390
|
+
|
|
391
|
+
###### options.props.crudArgs.args
|
|
392
|
+
|
|
393
|
+
`any`
|
|
368
394
|
|
|
369
395
|
The arguments to be passed to the crud functions.
|
|
370
396
|
|
|
@@ -386,7 +412,9 @@ Set the object crud functions.
|
|
|
386
412
|
|
|
387
413
|
#### Parameters
|
|
388
414
|
|
|
389
|
-
|
|
415
|
+
##### options
|
|
416
|
+
|
|
417
|
+
[`ObjectCrudArgs`](objectCrud.md#objectcrudargs)
|
|
390
418
|
|
|
391
419
|
The options for the object crud functions.
|
|
392
420
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[**@arrai-innovations/reactive-helpers**](../README.md)
|
|
1
|
+
[**@arrai-innovations/reactive-helpers**](../README.md)
|
|
2
2
|
|
|
3
3
|
***
|
|
4
4
|
|
|
@@ -62,21 +62,21 @@ The function that returns a promise that can be cancelled.
|
|
|
62
62
|
|
|
63
63
|
[`CancellablePromise`](cancellableIntent.md#cancellablepromise)
|
|
64
64
|
|
|
65
|
-
##### clearActiveOnResolved
|
|
65
|
+
##### clearActiveOnResolved?
|
|
66
66
|
|
|
67
|
-
> **clearActiveOnResolved**: `boolean`
|
|
67
|
+
> `optional` **clearActiveOnResolved**: `boolean`
|
|
68
68
|
|
|
69
69
|
Whether to clear the active state when the promise resolves.
|
|
70
70
|
|
|
71
|
-
##### guardArguments
|
|
71
|
+
##### guardArguments?
|
|
72
72
|
|
|
73
|
-
> **guardArguments**: `any`
|
|
73
|
+
> `optional` **guardArguments**: `any`
|
|
74
74
|
|
|
75
75
|
The reactive object to watch for truthiness before running the intent.
|
|
76
76
|
|
|
77
|
-
##### watchArguments
|
|
77
|
+
##### watchArguments?
|
|
78
78
|
|
|
79
|
-
> **watchArguments**: `any`
|
|
79
|
+
> `optional` **watchArguments**: `any`
|
|
80
80
|
|
|
81
81
|
The reactive object to watch for changes.
|
|
82
82
|
|
|
@@ -120,7 +120,9 @@ If the promise is not resolved before the watch arguments change again, the prev
|
|
|
120
120
|
|
|
121
121
|
#### Parameters
|
|
122
122
|
|
|
123
|
-
|
|
123
|
+
##### options
|
|
124
|
+
|
|
125
|
+
[`CancellableIntentOptions`](cancellableIntent.md#cancellableintentoptions)
|
|
124
126
|
|
|
125
127
|
The options for the cancellable intent.
|
|
126
128
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[**@arrai-innovations/reactive-helpers**](../README.md)
|
|
1
|
+
[**@arrai-innovations/reactive-helpers**](../README.md)
|
|
2
2
|
|
|
3
3
|
***
|
|
4
4
|
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
### CSSClasses
|
|
12
12
|
|
|
13
|
-
> **CSSClasses**\<\>: `string` \| `string`[] \|
|
|
13
|
+
> **CSSClasses**\<\>: `string` \| `string`[] \| \{\} \| `Ref`
|
|
14
14
|
|
|
15
15
|
#### Type Parameters
|
|
16
16
|
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
|
|
19
19
|
### useCombineClasses()
|
|
20
20
|
|
|
21
|
-
> **useCombineClasses**(...`classes`): `Ref`\<[`CombinedClasses`](../utils/classes.md#combinedclasses)\>
|
|
21
|
+
> **useCombineClasses**(...`classes`): `Ref`\<[`CombinedClasses`](../utils/classes.md#combinedclasses), [`CombinedClasses`](../utils/classes.md#combinedclasses)\>
|
|
22
22
|
|
|
23
23
|
Normalize various ways of specifying CSS classes into an object for use in Vue.js with reactivity. If refs are
|
|
24
24
|
present, the resulting object will be a ref containing an array of objects to preserve order of operations in
|
|
@@ -26,13 +26,15 @@ Normalize various ways of specifying CSS classes into an object for use in Vue.j
|
|
|
26
26
|
|
|
27
27
|
#### Parameters
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
##### classes
|
|
30
|
+
|
|
31
|
+
...[`CSSClasses`](combineClasses.md#cssclasses)[]
|
|
30
32
|
|
|
31
33
|
A mixed array containing multiple ways of specifying CSS classes.
|
|
32
34
|
|
|
33
35
|
#### Returns
|
|
34
36
|
|
|
35
|
-
`Ref`\<[`CombinedClasses`](../utils/classes.md#combinedclasses)\>
|
|
37
|
+
`Ref`\<[`CombinedClasses`](../utils/classes.md#combinedclasses), [`CombinedClasses`](../utils/classes.md#combinedclasses)\>
|
|
36
38
|
|
|
37
39
|
- A ref
|
|
38
40
|
containing an object or array of objects containing CSS classes. Arrays are used if refs are present, to
|
package/docs/use/list.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[**@arrai-innovations/reactive-helpers**](../README.md)
|
|
1
|
+
[**@arrai-innovations/reactive-helpers**](../README.md)
|
|
2
2
|
|
|
3
3
|
***
|
|
4
4
|
|
|
@@ -26,11 +26,15 @@ Creates a new ListError.
|
|
|
26
26
|
|
|
27
27
|
###### Parameters
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
###### message
|
|
30
|
+
|
|
31
|
+
`string`
|
|
30
32
|
|
|
31
33
|
The error message.
|
|
32
34
|
|
|
33
|
-
|
|
35
|
+
###### code
|
|
36
|
+
|
|
37
|
+
`string`
|
|
34
38
|
|
|
35
39
|
The error code.
|
|
36
40
|
|
|
@@ -148,13 +152,13 @@ Function or rule to determine if an item should be included based on inclusion c
|
|
|
148
152
|
|
|
149
153
|
##### calculatedObjectsRules
|
|
150
154
|
|
|
151
|
-
> **calculatedObjectsRules**: `Ref`\<`object`\>
|
|
155
|
+
> **calculatedObjectsRules**: `Ref`\<`object`, `object`\>
|
|
152
156
|
|
|
153
157
|
Defines rules for dynamically calculating properties of list items.
|
|
154
158
|
|
|
155
159
|
##### crudArgs
|
|
156
160
|
|
|
157
|
-
> **crudArgs**: `
|
|
161
|
+
> **crudArgs**: `any`
|
|
158
162
|
|
|
159
163
|
General arguments to pass to the registered list crud functions, often related to endpoints.
|
|
160
164
|
|
|
@@ -190,7 +194,7 @@ Indicates whether changes to the list should be subscribed to.
|
|
|
190
194
|
|
|
191
195
|
##### listArgs
|
|
192
196
|
|
|
193
|
-
> **listArgs**: `
|
|
197
|
+
> **listArgs**: `any`
|
|
194
198
|
|
|
195
199
|
The arguments to pass to the registered list crud functions, related to the list itself.
|
|
196
200
|
|
|
@@ -218,7 +222,7 @@ Defines rules for associating related objects with list items.
|
|
|
218
222
|
|
|
219
223
|
##### retrieveArgs
|
|
220
224
|
|
|
221
|
-
> **retrieveArgs**: `
|
|
225
|
+
> **retrieveArgs**: `any`
|
|
222
226
|
|
|
223
227
|
The arguments to pass to the registered list crud functions, related to the items.
|
|
224
228
|
|
|
@@ -238,7 +242,7 @@ Current text query used for filtering the list.
|
|
|
238
242
|
|
|
239
243
|
### ListFunctions
|
|
240
244
|
|
|
241
|
-
> **ListFunctions**\<\>: [`
|
|
245
|
+
> **ListFunctions**\<\>: [`ListInstanceFunctions`](listInstance.md#listinstancefunctions) & [`ListSubscriptionFunctions`](listSubscription.md#listsubscriptionfunctions)
|
|
242
246
|
|
|
243
247
|
#### Type Parameters
|
|
244
248
|
|
|
@@ -254,31 +258,31 @@ Current text query used for filtering the list.
|
|
|
254
258
|
|
|
255
259
|
##### listCalculated
|
|
256
260
|
|
|
257
|
-
> **listCalculated**: [`
|
|
261
|
+
> **listCalculated**: [`ListCalculated`](listCalculated.md#listcalculated)
|
|
258
262
|
|
|
259
263
|
##### listFilter
|
|
260
264
|
|
|
261
|
-
> **listFilter**: [`
|
|
265
|
+
> **listFilter**: [`ListFilter`](listFilter.md#listfilter)
|
|
262
266
|
|
|
263
267
|
##### listInstance
|
|
264
268
|
|
|
265
|
-
> **listInstance**: [`
|
|
269
|
+
> **listInstance**: [`ListInstance`](listInstance.md#listinstance)
|
|
266
270
|
|
|
267
271
|
##### listRelated
|
|
268
272
|
|
|
269
|
-
> **listRelated**: [`
|
|
273
|
+
> **listRelated**: [`ListRelated`](listRelated.md#listrelated)
|
|
270
274
|
|
|
271
275
|
##### listSearch
|
|
272
276
|
|
|
273
|
-
> **listSearch**: [`
|
|
277
|
+
> **listSearch**: [`ListSearch`](listSearch.md#listsearch)
|
|
274
278
|
|
|
275
279
|
##### listSort
|
|
276
280
|
|
|
277
|
-
> **listSort**: [`
|
|
281
|
+
> **listSort**: [`ListSort`](listSort.md#listsort)
|
|
278
282
|
|
|
279
283
|
##### listSubscription
|
|
280
284
|
|
|
281
|
-
> **listSubscription**: [`
|
|
285
|
+
> **listSubscription**: [`ListSubscription`](listSubscription.md#listsubscription)
|
|
282
286
|
|
|
283
287
|
***
|
|
284
288
|
|
|
@@ -292,7 +296,7 @@ Current text query used for filtering the list.
|
|
|
292
296
|
|
|
293
297
|
### ListRawState
|
|
294
298
|
|
|
295
|
-
> **ListRawState**\<\>: [`
|
|
299
|
+
> **ListRawState**\<\>: [`ListInstanceRawState`](listInstance.md#listinstancerawstate) \| [`ListSubscriptionRawState`](listSubscription.md#listsubscriptionrawstate) \| [`ListRelatedRawState`](listRelated.md#listrelatedrawstate) \| [`ListCalculatedRawState`](listCalculated.md#listcalculatedrawstate) \| [`ListFilterRawState`](listFilter.md#listfilterrawstate) \| [`ListSearchRawState`](listSearch.md#listsearchrawstate) \| [`ListSortRawState`](listSort.md#listsortrawstate)
|
|
296
300
|
|
|
297
301
|
#### Type Parameters
|
|
298
302
|
|
|
@@ -315,7 +319,9 @@ It ensures seamless integration of all list functionalities such as sorting, sea
|
|
|
315
319
|
|
|
316
320
|
#### Parameters
|
|
317
321
|
|
|
318
|
-
|
|
322
|
+
##### options
|
|
323
|
+
|
|
324
|
+
[`ListOptions`](list.md#listoptions)
|
|
319
325
|
|
|
320
326
|
The options for the list./.
|
|
321
327
|
|
|
@@ -344,7 +350,7 @@ Initializes multiple list management instances with provided configurations.
|
|
|
344
350
|
|
|
345
351
|
#### Parameters
|
|
346
352
|
|
|
347
|
-
|
|
353
|
+
##### listOptions
|
|
348
354
|
|
|
349
355
|
The options for initializing multiple list instances.
|
|
350
356
|
|