sprintify-ui 0.10.22 → 0.10.24

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 (33) hide show
  1. package/dist/sprintify-ui.es.js +4203 -4203
  2. package/dist/types/components/BaseAutocomplete.vue.d.ts +17 -11
  3. package/dist/types/components/BaseAutocompleteDrawer.vue.d.ts +3 -1
  4. package/dist/types/components/BaseAutocompleteFetch.vue.d.ts +29 -23
  5. package/dist/types/components/BaseBelongsTo.vue.d.ts +25 -19
  6. package/dist/types/components/BaseBelongsToFetch.vue.d.ts +21 -15
  7. package/dist/types/components/BaseDropdownAutocomplete.vue.d.ts +13 -17
  8. package/dist/types/components/BaseHasMany.vue.d.ts +31 -25
  9. package/dist/types/components/BaseHasManyFetch.vue.d.ts +27 -21
  10. package/dist/types/components/BaseTagAutocomplete.vue.d.ts +17 -11
  11. package/dist/types/components/BaseTagAutocompleteFetch.vue.d.ts +33 -27
  12. package/dist/types/composables/hasOptions.d.ts +1 -1
  13. package/dist/types/types/index.d.ts +1 -1
  14. package/package.json +1 -1
  15. package/src/components/BaseAutocomplete.stories.js +7 -0
  16. package/src/components/BaseAutocomplete.vue +3 -9
  17. package/src/components/BaseAutocompleteDrawer.vue +2 -0
  18. package/src/components/BaseAutocompleteFetch.stories.js +8 -1
  19. package/src/components/BaseAutocompleteFetch.vue +6 -5
  20. package/src/components/BaseBelongsTo.stories.js +7 -0
  21. package/src/components/BaseBelongsTo.vue +1 -1
  22. package/src/components/BaseBelongsToFetch.stories.js +7 -0
  23. package/src/components/BaseDropdownAutocomplete.stories.js +9 -7
  24. package/src/components/BaseDropdownAutocomplete.vue +6 -11
  25. package/src/components/BaseHasMany.stories.js +7 -2
  26. package/src/components/BaseHasMany.vue +1 -1
  27. package/src/components/BaseHasManyFetch.stories.js +7 -0
  28. package/src/components/BaseTagAutocomplete.stories.js +7 -0
  29. package/src/components/BaseTagAutocomplete.vue +2 -2
  30. package/src/components/BaseTagAutocompleteFetch.stories.js +7 -0
  31. package/src/components/BaseTagAutocompleteFetch.vue +7 -6
  32. package/src/composables/hasOptions.ts +28 -10
  33. package/src/types/index.ts +1 -1
