@shwfed/config 2.3.28 → 2.3.29
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/mcp.mjs +3124 -1268
- package/dist/module.json +1 -1
- package/dist/preview/assets/{config-fvkC2rB8.js → config-6IiXCmyu.js} +1 -1
- package/dist/preview/assets/{config--PcXQV_r.js → config-BJzUh1_G.js} +1 -1
- package/dist/preview/assets/{config-B5avpKJE.js → config-Bl80ye-i.js} +1 -1
- package/dist/preview/assets/{config-DDfTl9Cs.js → config-CZOeZ8ty.js} +1 -1
- package/dist/preview/assets/{config-CJHPt8Gx.js → config-DaZD4ZSa.js} +1 -1
- package/dist/preview/assets/{config-CNo3isHa.js → config-DhsbcNzx.js} +1 -1
- package/dist/preview/assets/{config-5KVDXgUF.js → config-Diuyh0Ex.js} +1 -1
- package/dist/preview/assets/{config-D0_1yZdF.js → config-aK67Rsw5.js} +1 -1
- package/dist/preview/assets/{config-CQHS6cZe.js → config-rpX_Mc6I.js} +1 -1
- package/dist/preview/assets/{definition.vue_vue_type_script_setup_true_lang-RM-qDh0R.js → definition.vue_vue_type_script_setup_true_lang-C_jU8d47.js} +1 -1
- package/dist/preview/assets/{index-a2QwAots.css → index-2eQR4s3q.css} +1 -1
- package/dist/preview/assets/index-DEF3_MKr.js +659 -0
- package/dist/preview/assets/index-Df-thth9.js +1 -0
- package/dist/preview/assets/{runtime-Dr_10emf.js → runtime-3p1K6te5.js} +1 -1
- package/dist/preview/assets/{runtime-C_XX6a0C.js → runtime-BcLnafic.js} +1 -1
- package/dist/preview/assets/{runtime-CtqwtTE_.js → runtime-CSaV-359.js} +1 -1
- package/dist/preview/assets/{runtime-CCbyrqQT.js → runtime-CjR8Vi5N.js} +1 -1
- package/dist/preview/assets/{runtime-BGTWf-O7.js → runtime-D_fJCKX_.js} +1 -1
- package/dist/preview/assets/{runtime-BPjZQmcY.js → runtime-DpeCgGEG.js} +1 -1
- package/dist/preview/assets/{runtime-DcrzodsN.js → runtime-K2a1x0TJ.js} +1 -1
- package/dist/preview/assets/{runtime-Dy4ZmQ-n.js → runtime-g9Zu3VNQ.js} +1 -1
- package/dist/preview/assets/{runtime-Bq3fmxeF.js → runtime-jTnh_6Dm.js} +1 -1
- package/dist/preview/index.html +2 -2
- package/dist/runtime/components/block-layout-editor/index.d.vue.ts +10 -2
- package/dist/runtime/components/block-layout-editor/index.vue +44 -8
- package/dist/runtime/components/block-layout-editor/index.vue.d.ts +10 -2
- package/dist/runtime/components/config/config.vue +35 -0
- package/dist/runtime/components/config/use-editor.d.ts +11 -1
- package/dist/runtime/components/config/use-editor.js +27 -1
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/config.d.vue.ts +163 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/config.vue +745 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/config.vue.d.ts +163 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/runtime.d.vue.ts +8 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/runtime.vue +383 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/runtime.vue.d.ts +8 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/schema.d.ts +264 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/schema.js +183 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/config.d.vue.ts +163 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/config.vue +745 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/config.vue.d.ts +163 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/runtime.d.vue.ts +8 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/runtime.vue +402 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/runtime.vue.d.ts +8 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/schema.d.ts +264 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/schema.js +209 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/config.d.vue.ts +129 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/config.vue +618 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/config.vue.d.ts +129 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/runtime.d.vue.ts +8 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/runtime.vue +501 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/runtime.vue.d.ts +8 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/schema.d.ts +99 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/schema.js +133 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/config.d.vue.ts +127 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/config.vue +550 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/config.vue.d.ts +127 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/runtime.d.vue.ts +8 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/runtime.vue +496 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/runtime.vue.d.ts +8 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/schema.d.ts +96 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/schema.js +125 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/config.d.vue.ts +133 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/config.vue +605 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/config.vue.d.ts +133 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/runtime.d.vue.ts +8 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/runtime.vue +401 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/runtime.vue.d.ts +8 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/schema.d.ts +102 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/schema.js +142 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/config.d.vue.ts +131 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/config.vue +560 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/config.vue.d.ts +131 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/runtime.d.vue.ts +8 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/runtime.vue +395 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/runtime.vue.d.ts +8 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/schema.d.ts +96 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/schema.js +118 -0
- package/dist/runtime/components/form/fields/2026-05-28/tree-combobox-shared.d.ts +35 -0
- package/dist/runtime/components/form/fields/2026-05-28/tree-combobox-shared.js +31 -0
- package/dist/runtime/components/form/unit-config.vue +45 -1
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/config.d.vue.ts +183 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/config.vue +931 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/config.vue.d.ts +183 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/runtime.d.vue.ts +9 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/runtime.vue +463 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/runtime.vue.d.ts +9 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/schema.d.ts +283 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/schema.js +275 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/config.d.vue.ts +183 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/config.vue +931 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/config.vue.d.ts +183 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/runtime.d.vue.ts +9 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/runtime.vue +414 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/runtime.vue.d.ts +9 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/schema.d.ts +283 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/schema.js +275 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/config.d.vue.ts +133 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/config.vue +632 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/config.vue.d.ts +133 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/runtime.d.vue.ts +9 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/runtime.vue +461 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/runtime.vue.d.ts +9 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/schema.d.ts +93 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/schema.js +161 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/config.d.vue.ts +131 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/config.vue +563 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/config.vue.d.ts +131 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/runtime.d.vue.ts +9 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/runtime.vue +443 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/runtime.vue.d.ts +9 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/schema.d.ts +90 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/schema.js +153 -0
- package/dist/runtime/components/table/columns/2026-05-28/tree-combobox-shared.d.ts +35 -0
- package/dist/runtime/components/table/columns/2026-05-28/tree-combobox-shared.js +31 -0
- package/dist/runtime/components/table/config.vue +1 -30
- package/dist/runtime/components/ui/command/CommandItem.d.vue.ts +7 -0
- package/dist/runtime/components/ui/command/CommandItem.vue +13 -4
- package/dist/runtime/components/ui/command/CommandItem.vue.d.ts +7 -0
- package/dist/runtime/share/clipboard.d.ts +26 -0
- package/dist/runtime/share/clipboard.js +82 -0
- package/dist/runtime/share/layout.d.ts +4 -0
- package/dist/runtime/share/layout.js +35 -0
- package/package.json +1 -1
- package/dist/preview/assets/index-DNd8J9Zv.js +0 -643
- package/dist/preview/assets/index-DrIMqXAa.js +0 -1
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
import { type Value } from './schema.js';
|
|
2
|
+
type __VLS_ModelProps = {
|
|
3
|
+
modelValue: Value;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
6
|
+
"update:modelValue": (value: {
|
|
7
|
+
readonly size?: number | undefined;
|
|
8
|
+
readonly disabled?: string | undefined;
|
|
9
|
+
readonly type: "com.shwfed.table.column.combobox-multi";
|
|
10
|
+
readonly id: string;
|
|
11
|
+
readonly title: readonly [{
|
|
12
|
+
readonly locale: "zh";
|
|
13
|
+
readonly message: string;
|
|
14
|
+
}, ...{
|
|
15
|
+
readonly locale: "en" | "ja" | "ko";
|
|
16
|
+
readonly message: string;
|
|
17
|
+
}[]];
|
|
18
|
+
readonly hidden?: string | undefined;
|
|
19
|
+
readonly tooltip?: readonly [{
|
|
20
|
+
readonly locale: "zh";
|
|
21
|
+
readonly message: string;
|
|
22
|
+
}, ...{
|
|
23
|
+
readonly locale: "en" | "ja" | "ko";
|
|
24
|
+
readonly message: string;
|
|
25
|
+
}[]] | undefined;
|
|
26
|
+
readonly compatibilityDate: "2026-05-28";
|
|
27
|
+
readonly groupId?: string | undefined;
|
|
28
|
+
readonly placeholder?: readonly [{
|
|
29
|
+
readonly locale: "zh";
|
|
30
|
+
readonly message: string;
|
|
31
|
+
}, ...{
|
|
32
|
+
readonly locale: "en" | "ja" | "ko";
|
|
33
|
+
readonly message: string;
|
|
34
|
+
}[]] | undefined;
|
|
35
|
+
readonly readonly?: string | undefined;
|
|
36
|
+
readonly write: {
|
|
37
|
+
readonly kind: "binding";
|
|
38
|
+
readonly binding: string;
|
|
39
|
+
} | {
|
|
40
|
+
readonly onChange?: string | undefined;
|
|
41
|
+
readonly kind: "remote";
|
|
42
|
+
readonly triggers?: readonly {
|
|
43
|
+
readonly target: string;
|
|
44
|
+
readonly operation: string;
|
|
45
|
+
}[] | undefined;
|
|
46
|
+
readonly accessor: string;
|
|
47
|
+
readonly successMessage?: string | undefined;
|
|
48
|
+
};
|
|
49
|
+
readonly grow?: boolean | undefined;
|
|
50
|
+
readonly options: {
|
|
51
|
+
readonly kind: "remote";
|
|
52
|
+
readonly request: string;
|
|
53
|
+
readonly options: string;
|
|
54
|
+
readonly optionValue: string;
|
|
55
|
+
readonly optionLabel: readonly [{
|
|
56
|
+
readonly locale: "zh";
|
|
57
|
+
readonly message: string;
|
|
58
|
+
}, ...{
|
|
59
|
+
readonly locale: "en" | "ja" | "ko";
|
|
60
|
+
readonly message: string;
|
|
61
|
+
}[]];
|
|
62
|
+
readonly optionKeywords?: string | undefined;
|
|
63
|
+
} | {
|
|
64
|
+
readonly kind: "static";
|
|
65
|
+
readonly items: readonly {
|
|
66
|
+
readonly label: readonly [{
|
|
67
|
+
readonly locale: "zh";
|
|
68
|
+
readonly message: string;
|
|
69
|
+
}, ...{
|
|
70
|
+
readonly locale: "en" | "ja" | "ko";
|
|
71
|
+
readonly message: string;
|
|
72
|
+
}[]];
|
|
73
|
+
readonly id: string;
|
|
74
|
+
readonly tooltip?: readonly [{
|
|
75
|
+
readonly locale: "zh";
|
|
76
|
+
readonly message: string;
|
|
77
|
+
}, ...{
|
|
78
|
+
readonly locale: "en" | "ja" | "ko";
|
|
79
|
+
readonly message: string;
|
|
80
|
+
}[]] | undefined;
|
|
81
|
+
readonly value: {
|
|
82
|
+
readonly value: string;
|
|
83
|
+
readonly kind: "text";
|
|
84
|
+
} | {
|
|
85
|
+
readonly value: number;
|
|
86
|
+
readonly kind: "number";
|
|
87
|
+
};
|
|
88
|
+
readonly keywords?: readonly string[] | undefined;
|
|
89
|
+
}[];
|
|
90
|
+
};
|
|
91
|
+
readonly enableSorting?: boolean | undefined;
|
|
92
|
+
}) => any;
|
|
93
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
94
|
+
"onUpdate:modelValue"?: ((value: {
|
|
95
|
+
readonly size?: number | undefined;
|
|
96
|
+
readonly disabled?: string | undefined;
|
|
97
|
+
readonly type: "com.shwfed.table.column.combobox-multi";
|
|
98
|
+
readonly id: string;
|
|
99
|
+
readonly title: readonly [{
|
|
100
|
+
readonly locale: "zh";
|
|
101
|
+
readonly message: string;
|
|
102
|
+
}, ...{
|
|
103
|
+
readonly locale: "en" | "ja" | "ko";
|
|
104
|
+
readonly message: string;
|
|
105
|
+
}[]];
|
|
106
|
+
readonly hidden?: string | undefined;
|
|
107
|
+
readonly tooltip?: readonly [{
|
|
108
|
+
readonly locale: "zh";
|
|
109
|
+
readonly message: string;
|
|
110
|
+
}, ...{
|
|
111
|
+
readonly locale: "en" | "ja" | "ko";
|
|
112
|
+
readonly message: string;
|
|
113
|
+
}[]] | undefined;
|
|
114
|
+
readonly compatibilityDate: "2026-05-28";
|
|
115
|
+
readonly groupId?: string | undefined;
|
|
116
|
+
readonly placeholder?: readonly [{
|
|
117
|
+
readonly locale: "zh";
|
|
118
|
+
readonly message: string;
|
|
119
|
+
}, ...{
|
|
120
|
+
readonly locale: "en" | "ja" | "ko";
|
|
121
|
+
readonly message: string;
|
|
122
|
+
}[]] | undefined;
|
|
123
|
+
readonly readonly?: string | undefined;
|
|
124
|
+
readonly write: {
|
|
125
|
+
readonly kind: "binding";
|
|
126
|
+
readonly binding: string;
|
|
127
|
+
} | {
|
|
128
|
+
readonly onChange?: string | undefined;
|
|
129
|
+
readonly kind: "remote";
|
|
130
|
+
readonly triggers?: readonly {
|
|
131
|
+
readonly target: string;
|
|
132
|
+
readonly operation: string;
|
|
133
|
+
}[] | undefined;
|
|
134
|
+
readonly accessor: string;
|
|
135
|
+
readonly successMessage?: string | undefined;
|
|
136
|
+
};
|
|
137
|
+
readonly grow?: boolean | undefined;
|
|
138
|
+
readonly options: {
|
|
139
|
+
readonly kind: "remote";
|
|
140
|
+
readonly request: string;
|
|
141
|
+
readonly options: string;
|
|
142
|
+
readonly optionValue: string;
|
|
143
|
+
readonly optionLabel: readonly [{
|
|
144
|
+
readonly locale: "zh";
|
|
145
|
+
readonly message: string;
|
|
146
|
+
}, ...{
|
|
147
|
+
readonly locale: "en" | "ja" | "ko";
|
|
148
|
+
readonly message: string;
|
|
149
|
+
}[]];
|
|
150
|
+
readonly optionKeywords?: string | undefined;
|
|
151
|
+
} | {
|
|
152
|
+
readonly kind: "static";
|
|
153
|
+
readonly items: readonly {
|
|
154
|
+
readonly label: readonly [{
|
|
155
|
+
readonly locale: "zh";
|
|
156
|
+
readonly message: string;
|
|
157
|
+
}, ...{
|
|
158
|
+
readonly locale: "en" | "ja" | "ko";
|
|
159
|
+
readonly message: string;
|
|
160
|
+
}[]];
|
|
161
|
+
readonly id: string;
|
|
162
|
+
readonly tooltip?: readonly [{
|
|
163
|
+
readonly locale: "zh";
|
|
164
|
+
readonly message: string;
|
|
165
|
+
}, ...{
|
|
166
|
+
readonly locale: "en" | "ja" | "ko";
|
|
167
|
+
readonly message: string;
|
|
168
|
+
}[]] | undefined;
|
|
169
|
+
readonly value: {
|
|
170
|
+
readonly value: string;
|
|
171
|
+
readonly kind: "text";
|
|
172
|
+
} | {
|
|
173
|
+
readonly value: number;
|
|
174
|
+
readonly kind: "number";
|
|
175
|
+
};
|
|
176
|
+
readonly keywords?: readonly string[] | undefined;
|
|
177
|
+
}[];
|
|
178
|
+
};
|
|
179
|
+
readonly enableSorting?: boolean | undefined;
|
|
180
|
+
}) => any) | undefined;
|
|
181
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
182
|
+
declare const _default: typeof __VLS_export;
|
|
183
|
+
export default _default;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { CellContext } from '@tanstack/vue-table';
|
|
2
|
+
import type { Value } from './schema.js';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
column: Value;
|
|
5
|
+
ctx: CellContext<unknown, unknown>;
|
|
6
|
+
};
|
|
7
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
8
|
+
declare const _default: typeof __VLS_export;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,463 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { Icon } from "@iconify/vue";
|
|
3
|
+
import { Effect } from "effect";
|
|
4
|
+
import { Fetch } from "fx-fetch";
|
|
5
|
+
import { watchDebounced } from "@vueuse/core";
|
|
6
|
+
import { toast } from "vue-sonner";
|
|
7
|
+
import { computed, ref } from "vue";
|
|
8
|
+
import { useI18n } from "vue-i18n";
|
|
9
|
+
import { cel as _rawCel } from "../../../../../utils/cel";
|
|
10
|
+
import { celBindings, injectCELContext } from "../../../../../utils/cel-context";
|
|
11
|
+
import { getLocalizedText } from "../../../../../share/locale";
|
|
12
|
+
import { dispatchTriggers, useEventChannel } from "../../../../../share/event-bus";
|
|
13
|
+
import {
|
|
14
|
+
Command,
|
|
15
|
+
CommandEmpty,
|
|
16
|
+
CommandGroup,
|
|
17
|
+
CommandInput,
|
|
18
|
+
CommandItem,
|
|
19
|
+
CommandList
|
|
20
|
+
} from "../../../../ui/command";
|
|
21
|
+
import { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput } from "../../../../ui/input-group";
|
|
22
|
+
import { Markdown } from "../../../../ui/markdown";
|
|
23
|
+
import { Popover, PopoverAnchor, PopoverContent, PopoverTrigger } from "../../../../ui/popover";
|
|
24
|
+
import { useFormState } from "../../../../form/utils/state";
|
|
25
|
+
import { interpolateMarkdown } from "../../../utils/runtime";
|
|
26
|
+
import { useSharedFetchLayer } from "../../../utils/shared-fetch";
|
|
27
|
+
defineOptions({ name: "ShwfedTableComboboxMultiRuntime" });
|
|
28
|
+
const props = defineProps({
|
|
29
|
+
column: { type: null, required: true },
|
|
30
|
+
ctx: { type: Object, required: true }
|
|
31
|
+
});
|
|
32
|
+
const { locale, t } = useI18n({
|
|
33
|
+
inheritLocale: true,
|
|
34
|
+
messages: {
|
|
35
|
+
zh: {
|
|
36
|
+
"combobox-multi-placeholder": "\u8BF7\u9009\u62E9",
|
|
37
|
+
"combobox-multi-search-placeholder": "\u641C\u7D22\u2026",
|
|
38
|
+
"combobox-multi-empty": "\u65E0\u5339\u914D\u9879",
|
|
39
|
+
"combobox-multi-loading": "\u52A0\u8F7D\u4E2D\u2026"
|
|
40
|
+
},
|
|
41
|
+
en: {
|
|
42
|
+
"combobox-multi-placeholder": "Select\u2026",
|
|
43
|
+
"combobox-multi-search-placeholder": "Search\u2026",
|
|
44
|
+
"combobox-multi-empty": "No matches",
|
|
45
|
+
"combobox-multi-loading": "Loading\u2026"
|
|
46
|
+
},
|
|
47
|
+
ja: {
|
|
48
|
+
"combobox-multi-placeholder": "\u9078\u629E\u3057\u3066\u304F\u3060\u3055\u3044",
|
|
49
|
+
"combobox-multi-search-placeholder": "\u691C\u7D22\u2026",
|
|
50
|
+
"combobox-multi-empty": "\u4E00\u81F4\u306A\u3057",
|
|
51
|
+
"combobox-multi-loading": "\u8AAD\u307F\u8FBC\u307F\u4E2D\u2026"
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
const formState = useFormState();
|
|
56
|
+
const inherited = injectCELContext();
|
|
57
|
+
const $cel = (expression, context) => _rawCel(expression, { ...celBindings(inherited), ...context });
|
|
58
|
+
const eventChannel = useEventChannel();
|
|
59
|
+
const sharedFetchLayer = useSharedFetchLayer();
|
|
60
|
+
const row = computed(() => props.ctx.row.original);
|
|
61
|
+
const rowIndex = computed(() => props.ctx.row.index);
|
|
62
|
+
const placeholderText = computed(
|
|
63
|
+
() => props.column.placeholder ? getLocalizedText(props.column.placeholder, locale.value) : t("combobox-multi-placeholder")
|
|
64
|
+
);
|
|
65
|
+
function evalBool(expression, label) {
|
|
66
|
+
if (!expression) return false;
|
|
67
|
+
try {
|
|
68
|
+
return Effect.runSync($cel(expression, { row: row.value, index: rowIndex.value })) === true;
|
|
69
|
+
} catch (e) {
|
|
70
|
+
console.error(`[shwfed-table] combobox-multi ${label} failed`, e);
|
|
71
|
+
return false;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
const isHidden = computed(() => evalBool(props.column.hidden, "hidden"));
|
|
75
|
+
const isDisabledByConfig = computed(() => evalBool(props.column.disabled, "disabled"));
|
|
76
|
+
const isReadonly = computed(() => evalBool(props.column.readonly, "readonly"));
|
|
77
|
+
const isInteractive = computed(
|
|
78
|
+
() => props.column.write.kind === "binding" || !!props.column.write.onChange
|
|
79
|
+
);
|
|
80
|
+
const pending = ref(false);
|
|
81
|
+
function safeInterpolate(tpl, context) {
|
|
82
|
+
try {
|
|
83
|
+
return interpolateMarkdown(tpl, $cel, context);
|
|
84
|
+
} catch (e) {
|
|
85
|
+
console.error("[shwfed-table] combobox-multi label interpolation failed", e);
|
|
86
|
+
return tpl;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
const staticEntries = computed(() => {
|
|
90
|
+
if (props.column.options.kind !== "static") return [];
|
|
91
|
+
return props.column.options.items.map((item) => {
|
|
92
|
+
const labelTpl = getLocalizedText(item.label, locale.value) ?? "";
|
|
93
|
+
const tooltipTpl = item.tooltip ? getLocalizedText(item.tooltip, locale.value) : void 0;
|
|
94
|
+
return {
|
|
95
|
+
key: item.id,
|
|
96
|
+
value: item.value.value,
|
|
97
|
+
label: labelTpl ? safeInterpolate(labelTpl, {}) : "",
|
|
98
|
+
tooltip: tooltipTpl ? safeInterpolate(tooltipTpl, {}) : void 0,
|
|
99
|
+
keywords: (item.keywords ?? []).join(" ")
|
|
100
|
+
};
|
|
101
|
+
});
|
|
102
|
+
});
|
|
103
|
+
const remoteJson = ref(null);
|
|
104
|
+
const remoteLoading = ref(false);
|
|
105
|
+
let fetchSeq = 0;
|
|
106
|
+
const requestSignature = computed(() => {
|
|
107
|
+
if (props.column.options.kind !== "remote") return null;
|
|
108
|
+
const expr = props.column.options.request;
|
|
109
|
+
if (!expr) return null;
|
|
110
|
+
try {
|
|
111
|
+
const builder = Effect.runSync(
|
|
112
|
+
$cel(expr, { row: row.value, index: rowIndex.value })
|
|
113
|
+
);
|
|
114
|
+
return JSON.stringify(builder.describe());
|
|
115
|
+
} catch {
|
|
116
|
+
return null;
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
async function fetchOptions() {
|
|
120
|
+
const seq = ++fetchSeq;
|
|
121
|
+
if (props.column.options.kind !== "remote" || requestSignature.value == null) {
|
|
122
|
+
remoteJson.value = null;
|
|
123
|
+
remoteLoading.value = false;
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
const expr = props.column.options.request;
|
|
127
|
+
remoteLoading.value = true;
|
|
128
|
+
const program = Effect.gen(function* () {
|
|
129
|
+
const builder = yield* $cel(expr, { row: row.value, index: rowIndex.value });
|
|
130
|
+
return yield* builder.json();
|
|
131
|
+
});
|
|
132
|
+
try {
|
|
133
|
+
const result = await Effect.runPromise(Effect.provide(program, sharedFetchLayer));
|
|
134
|
+
if (seq === fetchSeq) remoteJson.value = result;
|
|
135
|
+
} catch {
|
|
136
|
+
if (seq === fetchSeq) remoteJson.value = null;
|
|
137
|
+
} finally {
|
|
138
|
+
if (seq === fetchSeq) remoteLoading.value = false;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
watchDebounced(
|
|
142
|
+
requestSignature,
|
|
143
|
+
() => {
|
|
144
|
+
void fetchOptions();
|
|
145
|
+
},
|
|
146
|
+
{ debounce: 200, immediate: true }
|
|
147
|
+
);
|
|
148
|
+
function valueOf(option) {
|
|
149
|
+
if (props.column.options.kind !== "remote") return void 0;
|
|
150
|
+
try {
|
|
151
|
+
return Effect.runSync($cel(props.column.options.optionValue, {
|
|
152
|
+
row: row.value,
|
|
153
|
+
index: rowIndex.value,
|
|
154
|
+
option
|
|
155
|
+
}));
|
|
156
|
+
} catch (e) {
|
|
157
|
+
console.error("[shwfed-table] combobox-multi optionValue failed", e);
|
|
158
|
+
return void 0;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
function labelOf(option) {
|
|
162
|
+
if (props.column.options.kind !== "remote") return "";
|
|
163
|
+
const tpl = getLocalizedText(props.column.options.optionLabel, locale.value) ?? "";
|
|
164
|
+
if (!tpl) return "";
|
|
165
|
+
try {
|
|
166
|
+
return interpolateMarkdown(tpl, $cel, { row: row.value, index: rowIndex.value, option });
|
|
167
|
+
} catch (e) {
|
|
168
|
+
console.error("[shwfed-table] combobox-multi optionLabel failed", e);
|
|
169
|
+
return "";
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
function keywordsOf(option) {
|
|
173
|
+
if (props.column.options.kind !== "remote") return "";
|
|
174
|
+
const expr = props.column.options.optionKeywords;
|
|
175
|
+
if (!expr) return "";
|
|
176
|
+
try {
|
|
177
|
+
const raw = Effect.runSync($cel(expr, {
|
|
178
|
+
row: row.value,
|
|
179
|
+
index: rowIndex.value,
|
|
180
|
+
option
|
|
181
|
+
}));
|
|
182
|
+
if (!Array.isArray(raw)) return "";
|
|
183
|
+
return raw.map((k) => String(k ?? "")).filter((k) => k.length > 0).join(" ");
|
|
184
|
+
} catch (e) {
|
|
185
|
+
console.error("[shwfed-table] combobox-multi optionKeywords failed", e);
|
|
186
|
+
return "";
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
const remoteEntries = computed(() => {
|
|
190
|
+
if (props.column.options.kind !== "remote") return [];
|
|
191
|
+
let raw;
|
|
192
|
+
try {
|
|
193
|
+
raw = Effect.runSync($cel(props.column.options.options, {
|
|
194
|
+
row: row.value,
|
|
195
|
+
index: rowIndex.value,
|
|
196
|
+
json: remoteJson.value
|
|
197
|
+
}));
|
|
198
|
+
} catch (e) {
|
|
199
|
+
console.error("[shwfed-table] combobox-multi options failed", e);
|
|
200
|
+
return [];
|
|
201
|
+
}
|
|
202
|
+
if (!Array.isArray(raw)) return [];
|
|
203
|
+
return raw.map((option, idx) => ({
|
|
204
|
+
key: String(idx),
|
|
205
|
+
label: labelOf(option),
|
|
206
|
+
value: valueOf(option),
|
|
207
|
+
keywords: keywordsOf(option)
|
|
208
|
+
}));
|
|
209
|
+
});
|
|
210
|
+
const entries = computed(
|
|
211
|
+
() => props.column.options.kind === "static" ? staticEntries.value : remoteEntries.value
|
|
212
|
+
);
|
|
213
|
+
const isLoading = computed(() => props.column.options.kind === "remote" && remoteLoading.value);
|
|
214
|
+
const cellValue = computed(() => {
|
|
215
|
+
const raw = props.column.write.kind === "binding" ? formState.getAt(props.column.write.binding) : props.ctx.cell.getValue();
|
|
216
|
+
return Array.isArray(raw) ? raw : [];
|
|
217
|
+
});
|
|
218
|
+
function isEqual(a, b) {
|
|
219
|
+
if (a === b) return true;
|
|
220
|
+
if (a == null || b == null) return false;
|
|
221
|
+
if (typeof a === "object" && typeof b === "object") {
|
|
222
|
+
try {
|
|
223
|
+
return JSON.stringify(a) === JSON.stringify(b);
|
|
224
|
+
} catch {
|
|
225
|
+
return false;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
return false;
|
|
229
|
+
}
|
|
230
|
+
const committedEntries = computed(() => {
|
|
231
|
+
const list = [];
|
|
232
|
+
for (const v of cellValue.value) {
|
|
233
|
+
const entry = entries.value.find((e) => isEqual(e.value, v));
|
|
234
|
+
if (entry) list.push(entry);
|
|
235
|
+
}
|
|
236
|
+
return list;
|
|
237
|
+
});
|
|
238
|
+
const committedKeys = computed(() => committedEntries.value.map((e) => e.key));
|
|
239
|
+
const draftKeys = ref(null);
|
|
240
|
+
const draftDirty = ref(false);
|
|
241
|
+
const selectedKeys = computed(() => draftKeys.value ?? committedKeys.value);
|
|
242
|
+
const selectedKeySet = computed(() => new Set(selectedKeys.value));
|
|
243
|
+
const selectedEntries = computed(
|
|
244
|
+
() => selectedKeys.value.map((k) => entries.value.find((e) => e.key === k)).filter((e) => !!e)
|
|
245
|
+
);
|
|
246
|
+
const triggerLabel = computed(() => {
|
|
247
|
+
const arr = selectedEntries.value;
|
|
248
|
+
if (arr.length === 0) return "";
|
|
249
|
+
if (arr.length === 1) return arr[0].label;
|
|
250
|
+
return `${arr[0].label} +${arr.length - 1}`;
|
|
251
|
+
});
|
|
252
|
+
const open = ref(false);
|
|
253
|
+
const isDisabled = computed(
|
|
254
|
+
() => !isInteractive.value || isDisabledByConfig.value || pending.value
|
|
255
|
+
);
|
|
256
|
+
async function submit(next) {
|
|
257
|
+
const write = props.column.write;
|
|
258
|
+
if (write.kind === "binding") {
|
|
259
|
+
formState.setAt(write.binding, next);
|
|
260
|
+
return;
|
|
261
|
+
}
|
|
262
|
+
const { onChange, successMessage, triggers } = write;
|
|
263
|
+
if (!onChange) return;
|
|
264
|
+
pending.value = true;
|
|
265
|
+
const program = Effect.gen(function* () {
|
|
266
|
+
const builder = yield* $cel(onChange, {
|
|
267
|
+
row: row.value,
|
|
268
|
+
index: rowIndex.value,
|
|
269
|
+
value: next
|
|
270
|
+
});
|
|
271
|
+
return yield* builder.json();
|
|
272
|
+
});
|
|
273
|
+
try {
|
|
274
|
+
const body = await Effect.runPromise(Effect.provide(program, Fetch.layer));
|
|
275
|
+
if (successMessage) {
|
|
276
|
+
try {
|
|
277
|
+
const message = Effect.runSync($cel(successMessage, { json: body }));
|
|
278
|
+
if (message) toast.success(message);
|
|
279
|
+
} catch (e) {
|
|
280
|
+
console.error("[shwfed-table] combobox-multi successMessage failed", e);
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
await Effect.runPromise(dispatchTriggers(eventChannel, triggers));
|
|
284
|
+
} catch (e) {
|
|
285
|
+
console.error("[shwfed-table] combobox-multi onChange failed", e);
|
|
286
|
+
toast.error("\u8BF7\u6C42\u5931\u8D25");
|
|
287
|
+
} finally {
|
|
288
|
+
pending.value = false;
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
async function commit(keys) {
|
|
292
|
+
draftKeys.value = [...keys];
|
|
293
|
+
const mapped = [];
|
|
294
|
+
for (const key of keys) {
|
|
295
|
+
const entry = entries.value.find((e) => e.key === key);
|
|
296
|
+
if (entry) mapped.push(entry.value);
|
|
297
|
+
}
|
|
298
|
+
try {
|
|
299
|
+
await submit(mapped);
|
|
300
|
+
} finally {
|
|
301
|
+
draftKeys.value = null;
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
function handleSelect(next) {
|
|
305
|
+
const keys = Array.isArray(next) ? next.filter((k) => typeof k === "string") : [];
|
|
306
|
+
draftKeys.value = keys;
|
|
307
|
+
draftDirty.value = true;
|
|
308
|
+
}
|
|
309
|
+
const showClear = computed(
|
|
310
|
+
() => !isDisabled.value && selectedEntries.value.length > 0
|
|
311
|
+
);
|
|
312
|
+
const hoveredKey = ref(null);
|
|
313
|
+
function handleOpenChange(next) {
|
|
314
|
+
if (next === open.value) return;
|
|
315
|
+
open.value = next;
|
|
316
|
+
hoveredKey.value = next ? entries.value[0]?.key ?? null : null;
|
|
317
|
+
if (next) {
|
|
318
|
+
draftKeys.value = [...committedKeys.value];
|
|
319
|
+
draftDirty.value = false;
|
|
320
|
+
return;
|
|
321
|
+
}
|
|
322
|
+
const wasDirty = draftDirty.value;
|
|
323
|
+
draftDirty.value = false;
|
|
324
|
+
if (!wasDirty) {
|
|
325
|
+
draftKeys.value = null;
|
|
326
|
+
return;
|
|
327
|
+
}
|
|
328
|
+
void commit(draftKeys.value ?? []);
|
|
329
|
+
}
|
|
330
|
+
function handleClear() {
|
|
331
|
+
draftDirty.value = false;
|
|
332
|
+
open.value = false;
|
|
333
|
+
hoveredKey.value = null;
|
|
334
|
+
void commit([]);
|
|
335
|
+
}
|
|
336
|
+
const hoveredEntry = computed(
|
|
337
|
+
() => entries.value.find((e) => e.key === hoveredKey.value)
|
|
338
|
+
);
|
|
339
|
+
const hoveredTooltip = computed(() => hoveredEntry.value?.tooltip);
|
|
340
|
+
const anyHasTooltip = computed(
|
|
341
|
+
() => entries.value.some((e) => e.tooltip != null && e.tooltip.length > 0)
|
|
342
|
+
);
|
|
343
|
+
</script>
|
|
344
|
+
|
|
345
|
+
<template>
|
|
346
|
+
<div class="p-[0.125rem] w-full">
|
|
347
|
+
<span
|
|
348
|
+
v-if="isHidden"
|
|
349
|
+
class="block h-7 w-full"
|
|
350
|
+
/>
|
|
351
|
+
<span
|
|
352
|
+
v-else-if="isReadonly || !isInteractive"
|
|
353
|
+
class="flex items-center h-7 w-full px-2 text-[0.75rem] text-zinc-700 truncate"
|
|
354
|
+
>
|
|
355
|
+
{{ triggerLabel || "\u2014" }}
|
|
356
|
+
</span>
|
|
357
|
+
<Popover
|
|
358
|
+
v-else
|
|
359
|
+
:open="open"
|
|
360
|
+
@update:open="handleOpenChange"
|
|
361
|
+
>
|
|
362
|
+
<PopoverAnchor as-child>
|
|
363
|
+
<InputGroup
|
|
364
|
+
class="group/combobox-multi h-7 rounded border-zinc-200/30 hover:border-zinc-200 focus-within:border-zinc-200 transition-colors ease-out duration-180"
|
|
365
|
+
:data-disabled="isDisabled ? 'true' : void 0"
|
|
366
|
+
>
|
|
367
|
+
<PopoverTrigger as-child>
|
|
368
|
+
<InputGroupInput
|
|
369
|
+
:model-value="triggerLabel"
|
|
370
|
+
:disabled="isDisabled"
|
|
371
|
+
:placeholder="placeholderText"
|
|
372
|
+
class="h-7 text-[0.75rem] md:text-[0.75rem] px-2 cursor-pointer text-left"
|
|
373
|
+
readonly
|
|
374
|
+
/>
|
|
375
|
+
</PopoverTrigger>
|
|
376
|
+
<InputGroupAddon
|
|
377
|
+
v-if="pending || isLoading"
|
|
378
|
+
align="inline-end"
|
|
379
|
+
class="text-zinc-400"
|
|
380
|
+
>
|
|
381
|
+
<Icon
|
|
382
|
+
icon="fluent:spinner-ios-20-regular"
|
|
383
|
+
class="size-3 animate-spin"
|
|
384
|
+
/>
|
|
385
|
+
</InputGroupAddon>
|
|
386
|
+
<InputGroupAddon
|
|
387
|
+
v-else-if="showClear"
|
|
388
|
+
align="inline-end"
|
|
389
|
+
class="[@media(hover:hover)]:opacity-0 transition-opacity group-hover/combobox-multi:opacity-100 focus-within:opacity-100"
|
|
390
|
+
>
|
|
391
|
+
<InputGroupButton
|
|
392
|
+
size="icon-xs"
|
|
393
|
+
data-slot="combobox-multi-clear"
|
|
394
|
+
class="size-4 text-zinc-500 hover:text-zinc-700"
|
|
395
|
+
tabindex="-1"
|
|
396
|
+
@mousedown.prevent
|
|
397
|
+
@click.stop="handleClear"
|
|
398
|
+
>
|
|
399
|
+
<Icon
|
|
400
|
+
icon="fluent:dismiss-20-regular"
|
|
401
|
+
class="size-3"
|
|
402
|
+
/>
|
|
403
|
+
</InputGroupButton>
|
|
404
|
+
</InputGroupAddon>
|
|
405
|
+
</InputGroup>
|
|
406
|
+
</PopoverAnchor>
|
|
407
|
+
<PopoverContent
|
|
408
|
+
class="w-auto p-0 [&_[data-slot=command-input-wrapper]]:h-7 [&_[data-slot=command-input-wrapper]]:px-2 [&_[data-slot=command-input-wrapper]_svg]:size-3 [&_[data-slot=command-input]]:h-7 [&_[data-slot=command-input]]:py-0 [&_[data-slot=command-input]]:text-[0.75rem] [&_[data-slot=command-item]]:px-2 [&_[data-slot=command-item]]:py-1 [&_[data-slot=command-item]]:text-[0.75rem]"
|
|
409
|
+
:style="{ width: 'var(--reka-popover-trigger-width)' }"
|
|
410
|
+
>
|
|
411
|
+
<Command
|
|
412
|
+
:model-value="selectedKeys"
|
|
413
|
+
:multiple="true"
|
|
414
|
+
:disabled="isDisabled"
|
|
415
|
+
@update:model-value="handleSelect"
|
|
416
|
+
>
|
|
417
|
+
<CommandInput :placeholder="t('combobox-multi-search-placeholder')" />
|
|
418
|
+
<CommandList>
|
|
419
|
+
<div
|
|
420
|
+
v-if="entries.length === 0"
|
|
421
|
+
data-slot="combobox-multi-empty"
|
|
422
|
+
class="py-3 text-center text-[0.75rem] text-zinc-500"
|
|
423
|
+
>
|
|
424
|
+
{{ isLoading ? t("combobox-multi-loading") : t("combobox-multi-empty") }}
|
|
425
|
+
</div>
|
|
426
|
+
<template v-else>
|
|
427
|
+
<CommandEmpty class="py-3 text-center text-[0.75rem] text-zinc-500">
|
|
428
|
+
{{ t("combobox-multi-empty") }}
|
|
429
|
+
</CommandEmpty>
|
|
430
|
+
<CommandGroup>
|
|
431
|
+
<CommandItem
|
|
432
|
+
v-for="entry in entries"
|
|
433
|
+
:key="entry.key"
|
|
434
|
+
:value="entry.key"
|
|
435
|
+
:keywords="entry.keywords || void 0"
|
|
436
|
+
@mouseenter="hoveredKey = entry.key"
|
|
437
|
+
@focus="hoveredKey = entry.key"
|
|
438
|
+
>
|
|
439
|
+
<span class="flex-1"><Markdown :source="entry.label" /></span>
|
|
440
|
+
<Icon
|
|
441
|
+
v-if="selectedKeySet.has(entry.key)"
|
|
442
|
+
icon="fluent:checkmark-20-regular"
|
|
443
|
+
class="size-3 text-zinc-700"
|
|
444
|
+
/>
|
|
445
|
+
</CommandItem>
|
|
446
|
+
</CommandGroup>
|
|
447
|
+
</template>
|
|
448
|
+
</CommandList>
|
|
449
|
+
<div
|
|
450
|
+
v-if="anyHasTooltip && hoveredTooltip"
|
|
451
|
+
class="border-t border-zinc-200 px-2 py-1.5"
|
|
452
|
+
>
|
|
453
|
+
<Markdown
|
|
454
|
+
:source="hoveredTooltip"
|
|
455
|
+
block
|
|
456
|
+
class="prose prose-xs prose-zinc"
|
|
457
|
+
/>
|
|
458
|
+
</div>
|
|
459
|
+
</Command>
|
|
460
|
+
</PopoverContent>
|
|
461
|
+
</Popover>
|
|
462
|
+
</div>
|
|
463
|
+
</template>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { CellContext } from '@tanstack/vue-table';
|
|
2
|
+
import type { Value } from './schema.js';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
column: Value;
|
|
5
|
+
ctx: CellContext<unknown, unknown>;
|
|
6
|
+
};
|
|
7
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
8
|
+
declare const _default: typeof __VLS_export;
|
|
9
|
+
export default _default;
|