@shwfed/config 2.3.16 → 2.3.18
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 +727 -534
- package/dist/module.json +1 -1
- package/dist/preview/assets/{config-C19W7NmV.js → config-C8Y4mJbo.js} +1 -1
- package/dist/preview/assets/{config-8iL9DU55.js → config-CGjY6-4G.js} +1 -1
- package/dist/preview/assets/{config-CRUg_Pcx.js → config-CR-ypZys.js} +1 -1
- package/dist/preview/assets/{config-B4ITIOSI.js → config-Cs3k3BuR.js} +1 -1
- package/dist/preview/assets/{config-DyvYQUK3.js → config-D9mrL0UY.js} +1 -1
- package/dist/preview/assets/{config-AEM1zjvE.js → config-DRy0SpMq.js} +1 -1
- package/dist/preview/assets/{config-m-s6iTyN.js → config-eopfzGON.js} +1 -1
- package/dist/preview/assets/{config-C4t_as1U.js → config-qmkDiyXK.js} +1 -1
- package/dist/preview/assets/{definition.vue_vue_type_script_setup_true_lang-CiwBbLRf.js → definition.vue_vue_type_script_setup_true_lang-BakGkJ_w.js} +1 -1
- package/dist/preview/assets/index-BUyz4nJb.css +1 -0
- package/dist/preview/assets/index-Bsbk3Okp.js +1 -0
- package/dist/preview/assets/index-Dz_SnGc9.js +639 -0
- package/dist/preview/assets/{runtime-KCPICzI0.js → runtime-B1Lqn7iS.js} +1 -1
- package/dist/preview/assets/{runtime-DTtdk8hJ.js → runtime-BvJjQaAU.js} +1 -1
- package/dist/preview/assets/{runtime-BlndSTII.js → runtime-C-3DIGFz.js} +1 -1
- package/dist/preview/assets/{runtime--kEuSRJR.js → runtime-C2q2Mp8_.js} +1 -1
- package/dist/preview/assets/{runtime-n8qxUfe8.js → runtime-CdELhC3y.js} +1 -1
- package/dist/preview/assets/{runtime-DDA8wR0s.js → runtime-D8OAMic8.js} +1 -1
- package/dist/preview/assets/{runtime-BiAcObbN.js → runtime-DQcKN5I_.js} +1 -1
- package/dist/preview/assets/{runtime-BHeaq-Ju.js → runtime-DQvlwOZl.js} +1 -1
- package/dist/preview/index.html +2 -2
- package/dist/runtime/components/form/fields/2026-05-23/com.shwfed.form.field.tree.multi/runtime.vue +36 -12
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/config.d.vue.ts +107 -0
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/config.vue +493 -0
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/config.vue.d.ts +107 -0
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/runtime.d.vue.ts +8 -0
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/runtime.vue +123 -0
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/runtime.vue.d.ts +8 -0
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/schema.d.ts +79 -0
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/schema.js +78 -0
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/config.d.vue.ts +125 -0
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/config.vue +645 -0
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/config.vue.d.ts +125 -0
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/runtime.d.vue.ts +8 -0
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/runtime.vue +155 -0
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/runtime.vue.d.ts +8 -0
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/schema.d.ts +90 -0
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/schema.js +100 -0
- package/dist/runtime/components/ui/tree/Tree.d.vue.ts +7 -0
- package/dist/runtime/components/ui/tree/Tree.vue +3 -1
- package/dist/runtime/components/ui/tree/Tree.vue.d.ts +7 -0
- package/dist/runtime/components/ui/tree/TreeNode.d.vue.ts +1 -0
- package/dist/runtime/components/ui/tree/TreeNode.vue +4 -2
- package/dist/runtime/components/ui/tree/TreeNode.vue.d.ts +1 -0
- package/package.json +1 -1
- package/dist/preview/assets/index-BT8fF6jA.js +0 -637
- package/dist/preview/assets/index-Br_eXThF.css +0 -1
- package/dist/preview/assets/index-DrZ27b4e.js +0 -1
package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/runtime.vue
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { format as formatDate } from "date-fns";
|
|
3
|
+
import { Effect } from "effect";
|
|
4
|
+
import { computed, ref } from "vue";
|
|
5
|
+
import { useI18n } from "vue-i18n";
|
|
6
|
+
import { cel as _rawCel } from "../../../../../utils/cel";
|
|
7
|
+
import { celBindings, injectCELContext } from "../../../../../utils/cel-context";
|
|
8
|
+
import { getLocalizedText } from "../../../../../share/locale";
|
|
9
|
+
import { DatePicker, DATE_PICKER_DEFAULT_FORMATS } from "../../../../ui/date-picker";
|
|
10
|
+
import { Field, FieldLabel } from "../../../../ui/field";
|
|
11
|
+
import { Markdown } from "../../../../ui/markdown";
|
|
12
|
+
import { DEFAULT_FIELD_ORIENTATION } from "../../../utils/common";
|
|
13
|
+
import { useFormReadonly } from "../../../utils/readonly";
|
|
14
|
+
import { useFormState } from "../../../utils/state";
|
|
15
|
+
defineOptions({ name: "ShwfedMonthFieldRuntime" });
|
|
16
|
+
const props = defineProps({
|
|
17
|
+
fieldId: { type: String, required: true },
|
|
18
|
+
config: { type: null, required: true }
|
|
19
|
+
});
|
|
20
|
+
const { locale } = useI18n();
|
|
21
|
+
const { state, getAt, setAt } = useFormState();
|
|
22
|
+
const inherited = injectCELContext();
|
|
23
|
+
const $cel = (expression, context) => _rawCel(expression, { ...celBindings(inherited), ...context });
|
|
24
|
+
const labelText = computed(() => getLocalizedText(props.config.label, locale.value));
|
|
25
|
+
const placeholderText = computed(
|
|
26
|
+
() => props.config.placeholder ? getLocalizedText(props.config.placeholder, locale.value) : void 0
|
|
27
|
+
);
|
|
28
|
+
const tooltipText = computed(
|
|
29
|
+
() => props.config.tooltip ? getLocalizedText(props.config.tooltip, locale.value) : void 0
|
|
30
|
+
);
|
|
31
|
+
function evalBool(expression, label) {
|
|
32
|
+
if (!expression) return false;
|
|
33
|
+
try {
|
|
34
|
+
return Effect.runSync($cel(expression, { form: state.value ?? {} }));
|
|
35
|
+
} catch (err) {
|
|
36
|
+
console.error(`[shwfed-form] failed to evaluate ${label} for ${props.fieldId}:`, err);
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
const isDisabled = computed(() => evalBool(props.config.disabled, "disabled"));
|
|
41
|
+
const formReadonly = useFormReadonly();
|
|
42
|
+
const isReadonly = computed(
|
|
43
|
+
() => props.config.readonly != null ? evalBool(props.config.readonly, "readonly") : formReadonly.value
|
|
44
|
+
);
|
|
45
|
+
const effectiveReadonly = computed(() => isReadonly.value || props.config.derived?.mode === "formula");
|
|
46
|
+
const resolvedValueFormat = computed(
|
|
47
|
+
() => props.config.valueFormat ?? DATE_PICKER_DEFAULT_FORMATS.month.value
|
|
48
|
+
);
|
|
49
|
+
const shortcuts = computed(() => {
|
|
50
|
+
const list = props.config.presets;
|
|
51
|
+
if (!list || list.length === 0) return void 0;
|
|
52
|
+
return list.map((preset) => ({
|
|
53
|
+
name: preset.label,
|
|
54
|
+
value: () => {
|
|
55
|
+
try {
|
|
56
|
+
const d = Effect.runSync($cel(preset.value, { form: state.value ?? {} }));
|
|
57
|
+
return formatDate(d, resolvedValueFormat.value);
|
|
58
|
+
} catch (err) {
|
|
59
|
+
console.error(`[shwfed-form] failed to evaluate preset "${preset.value}" for ${props.fieldId}:`, err);
|
|
60
|
+
return "";
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}));
|
|
64
|
+
});
|
|
65
|
+
const uncontrolled = ref(void 0);
|
|
66
|
+
const model = computed({
|
|
67
|
+
get: () => {
|
|
68
|
+
const path = props.config.binding;
|
|
69
|
+
if (path == null) return uncontrolled.value;
|
|
70
|
+
const raw = getAt(path);
|
|
71
|
+
return typeof raw === "string" && raw.length > 0 ? raw : void 0;
|
|
72
|
+
},
|
|
73
|
+
set: (next) => {
|
|
74
|
+
const path = props.config.binding;
|
|
75
|
+
if (path == null) {
|
|
76
|
+
uncontrolled.value = next;
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
setAt(path, next);
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
</script>
|
|
83
|
+
|
|
84
|
+
<template>
|
|
85
|
+
<Field
|
|
86
|
+
:orientation="config.orientation ?? DEFAULT_FIELD_ORIENTATION"
|
|
87
|
+
:data-disabled="isDisabled || void 0"
|
|
88
|
+
>
|
|
89
|
+
<FieldLabel
|
|
90
|
+
v-if="labelText"
|
|
91
|
+
:for="fieldId"
|
|
92
|
+
class="text-xs text-zinc-500"
|
|
93
|
+
>
|
|
94
|
+
<template
|
|
95
|
+
v-if="tooltipText"
|
|
96
|
+
#tooltip
|
|
97
|
+
>
|
|
98
|
+
<Markdown
|
|
99
|
+
:source="tooltipText"
|
|
100
|
+
class="prose prose-xs prose-zinc"
|
|
101
|
+
/>
|
|
102
|
+
</template>
|
|
103
|
+
{{ labelText }}
|
|
104
|
+
</FieldLabel>
|
|
105
|
+
<div
|
|
106
|
+
v-if="effectiveReadonly"
|
|
107
|
+
class="min-h-9 py-1.5 text-sm text-zinc-700"
|
|
108
|
+
>
|
|
109
|
+
{{ model || "\u2014" }}
|
|
110
|
+
</div>
|
|
111
|
+
<DatePicker
|
|
112
|
+
v-else
|
|
113
|
+
:id="fieldId"
|
|
114
|
+
v-model="model"
|
|
115
|
+
type="month"
|
|
116
|
+
:format="config.format"
|
|
117
|
+
:value-format="config.valueFormat"
|
|
118
|
+
:placeholder="placeholderText"
|
|
119
|
+
:disabled="isDisabled"
|
|
120
|
+
:shortcuts="shortcuts"
|
|
121
|
+
/>
|
|
122
|
+
</Field>
|
|
123
|
+
</template>
|
package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/runtime.vue.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Value } from './schema.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
fieldId: string;
|
|
4
|
+
config: Value;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
|
+
declare const _default: typeof __VLS_export;
|
|
8
|
+
export default _default;
|
package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/schema.d.ts
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { Schema } from 'effect';
|
|
2
|
+
import type { Environment } from '../../../../../vendor/cel-js/lib/index.js';
|
|
3
|
+
export declare const type: "com.shwfed.form.field.month";
|
|
4
|
+
export declare const compatibilityDate: "2026-05-24";
|
|
5
|
+
export declare const metadata: {
|
|
6
|
+
readonly name: "月份";
|
|
7
|
+
readonly icon: "fluent:calendar-month-20-regular";
|
|
8
|
+
readonly w: {
|
|
9
|
+
readonly initial: 8;
|
|
10
|
+
readonly min: 4;
|
|
11
|
+
readonly max: number;
|
|
12
|
+
};
|
|
13
|
+
readonly h: {
|
|
14
|
+
readonly initial: 2;
|
|
15
|
+
readonly min: 2;
|
|
16
|
+
readonly max: 2;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export declare function presetSchema(configure: (env: Environment) => void): Schema.Struct<{
|
|
20
|
+
id: Schema.refine<string, typeof Schema.String>;
|
|
21
|
+
label: Schema.TupleType<readonly [Schema.Struct<{
|
|
22
|
+
locale: Schema.Literal<["zh"]>;
|
|
23
|
+
message: Schema.SchemaClass<string, string, never>;
|
|
24
|
+
}>], [Schema.Struct<{
|
|
25
|
+
locale: Schema.Literal<["ja", "en", "ko"]>;
|
|
26
|
+
message: Schema.SchemaClass<string, string, never>;
|
|
27
|
+
}>]>;
|
|
28
|
+
value: Schema.Schema<string, string, never>;
|
|
29
|
+
}>;
|
|
30
|
+
export declare function schema(configure: (env: Environment) => void): Schema.Struct<{
|
|
31
|
+
label: Schema.optional<Schema.TupleType<readonly [Schema.Struct<{
|
|
32
|
+
locale: Schema.Literal<["zh"]>;
|
|
33
|
+
message: Schema.SchemaClass<string, string, never>;
|
|
34
|
+
}>], [Schema.Struct<{
|
|
35
|
+
locale: Schema.Literal<["ja", "en", "ko"]>;
|
|
36
|
+
message: Schema.SchemaClass<string, string, never>;
|
|
37
|
+
}>]>>;
|
|
38
|
+
placeholder: Schema.optional<Schema.TupleType<readonly [Schema.Struct<{
|
|
39
|
+
locale: Schema.Literal<["zh"]>;
|
|
40
|
+
message: Schema.SchemaClass<string, string, never>;
|
|
41
|
+
}>], [Schema.Struct<{
|
|
42
|
+
locale: Schema.Literal<["ja", "en", "ko"]>;
|
|
43
|
+
message: Schema.SchemaClass<string, string, never>;
|
|
44
|
+
}>]>>;
|
|
45
|
+
tooltip: Schema.optional<Schema.TupleType<readonly [Schema.Struct<{
|
|
46
|
+
locale: Schema.Literal<["zh"]>;
|
|
47
|
+
message: Schema.SchemaClass<string, string, never>;
|
|
48
|
+
}>], [Schema.Struct<{
|
|
49
|
+
locale: Schema.Literal<["ja", "en", "ko"]>;
|
|
50
|
+
message: Schema.SchemaClass<string, string, never>;
|
|
51
|
+
}>]>>;
|
|
52
|
+
orientation: Schema.optional<Schema.Literal<["vertical", "floating"]>>;
|
|
53
|
+
binding: Schema.optional<Schema.refine<string, typeof Schema.String>>;
|
|
54
|
+
disabled: Schema.optional<Schema.Schema<string, string, never>>;
|
|
55
|
+
readonly: Schema.optional<Schema.Schema<string, string, never>>;
|
|
56
|
+
derived: Schema.optional<Schema.Struct<{
|
|
57
|
+
mode: Schema.Literal<["formula", "prefill"]>;
|
|
58
|
+
expression: Schema.Schema<string, string, never>;
|
|
59
|
+
}>>;
|
|
60
|
+
format: Schema.optional<Schema.refine<string, typeof Schema.String>>;
|
|
61
|
+
valueFormat: Schema.optional<Schema.refine<string, typeof Schema.String>>;
|
|
62
|
+
presets: Schema.optional<Schema.Array$<Schema.Struct<{
|
|
63
|
+
id: Schema.refine<string, typeof Schema.String>;
|
|
64
|
+
label: Schema.TupleType<readonly [Schema.Struct<{
|
|
65
|
+
locale: Schema.Literal<["zh"]>;
|
|
66
|
+
message: Schema.SchemaClass<string, string, never>;
|
|
67
|
+
}>], [Schema.Struct<{
|
|
68
|
+
locale: Schema.Literal<["ja", "en", "ko"]>;
|
|
69
|
+
message: Schema.SchemaClass<string, string, never>;
|
|
70
|
+
}>]>;
|
|
71
|
+
value: Schema.Schema<string, string, never>;
|
|
72
|
+
}>>>;
|
|
73
|
+
id: Schema.refine<string, typeof Schema.String>;
|
|
74
|
+
displayName: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
75
|
+
hidden: Schema.optional<Schema.Schema<string, string, never>>;
|
|
76
|
+
type: Schema.Literal<["com.shwfed.form.field.month"]>;
|
|
77
|
+
compatibilityDate: Schema.Literal<["2026-05-24"]>;
|
|
78
|
+
}>;
|
|
79
|
+
export type Value = Schema.Schema.Type<ReturnType<typeof schema>>;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import { Expression } from "../../../../../share/expression.js";
|
|
3
|
+
import { Locale } from "../../../../../share/locale.js";
|
|
4
|
+
import { commonFieldFields, derivedField, FieldOrientationSchema } from "../../../utils/common.js";
|
|
5
|
+
export const type = "com.shwfed.form.field.month";
|
|
6
|
+
export const compatibilityDate = "2026-05-24";
|
|
7
|
+
export const metadata = {
|
|
8
|
+
name: "\u6708\u4EFD",
|
|
9
|
+
icon: "fluent:calendar-month-20-regular",
|
|
10
|
+
w: { initial: 8, min: 4, max: Infinity },
|
|
11
|
+
h: { initial: 2, min: 2, max: 2 }
|
|
12
|
+
};
|
|
13
|
+
export function presetSchema(configure) {
|
|
14
|
+
const CelDate = Expression({ configure, resultType: "Date" });
|
|
15
|
+
return Schema.Struct({
|
|
16
|
+
id: Schema.UUID.annotations({ description: "\u9884\u8BBE\u552F\u4E00\u6807\u8BC6\uFF0C\u7528\u4E8E\u7A33\u5B9A\u7684 v-for key" }),
|
|
17
|
+
label: Locale.annotations({
|
|
18
|
+
title: "\u6807\u7B7E",
|
|
19
|
+
description: "\u5FEB\u6377\u9009\u9879\u5C55\u793A\u7684\u672C\u5730\u5316\u6587\u672C"
|
|
20
|
+
}),
|
|
21
|
+
value: CelDate.annotations({
|
|
22
|
+
title: "\u503C",
|
|
23
|
+
description: '\u70B9\u51FB\u8BE5\u9884\u8BBE\u65F6\u8BA1\u7B97\u51FA\u7684\u6708\u4EFD\uFF0C\u4F8B\u5982 `now().offset(-1, "months")`'
|
|
24
|
+
})
|
|
25
|
+
}).annotations({
|
|
26
|
+
title: "MonthFieldPreset"
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
export function schema(configure) {
|
|
30
|
+
const CelBool = Expression({ configure, resultType: "bool" });
|
|
31
|
+
const Preset = presetSchema(configure);
|
|
32
|
+
return Schema.Struct({
|
|
33
|
+
type: Schema.Literal(type),
|
|
34
|
+
compatibilityDate: Schema.Literal(compatibilityDate),
|
|
35
|
+
...commonFieldFields(configure),
|
|
36
|
+
label: Schema.optional(Locale.annotations({
|
|
37
|
+
title: "\u6807\u7B7E",
|
|
38
|
+
description: "\u5B57\u6BB5\u524D\u5C55\u793A\u7684\u6587\u672C\uFF1B\u7559\u7A7A\u5219\u4E0D\u6E32\u67D3\u6807\u7B7E"
|
|
39
|
+
})),
|
|
40
|
+
placeholder: Schema.optional(Locale.annotations({
|
|
41
|
+
title: "\u5360\u4F4D\u7B26",
|
|
42
|
+
description: "\u672A\u9009\u4E2D\u6708\u4EFD\u65F6\u8F93\u5165\u6846\u4E2D\u7684\u5360\u4F4D\u6587\u672C"
|
|
43
|
+
})),
|
|
44
|
+
tooltip: Schema.optional(Locale.annotations({
|
|
45
|
+
title: "\u63D0\u793A",
|
|
46
|
+
description: "\u9F20\u6807\u60AC\u505C\u5728\u6807\u7B7E\u4E0A\u65F6\u5C55\u793A\u7684\u8BF4\u660E"
|
|
47
|
+
})),
|
|
48
|
+
orientation: Schema.optional(FieldOrientationSchema),
|
|
49
|
+
binding: Schema.optional(Schema.String.pipe(Schema.minLength(1)).annotations({
|
|
50
|
+
title: "\u7ED1\u5B9A\u8DEF\u5F84",
|
|
51
|
+
description: "\u5199\u5165\u8868\u5355\u72B6\u6001\u7684 `dot-prop` \u8DEF\u5F84\uFF0C\u4F8B\u5982 `user.joinMonth`\uFF1B\u7559\u7A7A\u5219\u4E3A\u975E\u53D7\u63A7\u5B57\u6BB5"
|
|
52
|
+
})),
|
|
53
|
+
disabled: Schema.optional(CelBool.annotations({
|
|
54
|
+
title: "\u7981\u7528\u6761\u4EF6",
|
|
55
|
+
description: "\u8FD4\u56DE `true` \u65F6\u8F93\u5165\u6846\u4ECD\u7136\u6E32\u67D3\u4F46\u4E0D\u53EF\u7F16\u8F91"
|
|
56
|
+
})),
|
|
57
|
+
readonly: Schema.optional(CelBool.annotations({
|
|
58
|
+
title: "\u53EA\u8BFB\u6761\u4EF6",
|
|
59
|
+
description: "\u8FD4\u56DE `true` \u65F6\u4EC5\u4EE5\u7EAF\u6587\u672C\u5C55\u793A\u5F53\u524D\u503C"
|
|
60
|
+
})),
|
|
61
|
+
derived: derivedField(configure, "string"),
|
|
62
|
+
format: Schema.optional(Schema.String.pipe(Schema.minLength(1)).annotations({
|
|
63
|
+
title: "\u5C55\u793A\u683C\u5F0F",
|
|
64
|
+
description: "\u8F93\u5165\u6846\u4E2D\u5C55\u793A\u6708\u4EFD\u7684 `date-fns` \u683C\u5F0F\u4E32\uFF1B\u7559\u7A7A\u65F6\u4F7F\u7528\u9ED8\u8BA4 `yyyy-MM`"
|
|
65
|
+
})),
|
|
66
|
+
valueFormat: Schema.optional(Schema.String.pipe(Schema.minLength(1)).annotations({
|
|
67
|
+
title: "\u5B58\u50A8\u683C\u5F0F",
|
|
68
|
+
description: "\u5199\u5165\u8868\u5355\u72B6\u6001\u7684 `date-fns` \u683C\u5F0F\u4E32\uFF1B\u7559\u7A7A\u65F6\u4F7F\u7528\u9ED8\u8BA4 `yyyy-MM`"
|
|
69
|
+
})),
|
|
70
|
+
presets: Schema.optional(Schema.Array(Preset).annotations({
|
|
71
|
+
title: "\u5FEB\u6377\u9009\u9879",
|
|
72
|
+
description: "\u5728\u9009\u62E9\u5668\u4FA7\u680F\u5C55\u793A\u7684\u5FEB\u6377\u9884\u8BBE\uFF1B\u7559\u7A7A\u5219\u4E0D\u6E32\u67D3\u4FA7\u680F"
|
|
73
|
+
}))
|
|
74
|
+
}).annotations({
|
|
75
|
+
title: "MonthField",
|
|
76
|
+
description: "\u6708\u4EFD\u9009\u62E9\u8F93\u5165"
|
|
77
|
+
});
|
|
78
|
+
}
|
|
@@ -0,0 +1,125 @@
|
|
|
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 label?: readonly [{
|
|
8
|
+
readonly locale: "zh";
|
|
9
|
+
readonly message: string;
|
|
10
|
+
}, ...{
|
|
11
|
+
readonly locale: "en" | "ja" | "ko";
|
|
12
|
+
readonly message: string;
|
|
13
|
+
}[]] | undefined;
|
|
14
|
+
readonly disabled?: string | undefined;
|
|
15
|
+
readonly type: "com.shwfed.form.field.monthrange";
|
|
16
|
+
readonly id: string;
|
|
17
|
+
readonly hidden?: string | undefined;
|
|
18
|
+
readonly tooltip?: readonly [{
|
|
19
|
+
readonly locale: "zh";
|
|
20
|
+
readonly message: string;
|
|
21
|
+
}, ...{
|
|
22
|
+
readonly locale: "en" | "ja" | "ko";
|
|
23
|
+
readonly message: string;
|
|
24
|
+
}[]] | undefined;
|
|
25
|
+
readonly displayName?: string | undefined;
|
|
26
|
+
readonly compatibilityDate: "2026-05-24";
|
|
27
|
+
readonly orientation?: "vertical" | "floating" | undefined;
|
|
28
|
+
readonly readonly?: string | undefined;
|
|
29
|
+
readonly binding?: string | readonly [string, string] | undefined;
|
|
30
|
+
readonly derived?: {
|
|
31
|
+
readonly mode: "formula" | "prefill";
|
|
32
|
+
readonly expression: string;
|
|
33
|
+
} | undefined;
|
|
34
|
+
readonly format?: string | undefined;
|
|
35
|
+
readonly valueFormat?: string | undefined;
|
|
36
|
+
readonly rangeSeparatorIcon?: string | undefined;
|
|
37
|
+
readonly startPlaceholder?: readonly [{
|
|
38
|
+
readonly locale: "zh";
|
|
39
|
+
readonly message: string;
|
|
40
|
+
}, ...{
|
|
41
|
+
readonly locale: "en" | "ja" | "ko";
|
|
42
|
+
readonly message: string;
|
|
43
|
+
}[]] | undefined;
|
|
44
|
+
readonly endPlaceholder?: readonly [{
|
|
45
|
+
readonly locale: "zh";
|
|
46
|
+
readonly message: string;
|
|
47
|
+
}, ...{
|
|
48
|
+
readonly locale: "en" | "ja" | "ko";
|
|
49
|
+
readonly message: string;
|
|
50
|
+
}[]] | undefined;
|
|
51
|
+
readonly presets?: readonly {
|
|
52
|
+
readonly label: readonly [{
|
|
53
|
+
readonly locale: "zh";
|
|
54
|
+
readonly message: string;
|
|
55
|
+
}, ...{
|
|
56
|
+
readonly locale: "en" | "ja" | "ko";
|
|
57
|
+
readonly message: string;
|
|
58
|
+
}[]];
|
|
59
|
+
readonly id: string;
|
|
60
|
+
readonly end: string;
|
|
61
|
+
readonly start: string;
|
|
62
|
+
}[] | undefined;
|
|
63
|
+
}) => any;
|
|
64
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
65
|
+
"onUpdate:modelValue"?: ((value: {
|
|
66
|
+
readonly label?: readonly [{
|
|
67
|
+
readonly locale: "zh";
|
|
68
|
+
readonly message: string;
|
|
69
|
+
}, ...{
|
|
70
|
+
readonly locale: "en" | "ja" | "ko";
|
|
71
|
+
readonly message: string;
|
|
72
|
+
}[]] | undefined;
|
|
73
|
+
readonly disabled?: string | undefined;
|
|
74
|
+
readonly type: "com.shwfed.form.field.monthrange";
|
|
75
|
+
readonly id: string;
|
|
76
|
+
readonly hidden?: string | undefined;
|
|
77
|
+
readonly tooltip?: readonly [{
|
|
78
|
+
readonly locale: "zh";
|
|
79
|
+
readonly message: string;
|
|
80
|
+
}, ...{
|
|
81
|
+
readonly locale: "en" | "ja" | "ko";
|
|
82
|
+
readonly message: string;
|
|
83
|
+
}[]] | undefined;
|
|
84
|
+
readonly displayName?: string | undefined;
|
|
85
|
+
readonly compatibilityDate: "2026-05-24";
|
|
86
|
+
readonly orientation?: "vertical" | "floating" | undefined;
|
|
87
|
+
readonly readonly?: string | undefined;
|
|
88
|
+
readonly binding?: string | readonly [string, string] | undefined;
|
|
89
|
+
readonly derived?: {
|
|
90
|
+
readonly mode: "formula" | "prefill";
|
|
91
|
+
readonly expression: string;
|
|
92
|
+
} | undefined;
|
|
93
|
+
readonly format?: string | undefined;
|
|
94
|
+
readonly valueFormat?: string | undefined;
|
|
95
|
+
readonly rangeSeparatorIcon?: string | undefined;
|
|
96
|
+
readonly startPlaceholder?: readonly [{
|
|
97
|
+
readonly locale: "zh";
|
|
98
|
+
readonly message: string;
|
|
99
|
+
}, ...{
|
|
100
|
+
readonly locale: "en" | "ja" | "ko";
|
|
101
|
+
readonly message: string;
|
|
102
|
+
}[]] | undefined;
|
|
103
|
+
readonly endPlaceholder?: readonly [{
|
|
104
|
+
readonly locale: "zh";
|
|
105
|
+
readonly message: string;
|
|
106
|
+
}, ...{
|
|
107
|
+
readonly locale: "en" | "ja" | "ko";
|
|
108
|
+
readonly message: string;
|
|
109
|
+
}[]] | undefined;
|
|
110
|
+
readonly presets?: readonly {
|
|
111
|
+
readonly label: readonly [{
|
|
112
|
+
readonly locale: "zh";
|
|
113
|
+
readonly message: string;
|
|
114
|
+
}, ...{
|
|
115
|
+
readonly locale: "en" | "ja" | "ko";
|
|
116
|
+
readonly message: string;
|
|
117
|
+
}[]];
|
|
118
|
+
readonly id: string;
|
|
119
|
+
readonly end: string;
|
|
120
|
+
readonly start: string;
|
|
121
|
+
}[] | undefined;
|
|
122
|
+
}) => any) | undefined;
|
|
123
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
124
|
+
declare const _default: typeof __VLS_export;
|
|
125
|
+
export default _default;
|