@shwfed/config 2.10.12 → 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 +46 -49
- package/dist/module.json +1 -1
- package/dist/preview/assets/{FieldGroup.vue_vue_type_script_setup_true_lang-BeqytPDr.js → FieldGroup.vue_vue_type_script_setup_true_lang-UfhMyymD.js} +1 -1
- package/dist/preview/assets/{badge-DkHwLDps.js → badge-CJ9IQ3Jx.js} +1 -1
- package/dist/preview/assets/{config-Cft-srKd.js → config--Vx4fL61.js} +1 -1
- package/dist/preview/assets/{config-DJQ2LOWo.js → config-5PPug5mk.js} +1 -1
- package/dist/preview/assets/{config-Dx1SXsSf.js → config-7V1qHjUk.js} +1 -1
- package/dist/preview/assets/{config-Cedm-E2H.js → config-BYktCefJ.js} +1 -1
- package/dist/preview/assets/{config-DAZ2Uj6B.js → config-BeRYF_cz.js} +1 -1
- package/dist/preview/assets/{config-DCANpbtq.js → config-BldsYfGM.js} +1 -1
- package/dist/preview/assets/{config-Uw4cvZGX.js → config-CQrDCzYN.js} +1 -1
- package/dist/preview/assets/{config-7KeAl8UU.js → config-C_g-FYCR.js} +1 -1
- package/dist/preview/assets/{config-CZ1e9utV.js → config-DIsAIc7H.js} +1 -1
- package/dist/preview/assets/{config-OPQWANCx.js → config-DPX7vGqV.js} +1 -1
- package/dist/preview/assets/{config-DQVKd54J.js → config-DpLMetys.js} +1 -1
- package/dist/preview/assets/{config-CVPVYMuh.js → config-IMd4FZi8.js} +1 -1
- package/dist/preview/assets/{config-Cy6Eix27.js → config-N-FdgfwK.js} +1 -1
- package/dist/preview/assets/{config-DbV3RlZz.js → config-uUF-UHPt.js} +1 -1
- package/dist/preview/assets/{definition.vue_vue_type_script_setup_true_lang-D4Gh9PzS.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-Cum0oK9u.js → index-DKWp47QP.js} +1 -1
- package/dist/preview/assets/{item-H4QeOpnC.js → item-XsW7swFt.js} +1 -1
- package/dist/preview/assets/{runtime-CTnwTJlw.js → runtime-B-ABO0r0.js} +1 -1
- package/dist/preview/assets/{runtime-C3532B0Y.js → runtime-BeHohaOZ.js} +1 -1
- package/dist/preview/assets/{runtime-CNMjRr9Y.js → runtime-BiFFwOIl.js} +1 -1
- package/dist/preview/assets/{runtime-ibuFFD1K.js → runtime-ByArW-jJ.js} +1 -1
- package/dist/preview/assets/{runtime-DvCHNIPq.js → runtime-CpVTGNFZ.js} +1 -1
- package/dist/preview/assets/{runtime-sPGVp7yA.js → runtime-DQ1TnQ7n.js} +1 -1
- package/dist/preview/assets/{runtime-CwgX0PuH.js → runtime-DY7hr7v1.js} +1 -1
- package/dist/preview/assets/{runtime-BotFX6qJ.js → runtime-Dn172S7t.js} +1 -1
- package/dist/preview/assets/{runtime-D5HcLLLR.js → runtime-JxBzvGnw.js} +1 -1
- package/dist/preview/assets/{runtime-cKOD2A6u.js → runtime-bq0hmEXY.js} +1 -1
- package/dist/preview/assets/{schema-meta-DtZNwp3h.js → schema-meta-CZ9yXnsa.js} +1 -1
- package/dist/preview/index.html +2 -2
- 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 +60 -32
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.number-input/runtime.vue +7 -9
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.number-input/schema.d.ts +4 -1
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.number-input/schema.js +2 -5
- 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 +66 -31
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.text-input/runtime.vue +7 -9
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.text-input/schema.d.ts +4 -1
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.text-input/schema.js +2 -5
- 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 +7 -9
- 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.vue +66 -31
- package/dist/runtime/components/table/columns/2026-06-22/com.shwfed.table.column.date-range-input/runtime.vue +5 -8
- package/dist/runtime/components/table/columns/2026-06-22/com.shwfed.table.column.date-range-input/schema.d.ts +4 -1
- package/dist/runtime/components/table/columns/2026-06-22/com.shwfed.table.column.date-range-input/schema.js +2 -5
- 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/package.json +1 -1
- package/dist/preview/assets/index-B3HnlKis.js +0 -763
- package/dist/preview/assets/index-BAY6NLoo.css +0 -1
- package/dist/preview/assets/index-CxUuhfsO.js +0 -1
|
@@ -3,6 +3,7 @@ import { computed, inject, onBeforeUnmount, ref, watch } from "vue";
|
|
|
3
3
|
import { Icon } from "@iconify/vue";
|
|
4
4
|
import { ExpressionEditor } from "../../../../ui/expression-editor";
|
|
5
5
|
import { Separator } from "../../../../ui/separator";
|
|
6
|
+
import { Switch } from "../../../../ui/switch";
|
|
6
7
|
import { Button } from "../../../../ui/button";
|
|
7
8
|
import { Field, FieldLabel } from "../../../../ui/field";
|
|
8
9
|
import { Locale } from "../../../../ui/locale";
|
|
@@ -13,6 +14,12 @@ import {
|
|
|
13
14
|
InputGroupInput,
|
|
14
15
|
InputGroupNumberField
|
|
15
16
|
} from "../../../../ui/input-group";
|
|
17
|
+
import {
|
|
18
|
+
DropdownMenu,
|
|
19
|
+
DropdownMenuContent,
|
|
20
|
+
DropdownMenuItem,
|
|
21
|
+
DropdownMenuTrigger
|
|
22
|
+
} from "../../../../ui/dropdown-menu";
|
|
16
23
|
import ActionsConfigEditor from "../../../../actions/config.vue";
|
|
17
24
|
import { getStructFieldDescription, getStructFieldTitle } from "../../../utils/schema-meta";
|
|
18
25
|
import { Markdown } from "../../../../ui/markdown";
|
|
@@ -27,6 +34,14 @@ const fieldSchema = schema(() => {
|
|
|
27
34
|
});
|
|
28
35
|
const fieldTitle = (field) => getStructFieldTitle(fieldSchema, field) ?? field;
|
|
29
36
|
const fieldDescription = (field) => getStructFieldDescription(fieldSchema, field);
|
|
37
|
+
const ALIGN_OPTIONS = [
|
|
38
|
+
{ value: "left", label: "\u5DE6\u5BF9\u9F50", icon: "fluent:text-align-left-20-regular" },
|
|
39
|
+
{ value: "center", label: "\u5C45\u4E2D", icon: "fluent:text-align-center-20-regular" },
|
|
40
|
+
{ value: "right", label: "\u53F3\u5BF9\u9F50", icon: "fluent:text-align-right-20-regular" }
|
|
41
|
+
];
|
|
42
|
+
const currentAlignIcon = computed(
|
|
43
|
+
() => (ALIGN_OPTIONS.find((o) => o.value === (value.value.align ?? "left")) ?? ALIGN_OPTIONS[0]).icon
|
|
44
|
+
);
|
|
30
45
|
const ROW_VARS = {
|
|
31
46
|
row: { type: "dyn", label: "\u5F53\u524D\u884C\u6570\u636E" },
|
|
32
47
|
index: { type: "number", label: "\u884C\u7D22\u5F15" }
|
|
@@ -84,17 +99,14 @@ const bindingText = computed({
|
|
|
84
99
|
}
|
|
85
100
|
}
|
|
86
101
|
});
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
} else {
|
|
94
|
-
value.value = { ...value.value, hidden: v };
|
|
95
|
-
}
|
|
102
|
+
function onHiddenChange(v) {
|
|
103
|
+
if (v) {
|
|
104
|
+
value.value = { ...value.value, hidden: true };
|
|
105
|
+
} else {
|
|
106
|
+
const { hidden: _drop, ...rest } = value.value;
|
|
107
|
+
value.value = rest;
|
|
96
108
|
}
|
|
97
|
-
}
|
|
109
|
+
}
|
|
98
110
|
const disabledModel = computed({
|
|
99
111
|
get: () => value.value.disabled ?? "",
|
|
100
112
|
set: (v) => {
|
|
@@ -240,6 +252,29 @@ const derivedModel = computed({
|
|
|
240
252
|
{{ fieldTitle("size") }}
|
|
241
253
|
</FieldLabel>
|
|
242
254
|
<InputGroup>
|
|
255
|
+
<InputGroupAddon align="inline-start">
|
|
256
|
+
<DropdownMenu>
|
|
257
|
+
<DropdownMenuTrigger as-child>
|
|
258
|
+
<InputGroupButton
|
|
259
|
+
variant="ghost"
|
|
260
|
+
size="xs"
|
|
261
|
+
:title="fieldTitle('align')"
|
|
262
|
+
>
|
|
263
|
+
<Icon :icon="currentAlignIcon" />
|
|
264
|
+
</InputGroupButton>
|
|
265
|
+
</DropdownMenuTrigger>
|
|
266
|
+
<DropdownMenuContent align="start">
|
|
267
|
+
<DropdownMenuItem
|
|
268
|
+
v-for="opt in ALIGN_OPTIONS"
|
|
269
|
+
:key="opt.value"
|
|
270
|
+
@select="value = { ...value, align: opt.value }"
|
|
271
|
+
>
|
|
272
|
+
<Icon :icon="opt.icon" />
|
|
273
|
+
{{ opt.label }}
|
|
274
|
+
</DropdownMenuItem>
|
|
275
|
+
</DropdownMenuContent>
|
|
276
|
+
</DropdownMenu>
|
|
277
|
+
</InputGroupAddon>
|
|
243
278
|
<InputGroupNumberField
|
|
244
279
|
:model-value="value.size"
|
|
245
280
|
:disabled="value.grow"
|
|
@@ -258,27 +293,6 @@ const derivedModel = computed({
|
|
|
258
293
|
</InputGroupAddon>
|
|
259
294
|
</InputGroup>
|
|
260
295
|
</Field>
|
|
261
|
-
<Field orientation="vertical">
|
|
262
|
-
<FieldLabel class="text-xs text-zinc-500">
|
|
263
|
-
<template
|
|
264
|
-
v-if="fieldDescription('hidden')"
|
|
265
|
-
#tooltip
|
|
266
|
-
>
|
|
267
|
-
<Markdown
|
|
268
|
-
:source="fieldDescription('hidden')"
|
|
269
|
-
block
|
|
270
|
-
class="prose prose-sm prose-zinc"
|
|
271
|
-
/>
|
|
272
|
-
</template>
|
|
273
|
-
{{ fieldTitle("hidden") }}
|
|
274
|
-
</FieldLabel>
|
|
275
|
-
<ExpressionEditor
|
|
276
|
-
v-model="hiddenModel"
|
|
277
|
-
placeholder="例:row.archived"
|
|
278
|
-
result-type="bool"
|
|
279
|
-
:extra-vars="ROW_VARS"
|
|
280
|
-
/>
|
|
281
|
-
</Field>
|
|
282
296
|
<Field orientation="vertical">
|
|
283
297
|
<FieldLabel class="text-xs text-zinc-500">
|
|
284
298
|
<template
|
|
@@ -382,6 +396,27 @@ const derivedModel = computed({
|
|
|
382
396
|
</InputGroupAddon>
|
|
383
397
|
</InputGroup>
|
|
384
398
|
</Field>
|
|
399
|
+
<Field orientation="vertical">
|
|
400
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
401
|
+
<template
|
|
402
|
+
v-if="fieldDescription('hidden')"
|
|
403
|
+
#tooltip
|
|
404
|
+
>
|
|
405
|
+
<Markdown
|
|
406
|
+
:source="fieldDescription('hidden')"
|
|
407
|
+
block
|
|
408
|
+
class="prose prose-sm prose-zinc"
|
|
409
|
+
/>
|
|
410
|
+
</template>
|
|
411
|
+
{{ fieldTitle("hidden") }}
|
|
412
|
+
</FieldLabel>
|
|
413
|
+
<div>
|
|
414
|
+
<Switch
|
|
415
|
+
:model-value="value.hidden ?? false"
|
|
416
|
+
@update:model-value="onHiddenChange"
|
|
417
|
+
/>
|
|
418
|
+
</div>
|
|
419
|
+
</Field>
|
|
385
420
|
</div>
|
|
386
421
|
<Separator />
|
|
387
422
|
<Field orientation="vertical">
|
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
} from "../../../../ui/input-group";
|
|
16
16
|
import ShwfedActions from "../../../../actions/components/group.vue";
|
|
17
17
|
import { useFormState } from "../../../../form/utils/state";
|
|
18
|
+
import { JUSTIFY_CLASS, TEXT_ALIGN_CLASS } from "../../../utils/runtime";
|
|
18
19
|
defineOptions({ name: "ShwfedTableTextInputRendererRuntime" });
|
|
19
20
|
const props = defineProps({
|
|
20
21
|
column: { type: null, required: true },
|
|
@@ -35,7 +36,6 @@ function evalBool(expression, label) {
|
|
|
35
36
|
return false;
|
|
36
37
|
}
|
|
37
38
|
}
|
|
38
|
-
const isHidden = computed(() => evalBool(props.column.hidden, "hidden"));
|
|
39
39
|
const isDisabled = computed(() => evalBool(props.column.disabled, "disabled"));
|
|
40
40
|
const formReadonly = useFormReadonly();
|
|
41
41
|
const isReadonly = computed(
|
|
@@ -78,6 +78,8 @@ const addonConfig = computed(() => {
|
|
|
78
78
|
};
|
|
79
79
|
});
|
|
80
80
|
const showClear = computed(() => !isDisabled.value && draft.value.length > 0);
|
|
81
|
+
const justifyClass = computed(() => JUSTIFY_CLASS[props.column.align ?? "left"] ?? JUSTIFY_CLASS.left);
|
|
82
|
+
const textAlignClass = computed(() => TEXT_ALIGN_CLASS[props.column.align ?? "left"] ?? TEXT_ALIGN_CLASS.left);
|
|
81
83
|
function handleClear() {
|
|
82
84
|
draft.value = "";
|
|
83
85
|
commit();
|
|
@@ -89,7 +91,7 @@ function handleClear() {
|
|
|
89
91
|
Row budget: 2px outer inset (`p-[0.125rem]`) on each side around a 28px
|
|
90
92
|
(`h-7`) input — total 32px. The inset is the deliberate gap between the
|
|
91
93
|
input border and the td borders; the 28px input gives the 12px text some
|
|
92
|
-
vertical breathing room. Every branch (
|
|
94
|
+
vertical breathing room. Every branch (readonly / editable) is
|
|
93
95
|
sized identically so rows do not jump when a CEL condition flips. The
|
|
94
96
|
default `Input` ships `h-9` + `text-base` + `md:text-sm` — we override
|
|
95
97
|
each at the same breakpoint or `md:text-sm` would beat our unprefixed
|
|
@@ -102,10 +104,6 @@ function handleClear() {
|
|
|
102
104
|
oversized.
|
|
103
105
|
-->
|
|
104
106
|
<div class="p-[0.125rem] w-full">
|
|
105
|
-
<span
|
|
106
|
-
v-if="isHidden"
|
|
107
|
-
class="block h-7 w-full"
|
|
108
|
-
/>
|
|
109
107
|
<!--
|
|
110
108
|
Readonly empty state mirrors the `text` column exactly: a centered,
|
|
111
109
|
faded, non-selectable `-` rendered in `font-mono`, so a readonly grid
|
|
@@ -114,10 +112,10 @@ function handleClear() {
|
|
|
114
112
|
text.
|
|
115
113
|
-->
|
|
116
114
|
<span
|
|
117
|
-
v-
|
|
115
|
+
v-if="effectiveReadonly"
|
|
118
116
|
:class="[
|
|
119
117
|
'flex items-center h-7 w-full px-2 text-[0.75rem] truncate',
|
|
120
|
-
draft ? 'text-zinc-700' : 'justify-center font-mono text-zinc-300 select-none'
|
|
118
|
+
draft ? ['text-zinc-700', justifyClass] : 'justify-center font-mono text-zinc-300 select-none'
|
|
121
119
|
]"
|
|
122
120
|
>
|
|
123
121
|
{{ draft || "-" }}
|
|
@@ -138,7 +136,7 @@ function handleClear() {
|
|
|
138
136
|
v-model="draft"
|
|
139
137
|
:placeholder="placeholderText"
|
|
140
138
|
:disabled="isDisabled"
|
|
141
|
-
class="h-7 text-[0.75rem] md:text-[0.75rem] px-2"
|
|
139
|
+
:class="['h-7 text-[0.75rem] md:text-[0.75rem] px-2', textAlignClass]"
|
|
142
140
|
@focus="onFocus"
|
|
143
141
|
@blur="onBlur"
|
|
144
142
|
@keydown.enter="commit"
|
|
@@ -9,6 +9,9 @@ export declare const metadata: {
|
|
|
9
9
|
readonly icon: "fluent:text-field-20-regular";
|
|
10
10
|
};
|
|
11
11
|
export declare function schema(configure: (env: Environment) => void): Schema.Struct<{
|
|
12
|
+
align: Schema.optionalWith<Schema.Literal<["left", "center", "right"]>, {
|
|
13
|
+
default: () => "left";
|
|
14
|
+
}>;
|
|
12
15
|
placeholder: Schema.optional<Schema.TupleType<readonly [Schema.Struct<{
|
|
13
16
|
locale: Schema.Literal<["zh"]>;
|
|
14
17
|
message: Schema.SchemaClass<string, string, never>;
|
|
@@ -16,7 +19,6 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
|
|
|
16
19
|
locale: Schema.Literal<["ja", "en", "ko"]>;
|
|
17
20
|
message: Schema.SchemaClass<string, string, never>;
|
|
18
21
|
}>]>>;
|
|
19
|
-
hidden: Schema.optional<Schema.Schema<string, string, never>>;
|
|
20
22
|
disabled: Schema.optional<Schema.Schema<string, string, never>>;
|
|
21
23
|
readonly: Schema.optional<Schema.Schema<string, string, never>>;
|
|
22
24
|
derived: Schema.optional<Schema.Struct<{
|
|
@@ -174,6 +176,7 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
|
|
|
174
176
|
locale: Schema.Literal<["ja", "en", "ko"]>;
|
|
175
177
|
message: Schema.SchemaClass<string, string, never>;
|
|
176
178
|
}>]>>;
|
|
179
|
+
hidden: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
|
|
177
180
|
id: Schema.refine<string, typeof Schema.String>;
|
|
178
181
|
groupId: Schema.optional<typeof Schema.UUID>;
|
|
179
182
|
type: Schema.Literal<["com.shwfed.table.column.text-input"]>;
|
|
@@ -2,7 +2,7 @@ import { Schema } from "effect";
|
|
|
2
2
|
import { getProperty } from "dot-prop";
|
|
3
3
|
import { Locale } from "../../../../../share/locale.js";
|
|
4
4
|
import { ActionSchemaFields } from "../../../../actions/schema.js";
|
|
5
|
-
import { CelRowAccess, derivedRowField, editableColumnFields, editableHeader, registerRowVariablesIfAbsent } from "../../../utils/shared.js";
|
|
5
|
+
import { Align, CelRowAccess, derivedRowField, editableColumnFields, editableHeader, registerRowVariablesIfAbsent } from "../../../utils/shared.js";
|
|
6
6
|
export const type = "com.shwfed.table.column.text-input";
|
|
7
7
|
export const compatibilityDate = "2026-05-20";
|
|
8
8
|
export const metadata = {
|
|
@@ -30,14 +30,11 @@ export function schema(configure) {
|
|
|
30
30
|
type: Schema.Literal(type),
|
|
31
31
|
compatibilityDate: Schema.Literal(compatibilityDate),
|
|
32
32
|
...editableColumnFields(),
|
|
33
|
+
align: Schema.optionalWith(Align.annotations({ title: "\u5BF9\u9F50" }), { default: () => "left" }),
|
|
33
34
|
placeholder: Schema.optional(Locale.annotations({
|
|
34
35
|
title: "\u5360\u4F4D\u7B26",
|
|
35
36
|
description: "\u5355\u5143\u683C\u4E3A\u7A7A\u65F6\u663E\u793A\u7684\u63D0\u793A\u6587\u672C"
|
|
36
37
|
})),
|
|
37
|
-
hidden: Schema.optional(CelBool.annotations({
|
|
38
|
-
title: "\u9690\u85CF\u6761\u4EF6",
|
|
39
|
-
description: "\u8FD4\u56DE `true` \u65F6\u8BE5\u884C\u7684\u8F93\u5165\u6846\u4E0D\u6E32\u67D3\uFF08\u5176\u4F59\u884C\u4E0D\u53D7\u5F71\u54CD\uFF09"
|
|
40
|
-
})),
|
|
41
38
|
disabled: Schema.optional(CelBool.annotations({
|
|
42
39
|
title: "\u7981\u7528\u6761\u4EF6",
|
|
43
40
|
description: "\u8FD4\u56DE `true` \u65F6\u8F93\u5165\u6846\u4ECD\u7136\u6E32\u67D3\u4F46\u4E0D\u53EF\u7F16\u8F91"
|
|
@@ -53,7 +53,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
53
53
|
readonly locale: "en" | "ja" | "ko";
|
|
54
54
|
readonly message: string;
|
|
55
55
|
}[]];
|
|
56
|
-
readonly accessor
|
|
56
|
+
readonly accessor?: string | undefined;
|
|
57
57
|
readonly sortKey?: string | undefined;
|
|
58
58
|
readonly successMessage?: string | undefined;
|
|
59
59
|
}) => any;
|
|
@@ -108,7 +108,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
108
108
|
readonly locale: "en" | "ja" | "ko";
|
|
109
109
|
readonly message: string;
|
|
110
110
|
}[]];
|
|
111
|
-
readonly accessor
|
|
111
|
+
readonly accessor?: string | undefined;
|
|
112
112
|
readonly sortKey?: string | undefined;
|
|
113
113
|
readonly successMessage?: string | undefined;
|
|
114
114
|
}) => any) | undefined;
|
|
@@ -53,7 +53,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
53
53
|
readonly locale: "en" | "ja" | "ko";
|
|
54
54
|
readonly message: string;
|
|
55
55
|
}[]];
|
|
56
|
-
readonly accessor
|
|
56
|
+
readonly accessor?: string | undefined;
|
|
57
57
|
readonly sortKey?: string | undefined;
|
|
58
58
|
readonly successMessage?: string | undefined;
|
|
59
59
|
}) => any;
|
|
@@ -108,7 +108,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
108
108
|
readonly locale: "en" | "ja" | "ko";
|
|
109
109
|
readonly message: string;
|
|
110
110
|
}[]];
|
|
111
|
-
readonly accessor
|
|
111
|
+
readonly accessor?: string | undefined;
|
|
112
112
|
readonly sortKey?: string | undefined;
|
|
113
113
|
readonly successMessage?: string | undefined;
|
|
114
114
|
}) => any) | undefined;
|
|
@@ -68,7 +68,7 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
|
|
|
68
68
|
locale: Schema.Literal<["ja", "en", "ko"]>;
|
|
69
69
|
message: Schema.SchemaClass<string, string, never>;
|
|
70
70
|
}>]>;
|
|
71
|
-
accessor: Schema.Schema<string, string, never
|
|
71
|
+
accessor: Schema.optional<Schema.Schema<string, string, never>>;
|
|
72
72
|
enableSorting: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
|
|
73
73
|
sortKey: Schema.optional<Schema.refine<string, typeof Schema.String>>;
|
|
74
74
|
size: Schema.optional<Schema.refine<number, Schema.filter<typeof Schema.Number>>>;
|
|
@@ -129,6 +129,7 @@ export function toColumnDef(value, { getLocaleText, $cel, inheritedContext }) {
|
|
|
129
129
|
return {
|
|
130
130
|
header: editableHeader(getLocaleText(value.title)),
|
|
131
131
|
accessorFn: (row, index) => {
|
|
132
|
+
if (!value.accessor) return void 0;
|
|
132
133
|
try {
|
|
133
134
|
return Effect.runSync($cel(value.accessor, { ...inheritedContext, row, index }));
|
|
134
135
|
} catch (e) {
|
|
@@ -67,7 +67,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
67
67
|
}[]] | undefined;
|
|
68
68
|
readonly readonly?: string | undefined;
|
|
69
69
|
readonly enableSorting?: boolean | undefined;
|
|
70
|
-
readonly accessor
|
|
70
|
+
readonly accessor?: string | undefined;
|
|
71
71
|
readonly sortKey?: string | undefined;
|
|
72
72
|
readonly successMessage?: string | undefined;
|
|
73
73
|
}) => any;
|
|
@@ -136,7 +136,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
136
136
|
}[]] | undefined;
|
|
137
137
|
readonly readonly?: string | undefined;
|
|
138
138
|
readonly enableSorting?: boolean | undefined;
|
|
139
|
-
readonly accessor
|
|
139
|
+
readonly accessor?: string | undefined;
|
|
140
140
|
readonly sortKey?: string | undefined;
|
|
141
141
|
readonly successMessage?: string | undefined;
|
|
142
142
|
}) => any) | undefined;
|
|
@@ -67,7 +67,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
67
67
|
}[]] | undefined;
|
|
68
68
|
readonly readonly?: string | undefined;
|
|
69
69
|
readonly enableSorting?: boolean | undefined;
|
|
70
|
-
readonly accessor
|
|
70
|
+
readonly accessor?: string | undefined;
|
|
71
71
|
readonly sortKey?: string | undefined;
|
|
72
72
|
readonly successMessage?: string | undefined;
|
|
73
73
|
}) => any;
|
|
@@ -136,7 +136,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
136
136
|
}[]] | undefined;
|
|
137
137
|
readonly readonly?: string | undefined;
|
|
138
138
|
readonly enableSorting?: boolean | undefined;
|
|
139
|
-
readonly accessor
|
|
139
|
+
readonly accessor?: string | undefined;
|
|
140
140
|
readonly sortKey?: string | undefined;
|
|
141
141
|
readonly successMessage?: string | undefined;
|
|
142
142
|
}) => any) | undefined;
|
|
@@ -109,7 +109,7 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
|
|
|
109
109
|
locale: Schema.Literal<["ja", "en", "ko"]>;
|
|
110
110
|
message: Schema.SchemaClass<string, string, never>;
|
|
111
111
|
}>]>;
|
|
112
|
-
accessor: Schema.Schema<string, string, never
|
|
112
|
+
accessor: Schema.optional<Schema.Schema<string, string, never>>;
|
|
113
113
|
enableSorting: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
|
|
114
114
|
sortKey: Schema.optional<Schema.refine<string, typeof Schema.String>>;
|
|
115
115
|
size: Schema.optional<Schema.refine<number, Schema.filter<typeof Schema.Number>>>;
|
|
@@ -107,6 +107,7 @@ export function toColumnDef(value, { getLocaleText, $cel, inheritedContext }) {
|
|
|
107
107
|
return {
|
|
108
108
|
header: editableHeader(getLocaleText(value.title)),
|
|
109
109
|
accessorFn: (row, index) => {
|
|
110
|
+
if (!value.accessor) return void 0;
|
|
110
111
|
try {
|
|
111
112
|
return Effect.runSync($cel(value.accessor, { ...inheritedContext, row, index }));
|
|
112
113
|
} catch (e) {
|
|
@@ -53,7 +53,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
53
53
|
readonly locale: "en" | "ja" | "ko";
|
|
54
54
|
readonly message: string;
|
|
55
55
|
}[]];
|
|
56
|
-
readonly accessor
|
|
56
|
+
readonly accessor?: string | undefined;
|
|
57
57
|
readonly sortKey?: string | undefined;
|
|
58
58
|
readonly successMessage?: string | undefined;
|
|
59
59
|
}) => any;
|
|
@@ -108,7 +108,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
108
108
|
readonly locale: "en" | "ja" | "ko";
|
|
109
109
|
readonly message: string;
|
|
110
110
|
}[]];
|
|
111
|
-
readonly accessor
|
|
111
|
+
readonly accessor?: string | undefined;
|
|
112
112
|
readonly sortKey?: string | undefined;
|
|
113
113
|
readonly successMessage?: string | undefined;
|
|
114
114
|
}) => any) | undefined;
|
|
@@ -53,7 +53,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
53
53
|
readonly locale: "en" | "ja" | "ko";
|
|
54
54
|
readonly message: string;
|
|
55
55
|
}[]];
|
|
56
|
-
readonly accessor
|
|
56
|
+
readonly accessor?: string | undefined;
|
|
57
57
|
readonly sortKey?: string | undefined;
|
|
58
58
|
readonly successMessage?: string | undefined;
|
|
59
59
|
}) => any;
|
|
@@ -108,7 +108,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
108
108
|
readonly locale: "en" | "ja" | "ko";
|
|
109
109
|
readonly message: string;
|
|
110
110
|
}[]];
|
|
111
|
-
readonly accessor
|
|
111
|
+
readonly accessor?: string | undefined;
|
|
112
112
|
readonly sortKey?: string | undefined;
|
|
113
113
|
readonly successMessage?: string | undefined;
|
|
114
114
|
}) => any) | undefined;
|
|
@@ -68,7 +68,7 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
|
|
|
68
68
|
locale: Schema.Literal<["ja", "en", "ko"]>;
|
|
69
69
|
message: Schema.SchemaClass<string, string, never>;
|
|
70
70
|
}>]>;
|
|
71
|
-
accessor: Schema.Schema<string, string, never
|
|
71
|
+
accessor: Schema.optional<Schema.Schema<string, string, never>>;
|
|
72
72
|
enableSorting: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
|
|
73
73
|
sortKey: Schema.optional<Schema.refine<string, typeof Schema.String>>;
|
|
74
74
|
size: Schema.optional<Schema.refine<number, Schema.filter<typeof Schema.Number>>>;
|
|
@@ -129,6 +129,7 @@ export function toColumnDef(value, { getLocaleText, $cel, inheritedContext }) {
|
|
|
129
129
|
return {
|
|
130
130
|
header: editableHeader(getLocaleText(value.title)),
|
|
131
131
|
accessorFn: (row, index) => {
|
|
132
|
+
if (!value.accessor) return void 0;
|
|
132
133
|
try {
|
|
133
134
|
return Effect.runSync($cel(value.accessor, { ...inheritedContext, row, index }));
|
|
134
135
|
} catch (e) {
|
|
@@ -67,7 +67,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
67
67
|
}[]] | undefined;
|
|
68
68
|
readonly readonly?: string | undefined;
|
|
69
69
|
readonly enableSorting?: boolean | undefined;
|
|
70
|
-
readonly accessor
|
|
70
|
+
readonly accessor?: string | undefined;
|
|
71
71
|
readonly sortKey?: string | undefined;
|
|
72
72
|
readonly successMessage?: string | undefined;
|
|
73
73
|
}) => any;
|
|
@@ -136,7 +136,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
136
136
|
}[]] | undefined;
|
|
137
137
|
readonly readonly?: string | undefined;
|
|
138
138
|
readonly enableSorting?: boolean | undefined;
|
|
139
|
-
readonly accessor
|
|
139
|
+
readonly accessor?: string | undefined;
|
|
140
140
|
readonly sortKey?: string | undefined;
|
|
141
141
|
readonly successMessage?: string | undefined;
|
|
142
142
|
}) => any) | undefined;
|
|
@@ -67,7 +67,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
67
67
|
}[]] | undefined;
|
|
68
68
|
readonly readonly?: string | undefined;
|
|
69
69
|
readonly enableSorting?: boolean | undefined;
|
|
70
|
-
readonly accessor
|
|
70
|
+
readonly accessor?: string | undefined;
|
|
71
71
|
readonly sortKey?: string | undefined;
|
|
72
72
|
readonly successMessage?: string | undefined;
|
|
73
73
|
}) => any;
|
|
@@ -136,7 +136,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
136
136
|
}[]] | undefined;
|
|
137
137
|
readonly readonly?: string | undefined;
|
|
138
138
|
readonly enableSorting?: boolean | undefined;
|
|
139
|
-
readonly accessor
|
|
139
|
+
readonly accessor?: string | undefined;
|
|
140
140
|
readonly sortKey?: string | undefined;
|
|
141
141
|
readonly successMessage?: string | undefined;
|
|
142
142
|
}) => any) | undefined;
|
|
@@ -109,7 +109,7 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
|
|
|
109
109
|
locale: Schema.Literal<["ja", "en", "ko"]>;
|
|
110
110
|
message: Schema.SchemaClass<string, string, never>;
|
|
111
111
|
}>]>;
|
|
112
|
-
accessor: Schema.Schema<string, string, never
|
|
112
|
+
accessor: Schema.optional<Schema.Schema<string, string, never>>;
|
|
113
113
|
enableSorting: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
|
|
114
114
|
sortKey: Schema.optional<Schema.refine<string, typeof Schema.String>>;
|
|
115
115
|
size: Schema.optional<Schema.refine<number, Schema.filter<typeof Schema.Number>>>;
|
|
@@ -107,6 +107,7 @@ export function toColumnDef(value, { getLocaleText, $cel, inheritedContext }) {
|
|
|
107
107
|
return {
|
|
108
108
|
header: editableHeader(getLocaleText(value.title)),
|
|
109
109
|
accessorFn: (row, index) => {
|
|
110
|
+
if (!value.accessor) return void 0;
|
|
110
111
|
try {
|
|
111
112
|
return Effect.runSync($cel(value.accessor, { ...inheritedContext, row, index }));
|
|
112
113
|
} catch (e) {
|
|
@@ -82,7 +82,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
82
82
|
};
|
|
83
83
|
}[];
|
|
84
84
|
};
|
|
85
|
-
readonly accessor
|
|
85
|
+
readonly accessor?: string | undefined;
|
|
86
86
|
readonly sortKey?: string | undefined;
|
|
87
87
|
readonly successMessage?: string | undefined;
|
|
88
88
|
}) => any;
|
|
@@ -166,7 +166,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
166
166
|
};
|
|
167
167
|
}[];
|
|
168
168
|
};
|
|
169
|
-
readonly accessor
|
|
169
|
+
readonly accessor?: string | undefined;
|
|
170
170
|
readonly sortKey?: string | undefined;
|
|
171
171
|
readonly successMessage?: string | undefined;
|
|
172
172
|
}) => any) | undefined;
|
|
@@ -82,7 +82,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
82
82
|
};
|
|
83
83
|
}[];
|
|
84
84
|
};
|
|
85
|
-
readonly accessor
|
|
85
|
+
readonly accessor?: string | undefined;
|
|
86
86
|
readonly sortKey?: string | undefined;
|
|
87
87
|
readonly successMessage?: string | undefined;
|
|
88
88
|
}) => any;
|
|
@@ -166,7 +166,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
166
166
|
};
|
|
167
167
|
}[];
|
|
168
168
|
};
|
|
169
|
-
readonly accessor
|
|
169
|
+
readonly accessor?: string | undefined;
|
|
170
170
|
readonly sortKey?: string | undefined;
|
|
171
171
|
readonly successMessage?: string | undefined;
|
|
172
172
|
}) => any) | undefined;
|
|
@@ -234,7 +234,7 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
|
|
|
234
234
|
locale: Schema.Literal<["ja", "en", "ko"]>;
|
|
235
235
|
message: Schema.SchemaClass<string, string, never>;
|
|
236
236
|
}>]>;
|
|
237
|
-
accessor: Schema.Schema<string, string, never
|
|
237
|
+
accessor: Schema.optional<Schema.Schema<string, string, never>>;
|
|
238
238
|
enableSorting: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
|
|
239
239
|
sortKey: Schema.optional<Schema.refine<string, typeof Schema.String>>;
|
|
240
240
|
size: Schema.optional<Schema.refine<number, Schema.filter<typeof Schema.Number>>>;
|
|
@@ -212,6 +212,7 @@ export function toColumnDef(value, { getLocaleText, $cel, inheritedContext }) {
|
|
|
212
212
|
return {
|
|
213
213
|
header: editableHeader(getLocaleText(value.title)),
|
|
214
214
|
accessorFn: (row, index) => {
|
|
215
|
+
if (!value.accessor) return void 0;
|
|
215
216
|
try {
|
|
216
217
|
return Effect.runSync($cel(value.accessor, { ...inheritedContext, row, index }));
|
|
217
218
|
} catch (e) {
|
|
@@ -82,7 +82,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
82
82
|
};
|
|
83
83
|
}[];
|
|
84
84
|
};
|
|
85
|
-
readonly accessor
|
|
85
|
+
readonly accessor?: string | undefined;
|
|
86
86
|
readonly sortKey?: string | undefined;
|
|
87
87
|
readonly successMessage?: string | undefined;
|
|
88
88
|
}) => any;
|
|
@@ -166,7 +166,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
166
166
|
};
|
|
167
167
|
}[];
|
|
168
168
|
};
|
|
169
|
-
readonly accessor
|
|
169
|
+
readonly accessor?: string | undefined;
|
|
170
170
|
readonly sortKey?: string | undefined;
|
|
171
171
|
readonly successMessage?: string | undefined;
|
|
172
172
|
}) => any) | undefined;
|
|
@@ -82,7 +82,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
82
82
|
};
|
|
83
83
|
}[];
|
|
84
84
|
};
|
|
85
|
-
readonly accessor
|
|
85
|
+
readonly accessor?: string | undefined;
|
|
86
86
|
readonly sortKey?: string | undefined;
|
|
87
87
|
readonly successMessage?: string | undefined;
|
|
88
88
|
}) => any;
|
|
@@ -166,7 +166,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
166
166
|
};
|
|
167
167
|
}[];
|
|
168
168
|
};
|
|
169
|
-
readonly accessor
|
|
169
|
+
readonly accessor?: string | undefined;
|
|
170
170
|
readonly sortKey?: string | undefined;
|
|
171
171
|
readonly successMessage?: string | undefined;
|
|
172
172
|
}) => any) | undefined;
|
|
@@ -234,7 +234,7 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
|
|
|
234
234
|
locale: Schema.Literal<["ja", "en", "ko"]>;
|
|
235
235
|
message: Schema.SchemaClass<string, string, never>;
|
|
236
236
|
}>]>;
|
|
237
|
-
accessor: Schema.Schema<string, string, never
|
|
237
|
+
accessor: Schema.optional<Schema.Schema<string, string, never>>;
|
|
238
238
|
enableSorting: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
|
|
239
239
|
sortKey: Schema.optional<Schema.refine<string, typeof Schema.String>>;
|
|
240
240
|
size: Schema.optional<Schema.refine<number, Schema.filter<typeof Schema.Number>>>;
|
|
@@ -212,6 +212,7 @@ export function toColumnDef(value, { getLocaleText, $cel, inheritedContext }) {
|
|
|
212
212
|
return {
|
|
213
213
|
header: editableHeader(getLocaleText(value.title)),
|
|
214
214
|
accessorFn: (row, index) => {
|
|
215
|
+
if (!value.accessor) return void 0;
|
|
215
216
|
try {
|
|
216
217
|
return Effect.runSync($cel(value.accessor, { ...inheritedContext, row, index }));
|
|
217
218
|
} catch (e) {
|
|
@@ -15,7 +15,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
15
15
|
readonly locale: "en" | "ja" | "ko";
|
|
16
16
|
readonly message: string;
|
|
17
17
|
}[]];
|
|
18
|
-
readonly hidden?:
|
|
18
|
+
readonly hidden?: boolean | undefined;
|
|
19
19
|
readonly tooltip?: readonly [{
|
|
20
20
|
readonly locale: "zh";
|
|
21
21
|
readonly message: string;
|
|
@@ -23,6 +23,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
23
23
|
readonly locale: "en" | "ja" | "ko";
|
|
24
24
|
readonly message: string;
|
|
25
25
|
}[]] | undefined;
|
|
26
|
+
readonly align: "center" | "left" | "right";
|
|
26
27
|
readonly compatibilityDate: "2026-06-14";
|
|
27
28
|
readonly grow?: boolean | undefined;
|
|
28
29
|
readonly groupId?: string | undefined;
|
|
@@ -101,7 +102,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
101
102
|
readonly locale: "en" | "ja" | "ko";
|
|
102
103
|
readonly message: string;
|
|
103
104
|
}[]];
|
|
104
|
-
readonly hidden?:
|
|
105
|
+
readonly hidden?: boolean | undefined;
|
|
105
106
|
readonly tooltip?: readonly [{
|
|
106
107
|
readonly locale: "zh";
|
|
107
108
|
readonly message: string;
|
|
@@ -109,6 +110,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
109
110
|
readonly locale: "en" | "ja" | "ko";
|
|
110
111
|
readonly message: string;
|
|
111
112
|
}[]] | undefined;
|
|
113
|
+
readonly align: "center" | "left" | "right";
|
|
112
114
|
readonly compatibilityDate: "2026-06-14";
|
|
113
115
|
readonly grow?: boolean | undefined;
|
|
114
116
|
readonly groupId?: string | undefined;
|