@arrai-innovations/reactive-helpers 17.0.0 → 17.0.1

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.
@@ -343,31 +343,31 @@ Get the previously set list and subscribe functions for the default crud.
343
343
 
344
344
  The reactive crud object, which will be mutated.
345
345
 
346
- ###### reactiveCrud.args
346
+ ###### args
347
347
 
348
348
  `any`
349
349
 
350
350
  The default arguments for the crud functions.
351
351
 
352
- ###### reactiveCrud.bulkDelete
352
+ ###### bulkDelete
353
353
 
354
354
  [`BulkDeleteFn`](listCrud.md#bulkdeletefn)
355
355
 
356
356
  The delete function to bulk delete a list of items.
357
357
 
358
- ###### reactiveCrud.executeAction
358
+ ###### executeAction
359
359
 
360
360
  [`ExecuteActionFn`](listCrud.md#executeactionfn)
361
361
 
362
362
  The function to execute a certain action on a list of items.
363
363
 
364
- ###### reactiveCrud.list
364
+ ###### list
365
365
 
366
366
  [`ListFn`](listCrud.md#listfn)
367
367
 
368
368
  The list function to get a list of items.
369
369
 
370
- ###### reactiveCrud.subscribe
370
+ ###### subscribe
371
371
 
372
372
  [`SubscribeFn`](listCrud.md#subscribefn)
373
373
 
@@ -377,19 +377,19 @@ The subscribe function to get a subscription to a list of items.
377
377
 
378
378
  The options for the default crud.
379
379
 
380
- ###### options.functions
380
+ ###### functions
381
381
 
382
382
  [`ListCrudFunctions`](listCrud.md#listcrudfunctions) & [`ListCrudArgs`](listCrud.md#listcrudargs)
383
383
 
384
384
  The functions to set for the crud.
385
385
 
386
- ###### options.props
386
+ ###### props
387
387
 
388
- `object`
388
+ \{`crudArgs`: `any`; \}
389
389
 
390
390
  The props to set for the crud.
391
391
 
392
- ###### options.props.crudArgs
392
+ ###### props.crudArgs
393
393
 
394
394
  `any`
395
395
 
@@ -372,23 +372,23 @@ The reactive object you want to add the resulting crud to.
372
372
 
373
373
  The options for the reactive crud object.
374
374
 
375
- ###### options.functions
375
+ ###### functions
376
376
 
377
377
  [`ObjectCrudFunctions`](objectCrud.md#objectcrudfunctions)
378
378
 
379
379
  Any functions to override the default crud functions.
380
380
 
381
- ###### options.props
381
+ ###### props
382
382
 
383
- `object`
383
+ \{`crudArgs`: \{`args`: `any`; \}; \}
384
384
 
385
385
  The props with any passed crudArgs.
386
386
 
387
- ###### options.props.crudArgs
387
+ ###### props.crudArgs
388
388
 
389
- `object`
389
+ \{`args`: `any`; \}
390
390
 
391
- ###### options.props.crudArgs.args
391
+ ###### props.crudArgs.args
392
392
 
393
393
  `any`
394
394
 
@@ -1081,7 +1081,7 @@ instance configurations.
1081
1081
 
1082
1082
  Configuration options to set as defaults for list sorting.
1083
1083
 
1084
- ###### options.sortThrottleWait
1084
+ ###### sortThrottleWait
1085
1085
 
1086
1086
  `number`
1087
1087
 
@@ -93,7 +93,7 @@ Called to turn the current object into a new object on the server.
93
93
 
94
94
  ###### args
95
95
 
96
- ###### args.object
96
+ ###### object
97
97
 
98
98
  `any`
99
99
 
@@ -121,7 +121,7 @@ Called to patch the current object on the server.
121
121
 
122
122
  ###### args
123
123
 
124
- ###### args.partialObject
124
+ ###### partialObject
125
125
 
126
126
  [`CrudObject`](objectInstance.md#crudobject)
127
127
 
@@ -149,7 +149,7 @@ Called to update the current object on the server.
149
149
 
150
150
  ###### args
151
151
 
152
- ###### args.object
152
+ ###### object
153
153
 
154
154
  [`CrudObject`](objectInstance.md#crudobject)
155
155
 
@@ -98,7 +98,7 @@ Subscribes to updates from an object, managing subscription state and
98
98
 
99
99
  ###### \_\_namedParameters?
100
100
 
101
- ###### __namedParameters.retrieve
101
+ ###### retrieve
102
102
 
103
103
  `boolean`
104
104
 
@@ -302,13 +302,13 @@ A reactive wrapper around FlexSearch.Index.
302
302
 
303
303
  Options.
304
304
 
305
- ###### options.props
305
+ ###### props
306
306
 
307
307
  [`SearchProps`](search.md#searchprops)
308
308
 
309
309
  Props.
310
310
 
311
- ###### options.throttle
311
+ ###### throttle
312
312
 
313
313
  `number` = `500`
314
314
 
@@ -65,13 +65,13 @@ A composable function for handling watches running. When all the trigger refs ar
65
65
 
66
66
  The options for the watches running.
67
67
 
68
- ###### options.triggerRefs
68
+ ###### triggerRefs
69
69
 
70
70
  `WatchSource`\<`any`\>[]
71
71
 
72
72
  The trigger refs.
73
73
 
74
- ###### options.watchSentinelRefs
74
+ ###### watchSentinelRefs
75
75
 
76
76
  `Ref`\<`boolean`, `boolean`\>[]
77
77
 
@@ -107,10 +107,16 @@ Keys to exclude from the addition or update.
107
107
 
108
108
  ##### addedKeys?
109
109
 
110
+ Precaulcated array of keys to add, if available. Otherwise, the
111
+ keys will be calculated.
112
+
110
113
  `any`[] | `Set`\<`any`\>
111
114
 
112
115
  ##### sameKeys?
113
116
 
117
+ Precaulcated array of keys to update, if available. Otherwise, the
118
+ keys will be calculated.
119
+
114
120
  `any`[] | `Set`\<`any`\>
115
121
 
116
122
  ##### doNotSetUndefinedKeys?
@@ -194,6 +200,9 @@ Keys to exclude from the addition.
194
200
 
195
201
  ##### addedKeys?
196
202
 
203
+ Precaulcated array of keys to add, if available. Otherwise, the
204
+ keys will be calculated.
205
+
197
206
  `any`[] | `Set`\<`any`\>
198
207
 
199
208
  #### Returns
@@ -344,6 +353,8 @@ Keys to exclude from removal.
344
353
 
345
354
  ##### removedKeys?
346
355
 
356
+ An array to store removed keys.
357
+
347
358
  `any`[] | `Set`\<`any`\>
348
359
 
349
360
  #### Returns
@@ -386,6 +397,9 @@ Keys to exclude from the update.
386
397
 
387
398
  ##### sameKeys?
388
399
 
400
+ Precaulcated array of keys to update, if available. Otherwise, the
401
+ keys will be calculated.
402
+
389
403
  `any`[] | `Set`\<`any`\>
390
404
 
391
405
  #### Returns
@@ -103,6 +103,8 @@ We unref your refs, so probably want a computed around this. We filter out false
103
103
 
104
104
  ##### cls
105
105
 
106
+ Handles the multiple ways of specifying CSS class related values.
107
+
106
108
  [`CombinedClassesArgument`](classes.md#combinedclassesargument) | [`CombinedClassesArgument`](classes.md#combinedclassesargument)[]
107
109
 
108
110
  #### Returns
@@ -28,19 +28,19 @@ Array or object to flatten.
28
28
 
29
29
  Options.
30
30
 
31
- ###### options.currentPath
31
+ ###### currentPath
32
32
 
33
33
  `string`
34
34
 
35
35
  Current path, for recursion or as a starting point.
36
36
 
37
- ###### options.depth
37
+ ###### depth
38
38
 
39
39
  `number`
40
40
 
41
41
  Current depth, for recursion.
42
42
 
43
- ###### options.limit
43
+ ###### limit
44
44
 
45
45
  `number`
46
46
 
@@ -43,29 +43,33 @@ are the same, what keys are removed, and what keys are added.
43
43
 
44
44
  ##### newKeys
45
45
 
46
+ Keys to consider as new.
47
+
46
48
  `string`[] | `Set`\<`any`\>
47
49
 
48
50
  ##### oldKeys
49
51
 
52
+ Keys to consider as old.
53
+
50
54
  `string`[] | `Set`\<`any`\>
51
55
 
52
56
  ##### options?
53
57
 
54
58
  Which differences are returned.
55
59
 
56
- ###### options.addedKeys
60
+ ###### addedKeys
57
61
 
58
62
  `boolean` = `true`
59
63
 
60
64
  If true, return keys that are added.
61
65
 
62
- ###### options.removedKeys
66
+ ###### removedKeys
63
67
 
64
68
  `boolean` = `true`
65
69
 
66
70
  If true, return keys that are removed.
67
71
 
68
- ###### options.sameKeys
72
+ ###### sameKeys
69
73
 
70
74
  `boolean` = `true`
71
75
 
@@ -27,31 +27,31 @@ Initializes the AwaitNot with specified options for reactive property watching a
27
27
 
28
28
  Configuration options for AwaitNot.
29
29
 
30
- ###### options.couldAlreadyBeFalse
30
+ ###### couldAlreadyBeFalse
31
31
 
32
32
  `boolean` = `false`
33
33
 
34
34
  Indicates if the property could already be in the false state at initialization.
35
35
 
36
- ###### options.obj
36
+ ###### obj
37
37
 
38
38
  `any`
39
39
 
40
40
  The object containing the property to watch.
41
41
 
42
- ###### options.prop
42
+ ###### prop
43
43
 
44
44
  `string`
45
45
 
46
46
  The property name to watch within the object.
47
47
 
48
- ###### options.ref
48
+ ###### ref
49
49
 
50
50
  `Ref`\<`any`, `any`\>
51
51
 
52
52
  A Vue ref to directly watch if provided.
53
53
 
54
- ###### options.timeout
54
+ ###### timeout
55
55
 
56
56
  `number` = `1000`
57
57
 
@@ -216,7 +216,7 @@ Creates an instance of AwaitTimeout with a specified timeout duration.
216
216
 
217
217
  The options for the AwaitTimeout.
218
218
 
219
- ###### options.timeout
219
+ ###### timeout
220
220
 
221
221
  `number` = `1000`
222
222
 
@@ -380,6 +380,8 @@ Starts the watch.
380
380
 
381
381
  ###### watchSources
382
382
 
383
+ The source(s) to watch.
384
+
383
385
  `WatchSource`\<`any`\> | `WatchSource`\<`any`\>[]
384
386
 
385
387
  ###### watchFunc
@@ -428,31 +430,31 @@ Helper function to get the resulting promise from an AwaitNot instance.
428
430
 
429
431
  Configuration options for AwaitNot.
430
432
 
431
- ###### options.couldAlreadyBeFalse
433
+ ###### couldAlreadyBeFalse
432
434
 
433
435
  `boolean` = `true`
434
436
 
435
437
  Indicates if the property could already be in the false state at initialization.
436
438
 
437
- ###### options.obj
439
+ ###### obj
438
440
 
439
441
  `any`
440
442
 
441
443
  The object containing the property to watch.
442
444
 
443
- ###### options.prop
445
+ ###### prop
444
446
 
445
447
  `string`
446
448
 
447
449
  The property name to watch within the object.
448
450
 
449
- ###### options.ref
451
+ ###### ref
450
452
 
451
453
  `Ref`\<`any`, `any`\>
452
454
 
453
455
  A Vue ref to directly watch if provided.
454
456
 
455
- ###### options.timeout
457
+ ###### timeout
456
458
 
457
459
  `number` = `1000`
458
460
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arrai-innovations/reactive-helpers",
3
- "version": "17.0.0",
3
+ "version": "17.0.1",
4
4
  "description": "VueJS 3 utility composition functions to help manipulate objects and lists.",
5
5
  "main": "index.js",
6
6
  "type": "module",
package/utils/classes.js CHANGED
@@ -176,5 +176,13 @@ export const stringifyClass = (cls) => {
176
176
  .filter((key) => unref(/** @type {boolean | import('vue').Ref<boolean>} */ (cls[key])))
177
177
  .join(" ");
178
178
  }
179
+ if (isString(cls)) {
180
+ const arrayish = cls.split(/\s+/);
181
+ const unique = new Set(arrayish);
182
+ if (unique.size === arrayish.length) {
183
+ return cls;
184
+ }
185
+ return [...unique].join(" ");
186
+ }
179
187
  return cls;
180
188
  };