@shwfed/config 2.3.23 → 2.3.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 (43) hide show
  1. package/dist/mcp.mjs +996 -587
  2. package/dist/module.json +1 -1
  3. package/dist/preview/assets/{config-pVNUrcvS.js → config-B-6Htwv0.js} +1 -1
  4. package/dist/preview/assets/{config-f66PEpZ5.js → config-B2KjxFl5.js} +1 -1
  5. package/dist/preview/assets/{config-5rB9Rnmf.js → config-B3at5Bue.js} +1 -1
  6. package/dist/preview/assets/{config-EtlOM9yx.js → config-Bi9uFh4Y.js} +1 -1
  7. package/dist/preview/assets/{config-DUNvg-mJ.js → config-CBHKrOP5.js} +1 -1
  8. package/dist/preview/assets/{config-BWMtPN22.js → config-CWZxlCMJ.js} +1 -1
  9. package/dist/preview/assets/{config-CJADmi-_.js → config-CaZpOvHG.js} +1 -1
  10. package/dist/preview/assets/{config-BLxl7ROb.js → config-D5Kfssb7.js} +1 -1
  11. package/dist/preview/assets/{config-C-EOrL-v.js → config-DYAEfkYR.js} +1 -1
  12. package/dist/preview/assets/{definition.vue_vue_type_script_setup_true_lang-DUu-CoTZ.js → definition.vue_vue_type_script_setup_true_lang-8BVrrrak.js} +1 -1
  13. package/dist/preview/assets/index-B3wadvvl.js +1 -0
  14. package/dist/preview/assets/index-DTsYYECD.js +643 -0
  15. package/dist/preview/assets/{runtime-P99-0gRD.js → runtime-C1iENPNJ.js} +1 -1
  16. package/dist/preview/assets/{runtime-CUBGWRtC.js → runtime-C5CCMnHt.js} +1 -1
  17. package/dist/preview/assets/{runtime-CFPeFbAB.js → runtime-CEP42oTV.js} +1 -1
  18. package/dist/preview/assets/{runtime-DcqfhaaX.js → runtime-CRHn61GX.js} +1 -1
  19. package/dist/preview/assets/{runtime-qQ5mJdRv.js → runtime-CoRrnGx1.js} +1 -1
  20. package/dist/preview/assets/{runtime-C0v-S40R.js → runtime-CqciI2ST.js} +1 -1
  21. package/dist/preview/assets/{runtime-DoLJtHV2.js → runtime-Hvzx1ucy.js} +1 -1
  22. package/dist/preview/assets/{runtime-B9GkQToM.js → runtime-aBsBSCeg.js} +1 -1
  23. package/dist/preview/assets/{runtime-CI38ypkY.js → runtime-jrsJfwMb.js} +1 -1
  24. package/dist/preview/index.html +1 -1
  25. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi/config.d.vue.ts +163 -0
  26. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi/config.vue +709 -0
  27. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi/config.vue.d.ts +163 -0
  28. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi/runtime.d.vue.ts +9 -0
  29. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi/runtime.vue +368 -0
  30. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi/runtime.vue.d.ts +9 -0
  31. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi/schema.d.ts +225 -0
  32. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi/schema.js +175 -0
  33. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/config.d.vue.ts +167 -0
  34. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/config.vue +740 -0
  35. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/config.vue.d.ts +167 -0
  36. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/runtime.d.vue.ts +9 -0
  37. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/runtime.vue +402 -0
  38. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/runtime.vue.d.ts +9 -0
  39. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/schema.d.ts +227 -0
  40. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/schema.js +227 -0
  41. package/package.json +1 -1
  42. package/dist/preview/assets/index-B4xolIUJ.js +0 -643
  43. package/dist/preview/assets/index-DFYLO8qf.js +0 -1
