sprintify-ui 0.10.36 → 0.10.37
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/dist/sprintify-ui.es.js +7 -2
- package/dist/types/components/BaseAutocomplete.vue.d.ts +6 -6
- package/dist/types/components/BaseAutocompleteFetch.vue.d.ts +12 -12
- package/dist/types/components/BaseBelongsTo.vue.d.ts +34 -16
- package/package.json +1 -1
- package/src/components/BaseAutocomplete.vue +2 -2
- package/src/components/BaseBelongsTo.vue +6 -1
package/dist/sprintify-ui.es.js
CHANGED
|
@@ -10701,7 +10701,7 @@ const Dc = /* @__PURE__ */ Uo(Gv, [["render", Zv]]), Qv = { class: "relative w-f
|
|
|
10701
10701
|
return o.showEmptyOption && (M = [
|
|
10702
10702
|
{ value: null, label: o.emptyOptionLabel, option: null },
|
|
10703
10703
|
...M
|
|
10704
|
-
]), C.value === !1 ? M : M.filter((R) => o.filter !== void 0 ? o.filter(R) : R.label ? R.label.toLowerCase().includes(g.value.toLowerCase()) : !1);
|
|
10704
|
+
]), C.value === !1 ? M : M.filter((R) => o.filter !== void 0 ? o.filter(R, g.value + "") : R.label ? R.label.toLowerCase().includes(g.value.toLowerCase()) : !1);
|
|
10705
10705
|
});
|
|
10706
10706
|
Ye(
|
|
10707
10707
|
() => O.value,
|
|
@@ -11448,6 +11448,10 @@ const c0 = {
|
|
|
11448
11448
|
default: void 0,
|
|
11449
11449
|
type: String
|
|
11450
11450
|
},
|
|
11451
|
+
filter: {
|
|
11452
|
+
default: void 0,
|
|
11453
|
+
type: Function
|
|
11454
|
+
},
|
|
11451
11455
|
dropdownShow: {
|
|
11452
11456
|
default: "focus",
|
|
11453
11457
|
type: String
|
|
@@ -11522,6 +11526,7 @@ const c0 = {
|
|
|
11522
11526
|
"has-error": t.hasError,
|
|
11523
11527
|
inline: t.inline,
|
|
11524
11528
|
size: t.size,
|
|
11529
|
+
filter: t.filter,
|
|
11525
11530
|
"dropdown-show": t.dropdownShow,
|
|
11526
11531
|
"show-model-value": t.showModelValue,
|
|
11527
11532
|
"show-empty-option": t.showEmptyOption,
|
|
@@ -11542,7 +11547,7 @@ const c0 = {
|
|
|
11542
11547
|
ue(u.$slots, "footer", ft(pt(p)))
|
|
11543
11548
|
]),
|
|
11544
11549
|
_: 3
|
|
11545
|
-
}, 8, ["model-value", "options", "disabled", "name", "placeholder", "required", "value-key", "label-key", "has-error", "inline", "size", "dropdown-show", "show-model-value", "show-empty-option", "show-remove-button", "empty-option-label", "visible-focus", "focus-on-mount", "select"]));
|
|
11550
|
+
}, 8, ["model-value", "options", "disabled", "name", "placeholder", "required", "value-key", "label-key", "has-error", "inline", "size", "filter", "dropdown-show", "show-model-value", "show-empty-option", "show-remove-button", "empty-option-label", "visible-focus", "focus-on-mount", "select"]));
|
|
11546
11551
|
}
|
|
11547
11552
|
}), x0 = /* @__PURE__ */ Q({
|
|
11548
11553
|
__name: "BaseBelongsToFetch",
|
|
@@ -449,7 +449,7 @@ declare const __VLS_self: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
449
449
|
};
|
|
450
450
|
filter: {
|
|
451
451
|
default: undefined;
|
|
452
|
-
type: PropType<(option: NormalizedOption) => boolean>;
|
|
452
|
+
type: PropType<(option: NormalizedOption, keywords: string) => boolean>;
|
|
453
453
|
};
|
|
454
454
|
hasError: {
|
|
455
455
|
default: boolean;
|
|
@@ -589,7 +589,7 @@ declare const __VLS_self: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
589
589
|
};
|
|
590
590
|
filter: {
|
|
591
591
|
default: undefined;
|
|
592
|
-
type: PropType<(option: NormalizedOption) => boolean>;
|
|
592
|
+
type: PropType<(option: NormalizedOption, keywords: string) => boolean>;
|
|
593
593
|
};
|
|
594
594
|
hasError: {
|
|
595
595
|
default: boolean;
|
|
@@ -650,7 +650,7 @@ declare const __VLS_self: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
650
650
|
onScrollBottom?: ((...args: any[]) => any) | undefined;
|
|
651
651
|
onTyping?: ((...args: any[]) => any) | undefined;
|
|
652
652
|
}>, {
|
|
653
|
-
filter: (option: NormalizedOption) => boolean;
|
|
653
|
+
filter: (option: NormalizedOption, keywords: string) => boolean;
|
|
654
654
|
select: SelectConfiguration | undefined;
|
|
655
655
|
size: "xs" | "sm" | "md" | "lg" | "xl";
|
|
656
656
|
required: boolean;
|
|
@@ -719,7 +719,7 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
719
719
|
};
|
|
720
720
|
filter: {
|
|
721
721
|
default: undefined;
|
|
722
|
-
type: PropType<(option: NormalizedOption) => boolean>;
|
|
722
|
+
type: PropType<(option: NormalizedOption, keywords: string) => boolean>;
|
|
723
723
|
};
|
|
724
724
|
hasError: {
|
|
725
725
|
default: boolean;
|
|
@@ -832,7 +832,7 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
832
832
|
};
|
|
833
833
|
filter: {
|
|
834
834
|
default: undefined;
|
|
835
|
-
type: PropType<(option: NormalizedOption) => boolean>;
|
|
835
|
+
type: PropType<(option: NormalizedOption, keywords: string) => boolean>;
|
|
836
836
|
};
|
|
837
837
|
hasError: {
|
|
838
838
|
default: boolean;
|
|
@@ -893,7 +893,7 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
893
893
|
onScrollBottom?: ((...args: any[]) => any) | undefined;
|
|
894
894
|
onTyping?: ((...args: any[]) => any) | undefined;
|
|
895
895
|
}>, {
|
|
896
|
-
filter: (option: NormalizedOption) => boolean;
|
|
896
|
+
filter: (option: NormalizedOption, keywords: string) => boolean;
|
|
897
897
|
select: SelectConfiguration | undefined;
|
|
898
898
|
size: "xs" | "sm" | "md" | "lg" | "xl";
|
|
899
899
|
required: boolean;
|
|
@@ -12,7 +12,7 @@ declare const autocomplete: import("vue").Ref<({
|
|
|
12
12
|
$: import("vue").ComponentInternalInstance;
|
|
13
13
|
$data: {};
|
|
14
14
|
$props: Partial<{
|
|
15
|
-
filter: (option: import("@/types").NormalizedOption) => boolean;
|
|
15
|
+
filter: (option: import("@/types").NormalizedOption, keywords: string) => boolean;
|
|
16
16
|
select: SelectConfiguration | undefined;
|
|
17
17
|
size: "xs" | "sm" | "md" | "lg" | "xl";
|
|
18
18
|
required: boolean;
|
|
@@ -49,7 +49,7 @@ declare const autocomplete: import("vue").Ref<({
|
|
|
49
49
|
readonly showEmptyOption: boolean;
|
|
50
50
|
readonly showRemoveButton: boolean;
|
|
51
51
|
readonly emptyOptionLabel: string;
|
|
52
|
-
readonly filter?: ((option: import("@/types").NormalizedOption) => boolean) | undefined;
|
|
52
|
+
readonly filter?: ((option: import("@/types").NormalizedOption, keywords: string) => boolean) | undefined;
|
|
53
53
|
readonly select?: SelectConfiguration | undefined;
|
|
54
54
|
readonly size?: "xs" | "sm" | "md" | "lg" | "xl" | undefined;
|
|
55
55
|
readonly required?: boolean | undefined;
|
|
@@ -127,7 +127,7 @@ declare const autocomplete: import("vue").Ref<({
|
|
|
127
127
|
};
|
|
128
128
|
filter: {
|
|
129
129
|
default: undefined;
|
|
130
|
-
type: PropType<(option: import("@/types").NormalizedOption) => boolean>;
|
|
130
|
+
type: PropType<(option: import("@/types").NormalizedOption, keywords: string) => boolean>;
|
|
131
131
|
};
|
|
132
132
|
hasError: {
|
|
133
133
|
default: boolean;
|
|
@@ -200,7 +200,7 @@ declare const autocomplete: import("vue").Ref<({
|
|
|
200
200
|
scrollBottom: (...args: any[]) => void;
|
|
201
201
|
typing: (...args: any[]) => void;
|
|
202
202
|
}, string, {
|
|
203
|
-
filter: (option: import("@/types").NormalizedOption) => boolean;
|
|
203
|
+
filter: (option: import("@/types").NormalizedOption, keywords: string) => boolean;
|
|
204
204
|
select: SelectConfiguration | undefined;
|
|
205
205
|
size: "xs" | "sm" | "md" | "lg" | "xl";
|
|
206
206
|
required: boolean;
|
|
@@ -242,7 +242,7 @@ declare const autocomplete: import("vue").Ref<({
|
|
|
242
242
|
$nextTick: typeof import("vue").nextTick;
|
|
243
243
|
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import("@vue/reactivity").OnCleanup]) => any : (...args: [any, any, import("@vue/reactivity").OnCleanup]) => any, options?: import("vue").WatchOptions): import("vue").WatchStopHandle;
|
|
244
244
|
} & Readonly<{
|
|
245
|
-
filter: (option: import("@/types").NormalizedOption) => boolean;
|
|
245
|
+
filter: (option: import("@/types").NormalizedOption, keywords: string) => boolean;
|
|
246
246
|
select: SelectConfiguration | undefined;
|
|
247
247
|
size: "xs" | "sm" | "md" | "lg" | "xl";
|
|
248
248
|
required: boolean;
|
|
@@ -310,7 +310,7 @@ declare const autocomplete: import("vue").Ref<({
|
|
|
310
310
|
};
|
|
311
311
|
filter: {
|
|
312
312
|
default: undefined;
|
|
313
|
-
type: PropType<(option: import("@/types").NormalizedOption) => boolean>;
|
|
313
|
+
type: PropType<(option: import("@/types").NormalizedOption, keywords: string) => boolean>;
|
|
314
314
|
};
|
|
315
315
|
hasError: {
|
|
316
316
|
default: boolean;
|
|
@@ -408,7 +408,7 @@ declare const autocomplete: import("vue").Ref<({
|
|
|
408
408
|
$: import("vue").ComponentInternalInstance;
|
|
409
409
|
$data: {};
|
|
410
410
|
$props: Partial<{
|
|
411
|
-
filter: (option: import("@/types").NormalizedOption) => boolean;
|
|
411
|
+
filter: (option: import("@/types").NormalizedOption, keywords: string) => boolean;
|
|
412
412
|
select: SelectConfiguration | undefined;
|
|
413
413
|
size: "xs" | "sm" | "md" | "lg" | "xl";
|
|
414
414
|
required: boolean;
|
|
@@ -445,7 +445,7 @@ declare const autocomplete: import("vue").Ref<({
|
|
|
445
445
|
readonly showEmptyOption: boolean;
|
|
446
446
|
readonly showRemoveButton: boolean;
|
|
447
447
|
readonly emptyOptionLabel: string;
|
|
448
|
-
readonly filter?: ((option: import("@/types").NormalizedOption) => boolean) | undefined;
|
|
448
|
+
readonly filter?: ((option: import("@/types").NormalizedOption, keywords: string) => boolean) | undefined;
|
|
449
449
|
readonly select?: SelectConfiguration | undefined;
|
|
450
450
|
readonly size?: "xs" | "sm" | "md" | "lg" | "xl" | undefined;
|
|
451
451
|
readonly required?: boolean | undefined;
|
|
@@ -523,7 +523,7 @@ declare const autocomplete: import("vue").Ref<({
|
|
|
523
523
|
};
|
|
524
524
|
filter: {
|
|
525
525
|
default: undefined;
|
|
526
|
-
type: PropType<(option: import("@/types").NormalizedOption) => boolean>;
|
|
526
|
+
type: PropType<(option: import("@/types").NormalizedOption, keywords: string) => boolean>;
|
|
527
527
|
};
|
|
528
528
|
hasError: {
|
|
529
529
|
default: boolean;
|
|
@@ -596,7 +596,7 @@ declare const autocomplete: import("vue").Ref<({
|
|
|
596
596
|
scrollBottom: (...args: any[]) => void;
|
|
597
597
|
typing: (...args: any[]) => void;
|
|
598
598
|
}, string, {
|
|
599
|
-
filter: (option: import("@/types").NormalizedOption) => boolean;
|
|
599
|
+
filter: (option: import("@/types").NormalizedOption, keywords: string) => boolean;
|
|
600
600
|
select: SelectConfiguration | undefined;
|
|
601
601
|
size: "xs" | "sm" | "md" | "lg" | "xl";
|
|
602
602
|
required: boolean;
|
|
@@ -638,7 +638,7 @@ declare const autocomplete: import("vue").Ref<({
|
|
|
638
638
|
$nextTick: typeof import("vue").nextTick;
|
|
639
639
|
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import("@vue/reactivity").OnCleanup]) => any : (...args: [any, any, import("@vue/reactivity").OnCleanup]) => any, options?: import("vue").WatchOptions): import("vue").WatchStopHandle;
|
|
640
640
|
} & Readonly<{
|
|
641
|
-
filter: (option: import("@/types").NormalizedOption) => boolean;
|
|
641
|
+
filter: (option: import("@/types").NormalizedOption, keywords: string) => boolean;
|
|
642
642
|
select: SelectConfiguration | undefined;
|
|
643
643
|
size: "xs" | "sm" | "md" | "lg" | "xl";
|
|
644
644
|
required: boolean;
|
|
@@ -706,7 +706,7 @@ declare const autocomplete: import("vue").Ref<({
|
|
|
706
706
|
};
|
|
707
707
|
filter: {
|
|
708
708
|
default: undefined;
|
|
709
|
-
type: PropType<(option: import("@/types").NormalizedOption) => boolean>;
|
|
709
|
+
type: PropType<(option: import("@/types").NormalizedOption, keywords: string) => boolean>;
|
|
710
710
|
};
|
|
711
711
|
hasError: {
|
|
712
712
|
default: boolean;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
2
|
import BaseAutocomplete from './BaseAutocomplete.vue';
|
|
3
|
-
import { RawOption, SelectConfiguration } from '@/types';
|
|
3
|
+
import { NormalizedOption, RawOption, SelectConfiguration } from '@/types';
|
|
4
4
|
import { Size } from '@/utils/sizes';
|
|
5
5
|
declare const autocomplete: import("vue").Ref<({
|
|
6
6
|
$: import("vue").ComponentInternalInstance;
|
|
7
7
|
$data: {};
|
|
8
8
|
$props: Partial<{
|
|
9
|
-
filter: (option:
|
|
9
|
+
filter: (option: NormalizedOption, keywords: string) => boolean;
|
|
10
10
|
select: SelectConfiguration | undefined;
|
|
11
11
|
size: "xs" | "sm" | "md" | "lg" | "xl";
|
|
12
12
|
required: boolean;
|
|
@@ -43,7 +43,7 @@ declare const autocomplete: import("vue").Ref<({
|
|
|
43
43
|
readonly showEmptyOption: boolean;
|
|
44
44
|
readonly showRemoveButton: boolean;
|
|
45
45
|
readonly emptyOptionLabel: string;
|
|
46
|
-
readonly filter?: ((option:
|
|
46
|
+
readonly filter?: ((option: NormalizedOption, keywords: string) => boolean) | undefined;
|
|
47
47
|
readonly select?: SelectConfiguration | undefined;
|
|
48
48
|
readonly size?: "xs" | "sm" | "md" | "lg" | "xl" | undefined;
|
|
49
49
|
readonly required?: boolean | undefined;
|
|
@@ -121,7 +121,7 @@ declare const autocomplete: import("vue").Ref<({
|
|
|
121
121
|
};
|
|
122
122
|
filter: {
|
|
123
123
|
default: undefined;
|
|
124
|
-
type: PropType<(option:
|
|
124
|
+
type: PropType<(option: NormalizedOption, keywords: string) => boolean>;
|
|
125
125
|
};
|
|
126
126
|
hasError: {
|
|
127
127
|
default: boolean;
|
|
@@ -194,7 +194,7 @@ declare const autocomplete: import("vue").Ref<({
|
|
|
194
194
|
scrollBottom: (...args: any[]) => void;
|
|
195
195
|
typing: (...args: any[]) => void;
|
|
196
196
|
}, string, {
|
|
197
|
-
filter: (option:
|
|
197
|
+
filter: (option: NormalizedOption, keywords: string) => boolean;
|
|
198
198
|
select: SelectConfiguration | undefined;
|
|
199
199
|
size: "xs" | "sm" | "md" | "lg" | "xl";
|
|
200
200
|
required: boolean;
|
|
@@ -236,7 +236,7 @@ declare const autocomplete: import("vue").Ref<({
|
|
|
236
236
|
$nextTick: typeof import("vue").nextTick;
|
|
237
237
|
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import("@vue/reactivity").OnCleanup]) => any : (...args: [any, any, import("@vue/reactivity").OnCleanup]) => any, options?: import("vue").WatchOptions): import("vue").WatchStopHandle;
|
|
238
238
|
} & Readonly<{
|
|
239
|
-
filter: (option:
|
|
239
|
+
filter: (option: NormalizedOption, keywords: string) => boolean;
|
|
240
240
|
select: SelectConfiguration | undefined;
|
|
241
241
|
size: "xs" | "sm" | "md" | "lg" | "xl";
|
|
242
242
|
required: boolean;
|
|
@@ -304,7 +304,7 @@ declare const autocomplete: import("vue").Ref<({
|
|
|
304
304
|
};
|
|
305
305
|
filter: {
|
|
306
306
|
default: undefined;
|
|
307
|
-
type: PropType<(option:
|
|
307
|
+
type: PropType<(option: NormalizedOption, keywords: string) => boolean>;
|
|
308
308
|
};
|
|
309
309
|
hasError: {
|
|
310
310
|
default: boolean;
|
|
@@ -395,14 +395,14 @@ declare const autocomplete: import("vue").Ref<({
|
|
|
395
395
|
open: () => void;
|
|
396
396
|
close: () => void;
|
|
397
397
|
keywords: import("vue").ComputedRef<string>;
|
|
398
|
-
options:
|
|
398
|
+
options: NormalizedOption[];
|
|
399
399
|
}) => any) | undefined;
|
|
400
400
|
};
|
|
401
401
|
}) | null, ({
|
|
402
402
|
$: import("vue").ComponentInternalInstance;
|
|
403
403
|
$data: {};
|
|
404
404
|
$props: Partial<{
|
|
405
|
-
filter: (option:
|
|
405
|
+
filter: (option: NormalizedOption, keywords: string) => boolean;
|
|
406
406
|
select: SelectConfiguration | undefined;
|
|
407
407
|
size: "xs" | "sm" | "md" | "lg" | "xl";
|
|
408
408
|
required: boolean;
|
|
@@ -439,7 +439,7 @@ declare const autocomplete: import("vue").Ref<({
|
|
|
439
439
|
readonly showEmptyOption: boolean;
|
|
440
440
|
readonly showRemoveButton: boolean;
|
|
441
441
|
readonly emptyOptionLabel: string;
|
|
442
|
-
readonly filter?: ((option:
|
|
442
|
+
readonly filter?: ((option: NormalizedOption, keywords: string) => boolean) | undefined;
|
|
443
443
|
readonly select?: SelectConfiguration | undefined;
|
|
444
444
|
readonly size?: "xs" | "sm" | "md" | "lg" | "xl" | undefined;
|
|
445
445
|
readonly required?: boolean | undefined;
|
|
@@ -517,7 +517,7 @@ declare const autocomplete: import("vue").Ref<({
|
|
|
517
517
|
};
|
|
518
518
|
filter: {
|
|
519
519
|
default: undefined;
|
|
520
|
-
type: PropType<(option:
|
|
520
|
+
type: PropType<(option: NormalizedOption, keywords: string) => boolean>;
|
|
521
521
|
};
|
|
522
522
|
hasError: {
|
|
523
523
|
default: boolean;
|
|
@@ -590,7 +590,7 @@ declare const autocomplete: import("vue").Ref<({
|
|
|
590
590
|
scrollBottom: (...args: any[]) => void;
|
|
591
591
|
typing: (...args: any[]) => void;
|
|
592
592
|
}, string, {
|
|
593
|
-
filter: (option:
|
|
593
|
+
filter: (option: NormalizedOption, keywords: string) => boolean;
|
|
594
594
|
select: SelectConfiguration | undefined;
|
|
595
595
|
size: "xs" | "sm" | "md" | "lg" | "xl";
|
|
596
596
|
required: boolean;
|
|
@@ -632,7 +632,7 @@ declare const autocomplete: import("vue").Ref<({
|
|
|
632
632
|
$nextTick: typeof import("vue").nextTick;
|
|
633
633
|
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import("@vue/reactivity").OnCleanup]) => any : (...args: [any, any, import("@vue/reactivity").OnCleanup]) => any, options?: import("vue").WatchOptions): import("vue").WatchStopHandle;
|
|
634
634
|
} & Readonly<{
|
|
635
|
-
filter: (option:
|
|
635
|
+
filter: (option: NormalizedOption, keywords: string) => boolean;
|
|
636
636
|
select: SelectConfiguration | undefined;
|
|
637
637
|
size: "xs" | "sm" | "md" | "lg" | "xl";
|
|
638
638
|
required: boolean;
|
|
@@ -700,7 +700,7 @@ declare const autocomplete: import("vue").Ref<({
|
|
|
700
700
|
};
|
|
701
701
|
filter: {
|
|
702
702
|
default: undefined;
|
|
703
|
-
type: PropType<(option:
|
|
703
|
+
type: PropType<(option: NormalizedOption, keywords: string) => boolean>;
|
|
704
704
|
};
|
|
705
705
|
hasError: {
|
|
706
706
|
default: boolean;
|
|
@@ -791,7 +791,7 @@ declare const autocomplete: import("vue").Ref<({
|
|
|
791
791
|
open: () => void;
|
|
792
792
|
close: () => void;
|
|
793
793
|
keywords: import("vue").ComputedRef<string>;
|
|
794
|
-
options:
|
|
794
|
+
options: NormalizedOption[];
|
|
795
795
|
}) => any) | undefined;
|
|
796
796
|
};
|
|
797
797
|
}) | null>;
|
|
@@ -821,7 +821,7 @@ declare var __VLS_10: {
|
|
|
821
821
|
open: () => void;
|
|
822
822
|
close: () => void;
|
|
823
823
|
keywords: import("vue").ComputedRef<string>;
|
|
824
|
-
options:
|
|
824
|
+
options: NormalizedOption[];
|
|
825
825
|
};
|
|
826
826
|
type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$slots> & {
|
|
827
827
|
option?: (props: typeof __VLS_10) => any;
|
|
@@ -875,6 +875,10 @@ declare const __VLS_self: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
875
875
|
default: undefined;
|
|
876
876
|
type: PropType<Size>;
|
|
877
877
|
};
|
|
878
|
+
filter: {
|
|
879
|
+
default: undefined;
|
|
880
|
+
type: PropType<(option: NormalizedOption, keywords: string) => boolean>;
|
|
881
|
+
};
|
|
878
882
|
dropdownShow: {
|
|
879
883
|
default: string;
|
|
880
884
|
type: PropType<"focus" | "always">;
|
|
@@ -959,6 +963,10 @@ declare const __VLS_self: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
959
963
|
default: undefined;
|
|
960
964
|
type: PropType<Size>;
|
|
961
965
|
};
|
|
966
|
+
filter: {
|
|
967
|
+
default: undefined;
|
|
968
|
+
type: PropType<(option: NormalizedOption, keywords: string) => boolean>;
|
|
969
|
+
};
|
|
962
970
|
dropdownShow: {
|
|
963
971
|
default: string;
|
|
964
972
|
type: PropType<"focus" | "always">;
|
|
@@ -994,6 +1002,7 @@ declare const __VLS_self: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
994
1002
|
}>> & Readonly<{
|
|
995
1003
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
996
1004
|
}>, {
|
|
1005
|
+
filter: (option: NormalizedOption, keywords: string) => boolean;
|
|
997
1006
|
select: SelectConfiguration | undefined;
|
|
998
1007
|
size: "xs" | "sm" | "md" | "lg" | "xl";
|
|
999
1008
|
required: boolean;
|
|
@@ -1057,6 +1066,10 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
1057
1066
|
default: undefined;
|
|
1058
1067
|
type: PropType<Size>;
|
|
1059
1068
|
};
|
|
1069
|
+
filter: {
|
|
1070
|
+
default: undefined;
|
|
1071
|
+
type: PropType<(option: NormalizedOption, keywords: string) => boolean>;
|
|
1072
|
+
};
|
|
1060
1073
|
dropdownShow: {
|
|
1061
1074
|
default: string;
|
|
1062
1075
|
type: PropType<"focus" | "always">;
|
|
@@ -1142,6 +1155,10 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
1142
1155
|
default: undefined;
|
|
1143
1156
|
type: PropType<Size>;
|
|
1144
1157
|
};
|
|
1158
|
+
filter: {
|
|
1159
|
+
default: undefined;
|
|
1160
|
+
type: PropType<(option: NormalizedOption, keywords: string) => boolean>;
|
|
1161
|
+
};
|
|
1145
1162
|
dropdownShow: {
|
|
1146
1163
|
default: string;
|
|
1147
1164
|
type: PropType<"focus" | "always">;
|
|
@@ -1177,6 +1194,7 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
1177
1194
|
}>> & Readonly<{
|
|
1178
1195
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
1179
1196
|
}>, {
|
|
1197
|
+
filter: (option: NormalizedOption, keywords: string) => boolean;
|
|
1180
1198
|
select: SelectConfiguration | undefined;
|
|
1181
1199
|
size: "xs" | "sm" | "md" | "lg" | "xl";
|
|
1182
1200
|
required: boolean;
|
package/package.json
CHANGED
|
@@ -179,7 +179,7 @@ const props = defineProps({
|
|
|
179
179
|
},
|
|
180
180
|
filter: {
|
|
181
181
|
default: undefined,
|
|
182
|
-
type: Function as PropType<(option: NormalizedOption) => boolean>,
|
|
182
|
+
type: Function as PropType<(option: NormalizedOption, keywords: string) => boolean>,
|
|
183
183
|
},
|
|
184
184
|
hasError: {
|
|
185
185
|
default: false,
|
|
@@ -308,7 +308,7 @@ const filteredNormalizedOptions = computed((): NormalizedOption[] => {
|
|
|
308
308
|
|
|
309
309
|
return options.filter((option) => {
|
|
310
310
|
if (props.filter !== undefined) {
|
|
311
|
-
return props.filter(option);
|
|
311
|
+
return props.filter(option, keywords.value + '');
|
|
312
312
|
}
|
|
313
313
|
if (!option.label) {
|
|
314
314
|
return false;
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
:has-error="hasError"
|
|
13
13
|
:inline="inline"
|
|
14
14
|
:size="size"
|
|
15
|
+
:filter="filter"
|
|
15
16
|
:dropdown-show="dropdownShow"
|
|
16
17
|
:show-model-value="showModelValue"
|
|
17
18
|
:show-empty-option="showEmptyOption"
|
|
@@ -46,7 +47,7 @@
|
|
|
46
47
|
<script lang="ts" setup>
|
|
47
48
|
import { PropType } from 'vue';
|
|
48
49
|
import BaseAutocomplete from './BaseAutocomplete.vue';
|
|
49
|
-
import { RawOption, SelectConfiguration } from '@/types';
|
|
50
|
+
import { NormalizedOption, RawOption, SelectConfiguration } from '@/types';
|
|
50
51
|
import { Size } from '@/utils/sizes';
|
|
51
52
|
|
|
52
53
|
const props = defineProps({
|
|
@@ -96,6 +97,10 @@ const props = defineProps({
|
|
|
96
97
|
default: undefined,
|
|
97
98
|
type: String as PropType<Size>,
|
|
98
99
|
},
|
|
100
|
+
filter: {
|
|
101
|
+
default: undefined,
|
|
102
|
+
type: Function as PropType<(option: NormalizedOption, keywords: string) => boolean>,
|
|
103
|
+
},
|
|
99
104
|
dropdownShow: {
|
|
100
105
|
default: 'focus',
|
|
101
106
|
type: String as PropType<'focus' | 'always'>,
|