@shwfed/config 3.0.15 → 3.0.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/module.json +1 -1
- package/dist/runtime/components/actions/buttons/2026-06-25/com.shwfed.actions.button.state.write/config.d.vue.ts +8 -8
- package/dist/runtime/components/actions/buttons/2026-06-25/com.shwfed.actions.button.state.write/config.vue.d.ts +8 -8
- package/dist/runtime/components/actions/buttons/2026-07-13/com.shwfed.actions.button.state.write/config.d.vue.ts +8 -8
- package/dist/runtime/components/actions/buttons/2026-07-13/com.shwfed.actions.button.state.write/config.vue.d.ts +8 -8
- package/dist/runtime/components/actions/buttons/2026-07-13/com.shwfed.actions.button.state.write/runtime.vue +1 -16
- package/dist/runtime/components/config/blocks/2026-07-17/com.shwfed.block.invoice.realestate.lease/config.d.vue.ts +6 -6
- package/dist/runtime/components/config/blocks/2026-07-17/com.shwfed.block.invoice.realestate.lease/config.vue.d.ts +6 -6
- package/dist/runtime/components/config/blocks/2026-07-17/com.shwfed.block.invoice.realestate.lease/runtime.d.vue.ts +6 -6
- package/dist/runtime/components/config/blocks/2026-07-17/com.shwfed.block.invoice.realestate.lease/runtime.vue.d.ts +6 -6
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/config.d.vue.ts +2 -2
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/config.vue.d.ts +2 -2
- package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/config.d.vue.ts +16 -16
- package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/config.vue.d.ts +16 -16
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.d.vue.ts +6 -6
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.vue.d.ts +6 -6
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.d.vue.ts +8 -8
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.vue.d.ts +8 -8
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/config.d.vue.ts +2 -2
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/config.vue.d.ts +2 -2
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/config.d.vue.ts +16 -16
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/config.vue.d.ts +16 -16
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/config.d.vue.ts +6 -6
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/config.vue.d.ts +6 -6
- package/dist/runtime/components/form/fields/2026-05-25/com.shwfed.form.field.combobox.multi/config.d.vue.ts +16 -16
- package/dist/runtime/components/form/fields/2026-05-25/com.shwfed.form.field.combobox.multi/config.vue.d.ts +16 -16
- package/dist/runtime/components/form/index.vue +57 -2
- package/dist/runtime/components/form/schema.d.ts +5 -0
- package/dist/runtime/components/form/schema.js +14 -1
- package/dist/runtime/components/form/utils/derived.js +1 -0
- package/dist/runtime/components/form/utils/state-write.d.ts +9 -0
- package/dist/runtime/components/form/utils/state-write.js +16 -0
- package/dist/runtime/components/operations/2026-07-19/com.shwfed.operation.form.state.write/config.d.vue.ts +21 -0
- package/dist/runtime/components/operations/2026-07-19/com.shwfed.operation.form.state.write/config.vue +100 -0
- package/dist/runtime/components/operations/2026-07-19/com.shwfed.operation.form.state.write/config.vue.d.ts +21 -0
- package/dist/runtime/components/operations/2026-07-19/com.shwfed.operation.form.state.write/schema.d.ts +18 -0
- package/dist/runtime/components/operations/2026-07-19/com.shwfed.operation.form.state.write/schema.js +47 -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 +32 -0
- 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.combobox-single/schema.js +1 -1
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.number-input/config.vue +32 -0
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.number-input/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.number-input/schema.js +1 -1
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.switch/config.vue +28 -0
- 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/schema.js +1 -1
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.switch.local/config.vue +32 -0
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.switch.local/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.switch.local/schema.js +1 -1
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.text-input/config.vue +32 -0
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.text-input/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.text-input/schema.js +1 -1
- 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 +32 -0
- 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/schema.js +1 -1
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi/config.d.vue.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi/config.vue +22 -0
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi/config.vue.d.ts +2 -0
- 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/schema.js +1 -1
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single/config.d.vue.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single/config.vue +22 -0
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single/config.vue.d.ts +2 -0
- 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/schema.js +1 -1
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/config.d.vue.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/config.vue +22 -0
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/config.vue.d.ts +2 -0
- 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-multi/schema.js +1 -1
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-single/config.d.vue.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-single/config.vue +22 -0
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-single/config.vue.d.ts +2 -0
- 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-27/com.shwfed.table.column.tree-combobox-single/schema.js +1 -1
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/config.d.vue.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/config.vue +22 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/config.vue.d.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/schema.js +1 -1
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/config.d.vue.ts +2 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/config.vue +22 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/config.vue.d.ts +2 -0
- 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 +1 -1
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-multi/config.d.vue.ts +2 -0
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-multi/config.vue +22 -0
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-multi/config.vue.d.ts +2 -0
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-multi/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-multi/schema.js +1 -1
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-single/config.d.vue.ts +2 -0
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-single/config.vue +22 -0
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-single/config.vue.d.ts +2 -0
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-single/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-single/schema.js +1 -1
- package/dist/runtime/components/table/columns/2026-06-17/com.shwfed.table.column.date-input/config.vue +32 -0
- package/dist/runtime/components/table/columns/2026-06-17/com.shwfed.table.column.date-input/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-06-17/com.shwfed.table.column.date-input/schema.js +1 -1
- package/dist/runtime/components/table/columns/2026-06-22/com.shwfed.table.column.date-range-input/config.vue +32 -0
- package/dist/runtime/components/table/columns/2026-06-22/com.shwfed.table.column.date-range-input/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-06-22/com.shwfed.table.column.date-range-input/schema.js +1 -1
- package/dist/runtime/components/table/columns/2026-07-16/com.shwfed.table.column.upload/config.vue +32 -0
- package/dist/runtime/components/table/columns/2026-07-16/com.shwfed.table.column.upload/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-07-16/com.shwfed.table.column.upload/schema.js +1 -1
- package/dist/runtime/components/table/index.d.vue.ts +1 -0
- package/dist/runtime/components/table/index.vue +12 -1
- package/dist/runtime/components/table/index.vue.d.ts +1 -0
- package/dist/runtime/components/table/utils/shared.d.ts +2 -1
- package/dist/runtime/components/table/utils/shared.js +24 -1
- package/dist/runtime/components/ui/date-picker/DatePickerInput.d.vue.ts +1 -1
- package/dist/runtime/components/ui/date-picker/DatePickerInput.vue.d.ts +1 -1
- package/dist/runtime/components/ui/date-picker/DatePickerTimeInput.d.vue.ts +1 -1
- package/dist/runtime/components/ui/date-picker/DatePickerTimeInput.vue.d.ts +1 -1
- package/dist/runtime/components/ui/date-range-picker/DateRangePickerInput.d.vue.ts +1 -1
- package/dist/runtime/components/ui/date-range-picker/DateRangePickerInput.vue.d.ts +1 -1
- package/dist/runtime/components/ui/date-range-picker/DateRangePickerTimeInput.d.vue.ts +2 -2
- package/dist/runtime/components/ui/date-range-picker/DateRangePickerTimeInput.vue.d.ts +2 -2
- package/package.json +1 -1
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type Value } from './schema.js';
|
|
2
|
+
type __VLS_ModelProps = {
|
|
3
|
+
modelValue: Value;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
6
|
+
"update:modelValue": (value: {
|
|
7
|
+
readonly writes: readonly {
|
|
8
|
+
readonly path: string;
|
|
9
|
+
readonly value: string;
|
|
10
|
+
}[];
|
|
11
|
+
}) => any;
|
|
12
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
13
|
+
"onUpdate:modelValue"?: ((value: {
|
|
14
|
+
readonly writes: readonly {
|
|
15
|
+
readonly path: string;
|
|
16
|
+
readonly value: string;
|
|
17
|
+
}[];
|
|
18
|
+
}) => any) | undefined;
|
|
19
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
20
|
+
declare const _default: typeof __VLS_export;
|
|
21
|
+
export default _default;
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed } from "vue";
|
|
3
|
+
import { Icon } from "@iconify/vue";
|
|
4
|
+
import { Button } from "../../../ui/button";
|
|
5
|
+
import { Field, FieldLabel } from "../../../ui/field";
|
|
6
|
+
import { ExpressionEditor } from "../../../ui/expression-editor";
|
|
7
|
+
import { Markdown } from "../../../ui/markdown";
|
|
8
|
+
import { InputGroupButton } from "../../../ui/input-group";
|
|
9
|
+
import { getStructFieldDescription, getStructFieldTitle } from "../../../../share/schema-meta";
|
|
10
|
+
import { schema } from "./schema";
|
|
11
|
+
defineOptions({ name: "ShwfedFormStateWriteOperationConfig" });
|
|
12
|
+
const value = defineModel({ type: null, ...{ required: true } });
|
|
13
|
+
const opSchema = schema(() => {
|
|
14
|
+
});
|
|
15
|
+
const fieldTitle = (f) => getStructFieldTitle(opSchema, f) ?? f;
|
|
16
|
+
const fieldDescription = (f) => getStructFieldDescription(opSchema, f);
|
|
17
|
+
const writes = computed(() => value.value.writes ?? []);
|
|
18
|
+
function patchWrites(next) {
|
|
19
|
+
value.value = { ...value.value, writes: next };
|
|
20
|
+
}
|
|
21
|
+
function updateRow(index, patch) {
|
|
22
|
+
patchWrites(writes.value.map((w, i) => i === index ? { ...w, ...patch } : w));
|
|
23
|
+
}
|
|
24
|
+
function addRow() {
|
|
25
|
+
patchWrites([...writes.value, { path: "", value: "" }]);
|
|
26
|
+
}
|
|
27
|
+
function removeRow(index) {
|
|
28
|
+
patchWrites(writes.value.filter((_, i) => i !== index));
|
|
29
|
+
}
|
|
30
|
+
</script>
|
|
31
|
+
|
|
32
|
+
<template>
|
|
33
|
+
<Field orientation="vertical">
|
|
34
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
35
|
+
<template
|
|
36
|
+
v-if="fieldDescription('writes')"
|
|
37
|
+
#tooltip
|
|
38
|
+
>
|
|
39
|
+
<Markdown
|
|
40
|
+
:source="fieldDescription('writes')"
|
|
41
|
+
block
|
|
42
|
+
class="prose prose-sm prose-zinc"
|
|
43
|
+
/>
|
|
44
|
+
</template>
|
|
45
|
+
{{ fieldTitle("writes") }}
|
|
46
|
+
</FieldLabel>
|
|
47
|
+
|
|
48
|
+
<div class="flex flex-col gap-3">
|
|
49
|
+
<!-- One write item per multiline editor: the monofont binding path as a
|
|
50
|
+
full-width `leading` header row, the value expression wrapping below
|
|
51
|
+
(its own `{x}` badge), and a destructive delete in the `trailing`
|
|
52
|
+
bottom row. Reuses the ExpressionEditor's own InputGroup. -->
|
|
53
|
+
<ExpressionEditor
|
|
54
|
+
v-for="(row, index) in writes"
|
|
55
|
+
:key="index"
|
|
56
|
+
:model-value="row.value"
|
|
57
|
+
multiline
|
|
58
|
+
placeholder="值,如 selected[?0].?exchangeRate"
|
|
59
|
+
class="min-h-16"
|
|
60
|
+
@update:model-value="(v) => updateRow(index, { value: v })"
|
|
61
|
+
>
|
|
62
|
+
<template #leading>
|
|
63
|
+
<input
|
|
64
|
+
type="text"
|
|
65
|
+
data-slot="state-write-path"
|
|
66
|
+
:value="row.path"
|
|
67
|
+
placeholder="路径"
|
|
68
|
+
class="w-full min-w-0 bg-transparent font-mono text-sm text-zinc-700 outline-none placeholder:text-zinc-300"
|
|
69
|
+
:aria-label="`\u5199\u5165\u8DEF\u5F84 ${index + 1}`"
|
|
70
|
+
@input="updateRow(index, { path: $event.target.value })"
|
|
71
|
+
>
|
|
72
|
+
</template>
|
|
73
|
+
<template #trailing>
|
|
74
|
+
<InputGroupButton
|
|
75
|
+
variant="destructive"
|
|
76
|
+
size="icon-xs"
|
|
77
|
+
as-child
|
|
78
|
+
>
|
|
79
|
+
<button
|
|
80
|
+
type="button"
|
|
81
|
+
:aria-label="`\u79FB\u9664\u5199\u5165\u9879 ${index + 1}`"
|
|
82
|
+
@click="removeRow(index)"
|
|
83
|
+
>
|
|
84
|
+
<Icon icon="fluent:delete-20-regular" />
|
|
85
|
+
</button>
|
|
86
|
+
</InputGroupButton>
|
|
87
|
+
</template>
|
|
88
|
+
</ExpressionEditor>
|
|
89
|
+
|
|
90
|
+
<Button
|
|
91
|
+
type="button"
|
|
92
|
+
class="justify-center"
|
|
93
|
+
@click="addRow"
|
|
94
|
+
>
|
|
95
|
+
<Icon icon="fluent:add-20-regular" />
|
|
96
|
+
<span>添加写入项</span>
|
|
97
|
+
</Button>
|
|
98
|
+
</div>
|
|
99
|
+
</Field>
|
|
100
|
+
</template>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type Value } from './schema.js';
|
|
2
|
+
type __VLS_ModelProps = {
|
|
3
|
+
modelValue: Value;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
6
|
+
"update:modelValue": (value: {
|
|
7
|
+
readonly writes: readonly {
|
|
8
|
+
readonly path: string;
|
|
9
|
+
readonly value: string;
|
|
10
|
+
}[];
|
|
11
|
+
}) => any;
|
|
12
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
13
|
+
"onUpdate:modelValue"?: ((value: {
|
|
14
|
+
readonly writes: readonly {
|
|
15
|
+
readonly path: string;
|
|
16
|
+
readonly value: string;
|
|
17
|
+
}[];
|
|
18
|
+
}) => any) | undefined;
|
|
19
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
20
|
+
declare const _default: typeof __VLS_export;
|
|
21
|
+
export default _default;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Schema } from 'effect';
|
|
2
|
+
import type { Environment } from '../../../../vendor/cel-js/lib/index.js';
|
|
3
|
+
export declare const type: "com.shwfed.operation.form.state.write";
|
|
4
|
+
export declare const compatibilityDate: "2026-07-19";
|
|
5
|
+
export declare const metadata: {
|
|
6
|
+
readonly name: "写入表单状态";
|
|
7
|
+
readonly icon: "fluent:document-edit-20-regular";
|
|
8
|
+
readonly description: "按列表顺序把每个 CEL 求值结果写入目标表单状态的对应绑定路径;作为触发链中的一步派发";
|
|
9
|
+
};
|
|
10
|
+
export declare function schema(configure: (env: Environment) => void): Schema.Struct<{
|
|
11
|
+
writes: Schema.Array$<Schema.Struct<{
|
|
12
|
+
path: Schema.SchemaClass<string, string, never>;
|
|
13
|
+
value: Schema.Schema<string, string, never>;
|
|
14
|
+
}>>;
|
|
15
|
+
}>;
|
|
16
|
+
export type Value = Schema.Schema.Type<ReturnType<typeof schema>>;
|
|
17
|
+
export type WriteValue = Value['writes'][number];
|
|
18
|
+
export declare function defaults(): Partial<Value>;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import { Expression } from "../../../../share/expression.js";
|
|
3
|
+
import { md } from "../../../../share/markdown.js";
|
|
4
|
+
import { registerStepsVariableIfAbsent } from "../../utils/step-vars.js";
|
|
5
|
+
export const type = "com.shwfed.operation.form.state.write";
|
|
6
|
+
export const compatibilityDate = "2026-07-19";
|
|
7
|
+
export const metadata = {
|
|
8
|
+
name: "\u5199\u5165\u8868\u5355\u72B6\u6001",
|
|
9
|
+
icon: "fluent:document-edit-20-regular",
|
|
10
|
+
description: "\u6309\u5217\u8868\u987A\u5E8F\u628A\u6BCF\u4E2A CEL \u6C42\u503C\u7ED3\u679C\u5199\u5165\u76EE\u6807\u8868\u5355\u72B6\u6001\u7684\u5BF9\u5E94\u7ED1\u5B9A\u8DEF\u5F84\uFF1B\u4F5C\u4E3A\u89E6\u53D1\u94FE\u4E2D\u7684\u4E00\u6B65\u6D3E\u53D1"
|
|
11
|
+
};
|
|
12
|
+
export function schema(configure) {
|
|
13
|
+
const withSteps = (env) => {
|
|
14
|
+
configure(env);
|
|
15
|
+
registerStepsVariableIfAbsent(env);
|
|
16
|
+
};
|
|
17
|
+
const Write = Schema.Struct({
|
|
18
|
+
path: Schema.String.annotations({
|
|
19
|
+
title: "\u8DEF\u5F84",
|
|
20
|
+
description: "\u5199\u5165\u7684\u7ED1\u5B9A\u8DEF\u5F84\uFF0C\u5982 `dataJson.cus_currency`"
|
|
21
|
+
}),
|
|
22
|
+
value: Expression({ configure: withSteps }).annotations({
|
|
23
|
+
title: "\u503C",
|
|
24
|
+
description: '\u6C42\u503C\u7ED3\u679C\u5199\u5165\u8BE5\u8DEF\u5F84\uFF1B\u53EF\u7ECF `steps["<\u6B65\u9AA4\u6807\u8BC6>"]` \u5F15\u7528\u540C\u4E00\u89E6\u53D1\u94FE\u4E2D\u524D\u5E8F\u6B65\u9AA4\u7684\u8F93\u51FA'
|
|
25
|
+
})
|
|
26
|
+
});
|
|
27
|
+
return Schema.Struct({
|
|
28
|
+
writes: Schema.Array(Write).annotations({
|
|
29
|
+
title: "\u5199\u5165\u503C",
|
|
30
|
+
description: md`
|
|
31
|
+
按列表顺序逐行求值并写入到目标表单的状态:每行的 \`值\`
|
|
32
|
+
表达式结果写入其 \`路径\`。对象值与当前值深合并(数组整体替换),
|
|
33
|
+
其他类型直接替换。留空表示不进行任何写入。
|
|
34
|
+
`
|
|
35
|
+
})
|
|
36
|
+
}).annotations({
|
|
37
|
+
title: "FormStateWriteOperation",
|
|
38
|
+
description: md`
|
|
39
|
+
按顺序将每个 CEL 表达式的结果写回目标表单状态的对应路径。作为触发链中的
|
|
40
|
+
一步派发;写入值可经 \`steps["<步骤标识>"]\` 引用同一触发链中前序步骤的输出。
|
|
41
|
+
任一行求值或写入失败将中止本次触发链——其后各行与后续操作不再执行。
|
|
42
|
+
`
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
export function defaults() {
|
|
46
|
+
return { writes: [] };
|
|
47
|
+
}
|
|
@@ -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 required?: string | undefined;
|
|
26
27
|
readonly compatibilityDate: "2026-05-20";
|
|
27
28
|
readonly grow?: boolean | undefined;
|
|
28
29
|
readonly items: readonly {
|
|
@@ -87,6 +88,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
87
88
|
readonly locale: "en" | "ja" | "ko";
|
|
88
89
|
readonly message: string;
|
|
89
90
|
}[]] | undefined;
|
|
91
|
+
readonly required?: string | undefined;
|
|
90
92
|
readonly compatibilityDate: "2026-05-20";
|
|
91
93
|
readonly grow?: boolean | undefined;
|
|
92
94
|
readonly items: readonly {
|
|
@@ -77,6 +77,17 @@ const readonlyModel = computed({
|
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
79
|
});
|
|
80
|
+
const requiredModel = computed({
|
|
81
|
+
get: () => value.value.required ?? "",
|
|
82
|
+
set: (v) => {
|
|
83
|
+
if (v === "") {
|
|
84
|
+
const { required: _omit, ...rest } = value.value;
|
|
85
|
+
value.value = rest;
|
|
86
|
+
} else {
|
|
87
|
+
value.value = { ...value.value, required: v };
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
});
|
|
80
91
|
const derivedModel = computed({
|
|
81
92
|
get: () => value.value.derived,
|
|
82
93
|
set: (v) => {
|
|
@@ -479,6 +490,27 @@ function setItemTooltip(index, tooltip) {
|
|
|
479
490
|
:extra-vars="ROW_VARS"
|
|
480
491
|
/>
|
|
481
492
|
</Field>
|
|
493
|
+
<Field orientation="vertical">
|
|
494
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
495
|
+
<template
|
|
496
|
+
v-if="fieldDescription('required')"
|
|
497
|
+
#tooltip
|
|
498
|
+
>
|
|
499
|
+
<Markdown
|
|
500
|
+
:source="fieldDescription('required')"
|
|
501
|
+
block
|
|
502
|
+
class="prose prose-sm prose-zinc"
|
|
503
|
+
/>
|
|
504
|
+
</template>
|
|
505
|
+
{{ fieldTitle("required") }}
|
|
506
|
+
</FieldLabel>
|
|
507
|
+
<ExpressionEditor
|
|
508
|
+
v-model="requiredModel"
|
|
509
|
+
placeholder="例:row.type == 'company'"
|
|
510
|
+
result-type="bool"
|
|
511
|
+
:extra-vars="ROW_VARS"
|
|
512
|
+
/>
|
|
513
|
+
</Field>
|
|
482
514
|
<Field
|
|
483
515
|
orientation="vertical"
|
|
484
516
|
class="col-span-2"
|
|
@@ -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 required?: string | undefined;
|
|
26
27
|
readonly compatibilityDate: "2026-05-20";
|
|
27
28
|
readonly grow?: boolean | undefined;
|
|
28
29
|
readonly items: readonly {
|
|
@@ -87,6 +88,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
87
88
|
readonly locale: "en" | "ja" | "ko";
|
|
88
89
|
readonly message: string;
|
|
89
90
|
}[]] | undefined;
|
|
91
|
+
readonly required?: string | undefined;
|
|
90
92
|
readonly compatibilityDate: "2026-05-20";
|
|
91
93
|
readonly grow?: boolean | undefined;
|
|
92
94
|
readonly items: readonly {
|
|
@@ -158,6 +158,7 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
|
|
|
158
158
|
readonly locale: "en" | "ja" | "ko";
|
|
159
159
|
readonly message: string;
|
|
160
160
|
}[]], never>>;
|
|
161
|
+
required: Schema.optional<Schema.Schema<string, string, never>>;
|
|
161
162
|
id: Schema.refine<string, typeof Schema.String>;
|
|
162
163
|
groupId: Schema.optional<typeof Schema.UUID>;
|
|
163
164
|
type: Schema.Literal<["com.shwfed.table.column.combobox-single"]>;
|
|
@@ -49,7 +49,7 @@ export function schema(configure) {
|
|
|
49
49
|
return Schema.Struct({
|
|
50
50
|
type: Schema.Literal(type),
|
|
51
51
|
compatibilityDate: Schema.Literal(compatibilityDate),
|
|
52
|
-
...editableColumnFields(),
|
|
52
|
+
...editableColumnFields(configure),
|
|
53
53
|
placeholder: Schema.optional(Locale.annotations({
|
|
54
54
|
title: "\u5360\u4F4D\u7B26",
|
|
55
55
|
description: "\u672A\u9009\u4E2D\u4EFB\u4F55\u9009\u9879\u65F6\u8F93\u5165\u6846\u4E2D\u7684\u5360\u4F4D\u6587\u672C"
|
|
@@ -138,6 +138,17 @@ const readonlyModel = computed({
|
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
140
|
});
|
|
141
|
+
const requiredModel = computed({
|
|
142
|
+
get: () => value.value.required ?? "",
|
|
143
|
+
set: (v) => {
|
|
144
|
+
if (v === "") {
|
|
145
|
+
const { required: _drop, ...rest } = value.value;
|
|
146
|
+
value.value = rest;
|
|
147
|
+
} else {
|
|
148
|
+
value.value = { ...value.value, required: v };
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
});
|
|
141
152
|
const derivedModel = computed({
|
|
142
153
|
get: () => value.value.derived,
|
|
143
154
|
set: (v) => {
|
|
@@ -575,6 +586,27 @@ function onMaxChange(v) {
|
|
|
575
586
|
:extra-vars="ROW_VARS"
|
|
576
587
|
/>
|
|
577
588
|
</Field>
|
|
589
|
+
<Field orientation="vertical">
|
|
590
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
591
|
+
<template
|
|
592
|
+
v-if="fieldDescription('required')"
|
|
593
|
+
#tooltip
|
|
594
|
+
>
|
|
595
|
+
<Markdown
|
|
596
|
+
:source="fieldDescription('required')"
|
|
597
|
+
block
|
|
598
|
+
class="prose prose-sm prose-zinc"
|
|
599
|
+
/>
|
|
600
|
+
</template>
|
|
601
|
+
{{ fieldTitle("required") }}
|
|
602
|
+
</FieldLabel>
|
|
603
|
+
<ExpressionEditor
|
|
604
|
+
v-model="requiredModel"
|
|
605
|
+
placeholder="例:row.type == 'company'"
|
|
606
|
+
result-type="bool"
|
|
607
|
+
:extra-vars="ROW_VARS"
|
|
608
|
+
/>
|
|
609
|
+
</Field>
|
|
578
610
|
<Field
|
|
579
611
|
orientation="vertical"
|
|
580
612
|
class="col-span-2"
|
|
@@ -205,6 +205,7 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
|
|
|
205
205
|
readonly message: string;
|
|
206
206
|
}[]], never>>;
|
|
207
207
|
hidden: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
|
|
208
|
+
required: Schema.optional<Schema.Schema<string, string, never>>;
|
|
208
209
|
id: Schema.refine<string, typeof Schema.String>;
|
|
209
210
|
groupId: Schema.optional<typeof Schema.UUID>;
|
|
210
211
|
type: Schema.Literal<["com.shwfed.table.column.number-input"]>;
|
|
@@ -31,7 +31,7 @@ export function schema(configure) {
|
|
|
31
31
|
return Schema.Struct({
|
|
32
32
|
type: Schema.Literal(type),
|
|
33
33
|
compatibilityDate: Schema.Literal(compatibilityDate),
|
|
34
|
-
...editableColumnFields(),
|
|
34
|
+
...editableColumnFields(configure),
|
|
35
35
|
align: Schema.optionalWith(Align.annotations({ title: "\u5BF9\u9F50" }), { default: () => "right" }),
|
|
36
36
|
placeholder: Schema.optional(Locale.annotations({
|
|
37
37
|
title: "\u5360\u4F4D\u7B26",
|
package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.switch/config.vue
CHANGED
|
@@ -55,6 +55,13 @@ const readonlyModel = computed({
|
|
|
55
55
|
else value.value.readonly = v;
|
|
56
56
|
}
|
|
57
57
|
});
|
|
58
|
+
const requiredModel = computed({
|
|
59
|
+
get: () => value.value.required ?? "",
|
|
60
|
+
set: (v) => {
|
|
61
|
+
if (v === "") delete value.value.required;
|
|
62
|
+
else value.value.required = v;
|
|
63
|
+
}
|
|
64
|
+
});
|
|
58
65
|
const derivedModel = computed({
|
|
59
66
|
get: () => value.value.derived,
|
|
60
67
|
set: (v) => {
|
|
@@ -256,6 +263,27 @@ const derivedModel = computed({
|
|
|
256
263
|
:extra-vars="ROW_VARS"
|
|
257
264
|
/>
|
|
258
265
|
</Field>
|
|
266
|
+
<Field orientation="vertical">
|
|
267
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
268
|
+
<template
|
|
269
|
+
v-if="fieldDescription('required')"
|
|
270
|
+
#tooltip
|
|
271
|
+
>
|
|
272
|
+
<Markdown
|
|
273
|
+
:source="fieldDescription('required')"
|
|
274
|
+
block
|
|
275
|
+
class="prose prose-sm prose-zinc"
|
|
276
|
+
/>
|
|
277
|
+
</template>
|
|
278
|
+
{{ fieldTitle("required") }}
|
|
279
|
+
</FieldLabel>
|
|
280
|
+
<ExpressionEditor
|
|
281
|
+
v-model="requiredModel"
|
|
282
|
+
placeholder="例:row.type == 'company'"
|
|
283
|
+
result-type="bool"
|
|
284
|
+
:extra-vars="ROW_VARS"
|
|
285
|
+
/>
|
|
286
|
+
</Field>
|
|
259
287
|
<Field
|
|
260
288
|
orientation="vertical"
|
|
261
289
|
class="col-span-2"
|
package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.switch/schema.d.ts
CHANGED
|
@@ -73,6 +73,7 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
|
|
|
73
73
|
readonly locale: "en" | "ja" | "ko";
|
|
74
74
|
readonly message: string;
|
|
75
75
|
}[]], never>>;
|
|
76
|
+
required: Schema.optional<Schema.Schema<string, string, never>>;
|
|
76
77
|
id: Schema.refine<string, typeof Schema.String>;
|
|
77
78
|
groupId: Schema.optional<typeof Schema.UUID>;
|
|
78
79
|
type: Schema.Literal<["com.shwfed.table.column.switch"]>;
|
package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.switch/schema.js
CHANGED
|
@@ -13,7 +13,7 @@ export function schema(configure) {
|
|
|
13
13
|
return Schema.Struct({
|
|
14
14
|
type: Schema.Literal(type),
|
|
15
15
|
compatibilityDate: Schema.Literal(compatibilityDate),
|
|
16
|
-
...editableColumnFields(),
|
|
16
|
+
...editableColumnFields(configure),
|
|
17
17
|
hidden: Schema.optional(CelBool.annotations({
|
|
18
18
|
title: "\u9690\u85CF\u6761\u4EF6",
|
|
19
19
|
description: "\u8FD4\u56DE `true` \u65F6\u8BE5\u884C\u7684\u5F00\u5173\u4E0D\u6E32\u67D3\uFF08\u5176\u4F59\u884C\u4E0D\u53D7\u5F71\u54CD\uFF09"
|
|
@@ -75,6 +75,17 @@ const readonlyModel = computed({
|
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
77
|
});
|
|
78
|
+
const requiredModel = computed({
|
|
79
|
+
get: () => value.value.required ?? "",
|
|
80
|
+
set: (v) => {
|
|
81
|
+
if (v === "") {
|
|
82
|
+
const { required: _drop, ...rest } = value.value;
|
|
83
|
+
value.value = rest;
|
|
84
|
+
} else {
|
|
85
|
+
value.value = { ...value.value, required: v };
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
});
|
|
78
89
|
function onHiddenChange(v) {
|
|
79
90
|
if (v) {
|
|
80
91
|
value.value = { ...value.value, hidden: true };
|
|
@@ -300,6 +311,27 @@ const derivedModel = computed({
|
|
|
300
311
|
:extra-vars="ROW_VARS"
|
|
301
312
|
/>
|
|
302
313
|
</Field>
|
|
314
|
+
<Field orientation="vertical">
|
|
315
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
316
|
+
<template
|
|
317
|
+
v-if="fieldDescription('required')"
|
|
318
|
+
#tooltip
|
|
319
|
+
>
|
|
320
|
+
<Markdown
|
|
321
|
+
:source="fieldDescription('required')"
|
|
322
|
+
block
|
|
323
|
+
class="prose prose-sm prose-zinc"
|
|
324
|
+
/>
|
|
325
|
+
</template>
|
|
326
|
+
{{ fieldTitle("required") }}
|
|
327
|
+
</FieldLabel>
|
|
328
|
+
<ExpressionEditor
|
|
329
|
+
v-model="requiredModel"
|
|
330
|
+
placeholder="例:row.type == 'company'"
|
|
331
|
+
result-type="bool"
|
|
332
|
+
:extra-vars="ROW_VARS"
|
|
333
|
+
/>
|
|
334
|
+
</Field>
|
|
303
335
|
<Field
|
|
304
336
|
orientation="vertical"
|
|
305
337
|
class="col-span-2"
|
|
@@ -77,6 +77,7 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
|
|
|
77
77
|
readonly message: string;
|
|
78
78
|
}[]], never>>;
|
|
79
79
|
hidden: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
|
|
80
|
+
required: Schema.optional<Schema.Schema<string, string, never>>;
|
|
80
81
|
id: Schema.refine<string, typeof Schema.String>;
|
|
81
82
|
groupId: Schema.optional<typeof Schema.UUID>;
|
|
82
83
|
type: Schema.Literal<["com.shwfed.table.column.switch.local"]>;
|
|
@@ -14,7 +14,7 @@ export function schema(configure) {
|
|
|
14
14
|
return Schema.Struct({
|
|
15
15
|
type: Schema.Literal(type),
|
|
16
16
|
compatibilityDate: Schema.Literal(compatibilityDate),
|
|
17
|
-
...editableColumnFields(),
|
|
17
|
+
...editableColumnFields(configure),
|
|
18
18
|
align: Schema.optionalWith(Align.annotations({ title: "\u5BF9\u9F50" }), { default: () => "center" }),
|
|
19
19
|
disabled: Schema.optional(CelBool.annotations({
|
|
20
20
|
title: "\u7981\u7528\u6761\u4EF6",
|
|
@@ -129,6 +129,17 @@ const readonlyModel = computed({
|
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
131
|
});
|
|
132
|
+
const requiredModel = computed({
|
|
133
|
+
get: () => value.value.required ?? "",
|
|
134
|
+
set: (v) => {
|
|
135
|
+
if (v === "") {
|
|
136
|
+
const { required: _drop, ...rest } = value.value;
|
|
137
|
+
value.value = rest;
|
|
138
|
+
} else {
|
|
139
|
+
value.value = { ...value.value, required: v };
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
});
|
|
132
143
|
const derivedModel = computed({
|
|
133
144
|
get: () => value.value.derived,
|
|
134
145
|
set: (v) => {
|
|
@@ -335,6 +346,27 @@ const derivedModel = computed({
|
|
|
335
346
|
:extra-vars="ROW_VARS"
|
|
336
347
|
/>
|
|
337
348
|
</Field>
|
|
349
|
+
<Field orientation="vertical">
|
|
350
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
351
|
+
<template
|
|
352
|
+
v-if="fieldDescription('required')"
|
|
353
|
+
#tooltip
|
|
354
|
+
>
|
|
355
|
+
<Markdown
|
|
356
|
+
:source="fieldDescription('required')"
|
|
357
|
+
block
|
|
358
|
+
class="prose prose-sm prose-zinc"
|
|
359
|
+
/>
|
|
360
|
+
</template>
|
|
361
|
+
{{ fieldTitle("required") }}
|
|
362
|
+
</FieldLabel>
|
|
363
|
+
<ExpressionEditor
|
|
364
|
+
v-model="requiredModel"
|
|
365
|
+
placeholder="例:row.type == 'company'"
|
|
366
|
+
result-type="bool"
|
|
367
|
+
:extra-vars="ROW_VARS"
|
|
368
|
+
/>
|
|
369
|
+
</Field>
|
|
338
370
|
<Field
|
|
339
371
|
orientation="vertical"
|
|
340
372
|
class="col-span-2"
|
|
@@ -196,6 +196,7 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
|
|
|
196
196
|
readonly message: string;
|
|
197
197
|
}[]], never>>;
|
|
198
198
|
hidden: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
|
|
199
|
+
required: Schema.optional<Schema.Schema<string, string, never>>;
|
|
199
200
|
id: Schema.refine<string, typeof Schema.String>;
|
|
200
201
|
groupId: Schema.optional<typeof Schema.UUID>;
|
|
201
202
|
type: Schema.Literal<["com.shwfed.table.column.text-input"]>;
|
|
@@ -30,7 +30,7 @@ export function schema(configure) {
|
|
|
30
30
|
return Schema.Struct({
|
|
31
31
|
type: Schema.Literal(type),
|
|
32
32
|
compatibilityDate: Schema.Literal(compatibilityDate),
|
|
33
|
-
...editableColumnFields(),
|
|
33
|
+
...editableColumnFields(configure),
|
|
34
34
|
align: Schema.optionalWith(Align.annotations({ title: "\u5BF9\u9F50" }), { default: () => "left" }),
|
|
35
35
|
placeholder: Schema.optional(Locale.annotations({
|
|
36
36
|
title: "\u5360\u4F4D\u7B26",
|
|
@@ -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 required?: string | undefined;
|
|
26
27
|
readonly compatibilityDate: "2026-05-25";
|
|
27
28
|
readonly grow?: boolean | undefined;
|
|
28
29
|
readonly items: readonly {
|
|
@@ -87,6 +88,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
87
88
|
readonly locale: "en" | "ja" | "ko";
|
|
88
89
|
readonly message: string;
|
|
89
90
|
}[]] | undefined;
|
|
91
|
+
readonly required?: string | undefined;
|
|
90
92
|
readonly compatibilityDate: "2026-05-25";
|
|
91
93
|
readonly grow?: boolean | undefined;
|
|
92
94
|
readonly items: readonly {
|
|
@@ -77,6 +77,17 @@ const readonlyModel = computed({
|
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
79
|
});
|
|
80
|
+
const requiredModel = computed({
|
|
81
|
+
get: () => value.value.required ?? "",
|
|
82
|
+
set: (v) => {
|
|
83
|
+
if (v === "") {
|
|
84
|
+
const { required: _omit, ...rest } = value.value;
|
|
85
|
+
value.value = rest;
|
|
86
|
+
} else {
|
|
87
|
+
value.value = { ...value.value, required: v };
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
});
|
|
80
91
|
const derivedModel = computed({
|
|
81
92
|
get: () => value.value.derived,
|
|
82
93
|
set: (v) => {
|
|
@@ -479,6 +490,27 @@ function setItemTooltip(index, tooltip) {
|
|
|
479
490
|
:extra-vars="ROW_VARS"
|
|
480
491
|
/>
|
|
481
492
|
</Field>
|
|
493
|
+
<Field orientation="vertical">
|
|
494
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
495
|
+
<template
|
|
496
|
+
v-if="fieldDescription('required')"
|
|
497
|
+
#tooltip
|
|
498
|
+
>
|
|
499
|
+
<Markdown
|
|
500
|
+
:source="fieldDescription('required')"
|
|
501
|
+
block
|
|
502
|
+
class="prose prose-sm prose-zinc"
|
|
503
|
+
/>
|
|
504
|
+
</template>
|
|
505
|
+
{{ fieldTitle("required") }}
|
|
506
|
+
</FieldLabel>
|
|
507
|
+
<ExpressionEditor
|
|
508
|
+
v-model="requiredModel"
|
|
509
|
+
placeholder="例:row.type == 'company'"
|
|
510
|
+
result-type="bool"
|
|
511
|
+
:extra-vars="ROW_VARS"
|
|
512
|
+
/>
|
|
513
|
+
</Field>
|
|
482
514
|
<Field
|
|
483
515
|
orientation="vertical"
|
|
484
516
|
class="col-span-2"
|
|
@@ -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 required?: string | undefined;
|
|
26
27
|
readonly compatibilityDate: "2026-05-25";
|
|
27
28
|
readonly grow?: boolean | undefined;
|
|
28
29
|
readonly items: readonly {
|
|
@@ -87,6 +88,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
87
88
|
readonly locale: "en" | "ja" | "ko";
|
|
88
89
|
readonly message: string;
|
|
89
90
|
}[]] | undefined;
|
|
91
|
+
readonly required?: string | undefined;
|
|
90
92
|
readonly compatibilityDate: "2026-05-25";
|
|
91
93
|
readonly grow?: boolean | undefined;
|
|
92
94
|
readonly items: readonly {
|
|
@@ -158,6 +158,7 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
|
|
|
158
158
|
readonly locale: "en" | "ja" | "ko";
|
|
159
159
|
readonly message: string;
|
|
160
160
|
}[]], never>>;
|
|
161
|
+
required: Schema.optional<Schema.Schema<string, string, never>>;
|
|
161
162
|
id: Schema.refine<string, typeof Schema.String>;
|
|
162
163
|
groupId: Schema.optional<typeof Schema.UUID>;
|
|
163
164
|
type: Schema.Literal<["com.shwfed.table.column.combobox-multi"]>;
|