@shwfed/config 2.10.11 → 2.11.0
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 +1085 -925
- package/dist/module.json +1 -1
- package/dist/preview/assets/{FieldGroup.vue_vue_type_script_setup_true_lang-DSupaUBQ.js → FieldGroup.vue_vue_type_script_setup_true_lang-UfhMyymD.js} +1 -1
- package/dist/preview/assets/{badge-BpMIBZb2.js → badge-CJ9IQ3Jx.js} +1 -1
- package/dist/preview/assets/{config-CM4nX_7y.js → config--Vx4fL61.js} +1 -1
- package/dist/preview/assets/{config-CujkaO8S.js → config-5PPug5mk.js} +1 -1
- package/dist/preview/assets/{config-c2iiXckz.js → config-7V1qHjUk.js} +1 -1
- package/dist/preview/assets/{config-DrkDnICQ.js → config-BYktCefJ.js} +1 -1
- package/dist/preview/assets/{config-Cc1ThF9T.js → config-BeRYF_cz.js} +1 -1
- package/dist/preview/assets/{config-DbtYnaaf.js → config-BldsYfGM.js} +1 -1
- package/dist/preview/assets/{config-BCCT-UCw.js → config-CQrDCzYN.js} +1 -1
- package/dist/preview/assets/{config-CY9L8__h.js → config-C_g-FYCR.js} +1 -1
- package/dist/preview/assets/{config-Bz643_RE.js → config-DIsAIc7H.js} +1 -1
- package/dist/preview/assets/{config-CNJS9Ncm.js → config-DPX7vGqV.js} +1 -1
- package/dist/preview/assets/{config-C7nJ8jl6.js → config-DpLMetys.js} +1 -1
- package/dist/preview/assets/{config-Bx4-IdW5.js → config-IMd4FZi8.js} +1 -1
- package/dist/preview/assets/{config-v7UFMF25.js → config-N-FdgfwK.js} +1 -1
- package/dist/preview/assets/{config-agH4hNej.js → config-uUF-UHPt.js} +1 -1
- package/dist/preview/assets/{definition.vue_vue_type_script_setup_true_lang-B1dZHF9Z.js → definition.vue_vue_type_script_setup_true_lang-B_PKfe3G.js} +1 -1
- package/dist/preview/assets/index-8Ph-sFDI.css +1 -0
- package/dist/preview/assets/index-BCl1NN6k.js +763 -0
- package/dist/preview/assets/index-Core7vRW.js +1 -0
- package/dist/preview/assets/{index-B10aTz32.js → index-DKWp47QP.js} +1 -1
- package/dist/preview/assets/{item-DxWeqOxe.js → item-XsW7swFt.js} +1 -1
- package/dist/preview/assets/{runtime-CeItNJdF.js → runtime-B-ABO0r0.js} +1 -1
- package/dist/preview/assets/{runtime-C6oMTKIZ.js → runtime-BeHohaOZ.js} +1 -1
- package/dist/preview/assets/{runtime-rpKOBs2Q.js → runtime-BiFFwOIl.js} +1 -1
- package/dist/preview/assets/{runtime-BO_Ak4ly.js → runtime-ByArW-jJ.js} +1 -1
- package/dist/preview/assets/{runtime-3VPnK4Ve.js → runtime-CpVTGNFZ.js} +1 -1
- package/dist/preview/assets/{runtime-DQK6Vajf.js → runtime-DQ1TnQ7n.js} +1 -1
- package/dist/preview/assets/{runtime-P58D1JCj.js → runtime-DY7hr7v1.js} +1 -1
- package/dist/preview/assets/{runtime-BcWQ55Ub.js → runtime-Dn172S7t.js} +1 -1
- package/dist/preview/assets/{runtime-DwgCzoDf.js → runtime-JxBzvGnw.js} +1 -1
- package/dist/preview/assets/{runtime-D6jswLOt.js → runtime-bq0hmEXY.js} +1 -1
- package/dist/preview/assets/{schema-meta-BtDKldOy.js → schema-meta-CZ9yXnsa.js} +1 -1
- package/dist/preview/index.html +2 -2
- package/dist/runtime/components/form/fields/2026-05-23/com.shwfed.form.field.tree.multi/config.d.vue.ts +22 -22
- package/dist/runtime/components/form/fields/2026-05-23/com.shwfed.form.field.tree.multi/config.vue.d.ts +22 -22
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/config.d.vue.ts +22 -22
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/config.vue.d.ts +22 -22
- 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.tree.combobox.multi/config.d.vue.ts +22 -22
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/config.vue.d.ts +22 -22
- 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.multi/config.d.vue.ts +22 -22
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/config.vue.d.ts +22 -22
- 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-06-09/com.shwfed.form.field.upload/runtime.vue +23 -1
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.date/config.vue +30 -0
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.date/schema.d.ts +2 -1
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.date/schema.js +1 -1
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.icon/config.vue +30 -0
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.icon/schema.d.ts +2 -1
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.icon/schema.js +7 -4
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.number/config.vue +30 -0
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.number/schema.d.ts +2 -1
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.number/schema.js +1 -1
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.text/config.vue +30 -0
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.text/schema.d.ts +2 -1
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.text/schema.js +1 -1
- package/dist/runtime/components/table/columns/2026-05-13/com.shwfed.table.column.switch/schema.d.ts +2 -1
- package/dist/runtime/components/table/columns/2026-05-13/com.shwfed.table.column.switch/schema.js +1 -0
- package/dist/runtime/components/table/columns/2026-05-13/com.shwfed.table.column.switch.remote/config.vue +30 -0
- package/dist/runtime/components/table/columns/2026-05-13/com.shwfed.table.column.switch.remote/schema.d.ts +2 -1
- package/dist/runtime/components/table/columns/2026-05-13/com.shwfed.table.column.switch.remote/schema.js +1 -1
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.number-input/config.vue +143 -35
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.number-input/runtime.vue +35 -9
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.number-input/schema.d.ts +136 -1
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.number-input/schema.js +20 -6
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.switch.local/config.vue +67 -32
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.switch.local/runtime.vue +6 -9
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.switch.local/schema.d.ts +4 -1
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.switch.local/schema.js +2 -5
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.text-input/config.vue +148 -33
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.text-input/runtime.vue +35 -9
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.text-input/schema.d.ts +136 -1
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.text-input/schema.js +20 -6
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/schema.d.ts +1 -1
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/schema.js +1 -0
- 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-24/com.shwfed.table.column.combobox-single.remote.options-static/schema.d.ts +1 -1
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-static/schema.js +1 -0
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/schema.d.ts +1 -1
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/schema.js +1 -0
- 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-25/com.shwfed.table.column.combobox-multi.remote.options-static/schema.d.ts +1 -1
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/schema.js +1 -0
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/schema.d.ts +1 -1
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/schema.js +1 -0
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single.remote/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single.remote/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single.remote/schema.d.ts +1 -1
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single.remote/schema.js +1 -0
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-multi/config.d.vue.ts +4 -2
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-multi/config.vue +61 -22
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-multi/config.vue.d.ts +4 -2
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-multi/runtime.vue +6 -9
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-multi/schema.d.ts +4 -1
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-multi/schema.js +3 -4
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-single/config.d.vue.ts +4 -2
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-single/config.vue +61 -22
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-single/config.vue.d.ts +4 -2
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-single/runtime.vue +6 -9
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-single/schema.d.ts +4 -1
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-single/schema.js +3 -4
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-multi/config.d.vue.ts +4 -2
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-multi/config.vue +67 -23
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-multi/config.vue.d.ts +4 -2
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-multi/runtime.vue +6 -9
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-multi/schema.d.ts +4 -1
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-multi/schema.js +2 -4
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-single/config.d.vue.ts +4 -2
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-single/config.vue +67 -23
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-single/config.vue.d.ts +4 -2
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-single/runtime.vue +6 -9
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-single/schema.d.ts +4 -1
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-single/schema.js +2 -4
- package/dist/runtime/components/table/columns/2026-06-17/com.shwfed.table.column.date-input/config.vue +67 -32
- package/dist/runtime/components/table/columns/2026-06-17/com.shwfed.table.column.date-input/runtime.vue +14 -8
- package/dist/runtime/components/table/columns/2026-06-17/com.shwfed.table.column.date-input/schema.d.ts +4 -1
- package/dist/runtime/components/table/columns/2026-06-17/com.shwfed.table.column.date-input/schema.js +2 -5
- package/dist/runtime/components/table/columns/2026-06-22/com.shwfed.table.column.date-range-input/config.d.vue.ts +10 -0
- package/dist/runtime/components/table/columns/2026-06-22/com.shwfed.table.column.date-range-input/config.vue +752 -0
- package/dist/runtime/components/table/columns/2026-06-22/com.shwfed.table.column.date-range-input/config.vue.d.ts +10 -0
- package/dist/runtime/components/table/columns/2026-06-22/com.shwfed.table.column.date-range-input/runtime.d.vue.ts +9 -0
- package/dist/runtime/components/table/columns/2026-06-22/com.shwfed.table.column.date-range-input/runtime.vue +149 -0
- package/dist/runtime/components/table/columns/2026-06-22/com.shwfed.table.column.date-range-input/runtime.vue.d.ts +9 -0
- package/dist/runtime/components/table/columns/2026-06-22/com.shwfed.table.column.date-range-input/schema.d.ts +90 -0
- package/dist/runtime/components/table/columns/2026-06-22/com.shwfed.table.column.date-range-input/schema.js +119 -0
- package/dist/runtime/components/table/index.vue +46 -7
- package/dist/runtime/components/table/utils/runtime.d.ts +1 -0
- package/dist/runtime/components/table/utils/runtime.js +5 -0
- package/dist/runtime/components/table/utils/shared.d.ts +3 -1
- package/dist/runtime/components/table/utils/shared.js +17 -5
- package/dist/runtime/components/ui/date-picker/DatePicker.d.vue.ts +1 -0
- package/dist/runtime/components/ui/date-picker/DatePicker.vue +3 -0
- package/dist/runtime/components/ui/date-picker/DatePicker.vue.d.ts +1 -0
- package/dist/runtime/components/ui/date-range-picker/DateRangePicker.d.vue.ts +1 -0
- package/dist/runtime/components/ui/date-range-picker/DateRangePicker.vue +2 -0
- package/dist/runtime/components/ui/date-range-picker/DateRangePicker.vue.d.ts +1 -0
- package/package.json +1 -1
- package/dist/preview/assets/index-Cc4BT5dc.css +0 -1
- package/dist/preview/assets/index-DdySlgoq.js +0 -763
- package/dist/preview/assets/index-j5Pri4vN.js +0 -1
|
@@ -4,6 +4,7 @@ import { Icon } from "@iconify/vue";
|
|
|
4
4
|
import { format as formatDate } from "date-fns";
|
|
5
5
|
import { ExpressionEditor } from "../../../../ui/expression-editor";
|
|
6
6
|
import { Separator } from "../../../../ui/separator";
|
|
7
|
+
import { Switch } from "../../../../ui/switch";
|
|
7
8
|
import { Button } from "../../../../ui/button";
|
|
8
9
|
import { Field, FieldLabel } from "../../../../ui/field";
|
|
9
10
|
import { Locale } from "../../../../ui/locale";
|
|
@@ -15,6 +16,12 @@ import {
|
|
|
15
16
|
InputGroupNumberField,
|
|
16
17
|
InputGroupText
|
|
17
18
|
} from "../../../../ui/input-group";
|
|
19
|
+
import {
|
|
20
|
+
DropdownMenu,
|
|
21
|
+
DropdownMenuContent,
|
|
22
|
+
DropdownMenuItem,
|
|
23
|
+
DropdownMenuTrigger
|
|
24
|
+
} from "../../../../ui/dropdown-menu";
|
|
18
25
|
import { getStructFieldDescription, getStructFieldTitle } from "../../../utils/schema-meta";
|
|
19
26
|
import { Markdown } from "../../../../ui/markdown";
|
|
20
27
|
import DerivedValueEditor from "../../../../form/DerivedValueEditor.vue";
|
|
@@ -29,6 +36,14 @@ const presetFieldSchema = presetSchema(() => {
|
|
|
29
36
|
});
|
|
30
37
|
const presetFieldTitle = (field) => getStructFieldTitle(presetFieldSchema, field) ?? field;
|
|
31
38
|
const presetFieldDescription = (field) => getStructFieldDescription(presetFieldSchema, field);
|
|
39
|
+
const ALIGN_OPTIONS = [
|
|
40
|
+
{ value: "left", label: "\u5DE6\u5BF9\u9F50", icon: "fluent:text-align-left-20-regular" },
|
|
41
|
+
{ value: "center", label: "\u5C45\u4E2D", icon: "fluent:text-align-center-20-regular" },
|
|
42
|
+
{ value: "right", label: "\u53F3\u5BF9\u9F50", icon: "fluent:text-align-right-20-regular" }
|
|
43
|
+
];
|
|
44
|
+
const currentAlignIcon = computed(
|
|
45
|
+
() => (ALIGN_OPTIONS.find((o) => o.value === (value.value.align ?? "left")) ?? ALIGN_OPTIONS[0]).icon
|
|
46
|
+
);
|
|
32
47
|
const ROW_VARS = {
|
|
33
48
|
row: { type: "dyn", label: "\u5F53\u524D\u884C\u6570\u636E" },
|
|
34
49
|
index: { type: "number", label: "\u884C\u7D22\u5F15" }
|
|
@@ -77,6 +92,14 @@ const bindingText = computed({
|
|
|
77
92
|
}
|
|
78
93
|
}
|
|
79
94
|
});
|
|
95
|
+
function onHiddenChange(v) {
|
|
96
|
+
if (v) {
|
|
97
|
+
value.value = { ...value.value, hidden: true };
|
|
98
|
+
} else {
|
|
99
|
+
const { hidden: _drop, ...rest } = value.value;
|
|
100
|
+
value.value = rest;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
80
103
|
const formatText = computed({
|
|
81
104
|
get: () => value.value.format ?? "",
|
|
82
105
|
set: (v) => {
|
|
@@ -111,17 +134,6 @@ function previewFormat(fmt) {
|
|
|
111
134
|
}
|
|
112
135
|
const formatExample = computed(() => previewFormat(value.value.format ?? ""));
|
|
113
136
|
const valueFormatExample = computed(() => previewFormat(value.value.valueFormat ?? ""));
|
|
114
|
-
const hiddenModel = computed({
|
|
115
|
-
get: () => value.value.hidden ?? "",
|
|
116
|
-
set: (v) => {
|
|
117
|
-
if (v === "") {
|
|
118
|
-
const { hidden: _drop, ...rest } = value.value;
|
|
119
|
-
value.value = rest;
|
|
120
|
-
} else {
|
|
121
|
-
value.value = { ...value.value, hidden: v };
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
});
|
|
125
137
|
const disabledModel = computed({
|
|
126
138
|
get: () => value.value.disabled ?? "",
|
|
127
139
|
set: (v) => {
|
|
@@ -311,6 +323,29 @@ const derivedModel = computed({
|
|
|
311
323
|
{{ fieldTitle("size") }}
|
|
312
324
|
</FieldLabel>
|
|
313
325
|
<InputGroup>
|
|
326
|
+
<InputGroupAddon align="inline-start">
|
|
327
|
+
<DropdownMenu>
|
|
328
|
+
<DropdownMenuTrigger as-child>
|
|
329
|
+
<InputGroupButton
|
|
330
|
+
variant="ghost"
|
|
331
|
+
size="xs"
|
|
332
|
+
:title="fieldTitle('align')"
|
|
333
|
+
>
|
|
334
|
+
<Icon :icon="currentAlignIcon" />
|
|
335
|
+
</InputGroupButton>
|
|
336
|
+
</DropdownMenuTrigger>
|
|
337
|
+
<DropdownMenuContent align="start">
|
|
338
|
+
<DropdownMenuItem
|
|
339
|
+
v-for="opt in ALIGN_OPTIONS"
|
|
340
|
+
:key="opt.value"
|
|
341
|
+
@select="value = { ...value, align: opt.value }"
|
|
342
|
+
>
|
|
343
|
+
<Icon :icon="opt.icon" />
|
|
344
|
+
{{ opt.label }}
|
|
345
|
+
</DropdownMenuItem>
|
|
346
|
+
</DropdownMenuContent>
|
|
347
|
+
</DropdownMenu>
|
|
348
|
+
</InputGroupAddon>
|
|
314
349
|
<InputGroupNumberField
|
|
315
350
|
:model-value="value.size"
|
|
316
351
|
:disabled="value.grow"
|
|
@@ -329,27 +364,6 @@ const derivedModel = computed({
|
|
|
329
364
|
</InputGroupAddon>
|
|
330
365
|
</InputGroup>
|
|
331
366
|
</Field>
|
|
332
|
-
<Field orientation="vertical">
|
|
333
|
-
<FieldLabel class="text-xs text-zinc-500">
|
|
334
|
-
<template
|
|
335
|
-
v-if="fieldDescription('hidden')"
|
|
336
|
-
#tooltip
|
|
337
|
-
>
|
|
338
|
-
<Markdown
|
|
339
|
-
:source="fieldDescription('hidden')"
|
|
340
|
-
block
|
|
341
|
-
class="prose prose-sm prose-zinc"
|
|
342
|
-
/>
|
|
343
|
-
</template>
|
|
344
|
-
{{ fieldTitle("hidden") }}
|
|
345
|
-
</FieldLabel>
|
|
346
|
-
<ExpressionEditor
|
|
347
|
-
v-model="hiddenModel"
|
|
348
|
-
placeholder="例:row.archived"
|
|
349
|
-
result-type="bool"
|
|
350
|
-
:extra-vars="ROW_VARS"
|
|
351
|
-
/>
|
|
352
|
-
</Field>
|
|
353
367
|
<Field orientation="vertical">
|
|
354
368
|
<FieldLabel class="text-xs text-zinc-500">
|
|
355
369
|
<template
|
|
@@ -538,6 +552,27 @@ const derivedModel = computed({
|
|
|
538
552
|
</InputGroupAddon>
|
|
539
553
|
</InputGroup>
|
|
540
554
|
</Field>
|
|
555
|
+
<Field orientation="vertical">
|
|
556
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
557
|
+
<template
|
|
558
|
+
v-if="fieldDescription('hidden')"
|
|
559
|
+
#tooltip
|
|
560
|
+
>
|
|
561
|
+
<Markdown
|
|
562
|
+
:source="fieldDescription('hidden')"
|
|
563
|
+
block
|
|
564
|
+
class="prose prose-sm prose-zinc"
|
|
565
|
+
/>
|
|
566
|
+
</template>
|
|
567
|
+
{{ fieldTitle("hidden") }}
|
|
568
|
+
</FieldLabel>
|
|
569
|
+
<div>
|
|
570
|
+
<Switch
|
|
571
|
+
:model-value="value.hidden ?? false"
|
|
572
|
+
@update:model-value="onHiddenChange"
|
|
573
|
+
/>
|
|
574
|
+
</div>
|
|
575
|
+
</Field>
|
|
541
576
|
</div>
|
|
542
577
|
</div>
|
|
543
578
|
</template>
|
|
@@ -9,6 +9,7 @@ import { useFormReadonly } from "../../../../form/utils/readonly";
|
|
|
9
9
|
import { getLocalizedText } from "../../../../../share/locale";
|
|
10
10
|
import { DATE_PICKER_DEFAULT_FORMATS, DatePicker } from "../../../../ui/date-picker";
|
|
11
11
|
import { useFormState } from "../../../../form/utils/state";
|
|
12
|
+
import { JUSTIFY_CLASS, TEXT_ALIGN_CLASS } from "../../../utils/runtime";
|
|
12
13
|
defineOptions({ name: "ShwfedTableDateInputRendererRuntime" });
|
|
13
14
|
const props = defineProps({
|
|
14
15
|
column: { type: null, required: true },
|
|
@@ -29,7 +30,6 @@ function evalBool(expression, label) {
|
|
|
29
30
|
return false;
|
|
30
31
|
}
|
|
31
32
|
}
|
|
32
|
-
const isHidden = computed(() => evalBool(props.column.hidden, "hidden"));
|
|
33
33
|
const isDisabled = computed(() => evalBool(props.column.disabled, "disabled"));
|
|
34
34
|
const formReadonly = useFormReadonly();
|
|
35
35
|
const isReadonly = computed(
|
|
@@ -41,6 +41,8 @@ const effectiveReadonly = computed(
|
|
|
41
41
|
const resolvedValueFormat = computed(
|
|
42
42
|
() => props.column.valueFormat ?? DATE_PICKER_DEFAULT_FORMATS.date.value
|
|
43
43
|
);
|
|
44
|
+
const justifyClass = computed(() => JUSTIFY_CLASS[props.column.align ?? "left"] ?? JUSTIFY_CLASS.left);
|
|
45
|
+
const textAlignClass = computed(() => TEXT_ALIGN_CLASS[props.column.align ?? "left"] ?? TEXT_ALIGN_CLASS.left);
|
|
44
46
|
const shortcuts = computed(() => {
|
|
45
47
|
const list = props.column.presets;
|
|
46
48
|
if (!list || list.length === 0) return void 0;
|
|
@@ -71,14 +73,10 @@ const model = computed({
|
|
|
71
73
|
<template>
|
|
72
74
|
<!--
|
|
73
75
|
Row budget matches the editable input columns: 2px outer inset around a 28px
|
|
74
|
-
(`h-7`) control — total 32px. Every branch (
|
|
76
|
+
(`h-7`) control — total 32px. Every branch (readonly / editable) is
|
|
75
77
|
sized identically so rows do not jump when a CEL condition flips.
|
|
76
78
|
-->
|
|
77
79
|
<div class="p-[0.125rem] w-full">
|
|
78
|
-
<span
|
|
79
|
-
v-if="isHidden"
|
|
80
|
-
class="block h-7 w-full"
|
|
81
|
-
/>
|
|
82
80
|
<!--
|
|
83
81
|
Readonly empty state mirrors the `text-input` column: a centered, faded,
|
|
84
82
|
non-selectable `-` so a readonly grid reads uniformly regardless of which
|
|
@@ -86,20 +84,28 @@ const model = computed({
|
|
|
86
84
|
dark text.
|
|
87
85
|
-->
|
|
88
86
|
<span
|
|
89
|
-
v-
|
|
87
|
+
v-if="effectiveReadonly"
|
|
90
88
|
:class="[
|
|
91
89
|
'flex items-center h-7 w-full px-2 text-[0.75rem] truncate',
|
|
92
|
-
model ? 'text-zinc-700' : 'justify-center font-mono text-zinc-300 select-none'
|
|
90
|
+
model ? ['text-zinc-700', justifyClass] : 'justify-center font-mono text-zinc-300 select-none'
|
|
93
91
|
]"
|
|
94
92
|
>
|
|
95
93
|
{{ model || "-" }}
|
|
96
94
|
</span>
|
|
95
|
+
<!--
|
|
96
|
+
Idle border is faded to 30% so a whole grid of date cells reads as data,
|
|
97
|
+
not chrome — `hover:` / `focus-within:` snap it back to full so the active
|
|
98
|
+
cell stands out. Mirrors the `text-input` column exactly; routed to the
|
|
99
|
+
inner `InputGroup` via `input-class` because `class` lands on the
|
|
100
|
+
DatePicker's anchor wrapper, not the input.
|
|
101
|
+
-->
|
|
97
102
|
<DatePicker
|
|
98
103
|
v-else
|
|
99
104
|
v-model="model"
|
|
100
105
|
type="date"
|
|
101
106
|
size="sm"
|
|
102
107
|
class="w-full"
|
|
108
|
+
:input-class="['border-zinc-200/30 hover:border-zinc-200 focus-within:border-zinc-200 transition-colors ease-out duration-180', textAlignClass]"
|
|
103
109
|
:format="column.format"
|
|
104
110
|
:value-format="column.valueFormat"
|
|
105
111
|
:placeholder="placeholderText"
|
|
@@ -20,6 +20,9 @@ export declare function presetSchema(configure: (env: Environment) => void): Sch
|
|
|
20
20
|
value: Schema.Schema<string, string, never>;
|
|
21
21
|
}>;
|
|
22
22
|
export declare function schema(configure: (env: Environment) => void): Schema.Struct<{
|
|
23
|
+
align: Schema.optionalWith<Schema.Literal<["left", "center", "right"]>, {
|
|
24
|
+
default: () => "left";
|
|
25
|
+
}>;
|
|
23
26
|
placeholder: Schema.optional<Schema.TupleType<readonly [Schema.Struct<{
|
|
24
27
|
locale: Schema.Literal<["zh"]>;
|
|
25
28
|
message: Schema.SchemaClass<string, string, never>;
|
|
@@ -27,7 +30,6 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
|
|
|
27
30
|
locale: Schema.Literal<["ja", "en", "ko"]>;
|
|
28
31
|
message: Schema.SchemaClass<string, string, never>;
|
|
29
32
|
}>]>>;
|
|
30
|
-
hidden: Schema.optional<Schema.Schema<string, string, never>>;
|
|
31
33
|
disabled: Schema.optional<Schema.Schema<string, string, never>>;
|
|
32
34
|
readonly: Schema.optional<Schema.Schema<string, string, never>>;
|
|
33
35
|
derived: Schema.optional<Schema.Struct<{
|
|
@@ -66,6 +68,7 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
|
|
|
66
68
|
locale: Schema.Literal<["ja", "en", "ko"]>;
|
|
67
69
|
message: Schema.SchemaClass<string, string, never>;
|
|
68
70
|
}>]>>;
|
|
71
|
+
hidden: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
|
|
69
72
|
id: Schema.refine<string, typeof Schema.String>;
|
|
70
73
|
groupId: Schema.optional<typeof Schema.UUID>;
|
|
71
74
|
type: Schema.Literal<["com.shwfed.table.column.date-input"]>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
2
|
import { getProperty } from "dot-prop";
|
|
3
3
|
import { Locale } from "../../../../../share/locale.js";
|
|
4
|
-
import { CelRowAccess, derivedRowField, editableColumnFields, editableHeader } from "../../../utils/shared.js";
|
|
4
|
+
import { Align, CelRowAccess, derivedRowField, editableColumnFields, editableHeader } from "../../../utils/shared.js";
|
|
5
5
|
export const type = "com.shwfed.table.column.date-input";
|
|
6
6
|
export const compatibilityDate = "2026-06-17";
|
|
7
7
|
export const metadata = {
|
|
@@ -31,14 +31,11 @@ export function schema(configure) {
|
|
|
31
31
|
type: Schema.Literal(type),
|
|
32
32
|
compatibilityDate: Schema.Literal(compatibilityDate),
|
|
33
33
|
...editableColumnFields(),
|
|
34
|
+
align: Schema.optionalWith(Align.annotations({ title: "\u5BF9\u9F50" }), { default: () => "left" }),
|
|
34
35
|
placeholder: Schema.optional(Locale.annotations({
|
|
35
36
|
title: "\u5360\u4F4D\u7B26",
|
|
36
37
|
description: "\u672A\u9009\u4E2D\u65E5\u671F\u65F6\u8F93\u5165\u6846\u4E2D\u7684\u5360\u4F4D\u6587\u672C"
|
|
37
38
|
})),
|
|
38
|
-
hidden: Schema.optional(CelBool.annotations({
|
|
39
|
-
title: "\u9690\u85CF\u6761\u4EF6",
|
|
40
|
-
description: "\u8FD4\u56DE `true` \u65F6\u8BE5\u884C\u7684\u8F93\u5165\u6846\u4E0D\u6E32\u67D3\uFF08\u5176\u4F59\u884C\u4E0D\u53D7\u5F71\u54CD\uFF09"
|
|
41
|
-
})),
|
|
42
39
|
disabled: Schema.optional(CelBool.annotations({
|
|
43
40
|
title: "\u7981\u7528\u6761\u4EF6",
|
|
44
41
|
description: "\u8FD4\u56DE `true` \u65F6\u8F93\u5165\u6846\u4ECD\u7136\u6E32\u67D3\u4F46\u4E0D\u53EF\u7F16\u8F91"
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type __VLS_ModelProps = {
|
|
2
|
+
modelValue: Record<string, any>;
|
|
3
|
+
};
|
|
4
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
5
|
+
"update:modelValue": (value: Record<string, any>) => any;
|
|
6
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
7
|
+
"onUpdate:modelValue"?: ((value: Record<string, any>) => any) | undefined;
|
|
8
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
declare const _default: typeof __VLS_export;
|
|
10
|
+
export default _default;
|