@shwfed/config 2.12.0 → 2.12.2
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/module.json +1 -1
- package/dist/module.mjs +10 -0
- package/dist/runtime/components/form/config.vue +17 -6
- package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/config.d.vue.ts +2 -2
- package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/config.vue.d.ts +2 -2
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/config.d.vue.ts +2 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/config.vue +22 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/config.vue.d.ts +2 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/runtime.vue +5 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/schema.d.ts +1 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/schema.js +12 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.d.vue.ts +2 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.vue +22 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.vue.d.ts +2 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/runtime.vue +5 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/schema.d.ts +1 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/schema.js +12 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/config.d.vue.ts +2 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/config.vue +22 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/config.vue.d.ts +2 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/runtime.vue +5 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/schema.d.ts +1 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/schema.js +12 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.d.vue.ts +2 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.vue +22 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.vue.d.ts +2 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/runtime.vue +5 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/schema.d.ts +1 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/schema.js +12 -0
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/config.d.vue.ts +2 -2
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/config.vue.d.ts +2 -2
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/row.vue +8 -1
- package/dist/runtime/components/form/fields/2026-05-23/com.shwfed.form.field.tree.multi/config.d.vue.ts +24 -24
- package/dist/runtime/components/form/fields/2026-05-23/com.shwfed.form.field.tree.multi/config.vue.d.ts +24 -24
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/config.d.vue.ts +2 -0
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/config.vue +22 -0
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/config.vue.d.ts +2 -0
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/runtime.vue +5 -0
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/schema.d.ts +1 -0
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/schema.js +12 -0
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/config.d.vue.ts +2 -0
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/config.vue +22 -0
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/config.vue.d.ts +2 -0
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/runtime.vue +5 -0
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/schema.d.ts +1 -0
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/schema.js +12 -0
- package/dist/runtime/components/form/fields/2026-05-25/com.shwfed.form.field.combobox.multi/config.d.vue.ts +2 -2
- package/dist/runtime/components/form/fields/2026-05-25/com.shwfed.form.field.combobox.multi/config.vue.d.ts +2 -2
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/config.d.vue.ts +24 -24
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/config.vue.d.ts +24 -24
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/config.d.vue.ts +22 -22
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/config.vue.d.ts +22 -22
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/config.d.vue.ts +32 -32
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/config.vue.d.ts +32 -32
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/runtime.vue +9 -1
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/config.d.vue.ts +32 -32
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/config.vue.d.ts +32 -32
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/runtime.vue +9 -1
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/config.d.vue.ts +24 -24
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/config.vue.d.ts +24 -24
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/runtime.vue +19 -1
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/config.d.vue.ts +22 -22
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/config.vue.d.ts +22 -22
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/runtime.vue +19 -1
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/config.d.vue.ts +24 -24
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/config.vue.d.ts +24 -24
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/runtime.vue +20 -1
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/config.d.vue.ts +22 -22
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/config.vue.d.ts +22 -22
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/runtime.vue +20 -1
- package/dist/runtime/components/form/fields/2026-06-14/com.shwfed.form.field.combobox.multi/config.d.vue.ts +32 -32
- package/dist/runtime/components/form/fields/2026-06-14/com.shwfed.form.field.combobox.multi/config.vue.d.ts +32 -32
- package/dist/runtime/components/form/fields/2026-06-14/com.shwfed.form.field.combobox.multi/runtime.vue +9 -1
- package/dist/runtime/components/form/fields/2026-06-14/com.shwfed.form.field.combobox.single/config.d.vue.ts +32 -32
- package/dist/runtime/components/form/fields/2026-06-14/com.shwfed.form.field.combobox.single/config.vue.d.ts +32 -32
- package/dist/runtime/components/form/fields/2026-06-14/com.shwfed.form.field.combobox.single/runtime.vue +9 -1
- package/dist/runtime/components/form/index.vue +6 -3
- package/dist/runtime/components/form/utils/ai-field-tools.d.ts +11 -0
- package/dist/runtime/components/form/utils/ai-field-tools.js +282 -0
- package/dist/runtime/components/form/utils/form-vars.js +2 -1
- package/dist/runtime/components/form/utils/resolve.d.ts +15 -0
- package/dist/runtime/components/form/utils/resolve.js +13 -0
- package/dist/runtime/components/head.d.vue.ts +13 -0
- package/dist/runtime/components/head.vue +69 -0
- package/dist/runtime/components/head.vue.d.ts +13 -0
- package/dist/runtime/components/sidebar/config.d.vue.ts +7 -0
- package/dist/runtime/components/sidebar/config.vue +302 -0
- package/dist/runtime/components/sidebar/config.vue.d.ts +7 -0
- package/dist/runtime/components/sidebar/favorites.d.ts +18 -0
- package/dist/runtime/components/sidebar/favorites.js +20 -0
- package/dist/runtime/components/sidebar/footer.d.vue.ts +11 -0
- package/dist/runtime/components/sidebar/footer.vue +49 -0
- package/dist/runtime/components/sidebar/footer.vue.d.ts +11 -0
- package/dist/runtime/components/sidebar/index.d.vue.ts +50 -0
- package/dist/runtime/components/sidebar/index.vue +100 -0
- package/dist/runtime/components/sidebar/index.vue.d.ts +50 -0
- package/dist/runtime/components/sidebar/node.d.vue.ts +9 -0
- package/dist/runtime/components/sidebar/node.vue +102 -0
- package/dist/runtime/components/sidebar/node.vue.d.ts +9 -0
- package/dist/runtime/components/sidebar/schema.d.ts +72 -0
- package/dist/runtime/components/sidebar/schema.js +84 -0
- package/dist/runtime/components/sidebar/tree.d.vue.ts +10 -0
- package/dist/runtime/components/sidebar/tree.vue +260 -0
- package/dist/runtime/components/sidebar/tree.vue.d.ts +10 -0
- package/dist/runtime/components/sidebar/types.d.ts +19 -0
- package/dist/runtime/components/sidebar/types.js +0 -0
- package/dist/runtime/components/sidebar/use-editor.d.ts +18 -0
- package/dist/runtime/components/sidebar/use-editor.js +43 -0
- package/dist/runtime/components/table/ai-generate.system.md +6 -0
- package/dist/runtime/components/table/ai-generate.vue +18 -17
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/config.d.vue.ts +4 -4
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/config.vue.d.ts +4 -4
- 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 +4 -4
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/config.vue.d.ts +4 -4
- 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/config.d.vue.ts +36 -36
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi/config.vue.d.ts +36 -36
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/config.d.vue.ts +42 -42
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/config.vue.d.ts +42 -42
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single/config.d.vue.ts +36 -36
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single/config.vue.d.ts +36 -36
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single.remote/config.d.vue.ts +42 -42
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single.remote/config.vue.d.ts +42 -42
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/config.d.vue.ts +4 -4
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/config.vue.d.ts +4 -4
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-single/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-single/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 +28 -28
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/config.vue.d.ts +28 -28
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/config.d.vue.ts +28 -28
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/config.vue.d.ts +28 -28
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/config.d.vue.ts +4 -4
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/config.vue.d.ts +4 -4
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-multi/config.d.vue.ts +28 -28
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-multi/config.vue.d.ts +28 -28
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-single/config.d.vue.ts +28 -28
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-single/config.vue.d.ts +28 -28
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-multi/config.d.vue.ts +4 -4
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-multi/config.vue.d.ts +4 -4
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-single/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-single/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-06-17/com.shwfed.table.column.date-input/config.vue +33 -0
- package/dist/runtime/components/table/columns/2026-06-17/com.shwfed.table.column.date-input/runtime.vue +5 -0
- package/dist/runtime/components/table/columns/2026-06-17/com.shwfed.table.column.date-input/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-06-17/com.shwfed.table.column.date-input/schema.js +6 -1
- package/dist/runtime/components/table/columns/2026-06-22/com.shwfed.table.column.date-range-input/config.vue +33 -0
- package/dist/runtime/components/table/columns/2026-06-22/com.shwfed.table.column.date-range-input/runtime.vue +5 -0
- package/dist/runtime/components/table/columns/2026-06-22/com.shwfed.table.column.date-range-input/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-06-22/com.shwfed.table.column.date-range-input/schema.js +6 -1
- package/dist/runtime/components/table/utils/ai-tools.js +50 -1
- package/dist/runtime/components/table/utils/shared.d.ts +1 -0
- package/dist/runtime/components/table/utils/shared.js +10 -0
- package/dist/runtime/components/ui/alert-dialog/AlertDialogCancel.vue +1 -1
- package/dist/runtime/components/ui/chat/ChatPrompt.d.vue.ts +11 -1
- package/dist/runtime/components/ui/chat/ChatPrompt.vue +10 -0
- package/dist/runtime/components/ui/chat/ChatPrompt.vue.d.ts +11 -1
- package/dist/runtime/components/ui/expression-editor/CodeMirrorInput.d.vue.ts +1 -0
- package/dist/runtime/components/ui/expression-editor/CodeMirrorInput.vue +8 -0
- package/dist/runtime/components/ui/expression-editor/CodeMirrorInput.vue.d.ts +1 -0
- package/dist/runtime/components/ui/expression-editor/ExpressionEditor.d.vue.ts +3 -2
- package/dist/runtime/components/ui/expression-editor/ExpressionEditor.vue +51 -9
- package/dist/runtime/components/ui/expression-editor/ExpressionEditor.vue.d.ts +3 -2
- package/dist/runtime/components/ui/expression-editor/option-chip-extension.d.ts +4 -0
- package/dist/runtime/components/ui/expression-editor/option-chip-extension.js +119 -0
- package/dist/runtime/components/ui/expression-editor/option-refs.d.ts +6 -0
- package/dist/runtime/components/ui/expression-editor/option-refs.js +24 -0
- package/dist/runtime/components/ui/expression-editor/picker-entries.d.ts +2 -1
- package/dist/runtime/components/ui/expression-editor/picker-entries.js +12 -2
- package/dist/runtime/share/disabled-date.d.ts +34 -0
- package/dist/runtime/share/disabled-date.js +13 -0
- package/dist/runtime/utils/ai/index.js +24 -1
- package/dist/runtime/utils/cel-context.d.ts +1 -0
- package/dist/runtime/utils/cel-context.js +1 -0
- package/dist/runtime/utils/disabled-date.d.ts +26 -0
- package/dist/runtime/utils/disabled-date.js +21 -0
- package/dist/runtime/utils/selections-registry.d.ts +40 -6
- package/dist/runtime/utils/selections-registry.js +19 -4
- package/dist/runtime/vendor/cel-js/CLAUDE.md +2 -0
- package/dist/runtime/vendor/cel-js/PROMPT.md +2 -0
- package/dist/runtime/vendor/cel-js/lib/functions.js +33 -0
- package/package.json +1 -1
|
@@ -24,25 +24,10 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
24
24
|
}[]] | undefined;
|
|
25
25
|
readonly required?: string | undefined;
|
|
26
26
|
readonly displayName?: string | undefined;
|
|
27
|
-
readonly compatibilityDate: "2026-06-14";
|
|
28
|
-
readonly orientation?: "vertical" | "floating" | undefined;
|
|
29
|
-
readonly placeholder?: readonly [{
|
|
30
|
-
readonly locale: "zh";
|
|
31
|
-
readonly message: string;
|
|
32
|
-
}, ...{
|
|
33
|
-
readonly locale: "en" | "ja" | "ko";
|
|
34
|
-
readonly message: string;
|
|
35
|
-
}[]] | 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
27
|
readonly options: {
|
|
43
28
|
readonly kind: "remote";
|
|
44
|
-
readonly request?: string | undefined;
|
|
45
29
|
readonly options: string;
|
|
30
|
+
readonly request?: string | undefined;
|
|
46
31
|
readonly optionValue: string;
|
|
47
32
|
readonly optionLabel: string;
|
|
48
33
|
readonly optionKeywords?: string | undefined;
|
|
@@ -74,6 +59,21 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
74
59
|
readonly keywords?: readonly string[] | undefined;
|
|
75
60
|
}[];
|
|
76
61
|
};
|
|
62
|
+
readonly compatibilityDate: "2026-06-14";
|
|
63
|
+
readonly orientation?: "vertical" | "floating" | undefined;
|
|
64
|
+
readonly placeholder?: readonly [{
|
|
65
|
+
readonly locale: "zh";
|
|
66
|
+
readonly message: string;
|
|
67
|
+
}, ...{
|
|
68
|
+
readonly locale: "en" | "ja" | "ko";
|
|
69
|
+
readonly message: string;
|
|
70
|
+
}[]] | undefined;
|
|
71
|
+
readonly readonly?: string | undefined;
|
|
72
|
+
readonly binding?: string | undefined;
|
|
73
|
+
readonly derived?: {
|
|
74
|
+
readonly mode: "formula" | "prefill";
|
|
75
|
+
readonly expression: string;
|
|
76
|
+
} | undefined;
|
|
77
77
|
readonly validations?: readonly {
|
|
78
78
|
readonly message: readonly [{
|
|
79
79
|
readonly locale: "zh";
|
|
@@ -108,25 +108,10 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
108
108
|
}[]] | undefined;
|
|
109
109
|
readonly required?: string | undefined;
|
|
110
110
|
readonly displayName?: string | undefined;
|
|
111
|
-
readonly compatibilityDate: "2026-06-14";
|
|
112
|
-
readonly orientation?: "vertical" | "floating" | 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 binding?: string | undefined;
|
|
122
|
-
readonly derived?: {
|
|
123
|
-
readonly mode: "formula" | "prefill";
|
|
124
|
-
readonly expression: string;
|
|
125
|
-
} | undefined;
|
|
126
111
|
readonly options: {
|
|
127
112
|
readonly kind: "remote";
|
|
128
|
-
readonly request?: string | undefined;
|
|
129
113
|
readonly options: string;
|
|
114
|
+
readonly request?: string | undefined;
|
|
130
115
|
readonly optionValue: string;
|
|
131
116
|
readonly optionLabel: string;
|
|
132
117
|
readonly optionKeywords?: string | undefined;
|
|
@@ -158,6 +143,21 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
158
143
|
readonly keywords?: readonly string[] | undefined;
|
|
159
144
|
}[];
|
|
160
145
|
};
|
|
146
|
+
readonly compatibilityDate: "2026-06-14";
|
|
147
|
+
readonly orientation?: "vertical" | "floating" | undefined;
|
|
148
|
+
readonly placeholder?: readonly [{
|
|
149
|
+
readonly locale: "zh";
|
|
150
|
+
readonly message: string;
|
|
151
|
+
}, ...{
|
|
152
|
+
readonly locale: "en" | "ja" | "ko";
|
|
153
|
+
readonly message: string;
|
|
154
|
+
}[]] | undefined;
|
|
155
|
+
readonly readonly?: string | undefined;
|
|
156
|
+
readonly binding?: string | undefined;
|
|
157
|
+
readonly derived?: {
|
|
158
|
+
readonly mode: "formula" | "prefill";
|
|
159
|
+
readonly expression: string;
|
|
160
|
+
} | undefined;
|
|
161
161
|
readonly validations?: readonly {
|
|
162
162
|
readonly message: readonly [{
|
|
163
163
|
readonly locale: "zh";
|
|
@@ -8,7 +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
|
+
import { publishOptions, publishSelection } from "../../../../../utils/selections-registry";
|
|
12
12
|
import { interpolateMarkdown } from "../../../../table/utils/runtime";
|
|
13
13
|
import { getLocalizedText } from "../../../../../share/locale";
|
|
14
14
|
import {
|
|
@@ -258,6 +258,14 @@ publishSelection(
|
|
|
258
258
|
() => selectedEntry.value,
|
|
259
259
|
{ identity: (entry) => entry.key, raw: (entry) => entry.raw }
|
|
260
260
|
);
|
|
261
|
+
publishOptions(
|
|
262
|
+
props.fieldId,
|
|
263
|
+
() => entries.value.length > 0 ? entries.value : void 0,
|
|
264
|
+
{
|
|
265
|
+
identity: (list) => list.map((entry) => entry.key).join(" "),
|
|
266
|
+
raw: (list) => list.map((entry) => entry.raw)
|
|
267
|
+
}
|
|
268
|
+
);
|
|
261
269
|
const open = ref(false);
|
|
262
270
|
function handleSelect(key) {
|
|
263
271
|
if (typeof key !== "string") return;
|
|
@@ -19,7 +19,7 @@ import { evaluateInitial } from "./utils/initial";
|
|
|
19
19
|
import { provideEventTarget } from "../../share/event-bus";
|
|
20
20
|
import { provideFormReadonly } from "./utils/readonly";
|
|
21
21
|
import { provideFormState } from "./utils/state";
|
|
22
|
-
import { provideSelectionsRegistry } from "../../utils/selections-registry";
|
|
22
|
+
import { provideOptionsRegistry, provideSelectionsRegistry } from "../../utils/selections-registry";
|
|
23
23
|
import { provideValidation } from "./utils/validation";
|
|
24
24
|
defineOptions({ name: "ShwfedForm" });
|
|
25
25
|
const state = defineModel({ type: Object, ...{ default: () => ({}) } });
|
|
@@ -31,6 +31,7 @@ const configure = props.configure ?? (() => {
|
|
|
31
31
|
});
|
|
32
32
|
void configure;
|
|
33
33
|
const selections = provideSelectionsRegistry();
|
|
34
|
+
const options = provideOptionsRegistry();
|
|
34
35
|
provideCELContext(buildFormRuntimeScope({
|
|
35
36
|
form: () => state.value ?? {},
|
|
36
37
|
now: () => new TZDate(),
|
|
@@ -38,12 +39,14 @@ provideCELContext(buildFormRuntimeScope({
|
|
|
38
39
|
// only called at eval time (long after setup), so reading it here is safe.
|
|
39
40
|
undoable: () => formHistory.canUndo.value,
|
|
40
41
|
redoable: () => formHistory.canRedo.value,
|
|
41
|
-
selections: () => selections.entries.value
|
|
42
|
+
selections: () => selections.entries.value,
|
|
43
|
+
options: () => options.entries.value
|
|
42
44
|
}));
|
|
43
45
|
if (config.value.id) {
|
|
44
46
|
provideScopeAddress(config.value.id, {
|
|
45
47
|
form: () => state.value ?? {},
|
|
46
|
-
selections: () => selections.entries.value
|
|
48
|
+
selections: () => selections.entries.value,
|
|
49
|
+
options: () => options.entries.value
|
|
47
50
|
});
|
|
48
51
|
}
|
|
49
52
|
const inherited = injectCELContext();
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Environment } from '../../../vendor/cel-js/lib/index.js';
|
|
2
|
+
import type { AgenticTool } from '../../../utils/ai/index.js';
|
|
3
|
+
type AnyRecord = Record<string, any>;
|
|
4
|
+
export interface QueryFieldToolDeps {
|
|
5
|
+
readonly read: () => AnyRecord | undefined;
|
|
6
|
+
readonly write: (next: AnyRecord) => void;
|
|
7
|
+
readonly configure: (env: Environment) => void;
|
|
8
|
+
readonly genUuid: () => string;
|
|
9
|
+
}
|
|
10
|
+
export declare function createQueryFieldTools(deps: QueryFieldToolDeps): AgenticTool[];
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
import { JSONSchema, ParseResult, Schema } from "effect";
|
|
2
|
+
import { coerceFromString } from "../../../share/coerce-from-string.js";
|
|
3
|
+
import { Area } from "../../../share/layout.js";
|
|
4
|
+
import { defaultFormConfig } from "../schema.js";
|
|
5
|
+
import { registerFormVariablesIfAbsent } from "./form-vars.js";
|
|
6
|
+
import { activeFields } from "./resolve.js";
|
|
7
|
+
const HARNESS_KEYS = ["id", "compatibilityDate"];
|
|
8
|
+
const PlaceInput = Schema.Struct({
|
|
9
|
+
id: Schema.String.pipe(Schema.minLength(1)),
|
|
10
|
+
area: Area
|
|
11
|
+
});
|
|
12
|
+
function formScope(configure) {
|
|
13
|
+
return (env) => {
|
|
14
|
+
registerFormVariablesIfAbsent(env);
|
|
15
|
+
configure(env);
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
function publicFieldSchema(entry, configure) {
|
|
19
|
+
return entry.schema(formScope(configure)).pipe(Schema.omit(...HARNESS_KEYS));
|
|
20
|
+
}
|
|
21
|
+
function decode(schema, input) {
|
|
22
|
+
const result = Schema.decodeUnknownEither(schema)(coerceFromString(input, schema));
|
|
23
|
+
if (result._tag === "Right") return { ok: true, value: result.right };
|
|
24
|
+
const issues = ParseResult.ArrayFormatter.formatErrorSync(result.left);
|
|
25
|
+
const report = issues.map((i) => `- ${i.path.map(String).join(".") || "(root)"}: ${i.message}`).join("\n");
|
|
26
|
+
return { ok: false, report };
|
|
27
|
+
}
|
|
28
|
+
function overlaps(a, b) {
|
|
29
|
+
return a[0][0] < b[1][0] && a[1][0] > b[0][0] && a[0][1] < b[1][1] && a[1][1] > b[0][1];
|
|
30
|
+
}
|
|
31
|
+
function growColumns(layout) {
|
|
32
|
+
let maxCol = typeof layout.columns === "number" ? layout.columns : 1;
|
|
33
|
+
const placements = layout.placements ?? {};
|
|
34
|
+
for (const p of Object.values(placements)) {
|
|
35
|
+
const x2 = p.area[1][0];
|
|
36
|
+
if (x2 - 1 > maxCol) maxCol = x2 - 1;
|
|
37
|
+
}
|
|
38
|
+
layout.columns = Math.max(1, maxCol);
|
|
39
|
+
}
|
|
40
|
+
function ensureFormConfig(deps) {
|
|
41
|
+
return deps.read() ?? defaultFormConfig();
|
|
42
|
+
}
|
|
43
|
+
export function createQueryFieldTools(deps) {
|
|
44
|
+
return [
|
|
45
|
+
// ---- 信息获取 ----
|
|
46
|
+
{
|
|
47
|
+
name: "list_available_query_field_types",
|
|
48
|
+
description: "List the form field types you can insert into the table's search-condition form. Returns each type's name. Use this first to discover what fields exist; for a field's full field contract and defaults, follow up with `describe_specific_query_field_type`. Deprecated types are hidden.",
|
|
49
|
+
inputJsonSchema: {
|
|
50
|
+
type: "object",
|
|
51
|
+
properties: {},
|
|
52
|
+
additionalProperties: false
|
|
53
|
+
},
|
|
54
|
+
execute: () => activeFields().map((f) => {
|
|
55
|
+
const entry = { type: f.type, name: f.metadata.name };
|
|
56
|
+
const description = f.metadata.description;
|
|
57
|
+
if (description !== void 0) entry.description = description;
|
|
58
|
+
return entry;
|
|
59
|
+
})
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
name: "describe_specific_query_field_type",
|
|
63
|
+
description: "Return, for one search-condition field type: the JSON Schema (without `id`/`compatibilityDate` \u2014 managed by the harness), the default values, and the default placement size `w`/`h` (each `{ initial, min, max }`; `w` is in grid columns, `h` in rows). Call this before `insert_query_field` / `place_query_field` to learn the field contract and how big to place it \u2014 use `w.initial` / `h.initial` as the placed area's width / height. Deprecated types are not accepted.",
|
|
64
|
+
inputJsonSchema: {
|
|
65
|
+
type: "object",
|
|
66
|
+
properties: {
|
|
67
|
+
type: { type: "string", description: "A `type` value from `list_available_query_field_types`." }
|
|
68
|
+
},
|
|
69
|
+
required: ["type"],
|
|
70
|
+
additionalProperties: false
|
|
71
|
+
},
|
|
72
|
+
execute: (input) => {
|
|
73
|
+
const { type } = input ?? {};
|
|
74
|
+
if (typeof type !== "string" || type.length === 0) {
|
|
75
|
+
return "describe failed: `type` must be a non-empty string.";
|
|
76
|
+
}
|
|
77
|
+
const entry = activeFields().find((f) => f.type === type);
|
|
78
|
+
if (!entry) {
|
|
79
|
+
return `describe failed: query field type "${type}" is not available. Call list_available_query_field_types to see what is.`;
|
|
80
|
+
}
|
|
81
|
+
const publicSchema = publicFieldSchema(entry, deps.configure);
|
|
82
|
+
let jsonSchema;
|
|
83
|
+
try {
|
|
84
|
+
jsonSchema = JSONSchema.make(publicSchema);
|
|
85
|
+
} catch {
|
|
86
|
+
jsonSchema = "(schema unavailable)";
|
|
87
|
+
}
|
|
88
|
+
return {
|
|
89
|
+
schema: jsonSchema,
|
|
90
|
+
defaults: entry.defaults?.() ?? null,
|
|
91
|
+
// Default placement size from the field's registry metadata. The
|
|
92
|
+
// system prompt requires the model to use `w.initial` / `h.initial`
|
|
93
|
+
// as the placed area's width / height; `min`/`max` bound what it may
|
|
94
|
+
// adjust to. (`place_query_field` itself only guards overlap — the
|
|
95
|
+
// "use the initial size" rule lives in the prompt, not the tool.)
|
|
96
|
+
w: entry.metadata.w,
|
|
97
|
+
h: entry.metadata.h
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
name: "list_query_fields",
|
|
103
|
+
description: "Return the search-condition form's current fields (each with its `id`) joined with its placement: `placement` is the field's grid area `[[x1,y1],[x2,y2]]`, or `null` when the field exists but has NOT been placed yet (unplaced fields are not rendered). `grid` reports the layout's current column count. Use this to discover ids, see what still needs placing, and find a free area before calling `place_query_field`.",
|
|
104
|
+
inputJsonSchema: {
|
|
105
|
+
type: "object",
|
|
106
|
+
properties: {},
|
|
107
|
+
additionalProperties: false
|
|
108
|
+
},
|
|
109
|
+
execute: () => {
|
|
110
|
+
const fc = deps.read();
|
|
111
|
+
if (!fc) return { fields: [], grid: null };
|
|
112
|
+
const fields = Array.isArray(fc.fields) ? fc.fields : [];
|
|
113
|
+
const layout = Array.isArray(fc.layouts) ? fc.layouts[0]?.layout : void 0;
|
|
114
|
+
const placements = layout?.placements ?? {};
|
|
115
|
+
return {
|
|
116
|
+
fields: fields.map((f) => ({
|
|
117
|
+
...f,
|
|
118
|
+
placement: placements[f.id]?.area ?? null
|
|
119
|
+
})),
|
|
120
|
+
grid: layout ? { columns: layout.columns ?? null } : null
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
// ---- 配置 ----
|
|
125
|
+
{
|
|
126
|
+
name: "insert_query_field",
|
|
127
|
+
description: "Insert one new field into the table's search-condition form. Provide `type` (from `list_available_query_field_types`) plus the field's fields as described by `describe_specific_query_field_type`. Do NOT include `id` or `compatibilityDate` \u2014 the harness assigns them. The field is created UNPLACED: it exists but is not rendered until you place it with `place_query_field`. On validation failure the tool returns the issues; fix them and call again.",
|
|
128
|
+
inputJsonSchema: {
|
|
129
|
+
type: "object",
|
|
130
|
+
properties: {
|
|
131
|
+
type: { type: "string", description: "The field type to insert." }
|
|
132
|
+
},
|
|
133
|
+
required: ["type"],
|
|
134
|
+
additionalProperties: true
|
|
135
|
+
},
|
|
136
|
+
execute: (input) => {
|
|
137
|
+
const raw = input ?? {};
|
|
138
|
+
const { type, ...rest } = raw;
|
|
139
|
+
if (typeof type !== "string" || type.length === 0) {
|
|
140
|
+
return "insert failed: `type` must be a non-empty string.";
|
|
141
|
+
}
|
|
142
|
+
for (const k of HARNESS_KEYS) {
|
|
143
|
+
if (k in rest) {
|
|
144
|
+
return `insert failed: do not pass \`${k}\` \u2014 the harness assigns it.`;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
const entry = activeFields().find((f) => f.type === type);
|
|
148
|
+
if (!entry) {
|
|
149
|
+
return `insert failed: query field type "${type}" is not available. Call list_available_query_field_types to see what is.`;
|
|
150
|
+
}
|
|
151
|
+
const publicSchema = publicFieldSchema(entry, deps.configure);
|
|
152
|
+
const verdict = decode(publicSchema, raw);
|
|
153
|
+
if (!verdict.ok) {
|
|
154
|
+
return `insert failed for type "${type}". Fix these and call insert_query_field again:
|
|
155
|
+
${verdict.report}`;
|
|
156
|
+
}
|
|
157
|
+
const fc = ensureFormConfig(deps);
|
|
158
|
+
const fields = Array.isArray(fc.fields) ? fc.fields : [];
|
|
159
|
+
const newField = {
|
|
160
|
+
id: deps.genUuid(),
|
|
161
|
+
compatibilityDate: entry.compatibilityDate,
|
|
162
|
+
...verdict.value
|
|
163
|
+
};
|
|
164
|
+
fc.fields = [...fields, newField];
|
|
165
|
+
deps.write(fc);
|
|
166
|
+
return { id: newField.id, type };
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
name: "delete_query_fields",
|
|
171
|
+
description: "Delete one or more search-condition fields by id. Call `list_query_fields` first to obtain ids. Fields are matched by id only. On any unknown id the call is rejected without writing; fix and call again. Deleting a field also removes it from the layout (its placement is stripped).",
|
|
172
|
+
inputJsonSchema: {
|
|
173
|
+
type: "object",
|
|
174
|
+
properties: {
|
|
175
|
+
ids: {
|
|
176
|
+
type: "array",
|
|
177
|
+
items: { type: "string", minLength: 1 },
|
|
178
|
+
minItems: 1,
|
|
179
|
+
description: "Field ids to delete. Get them from `list_query_fields` first."
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
required: ["ids"],
|
|
183
|
+
additionalProperties: false
|
|
184
|
+
},
|
|
185
|
+
execute: (input) => {
|
|
186
|
+
const raw = input ?? {};
|
|
187
|
+
const ids = raw.ids;
|
|
188
|
+
if (!Array.isArray(ids) || ids.length === 0) {
|
|
189
|
+
return "delete failed: `ids` must be a non-empty array of field ids.";
|
|
190
|
+
}
|
|
191
|
+
for (const id of ids) {
|
|
192
|
+
if (typeof id !== "string" || id.length === 0) {
|
|
193
|
+
return "delete failed: every `ids` entry must be a non-empty string.";
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
const seen = /* @__PURE__ */ new Set();
|
|
197
|
+
for (const id of ids) {
|
|
198
|
+
if (seen.has(id)) {
|
|
199
|
+
return `delete failed: duplicate id "${id}" in input \u2014 dedupe and call again.`;
|
|
200
|
+
}
|
|
201
|
+
seen.add(id);
|
|
202
|
+
}
|
|
203
|
+
const fc = deps.read();
|
|
204
|
+
const fields = fc && Array.isArray(fc.fields) ? fc.fields : [];
|
|
205
|
+
const existing = new Set(fields.map((f) => f.id));
|
|
206
|
+
for (const id of ids) {
|
|
207
|
+
if (!existing.has(id)) {
|
|
208
|
+
return `delete failed: query field id "${id}" is not present. Call list_query_fields to see current ids.`;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
const cfg = fc;
|
|
212
|
+
const deleted = new Set(ids);
|
|
213
|
+
cfg.fields = fields.filter((f) => !deleted.has(f.id));
|
|
214
|
+
if (Array.isArray(cfg.layouts)) {
|
|
215
|
+
cfg.layouts = cfg.layouts.map((ls) => {
|
|
216
|
+
const placements = ls?.layout?.placements;
|
|
217
|
+
if (!placements) return ls;
|
|
218
|
+
const next = Object.fromEntries(
|
|
219
|
+
Object.entries(placements).filter(([pid]) => !deleted.has(pid))
|
|
220
|
+
);
|
|
221
|
+
return { ...ls, layout: { ...ls.layout, placements: next } };
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
deps.write(cfg);
|
|
225
|
+
return { deleted: ids, count: ids.length };
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
name: "place_query_field",
|
|
230
|
+
description: "Place a field into the search-condition layout at grid coordinates you choose. `area` is `[[x1,y1],[x2,y2]]` using 1-based grid lines (top-left inclusive, bottom-right exclusive); e.g. a field occupying columns 1\u20132 on row 1 is `[[1,1],[3,2]]`. The field must already exist (call `insert_query_field` first). The harness rejects an `area` that overlaps another field \u2014 pick a free spot (use `list_query_fields` to see current placements) and call again. Placing an already-placed field MOVES it. The layout column count grows to fit your placements; how many columns the search bar uses is up to you and the guidance you were given.",
|
|
231
|
+
inputJsonSchema: {
|
|
232
|
+
type: "object",
|
|
233
|
+
properties: {
|
|
234
|
+
id: { type: "string", description: "The field id to place (from `list_query_fields`)." },
|
|
235
|
+
area: {
|
|
236
|
+
type: "array",
|
|
237
|
+
description: "Grid area `[[x1,y1],[x2,y2]]`, 1-based grid lines, bottom-right exclusive.",
|
|
238
|
+
items: { type: "array", items: { type: "integer", minimum: 1 }, minItems: 2, maxItems: 2 },
|
|
239
|
+
minItems: 2,
|
|
240
|
+
maxItems: 2
|
|
241
|
+
}
|
|
242
|
+
},
|
|
243
|
+
required: ["id", "area"],
|
|
244
|
+
additionalProperties: false
|
|
245
|
+
},
|
|
246
|
+
execute: (input) => {
|
|
247
|
+
const verdict = decode(PlaceInput, input ?? {});
|
|
248
|
+
if (!verdict.ok) {
|
|
249
|
+
return `place failed. Fix these and call place_query_field again:
|
|
250
|
+
${verdict.report}`;
|
|
251
|
+
}
|
|
252
|
+
const { id, area } = verdict.value;
|
|
253
|
+
const fc = deps.read();
|
|
254
|
+
if (!fc) {
|
|
255
|
+
return "place failed: there is no query form yet. Call insert_query_field first.";
|
|
256
|
+
}
|
|
257
|
+
const fields = Array.isArray(fc.fields) ? fc.fields : [];
|
|
258
|
+
if (!fields.some((f) => f.id === id)) {
|
|
259
|
+
return `place failed: query field id "${id}" is not present. Call list_query_fields to see ids.`;
|
|
260
|
+
}
|
|
261
|
+
const layouts = Array.isArray(fc.layouts) ? fc.layouts : [];
|
|
262
|
+
const ls = layouts[0];
|
|
263
|
+
if (!ls || !ls.layout) {
|
|
264
|
+
return "place failed: the query form has no layout to place into.";
|
|
265
|
+
}
|
|
266
|
+
const placements = { ...ls.layout.placements ?? {} };
|
|
267
|
+
for (const [pid, p] of Object.entries(placements)) {
|
|
268
|
+
if (pid === id) continue;
|
|
269
|
+
if (overlaps(area, p.area)) {
|
|
270
|
+
return `place failed: area overlaps field "${pid}" at ${JSON.stringify(p.area)}. Pick a free area (see list_query_fields) and call again.`;
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
placements[id] = { area };
|
|
274
|
+
const nextLayout = { ...ls.layout, placements };
|
|
275
|
+
growColumns(nextLayout);
|
|
276
|
+
fc.layouts = [{ ...ls, layout: nextLayout }, ...layouts.slice(1)];
|
|
277
|
+
deps.write(fc);
|
|
278
|
+
return { id, area, columns: nextLayout.columns };
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
];
|
|
282
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SELECTIONS_VAR } from "../../../utils/cel-context.js";
|
|
1
|
+
import { OPTIONS_VAR, SELECTIONS_VAR } from "../../../utils/cel-context.js";
|
|
2
2
|
export function registerFormVariablesIfAbsent(env) {
|
|
3
3
|
const declared = new Set(env.getDefinitions().variables.map((v) => v.name));
|
|
4
4
|
if (!declared.has("now")) env.registerVariable("now", "Date", { label: "\u5F53\u524D\u65F6\u95F4", description: "\u5F53\u524D\u65E5\u671F/\u65F6\u95F4" });
|
|
@@ -6,4 +6,5 @@ export function registerFormVariablesIfAbsent(env) {
|
|
|
6
6
|
if (!declared.has("undoable")) env.registerVariable("undoable", "bool", { label: "\u53EF\u64A4\u9500", description: "\u5F53\u524D\u662F\u5426\u6709\u53EF\u64A4\u9500\u7684\u4FEE\u6539" });
|
|
7
7
|
if (!declared.has("redoable")) env.registerVariable("redoable", "bool", { label: "\u53EF\u91CD\u505A", description: "\u5F53\u524D\u662F\u5426\u6709\u53EF\u91CD\u505A\u7684\u4FEE\u6539" });
|
|
8
8
|
if (!declared.has(SELECTIONS_VAR)) env.registerVariable(SELECTIONS_VAR, "dyn", { label: "\u9009\u4E2D\u9879", description: "\u5404\u9009\u62E9\u5B57\u6BB5\u5F53\u524D\u9009\u4E2D\u9879\u7684\u5B8C\u6574\u5BF9\u8C61\uFF08\u6309\u5B57\u6BB5\u6807\u8BC6\uFF09" });
|
|
9
|
+
if (!declared.has(OPTIONS_VAR)) env.registerVariable(OPTIONS_VAR, "dyn", { label: "\u5168\u90E8\u9009\u9879", description: "\u5404\u9009\u62E9\u5B57\u6BB5\u5F53\u524D\u5DF2\u52A0\u8F7D\u7684\u5168\u90E8\u9009\u9879\uFF08\u6309\u5B57\u6BB5\u6807\u8BC6\uFF0C\u5143\u7D20\u4E3A\u9009\u9879\u5B8C\u6574\u5BF9\u8C61\uFF09" });
|
|
9
10
|
}
|
|
@@ -118,6 +118,21 @@ export type FieldEntry = Readonly<{
|
|
|
118
118
|
}>;
|
|
119
119
|
export declare const FIELDS: ReadonlyArray<FieldEntry>;
|
|
120
120
|
export declare function allFieldSchemas(configure: (env: Environment) => void): ReadonlyArray<AnySchema>;
|
|
121
|
+
export declare function latestFieldByType(): ReadonlyArray<FieldEntry>;
|
|
122
|
+
/**
|
|
123
|
+
* AI 工具可见的字段集合:按 `type` 取最新版本 + 排除 `deprecated`。镜像
|
|
124
|
+
* `table/utils/resolve.ts` 的 `activeColumns()`。
|
|
125
|
+
*
|
|
126
|
+
* 两层过滤的原因:
|
|
127
|
+
* (a) `latestFieldByType()` 解决同 `type` 多版本时只留最新版——避免 AI 拿到
|
|
128
|
+
* 已被新版本替代的旧 `compatibilityDate`(我们对 AI 隐藏 compDate);
|
|
129
|
+
* (b) `!deprecated` 同时屏蔽两类情况:同 type 旧日期(已由 (a) 消除),以及
|
|
130
|
+
* 跨类型迁移的源条目(`deriveEntryExtras` 给被 `migrateFrom` 指名的源都
|
|
131
|
+
* 打了 `deprecated: true`)。
|
|
132
|
+
*
|
|
133
|
+
* 人类 picker 仍走 `FIELDS`(含废弃)—— picker 要让用户选到旧字段再触发迁移。
|
|
134
|
+
*/
|
|
135
|
+
export declare function activeFields(): ReadonlyArray<FieldEntry>;
|
|
121
136
|
export declare function findField(type: string, compatibilityDate: string): FieldEntry | undefined;
|
|
122
137
|
/**
|
|
123
138
|
* Finds the registry entry that has declared `(type, compatibilityDate)` as a
|
|
@@ -120,6 +120,19 @@ export function allFieldSchemas(configure) {
|
|
|
120
120
|
identifier: `${entry.type}@${entry.compatibilityDate}`
|
|
121
121
|
}));
|
|
122
122
|
}
|
|
123
|
+
export function latestFieldByType() {
|
|
124
|
+
const byType = /* @__PURE__ */ new Map();
|
|
125
|
+
for (const r of getFields()) {
|
|
126
|
+
const prev = byType.get(r.type);
|
|
127
|
+
if (!prev || r.compatibilityDate > prev.compatibilityDate) {
|
|
128
|
+
byType.set(r.type, r);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
return [...byType.values()];
|
|
132
|
+
}
|
|
133
|
+
export function activeFields() {
|
|
134
|
+
return latestFieldByType().filter((e) => !e.deprecated);
|
|
135
|
+
}
|
|
123
136
|
export function findField(type, compatibilityDate) {
|
|
124
137
|
return getFields().find((f) => f.type === type && f.compatibilityDate === compatibilityDate);
|
|
125
138
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare var __VLS_1: {};
|
|
2
|
+
type __VLS_Slots = {} & {
|
|
3
|
+
default?: (props: typeof __VLS_1) => any;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
6
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
7
|
+
declare const _default: typeof __VLS_export;
|
|
8
|
+
export default _default;
|
|
9
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
10
|
+
new (): {
|
|
11
|
+
$slots: S;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
defineOptions({
|
|
3
|
+
name: "ShwfedHead"
|
|
4
|
+
});
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<template>
|
|
8
|
+
<header class="bg-(--primary) h-12 w-full flex items-center justify-between px-4 gap-4">
|
|
9
|
+
<svg
|
|
10
|
+
width="60"
|
|
11
|
+
height="24"
|
|
12
|
+
viewBox="0 0 60 24"
|
|
13
|
+
fill="none"
|
|
14
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
15
|
+
>
|
|
16
|
+
<path
|
|
17
|
+
d="M43.9352 20.2102C43.7181 20.26 43.3006 19.9779 42.8497 18.6998C42.8497 18.6998 42.0481 17.1063 40.4114 17.0399H34.8167C34.0819 17.0399 33.8648 17.0897 33.1968 17.3221C32.1781 17.6706 32.128 17.4216 32.0779 17.2889C31.8941 17.0233 32.6457 17.0067 32.6624 16.1103C32.6624 16.1103 33.13 6.8482 33.3471 5.25471C32.8294 5.25471 32.5121 4.85634 32.6791 4.37497C32.8294 3.89361 33.5642 3.49524 34.3157 3.49524C34.3157 3.49524 35.7854 3.66122 37.6725 3.66122C39.5764 3.66122 41.3634 3.49524 41.3634 3.49524C42.0982 3.49524 43.0668 3.13006 42.4155 4.37497C42.1817 4.82314 41.5471 4.97253 40.8122 4.97253H36.3866C34.7165 4.97253 34.8167 5.86887 34.4326 6.63241C34.4326 6.63241 33.7312 8.37529 33.5308 15.6124L39.3927 15.297C40.1275 15.297 41.831 15.297 42.499 16.1103C42.9165 16.6415 44.0855 19.6625 43.9352 20.2102ZM42.1316 9.20523C42.0147 9.67 41.4302 10.4335 40.8122 10.4501C39.6432 10.4833 40.0607 11.2967 39.8603 12.7076L39.877 13.1391C39.9104 14.0355 39.6599 14.7658 39.4762 14.7658C39.2758 14.7658 39.1088 14.4505 39.1088 14.0521C39.0921 13.6537 38.9752 12.608 38.8249 11.7283C38.8249 11.7283 38.875 10.6659 38.2738 10.7323L36.9711 10.7655C36.2363 10.7821 36.4367 11.8278 36.2196 13.4047C36.2196 13.4047 36.0526 14.7326 35.7687 14.965C35.5182 14.965 35.3512 14.2513 35.3679 13.3715C35.3679 13.3715 35.4681 9.07244 35.5516 7.99352C35.2677 8.01011 35.1508 7.62834 35.2677 7.16358C35.4013 6.69881 36.1027 6.30044 36.8375 6.26724L39.9939 6.16765C40.7287 6.15105 41.3634 6.03486 41.2465 6.51622C41.1296 6.98099 40.3279 7.47895 39.5764 7.49555L38.3907 7.52875C37.6558 7.54535 36.9377 7.79433 36.5035 8.05991C36.5035 8.05991 36.6705 8.04331 36.4367 9.12224L40.3446 9.03924C41.0962 9.03924 42.2485 8.74046 42.1316 9.20523Z"
|
|
18
|
+
fill="#F9F9FF"
|
|
19
|
+
/>
|
|
20
|
+
<path
|
|
21
|
+
d="M48.8954 15.5625C48.7117 16.0771 48.1104 16.492 47.5593 16.492C47.0082 16.492 46.5573 16.658 46.5573 16.8572C46.5573 17.0564 46.3903 17.2224 46.1899 17.2224C45.9895 17.2224 45.8225 16.5252 45.8225 15.6621V9.75291C45.8225 8.88978 45.739 8.42501 45.6388 8.29222C45.5385 8.14283 45.4717 7.39588 45.5552 6.98091C45.6388 6.56594 45.9895 6.13437 46.2734 6.13437C46.5573 6.13437 46.5907 6.48295 46.574 6.94771C46.5406 7.72786 46.574 8.47481 46.574 9.33794V13.0063C46.574 14.6164 46.7911 14.5666 47.0583 14.5666C47.3255 14.5666 47.5426 13.8694 47.5426 13.0063V6.51614C47.5426 5.65301 47.5593 5.33763 47.4591 5.20484C47.3589 5.05545 47.2921 4.2919 47.3422 3.84373C47.409 3.39557 47.8265 2.83121 48.1438 2.83121C48.4444 2.83121 48.3776 2.881 48.411 3.66115C48.4277 4.12591 48.2941 5.22144 48.2941 6.06798V13.0063C48.2941 14.55 48.5446 14.3342 48.8119 14.3342C49.0791 14.3342 49.2628 13.8694 49.2628 13.0063V8.591C49.2628 7.72786 49.2628 7.62826 49.196 7.32949C49.1626 7.1635 49.0123 6.39995 49.0958 5.96838C49.1793 5.53681 49.4298 4.95586 49.7304 4.95586C50.031 4.95586 50.0143 4.83966 50.0477 5.81899C50.0644 6.30036 49.9976 7.36268 49.9976 8.22582V15.0811C49.9976 15.9443 49.8306 16.6414 49.6302 16.6414C49.4298 16.6414 49.2628 16.1933 49.2628 15.6455C49.2294 15.0811 49.0791 15.0479 48.8954 15.5625ZM53.6717 2.30004L54.0224 2.41624C54.9911 3.22958 54.5735 4.17571 53.822 5.05545C53.822 5.05545 52.1854 6.01818 50.4151 11.9772C50.2147 11.8942 50.2314 11.1472 50.4485 10.3173C50.4485 10.3173 51.7512 5.25463 52.2856 4.20891C52.7532 3.12999 53.0037 2.28345 53.6717 2.30004ZM56.9283 20.6915C56.6945 20.7745 56.2603 20.177 55.9597 19.3802C55.9597 19.3802 54.8742 16.7576 53.7719 17.156H53.1373C52.3023 17.156 51.7512 16.7576 51.9182 16.2762C52.0685 15.7949 52.6029 15.3965 53.1039 15.3965C53.5882 15.3965 54.7239 13.5042 54.7239 13.5042C55.1915 12.7905 55.3919 12.4253 54.5568 12.4253L52.2021 12.3423C51.367 12.3423 50.9662 11.5124 51.033 11.3464C51.0998 11.197 52.0685 11.1472 52.9035 11.1472L55.7092 11.0642C56.9784 11.0476 57.2122 10.948 56.5776 9.65332C56.5776 9.65332 54.8408 5.88539 53.3544 6.33356L53.4546 6.08457C53.7552 5.28783 54.5902 4.98905 55.3084 5.42062C55.3084 5.42062 57.112 6.98091 58.4982 12.9067C58.2644 12.9897 57.6298 12.1099 57.5128 11.7614C57.3959 11.4128 57.1287 11.4958 56.945 11.944C56.7446 12.3921 56.2102 13.3383 55.7259 14.052L55.5756 14.2844C54.6571 15.8779 55.2082 15.8447 55.7092 16.7576C55.6925 16.7078 56.2102 17.0398 56.9283 20.6915ZM52.4192 9.32134L52.4693 9.15536C52.7699 8.34201 53.6717 7.94364 54.4733 8.27562C54.4733 8.27562 54.9911 8.04324 55.1915 10.3007L54.8241 10.5165C54.5234 9.38774 53.5715 9.22175 52.4192 9.32134Z"
|
|
22
|
+
fill="#F9F9FF"
|
|
23
|
+
/>
|
|
24
|
+
<path
|
|
25
|
+
d="M5.85629 21.9539C5.85629 22.1901 5.8228 22.342 5.73907 22.4095C5.65534 22.477 5.53813 22.4938 5.2367 22.4938C4.93528 22.4938 4.81806 22.4601 4.75108 22.4095C4.66735 22.342 4.63386 22.207 4.63386 21.9876V19.9121H4.61711H4.06451H3.44492L3.67936 20.3171H4.06451V21.9707C4.06451 22.3926 4.14823 22.6626 4.31569 22.7976C4.48315 22.9326 4.75108 23.0001 5.28694 23.0001C5.78931 23.0001 6.05724 22.9326 6.2247 22.7976C6.39216 22.6626 6.47588 22.3757 6.47588 21.9539V19.9121H5.85629V21.9539Z"
|
|
26
|
+
fill="#F9F9FF"
|
|
27
|
+
/>
|
|
28
|
+
<path
|
|
29
|
+
d="M8.40161 21.4648C8.33463 21.5998 8.2509 21.7685 8.15043 21.971L8.03321 22.2241L7.91599 22.4772H7.89924V22.2747V22.0723V21.6842V19.9124H7.88249H7.32989H6.7103L6.94474 20.3174H7.32989V22.9666H8.30114L9.17191 21.2792C9.22215 21.1948 9.28913 21.0429 9.37286 20.8405L9.47333 20.6211L9.57381 20.4017H9.59055L9.57381 20.6042V20.8067V21.2117V22.9666H10.1432V19.8955H9.17191L8.40161 21.4648Z"
|
|
30
|
+
fill="#F9F9FF"
|
|
31
|
+
/>
|
|
32
|
+
<path
|
|
33
|
+
d="M15.8701 19.8955H15.3008V22.9666H17.5782L17.7959 22.4435H15.8701V19.8955Z"
|
|
34
|
+
fill="#F9F9FF"
|
|
35
|
+
/>
|
|
36
|
+
<path
|
|
37
|
+
d="M18.6834 21.6167H20.1236V21.1779H18.6834V20.3849H20.1905V19.8955H18.1141V22.9666H20.3915L20.6259 22.4772H18.6834V21.6167Z"
|
|
38
|
+
fill="#F9F9FF"
|
|
39
|
+
/>
|
|
40
|
+
<path
|
|
41
|
+
d="M27.0898 20.1824C26.9224 19.9968 26.6209 19.8955 26.2023 19.8955H24.7119V22.1229H25.2813V20.3849H26.1353C26.4032 20.3849 26.5707 20.4524 26.6544 20.5705C26.7214 20.6886 26.7716 20.9754 26.7716 21.431C26.7716 21.8698 26.7382 22.1566 26.6544 22.2747C26.5707 22.4097 26.3865 22.4604 26.1186 22.4604H25.2813H24.6952L24.4272 22.9497H26.219C26.7047 22.9497 27.0061 22.8485 27.14 22.6291C27.274 22.4097 27.341 21.9204 27.341 21.1611C27.341 20.7055 27.2573 20.368 27.0898 20.1824Z"
|
|
42
|
+
fill="#F9F9FF"
|
|
43
|
+
/>
|
|
44
|
+
<path
|
|
45
|
+
d="M21.9656 19.8955L20.7264 22.9666H21.3293L22.401 20.3511L23.4894 22.9666H24.0755L22.8196 19.8955H21.9656Z"
|
|
46
|
+
fill="#F9F9FF"
|
|
47
|
+
/>
|
|
48
|
+
<path
|
|
49
|
+
d="M2.5406 21.9541C2.5406 22.1903 2.52386 22.3422 2.47362 22.4097C2.42338 22.4772 2.30616 22.5109 2.12196 22.5109C1.82054 22.5109 1.5861 22.4097 1.5861 22.2409C1.5861 22.2072 1.5861 22.0553 1.5861 21.8866L1 21.5491V21.9878C1 22.4097 1.06698 22.6628 1.20095 22.7978C1.33491 22.9159 1.66983 23.0003 2.10521 23.0003C2.52386 23.0003 2.79179 22.9159 2.92575 22.7978C3.05972 22.6628 3.1267 22.4266 3.1267 22.0385V19.9292H2.5406V21.9541Z"
|
|
50
|
+
fill="#F9F9FF"
|
|
51
|
+
/>
|
|
52
|
+
<path
|
|
53
|
+
d="M11.7842 21.2115L12.0019 21.6333H12.9396V21.8864C12.9396 22.2577 12.8894 22.3083 12.8057 22.3926C12.7219 22.4601 12.5042 22.4939 12.1861 22.4939C11.8679 22.4939 11.6502 22.4601 11.5665 22.3758C11.4828 22.2914 11.4325 22.1058 11.4325 21.8021V21.0933C11.4325 20.7896 11.4828 20.5871 11.5665 20.5028C11.6502 20.4184 11.8679 20.3846 12.2028 20.3846C12.5042 20.3846 12.7052 20.4015 12.7722 20.4521C12.8392 20.4859 12.8727 20.5703 12.8894 20.7052H13.4755C13.4588 20.3678 13.375 20.1653 13.2411 20.0472C13.0903 19.929 12.7387 19.8784 12.1861 19.8784C11.7674 19.8784 11.4828 19.9122 11.3153 19.9965C11.1478 20.064 11.0139 20.2159 10.9302 20.4353C10.8799 20.5703 10.8464 20.8234 10.8297 21.2283V21.6502C10.8297 21.6671 10.8297 21.6839 10.8297 21.7008C10.8297 22.2239 10.9134 22.5783 11.0809 22.747C11.2483 22.9157 11.6 23.0001 12.1191 23.0001C12.6885 23.0001 13.0569 22.882 13.2243 22.747C13.3918 22.612 13.4755 22.4433 13.4755 21.9539L13.4588 21.2115H11.7842Z"
|
|
54
|
+
fill="#F9F9FF"
|
|
55
|
+
/>
|
|
56
|
+
<path
|
|
57
|
+
d="M14.2124 9.11474L15.1669 10.785L16.473 8.52425L15.5185 6.85403L14.2124 4.59333L12.5546 1.7084L11.7508 0.308113C11.5331 -0.079918 10.9805 -0.079918 10.7628 0.308113L9.95898 1.7084L11.2651 3.9691L12.923 6.85403L7.78204 15.8125H4.48314L9.95898 6.24668L8.65282 3.98598L1.88756 15.8125L1.08377 17.2128C0.866079 17.6008 1.13401 18.0732 1.58614 18.0732H3.17698H6.47588H9.07146L10.3776 15.8125L14.2124 9.11474Z"
|
|
58
|
+
fill="#F9F9FF"
|
|
59
|
+
/>
|
|
60
|
+
<path
|
|
61
|
+
d="M26.5539 15.8123L23.1713 9.89058C23.0876 9.75561 22.8866 9.75561 22.8196 9.89058L20.9106 13.2142C20.8269 13.3491 20.9274 13.5178 21.0948 13.5178H22.6689L23.7909 15.4749C23.8746 15.6098 23.7741 15.7785 23.6067 15.7785H16.8247L20.3915 9.55316L21.6977 7.29246L20.3915 5.03175L18.4658 1.69131L17.662 0.291023C17.4443 -0.0970078 16.8917 -0.0970078 16.674 0.291023L15.8702 1.69131L14.7315 3.68208L16.0376 5.94278L17.1764 3.96889L19.1021 7.3262L14.2291 15.8123L13.1072 17.7693C13.0234 17.9043 13.1239 18.073 13.2914 18.073H15.5353H25.2645H26.8721C27.3075 18.073 27.5922 17.5837 27.3745 17.2126L26.5539 15.8123Z"
|
|
62
|
+
fill="#F9F9FF"
|
|
63
|
+
/>
|
|
64
|
+
</svg>
|
|
65
|
+
<div class="flex-1">
|
|
66
|
+
<slot />
|
|
67
|
+
</div>
|
|
68
|
+
</header>
|
|
69
|
+
</template>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare var __VLS_1: {};
|
|
2
|
+
type __VLS_Slots = {} & {
|
|
3
|
+
default?: (props: typeof __VLS_1) => any;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
6
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
7
|
+
declare const _default: typeof __VLS_export;
|
|
8
|
+
export default _default;
|
|
9
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
10
|
+
new (): {
|
|
11
|
+
$slots: S;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { SidebarEditorState } from './use-editor.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
state: SidebarEditorState;
|
|
4
|
+
};
|
|
5
|
+
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>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|