@@ -16,11 +16,11 @@ declare const tagAutocompleteFetch: import("vue").Ref<({
16
16
  }> & Omit<{
17
17
  readonly required: boolean;
18
18
  readonly disabled: boolean;
19
- readonly modelValue: RawOption[];
19
+ readonly modelValue: RawOption[] | null;
20
20
  readonly hasError: boolean;
21
21
  readonly url: string;
22
- readonly labelKey: string;
23
- readonly valueKey: string;
22
+ readonly labelKey: string | ((option: RawOption) => string);
23
+ readonly valueKey: string | ((option: RawOption) => string);
24
24
  readonly focusOnMount: boolean;
25
25
  readonly queryKey: string;
26
26
  readonly placeholder?: string | undefined;
@@ -47,7 +47,7 @@ declare const tagAutocompleteFetch: import("vue").Ref<({
47
47
  $options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
48
48
  modelValue: {
49
49
  required: true;
50
- type: PropType<RawOption[]>;
50
+ type: PropType<RawOption[] | null>;
51
51
  };
52
52
  url: {
53
53
  required: true;
@@ -55,11 +55,11 @@ declare const tagAutocompleteFetch: import("vue").Ref<({
55
55
  };
56
56
  labelKey: {
57
57
  required: true;
58
- type: StringConstructor;
58
+ type: PropType<string | ((option: RawOption) => string)>;
59
59
  };
60
60
  valueKey: {
61
61
  required: true;
62
- type: StringConstructor;
62
+ type: PropType<string | ((option: RawOption) => string)>;
63
63
  };
64
64
  placeholder: {
65
65
  default: undefined;
@@ -144,7 +144,7 @@ declare const tagAutocompleteFetch: import("vue").Ref<({
144
144
  }> & Omit<Readonly<import("vue").ExtractPropTypes<{
145
145
  modelValue: {
146
146
  required: true;
147
- type: PropType<RawOption[]>;
147
+ type: PropType<RawOption[] | null>;
148
148
  };
149
149
  url: {
150
150
  required: true;
@@ -152,11 +152,11 @@ declare const tagAutocompleteFetch: import("vue").Ref<({
152
152
  };
153
153
  labelKey: {
154
154
  required: true;
155
- type: StringConstructor;
155
+ type: PropType<string | ((option: RawOption) => string)>;
156
156
  };
157
157
  valueKey: {
158
158
  required: true;
159
- type: StringConstructor;
159
+ type: PropType<string | ((option: RawOption) => string)>;
160
160
  };
161
161
  placeholder: {
162
162
  default: undefined;
@@ -210,7 +210,9 @@ declare const tagAutocompleteFetch: import("vue").Ref<({
210
210
  open: () => void;
211
211
  close: () => void;
212
212
  keywords: import("vue").ComputedRef<string>;
213
- option: RawOption;
213
+ option: RawOption | null;
214
+ value: import("@/types").OptionValue;
215
+ label: string;
214
216
  selected: boolean;
215
217
  active: boolean;
216
218
  }) => any) | undefined;
@@ -245,11 +247,11 @@ declare const tagAutocompleteFetch: import("vue").Ref<({
245
247
  }> & Omit<{
246
248
  readonly required: boolean;
247
249
  readonly disabled: boolean;
248
- readonly modelValue: RawOption[];
250
+ readonly modelValue: RawOption[] | null;
249
251
  readonly hasError: boolean;
250
252
  readonly url: string;
251
- readonly labelKey: string;
252
- readonly valueKey: string;
253
+ readonly labelKey: string | ((option: RawOption) => string);
254
+ readonly valueKey: string | ((option: RawOption) => string);
253
255
  readonly focusOnMount: boolean;
254
256
  readonly queryKey: string;
255
257
  readonly placeholder?: string | undefined;
@@ -276,7 +278,7 @@ declare const tagAutocompleteFetch: import("vue").Ref<({
276
278
  $options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
277
279
  modelValue: {
278
280
  required: true;
279
- type: PropType<RawOption[]>;
281
+ type: PropType<RawOption[] | null>;
280
282
  };
281
283
  url: {
282
284
  required: true;
@@ -284,11 +286,11 @@ declare const tagAutocompleteFetch: import("vue").Ref<({
284
286
  };
285
287
  labelKey: {
286
288
  required: true;
287
- type: StringConstructor;
289
+ type: PropType<string | ((option: RawOption) => string)>;
288
290
  };
289
291
  valueKey: {
290
292
  required: true;
291
- type: StringConstructor;
293
+ type: PropType<string | ((option: RawOption) => string)>;
292
294
  };
293
295
  placeholder: {
294
296
  default: undefined;
@@ -373,7 +375,7 @@ declare const tagAutocompleteFetch: import("vue").Ref<({
373
375
  }> & Omit<Readonly<import("vue").ExtractPropTypes<{
374
376
  modelValue: {
375
377
  required: true;
376
- type: PropType<RawOption[]>;
378
+ type: PropType<RawOption[] | null>;
377
379
  };
378
380
  url: {
379
381
  required: true;
@@ -381,11 +383,11 @@ declare const tagAutocompleteFetch: import("vue").Ref<({
381
383
  };
382
384
  labelKey: {
383
385
  required: true;
384
- type: StringConstructor;
386
+ type: PropType<string | ((option: RawOption) => string)>;
385
387
  };
386
388
  valueKey: {
387
389
  required: true;
388
- type: StringConstructor;
390
+ type: PropType<string | ((option: RawOption) => string)>;
389
391
  };
390
392
  placeholder: {
391
393
  default: undefined;
@@ -439,7 +441,9 @@ declare const tagAutocompleteFetch: import("vue").Ref<({
439
441
  open: () => void;
440
442
  close: () => void;
441
443
  keywords: import("vue").ComputedRef<string>;
442
- option: RawOption;
444
+ option: RawOption | null;
445
+ value: import("@/types").OptionValue;
446
+ label: string;
443
447
  selected: boolean;
444
448
  active: boolean;
445
449
  }) => any) | undefined;
@@ -474,7 +478,9 @@ declare var __VLS_10: {
474
478
  open: () => void;
475
479
  close: () => void;
476
480
  keywords: import("vue").ComputedRef<string>;
477
- option: RawOption;
481
+ option: RawOption | null;
482
+ value: import("@/types").OptionValue;
483
+ label: string;
478
484
  selected: boolean;
479
485
  active: boolean;
480
486
  }, __VLS_14: {
@@ -515,7 +521,7 @@ declare const __VLS_self: import("vue").DefineComponent<import("vue").ExtractPro
515
521
  };
516
522
  field: {
517
523
  required: true;
518
- type: StringConstructor;
524
+ type: PropType<string | ((option: RawOption) => string)>;
519
525
  };
520
526
  required: {
521
527
  default: boolean;
@@ -567,7 +573,7 @@ declare const __VLS_self: import("vue").DefineComponent<import("vue").ExtractPro
567
573
  };
568
574
  field: {
569
575
  required: true;
570
- type: StringConstructor;
576
+ type: PropType<string | ((option: RawOption) => string)>;
571
577
  };
572
578
  required: {
573
579
  default: boolean;
@@ -625,7 +631,7 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
625
631
  };
626
632
  field: {
627
633
  required: true;
628
- type: StringConstructor;
634
+ type: PropType<string | ((option: RawOption) => string)>;
629
635
  };
630
636
  required: {
631
637
  default: boolean;
@@ -678,7 +684,7 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
678
684
  };
679
685
  field: {
680
686
  required: true;
681
- type: StringConstructor;
687
+ type: PropType<string | ((option: RawOption) => string)>;
682
688
  };
683
689
  required: {
684
690
  default: boolean;
@@ -15,11 +15,11 @@ declare const tagAutocompleteFetch: import("vue").Ref<({
15
15
  }> & Omit<{
16
16
  readonly required: boolean;
17
17
  readonly disabled: boolean;
18
- readonly modelValue: RawOption[];
18
+ readonly modelValue: RawOption[] | null;
19
19
  readonly hasError: boolean;
20
20
  readonly url: string;
21
- readonly labelKey: string;
22
- readonly valueKey: string;
21
+ readonly labelKey: string | ((option: RawOption) => string);
22
+ readonly valueKey: string | ((option: RawOption) => string);
23
23
  readonly focusOnMount: boolean;
24
24
  readonly queryKey: string;
25
25
  readonly placeholder?: string | undefined;
@@ -46,7 +46,7 @@ declare const tagAutocompleteFetch: import("vue").Ref<({
46
46
  $options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
47
47
  modelValue: {
48
48
  required: true;
49
- type: PropType<RawOption[]>;
49
+ type: PropType<RawOption[] | null>;
50
50
  };
51
51
  url: {
52
52
  required: true;
@@ -54,11 +54,11 @@ declare const tagAutocompleteFetch: import("vue").Ref<({
54
54
  };
55
55
  labelKey: {
56
56
  required: true;
57
- type: StringConstructor;
57
+ type: PropType<string | ((option: RawOption) => string)>;
58
58
  };
59
59
  valueKey: {
60
60
  required: true;
61
- type: StringConstructor;
61
+ type: PropType<string | ((option: RawOption) => string)>;
62
62
  };
63
63
  placeholder: {
64
64
  default: undefined;
@@ -143,7 +143,7 @@ declare const tagAutocompleteFetch: import("vue").Ref<({
143
143
  }> & Omit<Readonly<import("vue").ExtractPropTypes<{
144
144
  modelValue: {
145
145
  required: true;
146
- type: PropType<RawOption[]>;
146
+ type: PropType<RawOption[] | null>;
147
147
  };
148
148
  url: {
149
149
  required: true;
@@ -151,11 +151,11 @@ declare const tagAutocompleteFetch: import("vue").Ref<({
151
151
  };
152
152
  labelKey: {
153
153
  required: true;
154
- type: StringConstructor;
154
+ type: PropType<string | ((option: RawOption) => string)>;
155
155
  };
156
156
  valueKey: {
157
157
  required: true;
158
- type: StringConstructor;
158
+ type: PropType<string | ((option: RawOption) => string)>;
159
159
  };
160
160
  placeholder: {
161
161
  default: undefined;
@@ -209,7 +209,9 @@ declare const tagAutocompleteFetch: import("vue").Ref<({
209
209
  open: () => void;
210
210
  close: () => void;
211
211
  keywords: import("vue").ComputedRef<string>;
212
- option: RawOption;
212
+ option: RawOption | null;
213
+ value: import("@/types").OptionValue;
214
+ label: string;
213
215
  selected: boolean;
214
216
  active: boolean;
215
217
  }) => any) | undefined;
@@ -244,11 +246,11 @@ declare const tagAutocompleteFetch: import("vue").Ref<({
244
246
  }> & Omit<{
245
247
  readonly required: boolean;
246
248
  readonly disabled: boolean;
247
- readonly modelValue: RawOption[];
249
+ readonly modelValue: RawOption[] | null;
248
250
  readonly hasError: boolean;
249
251
  readonly url: string;
250
- readonly labelKey: string;
251
- readonly valueKey: string;
252
+ readonly labelKey: string | ((option: RawOption) => string);
253
+ readonly valueKey: string | ((option: RawOption) => string);
252
254
  readonly focusOnMount: boolean;
253
255
  readonly queryKey: string;
254
256
  readonly placeholder?: string | undefined;
@@ -275,7 +277,7 @@ declare const tagAutocompleteFetch: import("vue").Ref<({
275
277
  $options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
276
278
  modelValue: {
277
279
  required: true;
278
- type: PropType<RawOption[]>;
280
+ type: PropType<RawOption[] | null>;
279
281
  };
280
282
  url: {
281
283
  required: true;
@@ -283,11 +285,11 @@ declare const tagAutocompleteFetch: import("vue").Ref<({
283
285
  };
284
286
  labelKey: {
285
287
  required: true;
286
- type: StringConstructor;
288
+ type: PropType<string | ((option: RawOption) => string)>;
287
289
  };
288
290
  valueKey: {
289
291
  required: true;
290
- type: StringConstructor;
292
+ type: PropType<string | ((option: RawOption) => string)>;
291
293
  };
292
294
  placeholder: {
293
295
  default: undefined;
@@ -372,7 +374,7 @@ declare const tagAutocompleteFetch: import("vue").Ref<({
372
374
  }> & Omit<Readonly<import("vue").ExtractPropTypes<{
373
375
  modelValue: {
374
376
  required: true;
375
- type: PropType<RawOption[]>;
377
+ type: PropType<RawOption[] | null>;
376
378
  };
377
379
  url: {
378
380
  required: true;
@@ -380,11 +382,11 @@ declare const tagAutocompleteFetch: import("vue").Ref<({
380
382
  };
381
383
  labelKey: {
382
384
  required: true;
383
- type: StringConstructor;
385
+ type: PropType<string | ((option: RawOption) => string)>;
384
386
  };
385
387
  valueKey: {
386
388
  required: true;
387
- type: StringConstructor;
389
+ type: PropType<string | ((option: RawOption) => string)>;
388
390
  };
389
391
  placeholder: {
390
392
  default: undefined;
@@ -438,7 +440,9 @@ declare const tagAutocompleteFetch: import("vue").Ref<({
438
440
  open: () => void;
439
441
  close: () => void;
440
442
  keywords: import("vue").ComputedRef<string>;
441
- option: RawOption;
443
+ option: RawOption | null;
444
+ value: import("@/types").OptionValue;
445
+ label: string;
442
446
  selected: boolean;
443
447
  active: boolean;
444
448
  }) => any) | undefined;
@@ -473,7 +477,9 @@ declare var __VLS_10: {
473
477
  open: () => void;
474
478
  close: () => void;
475
479
  keywords: import("vue").ComputedRef<string>;
476
- option: RawOption;
480
+ option: RawOption | null;
481
+ value: import("@/types").OptionValue;
482
+ label: string;
477
483
  selected: boolean;
478
484
  active: boolean;
479
485
  }, __VLS_14: {
@@ -151,7 +151,9 @@ declare const drawer: import("vue").Ref<({
151
151
  $slots: {
152
152
  empty?: ((props: {}) => any) | undefined;
153
153
  option?: ((props: {
154
- option: RawOption;
154
+ option: RawOption | null;
155
+ value: import("@/types").OptionValue;
156
+ label: string;
155
157
  selected: boolean;
156
158
  active: boolean;
157
159
  }) => any) | undefined;
@@ -306,7 +308,9 @@ declare const drawer: import("vue").Ref<({
306
308
  $slots: {
307
309
  empty?: ((props: {}) => any) | undefined;
308
310
  option?: ((props: {
309
- option: RawOption;
311
+ option: RawOption | null;
312
+ value: import("@/types").OptionValue;
313
+ label: string;
310
314
  selected: boolean;
311
315
  active: boolean;
312
316
  }) => any) | undefined;
@@ -358,7 +362,9 @@ declare var __VLS_1: {
358
362
  open: typeof open;
359
363
  close: typeof close;
360
364
  keywords: ComputedRef<string>;
361
- option: RawOption;
365
+ option: RawOption | null;
366
+ value: import("@/types").OptionValue;
367
+ label: string;
362
368
  selected: boolean;
363
369
  active: boolean;
364
370
  }, __VLS_17: {
@@ -389,11 +395,11 @@ declare const __VLS_self: import("vue").DefineComponent<import("vue").ExtractPro
389
395
  };
390
396
  labelKey: {
391
397
  required: true;
392
- type: StringConstructor;
398
+ type: PropType<string | ((option: RawOption) => string)>;
393
399
  };
394
400
  valueKey: {
395
401
  required: true;
396
- type: StringConstructor;
402
+ type: PropType<string | ((option: RawOption) => string)>;
397
403
  };
398
404
  name: {
399
405
  default: undefined;
@@ -493,11 +499,11 @@ declare const __VLS_self: import("vue").DefineComponent<import("vue").ExtractPro
493
499
  };
494
500
  labelKey: {
495
501
  required: true;
496
- type: StringConstructor;
502
+ type: PropType<string | ((option: RawOption) => string)>;
497
503
  };
498
504
  valueKey: {
499
505
  required: true;
500
- type: StringConstructor;
506
+ type: PropType<string | ((option: RawOption) => string)>;
501
507
  };
502
508
  name: {
503
509
  default: undefined;
@@ -593,11 +599,11 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
593
599
  };
594
600
  labelKey: {
595
601
  required: true;
596
- type: StringConstructor;
602
+ type: PropType<string | ((option: RawOption) => string)>;
597
603
  };
598
604
  valueKey: {
599
605
  required: true;
600
- type: StringConstructor;
606
+ type: PropType<string | ((option: RawOption) => string)>;
601
607
  };
602
608
  name: {
603
609
  default: undefined;
@@ -682,11 +688,11 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
682
688
  };
683
689
  labelKey: {
684
690
  required: true;
685
- type: StringConstructor;
691
+ type: PropType<string | ((option: RawOption) => string)>;
686
692
  };
687
693
  valueKey: {
688
694
  required: true;
689
- type: StringConstructor;
695
+ type: PropType<string | ((option: RawOption) => string)>;
690
696
  };
691
697
  name: {
692
698
  default: undefined;
@@ -28,8 +28,8 @@ declare const tagAutocomplete: import("vue").Ref<({
28
28
  readonly modelValue: RawOption[] | null;
29
29
  readonly hasError: boolean;
30
30
  readonly visibleFocus: boolean;
31
- readonly labelKey: string;
32
- readonly valueKey: string;
31
+ readonly labelKey: string | ((option: RawOption) => string);
32
+ readonly valueKey: string | ((option: RawOption) => string);
33
33
  readonly loading: boolean;
34
34
  readonly loadingBottom: boolean;
35
35
  readonly dropdownShow: "always" | "focus";
@@ -72,11 +72,11 @@ declare const tagAutocomplete: import("vue").Ref<({
72
72
  };
73
73
  labelKey: {
74
74
  required: true;
75
- type: StringConstructor;
75
+ type: PropType<string | ((option: RawOption) => string)>;
76
76
  };
77
77
  valueKey: {
78
78
  required: true;
79
- type: StringConstructor;
79
+ type: PropType<string | ((option: RawOption) => string)>;
80
80
  };
81
81
  name: {
82
82
  default: undefined;
@@ -219,11 +219,11 @@ declare const tagAutocomplete: import("vue").Ref<({
219
219
  };
220
220
  labelKey: {
221
221
  required: true;
222
- type: StringConstructor;
222
+ type: PropType<string | ((option: RawOption) => string)>;
223
223
  };
224
224
  valueKey: {
225
225
  required: true;
226
- type: StringConstructor;
226
+ type: PropType<string | ((option: RawOption) => string)>;
227
227
  };
228
228
  name: {
229
229
  default: undefined;
@@ -317,7 +317,9 @@ declare const tagAutocomplete: import("vue").Ref<({
317
317
  open: () => void;
318
318
  close: () => void;
319
319
  keywords: import("vue").ComputedRef<string>;
320
- option: RawOption;
320
+ option: RawOption | null;
321
+ value: import("@/types").OptionValue;
322
+ label: string;
321
323
  selected: boolean;
322
324
  active: boolean;
323
325
  }) => any) | undefined;
@@ -356,8 +358,8 @@ declare const tagAutocomplete: import("vue").Ref<({
356
358
  readonly modelValue: RawOption[] | null;
357
359
  readonly hasError: boolean;
358
360
  readonly visibleFocus: boolean;
359
- readonly labelKey: string;
360
- readonly valueKey: string;
361
+ readonly labelKey: string | ((option: RawOption) => string);
362
+ readonly valueKey: string | ((option: RawOption) => string);
361
363
  readonly loading: boolean;
362
364
  readonly loadingBottom: boolean;
363
365
  readonly dropdownShow: "always" | "focus";
@@ -400,11 +402,11 @@ declare const tagAutocomplete: import("vue").Ref<({
400
402
  };
401
403
  labelKey: {
402
404
  required: true;
403
- type: StringConstructor;
405
+ type: PropType<string | ((option: RawOption) => string)>;
404
406
  };
405
407
  valueKey: {
406
408
  required: true;
407
- type: StringConstructor;
409
+ type: PropType<string | ((option: RawOption) => string)>;
408
410
  };
409
411
  name: {
410
412
  default: undefined;
@@ -547,11 +549,11 @@ declare const tagAutocomplete: import("vue").Ref<({
547
549
  };
548
550
  labelKey: {
549
551
  required: true;
550
- type: StringConstructor;
552
+ type: PropType<string | ((option: RawOption) => string)>;
551
553
  };
552
554
  valueKey: {
553
555
  required: true;
554
- type: StringConstructor;
556
+ type: PropType<string | ((option: RawOption) => string)>;
555
557
  };
556
558
  name: {
557
559
  default: undefined;
@@ -645,7 +647,9 @@ declare const tagAutocomplete: import("vue").Ref<({
645
647
  open: () => void;
646
648
  close: () => void;
647
649
  keywords: import("vue").ComputedRef<string>;
648
- option: RawOption;
650
+ option: RawOption | null;
651
+ value: import("@/types").OptionValue;
652
+ label: string;
649
653
  selected: boolean;
650
654
  active: boolean;
651
655
  }) => any) | undefined;
@@ -678,7 +682,9 @@ declare var __VLS_13: {
678
682
  open: () => void;
679
683
  close: () => void;
680
684
  keywords: import("vue").ComputedRef<string>;
681
- option: RawOption;
685
+ option: RawOption | null;
686
+ value: import("@/types").OptionValue;
687
+ label: string;
682
688
  selected: boolean;
683
689
  active: boolean;
684
690
  }, __VLS_17: {
@@ -708,7 +714,7 @@ type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$
708
714
  declare const __VLS_self: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
709
715
  modelValue: {
710
716
  required: true;
711
- type: PropType<RawOption[]>;
717
+ type: PropType<RawOption[] | null>;
712
718
  };
713
719
  url: {
714
720
  required: true;
@@ -716,11 +722,11 @@ declare const __VLS_self: import("vue").DefineComponent<import("vue").ExtractPro
716
722
  };
717
723
  labelKey: {
718
724
  required: true;
719
- type: StringConstructor;
725
+ type: PropType<string | ((option: RawOption) => string)>;
720
726
  };
721
727
  valueKey: {
722
728
  required: true;
723
- type: StringConstructor;
729
+ type: PropType<string | ((option: RawOption) => string)>;
724
730
  };
725
731
  placeholder: {
726
732
  default: undefined;
@@ -770,7 +776,7 @@ declare const __VLS_self: import("vue").DefineComponent<import("vue").ExtractPro
770
776
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
771
777
  modelValue: {
772
778
  required: true;
773
- type: PropType<RawOption[]>;
779
+ type: PropType<RawOption[] | null>;
774
780
  };
775
781
  url: {
776
782
  required: true;
@@ -778,11 +784,11 @@ declare const __VLS_self: import("vue").DefineComponent<import("vue").ExtractPro
778
784
  };
779
785
  labelKey: {
780
786
  required: true;
781
- type: StringConstructor;
787
+ type: PropType<string | ((option: RawOption) => string)>;
782
788
  };
783
789
  valueKey: {
784
790
  required: true;
785
- type: StringConstructor;
791
+ type: PropType<string | ((option: RawOption) => string)>;
786
792
  };
787
793
  placeholder: {
788
794
  default: undefined;
@@ -829,7 +835,7 @@ declare const __VLS_self: import("vue").DefineComponent<import("vue").ExtractPro
829
835
  declare const __VLS_component: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
830
836
  modelValue: {
831
837
  required: true;
832
- type: PropType<RawOption[]>;
838
+ type: PropType<RawOption[] | null>;
833
839
  };
834
840
  url: {
835
841
  required: true;
@@ -837,11 +843,11 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
837
843
  };
838
844
  labelKey: {
839
845
  required: true;
840
- type: StringConstructor;
846
+ type: PropType<string | ((option: RawOption) => string)>;
841
847
  };
842
848
  valueKey: {
843
849
  required: true;
844
- type: StringConstructor;
850
+ type: PropType<string | ((option: RawOption) => string)>;
845
851
  };
846
852
  placeholder: {
847
853
  default: undefined;
@@ -885,7 +891,7 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
885
891
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
886
892
  modelValue: {
887
893
  required: true;
888
- type: PropType<RawOption[]>;
894
+ type: PropType<RawOption[] | null>;
889
895
  };
890
896
  url: {
891
897
  required: true;
@@ -893,11 +899,11 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
893
899
  };
894
900
  labelKey: {
895
901
  required: true;
896
- type: StringConstructor;
902
+ type: PropType<string | ((option: RawOption) => string)>;
897
903
  };
898
904
  valueKey: {
899
905
  required: true;
900
- type: StringConstructor;
906
+ type: PropType<string | ((option: RawOption) => string)>;
901
907
  };
902
908
  placeholder: {
903
909
  default: undefined;
@@ -1,6 +1,6 @@
1
1
  import { Ref } from 'vue';
2
2
  import { NormalizedOption, RawOption } from '@/types';
3
- export declare function useHasOptions(modelValue: Ref<RawOption[] | RawOption | null | undefined>, options: Ref<RawOption[]>, labelKey: Ref<string>, valueKey: Ref<string>, multiple?: Ref<boolean>): {
3
+ export declare function useHasOptions(modelValue: Ref<RawOption[] | RawOption | null | undefined>, options: Ref<RawOption[]>, labelKey: Ref<string | ((option: RawOption) => string)>, valueKey: Ref<string | ((option: RawOption) => string | number)>, multiple?: Ref<boolean>): {
4
4
  normalizedOptions: import("vue").ComputedRef<NormalizedOption[]>;
5
5
  normalizedModelValue: import("vue").ComputedRef<NormalizedOption | NormalizedOption[] | null>;
6
6
  isSelected: (option: NormalizedOption) => boolean;
@@ -32,7 +32,7 @@ export interface DataTableQuery extends Record<string, any> {
32
32
  export type OptionValue = string | number | null;
33
33
  export type RawOption = Record<string, any>;
34
34
  export type NormalizedOption = {
35
- option: RawOption;
35
+ option: RawOption | null;
36
36
  value: OptionValue;
37
37
  label: string;
38
38
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sprintify-ui",
3
- "version": "0.10.22",
3
+ "version": "0.10.24",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "build": "rimraf dist && vue-tsc && vite build",
@@ -39,6 +39,13 @@ const Template = (args) => ({
39
39
  export const Demo = Template.bind({});
40
40
  Demo.args = {};
41
41
 
42
+ export const LabelFunction = Template.bind({});
43
+ LabelFunction.args = {
44
+ labelKey: (option) => {
45
+ return option.label + " (" + option.size + ")";
46
+ }
47
+ };
48
+
42
49
  export const AlwaysShowDropdown = Template.bind({});
43
50
  AlwaysShowDropdown.args = {
44
51
  inline: true,