@shwfed/config 2.8.0 → 2.9.1
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 +65 -10
- package/dist/module.json +1 -1
- package/dist/preview/assets/{badge-BI1mdo92.js → badge-BFb-1pCT.js} +1 -1
- package/dist/preview/assets/config-0DneC44h.js +1 -0
- package/dist/preview/assets/{config-OrJljNWU.js → config-ByZ0313c.js} +1 -1
- package/dist/preview/assets/config-CBypmimA.js +1 -0
- package/dist/preview/assets/config-CRxO6DVD.js +1 -0
- package/dist/preview/assets/config-CgGwKTMB.js +1 -0
- package/dist/preview/assets/{config-DuzQXHvg.js → config-DFaQa_Ua.js} +1 -1
- package/dist/preview/assets/{config-XgVqueyq.js → config-DlA3bMzk.js} +1 -1
- package/dist/preview/assets/{config-DqUnpWZk.js → config-iysOo1dH.js} +1 -1
- package/dist/preview/assets/config-rr6HpsHl.js +1 -0
- package/dist/preview/assets/{definition.vue_vue_type_script_setup_true_lang-lEhYVEcN.js → definition.vue_vue_type_script_setup_true_lang-C1MSczMq.js} +1 -1
- package/dist/preview/assets/index-BlHAyQdm.css +1 -0
- package/dist/preview/assets/index-CLQQPdxj.js +1 -0
- package/dist/preview/assets/index-CpLuDJe9.js +688 -0
- package/dist/preview/assets/{index-BvLLQuQr.js → index-CuSwhbkD.js} +1 -1
- package/dist/preview/assets/{item-DMtXi_cx.js → item-iBF7XNGG.js} +1 -1
- package/dist/preview/assets/{runtime-wVZ1xP8L.js → runtime-BPK6zdoy.js} +1 -1
- package/dist/preview/assets/runtime-BmED451i.js +1 -0
- package/dist/preview/assets/{runtime-CjJBU_e1.js → runtime-CPiaq4_s.js} +1 -1
- package/dist/preview/assets/{runtime-CWqQzWuc.js → runtime-CY9TirG6.js} +1 -1
- package/dist/preview/assets/{runtime-CA58Mif7.js → runtime-D4WPJrz9.js} +1 -1
- package/dist/preview/assets/runtime-DrKKzpjq.js +1 -0
- package/dist/preview/assets/{runtime-DnXoWy2A.js → runtime-S7Afa8F4.js} +1 -1
- package/dist/preview/assets/{runtime-DeUmGsM_.js → runtime-Uz1zCLPO.js} +1 -1
- package/dist/preview/assets/{runtime-BUPuX-Gq.js → runtime-XjumEj6A.js} +1 -1
- package/dist/preview/index.html +2 -2
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json/config.d.vue.ts +8 -0
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json/config.vue +28 -0
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json/config.vue.d.ts +8 -0
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json/runtime.vue +17 -17
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json/schema.d.ts +4 -0
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json/schema.js +8 -0
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json.confirm/config.d.vue.ts +8 -0
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json.confirm/config.vue +25 -0
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json.confirm/config.vue.d.ts +8 -0
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json.confirm/runtime.vue +2 -7
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json.confirm/schema.d.ts +4 -0
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json.confirm/schema.js +8 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/config.d.vue.ts +16 -16
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/config.vue.d.ts +16 -16
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.d.vue.ts +18 -18
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.vue.d.ts +18 -18
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/config.d.vue.ts +16 -16
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/config.vue.d.ts +16 -16
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.d.vue.ts +18 -18
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.vue.d.ts +18 -18
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/config.d.vue.ts +16 -16
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/config.vue.d.ts +16 -16
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/config.d.vue.ts +18 -18
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/config.vue.d.ts +18 -18
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/runtime.vue +13 -2
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/schema.d.ts +1 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/schema.js +4 -1
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/runtime.vue +10 -2
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/schema.d.ts +1 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/schema.js +4 -1
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/runtime.vue +20 -4
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/schema.d.ts +1 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/schema.js +4 -1
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/runtime.vue +17 -9
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/schema.d.ts +1 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/schema.js +4 -1
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/runtime.vue +25 -5
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/schema.d.ts +1 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/schema.js +4 -1
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/runtime.vue +18 -8
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/schema.d.ts +1 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/schema.js +4 -1
- package/dist/runtime/components/form/index.vue +11 -3
- package/dist/runtime/components/form/schema.d.ts +4 -0
- package/dist/runtime/components/form/schema.js +1 -0
- package/dist/runtime/components/form/unit-config.vue +6 -1
- package/dist/runtime/components/form/utils/form-vars.js +2 -0
- package/dist/runtime/components/form/utils/resolve.d.ts +10 -0
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-static/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-static/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single.remote/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single.remote/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/runtime.vue +13 -2
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/schema.js +4 -1
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/runtime.vue +10 -2
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/schema.js +4 -1
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/runtime.vue +16 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/schema.js +3 -1
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/runtime.vue +13 -5
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/schema.js +3 -1
- package/dist/runtime/components/table/config.vue +5 -1
- package/dist/runtime/components/table/row-provider.vue +8 -0
- package/dist/runtime/components/table/utils/resolve.d.ts +7 -0
- package/dist/runtime/components/table/utils/shared.js +4 -0
- package/dist/runtime/components/ui/expression-editor/CodeMirrorInput.d.vue.ts +1 -0
- package/dist/runtime/components/ui/expression-editor/CodeMirrorInput.vue +9 -1
- package/dist/runtime/components/ui/expression-editor/CodeMirrorInput.vue.d.ts +1 -0
- package/dist/runtime/components/ui/expression-editor/ExpressionEditor.d.vue.ts +2 -2
- package/dist/runtime/components/ui/expression-editor/ExpressionEditor.vue +33 -4
- package/dist/runtime/components/ui/expression-editor/ExpressionEditor.vue.d.ts +2 -2
- package/dist/runtime/components/ui/expression-editor/picker-entries.d.ts +3 -2
- package/dist/runtime/components/ui/expression-editor/picker-entries.js +14 -3
- package/dist/runtime/components/ui/expression-editor/selection-chip-extension.d.ts +4 -0
- package/dist/runtime/components/ui/expression-editor/selection-chip-extension.js +119 -0
- package/dist/runtime/components/ui/expression-editor/selection-refs.d.ts +8 -0
- package/dist/runtime/components/ui/expression-editor/selection-refs.js +29 -0
- package/dist/runtime/share/event-bus.d.ts +12 -12
- package/dist/runtime/utils/cel-context.d.ts +22 -0
- package/dist/runtime/utils/cel-context.js +8 -0
- package/dist/runtime/utils/selections-registry.d.ts +77 -0
- package/dist/runtime/utils/selections-registry.js +49 -0
- package/dist/runtime/vendor/cel-js/CLAUDE.md +2 -0
- package/dist/runtime/vendor/cel-js/PROMPT.md +8 -0
- package/dist/runtime/vendor/cel-js/lib/functions.js +4 -0
- package/package.json +1 -1
- package/dist/preview/assets/config-BNF2r9jW.js +0 -1
- package/dist/preview/assets/config-BxuGYvER.js +0 -1
- package/dist/preview/assets/config-Cy5w3JWQ.js +0 -1
- package/dist/preview/assets/config-Du5SuNSb.js +0 -1
- package/dist/preview/assets/config-ggyCcWNZ.js +0 -1
- package/dist/preview/assets/index-DsMR5NfK.css +0 -1
- package/dist/preview/assets/index-Yv78vz4W.js +0 -680
- package/dist/preview/assets/index-yrBKwEfk.js +0 -1
- package/dist/preview/assets/runtime-2S3Yr051.js +0 -1
- package/dist/preview/assets/runtime-C4jFTZ4Z.js +0 -1
- package/dist/runtime/share/form-validate.d.ts +0 -18
- package/dist/runtime/share/form-validate.js +0 -8
package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/config.vue.d.ts
CHANGED
|
@@ -41,27 +41,27 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
41
41
|
} | undefined;
|
|
42
42
|
readonly format?: string | undefined;
|
|
43
43
|
readonly valueFormat?: string | undefined;
|
|
44
|
-
readonly
|
|
45
|
-
readonly
|
|
44
|
+
readonly presets?: readonly {
|
|
45
|
+
readonly label: readonly [{
|
|
46
46
|
readonly locale: "zh";
|
|
47
47
|
readonly message: string;
|
|
48
48
|
}, ...{
|
|
49
49
|
readonly locale: "en" | "ja" | "ko";
|
|
50
50
|
readonly message: string;
|
|
51
51
|
}[]];
|
|
52
|
-
readonly
|
|
53
|
-
readonly
|
|
52
|
+
readonly id: string;
|
|
53
|
+
readonly value: string;
|
|
54
54
|
}[] | undefined;
|
|
55
|
-
readonly
|
|
56
|
-
readonly
|
|
55
|
+
readonly validations?: readonly {
|
|
56
|
+
readonly message: readonly [{
|
|
57
57
|
readonly locale: "zh";
|
|
58
58
|
readonly message: string;
|
|
59
59
|
}, ...{
|
|
60
60
|
readonly locale: "en" | "ja" | "ko";
|
|
61
61
|
readonly message: string;
|
|
62
62
|
}[]];
|
|
63
|
-
readonly
|
|
64
|
-
readonly
|
|
63
|
+
readonly warning?: boolean | undefined;
|
|
64
|
+
readonly when: string;
|
|
65
65
|
}[] | undefined;
|
|
66
66
|
}) => any;
|
|
67
67
|
}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
@@ -103,27 +103,27 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
103
103
|
} | undefined;
|
|
104
104
|
readonly format?: string | undefined;
|
|
105
105
|
readonly valueFormat?: string | undefined;
|
|
106
|
-
readonly
|
|
107
|
-
readonly
|
|
106
|
+
readonly presets?: readonly {
|
|
107
|
+
readonly label: readonly [{
|
|
108
108
|
readonly locale: "zh";
|
|
109
109
|
readonly message: string;
|
|
110
110
|
}, ...{
|
|
111
111
|
readonly locale: "en" | "ja" | "ko";
|
|
112
112
|
readonly message: string;
|
|
113
113
|
}[]];
|
|
114
|
-
readonly
|
|
115
|
-
readonly
|
|
114
|
+
readonly id: string;
|
|
115
|
+
readonly value: string;
|
|
116
116
|
}[] | undefined;
|
|
117
|
-
readonly
|
|
118
|
-
readonly
|
|
117
|
+
readonly validations?: readonly {
|
|
118
|
+
readonly message: readonly [{
|
|
119
119
|
readonly locale: "zh";
|
|
120
120
|
readonly message: string;
|
|
121
121
|
}, ...{
|
|
122
122
|
readonly locale: "en" | "ja" | "ko";
|
|
123
123
|
readonly message: string;
|
|
124
124
|
}[]];
|
|
125
|
-
readonly
|
|
126
|
-
readonly
|
|
125
|
+
readonly warning?: boolean | undefined;
|
|
126
|
+
readonly when: string;
|
|
127
127
|
}[] | undefined;
|
|
128
128
|
}) => any) | undefined;
|
|
129
129
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -49,28 +49,28 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
49
49
|
readonly locale: "en" | "ja" | "ko";
|
|
50
50
|
readonly message: string;
|
|
51
51
|
}[]] | undefined;
|
|
52
|
-
readonly
|
|
53
|
-
readonly
|
|
52
|
+
readonly presets?: readonly {
|
|
53
|
+
readonly label: readonly [{
|
|
54
54
|
readonly locale: "zh";
|
|
55
55
|
readonly message: string;
|
|
56
56
|
}, ...{
|
|
57
57
|
readonly locale: "en" | "ja" | "ko";
|
|
58
58
|
readonly message: string;
|
|
59
59
|
}[]];
|
|
60
|
-
readonly
|
|
61
|
-
readonly
|
|
60
|
+
readonly id: string;
|
|
61
|
+
readonly end: string;
|
|
62
|
+
readonly start: string;
|
|
62
63
|
}[] | undefined;
|
|
63
|
-
readonly
|
|
64
|
-
readonly
|
|
64
|
+
readonly validations?: readonly {
|
|
65
|
+
readonly message: readonly [{
|
|
65
66
|
readonly locale: "zh";
|
|
66
67
|
readonly message: string;
|
|
67
68
|
}, ...{
|
|
68
69
|
readonly locale: "en" | "ja" | "ko";
|
|
69
70
|
readonly message: string;
|
|
70
71
|
}[]];
|
|
71
|
-
readonly
|
|
72
|
-
readonly
|
|
73
|
-
readonly start: string;
|
|
72
|
+
readonly warning?: boolean | undefined;
|
|
73
|
+
readonly when: string;
|
|
74
74
|
}[] | undefined;
|
|
75
75
|
}) => any;
|
|
76
76
|
}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
@@ -120,28 +120,28 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
120
120
|
readonly locale: "en" | "ja" | "ko";
|
|
121
121
|
readonly message: string;
|
|
122
122
|
}[]] | undefined;
|
|
123
|
-
readonly
|
|
124
|
-
readonly
|
|
123
|
+
readonly presets?: readonly {
|
|
124
|
+
readonly label: readonly [{
|
|
125
125
|
readonly locale: "zh";
|
|
126
126
|
readonly message: string;
|
|
127
127
|
}, ...{
|
|
128
128
|
readonly locale: "en" | "ja" | "ko";
|
|
129
129
|
readonly message: string;
|
|
130
130
|
}[]];
|
|
131
|
-
readonly
|
|
132
|
-
readonly
|
|
131
|
+
readonly id: string;
|
|
132
|
+
readonly end: string;
|
|
133
|
+
readonly start: string;
|
|
133
134
|
}[] | undefined;
|
|
134
|
-
readonly
|
|
135
|
-
readonly
|
|
135
|
+
readonly validations?: readonly {
|
|
136
|
+
readonly message: readonly [{
|
|
136
137
|
readonly locale: "zh";
|
|
137
138
|
readonly message: string;
|
|
138
139
|
}, ...{
|
|
139
140
|
readonly locale: "en" | "ja" | "ko";
|
|
140
141
|
readonly message: string;
|
|
141
142
|
}[]];
|
|
142
|
-
readonly
|
|
143
|
-
readonly
|
|
144
|
-
readonly start: string;
|
|
143
|
+
readonly warning?: boolean | undefined;
|
|
144
|
+
readonly when: string;
|
|
145
145
|
}[] | undefined;
|
|
146
146
|
}) => any) | undefined;
|
|
147
147
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -49,28 +49,28 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
49
49
|
readonly locale: "en" | "ja" | "ko";
|
|
50
50
|
readonly message: string;
|
|
51
51
|
}[]] | undefined;
|
|
52
|
-
readonly
|
|
53
|
-
readonly
|
|
52
|
+
readonly presets?: readonly {
|
|
53
|
+
readonly label: readonly [{
|
|
54
54
|
readonly locale: "zh";
|
|
55
55
|
readonly message: string;
|
|
56
56
|
}, ...{
|
|
57
57
|
readonly locale: "en" | "ja" | "ko";
|
|
58
58
|
readonly message: string;
|
|
59
59
|
}[]];
|
|
60
|
-
readonly
|
|
61
|
-
readonly
|
|
60
|
+
readonly id: string;
|
|
61
|
+
readonly end: string;
|
|
62
|
+
readonly start: string;
|
|
62
63
|
}[] | undefined;
|
|
63
|
-
readonly
|
|
64
|
-
readonly
|
|
64
|
+
readonly validations?: readonly {
|
|
65
|
+
readonly message: readonly [{
|
|
65
66
|
readonly locale: "zh";
|
|
66
67
|
readonly message: string;
|
|
67
68
|
}, ...{
|
|
68
69
|
readonly locale: "en" | "ja" | "ko";
|
|
69
70
|
readonly message: string;
|
|
70
71
|
}[]];
|
|
71
|
-
readonly
|
|
72
|
-
readonly
|
|
73
|
-
readonly start: string;
|
|
72
|
+
readonly warning?: boolean | undefined;
|
|
73
|
+
readonly when: string;
|
|
74
74
|
}[] | undefined;
|
|
75
75
|
}) => any;
|
|
76
76
|
}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
@@ -120,28 +120,28 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
120
120
|
readonly locale: "en" | "ja" | "ko";
|
|
121
121
|
readonly message: string;
|
|
122
122
|
}[]] | undefined;
|
|
123
|
-
readonly
|
|
124
|
-
readonly
|
|
123
|
+
readonly presets?: readonly {
|
|
124
|
+
readonly label: readonly [{
|
|
125
125
|
readonly locale: "zh";
|
|
126
126
|
readonly message: string;
|
|
127
127
|
}, ...{
|
|
128
128
|
readonly locale: "en" | "ja" | "ko";
|
|
129
129
|
readonly message: string;
|
|
130
130
|
}[]];
|
|
131
|
-
readonly
|
|
132
|
-
readonly
|
|
131
|
+
readonly id: string;
|
|
132
|
+
readonly end: string;
|
|
133
|
+
readonly start: string;
|
|
133
134
|
}[] | undefined;
|
|
134
|
-
readonly
|
|
135
|
-
readonly
|
|
135
|
+
readonly validations?: readonly {
|
|
136
|
+
readonly message: readonly [{
|
|
136
137
|
readonly locale: "zh";
|
|
137
138
|
readonly message: string;
|
|
138
139
|
}, ...{
|
|
139
140
|
readonly locale: "en" | "ja" | "ko";
|
|
140
141
|
readonly message: string;
|
|
141
142
|
}[]];
|
|
142
|
-
readonly
|
|
143
|
-
readonly
|
|
144
|
-
readonly start: string;
|
|
143
|
+
readonly warning?: boolean | undefined;
|
|
144
|
+
readonly when: string;
|
|
145
145
|
}[] | undefined;
|
|
146
146
|
}) => any) | undefined;
|
|
147
147
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -8,6 +8,7 @@ import { useI18n } from "vue-i18n";
|
|
|
8
8
|
import { asRequest, fetchJsonOption } from "../../../../../share/request";
|
|
9
9
|
import { cel as _rawCel } from "../../../../../utils/cel";
|
|
10
10
|
import { celBindings, injectCELContext } from "../../../../../utils/cel-context";
|
|
11
|
+
import { publishSelection } from "../../../../../utils/selections-registry";
|
|
11
12
|
import { interpolateMarkdown } from "../../../../table/utils/runtime";
|
|
12
13
|
import { getLocalizedText } from "../../../../../share/locale";
|
|
13
14
|
import {
|
|
@@ -178,7 +179,8 @@ const entries = computed(() => {
|
|
|
178
179
|
key: item.id,
|
|
179
180
|
value: item.value.value,
|
|
180
181
|
label: labelTpl ? safeInterpolate(labelTpl, ctx) : "",
|
|
181
|
-
keywords: kw.length > 0 ? kw : void 0
|
|
182
|
+
keywords: kw.length > 0 ? kw : void 0,
|
|
183
|
+
raw: item
|
|
182
184
|
};
|
|
183
185
|
});
|
|
184
186
|
}
|
|
@@ -194,7 +196,8 @@ const entries = computed(() => {
|
|
|
194
196
|
key: String(idx),
|
|
195
197
|
value: remoteValueOf(option),
|
|
196
198
|
label: remoteLabelOf(option),
|
|
197
|
-
keywords: remoteKeywordsOf(option)
|
|
199
|
+
keywords: remoteKeywordsOf(option),
|
|
200
|
+
raw: option
|
|
198
201
|
}));
|
|
199
202
|
});
|
|
200
203
|
const uncontrolled = ref([]);
|
|
@@ -243,6 +246,14 @@ const selectedEntries = computed(() => {
|
|
|
243
246
|
});
|
|
244
247
|
const selectedKeys = computed(() => selectedEntries.value.map((e) => e.key));
|
|
245
248
|
const selectedKeySet = computed(() => new Set(selectedKeys.value));
|
|
249
|
+
publishSelection(
|
|
250
|
+
props.fieldId,
|
|
251
|
+
() => selectedEntries.value.length > 0 ? selectedEntries.value : void 0,
|
|
252
|
+
{
|
|
253
|
+
identity: (list) => list.map((e) => e.key).join("\0"),
|
|
254
|
+
raw: (list) => list.map((e) => e.raw)
|
|
255
|
+
}
|
|
256
|
+
);
|
|
246
257
|
const triggerLabel = computed(() => {
|
|
247
258
|
const arr = selectedEntries.value;
|
|
248
259
|
if (arr.length === 0) return "";
|
|
@@ -8,7 +8,10 @@ export const metadata = {
|
|
|
8
8
|
name: "\u4E0B\u62C9\u591A\u9009",
|
|
9
9
|
icon: "fluent:chevron-down-20-regular",
|
|
10
10
|
w: { initial: 8, min: 4, max: Infinity },
|
|
11
|
-
h: { initial: 2, min: 2, max: 2 }
|
|
11
|
+
h: { initial: 2, min: 2, max: 2 },
|
|
12
|
+
// Publishes its resolved options (array, in selection order) to the
|
|
13
|
+
// `selections` registry (runtime.vue), readable via `selections["<id>"]`.
|
|
14
|
+
selection: true
|
|
12
15
|
};
|
|
13
16
|
const isListType = (actual) => actual === "dyn" || actual.startsWith("list") || actual.startsWith("optional");
|
|
14
17
|
function configureWithOption(configure) {
|
|
@@ -8,6 +8,7 @@ import { useI18n } from "vue-i18n";
|
|
|
8
8
|
import { asRequest, fetchJsonOption } from "../../../../../share/request";
|
|
9
9
|
import { cel as _rawCel } from "../../../../../utils/cel";
|
|
10
10
|
import { celBindings, injectCELContext } from "../../../../../utils/cel-context";
|
|
11
|
+
import { publishSelection } from "../../../../../utils/selections-registry";
|
|
11
12
|
import { interpolateMarkdown } from "../../../../table/utils/runtime";
|
|
12
13
|
import { getLocalizedText } from "../../../../../share/locale";
|
|
13
14
|
import {
|
|
@@ -180,7 +181,8 @@ const entries = computed(() => {
|
|
|
180
181
|
value: item.value.value,
|
|
181
182
|
label: labelTpl ? safeInterpolate(labelTpl, ctx) : "",
|
|
182
183
|
tooltip: tooltipTpl ? safeInterpolate(tooltipTpl, ctx) : void 0,
|
|
183
|
-
keywords: kw.length > 0 ? kw : void 0
|
|
184
|
+
keywords: kw.length > 0 ? kw : void 0,
|
|
185
|
+
raw: item
|
|
184
186
|
};
|
|
185
187
|
});
|
|
186
188
|
}
|
|
@@ -196,7 +198,8 @@ const entries = computed(() => {
|
|
|
196
198
|
key: String(idx),
|
|
197
199
|
value: remoteValueOf(option),
|
|
198
200
|
label: remoteLabelOf(option),
|
|
199
|
-
keywords: remoteKeywordsOf(option)
|
|
201
|
+
keywords: remoteKeywordsOf(option),
|
|
202
|
+
raw: option
|
|
200
203
|
}));
|
|
201
204
|
});
|
|
202
205
|
const uncontrolled = ref(void 0);
|
|
@@ -246,6 +249,11 @@ const selectedEntry = computed(
|
|
|
246
249
|
);
|
|
247
250
|
const selectedKey = computed(() => selectedEntry.value?.key);
|
|
248
251
|
const selectedLabel = computed(() => selectedEntry.value?.label ?? "");
|
|
252
|
+
publishSelection(
|
|
253
|
+
props.fieldId,
|
|
254
|
+
() => selectedEntry.value,
|
|
255
|
+
{ identity: (entry) => entry.key, raw: (entry) => entry.raw }
|
|
256
|
+
);
|
|
249
257
|
const open = ref(false);
|
|
250
258
|
function handleSelect(key) {
|
|
251
259
|
if (typeof key !== "string") return;
|
|
@@ -8,7 +8,10 @@ export const metadata = {
|
|
|
8
8
|
name: "\u4E0B\u62C9\u5355\u9009",
|
|
9
9
|
icon: "fluent:chevron-down-20-regular",
|
|
10
10
|
w: { initial: 8, min: 4, max: Infinity },
|
|
11
|
-
h: { initial: 2, min: 2, max: 2 }
|
|
11
|
+
h: { initial: 2, min: 2, max: 2 },
|
|
12
|
+
// Publishes its resolved option to the `selections` registry (runtime.vue), so
|
|
13
|
+
// a sibling expression can read the full chosen record via `selections["<id>"]`.
|
|
14
|
+
selection: true
|
|
12
15
|
};
|
|
13
16
|
const isListType = (actual) => actual === "dyn" || actual.startsWith("list") || actual.startsWith("optional");
|
|
14
17
|
function configureWithOption(configure) {
|
|
@@ -7,6 +7,7 @@ import { useI18n } from "vue-i18n";
|
|
|
7
7
|
import { fetchJsonOption } from "../../../../../share/request";
|
|
8
8
|
import { cel as _rawCel } from "../../../../../utils/cel";
|
|
9
9
|
import { celBindings, injectCELContext } from "../../../../../utils/cel-context";
|
|
10
|
+
import { publishSelection } from "../../../../../utils/selections-registry";
|
|
10
11
|
import { getLocalizedText } from "../../../../../share/locale";
|
|
11
12
|
import { Field, FieldLabel, FieldMessages } from "../../../../ui/field";
|
|
12
13
|
import { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput } from "../../../../ui/input-group";
|
|
@@ -240,6 +241,21 @@ const triggerLabel = computed(() => {
|
|
|
240
241
|
if (arr.length === 1) return head;
|
|
241
242
|
return `${head} + ${arr.length - 1}`;
|
|
242
243
|
});
|
|
244
|
+
const selectedLeaves = computed(
|
|
245
|
+
() => model.value.map((k) => {
|
|
246
|
+
const path = findWrappedPath(roots.value, k);
|
|
247
|
+
if (!path || path.length === 0) return void 0;
|
|
248
|
+
return path[path.length - 1];
|
|
249
|
+
}).filter((node) => node !== void 0)
|
|
250
|
+
);
|
|
251
|
+
publishSelection(
|
|
252
|
+
props.fieldId,
|
|
253
|
+
() => selectedLeaves.value.length > 0 ? selectedLeaves.value : void 0,
|
|
254
|
+
{
|
|
255
|
+
identity: (list) => list.map((w) => w.key).join(" "),
|
|
256
|
+
raw: (list) => list.map((w) => w.raw)
|
|
257
|
+
}
|
|
258
|
+
);
|
|
243
259
|
const initialExpanded = computed(() => {
|
|
244
260
|
if (!props.config.expandAll) return [];
|
|
245
261
|
const out = [];
|
|
@@ -408,17 +424,17 @@ const hoveredTooltip = computed(() => {
|
|
|
408
424
|
>
|
|
409
425
|
<div
|
|
410
426
|
data-slot="tree-combobox-multi-search"
|
|
411
|
-
class="flex h-
|
|
427
|
+
class="flex h-10 items-center gap-2 border-b border-zinc-200 px-3"
|
|
412
428
|
>
|
|
413
429
|
<Icon
|
|
414
430
|
icon="fluent:search-20-filled"
|
|
415
|
-
class="size-
|
|
431
|
+
class="size-4 shrink-0 opacity-50"
|
|
416
432
|
/>
|
|
417
433
|
<input
|
|
418
434
|
v-model="filterQuery"
|
|
419
435
|
:disabled="isDisabled"
|
|
420
436
|
:placeholder="t('tree-combobox-multi-search-placeholder')"
|
|
421
|
-
class="flex h-
|
|
437
|
+
class="flex h-10 w-full bg-transparent py-3 text-sm outline-hidden placeholder:text-zinc-700 disabled:cursor-not-allowed disabled:opacity-50"
|
|
422
438
|
>
|
|
423
439
|
</div>
|
|
424
440
|
<div class="flex flex-col p-1">
|
|
@@ -474,7 +490,7 @@ const hoveredTooltip = computed(() => {
|
|
|
474
490
|
</template>
|
|
475
491
|
|
|
476
492
|
<template #empty>
|
|
477
|
-
<div class="
|
|
493
|
+
<div class="py-6 text-center text-sm text-zinc-500">
|
|
478
494
|
{{ t("tree-combobox-multi-empty") }}
|
|
479
495
|
</div>
|
|
480
496
|
</template>
|
|
@@ -16,6 +16,7 @@ export declare const metadata: {
|
|
|
16
16
|
readonly min: 2;
|
|
17
17
|
readonly max: 2;
|
|
18
18
|
};
|
|
19
|
+
readonly selection: true;
|
|
19
20
|
};
|
|
20
21
|
export declare function schema(configure: (env: Environment) => void): Schema.Struct<{
|
|
21
22
|
label: Schema.optional<Schema.TupleType<readonly [Schema.Struct<{
|
|
@@ -9,7 +9,10 @@ export const metadata = {
|
|
|
9
9
|
name: "\u4E0B\u62C9\u6811\uFF08\u591A\u9009\uFF09",
|
|
10
10
|
icon: "fluent:tree-evergreen-20-regular",
|
|
11
11
|
w: { initial: 8, min: 4, max: Infinity },
|
|
12
|
-
h: { initial: 2, min: 2, max: 2 }
|
|
12
|
+
h: { initial: 2, min: 2, max: 2 },
|
|
13
|
+
// Publishes its resolved nodes (array, in selection order) to the `selections`
|
|
14
|
+
// registry (runtime.vue), readable via `selections["<id>"]`.
|
|
15
|
+
selection: true
|
|
13
16
|
};
|
|
14
17
|
const NODE_VAR = {
|
|
15
18
|
type: "dyn",
|
|
@@ -7,6 +7,7 @@ import { useI18n } from "vue-i18n";
|
|
|
7
7
|
import { fetchJsonOption } from "../../../../../share/request";
|
|
8
8
|
import { cel as _rawCel } from "../../../../../utils/cel";
|
|
9
9
|
import { celBindings, injectCELContext } from "../../../../../utils/cel-context";
|
|
10
|
+
import { publishSelection } from "../../../../../utils/selections-registry";
|
|
10
11
|
import { getLocalizedText } from "../../../../../share/locale";
|
|
11
12
|
import { Field, FieldLabel, FieldMessages } from "../../../../ui/field";
|
|
12
13
|
import { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput } from "../../../../ui/input-group";
|
|
@@ -227,14 +228,21 @@ const roots = computed(
|
|
|
227
228
|
nodeChildren: nodeChildrenList
|
|
228
229
|
})
|
|
229
230
|
);
|
|
230
|
-
const
|
|
231
|
+
const selectedWrapped = computed(() => {
|
|
231
232
|
const k = model.value;
|
|
232
|
-
if (!k) return
|
|
233
|
+
if (!k) return void 0;
|
|
233
234
|
const path = findWrappedPath(roots.value, k);
|
|
234
|
-
if (!path || path.length === 0) return
|
|
235
|
-
|
|
236
|
-
return wrappedLabelText(leaf);
|
|
235
|
+
if (!path || path.length === 0) return void 0;
|
|
236
|
+
return path[path.length - 1];
|
|
237
237
|
});
|
|
238
|
+
const triggerLabel = computed(
|
|
239
|
+
() => selectedWrapped.value ? wrappedLabelText(selectedWrapped.value) : ""
|
|
240
|
+
);
|
|
241
|
+
publishSelection(
|
|
242
|
+
props.fieldId,
|
|
243
|
+
() => selectedWrapped.value,
|
|
244
|
+
{ identity: (w) => w.key, raw: (w) => w.raw }
|
|
245
|
+
);
|
|
238
246
|
const initialExpanded = computed(() => {
|
|
239
247
|
if (!props.config.expandAll) return [];
|
|
240
248
|
const out = [];
|
|
@@ -404,17 +412,17 @@ const hoveredTooltip = computed(() => {
|
|
|
404
412
|
>
|
|
405
413
|
<div
|
|
406
414
|
data-slot="tree-combobox-single-search"
|
|
407
|
-
class="flex h-
|
|
415
|
+
class="flex h-10 items-center gap-2 border-b border-zinc-200 px-3"
|
|
408
416
|
>
|
|
409
417
|
<Icon
|
|
410
418
|
icon="fluent:search-20-filled"
|
|
411
|
-
class="size-
|
|
419
|
+
class="size-4 shrink-0 opacity-50"
|
|
412
420
|
/>
|
|
413
421
|
<input
|
|
414
422
|
v-model="filterQuery"
|
|
415
423
|
:disabled="isDisabled"
|
|
416
424
|
:placeholder="t('tree-combobox-single-search-placeholder')"
|
|
417
|
-
class="flex h-
|
|
425
|
+
class="flex h-10 w-full bg-transparent py-3 text-sm outline-hidden placeholder:text-zinc-700 disabled:cursor-not-allowed disabled:opacity-50"
|
|
418
426
|
>
|
|
419
427
|
</div>
|
|
420
428
|
<div class="flex flex-col p-1">
|
|
@@ -469,7 +477,7 @@ const hoveredTooltip = computed(() => {
|
|
|
469
477
|
</template>
|
|
470
478
|
|
|
471
479
|
<template #empty>
|
|
472
|
-
<div class="
|
|
480
|
+
<div class="py-6 text-center text-sm text-zinc-500">
|
|
473
481
|
{{ t("tree-combobox-single-empty") }}
|
|
474
482
|
</div>
|
|
475
483
|
</template>
|
|
@@ -16,6 +16,7 @@ export declare const metadata: {
|
|
|
16
16
|
readonly min: 2;
|
|
17
17
|
readonly max: 2;
|
|
18
18
|
};
|
|
19
|
+
readonly selection: true;
|
|
19
20
|
};
|
|
20
21
|
export declare function schema(configure: (env: Environment) => void): Schema.Struct<{
|
|
21
22
|
label: Schema.optional<Schema.TupleType<readonly [Schema.Struct<{
|
|
@@ -9,7 +9,10 @@ export const metadata = {
|
|
|
9
9
|
name: "\u4E0B\u62C9\u6811\uFF08\u5355\u9009\uFF09",
|
|
10
10
|
icon: "fluent:tree-evergreen-20-regular",
|
|
11
11
|
w: { initial: 8, min: 4, max: Infinity },
|
|
12
|
-
h: { initial: 2, min: 2, max: 2 }
|
|
12
|
+
h: { initial: 2, min: 2, max: 2 },
|
|
13
|
+
// Publishes its resolved node (the backend record) to the `selections`
|
|
14
|
+
// registry (runtime.vue), readable via `selections["<id>"]`.
|
|
15
|
+
selection: true
|
|
13
16
|
};
|
|
14
17
|
const NODE_VAR = {
|
|
15
18
|
type: "dyn",
|
package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/runtime.vue
CHANGED
|
@@ -7,6 +7,7 @@ import { useI18n } from "vue-i18n";
|
|
|
7
7
|
import { fetchJsonOption } from "../../../../../share/request";
|
|
8
8
|
import { cel as _rawCel } from "../../../../../utils/cel";
|
|
9
9
|
import { celBindings, injectCELContext } from "../../../../../utils/cel-context";
|
|
10
|
+
import { publishSelection } from "../../../../../utils/selections-registry";
|
|
10
11
|
import { getLocalizedText } from "../../../../../share/locale";
|
|
11
12
|
import { Checkbox } from "../../../../ui/checkbox";
|
|
12
13
|
import { Field, FieldLabel, FieldMessages } from "../../../../ui/field";
|
|
@@ -262,20 +263,39 @@ const filterLabelText = computed(() => {
|
|
|
262
263
|
const localized = props.config.filter?.label ? getLocalizedText(props.config.filter.label, locale.value) : void 0;
|
|
263
264
|
return localized && localized.length > 0 ? localized : t("tree-multi-search-label");
|
|
264
265
|
});
|
|
265
|
-
const
|
|
266
|
+
const resolvedByKey = computed(() => {
|
|
266
267
|
const selected = new Set(model.value);
|
|
267
|
-
const empty = t("tree-multi-readonly-empty");
|
|
268
|
-
if (selected.size === 0) return empty;
|
|
269
268
|
const found = /* @__PURE__ */ new Map();
|
|
269
|
+
if (selected.size === 0) return found;
|
|
270
270
|
const stack = [...roots.value];
|
|
271
271
|
while (stack.length) {
|
|
272
272
|
const n = stack.pop();
|
|
273
273
|
const k = getKey(n);
|
|
274
|
-
if (selected.has(k)) found.set(k,
|
|
274
|
+
if (selected.has(k)) found.set(k, n);
|
|
275
275
|
const kids = getChildren(n);
|
|
276
276
|
if (kids && kids.length) stack.push(...kids);
|
|
277
277
|
}
|
|
278
|
-
|
|
278
|
+
return found;
|
|
279
|
+
});
|
|
280
|
+
const selectedNodes = computed(
|
|
281
|
+
() => model.value.map((id) => resolvedByKey.value.get(id)).filter((n) => n !== void 0)
|
|
282
|
+
);
|
|
283
|
+
publishSelection(
|
|
284
|
+
props.fieldId,
|
|
285
|
+
() => selectedNodes.value.length > 0 ? selectedNodes.value : void 0,
|
|
286
|
+
{
|
|
287
|
+
identity: (list) => list.map((n) => getKey(n)).join(" "),
|
|
288
|
+
raw: (list) => list
|
|
289
|
+
}
|
|
290
|
+
);
|
|
291
|
+
const readonlyText = computed(() => {
|
|
292
|
+
const empty = t("tree-multi-readonly-empty");
|
|
293
|
+
if (model.value.length === 0) return empty;
|
|
294
|
+
const found = resolvedByKey.value;
|
|
295
|
+
const labels = model.value.map((id) => {
|
|
296
|
+
const n = found.get(id);
|
|
297
|
+
return n !== void 0 ? nodeLabelText(n) : id;
|
|
298
|
+
}).filter((l) => l.length > 0);
|
|
279
299
|
return labels.length > 0 ? labels.join(t("tree-multi-readonly-separator")) : empty;
|
|
280
300
|
});
|
|
281
301
|
</script>
|
package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/schema.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ export declare const metadata: {
|
|
|
17
17
|
readonly max: number;
|
|
18
18
|
readonly grow: true;
|
|
19
19
|
};
|
|
20
|
+
readonly selection: true;
|
|
20
21
|
};
|
|
21
22
|
export declare function schema(configure: (env: Environment) => void): Schema.Struct<{
|
|
22
23
|
label: Schema.optional<Schema.TupleType<readonly [Schema.Struct<{
|
package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/schema.js
CHANGED
|
@@ -9,7 +9,10 @@ export const metadata = {
|
|
|
9
9
|
name: "\u6811\uFF08\u591A\u9009\uFF09",
|
|
10
10
|
icon: "fluent:tree-evergreen-20-regular",
|
|
11
11
|
w: { initial: 8, min: 4, max: Infinity },
|
|
12
|
-
h: { initial: 8, min: 4, max: Infinity, grow: true }
|
|
12
|
+
h: { initial: 8, min: 4, max: Infinity, grow: true },
|
|
13
|
+
// Publishes its resolved nodes (array, in selection order) to the `selections`
|
|
14
|
+
// registry (runtime.vue), readable via `selections["<id>"]`.
|
|
15
|
+
selection: true
|
|
13
16
|
};
|
|
14
17
|
export function schema(configure) {
|
|
15
18
|
const CelBool = Expression({ configure, resultType: "bool" });
|
package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/runtime.vue
CHANGED
|
@@ -7,6 +7,7 @@ import { useI18n } from "vue-i18n";
|
|
|
7
7
|
import { fetchJsonOption } from "../../../../../share/request";
|
|
8
8
|
import { cel as _rawCel } from "../../../../../utils/cel";
|
|
9
9
|
import { celBindings, injectCELContext } from "../../../../../utils/cel-context";
|
|
10
|
+
import { publishSelection } from "../../../../../utils/selections-registry";
|
|
10
11
|
import { getLocalizedText } from "../../../../../share/locale";
|
|
11
12
|
import { Field, FieldLabel, FieldMessages } from "../../../../ui/field";
|
|
12
13
|
import { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput } from "../../../../ui/input-group";
|
|
@@ -258,21 +259,30 @@ const filterLabelText = computed(() => {
|
|
|
258
259
|
const localized = props.config.filter?.label ? getLocalizedText(props.config.filter.label, locale.value) : void 0;
|
|
259
260
|
return localized && localized.length > 0 ? localized : t("tree-single-search-label");
|
|
260
261
|
});
|
|
261
|
-
const
|
|
262
|
+
const selectedNode = computed(() => {
|
|
262
263
|
const selected = model.value;
|
|
263
|
-
|
|
264
|
-
if (selected == null) return empty;
|
|
264
|
+
if (selected == null) return void 0;
|
|
265
265
|
const stack = [...roots.value];
|
|
266
266
|
while (stack.length) {
|
|
267
267
|
const n = stack.pop();
|
|
268
|
-
if (getKey(n) === selected)
|
|
269
|
-
const label = nodeLabelText(n);
|
|
270
|
-
return label.length > 0 ? label : selected;
|
|
271
|
-
}
|
|
268
|
+
if (getKey(n) === selected) return n;
|
|
272
269
|
const kids = getChildren(n);
|
|
273
270
|
if (kids && kids.length) stack.push(...kids);
|
|
274
271
|
}
|
|
275
|
-
return
|
|
272
|
+
return void 0;
|
|
273
|
+
});
|
|
274
|
+
publishSelection(
|
|
275
|
+
props.fieldId,
|
|
276
|
+
() => selectedNode.value,
|
|
277
|
+
{ identity: (node) => getKey(node), raw: (node) => node }
|
|
278
|
+
);
|
|
279
|
+
const readonlyText = computed(() => {
|
|
280
|
+
const selected = model.value;
|
|
281
|
+
if (selected == null) return t("tree-single-readonly-empty");
|
|
282
|
+
const n = selectedNode.value;
|
|
283
|
+
if (n === void 0) return selected;
|
|
284
|
+
const label = nodeLabelText(n);
|
|
285
|
+
return label.length > 0 ? label : selected;
|
|
276
286
|
});
|
|
277
287
|
</script>
|
|
278
288
|
|
package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/schema.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ export declare const metadata: {
|
|
|
16
16
|
readonly max: number;
|
|
17
17
|
readonly grow: true;
|
|
18
18
|
};
|
|
19
|
+
readonly selection: true;
|
|
19
20
|
};
|
|
20
21
|
export declare function schema(configure: (env: Environment) => void): Schema.Struct<{
|
|
21
22
|
label: Schema.optional<Schema.TupleType<readonly [Schema.Struct<{
|