@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
|
@@ -533,6 +533,28 @@ const derivedModel = computed({
|
|
|
533
533
|
@update:model-value="(v) => setOptionalExpression('readonly', v)"
|
|
534
534
|
/>
|
|
535
535
|
</Field>
|
|
536
|
+
<Field orientation="vertical">
|
|
537
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
538
|
+
<template
|
|
539
|
+
v-if="fieldDescription('required')"
|
|
540
|
+
#tooltip
|
|
541
|
+
>
|
|
542
|
+
<Markdown
|
|
543
|
+
:source="fieldDescription('required')"
|
|
544
|
+
block
|
|
545
|
+
class="prose prose-sm prose-zinc"
|
|
546
|
+
/>
|
|
547
|
+
</template>
|
|
548
|
+
{{ fieldTitle("required") }}
|
|
549
|
+
</FieldLabel>
|
|
550
|
+
<ExpressionEditor
|
|
551
|
+
:model-value="value.required ?? ''"
|
|
552
|
+
placeholder="例:row.type == 'company'"
|
|
553
|
+
result-type="bool"
|
|
554
|
+
:extra-vars="ROW_VARS"
|
|
555
|
+
@update:model-value="(v) => setOptionalExpression('required', v)"
|
|
556
|
+
/>
|
|
557
|
+
</Field>
|
|
536
558
|
<Field
|
|
537
559
|
orientation="vertical"
|
|
538
560
|
class="col-span-2"
|
|
@@ -24,6 +24,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
24
24
|
readonly message: string;
|
|
25
25
|
}[]] | undefined;
|
|
26
26
|
readonly align: "center" | "left" | "right";
|
|
27
|
+
readonly required?: string | undefined;
|
|
27
28
|
readonly compatibilityDate: "2026-06-14";
|
|
28
29
|
readonly grow?: boolean | undefined;
|
|
29
30
|
readonly groupId?: string | undefined;
|
|
@@ -82,6 +83,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
82
83
|
readonly message: string;
|
|
83
84
|
}[]] | undefined;
|
|
84
85
|
readonly align: "center" | "left" | "right";
|
|
86
|
+
readonly required?: string | undefined;
|
|
85
87
|
readonly compatibilityDate: "2026-06-14";
|
|
86
88
|
readonly grow?: boolean | undefined;
|
|
87
89
|
readonly groupId?: string | undefined;
|
|
@@ -96,6 +96,7 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
|
|
|
96
96
|
readonly message: string;
|
|
97
97
|
}[]], never>>;
|
|
98
98
|
hidden: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
|
|
99
|
+
required: Schema.optional<Schema.Schema<string, string, never>>;
|
|
99
100
|
id: Schema.refine<string, typeof Schema.String>;
|
|
100
101
|
groupId: Schema.optional<typeof Schema.UUID>;
|
|
101
102
|
type: Schema.Literal<["com.shwfed.table.column.tree-combobox-single"]>;
|
|
@@ -68,7 +68,7 @@ export function schema(configure) {
|
|
|
68
68
|
return Schema.Struct({
|
|
69
69
|
type: Schema.Literal(type),
|
|
70
70
|
compatibilityDate: Schema.Literal(compatibilityDate),
|
|
71
|
-
...editableColumnFields(),
|
|
71
|
+
...editableColumnFields(configure),
|
|
72
72
|
align: Schema.optionalWith(Align.annotations({ title: "\u5BF9\u9F50" }), { default: () => "left" }),
|
|
73
73
|
placeholder: Schema.optional(Locale.annotations({
|
|
74
74
|
title: "\u5360\u4F4D\u7B26",
|
|
@@ -202,6 +202,17 @@ const readonlyModel = computed({
|
|
|
202
202
|
}
|
|
203
203
|
}
|
|
204
204
|
});
|
|
205
|
+
const requiredModel = computed({
|
|
206
|
+
get: () => value.value.required ?? "",
|
|
207
|
+
set: (v) => {
|
|
208
|
+
if (v === "") {
|
|
209
|
+
const { required: _drop, ...rest } = value.value;
|
|
210
|
+
value.value = rest;
|
|
211
|
+
} else {
|
|
212
|
+
value.value = { ...value.value, required: v };
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
});
|
|
205
216
|
const disabledDateModel = computed({
|
|
206
217
|
get: () => value.value.disabledDate ?? "",
|
|
207
218
|
set: (v) => {
|
|
@@ -473,6 +484,27 @@ const derivedModel = computed({
|
|
|
473
484
|
:extra-vars="ROW_VARS"
|
|
474
485
|
/>
|
|
475
486
|
</Field>
|
|
487
|
+
<Field orientation="vertical">
|
|
488
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
489
|
+
<template
|
|
490
|
+
v-if="fieldDescription('required')"
|
|
491
|
+
#tooltip
|
|
492
|
+
>
|
|
493
|
+
<Markdown
|
|
494
|
+
:source="fieldDescription('required')"
|
|
495
|
+
block
|
|
496
|
+
class="prose prose-sm prose-zinc"
|
|
497
|
+
/>
|
|
498
|
+
</template>
|
|
499
|
+
{{ fieldTitle("required") }}
|
|
500
|
+
</FieldLabel>
|
|
501
|
+
<ExpressionEditor
|
|
502
|
+
v-model="requiredModel"
|
|
503
|
+
placeholder="例:row.type == 'company'"
|
|
504
|
+
result-type="bool"
|
|
505
|
+
:extra-vars="ROW_VARS"
|
|
506
|
+
/>
|
|
507
|
+
</Field>
|
|
476
508
|
<Field orientation="vertical">
|
|
477
509
|
<FieldLabel class="text-xs text-zinc-500">
|
|
478
510
|
<template
|
|
@@ -233,6 +233,7 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
|
|
|
233
233
|
readonly message: string;
|
|
234
234
|
}[]], never>>;
|
|
235
235
|
hidden: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
|
|
236
|
+
required: Schema.optional<Schema.Schema<string, string, never>>;
|
|
236
237
|
id: Schema.refine<string, typeof Schema.String>;
|
|
237
238
|
groupId: Schema.optional<typeof Schema.UUID>;
|
|
238
239
|
type: Schema.Literal<["com.shwfed.table.column.date-input"]>;
|
|
@@ -48,7 +48,7 @@ export function schema(configure) {
|
|
|
48
48
|
return Schema.Struct({
|
|
49
49
|
type: Schema.Literal(type),
|
|
50
50
|
compatibilityDate: Schema.Literal(compatibilityDate),
|
|
51
|
-
...editableColumnFields(),
|
|
51
|
+
...editableColumnFields(configure),
|
|
52
52
|
align: Schema.optionalWith(Align.annotations({ title: "\u5BF9\u9F50" }), { default: () => "left" }),
|
|
53
53
|
placeholder: Schema.optional(Locale.annotations({
|
|
54
54
|
title: "\u5360\u4F4D\u7B26",
|
|
@@ -202,6 +202,17 @@ const readonlyModel = computed({
|
|
|
202
202
|
}
|
|
203
203
|
}
|
|
204
204
|
});
|
|
205
|
+
const requiredModel = computed({
|
|
206
|
+
get: () => value.value.required ?? "",
|
|
207
|
+
set: (v) => {
|
|
208
|
+
if (v === "") {
|
|
209
|
+
const { required: _drop, ...rest } = value.value;
|
|
210
|
+
value.value = rest;
|
|
211
|
+
} else {
|
|
212
|
+
value.value = { ...value.value, required: v };
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
});
|
|
205
216
|
const disabledDateModel = computed({
|
|
206
217
|
get: () => value.value.disabledDate ?? "",
|
|
207
218
|
set: (v) => {
|
|
@@ -569,6 +580,27 @@ const derivedModel = computed({
|
|
|
569
580
|
:extra-vars="ROW_VARS"
|
|
570
581
|
/>
|
|
571
582
|
</Field>
|
|
583
|
+
<Field orientation="vertical">
|
|
584
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
585
|
+
<template
|
|
586
|
+
v-if="fieldDescription('required')"
|
|
587
|
+
#tooltip
|
|
588
|
+
>
|
|
589
|
+
<Markdown
|
|
590
|
+
:source="fieldDescription('required')"
|
|
591
|
+
block
|
|
592
|
+
class="prose prose-sm prose-zinc"
|
|
593
|
+
/>
|
|
594
|
+
</template>
|
|
595
|
+
{{ fieldTitle("required") }}
|
|
596
|
+
</FieldLabel>
|
|
597
|
+
<ExpressionEditor
|
|
598
|
+
v-model="requiredModel"
|
|
599
|
+
placeholder="例:row.type == 'company'"
|
|
600
|
+
result-type="bool"
|
|
601
|
+
:extra-vars="ROW_VARS"
|
|
602
|
+
/>
|
|
603
|
+
</Field>
|
|
572
604
|
<Field orientation="vertical">
|
|
573
605
|
<FieldLabel class="text-xs text-zinc-500">
|
|
574
606
|
<template
|
|
@@ -118,6 +118,7 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
|
|
|
118
118
|
readonly message: string;
|
|
119
119
|
}[]], never>>;
|
|
120
120
|
hidden: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
|
|
121
|
+
required: Schema.optional<Schema.Schema<string, string, never>>;
|
|
121
122
|
id: Schema.refine<string, typeof Schema.String>;
|
|
122
123
|
groupId: Schema.optional<typeof Schema.UUID>;
|
|
123
124
|
type: Schema.Literal<["com.shwfed.table.column.date-range-input"]>;
|
|
@@ -46,7 +46,7 @@ export function schema(configure) {
|
|
|
46
46
|
return Schema.Struct({
|
|
47
47
|
type: Schema.Literal(type),
|
|
48
48
|
compatibilityDate: Schema.Literal(compatibilityDate),
|
|
49
|
-
...editableColumnFields(),
|
|
49
|
+
...editableColumnFields(configure),
|
|
50
50
|
align: Schema.optionalWith(Align.annotations({ title: "\u5BF9\u9F50" }), { default: () => "left" }),
|
|
51
51
|
// Swap the inherited single-string `binding` for the range union.
|
|
52
52
|
binding: bindingSchema,
|
package/dist/runtime/components/table/columns/2026-07-16/com.shwfed.table.column.upload/config.vue
CHANGED
|
@@ -79,6 +79,17 @@ const readonlyModel = computed({
|
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
});
|
|
82
|
+
const requiredModel = computed({
|
|
83
|
+
get: () => value.value.required ?? "",
|
|
84
|
+
set: (v) => {
|
|
85
|
+
if (v === "") {
|
|
86
|
+
const { required: _drop, ...rest } = value.value;
|
|
87
|
+
value.value = rest;
|
|
88
|
+
} else {
|
|
89
|
+
value.value = { ...value.value, required: v };
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
});
|
|
82
93
|
function onHiddenChange(v) {
|
|
83
94
|
if (v) {
|
|
84
95
|
value.value = { ...value.value, hidden: true };
|
|
@@ -746,6 +757,27 @@ const DownloadScope = defineComponent({
|
|
|
746
757
|
:extra-vars="ROW_VARS"
|
|
747
758
|
/>
|
|
748
759
|
</Field>
|
|
760
|
+
<Field orientation="vertical">
|
|
761
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
762
|
+
<template
|
|
763
|
+
v-if="fieldDescription('required')"
|
|
764
|
+
#tooltip
|
|
765
|
+
>
|
|
766
|
+
<Markdown
|
|
767
|
+
:source="fieldDescription('required')"
|
|
768
|
+
block
|
|
769
|
+
class="prose prose-sm prose-zinc"
|
|
770
|
+
/>
|
|
771
|
+
</template>
|
|
772
|
+
{{ fieldTitle("required") }}
|
|
773
|
+
</FieldLabel>
|
|
774
|
+
<ExpressionEditor
|
|
775
|
+
v-model="requiredModel"
|
|
776
|
+
placeholder="例:row.type == 'company'"
|
|
777
|
+
result-type="bool"
|
|
778
|
+
:extra-vars="ROW_VARS"
|
|
779
|
+
/>
|
|
780
|
+
</Field>
|
|
749
781
|
</div>
|
|
750
782
|
|
|
751
783
|
<div class="flex flex-wrap gap-x-8 gap-y-3">
|
package/dist/runtime/components/table/columns/2026-07-16/com.shwfed.table.column.upload/schema.d.ts
CHANGED
|
@@ -106,6 +106,7 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
|
|
|
106
106
|
readonly message: string;
|
|
107
107
|
}[]], never>>;
|
|
108
108
|
hidden: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
|
|
109
|
+
required: Schema.optional<Schema.Schema<string, string, never>>;
|
|
109
110
|
id: Schema.refine<string, typeof Schema.String>;
|
|
110
111
|
groupId: Schema.optional<typeof Schema.UUID>;
|
|
111
112
|
type: Schema.Literal<["com.shwfed.table.column.upload"]>;
|
package/dist/runtime/components/table/columns/2026-07-16/com.shwfed.table.column.upload/schema.js
CHANGED
|
@@ -46,7 +46,7 @@ export function schema(configure) {
|
|
|
46
46
|
return Schema.Struct({
|
|
47
47
|
type: Schema.Literal(type),
|
|
48
48
|
compatibilityDate: Schema.Literal(compatibilityDate),
|
|
49
|
-
...editableColumnFields(),
|
|
49
|
+
...editableColumnFields(configure),
|
|
50
50
|
disabled: Schema.optional(CelBool.annotations({
|
|
51
51
|
title: "\u7981\u7528\u6761\u4EF6",
|
|
52
52
|
description: "\u8FD4\u56DE `true` \u65F6\u6DFB\u52A0\u6309\u94AE\u4ECD\u7136\u6E32\u67D3\u4F46\u4E0D\u53EF\u64CD\u4F5C"
|
|
@@ -213,9 +213,11 @@ function translateColumn(column) {
|
|
|
213
213
|
const contribution = entry.toColumnDef(column, { getLocaleText, $cel, inheritedContext: celBindings(inheritedContext) });
|
|
214
214
|
const editable = isEditableHeader(contribution.header);
|
|
215
215
|
const readonlyExpr = editable ? column.readonly : void 0;
|
|
216
|
+
const requiredExpr = editable ? column.required : void 0;
|
|
217
|
+
const required = typeof requiredExpr === "string" && requiredExpr.trim().length > 0;
|
|
216
218
|
return {
|
|
217
219
|
...contribution,
|
|
218
|
-
meta: { ...contribution.meta, editable, readonlyExpr },
|
|
220
|
+
meta: { ...contribution.meta, editable, readonlyExpr, required },
|
|
219
221
|
id: column.id,
|
|
220
222
|
// `ctx` is the functional-component props object Vue mutates in place on
|
|
221
223
|
// every update, so its identity stays stable across data refetches.
|
|
@@ -998,6 +1000,15 @@ export { TableConfig, createTableConfig, getColumnTechnicalKey } from "./schema"
|
|
|
998
1000
|
:props="header.getContext()"
|
|
999
1001
|
/>
|
|
1000
1002
|
|
|
1003
|
+
<!-- Required star: shown for editable columns carrying a
|
|
1004
|
+
non-empty `required` expression. Row-agnostic marker,
|
|
1005
|
+
mirrors the field-label star styling. -->
|
|
1006
|
+
<span
|
|
1007
|
+
v-if="!header.isPlaceholder && header.column.columnDef.meta?.required"
|
|
1008
|
+
aria-hidden="true"
|
|
1009
|
+
class="text-red-600"
|
|
1010
|
+
>*</span>
|
|
1011
|
+
|
|
1001
1012
|
<!-- Edit affordance: marks an editable column, hidden when
|
|
1002
1013
|
the column reads as readonly (form-wide or its own
|
|
1003
1014
|
`readonly` condition). -->
|
|
@@ -43,7 +43,7 @@ export declare function columnFields(configure: (env: Environment) => void): {
|
|
|
43
43
|
id: Schema.refine<string, typeof Schema.String>;
|
|
44
44
|
groupId: Schema.optional<typeof Schema.UUID>;
|
|
45
45
|
};
|
|
46
|
-
export declare function editableColumnFields(): {
|
|
46
|
+
export declare function editableColumnFields(configure: (env: Environment) => void): {
|
|
47
47
|
title: Schema.suspend<readonly [{
|
|
48
48
|
readonly locale: "zh";
|
|
49
49
|
readonly message: string;
|
|
@@ -76,6 +76,7 @@ export declare function editableColumnFields(): {
|
|
|
76
76
|
readonly message: string;
|
|
77
77
|
}[]], never>>;
|
|
78
78
|
hidden: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
|
|
79
|
+
required: Schema.optional<Schema.Schema<string, string, never>>;
|
|
79
80
|
id: Schema.refine<string, typeof Schema.String>;
|
|
80
81
|
groupId: Schema.optional<typeof Schema.UUID>;
|
|
81
82
|
};
|
|
@@ -59,7 +59,22 @@ export function columnFields(configure) {
|
|
|
59
59
|
}))
|
|
60
60
|
};
|
|
61
61
|
}
|
|
62
|
-
|
|
62
|
+
function CelColumnRequired(configure) {
|
|
63
|
+
return Expression({
|
|
64
|
+
configure: (env) => {
|
|
65
|
+
configure(env);
|
|
66
|
+
const declared = new Set(env.getDefinitions().variables.map((v) => v.name));
|
|
67
|
+
if (!declared.has("row")) {
|
|
68
|
+
env.registerVariable("row", "dyn", { label: "\u5F53\u524D\u884C", description: "\u5F53\u524D\u884C\u6570\u636E" });
|
|
69
|
+
}
|
|
70
|
+
if (!declared.has("index")) {
|
|
71
|
+
env.registerVariable("index", "number", { label: "\u884C\u5E8F\u53F7", description: "\u884C\u7D22\u5F15" });
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
resultType: "bool"
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
export function editableColumnFields(configure) {
|
|
63
78
|
return {
|
|
64
79
|
...columnIdentityFields(),
|
|
65
80
|
title: Locale.annotations({ title: "\u540D\u79F0", description: "\u5217\u6807\u9898" }),
|
|
@@ -84,6 +99,14 @@ export function editableColumnFields() {
|
|
|
84
99
|
hidden: Schema.optional(Schema.Boolean.annotations({
|
|
85
100
|
title: "\u9ED8\u8BA4\u9690\u85CF",
|
|
86
101
|
description: "\u5F00\u542F\u540E\u8BE5\u5217\u9ED8\u8BA4\u9690\u85CF\uFF1B\u4F7F\u7528\u8005\u53EF\u5728\u8868\u683C\u7684\u5217\u8BBE\u7F6E\u4E2D\u91CD\u65B0\u663E\u793A\u3002\u4EC5\u4F5C\u4E3A\u521D\u59CB\u72B6\u6001\uFF0C\u4E0D\u968F\u6570\u636E\u53D8\u5316"
|
|
102
|
+
})),
|
|
103
|
+
required: Schema.optional(CelColumnRequired(configure).annotations({
|
|
104
|
+
title: "\u5FC5\u586B",
|
|
105
|
+
description: md`
|
|
106
|
+
返回 \`true\` 时,该列**表头显示必填星号**。可访问 \`row\` / \`index\` / \`form\`,因此可写「部分行必填」的条件(例如 \`row.type == 'company'\`)。
|
|
107
|
+
|
|
108
|
+
**当前版本星号仅作视觉标识,不会拦截提交**——实际必填校验请在表格字段的「校验规则」中用 CEL 编写(可读整表 \`form.<绑定路径>\`)。后续版本将据此表达式自动完成逐行校验并拦截提交。
|
|
109
|
+
`
|
|
87
110
|
}))
|
|
88
111
|
};
|
|
89
112
|
}
|
|
@@ -28,8 +28,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
|
|
|
28
28
|
"onUpdate:modelValue"?: ((args_0: Date | undefined) => any) | undefined;
|
|
29
29
|
}>, {
|
|
30
30
|
size: "sm" | "md" | "lg";
|
|
31
|
-
clearIcon: string;
|
|
32
31
|
clearable: boolean;
|
|
32
|
+
clearIcon: string;
|
|
33
33
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
34
34
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
35
35
|
declare const _default: typeof __VLS_export;
|
|
@@ -28,8 +28,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
|
|
|
28
28
|
"onUpdate:modelValue"?: ((args_0: Date | undefined) => any) | undefined;
|
|
29
29
|
}>, {
|
|
30
30
|
size: "sm" | "md" | "lg";
|
|
31
|
-
clearIcon: string;
|
|
32
31
|
clearable: boolean;
|
|
32
|
+
clearIcon: string;
|
|
33
33
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
34
34
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
35
35
|
declare const _default: typeof __VLS_export;
|
|
@@ -22,8 +22,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
22
22
|
size: "sm" | "md" | "lg";
|
|
23
23
|
granularity: "hour" | "minute" | "second";
|
|
24
24
|
hourCycle: 12 | 24;
|
|
25
|
-
clearIcon: string;
|
|
26
25
|
clearable: boolean;
|
|
26
|
+
clearIcon: string;
|
|
27
27
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
28
28
|
declare const _default: typeof __VLS_export;
|
|
29
29
|
export default _default;
|
|
@@ -22,8 +22,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
22
22
|
size: "sm" | "md" | "lg";
|
|
23
23
|
granularity: "hour" | "minute" | "second";
|
|
24
24
|
hourCycle: 12 | 24;
|
|
25
|
-
clearIcon: string;
|
|
26
25
|
clearable: boolean;
|
|
26
|
+
clearIcon: string;
|
|
27
27
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
28
28
|
declare const _default: typeof __VLS_export;
|
|
29
29
|
export default _default;
|
|
@@ -27,8 +27,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
27
27
|
onCommit?: ((args_0: Date | undefined, args_1: Date | undefined) => any) | undefined;
|
|
28
28
|
}>, {
|
|
29
29
|
size: "sm" | "md" | "lg";
|
|
30
|
-
clearIcon: string;
|
|
31
30
|
clearable: boolean;
|
|
31
|
+
clearIcon: string;
|
|
32
32
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
33
33
|
declare const _default: typeof __VLS_export;
|
|
34
34
|
export default _default;
|
|
@@ -27,8 +27,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
27
27
|
onCommit?: ((args_0: Date | undefined, args_1: Date | undefined) => any) | undefined;
|
|
28
28
|
}>, {
|
|
29
29
|
size: "sm" | "md" | "lg";
|
|
30
|
-
clearIcon: string;
|
|
31
30
|
clearable: boolean;
|
|
31
|
+
clearIcon: string;
|
|
32
32
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
33
33
|
declare const _default: typeof __VLS_export;
|
|
34
34
|
export default _default;
|
|
@@ -26,9 +26,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
26
26
|
size: "sm" | "md" | "lg";
|
|
27
27
|
granularity: "hour" | "minute" | "second";
|
|
28
28
|
hourCycle: 12 | 24;
|
|
29
|
-
rangeSeparatorIcon: string;
|
|
30
|
-
clearIcon: string;
|
|
31
29
|
clearable: boolean;
|
|
30
|
+
clearIcon: string;
|
|
31
|
+
rangeSeparatorIcon: string;
|
|
32
32
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
33
33
|
declare const _default: typeof __VLS_export;
|
|
34
34
|
export default _default;
|
|
@@ -26,9 +26,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
26
26
|
size: "sm" | "md" | "lg";
|
|
27
27
|
granularity: "hour" | "minute" | "second";
|
|
28
28
|
hourCycle: 12 | 24;
|
|
29
|
-
rangeSeparatorIcon: string;
|
|
30
|
-
clearIcon: string;
|
|
31
29
|
clearable: boolean;
|
|
30
|
+
clearIcon: string;
|
|
31
|
+
rangeSeparatorIcon: string;
|
|
32
32
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
33
33
|
declare const _default: typeof __VLS_export;
|
|
34
34
|
export default _default;
|