@@ -0,0 +1,167 @@
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 onChange?: string | undefined;
9
+ readonly disabled?: string | undefined;
10
+ readonly type: "com.shwfed.table.column.combobox-multi.remote";
11
+ readonly id: string;
12
+ readonly title: readonly [{
13
+ readonly locale: "zh";
14
+ readonly message: string;
15
+ }, ...{
16
+ readonly locale: "en" | "ja" | "ko";
17
+ readonly message: string;
18
+ }[]];
19
+ readonly hidden?: string | undefined;
20
+ readonly tooltip?: readonly [{
21
+ readonly locale: "zh";
22
+ readonly message: string;
23
+ }, ...{
24
+ readonly locale: "en" | "ja" | "ko";
25
+ readonly message: string;
26
+ }[]] | undefined;
27
+ readonly compatibilityDate: "2026-05-26";
28
+ readonly triggers?: readonly {
29
+ readonly target: string;
30
+ readonly operation: string;
31
+ }[] | undefined;
32
+ readonly groupId?: string | undefined;
33
+ readonly placeholder?: readonly [{
34
+ readonly locale: "zh";
35
+ readonly message: string;
36
+ }, ...{
37
+ readonly locale: "en" | "ja" | "ko";
38
+ readonly message: string;
39
+ }[]] | undefined;
40
+ readonly readonly?: string | undefined;
41
+ readonly grow?: boolean | undefined;
42
+ readonly accessor: string;
43
+ readonly enableSorting?: boolean | undefined;
44
+ readonly options: {
45
+ readonly kind: "static";
46
+ readonly items: readonly {
47
+ readonly label: readonly [{
48
+ readonly locale: "zh";
49
+ readonly message: string;
50
+ }, ...{
51
+ readonly locale: "en" | "ja" | "ko";
52
+ readonly message: string;
53
+ }[]];
54
+ readonly id: string;
55
+ readonly tooltip?: readonly [{
56
+ readonly locale: "zh";
57
+ readonly message: string;
58
+ }, ...{
59
+ readonly locale: "en" | "ja" | "ko";
60
+ readonly message: string;
61
+ }[]] | undefined;
62
+ readonly value: {
63
+ readonly value: string;
64
+ readonly kind: "text";
65
+ } | {
66
+ readonly value: number;
67
+ readonly kind: "number";
68
+ };
69
+ }[];
70
+ } | {
71
+ readonly kind: "remote";
72
+ readonly request: string;
73
+ readonly options: string;
74
+ readonly optionValue: string;
75
+ readonly optionLabel: readonly [{
76
+ readonly locale: "zh";
77
+ readonly message: string;
78
+ }, ...{
79
+ readonly locale: "en" | "ja" | "ko";
80
+ readonly message: string;
81
+ }[]];
82
+ };
83
+ readonly successMessage?: string | undefined;
84
+ }) => any;
85
+ }, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
86
+ "onUpdate:modelValue"?: ((value: {
87
+ readonly size?: number | undefined;
88
+ readonly onChange?: string | undefined;
89
+ readonly disabled?: string | undefined;
90
+ readonly type: "com.shwfed.table.column.combobox-multi.remote";
91
+ readonly id: string;
92
+ readonly title: readonly [{
93
+ readonly locale: "zh";
94
+ readonly message: string;
95
+ }, ...{
96
+ readonly locale: "en" | "ja" | "ko";
97
+ readonly message: string;
98
+ }[]];
99
+ readonly hidden?: string | undefined;
100
+ readonly tooltip?: readonly [{
101
+ readonly locale: "zh";
102
+ readonly message: string;
103
+ }, ...{
104
+ readonly locale: "en" | "ja" | "ko";
105
+ readonly message: string;
106
+ }[]] | undefined;
107
+ readonly compatibilityDate: "2026-05-26";
108
+ readonly triggers?: readonly {
109
+ readonly target: string;
110
+ readonly operation: string;
111
+ }[] | undefined;
112
+ readonly groupId?: string | undefined;
113
+ readonly placeholder?: readonly [{
114
+ readonly locale: "zh";
115
+ readonly message: string;
116
+ }, ...{
117
+ readonly locale: "en" | "ja" | "ko";
118
+ readonly message: string;
119
+ }[]] | undefined;
120
+ readonly readonly?: string | undefined;
121
+ readonly grow?: boolean | undefined;
122
+ readonly accessor: string;
123
+ readonly enableSorting?: boolean | undefined;
124
+ readonly options: {
125
+ readonly kind: "static";
126
+ readonly items: readonly {
127
+ readonly label: readonly [{
128
+ readonly locale: "zh";
129
+ readonly message: string;
130
+ }, ...{
131
+ readonly locale: "en" | "ja" | "ko";
132
+ readonly message: string;
133
+ }[]];
134
+ readonly id: string;
135
+ readonly tooltip?: readonly [{
136
+ readonly locale: "zh";
137
+ readonly message: string;
138
+ }, ...{
139
+ readonly locale: "en" | "ja" | "ko";
140
+ readonly message: string;
141
+ }[]] | undefined;
142
+ readonly value: {
143
+ readonly value: string;
144
+ readonly kind: "text";
145
+ } | {
146
+ readonly value: number;
147
+ readonly kind: "number";
148
+ };
149
+ }[];
150
+ } | {
151
+ readonly kind: "remote";
152
+ readonly request: string;
153
+ readonly options: string;
154
+ readonly optionValue: string;
155
+ readonly optionLabel: readonly [{
156
+ readonly locale: "zh";
157
+ readonly message: string;
158
+ }, ...{
159
+ readonly locale: "en" | "ja" | "ko";
160
+ readonly message: string;
161
+ }[]];
162
+ };
163
+ readonly successMessage?: string | undefined;
164
+ }) => any) | undefined;
165
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
166
+ declare const _default: typeof __VLS_export;
167
+ 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,402 @@
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, watch } 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 { interpolateMarkdown } from "../../../utils/runtime";
25
+ import { useSharedFetchLayer } from "../../../utils/shared-fetch";
26
+ defineOptions({ name: "ShwfedTableComboboxMultiRemoteRuntime" });
27
+ const props = defineProps({
28
+ column: { type: null, required: true },
29
+ ctx: { type: Object, required: true }
30
+ });
31
+ const { locale, t } = useI18n({
32
+ inheritLocale: true,
33
+ messages: {
34
+ zh: {
35
+ "combobox-multi-placeholder": "\u8BF7\u9009\u62E9",
36
+ "combobox-multi-search-placeholder": "\u641C\u7D22\u2026",
37
+ "combobox-multi-empty": "\u65E0\u5339\u914D\u9879",
38
+ "combobox-multi-loading": "\u52A0\u8F7D\u4E2D\u2026"
39
+ },
40
+ en: {
41
+ "combobox-multi-placeholder": "Select\u2026",
42
+ "combobox-multi-search-placeholder": "Search\u2026",
43
+ "combobox-multi-empty": "No matches",
44
+ "combobox-multi-loading": "Loading\u2026"
45
+ },
46
+ ja: {
47
+ "combobox-multi-placeholder": "\u9078\u629E\u3057\u3066\u304F\u3060\u3055\u3044",
48
+ "combobox-multi-search-placeholder": "\u691C\u7D22\u2026",
49
+ "combobox-multi-empty": "\u4E00\u81F4\u306A\u3057",
50
+ "combobox-multi-loading": "\u8AAD\u307F\u8FBC\u307F\u4E2D\u2026"
51
+ }
52
+ }
53
+ });
54
+ const inherited = injectCELContext();
55
+ const $cel = (expression, context) => _rawCel(expression, { ...celBindings(inherited), ...context });
56
+ const eventChannel = useEventChannel();
57
+ const sharedFetchLayer = useSharedFetchLayer();
58
+ const row = computed(() => props.ctx.row.original);
59
+ const rowIndex = computed(() => props.ctx.row.index);
60
+ const placeholderText = computed(
61
+ () => props.column.placeholder ? getLocalizedText(props.column.placeholder, locale.value) : t("combobox-multi-placeholder")
62
+ );
63
+ function evalBool(expression, label) {
64
+ if (!expression) return false;
65
+ try {
66
+ return Effect.runSync($cel(expression, { row: row.value, index: rowIndex.value })) === true;
67
+ } catch (e) {
68
+ console.error(`[shwfed-table] combobox-multi.remote ${label} failed`, e);
69
+ return false;
70
+ }
71
+ }
72
+ const isHidden = computed(() => evalBool(props.column.hidden, "hidden"));
73
+ const isDisabledByConfig = computed(() => evalBool(props.column.disabled, "disabled"));
74
+ const isReadonly = computed(() => evalBool(props.column.readonly, "readonly"));
75
+ const isInteractive = computed(() => !!props.column.onChange);
76
+ const pending = ref(false);
77
+ function safeInterpolate(tpl, context) {
78
+ try {
79
+ return interpolateMarkdown(tpl, $cel, context);
80
+ } catch (e) {
81
+ console.error("[shwfed-table] combobox-multi.remote label interpolation failed", e);
82
+ return tpl;
83
+ }
84
+ }
85
+ const staticEntries = computed(() => {
86
+ if (props.column.options.kind !== "static") return [];
87
+ return props.column.options.items.map((item) => {
88
+ const labelTpl = getLocalizedText(item.label, locale.value) ?? "";
89
+ const tooltipTpl = item.tooltip ? getLocalizedText(item.tooltip, locale.value) : void 0;
90
+ return {
91
+ key: item.id,
92
+ value: item.value.value,
93
+ label: labelTpl ? safeInterpolate(labelTpl, {}) : "",
94
+ tooltip: tooltipTpl ? safeInterpolate(tooltipTpl, {}) : void 0
95
+ };
96
+ });
97
+ });
98
+ const remoteJson = ref(null);
99
+ const remoteLoading = ref(false);
100
+ let fetchSeq = 0;
101
+ const requestSignature = computed(() => {
102
+ if (props.column.options.kind !== "remote") return null;
103
+ const expr = props.column.options.request;
104
+ if (!expr) return null;
105
+ try {
106
+ const builder = Effect.runSync(
107
+ $cel(expr, { row: row.value, index: rowIndex.value })
108
+ );
109
+ return JSON.stringify(builder.describe());
110
+ } catch {
111
+ return null;
112
+ }
113
+ });
114
+ async function fetchOptions() {
115
+ const seq = ++fetchSeq;
116
+ if (props.column.options.kind !== "remote" || requestSignature.value == null) {
117
+ remoteJson.value = null;
118
+ remoteLoading.value = false;
119
+ return;
120
+ }
121
+ const expr = props.column.options.request;
122
+ remoteLoading.value = true;
123
+ const program = Effect.gen(function* () {
124
+ const builder = yield* $cel(expr, { row: row.value, index: rowIndex.value });
125
+ return yield* builder.json();
126
+ });
127
+ try {
128
+ const result = await Effect.runPromise(Effect.provide(program, sharedFetchLayer));
129
+ if (seq === fetchSeq) remoteJson.value = result;
130
+ } catch {
131
+ if (seq === fetchSeq) remoteJson.value = null;
132
+ } finally {
133
+ if (seq === fetchSeq) remoteLoading.value = false;
134
+ }
135
+ }
136
+ watchDebounced(
137
+ requestSignature,
138
+ () => {
139
+ void fetchOptions();
140
+ },
141
+ { debounce: 200, immediate: true }
142
+ );
143
+ function valueOf(option) {
144
+ if (props.column.options.kind !== "remote") return void 0;
145
+ try {
146
+ return Effect.runSync($cel(props.column.options.optionValue, {
147
+ row: row.value,
148
+ index: rowIndex.value,
149
+ option
150
+ }));
151
+ } catch (e) {
152
+ console.error("[shwfed-table] combobox-multi.remote optionValue failed", e);
153
+ return void 0;
154
+ }
155
+ }
156
+ function labelOf(option) {
157
+ if (props.column.options.kind !== "remote") return "";
158
+ const tpl = getLocalizedText(props.column.options.optionLabel, locale.value) ?? "";
159
+ if (!tpl) return "";
160
+ try {
161
+ return interpolateMarkdown(tpl, $cel, { row: row.value, index: rowIndex.value, option });
162
+ } catch (e) {
163
+ console.error("[shwfed-table] combobox-multi.remote optionLabel failed", e);
164
+ return "";
165
+ }
166
+ }
167
+ const remoteEntries = computed(() => {
168
+ if (props.column.options.kind !== "remote") return [];
169
+ let raw;
170
+ try {
171
+ raw = Effect.runSync($cel(props.column.options.options, {
172
+ row: row.value,
173
+ index: rowIndex.value,
174
+ json: remoteJson.value
175
+ }));
176
+ } catch (e) {
177
+ console.error("[shwfed-table] combobox-multi.remote options failed", e);
178
+ return [];
179
+ }
180
+ if (!Array.isArray(raw)) return [];
181
+ return raw.map((option, idx) => ({
182
+ key: String(idx),
183
+ label: labelOf(option),
184
+ value: valueOf(option)
185
+ }));
186
+ });
187
+ const entries = computed(
188
+ () => props.column.options.kind === "static" ? staticEntries.value : remoteEntries.value
189
+ );
190
+ const isLoading = computed(() => props.column.options.kind === "remote" && remoteLoading.value);
191
+ const cellValue = computed(() => {
192
+ const raw = props.ctx.cell.getValue();
193
+ return Array.isArray(raw) ? raw : [];
194
+ });
195
+ function isEqual(a, b) {
196
+ if (a === b) return true;
197
+ if (a == null || b == null) return false;
198
+ if (typeof a === "object" && typeof b === "object") {
199
+ try {
200
+ return JSON.stringify(a) === JSON.stringify(b);
201
+ } catch {
202
+ return false;
203
+ }
204
+ }
205
+ return false;
206
+ }
207
+ const selectedEntries = computed(() => {
208
+ const list = [];
209
+ for (const v of cellValue.value) {
210
+ const entry = entries.value.find((e) => isEqual(e.value, v));
211
+ if (entry) list.push(entry);
212
+ }
213
+ return list;
214
+ });
215
+ const selectedKeys = computed(() => selectedEntries.value.map((e) => e.key));
216
+ const selectedKeySet = computed(() => new Set(selectedKeys.value));
217
+ const triggerLabel = computed(() => {
218
+ const arr = selectedEntries.value;
219
+ if (arr.length === 0) return "";
220
+ if (arr.length === 1) return arr[0].label;
221
+ return `${arr[0].label} +${arr.length - 1}`;
222
+ });
223
+ const open = ref(false);
224
+ const isDisabled = computed(
225
+ () => !isInteractive.value || isDisabledByConfig.value || pending.value
226
+ );
227
+ async function submit(next) {
228
+ const { onChange, successMessage } = props.column;
229
+ if (!onChange) return;
230
+ pending.value = true;
231
+ const program = Effect.gen(function* () {
232
+ const builder = yield* $cel(onChange, {
233
+ row: row.value,
234
+ index: rowIndex.value,
235
+ value: next
236
+ });
237
+ return yield* builder.json();
238
+ });
239
+ try {
240
+ const body = await Effect.runPromise(Effect.provide(program, Fetch.layer));
241
+ if (successMessage) {
242
+ try {
243
+ const message = Effect.runSync($cel(successMessage, { json: body }));
244
+ if (message) toast.success(message);
245
+ } catch (e) {
246
+ console.error("[shwfed-table] combobox-multi.remote successMessage failed", e);
247
+ }
248
+ }
249
+ await Effect.runPromise(dispatchTriggers(eventChannel, props.column.triggers));
250
+ } catch (e) {
251
+ console.error("[shwfed-table] combobox-multi.remote onChange failed", e);
252
+ toast.error("\u8BF7\u6C42\u5931\u8D25");
253
+ } finally {
254
+ pending.value = false;
255
+ }
256
+ }
257
+ function handleSelect(next) {
258
+ const keys = Array.isArray(next) ? next.filter((k) => typeof k === "string") : [];
259
+ const mapped = [];
260
+ for (const key of keys) {
261
+ const entry = entries.value.find((e) => e.key === key);
262
+ if (entry) mapped.push(entry.value);
263
+ }
264
+ void submit(mapped);
265
+ }
266
+ const showClear = computed(
267
+ () => !isDisabled.value && selectedEntries.value.length > 0
268
+ );
269
+ function handleClear() {
270
+ open.value = false;
271
+ void submit([]);
272
+ }
273
+ const hoveredKey = ref(null);
274
+ watch(open, (isOpen) => {
275
+ hoveredKey.value = isOpen ? entries.value[0]?.key ?? null : null;
276
+ });
277
+ const hoveredEntry = computed(
278
+ () => entries.value.find((e) => e.key === hoveredKey.value)
279
+ );
280
+ const hoveredTooltip = computed(() => hoveredEntry.value?.tooltip);
281
+ const anyHasTooltip = computed(
282
+ () => entries.value.some((e) => e.tooltip != null && e.tooltip.length > 0)
283
+ );
284
+ </script>
285
+
286
+ <template>
287
+ <div class="p-[0.125rem] w-full">
288
+ <span
289
+ v-if="isHidden"
290
+ class="block h-7 w-full"
291
+ />
292
+ <span
293
+ v-else-if="isReadonly || !isInteractive"
294
+ class="flex items-center h-7 w-full px-2 text-[0.75rem] text-zinc-700 truncate"
295
+ >
296
+ {{ triggerLabel || "\u2014" }}
297
+ </span>
298
+ <Popover
299
+ v-else
300
+ v-model:open="open"
301
+ >
302
+ <PopoverAnchor as-child>
303
+ <InputGroup
304
+ class="group/combobox-multi-remote h-7 rounded border-zinc-200/30 hover:border-zinc-200 focus-within:border-zinc-200 transition-colors ease-out duration-180"
305
+ :data-disabled="isDisabled ? 'true' : void 0"
306
+ >
307
+ <PopoverTrigger as-child>
308
+ <InputGroupInput
309
+ :model-value="triggerLabel"
310
+ :disabled="isDisabled"
311
+ :placeholder="placeholderText"
312
+ class="h-7 text-[0.75rem] md:text-[0.75rem] px-2 cursor-pointer text-left"
313
+ readonly
314
+ />
315
+ </PopoverTrigger>
316
+ <InputGroupAddon
317
+ v-if="pending || isLoading"
318
+ align="inline-end"
319
+ class="text-zinc-400"
320
+ >
321
+ <Icon
322
+ icon="fluent:spinner-ios-20-regular"
323
+ class="size-3 animate-spin"
324
+ />
325
+ </InputGroupAddon>
326
+ <InputGroupAddon
327
+ v-else-if="showClear"
328
+ align="inline-end"
329
+ class="[@media(hover:hover)]:opacity-0 transition-opacity group-hover/combobox-multi-remote:opacity-100 focus-within:opacity-100"
330
+ >
331
+ <InputGroupButton
332
+ size="icon-xs"
333
+ data-slot="combobox-multi-remote-clear"
334
+ class="size-4 text-zinc-500 hover:text-zinc-700"
335
+ tabindex="-1"
336
+ @mousedown.prevent
337
+ @click.stop="handleClear"
338
+ >
339
+ <Icon
340
+ icon="fluent:dismiss-20-regular"
341
+ class="size-3"
342
+ />
343
+ </InputGroupButton>
344
+ </InputGroupAddon>
345
+ </InputGroup>
346
+ </PopoverAnchor>
347
+ <PopoverContent
348
+ 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]"
349
+ :style="{ width: 'var(--reka-popover-trigger-width)' }"
350
+ >
351
+ <Command
352
+ :model-value="selectedKeys"
353
+ :multiple="true"
354
+ :disabled="isDisabled"
355
+ @update:model-value="handleSelect"
356
+ >
357
+ <CommandInput :placeholder="t('combobox-multi-search-placeholder')" />
358
+ <CommandList>
359
+ <div
360
+ v-if="entries.length === 0"
361
+ data-slot="combobox-multi-remote-empty"
362
+ class="py-3 text-center text-[0.75rem] text-zinc-500"
363
+ >
364
+ {{ isLoading ? t("combobox-multi-loading") : t("combobox-multi-empty") }}
365
+ </div>
366
+ <template v-else>
367
+ <CommandEmpty class="py-3 text-center text-[0.75rem] text-zinc-500">
368
+ {{ t("combobox-multi-empty") }}
369
+ </CommandEmpty>
370
+ <CommandGroup>
371
+ <CommandItem
372
+ v-for="entry in entries"
373
+ :key="entry.key"
374
+ :value="entry.key"
375
+ @mouseenter="hoveredKey = entry.key"
376
+ @focus="hoveredKey = entry.key"
377
+ >
378
+ <span class="flex-1"><Markdown :source="entry.label" /></span>
379
+ <Icon
380
+ v-if="selectedKeySet.has(entry.key)"
381
+ icon="fluent:checkmark-20-regular"
382
+ class="size-3 text-zinc-700"
383
+ />
384
+ </CommandItem>
385
+ </CommandGroup>
386
+ </template>
387
+ </CommandList>
388
+ <div
389
+ v-if="anyHasTooltip && hoveredTooltip"
390
+ class="border-t border-zinc-200 px-2 py-1.5"
391
+ >
392
+ <Markdown
393
+ :source="hoveredTooltip"
394
+ block
395
+ class="prose prose-xs prose-zinc"
396
+ />
397
+ </div>
398
+ </Command>
399
+ </PopoverContent>
400
+ </Popover>
401
+ </div>
402
+ </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;