@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,129 @@
|
|
|
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 label?: readonly [{
|
|
8
|
+
readonly locale: "zh";
|
|
9
|
+
readonly message: string;
|
|
10
|
+
}, ...{
|
|
11
|
+
readonly locale: "en" | "ja" | "ko";
|
|
12
|
+
readonly message: string;
|
|
13
|
+
}[]] | undefined;
|
|
14
|
+
readonly disabled?: string | undefined;
|
|
15
|
+
readonly type: "com.shwfed.form.field.tree.combobox.multi";
|
|
16
|
+
readonly id: string;
|
|
17
|
+
readonly hidden?: string | undefined;
|
|
18
|
+
readonly tooltip?: readonly [{
|
|
19
|
+
readonly locale: "zh";
|
|
20
|
+
readonly message: string;
|
|
21
|
+
}, ...{
|
|
22
|
+
readonly locale: "en" | "ja" | "ko";
|
|
23
|
+
readonly message: string;
|
|
24
|
+
}[]] | undefined;
|
|
25
|
+
readonly displayName?: string | undefined;
|
|
26
|
+
readonly compatibilityDate: "2026-05-28";
|
|
27
|
+
readonly orientation?: "vertical" | "floating" | 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 keywords?: string | undefined;
|
|
36
|
+
readonly readonly?: string | undefined;
|
|
37
|
+
readonly binding?: string | undefined;
|
|
38
|
+
readonly derived?: {
|
|
39
|
+
readonly mode: "formula" | "prefill";
|
|
40
|
+
readonly expression: string;
|
|
41
|
+
} | undefined;
|
|
42
|
+
readonly dataSource: {
|
|
43
|
+
readonly data: string;
|
|
44
|
+
readonly request?: string | undefined;
|
|
45
|
+
};
|
|
46
|
+
readonly nodeKey: string;
|
|
47
|
+
readonly nodeChildren: string;
|
|
48
|
+
readonly nodeLabel: readonly [{
|
|
49
|
+
readonly locale: "zh";
|
|
50
|
+
readonly message: string;
|
|
51
|
+
}, ...{
|
|
52
|
+
readonly locale: "en" | "ja" | "ko";
|
|
53
|
+
readonly message: string;
|
|
54
|
+
}[]];
|
|
55
|
+
readonly expandAll: boolean;
|
|
56
|
+
readonly cascade: "independent" | "cascade-down" | "cascade-both";
|
|
57
|
+
readonly nodeTooltip?: readonly [{
|
|
58
|
+
readonly locale: "zh";
|
|
59
|
+
readonly message: string;
|
|
60
|
+
}, ...{
|
|
61
|
+
readonly locale: "en" | "ja" | "ko";
|
|
62
|
+
readonly message: string;
|
|
63
|
+
}[]] | undefined;
|
|
64
|
+
readonly nodeSelectable?: string | undefined;
|
|
65
|
+
}) => any;
|
|
66
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
67
|
+
"onUpdate:modelValue"?: ((value: {
|
|
68
|
+
readonly label?: readonly [{
|
|
69
|
+
readonly locale: "zh";
|
|
70
|
+
readonly message: string;
|
|
71
|
+
}, ...{
|
|
72
|
+
readonly locale: "en" | "ja" | "ko";
|
|
73
|
+
readonly message: string;
|
|
74
|
+
}[]] | undefined;
|
|
75
|
+
readonly disabled?: string | undefined;
|
|
76
|
+
readonly type: "com.shwfed.form.field.tree.combobox.multi";
|
|
77
|
+
readonly id: string;
|
|
78
|
+
readonly hidden?: string | undefined;
|
|
79
|
+
readonly tooltip?: readonly [{
|
|
80
|
+
readonly locale: "zh";
|
|
81
|
+
readonly message: string;
|
|
82
|
+
}, ...{
|
|
83
|
+
readonly locale: "en" | "ja" | "ko";
|
|
84
|
+
readonly message: string;
|
|
85
|
+
}[]] | undefined;
|
|
86
|
+
readonly displayName?: string | undefined;
|
|
87
|
+
readonly compatibilityDate: "2026-05-28";
|
|
88
|
+
readonly orientation?: "vertical" | "floating" | undefined;
|
|
89
|
+
readonly placeholder?: readonly [{
|
|
90
|
+
readonly locale: "zh";
|
|
91
|
+
readonly message: string;
|
|
92
|
+
}, ...{
|
|
93
|
+
readonly locale: "en" | "ja" | "ko";
|
|
94
|
+
readonly message: string;
|
|
95
|
+
}[]] | undefined;
|
|
96
|
+
readonly keywords?: string | undefined;
|
|
97
|
+
readonly readonly?: string | undefined;
|
|
98
|
+
readonly binding?: string | undefined;
|
|
99
|
+
readonly derived?: {
|
|
100
|
+
readonly mode: "formula" | "prefill";
|
|
101
|
+
readonly expression: string;
|
|
102
|
+
} | undefined;
|
|
103
|
+
readonly dataSource: {
|
|
104
|
+
readonly data: string;
|
|
105
|
+
readonly request?: string | undefined;
|
|
106
|
+
};
|
|
107
|
+
readonly nodeKey: string;
|
|
108
|
+
readonly nodeChildren: string;
|
|
109
|
+
readonly nodeLabel: readonly [{
|
|
110
|
+
readonly locale: "zh";
|
|
111
|
+
readonly message: string;
|
|
112
|
+
}, ...{
|
|
113
|
+
readonly locale: "en" | "ja" | "ko";
|
|
114
|
+
readonly message: string;
|
|
115
|
+
}[]];
|
|
116
|
+
readonly expandAll: boolean;
|
|
117
|
+
readonly cascade: "independent" | "cascade-down" | "cascade-both";
|
|
118
|
+
readonly nodeTooltip?: readonly [{
|
|
119
|
+
readonly locale: "zh";
|
|
120
|
+
readonly message: string;
|
|
121
|
+
}, ...{
|
|
122
|
+
readonly locale: "en" | "ja" | "ko";
|
|
123
|
+
readonly message: string;
|
|
124
|
+
}[]] | undefined;
|
|
125
|
+
readonly nodeSelectable?: string | undefined;
|
|
126
|
+
}) => any) | undefined;
|
|
127
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
128
|
+
declare const _default: typeof __VLS_export;
|
|
129
|
+
export default _default;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Value } from './schema.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
fieldId: string;
|
|
4
|
+
config: Value;
|
|
5
|
+
};
|
|
6
|
+
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>;
|
|
7
|
+
declare const _default: typeof __VLS_export;
|
|
8
|
+
export default _default;
|
|
@@ -0,0 +1,501 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { Icon } from "@iconify/vue";
|
|
3
|
+
import { Effect, Fiber, Option } from "effect";
|
|
4
|
+
import { Fetch } from "fx-fetch";
|
|
5
|
+
import { computed, ref, shallowRef, watch } from "vue";
|
|
6
|
+
import { useI18n } from "vue-i18n";
|
|
7
|
+
import { cel as _rawCel } from "../../../../../utils/cel";
|
|
8
|
+
import { celBindings, injectCELContext } from "../../../../../utils/cel-context";
|
|
9
|
+
import { getLocalizedText } from "../../../../../share/locale";
|
|
10
|
+
import { Field, FieldLabel } from "../../../../ui/field";
|
|
11
|
+
import { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput } from "../../../../ui/input-group";
|
|
12
|
+
import { Markdown } from "../../../../ui/markdown";
|
|
13
|
+
import { Popover, PopoverAnchor, PopoverContent, PopoverTrigger } from "../../../../ui/popover";
|
|
14
|
+
import { Skeleton } from "../../../../ui/skeleton";
|
|
15
|
+
import { Tree as UiTree } from "../../../../ui/tree";
|
|
16
|
+
import { interpolateMarkdown } from "../../../../table/utils/runtime";
|
|
17
|
+
import { DEFAULT_FIELD_ORIENTATION } from "../../../utils/common";
|
|
18
|
+
import { useFormReadonly } from "../../../utils/readonly";
|
|
19
|
+
import { useFormState } from "../../../utils/state";
|
|
20
|
+
import {
|
|
21
|
+
findWrappedPath,
|
|
22
|
+
getWrappedChildren,
|
|
23
|
+
wrapStructuralAll
|
|
24
|
+
} from "../tree-combobox-shared";
|
|
25
|
+
defineOptions({ name: "ShwfedTreeComboboxMultiFieldRuntime" });
|
|
26
|
+
const props = defineProps({
|
|
27
|
+
fieldId: { type: String, required: true },
|
|
28
|
+
config: { type: null, required: true }
|
|
29
|
+
});
|
|
30
|
+
const { locale, t } = useI18n({
|
|
31
|
+
inheritLocale: true,
|
|
32
|
+
messages: {
|
|
33
|
+
zh: {
|
|
34
|
+
"tree-combobox-multi-placeholder": "\u8BF7\u9009\u62E9",
|
|
35
|
+
"tree-combobox-multi-search-placeholder": "\u641C\u7D22\u2026",
|
|
36
|
+
"tree-combobox-multi-search-clear": "\u6E05\u9664\u641C\u7D22",
|
|
37
|
+
"tree-combobox-multi-empty": "\u65E0\u53EF\u9009\u9879",
|
|
38
|
+
"tree-combobox-multi-load-error": "\u52A0\u8F7D\u5931\u8D25",
|
|
39
|
+
"tree-combobox-multi-retry": "\u91CD\u8BD5",
|
|
40
|
+
"tree-combobox-multi-readonly-empty": "\u2014"
|
|
41
|
+
},
|
|
42
|
+
en: {
|
|
43
|
+
"tree-combobox-multi-placeholder": "Select\u2026",
|
|
44
|
+
"tree-combobox-multi-search-placeholder": "Search\u2026",
|
|
45
|
+
"tree-combobox-multi-search-clear": "Clear search",
|
|
46
|
+
"tree-combobox-multi-empty": "No options",
|
|
47
|
+
"tree-combobox-multi-load-error": "Failed to load",
|
|
48
|
+
"tree-combobox-multi-retry": "Retry",
|
|
49
|
+
"tree-combobox-multi-readonly-empty": "\u2014"
|
|
50
|
+
},
|
|
51
|
+
ja: {
|
|
52
|
+
"tree-combobox-multi-placeholder": "\u9078\u629E\u3057\u3066\u304F\u3060\u3055\u3044",
|
|
53
|
+
"tree-combobox-multi-search-placeholder": "\u691C\u7D22\u2026",
|
|
54
|
+
"tree-combobox-multi-search-clear": "\u691C\u7D22\u3092\u30AF\u30EA\u30A2",
|
|
55
|
+
"tree-combobox-multi-empty": "\u9078\u629E\u80A2\u306A\u3057",
|
|
56
|
+
"tree-combobox-multi-load-error": "\u8AAD\u307F\u8FBC\u307F\u306B\u5931\u6557\u3057\u307E\u3057\u305F",
|
|
57
|
+
"tree-combobox-multi-retry": "\u518D\u8A66\u884C",
|
|
58
|
+
"tree-combobox-multi-readonly-empty": "\u2014"
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
const { state, getAt, setAt } = useFormState();
|
|
63
|
+
const inherited = injectCELContext();
|
|
64
|
+
const $cel = (expression, context) => _rawCel(expression, { ...celBindings(inherited), ...context });
|
|
65
|
+
const labelText = computed(() => getLocalizedText(props.config.label, locale.value));
|
|
66
|
+
const tooltipText = computed(
|
|
67
|
+
() => props.config.tooltip ? getLocalizedText(props.config.tooltip, locale.value) : void 0
|
|
68
|
+
);
|
|
69
|
+
const placeholderText = computed(
|
|
70
|
+
() => props.config.placeholder ? getLocalizedText(props.config.placeholder, locale.value) : t("tree-combobox-multi-placeholder")
|
|
71
|
+
);
|
|
72
|
+
function evalBool(expression, label) {
|
|
73
|
+
if (!expression) return false;
|
|
74
|
+
try {
|
|
75
|
+
return Effect.runSync($cel(expression, { form: state.value ?? {} }));
|
|
76
|
+
} catch (err) {
|
|
77
|
+
console.error(`[shwfed-form] failed to evaluate ${label} for ${props.fieldId}:`, err);
|
|
78
|
+
return false;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
const isDisabled = computed(() => evalBool(props.config.disabled, "disabled"));
|
|
82
|
+
const formReadonly = useFormReadonly();
|
|
83
|
+
const isReadonly = computed(
|
|
84
|
+
() => props.config.readonly != null ? evalBool(props.config.readonly, "readonly") : formReadonly.value
|
|
85
|
+
);
|
|
86
|
+
const effectiveReadonly = computed(() => isReadonly.value || props.config.derived?.mode === "formula");
|
|
87
|
+
const uncontrolled = ref([]);
|
|
88
|
+
const model = computed({
|
|
89
|
+
get: () => {
|
|
90
|
+
const path = props.config.binding;
|
|
91
|
+
const raw = path == null ? uncontrolled.value : getAt(path);
|
|
92
|
+
return Array.isArray(raw) ? raw.map((v) => String(v)) : [];
|
|
93
|
+
},
|
|
94
|
+
set: (next) => {
|
|
95
|
+
const coerced = next.map((v) => String(v));
|
|
96
|
+
const path = props.config.binding;
|
|
97
|
+
if (path == null) {
|
|
98
|
+
uncontrolled.value = coerced;
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
setAt(path, coerced);
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
function nodeCtx(raw) {
|
|
105
|
+
return { form: state.value ?? {}, node: raw };
|
|
106
|
+
}
|
|
107
|
+
function nodeKey(raw) {
|
|
108
|
+
try {
|
|
109
|
+
return String(Effect.runSync($cel(props.config.nodeKey, nodeCtx(raw))));
|
|
110
|
+
} catch (err) {
|
|
111
|
+
console.error(`[shwfed-form] failed to evaluate nodeKey for ${props.fieldId}:`, err);
|
|
112
|
+
return "";
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
function nodeChildrenList(raw) {
|
|
116
|
+
let v;
|
|
117
|
+
try {
|
|
118
|
+
v = Effect.runSync($cel(props.config.nodeChildren, nodeCtx(raw)));
|
|
119
|
+
} catch (err) {
|
|
120
|
+
console.error(`[shwfed-form] failed to evaluate nodeChildren for ${props.fieldId}:`, err);
|
|
121
|
+
return void 0;
|
|
122
|
+
}
|
|
123
|
+
if (v == null) return void 0;
|
|
124
|
+
if (!Array.isArray(v)) return void 0;
|
|
125
|
+
return v;
|
|
126
|
+
}
|
|
127
|
+
function safeInterpolate(tpl, raw) {
|
|
128
|
+
try {
|
|
129
|
+
return interpolateMarkdown(tpl, $cel, nodeCtx(raw));
|
|
130
|
+
} catch (err) {
|
|
131
|
+
console.error(`[shwfed-form] failed to interpolate node text for ${props.fieldId}:`, err);
|
|
132
|
+
return tpl;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
function wrappedLabelText(w) {
|
|
136
|
+
const tpl = getLocalizedText(props.config.nodeLabel, locale.value) ?? "";
|
|
137
|
+
return tpl ? safeInterpolate(tpl, w.raw) : "";
|
|
138
|
+
}
|
|
139
|
+
function wrappedTooltipText(w) {
|
|
140
|
+
if (!props.config.nodeTooltip) return void 0;
|
|
141
|
+
const tpl = getLocalizedText(props.config.nodeTooltip, locale.value);
|
|
142
|
+
return tpl ? safeInterpolate(tpl, w.raw) : void 0;
|
|
143
|
+
}
|
|
144
|
+
function wrappedSelectable(w, _depth) {
|
|
145
|
+
if (isDisabled.value) return false;
|
|
146
|
+
const expr = props.config.nodeSelectable;
|
|
147
|
+
if (!expr) return true;
|
|
148
|
+
try {
|
|
149
|
+
return Effect.runSync($cel(expr, nodeCtx(w.raw)));
|
|
150
|
+
} catch {
|
|
151
|
+
return false;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
function evalKeywords(raw) {
|
|
155
|
+
const expr = props.config.keywords;
|
|
156
|
+
if (!expr) return [];
|
|
157
|
+
try {
|
|
158
|
+
const v = Effect.runSync($cel(expr, nodeCtx(raw)));
|
|
159
|
+
if (!Array.isArray(v)) return [];
|
|
160
|
+
return v.map((k) => String(k));
|
|
161
|
+
} catch {
|
|
162
|
+
return [];
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
const rawRoots = shallowRef([]);
|
|
166
|
+
const loading = ref(false);
|
|
167
|
+
const fetchError = ref(null);
|
|
168
|
+
async function fetchTree() {
|
|
169
|
+
const dataSource = props.config.dataSource;
|
|
170
|
+
if (!dataSource) {
|
|
171
|
+
rawRoots.value = [];
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
const effect = Effect.gen(function* () {
|
|
175
|
+
let jsonOpt = Option.none();
|
|
176
|
+
if (dataSource.request) {
|
|
177
|
+
const builder = yield* $cel(dataSource.request, {
|
|
178
|
+
form: state.value ?? {}
|
|
179
|
+
});
|
|
180
|
+
const response = yield* builder.json();
|
|
181
|
+
jsonOpt = Option.some(response);
|
|
182
|
+
}
|
|
183
|
+
const dataRaw = yield* $cel(dataSource.data, {
|
|
184
|
+
form: state.value ?? {},
|
|
185
|
+
json: jsonOpt
|
|
186
|
+
});
|
|
187
|
+
return Array.isArray(dataRaw) ? dataRaw : [];
|
|
188
|
+
});
|
|
189
|
+
const program = Effect.gen(function* () {
|
|
190
|
+
const showMaskFiber = yield* Effect.fork(
|
|
191
|
+
Effect.sync(() => {
|
|
192
|
+
loading.value = true;
|
|
193
|
+
}).pipe(Effect.delay("30 millis"))
|
|
194
|
+
);
|
|
195
|
+
return yield* Effect.ensuring(effect, Fiber.interrupt(showMaskFiber));
|
|
196
|
+
}).pipe(
|
|
197
|
+
Effect.ensuring(Effect.sync(() => {
|
|
198
|
+
loading.value = false;
|
|
199
|
+
}))
|
|
200
|
+
);
|
|
201
|
+
try {
|
|
202
|
+
const result = await Effect.runPromise(Effect.provide(program, Fetch.layer));
|
|
203
|
+
rawRoots.value = result;
|
|
204
|
+
fetchError.value = null;
|
|
205
|
+
} catch (e) {
|
|
206
|
+
console.warn("[shwfed-form] tree-combobox dataSource fetch failed", e);
|
|
207
|
+
fetchError.value = e;
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
watch(
|
|
211
|
+
() => [props.config.dataSource?.request, props.config.dataSource?.data],
|
|
212
|
+
() => {
|
|
213
|
+
void fetchTree();
|
|
214
|
+
},
|
|
215
|
+
{ immediate: true }
|
|
216
|
+
);
|
|
217
|
+
const roots = computed(
|
|
218
|
+
() => wrapStructuralAll(rawRoots.value, {
|
|
219
|
+
nodeKey,
|
|
220
|
+
nodeChildren: nodeChildrenList
|
|
221
|
+
})
|
|
222
|
+
);
|
|
223
|
+
function labelForKey(k) {
|
|
224
|
+
const path = findWrappedPath(roots.value, k);
|
|
225
|
+
if (!path || path.length === 0) return null;
|
|
226
|
+
const leaf = path[path.length - 1];
|
|
227
|
+
return wrappedLabelText(leaf);
|
|
228
|
+
}
|
|
229
|
+
const triggerLabel = computed(() => {
|
|
230
|
+
const arr = model.value;
|
|
231
|
+
if (arr.length === 0) return "";
|
|
232
|
+
const head = labelForKey(arr[0]);
|
|
233
|
+
if (head === null || head.length === 0) return "";
|
|
234
|
+
if (arr.length === 1) return head;
|
|
235
|
+
return `${head} + ${arr.length - 1}`;
|
|
236
|
+
});
|
|
237
|
+
const initialExpanded = computed(() => {
|
|
238
|
+
if (!props.config.expandAll) return [];
|
|
239
|
+
const out = [];
|
|
240
|
+
const stack = [...roots.value];
|
|
241
|
+
while (stack.length) {
|
|
242
|
+
const n = stack.pop();
|
|
243
|
+
if (n.kind === "branch") {
|
|
244
|
+
out.push(n.key);
|
|
245
|
+
stack.push(...n.children);
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
return out;
|
|
249
|
+
});
|
|
250
|
+
const filterQuery = ref("");
|
|
251
|
+
const searchCorpus = shallowRef(/* @__PURE__ */ new Map());
|
|
252
|
+
watch(
|
|
253
|
+
() => [
|
|
254
|
+
roots.value,
|
|
255
|
+
locale.value,
|
|
256
|
+
props.config.nodeLabel,
|
|
257
|
+
props.config.keywords
|
|
258
|
+
],
|
|
259
|
+
() => {
|
|
260
|
+
const map = /* @__PURE__ */ new Map();
|
|
261
|
+
const stack = [...roots.value];
|
|
262
|
+
while (stack.length) {
|
|
263
|
+
const n = stack.pop();
|
|
264
|
+
const label = wrappedLabelText(n).trim().toLowerCase();
|
|
265
|
+
const kw = evalKeywords(n.raw).map((k) => k.trim().toLowerCase()).join("\n");
|
|
266
|
+
map.set(n.key, kw ? `${label}
|
|
267
|
+
${kw}` : label);
|
|
268
|
+
if (n.kind === "branch") stack.push(...n.children);
|
|
269
|
+
}
|
|
270
|
+
searchCorpus.value = map;
|
|
271
|
+
},
|
|
272
|
+
{ immediate: true }
|
|
273
|
+
);
|
|
274
|
+
function filterPredicate(w, query) {
|
|
275
|
+
const q = query.trim().toLowerCase();
|
|
276
|
+
if (!q) return true;
|
|
277
|
+
const hay = searchCorpus.value.get(w.key);
|
|
278
|
+
if (hay !== void 0) return hay.includes(q);
|
|
279
|
+
return wrappedLabelText(w).trim().toLowerCase().includes(q);
|
|
280
|
+
}
|
|
281
|
+
const open = ref(false);
|
|
282
|
+
function handleUpdate(next) {
|
|
283
|
+
const arr = Array.isArray(next) ? next : [];
|
|
284
|
+
model.value = arr;
|
|
285
|
+
}
|
|
286
|
+
const showClear = computed(
|
|
287
|
+
() => !isDisabled.value && !loading.value && model.value.length > 0
|
|
288
|
+
);
|
|
289
|
+
function handleClear() {
|
|
290
|
+
model.value = [];
|
|
291
|
+
open.value = false;
|
|
292
|
+
}
|
|
293
|
+
const hoveredKey = ref(null);
|
|
294
|
+
watch(open, (isOpen) => {
|
|
295
|
+
if (!isOpen) hoveredKey.value = null;
|
|
296
|
+
});
|
|
297
|
+
function collectTooltipNodes(out, siblings) {
|
|
298
|
+
for (const n of siblings) {
|
|
299
|
+
if (wrappedTooltipText(n)) out.push(n.key);
|
|
300
|
+
if (n.kind === "branch") collectTooltipNodes(out, n.children);
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
const anyHasTooltip = computed(() => {
|
|
304
|
+
if (!props.config.nodeTooltip) return false;
|
|
305
|
+
const out = [];
|
|
306
|
+
collectTooltipNodes(out, roots.value);
|
|
307
|
+
return out.length > 0;
|
|
308
|
+
});
|
|
309
|
+
const hoveredTooltip = computed(() => {
|
|
310
|
+
const k = hoveredKey.value;
|
|
311
|
+
if (!k) return void 0;
|
|
312
|
+
const path = findWrappedPath(roots.value, k);
|
|
313
|
+
if (!path || path.length === 0) return void 0;
|
|
314
|
+
return wrappedTooltipText(path[path.length - 1]);
|
|
315
|
+
});
|
|
316
|
+
</script>
|
|
317
|
+
|
|
318
|
+
<template>
|
|
319
|
+
<Field
|
|
320
|
+
:orientation="config.orientation ?? DEFAULT_FIELD_ORIENTATION"
|
|
321
|
+
:data-disabled="isDisabled || void 0"
|
|
322
|
+
>
|
|
323
|
+
<FieldLabel
|
|
324
|
+
v-if="labelText"
|
|
325
|
+
:for="fieldId"
|
|
326
|
+
class="text-xs text-zinc-500"
|
|
327
|
+
>
|
|
328
|
+
<template
|
|
329
|
+
v-if="tooltipText"
|
|
330
|
+
#tooltip
|
|
331
|
+
>
|
|
332
|
+
<Markdown
|
|
333
|
+
:source="tooltipText"
|
|
334
|
+
class="prose prose-xs prose-zinc"
|
|
335
|
+
/>
|
|
336
|
+
</template>
|
|
337
|
+
{{ labelText }}
|
|
338
|
+
</FieldLabel>
|
|
339
|
+
|
|
340
|
+
<div
|
|
341
|
+
v-if="effectiveReadonly"
|
|
342
|
+
class="min-h-9 py-1.5 text-sm text-zinc-700"
|
|
343
|
+
>
|
|
344
|
+
{{ triggerLabel || t("tree-combobox-multi-readonly-empty") }}
|
|
345
|
+
</div>
|
|
346
|
+
|
|
347
|
+
<Popover
|
|
348
|
+
v-else
|
|
349
|
+
v-model:open="open"
|
|
350
|
+
>
|
|
351
|
+
<PopoverAnchor as-child>
|
|
352
|
+
<InputGroup
|
|
353
|
+
class="group/tree-combobox-multi"
|
|
354
|
+
:data-disabled="isDisabled ? 'true' : void 0"
|
|
355
|
+
>
|
|
356
|
+
<PopoverTrigger as-child>
|
|
357
|
+
<InputGroupInput
|
|
358
|
+
:id="fieldId"
|
|
359
|
+
:model-value="triggerLabel"
|
|
360
|
+
:disabled="isDisabled"
|
|
361
|
+
:placeholder="placeholderText"
|
|
362
|
+
class="cursor-pointer text-left"
|
|
363
|
+
readonly
|
|
364
|
+
/>
|
|
365
|
+
</PopoverTrigger>
|
|
366
|
+
<InputGroupAddon
|
|
367
|
+
v-if="loading"
|
|
368
|
+
align="inline-end"
|
|
369
|
+
data-slot="tree-combobox-multi-loading"
|
|
370
|
+
class="text-zinc-400"
|
|
371
|
+
>
|
|
372
|
+
<Icon
|
|
373
|
+
icon="fluent:spinner-ios-20-regular"
|
|
374
|
+
class="animate-spin"
|
|
375
|
+
/>
|
|
376
|
+
</InputGroupAddon>
|
|
377
|
+
<InputGroupAddon
|
|
378
|
+
v-else-if="showClear"
|
|
379
|
+
align="inline-end"
|
|
380
|
+
class="[@media(hover:hover)]:opacity-0 transition-opacity group-hover/tree-combobox-multi:opacity-100 focus-within:opacity-100"
|
|
381
|
+
>
|
|
382
|
+
<InputGroupButton
|
|
383
|
+
size="icon-xs"
|
|
384
|
+
data-slot="tree-combobox-multi-clear"
|
|
385
|
+
class="text-zinc-500 hover:text-zinc-700"
|
|
386
|
+
tabindex="-1"
|
|
387
|
+
@mousedown.prevent
|
|
388
|
+
@click.stop="handleClear"
|
|
389
|
+
>
|
|
390
|
+
<Icon icon="fluent:dismiss-20-regular" />
|
|
391
|
+
</InputGroupButton>
|
|
392
|
+
</InputGroupAddon>
|
|
393
|
+
</InputGroup>
|
|
394
|
+
</PopoverAnchor>
|
|
395
|
+
<PopoverContent
|
|
396
|
+
class="p-0"
|
|
397
|
+
:style="{ width: 'var(--reka-popover-trigger-width)' }"
|
|
398
|
+
>
|
|
399
|
+
<div
|
|
400
|
+
data-slot="tree-combobox-multi-search"
|
|
401
|
+
class="flex h-9 items-center gap-2 border-b border-zinc-200 px-3"
|
|
402
|
+
>
|
|
403
|
+
<Icon
|
|
404
|
+
icon="fluent:search-20-filled"
|
|
405
|
+
class="size-3.5 shrink-0 opacity-50"
|
|
406
|
+
/>
|
|
407
|
+
<input
|
|
408
|
+
v-model="filterQuery"
|
|
409
|
+
:disabled="isDisabled"
|
|
410
|
+
:placeholder="t('tree-combobox-multi-search-placeholder')"
|
|
411
|
+
class="flex h-9 w-full bg-transparent text-sm outline-hidden placeholder:text-zinc-500 disabled:cursor-not-allowed disabled:opacity-50"
|
|
412
|
+
>
|
|
413
|
+
</div>
|
|
414
|
+
<div class="flex flex-col p-1">
|
|
415
|
+
<div
|
|
416
|
+
v-if="fetchError && roots.length === 0"
|
|
417
|
+
class="min-h-9 px-2 py-1.5 text-sm text-red-500"
|
|
418
|
+
>
|
|
419
|
+
{{ t("tree-combobox-multi-load-error") }}
|
|
420
|
+
</div>
|
|
421
|
+
<div
|
|
422
|
+
v-else-if="loading && roots.length === 0"
|
|
423
|
+
class="flex flex-col gap-1.5 px-2 py-1"
|
|
424
|
+
aria-busy="true"
|
|
425
|
+
>
|
|
426
|
+
<Skeleton class="h-5 w-2/3" />
|
|
427
|
+
<Skeleton class="h-5 w-1/2" />
|
|
428
|
+
<Skeleton class="h-5 w-3/5" />
|
|
429
|
+
</div>
|
|
430
|
+
|
|
431
|
+
<UiTree
|
|
432
|
+
v-else
|
|
433
|
+
:roots="roots"
|
|
434
|
+
:get-key="(w) => w.key"
|
|
435
|
+
:get-children="getWrappedChildren"
|
|
436
|
+
selection-mode="multi"
|
|
437
|
+
:cascade="config.cascade ?? 'independent'"
|
|
438
|
+
:model-value="model"
|
|
439
|
+
:selectable="wrappedSelectable"
|
|
440
|
+
:filter-predicate="filterPredicate"
|
|
441
|
+
:filter-query="filterQuery"
|
|
442
|
+
:initial-expanded="initialExpanded"
|
|
443
|
+
:show-focused-row="false"
|
|
444
|
+
:class="isDisabled ? 'pointer-events-none opacity-60' : void 0"
|
|
445
|
+
class="max-h-72 overflow-y-auto"
|
|
446
|
+
@update:model-value="handleUpdate"
|
|
447
|
+
>
|
|
448
|
+
<template #node="{ node, selected }">
|
|
449
|
+
<span
|
|
450
|
+
class="flex flex-1 min-w-0 items-center justify-between gap-2"
|
|
451
|
+
@mouseenter="hoveredKey = node.key"
|
|
452
|
+
@focusin="hoveredKey = node.key"
|
|
453
|
+
>
|
|
454
|
+
<Markdown
|
|
455
|
+
:source="wrappedLabelText(node)"
|
|
456
|
+
class="prose prose-sm prose-zinc text-zinc-700 min-w-0"
|
|
457
|
+
/>
|
|
458
|
+
<Icon
|
|
459
|
+
v-if="selected"
|
|
460
|
+
icon="fluent:checkmark-20-regular"
|
|
461
|
+
class="size-3 shrink-0 text-zinc-700"
|
|
462
|
+
/>
|
|
463
|
+
</span>
|
|
464
|
+
</template>
|
|
465
|
+
|
|
466
|
+
<template #empty>
|
|
467
|
+
<div class="min-h-9 px-2 py-1.5 text-sm text-zinc-400">
|
|
468
|
+
{{ t("tree-combobox-multi-empty") }}
|
|
469
|
+
</div>
|
|
470
|
+
</template>
|
|
471
|
+
|
|
472
|
+
<template #error="{ error, retry }">
|
|
473
|
+
<span class="inline-flex items-center gap-1 text-xs text-red-500">
|
|
474
|
+
{{ t("tree-combobox-multi-load-error") }}
|
|
475
|
+
<button
|
|
476
|
+
type="button"
|
|
477
|
+
class="underline hover:text-red-600"
|
|
478
|
+
@click.stop="retry"
|
|
479
|
+
>
|
|
480
|
+
{{ t("tree-combobox-multi-retry") }}
|
|
481
|
+
</button>
|
|
482
|
+
<span class="sr-only">{{ String(error) }}</span>
|
|
483
|
+
</span>
|
|
484
|
+
</template>
|
|
485
|
+
</UiTree>
|
|
486
|
+
</div>
|
|
487
|
+
<div
|
|
488
|
+
v-if="anyHasTooltip && hoveredTooltip"
|
|
489
|
+
data-slot="tree-combobox-multi-tooltip"
|
|
490
|
+
class="border-t border-zinc-200 px-3 py-2"
|
|
491
|
+
>
|
|
492
|
+
<Markdown
|
|
493
|
+
:source="hoveredTooltip"
|
|
494
|
+
block
|
|
495
|
+
class="prose prose-sm prose-zinc"
|
|
496
|
+
/>
|
|
497
|
+
</div>
|
|
498
|
+
</PopoverContent>
|
|
499
|
+
</Popover>
|
|
500
|
+
</Field>
|
|
501
|
+
</template>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Value } from './schema.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
fieldId: string;
|
|
4
|
+
config: Value;
|
|
5
|
+
};
|
|
6
|
+
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>;
|
|
7
|
+
declare const _default: typeof __VLS_export;
|
|
8
|
+
export default _default;
|