@shwfed/config 2.4.1 → 2.5.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 +222 -45
- package/dist/module.json +1 -1
- package/dist/preview/assets/{config-ByTxMBcK.js → config-2hrRmW-I.js} +1 -1
- package/dist/preview/assets/{config-Q86AhjHq.js → config-BfzthOw9.js} +1 -1
- package/dist/preview/assets/{config-C7xYpB3N.js → config-BsgSoDjY.js} +1 -1
- package/dist/preview/assets/{config-CH9wsYX8.js → config-CaLzEMyt.js} +1 -1
- package/dist/preview/assets/{config-D50Rl2n_.js → config-DKtPKn2s.js} +1 -1
- package/dist/preview/assets/{config-BovRv7Mw.js → config-DdgZWox9.js} +1 -1
- package/dist/preview/assets/{config-Ch5dL5lp.js → config-h_LH1CT_.js} +1 -1
- package/dist/preview/assets/{config-DiwVK32V.js → config-nsiwkAq8.js} +1 -1
- package/dist/preview/assets/{config-EKVeWrbS.js → config-zxVo1EOM.js} +1 -1
- package/dist/preview/assets/{definition.vue_vue_type_script_setup_true_lang-D8NPPbjZ.js → definition.vue_vue_type_script_setup_true_lang-CLpbGZ37.js} +1 -1
- package/dist/preview/assets/index-C0NJ1FZp.js +1 -0
- package/dist/preview/assets/index-C5dK4QAf.js +668 -0
- package/dist/preview/assets/{index-65eB1l4r.css → index-nvAUAYGM.css} +1 -1
- package/dist/preview/assets/{runtime-D34aQN00.js → runtime-527oKJb4.js} +1 -1
- package/dist/preview/assets/{runtime-BP7zXnyG.js → runtime-BLhH77F7.js} +1 -1
- package/dist/preview/assets/{runtime-a9TOQRwD.js → runtime-BRWnAaFs.js} +1 -1
- package/dist/preview/assets/{runtime-BwR_BbTu.js → runtime-CEXA5ttw.js} +1 -1
- package/dist/preview/assets/{runtime-Cunk4vOs.js → runtime-CZZWuLu9.js} +1 -1
- package/dist/preview/assets/{runtime-Ch3JIgUQ.js → runtime-DOLtY37Y.js} +1 -1
- package/dist/preview/assets/{runtime-BQSwNpLC.js → runtime-DZqXButD.js} +1 -1
- package/dist/preview/assets/{runtime-aPt-bW3F.js → runtime-MJo092Ed.js} +1 -1
- package/dist/preview/assets/{runtime-CjvZcU7X.js → runtime-i3-6DCWP.js} +1 -1
- package/dist/preview/index.html +2 -2
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/schema.d.ts +1 -1
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.d.vue.ts +2 -2
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.vue.d.ts +2 -2
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/config.d.vue.ts +2 -2
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/config.vue.d.ts +2 -2
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.d.vue.ts +2 -2
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.vue.d.ts +2 -2
- package/dist/runtime/components/form/fields/2026-05-23/com.shwfed.form.field.tree.multi/config.d.vue.ts +20 -20
- package/dist/runtime/components/form/fields/2026-05-23/com.shwfed.form.field.tree.multi/config.vue.d.ts +20 -20
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/config.d.vue.ts +20 -20
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/config.vue.d.ts +20 -20
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/config.d.vue.ts +20 -20
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/config.vue.d.ts +20 -20
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/config.d.vue.ts +20 -20
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/config.vue.d.ts +20 -20
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/config.d.vue.ts +20 -20
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/config.vue.d.ts +20 -20
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/config.d.vue.ts +20 -20
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/config.vue.d.ts +20 -20
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/config.d.vue.ts +20 -20
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/config.vue.d.ts +20 -20
- package/dist/runtime/components/form/index.vue +5 -18
- package/dist/runtime/components/form/schema.d.ts +2 -10
- package/dist/runtime/components/form/schema.js +2 -5
- package/dist/runtime/components/form/utils/cel-scope.d.ts +12 -3
- package/dist/runtime/components/form/utils/cel-scope.js +17 -18
- package/dist/runtime/components/form/utils/form-vars.d.ts +19 -0
- package/dist/runtime/components/form/utils/form-vars.js +5 -0
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.actions/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.actions/schema.js +8 -0
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.date/config.vue +20 -8
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.date/schema.d.ts +2 -0
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.date/schema.js +8 -0
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.icon/config.vue +21 -8
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.icon/schema.d.ts +2 -0
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.icon/schema.js +7 -0
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.markdown/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.markdown/schema.js +7 -0
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.number/config.vue +21 -8
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.number/schema.d.ts +2 -0
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.number/schema.js +8 -0
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.select/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.select/schema.js +5 -0
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.text/config.vue +21 -8
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.text/schema.d.ts +2 -0
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.text/schema.js +7 -0
- package/dist/runtime/components/table/columns/2026-05-13/com.shwfed.table.column.switch/config.vue +21 -8
- package/dist/runtime/components/table/columns/2026-05-13/com.shwfed.table.column.switch/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-13/com.shwfed.table.column.switch.remote/config.vue +21 -8
- package/dist/runtime/components/table/columns/2026-05-13/com.shwfed.table.column.switch.remote/schema.d.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-13/com.shwfed.table.column.switch.remote/schema.js +7 -0
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.combobox-single/config.d.vue.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.combobox-single/config.vue +20 -8
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.combobox-single/config.vue.d.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.combobox-single/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.number-input/config.vue +20 -7
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.number-input/schema.d.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.number-input/schema.js +7 -0
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.switch/config.vue +20 -8
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.switch/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.switch.local/config.vue +20 -8
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.switch.local/schema.d.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.switch.local/schema.js +7 -0
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.text-input/config.vue +20 -8
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.text-input/schema.d.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.text-input/schema.js +7 -0
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/config.d.vue.ts +6 -4
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/config.vue +21 -8
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/config.vue.d.ts +6 -4
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-static/config.d.vue.ts +4 -2
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-static/config.vue +20 -8
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-static/config.vue.d.ts +4 -2
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-static/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi/config.d.vue.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi/config.vue +20 -8
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi/config.vue.d.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/config.d.vue.ts +6 -4
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/config.vue +21 -8
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/config.vue.d.ts +6 -4
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/config.d.vue.ts +4 -2
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/config.vue +20 -8
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/config.vue.d.ts +4 -2
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi/config.d.vue.ts +4 -2
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi/config.vue +20 -8
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi/config.vue.d.ts +4 -2
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/config.d.vue.ts +6 -4
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/config.vue +20 -8
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/config.vue.d.ts +6 -4
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single/config.d.vue.ts +4 -2
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single/config.vue +20 -8
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single/config.vue.d.ts +4 -2
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single.remote/config.d.vue.ts +6 -4
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single.remote/config.vue +20 -8
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single.remote/config.vue.d.ts +6 -4
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single.remote/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/config.d.vue.ts +8 -6
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/config.vue +20 -7
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/config.vue.d.ts +8 -6
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-single/config.d.vue.ts +6 -4
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-single/config.vue +20 -7
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-single/config.vue.d.ts +6 -4
- package/dist/runtime/components/table/columns/2026-05-27/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.combobox-multi/config.d.vue.ts +6 -4
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/config.vue +20 -8
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/config.vue.d.ts +6 -4
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/schema.d.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/schema.js +10 -1
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/config.d.vue.ts +6 -4
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/config.vue +20 -8
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/config.vue.d.ts +6 -4
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/schema.d.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/schema.js +10 -1
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/config.d.vue.ts +8 -6
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/config.vue +20 -7
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/config.vue.d.ts +8 -6
- 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 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/config.d.vue.ts +6 -4
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/config.vue +20 -7
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/config.vue.d.ts +6 -4
- 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 -0
- package/dist/runtime/components/table/config.vue +24 -103
- package/dist/runtime/components/table/index.vue +22 -2
- package/dist/runtime/components/table/schema.d.ts +4 -2
- package/dist/runtime/components/table/schema.js +69 -13
- package/dist/runtime/components/table/utils/resolve.d.ts +14 -0
- package/dist/runtime/components/table/utils/resolve.js +2 -1
- package/dist/runtime/components/table/utils/shared.d.ts +2 -0
- package/dist/runtime/components/table/utils/shared.js +10 -2
- package/package.json +1 -1
- package/dist/preview/assets/index-CIrlYN0M.js +0 -1
- package/dist/preview/assets/index-DUDlWaQI.js +0 -661
package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.text/schema.d.ts
CHANGED
|
@@ -25,6 +25,7 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
|
|
|
25
25
|
}>]>;
|
|
26
26
|
accessor: Schema.Schema<string, string, never>;
|
|
27
27
|
enableSorting: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
|
|
28
|
+
sortKey: Schema.optional<Schema.refine<string, typeof Schema.String>>;
|
|
28
29
|
size: Schema.optional<Schema.refine<number, Schema.filter<typeof Schema.Number>>>;
|
|
29
30
|
grow: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
|
|
30
31
|
tooltip: Schema.optional<Schema.TupleType<readonly [Schema.Struct<{
|
|
@@ -40,4 +41,5 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
|
|
|
40
41
|
compatibilityDate: Schema.Literal<["2026-04-14"]>;
|
|
41
42
|
}>;
|
|
42
43
|
export type Value = Schema.Schema.Type<ReturnType<typeof schema>>;
|
|
44
|
+
export declare function defaults(): Partial<Value>;
|
|
43
45
|
export declare function toColumnDef(value: Value, { getLocaleText, $cel, inheritedContext }: ColumnDefDeps): Partial<ColumnDef<unknown, unknown>>;
|
package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.text/schema.js
CHANGED
|
@@ -27,6 +27,13 @@ export function schema(configure) {
|
|
|
27
27
|
}))
|
|
28
28
|
}).annotations({ title: "TextRenderer", description: "\u6587\u672C\u6E32\u67D3\u5668" });
|
|
29
29
|
}
|
|
30
|
+
export function defaults() {
|
|
31
|
+
return {
|
|
32
|
+
title: [{ locale: "zh", message: "" }],
|
|
33
|
+
accessor: "",
|
|
34
|
+
size: 120
|
|
35
|
+
};
|
|
36
|
+
}
|
|
30
37
|
export function toColumnDef(value, { getLocaleText, $cel, inheritedContext }) {
|
|
31
38
|
return {
|
|
32
39
|
header: getLocaleText(value.title),
|
package/dist/runtime/components/table/columns/2026-05-13/com.shwfed.table.column.switch/config.vue
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import { computed } from "vue";
|
|
3
3
|
import { Icon } from "@iconify/vue";
|
|
4
4
|
import { ExpressionEditor } from "../../../../ui/expression-editor";
|
|
5
|
-
import { Switch } from "../../../../ui/switch";
|
|
6
5
|
import { Separator } from "../../../../ui/separator";
|
|
7
6
|
import { Field, FieldLabel } from "../../../../ui/field";
|
|
8
7
|
import { Locale } from "../../../../ui/locale";
|
|
@@ -10,6 +9,7 @@ import {
|
|
|
10
9
|
InputGroup,
|
|
11
10
|
InputGroupAddon,
|
|
12
11
|
InputGroupButton,
|
|
12
|
+
InputGroupInput,
|
|
13
13
|
InputGroupNumberField
|
|
14
14
|
} from "../../../../ui/input-group";
|
|
15
15
|
import {
|
|
@@ -279,14 +279,10 @@ function updateTriggers(next) {
|
|
|
279
279
|
<Separator />
|
|
280
280
|
<div class="flex flex-wrap gap-x-8 gap-y-3">
|
|
281
281
|
<Field
|
|
282
|
-
orientation="
|
|
283
|
-
class="w-
|
|
282
|
+
orientation="vertical"
|
|
283
|
+
class="w-full max-w-xs"
|
|
284
284
|
>
|
|
285
|
-
<
|
|
286
|
-
:model-value="value.enableSorting ?? false"
|
|
287
|
-
@update:model-value="(v) => value.enableSorting = v"
|
|
288
|
-
/>
|
|
289
|
-
<FieldLabel class="text-sm text-zinc-600">
|
|
285
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
290
286
|
<template
|
|
291
287
|
v-if="fieldDescription('enableSorting')"
|
|
292
288
|
#tooltip
|
|
@@ -299,6 +295,23 @@ function updateTriggers(next) {
|
|
|
299
295
|
</template>
|
|
300
296
|
{{ fieldTitle("enableSorting") }}
|
|
301
297
|
</FieldLabel>
|
|
298
|
+
<InputGroup>
|
|
299
|
+
<InputGroupInput
|
|
300
|
+
:model-value="value.sortKey"
|
|
301
|
+
placeholder="例:created_at"
|
|
302
|
+
@update:model-value="(v) => value.sortKey = v || void 0"
|
|
303
|
+
/>
|
|
304
|
+
<InputGroupAddon align="inline-end">
|
|
305
|
+
<InputGroupButton
|
|
306
|
+
:variant="value.enableSorting ? 'primary' : 'ghost'"
|
|
307
|
+
size="xs"
|
|
308
|
+
@click="value.enableSorting = !value.enableSorting"
|
|
309
|
+
>
|
|
310
|
+
<Icon :icon="value.enableSorting ? 'fluent:arrow-sort-up-16-regular' : 'fluent:arrow-sort-16-regular'" />
|
|
311
|
+
{{ fieldTitle("enableSorting") }}
|
|
312
|
+
</InputGroupButton>
|
|
313
|
+
</InputGroupAddon>
|
|
314
|
+
</InputGroup>
|
|
302
315
|
</Field>
|
|
303
316
|
</div>
|
|
304
317
|
</div>
|
package/dist/runtime/components/table/columns/2026-05-13/com.shwfed.table.column.switch/schema.d.ts
CHANGED
|
@@ -28,6 +28,7 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
|
|
|
28
28
|
}>]>;
|
|
29
29
|
accessor: Schema.Schema<string, string, never>;
|
|
30
30
|
enableSorting: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
|
|
31
|
+
sortKey: Schema.optional<Schema.refine<string, typeof Schema.String>>;
|
|
31
32
|
size: Schema.optional<Schema.refine<number, Schema.filter<typeof Schema.Number>>>;
|
|
32
33
|
grow: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
|
|
33
34
|
tooltip: Schema.optional<Schema.TupleType<readonly [Schema.Struct<{
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import { computed } from "vue";
|
|
3
3
|
import { Icon } from "@iconify/vue";
|
|
4
4
|
import { ExpressionEditor } from "../../../../ui/expression-editor";
|
|
5
|
-
import { Switch } from "../../../../ui/switch";
|
|
6
5
|
import { Separator } from "../../../../ui/separator";
|
|
7
6
|
import { Field, FieldLabel } from "../../../../ui/field";
|
|
8
7
|
import { Locale } from "../../../../ui/locale";
|
|
@@ -10,6 +9,7 @@ import {
|
|
|
10
9
|
InputGroup,
|
|
11
10
|
InputGroupAddon,
|
|
12
11
|
InputGroupButton,
|
|
12
|
+
InputGroupInput,
|
|
13
13
|
InputGroupNumberField
|
|
14
14
|
} from "../../../../ui/input-group";
|
|
15
15
|
import {
|
|
@@ -279,14 +279,10 @@ function updateTriggers(next) {
|
|
|
279
279
|
<Separator />
|
|
280
280
|
<div class="flex flex-wrap gap-x-8 gap-y-3">
|
|
281
281
|
<Field
|
|
282
|
-
orientation="
|
|
283
|
-
class="w-
|
|
282
|
+
orientation="vertical"
|
|
283
|
+
class="w-full max-w-xs"
|
|
284
284
|
>
|
|
285
|
-
<
|
|
286
|
-
:model-value="value.enableSorting ?? false"
|
|
287
|
-
@update:model-value="(v) => value.enableSorting = v"
|
|
288
|
-
/>
|
|
289
|
-
<FieldLabel class="text-sm text-zinc-600">
|
|
285
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
290
286
|
<template
|
|
291
287
|
v-if="fieldDescription('enableSorting')"
|
|
292
288
|
#tooltip
|
|
@@ -299,6 +295,23 @@ function updateTriggers(next) {
|
|
|
299
295
|
</template>
|
|
300
296
|
{{ fieldTitle("enableSorting") }}
|
|
301
297
|
</FieldLabel>
|
|
298
|
+
<InputGroup>
|
|
299
|
+
<InputGroupInput
|
|
300
|
+
:model-value="value.sortKey"
|
|
301
|
+
placeholder="例:created_at"
|
|
302
|
+
@update:model-value="(v) => value.sortKey = v || void 0"
|
|
303
|
+
/>
|
|
304
|
+
<InputGroupAddon align="inline-end">
|
|
305
|
+
<InputGroupButton
|
|
306
|
+
:variant="value.enableSorting ? 'primary' : 'ghost'"
|
|
307
|
+
size="xs"
|
|
308
|
+
@click="value.enableSorting = !value.enableSorting"
|
|
309
|
+
>
|
|
310
|
+
<Icon :icon="value.enableSorting ? 'fluent:arrow-sort-up-16-regular' : 'fluent:arrow-sort-16-regular'" />
|
|
311
|
+
{{ fieldTitle("enableSorting") }}
|
|
312
|
+
</InputGroupButton>
|
|
313
|
+
</InputGroupAddon>
|
|
314
|
+
</InputGroup>
|
|
302
315
|
</Field>
|
|
303
316
|
</div>
|
|
304
317
|
</div>
|
|
@@ -28,6 +28,7 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
|
|
|
28
28
|
}>]>;
|
|
29
29
|
accessor: Schema.Schema<string, string, never>;
|
|
30
30
|
enableSorting: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
|
|
31
|
+
sortKey: Schema.optional<Schema.refine<string, typeof Schema.String>>;
|
|
31
32
|
size: Schema.optional<Schema.refine<number, Schema.filter<typeof Schema.Number>>>;
|
|
32
33
|
grow: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
|
|
33
34
|
tooltip: Schema.optional<Schema.TupleType<readonly [Schema.Struct<{
|
|
@@ -43,6 +44,7 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
|
|
|
43
44
|
compatibilityDate: Schema.Literal<["2026-05-13"]>;
|
|
44
45
|
}>;
|
|
45
46
|
export type Value = Schema.Schema.Type<ReturnType<typeof schema>>;
|
|
47
|
+
export declare function defaults(): Partial<Value>;
|
|
46
48
|
/**
|
|
47
49
|
* Adopts values that were stored under the pre-split `com.shwfed.table.column.switch`
|
|
48
50
|
* type at the same `compatibilityDate`. The field shape is byte-identical to
|
|
@@ -48,6 +48,13 @@ export function schema(configure) {
|
|
|
48
48
|
}))
|
|
49
49
|
}).annotations({ title: "SwitchRenderer", description: "\u5F00\u5173\u6E32\u67D3\u5668\uFF08\u53EF\u7F16\u8F91\uFF09" });
|
|
50
50
|
}
|
|
51
|
+
export function defaults() {
|
|
52
|
+
return {
|
|
53
|
+
title: [{ locale: "zh", message: "" }],
|
|
54
|
+
accessor: "",
|
|
55
|
+
size: 120
|
|
56
|
+
};
|
|
57
|
+
}
|
|
51
58
|
export const migrateFrom = [
|
|
52
59
|
{ type: "com.shwfed.table.column.switch", compatibilityDate }
|
|
53
60
|
];
|
|
@@ -64,6 +64,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
64
64
|
readonly expression: string;
|
|
65
65
|
} | undefined;
|
|
66
66
|
readonly enableSorting?: boolean | undefined;
|
|
67
|
+
readonly sortKey?: string | undefined;
|
|
67
68
|
}) => any;
|
|
68
69
|
}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
69
70
|
"onUpdate:modelValue"?: ((value: {
|
|
@@ -127,6 +128,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
127
128
|
readonly expression: string;
|
|
128
129
|
} | undefined;
|
|
129
130
|
readonly enableSorting?: boolean | undefined;
|
|
131
|
+
readonly sortKey?: string | undefined;
|
|
130
132
|
}) => any) | undefined;
|
|
131
133
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
132
134
|
declare const _default: typeof __VLS_export;
|
|
@@ -4,7 +4,6 @@ import { Icon } from "@iconify/vue";
|
|
|
4
4
|
import { Button } from "../../../../ui/button";
|
|
5
5
|
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from "../../../../ui/dropdown-menu";
|
|
6
6
|
import { ExpressionEditor } from "../../../../ui/expression-editor";
|
|
7
|
-
import { Switch } from "../../../../ui/switch";
|
|
8
7
|
import { Separator } from "../../../../ui/separator";
|
|
9
8
|
import { Field, FieldLabel } from "../../../../ui/field";
|
|
10
9
|
import { Locale } from "../../../../ui/locale";
|
|
@@ -507,14 +506,10 @@ function setItemTooltip(index, tooltip) {
|
|
|
507
506
|
<Separator />
|
|
508
507
|
<div class="flex flex-wrap gap-x-8 gap-y-3">
|
|
509
508
|
<Field
|
|
510
|
-
orientation="
|
|
511
|
-
class="w-
|
|
509
|
+
orientation="vertical"
|
|
510
|
+
class="w-full max-w-xs"
|
|
512
511
|
>
|
|
513
|
-
<
|
|
514
|
-
:model-value="value.enableSorting ?? false"
|
|
515
|
-
@update:model-value="(v) => value = { ...value, enableSorting: v }"
|
|
516
|
-
/>
|
|
517
|
-
<FieldLabel class="text-sm text-zinc-600">
|
|
512
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
518
513
|
<template
|
|
519
514
|
v-if="fieldDescription('enableSorting')"
|
|
520
515
|
#tooltip
|
|
@@ -527,6 +522,23 @@ function setItemTooltip(index, tooltip) {
|
|
|
527
522
|
</template>
|
|
528
523
|
{{ fieldTitle("enableSorting") }}
|
|
529
524
|
</FieldLabel>
|
|
525
|
+
<InputGroup>
|
|
526
|
+
<InputGroupInput
|
|
527
|
+
:model-value="value.sortKey"
|
|
528
|
+
placeholder="例:created_at"
|
|
529
|
+
@update:model-value="(v) => value = { ...value, sortKey: v || void 0 }"
|
|
530
|
+
/>
|
|
531
|
+
<InputGroupAddon align="inline-end">
|
|
532
|
+
<InputGroupButton
|
|
533
|
+
:variant="value.enableSorting ? 'primary' : 'ghost'"
|
|
534
|
+
size="xs"
|
|
535
|
+
@click="value = { ...value, enableSorting: !value.enableSorting }"
|
|
536
|
+
>
|
|
537
|
+
<Icon :icon="value.enableSorting ? 'fluent:arrow-sort-up-16-regular' : 'fluent:arrow-sort-16-regular'" />
|
|
538
|
+
{{ fieldTitle("enableSorting") }}
|
|
539
|
+
</InputGroupButton>
|
|
540
|
+
</InputGroupAddon>
|
|
541
|
+
</InputGroup>
|
|
530
542
|
</Field>
|
|
531
543
|
</div>
|
|
532
544
|
</div>
|
|
@@ -64,6 +64,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
64
64
|
readonly expression: string;
|
|
65
65
|
} | undefined;
|
|
66
66
|
readonly enableSorting?: boolean | undefined;
|
|
67
|
+
readonly sortKey?: string | undefined;
|
|
67
68
|
}) => any;
|
|
68
69
|
}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
69
70
|
"onUpdate:modelValue"?: ((value: {
|
|
@@ -127,6 +128,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
127
128
|
readonly expression: string;
|
|
128
129
|
} | undefined;
|
|
129
130
|
readonly enableSorting?: boolean | undefined;
|
|
131
|
+
readonly sortKey?: string | undefined;
|
|
130
132
|
}) => any) | undefined;
|
|
131
133
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
132
134
|
declare const _default: typeof __VLS_export;
|
|
@@ -106,6 +106,7 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
|
|
|
106
106
|
}>]>;
|
|
107
107
|
binding: Schema.refine<string, typeof Schema.String>;
|
|
108
108
|
enableSorting: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
|
|
109
|
+
sortKey: Schema.optional<Schema.refine<string, typeof Schema.String>>;
|
|
109
110
|
size: Schema.optional<Schema.refine<number, Schema.filter<typeof Schema.Number>>>;
|
|
110
111
|
grow: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
|
|
111
112
|
tooltip: Schema.optional<Schema.TupleType<readonly [Schema.Struct<{
|
|
@@ -449,14 +449,10 @@ function onValueAsStringChange(next) {
|
|
|
449
449
|
<Separator />
|
|
450
450
|
<div class="flex flex-wrap gap-x-8 gap-y-3">
|
|
451
451
|
<Field
|
|
452
|
-
orientation="
|
|
453
|
-
class="w-
|
|
452
|
+
orientation="vertical"
|
|
453
|
+
class="w-full max-w-xs"
|
|
454
454
|
>
|
|
455
|
-
<
|
|
456
|
-
:model-value="value.enableSorting ?? false"
|
|
457
|
-
@update:model-value="(v) => value.enableSorting = v"
|
|
458
|
-
/>
|
|
459
|
-
<FieldLabel class="text-sm text-zinc-600">
|
|
455
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
460
456
|
<template
|
|
461
457
|
v-if="fieldDescription('enableSorting')"
|
|
462
458
|
#tooltip
|
|
@@ -469,6 +465,23 @@ function onValueAsStringChange(next) {
|
|
|
469
465
|
</template>
|
|
470
466
|
{{ fieldTitle("enableSorting") }}
|
|
471
467
|
</FieldLabel>
|
|
468
|
+
<InputGroup>
|
|
469
|
+
<InputGroupInput
|
|
470
|
+
:model-value="value.sortKey"
|
|
471
|
+
placeholder="例:created_at"
|
|
472
|
+
@update:model-value="(v) => value.sortKey = v || void 0"
|
|
473
|
+
/>
|
|
474
|
+
<InputGroupAddon align="inline-end">
|
|
475
|
+
<InputGroupButton
|
|
476
|
+
:variant="value.enableSorting ? 'primary' : 'ghost'"
|
|
477
|
+
size="xs"
|
|
478
|
+
@click="value.enableSorting = !value.enableSorting"
|
|
479
|
+
>
|
|
480
|
+
<Icon :icon="value.enableSorting ? 'fluent:arrow-sort-up-16-regular' : 'fluent:arrow-sort-16-regular'" />
|
|
481
|
+
{{ fieldTitle("enableSorting") }}
|
|
482
|
+
</InputGroupButton>
|
|
483
|
+
</InputGroupAddon>
|
|
484
|
+
</InputGroup>
|
|
472
485
|
</Field>
|
|
473
486
|
</div>
|
|
474
487
|
</div>
|
|
@@ -38,6 +38,7 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
|
|
|
38
38
|
}>]>;
|
|
39
39
|
binding: Schema.refine<string, typeof Schema.String>;
|
|
40
40
|
enableSorting: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
|
|
41
|
+
sortKey: Schema.optional<Schema.refine<string, typeof Schema.String>>;
|
|
41
42
|
size: Schema.optional<Schema.refine<number, Schema.filter<typeof Schema.Number>>>;
|
|
42
43
|
grow: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
|
|
43
44
|
tooltip: Schema.optional<Schema.TupleType<readonly [Schema.Struct<{
|
|
@@ -53,4 +54,5 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
|
|
|
53
54
|
compatibilityDate: Schema.Literal<["2026-05-20"]>;
|
|
54
55
|
}>;
|
|
55
56
|
export type Value = Schema.Schema.Type<ReturnType<typeof schema>>;
|
|
57
|
+
export declare function defaults(): Partial<Value>;
|
|
56
58
|
export declare function toColumnDef(value: Value, { getLocaleText }: ColumnDefDeps): Partial<ColumnDef<unknown, unknown>>;
|
|
@@ -58,6 +58,13 @@ export function schema(configure) {
|
|
|
58
58
|
derived: derivedRowField(configure, "number")
|
|
59
59
|
}).annotations({ title: "NumberInputRenderer", description: "\u6570\u503C\u8F93\u5165\u6E32\u67D3\u5668\uFF08\u53EF\u7F16\u8F91\uFF09" });
|
|
60
60
|
}
|
|
61
|
+
export function defaults() {
|
|
62
|
+
return {
|
|
63
|
+
title: [{ locale: "zh", message: "" }],
|
|
64
|
+
binding: "",
|
|
65
|
+
size: 120
|
|
66
|
+
};
|
|
67
|
+
}
|
|
61
68
|
export function toColumnDef(value, { getLocaleText }) {
|
|
62
69
|
return {
|
|
63
70
|
header: editableHeader(getLocaleText(value.title)),
|
package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.switch/config.vue
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import { computed } from "vue";
|
|
3
3
|
import { Icon } from "@iconify/vue";
|
|
4
4
|
import { ExpressionEditor } from "../../../../ui/expression-editor";
|
|
5
|
-
import { Switch } from "../../../../ui/switch";
|
|
6
5
|
import { Separator } from "../../../../ui/separator";
|
|
7
6
|
import { Field, FieldLabel } from "../../../../ui/field";
|
|
8
7
|
import { Locale } from "../../../../ui/locale";
|
|
@@ -284,14 +283,10 @@ const derivedModel = computed({
|
|
|
284
283
|
<Separator />
|
|
285
284
|
<div class="flex flex-wrap gap-x-8 gap-y-3">
|
|
286
285
|
<Field
|
|
287
|
-
orientation="
|
|
288
|
-
class="w-
|
|
286
|
+
orientation="vertical"
|
|
287
|
+
class="w-full max-w-xs"
|
|
289
288
|
>
|
|
290
|
-
<
|
|
291
|
-
:model-value="value.enableSorting ?? false"
|
|
292
|
-
@update:model-value="(v) => value.enableSorting = v"
|
|
293
|
-
/>
|
|
294
|
-
<FieldLabel class="text-sm text-zinc-600">
|
|
289
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
295
290
|
<template
|
|
296
291
|
v-if="fieldDescription('enableSorting')"
|
|
297
292
|
#tooltip
|
|
@@ -304,6 +299,23 @@ const derivedModel = computed({
|
|
|
304
299
|
</template>
|
|
305
300
|
{{ fieldTitle("enableSorting") }}
|
|
306
301
|
</FieldLabel>
|
|
302
|
+
<InputGroup>
|
|
303
|
+
<InputGroupInput
|
|
304
|
+
:model-value="value.sortKey"
|
|
305
|
+
placeholder="例:created_at"
|
|
306
|
+
@update:model-value="(v) => value.sortKey = v || void 0"
|
|
307
|
+
/>
|
|
308
|
+
<InputGroupAddon align="inline-end">
|
|
309
|
+
<InputGroupButton
|
|
310
|
+
:variant="value.enableSorting ? 'primary' : 'ghost'"
|
|
311
|
+
size="xs"
|
|
312
|
+
@click="value.enableSorting = !value.enableSorting"
|
|
313
|
+
>
|
|
314
|
+
<Icon :icon="value.enableSorting ? 'fluent:arrow-sort-up-16-regular' : 'fluent:arrow-sort-16-regular'" />
|
|
315
|
+
{{ fieldTitle("enableSorting") }}
|
|
316
|
+
</InputGroupButton>
|
|
317
|
+
</InputGroupAddon>
|
|
318
|
+
</InputGroup>
|
|
307
319
|
</Field>
|
|
308
320
|
</div>
|
|
309
321
|
</div>
|
package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.switch/schema.d.ts
CHANGED
|
@@ -39,6 +39,7 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
|
|
|
39
39
|
}>]>;
|
|
40
40
|
binding: Schema.refine<string, typeof Schema.String>;
|
|
41
41
|
enableSorting: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
|
|
42
|
+
sortKey: Schema.optional<Schema.refine<string, typeof Schema.String>>;
|
|
42
43
|
size: Schema.optional<Schema.refine<number, Schema.filter<typeof Schema.Number>>>;
|
|
43
44
|
grow: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
|
|
44
45
|
tooltip: Schema.optional<Schema.TupleType<readonly [Schema.Struct<{
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import { computed } from "vue";
|
|
3
3
|
import { Icon } from "@iconify/vue";
|
|
4
4
|
import { ExpressionEditor } from "../../../../ui/expression-editor";
|
|
5
|
-
import { Switch } from "../../../../ui/switch";
|
|
6
5
|
import { Separator } from "../../../../ui/separator";
|
|
7
6
|
import { Field, FieldLabel } from "../../../../ui/field";
|
|
8
7
|
import { Locale } from "../../../../ui/locale";
|
|
@@ -284,14 +283,10 @@ const derivedModel = computed({
|
|
|
284
283
|
<Separator />
|
|
285
284
|
<div class="flex flex-wrap gap-x-8 gap-y-3">
|
|
286
285
|
<Field
|
|
287
|
-
orientation="
|
|
288
|
-
class="w-
|
|
286
|
+
orientation="vertical"
|
|
287
|
+
class="w-full max-w-xs"
|
|
289
288
|
>
|
|
290
|
-
<
|
|
291
|
-
:model-value="value.enableSorting ?? false"
|
|
292
|
-
@update:model-value="(v) => value.enableSorting = v"
|
|
293
|
-
/>
|
|
294
|
-
<FieldLabel class="text-sm text-zinc-600">
|
|
289
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
295
290
|
<template
|
|
296
291
|
v-if="fieldDescription('enableSorting')"
|
|
297
292
|
#tooltip
|
|
@@ -304,6 +299,23 @@ const derivedModel = computed({
|
|
|
304
299
|
</template>
|
|
305
300
|
{{ fieldTitle("enableSorting") }}
|
|
306
301
|
</FieldLabel>
|
|
302
|
+
<InputGroup>
|
|
303
|
+
<InputGroupInput
|
|
304
|
+
:model-value="value.sortKey"
|
|
305
|
+
placeholder="例:created_at"
|
|
306
|
+
@update:model-value="(v) => value.sortKey = v || void 0"
|
|
307
|
+
/>
|
|
308
|
+
<InputGroupAddon align="inline-end">
|
|
309
|
+
<InputGroupButton
|
|
310
|
+
:variant="value.enableSorting ? 'primary' : 'ghost'"
|
|
311
|
+
size="xs"
|
|
312
|
+
@click="value.enableSorting = !value.enableSorting"
|
|
313
|
+
>
|
|
314
|
+
<Icon :icon="value.enableSorting ? 'fluent:arrow-sort-up-16-regular' : 'fluent:arrow-sort-16-regular'" />
|
|
315
|
+
{{ fieldTitle("enableSorting") }}
|
|
316
|
+
</InputGroupButton>
|
|
317
|
+
</InputGroupAddon>
|
|
318
|
+
</InputGroup>
|
|
307
319
|
</Field>
|
|
308
320
|
</div>
|
|
309
321
|
</div>
|
|
@@ -39,6 +39,7 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
|
|
|
39
39
|
}>]>;
|
|
40
40
|
binding: Schema.refine<string, typeof Schema.String>;
|
|
41
41
|
enableSorting: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
|
|
42
|
+
sortKey: Schema.optional<Schema.refine<string, typeof Schema.String>>;
|
|
42
43
|
size: Schema.optional<Schema.refine<number, Schema.filter<typeof Schema.Number>>>;
|
|
43
44
|
grow: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
|
|
44
45
|
tooltip: Schema.optional<Schema.TupleType<readonly [Schema.Struct<{
|
|
@@ -54,6 +55,7 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
|
|
|
54
55
|
compatibilityDate: Schema.Literal<["2026-05-20"]>;
|
|
55
56
|
}>;
|
|
56
57
|
export type Value = Schema.Schema.Type<ReturnType<typeof schema>>;
|
|
58
|
+
export declare function defaults(): Partial<Value>;
|
|
57
59
|
/**
|
|
58
60
|
* Adopts values that were stored under the pre-split `com.shwfed.table.column.switch`
|
|
59
61
|
* type at the same `compatibilityDate`. The field shape is byte-identical to
|
|
@@ -37,6 +37,13 @@ export function schema(configure) {
|
|
|
37
37
|
derived: derivedRowField(configure, "bool")
|
|
38
38
|
}).annotations({ title: "SwitchRenderer", description: "\u5F00\u5173\u6E32\u67D3\u5668\uFF08\u53EF\u7F16\u8F91\u3001\u672C\u5730\uFF09" });
|
|
39
39
|
}
|
|
40
|
+
export function defaults() {
|
|
41
|
+
return {
|
|
42
|
+
title: [{ locale: "zh", message: "" }],
|
|
43
|
+
binding: "",
|
|
44
|
+
size: 120
|
|
45
|
+
};
|
|
46
|
+
}
|
|
40
47
|
export const migrateFrom = [
|
|
41
48
|
{ type: "com.shwfed.table.column.switch", compatibilityDate }
|
|
42
49
|
];
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import { computed } from "vue";
|
|
3
3
|
import { Icon } from "@iconify/vue";
|
|
4
4
|
import { ExpressionEditor } from "../../../../ui/expression-editor";
|
|
5
|
-
import { Switch } from "../../../../ui/switch";
|
|
6
5
|
import { Separator } from "../../../../ui/separator";
|
|
7
6
|
import { Field, FieldLabel } from "../../../../ui/field";
|
|
8
7
|
import { Locale } from "../../../../ui/locale";
|
|
@@ -266,14 +265,10 @@ const derivedModel = computed({
|
|
|
266
265
|
<Separator />
|
|
267
266
|
<div class="flex flex-wrap gap-x-8 gap-y-3">
|
|
268
267
|
<Field
|
|
269
|
-
orientation="
|
|
270
|
-
class="w-
|
|
268
|
+
orientation="vertical"
|
|
269
|
+
class="w-full max-w-xs"
|
|
271
270
|
>
|
|
272
|
-
<
|
|
273
|
-
:model-value="value.enableSorting ?? false"
|
|
274
|
-
@update:model-value="(v) => value.enableSorting = v"
|
|
275
|
-
/>
|
|
276
|
-
<FieldLabel class="text-sm text-zinc-600">
|
|
271
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
277
272
|
<template
|
|
278
273
|
v-if="fieldDescription('enableSorting')"
|
|
279
274
|
#tooltip
|
|
@@ -286,6 +281,23 @@ const derivedModel = computed({
|
|
|
286
281
|
</template>
|
|
287
282
|
{{ fieldTitle("enableSorting") }}
|
|
288
283
|
</FieldLabel>
|
|
284
|
+
<InputGroup>
|
|
285
|
+
<InputGroupInput
|
|
286
|
+
:model-value="value.sortKey"
|
|
287
|
+
placeholder="例:created_at"
|
|
288
|
+
@update:model-value="(v) => value.sortKey = v || void 0"
|
|
289
|
+
/>
|
|
290
|
+
<InputGroupAddon align="inline-end">
|
|
291
|
+
<InputGroupButton
|
|
292
|
+
:variant="value.enableSorting ? 'primary' : 'ghost'"
|
|
293
|
+
size="xs"
|
|
294
|
+
@click="value.enableSorting = !value.enableSorting"
|
|
295
|
+
>
|
|
296
|
+
<Icon :icon="value.enableSorting ? 'fluent:arrow-sort-up-16-regular' : 'fluent:arrow-sort-16-regular'" />
|
|
297
|
+
{{ fieldTitle("enableSorting") }}
|
|
298
|
+
</InputGroupButton>
|
|
299
|
+
</InputGroupAddon>
|
|
300
|
+
</InputGroup>
|
|
289
301
|
</Field>
|
|
290
302
|
</div>
|
|
291
303
|
</div>
|
|
@@ -32,6 +32,7 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
|
|
|
32
32
|
}>]>;
|
|
33
33
|
binding: Schema.refine<string, typeof Schema.String>;
|
|
34
34
|
enableSorting: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
|
|
35
|
+
sortKey: Schema.optional<Schema.refine<string, typeof Schema.String>>;
|
|
35
36
|
size: Schema.optional<Schema.refine<number, Schema.filter<typeof Schema.Number>>>;
|
|
36
37
|
grow: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
|
|
37
38
|
tooltip: Schema.optional<Schema.TupleType<readonly [Schema.Struct<{
|
|
@@ -47,4 +48,5 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
|
|
|
47
48
|
compatibilityDate: Schema.Literal<["2026-05-20"]>;
|
|
48
49
|
}>;
|
|
49
50
|
export type Value = Schema.Schema.Type<ReturnType<typeof schema>>;
|
|
51
|
+
export declare function defaults(): Partial<Value>;
|
|
50
52
|
export declare function toColumnDef(value: Value, { getLocaleText }: ColumnDefDeps): Partial<ColumnDef<unknown, unknown>>;
|
|
@@ -33,6 +33,13 @@ export function schema(configure) {
|
|
|
33
33
|
derived: derivedRowField(configure, "string")
|
|
34
34
|
}).annotations({ title: "TextInputRenderer", description: "\u6587\u672C\u8F93\u5165\u6E32\u67D3\u5668\uFF08\u53EF\u7F16\u8F91\uFF09" });
|
|
35
35
|
}
|
|
36
|
+
export function defaults() {
|
|
37
|
+
return {
|
|
38
|
+
title: [{ locale: "zh", message: "" }],
|
|
39
|
+
binding: "",
|
|
40
|
+
size: 120
|
|
41
|
+
};
|
|
42
|
+
}
|
|
36
43
|
export function toColumnDef(value, { getLocaleText }) {
|
|
37
44
|
return {
|
|
38
45
|
header: editableHeader(getLocaleText(value.title)),
|
|
@@ -40,9 +40,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
40
40
|
readonly readonly?: string | undefined;
|
|
41
41
|
readonly request: string;
|
|
42
42
|
readonly grow?: boolean | undefined;
|
|
43
|
-
readonly accessor: string;
|
|
44
|
-
readonly options: string;
|
|
45
43
|
readonly enableSorting?: boolean | undefined;
|
|
44
|
+
readonly options: string;
|
|
46
45
|
readonly optionValue: string;
|
|
47
46
|
readonly optionLabel: readonly [{
|
|
48
47
|
readonly locale: "zh";
|
|
@@ -52,6 +51,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
52
51
|
readonly message: string;
|
|
53
52
|
}[]];
|
|
54
53
|
readonly successMessage?: string | undefined;
|
|
54
|
+
readonly accessor: string;
|
|
55
|
+
readonly sortKey?: string | undefined;
|
|
55
56
|
}) => any;
|
|
56
57
|
}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
57
58
|
"onUpdate:modelValue"?: ((value: {
|
|
@@ -91,9 +92,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
91
92
|
readonly readonly?: string | undefined;
|
|
92
93
|
readonly request: string;
|
|
93
94
|
readonly grow?: boolean | undefined;
|
|
94
|
-
readonly accessor: string;
|
|
95
|
-
readonly options: string;
|
|
96
95
|
readonly enableSorting?: boolean | undefined;
|
|
96
|
+
readonly options: string;
|
|
97
97
|
readonly optionValue: string;
|
|
98
98
|
readonly optionLabel: readonly [{
|
|
99
99
|
readonly locale: "zh";
|
|
@@ -103,6 +103,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
103
103
|
readonly message: string;
|
|
104
104
|
}[]];
|
|
105
105
|
readonly successMessage?: string | undefined;
|
|
106
|
+
readonly accessor: string;
|
|
107
|
+
readonly sortKey?: string | undefined;
|
|
106
108
|
}) => any) | undefined;
|
|
107
109
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
108
110
|
declare const _default: typeof __VLS_export;
|