@shwfed/nuxt 0.8.0 → 0.8.2
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/fields.d.vue.ts +6 -6
- package/dist/runtime/components/fields.vue +6 -6
- package/dist/runtime/components/fields.vue.d.ts +6 -6
- package/dist/runtime/components/table.d.vue.ts +4 -4
- package/dist/runtime/components/table.vue +1 -1
- package/dist/runtime/components/table.vue.d.ts +4 -4
- package/dist/runtime/components/ui/fields/Fields.d.vue.ts +6 -203
- package/dist/runtime/components/ui/fields/Fields.vue +31 -85
- package/dist/runtime/components/ui/fields/Fields.vue.d.ts +6 -203
- package/dist/runtime/components/ui/fields/schema.d.ts +210 -0
- package/dist/runtime/components/ui/fields/schema.js +66 -0
- package/dist/runtime/components/ui/fields-configurator/FieldsConfiguratorDialog.d.vue.ts +3 -3
- package/dist/runtime/components/ui/fields-configurator/FieldsConfiguratorDialog.vue +1439 -39
- package/dist/runtime/components/ui/fields-configurator/FieldsConfiguratorDialog.vue.d.ts +3 -3
- package/dist/runtime/components/ui/table/Table.d.vue.ts +3 -3
- package/dist/runtime/components/ui/table/Table.vue +15 -4
- package/dist/runtime/components/ui/table/Table.vue.d.ts +3 -3
- package/dist/runtime/components/ui/table/schema.d.ts +16 -4
- package/dist/runtime/components/ui/table/schema.js +7 -3
- package/package.json +1 -1
|
@@ -1,205 +1,8 @@
|
|
|
1
|
-
import z from 'zod';
|
|
2
1
|
import { Effect } from 'effect';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
locale: z.ZodEnum<{
|
|
8
|
-
zh: "zh";
|
|
9
|
-
ja: "ja";
|
|
10
|
-
en: "en";
|
|
11
|
-
ko: "ko";
|
|
12
|
-
}>;
|
|
13
|
-
message: z.ZodString;
|
|
14
|
-
}, z.core.$strip>>>;
|
|
15
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
16
|
-
style: z.ZodOptional<z.ZodString>;
|
|
17
|
-
discardEmptyString: z.ZodOptional<z.ZodBoolean>;
|
|
18
|
-
maxLength: z.ZodOptional<z.ZodString>;
|
|
19
|
-
hidden: z.ZodOptional<z.ZodString>;
|
|
20
|
-
disabled: z.ZodOptional<z.ZodString>;
|
|
21
|
-
validation: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
22
|
-
expression: z.ZodString;
|
|
23
|
-
message: z.ZodString;
|
|
24
|
-
}, z.core.$strip>>>>>;
|
|
25
|
-
}, z.core.$strip>;
|
|
26
|
-
export declare const NumberFieldC: z.ZodObject<{
|
|
27
|
-
type: z.ZodLiteral<"number">;
|
|
28
|
-
path: z.ZodString;
|
|
29
|
-
title: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
30
|
-
locale: z.ZodEnum<{
|
|
31
|
-
zh: "zh";
|
|
32
|
-
ja: "ja";
|
|
33
|
-
en: "en";
|
|
34
|
-
ko: "ko";
|
|
35
|
-
}>;
|
|
36
|
-
message: z.ZodString;
|
|
37
|
-
}, z.core.$strip>>>;
|
|
38
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
39
|
-
style: z.ZodOptional<z.ZodString>;
|
|
40
|
-
min: z.ZodOptional<z.ZodString>;
|
|
41
|
-
max: z.ZodOptional<z.ZodString>;
|
|
42
|
-
step: z.ZodOptional<z.ZodString>;
|
|
43
|
-
hidden: z.ZodOptional<z.ZodString>;
|
|
44
|
-
disabled: z.ZodOptional<z.ZodString>;
|
|
45
|
-
validation: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
46
|
-
expression: z.ZodString;
|
|
47
|
-
message: z.ZodString;
|
|
48
|
-
}, z.core.$strip>>>>>;
|
|
49
|
-
}, z.core.$strip>;
|
|
50
|
-
export declare const SelectFieldC: z.ZodObject<{
|
|
51
|
-
type: z.ZodLiteral<"select">;
|
|
52
|
-
path: z.ZodString;
|
|
53
|
-
title: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
54
|
-
locale: z.ZodEnum<{
|
|
55
|
-
zh: "zh";
|
|
56
|
-
ja: "ja";
|
|
57
|
-
en: "en";
|
|
58
|
-
ko: "ko";
|
|
59
|
-
}>;
|
|
60
|
-
message: z.ZodString;
|
|
61
|
-
}, z.core.$strip>>>;
|
|
62
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
63
|
-
options: z.ZodString;
|
|
64
|
-
label: z.ZodString;
|
|
65
|
-
value: z.ZodString;
|
|
66
|
-
key: z.ZodString;
|
|
67
|
-
style: z.ZodOptional<z.ZodString>;
|
|
68
|
-
hidden: z.ZodOptional<z.ZodString>;
|
|
69
|
-
disabled: z.ZodOptional<z.ZodString>;
|
|
70
|
-
validation: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
71
|
-
expression: z.ZodString;
|
|
72
|
-
message: z.ZodString;
|
|
73
|
-
}, z.core.$strip>>>>>;
|
|
74
|
-
}, z.core.$strip>;
|
|
75
|
-
export declare const CalendarFieldC: z.ZodObject<{
|
|
76
|
-
type: z.ZodLiteral<"calendar">;
|
|
77
|
-
path: z.ZodString;
|
|
78
|
-
title: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
79
|
-
locale: z.ZodEnum<{
|
|
80
|
-
zh: "zh";
|
|
81
|
-
ja: "ja";
|
|
82
|
-
en: "en";
|
|
83
|
-
ko: "ko";
|
|
84
|
-
}>;
|
|
85
|
-
message: z.ZodString;
|
|
86
|
-
}, z.core.$strip>>>;
|
|
87
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
88
|
-
style: z.ZodOptional<z.ZodString>;
|
|
89
|
-
mode: z.ZodEnum<{
|
|
90
|
-
year: "year";
|
|
91
|
-
month: "month";
|
|
92
|
-
date: "date";
|
|
93
|
-
}>;
|
|
94
|
-
display: z.ZodOptional<z.ZodString>;
|
|
95
|
-
value: z.ZodString;
|
|
96
|
-
disableDate: z.ZodOptional<z.ZodString>;
|
|
97
|
-
hidden: z.ZodOptional<z.ZodString>;
|
|
98
|
-
disabled: z.ZodOptional<z.ZodString>;
|
|
99
|
-
validation: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
100
|
-
expression: z.ZodString;
|
|
101
|
-
message: z.ZodString;
|
|
102
|
-
}, z.core.$strip>>>>>;
|
|
103
|
-
}, z.core.$strip>;
|
|
104
|
-
export declare const FieldC: z.ZodUnion<readonly [z.ZodObject<{
|
|
105
|
-
type: z.ZodLiteral<"string">;
|
|
106
|
-
path: z.ZodString;
|
|
107
|
-
title: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
108
|
-
locale: z.ZodEnum<{
|
|
109
|
-
zh: "zh";
|
|
110
|
-
ja: "ja";
|
|
111
|
-
en: "en";
|
|
112
|
-
ko: "ko";
|
|
113
|
-
}>;
|
|
114
|
-
message: z.ZodString;
|
|
115
|
-
}, z.core.$strip>>>;
|
|
116
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
117
|
-
style: z.ZodOptional<z.ZodString>;
|
|
118
|
-
discardEmptyString: z.ZodOptional<z.ZodBoolean>;
|
|
119
|
-
maxLength: z.ZodOptional<z.ZodString>;
|
|
120
|
-
hidden: z.ZodOptional<z.ZodString>;
|
|
121
|
-
disabled: z.ZodOptional<z.ZodString>;
|
|
122
|
-
validation: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
123
|
-
expression: z.ZodString;
|
|
124
|
-
message: z.ZodString;
|
|
125
|
-
}, z.core.$strip>>>>>;
|
|
126
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
127
|
-
type: z.ZodLiteral<"number">;
|
|
128
|
-
path: z.ZodString;
|
|
129
|
-
title: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
130
|
-
locale: z.ZodEnum<{
|
|
131
|
-
zh: "zh";
|
|
132
|
-
ja: "ja";
|
|
133
|
-
en: "en";
|
|
134
|
-
ko: "ko";
|
|
135
|
-
}>;
|
|
136
|
-
message: z.ZodString;
|
|
137
|
-
}, z.core.$strip>>>;
|
|
138
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
139
|
-
style: z.ZodOptional<z.ZodString>;
|
|
140
|
-
min: z.ZodOptional<z.ZodString>;
|
|
141
|
-
max: z.ZodOptional<z.ZodString>;
|
|
142
|
-
step: z.ZodOptional<z.ZodString>;
|
|
143
|
-
hidden: z.ZodOptional<z.ZodString>;
|
|
144
|
-
disabled: z.ZodOptional<z.ZodString>;
|
|
145
|
-
validation: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
146
|
-
expression: z.ZodString;
|
|
147
|
-
message: z.ZodString;
|
|
148
|
-
}, z.core.$strip>>>>>;
|
|
149
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
150
|
-
type: z.ZodLiteral<"select">;
|
|
151
|
-
path: z.ZodString;
|
|
152
|
-
title: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
153
|
-
locale: z.ZodEnum<{
|
|
154
|
-
zh: "zh";
|
|
155
|
-
ja: "ja";
|
|
156
|
-
en: "en";
|
|
157
|
-
ko: "ko";
|
|
158
|
-
}>;
|
|
159
|
-
message: z.ZodString;
|
|
160
|
-
}, z.core.$strip>>>;
|
|
161
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
162
|
-
options: z.ZodString;
|
|
163
|
-
label: z.ZodString;
|
|
164
|
-
value: z.ZodString;
|
|
165
|
-
key: z.ZodString;
|
|
166
|
-
style: z.ZodOptional<z.ZodString>;
|
|
167
|
-
hidden: z.ZodOptional<z.ZodString>;
|
|
168
|
-
disabled: z.ZodOptional<z.ZodString>;
|
|
169
|
-
validation: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
170
|
-
expression: z.ZodString;
|
|
171
|
-
message: z.ZodString;
|
|
172
|
-
}, z.core.$strip>>>>>;
|
|
173
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
174
|
-
type: z.ZodLiteral<"calendar">;
|
|
175
|
-
path: z.ZodString;
|
|
176
|
-
title: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
177
|
-
locale: z.ZodEnum<{
|
|
178
|
-
zh: "zh";
|
|
179
|
-
ja: "ja";
|
|
180
|
-
en: "en";
|
|
181
|
-
ko: "ko";
|
|
182
|
-
}>;
|
|
183
|
-
message: z.ZodString;
|
|
184
|
-
}, z.core.$strip>>>;
|
|
185
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
186
|
-
style: z.ZodOptional<z.ZodString>;
|
|
187
|
-
mode: z.ZodEnum<{
|
|
188
|
-
year: "year";
|
|
189
|
-
month: "month";
|
|
190
|
-
date: "date";
|
|
191
|
-
}>;
|
|
192
|
-
display: z.ZodOptional<z.ZodString>;
|
|
193
|
-
value: z.ZodString;
|
|
194
|
-
disableDate: z.ZodOptional<z.ZodString>;
|
|
195
|
-
hidden: z.ZodOptional<z.ZodString>;
|
|
196
|
-
disabled: z.ZodOptional<z.ZodString>;
|
|
197
|
-
validation: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
198
|
-
expression: z.ZodString;
|
|
199
|
-
message: z.ZodString;
|
|
200
|
-
}, z.core.$strip>>>>>;
|
|
201
|
-
}, z.core.$strip>]>;
|
|
202
|
-
export type Field = z.infer<typeof FieldC>;
|
|
2
|
+
import z from 'zod';
|
|
3
|
+
import { FieldC } from './schema.js';
|
|
4
|
+
export { CalendarFieldC, FieldC, NumberFieldC, SelectFieldC, StringFieldC, ValidationRuleC, validationC, } from './schema.js';
|
|
5
|
+
export type { Field, ValidationRule } from './schema.js';
|
|
203
6
|
declare const _default: typeof __VLS_export;
|
|
204
7
|
export default _default;
|
|
205
8
|
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
@@ -270,7 +73,7 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
270
73
|
locale: "zh" | "ja" | "en" | "ko";
|
|
271
74
|
message: string;
|
|
272
75
|
}[];
|
|
273
|
-
mode: "
|
|
76
|
+
mode: "date" | "month" | "year";
|
|
274
77
|
value: string;
|
|
275
78
|
icon?: string | undefined;
|
|
276
79
|
style?: string | undefined;
|
|
@@ -351,7 +154,7 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
351
154
|
locale: "zh" | "ja" | "en" | "ko";
|
|
352
155
|
message: string;
|
|
353
156
|
}[];
|
|
354
|
-
mode: "
|
|
157
|
+
mode: "date" | "month" | "year";
|
|
355
158
|
value: string;
|
|
356
159
|
icon?: string | undefined;
|
|
357
160
|
style?: string | undefined;
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
import z from 'zod';
|
|
2
|
+
export declare const ValidationRuleC: z.ZodReadonly<z.ZodObject<{
|
|
3
|
+
expression: z.ZodString;
|
|
4
|
+
message: z.ZodString;
|
|
5
|
+
}, z.core.$strip>>;
|
|
6
|
+
export declare const validationC: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
7
|
+
expression: z.ZodString;
|
|
8
|
+
message: z.ZodString;
|
|
9
|
+
}, z.core.$strip>>>>>;
|
|
10
|
+
export declare const StringFieldC: z.ZodObject<{
|
|
11
|
+
type: z.ZodLiteral<"string">;
|
|
12
|
+
path: z.ZodString;
|
|
13
|
+
title: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
14
|
+
locale: z.ZodEnum<{
|
|
15
|
+
zh: "zh";
|
|
16
|
+
ja: "ja";
|
|
17
|
+
en: "en";
|
|
18
|
+
ko: "ko";
|
|
19
|
+
}>;
|
|
20
|
+
message: z.ZodString;
|
|
21
|
+
}, z.core.$strip>>>;
|
|
22
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
23
|
+
style: z.ZodOptional<z.ZodString>;
|
|
24
|
+
discardEmptyString: z.ZodOptional<z.ZodBoolean>;
|
|
25
|
+
maxLength: z.ZodOptional<z.ZodString>;
|
|
26
|
+
hidden: z.ZodOptional<z.ZodString>;
|
|
27
|
+
disabled: z.ZodOptional<z.ZodString>;
|
|
28
|
+
validation: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
29
|
+
expression: z.ZodString;
|
|
30
|
+
message: z.ZodString;
|
|
31
|
+
}, z.core.$strip>>>>>;
|
|
32
|
+
}, z.core.$strip>;
|
|
33
|
+
export declare const NumberFieldC: z.ZodObject<{
|
|
34
|
+
type: z.ZodLiteral<"number">;
|
|
35
|
+
path: z.ZodString;
|
|
36
|
+
title: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
37
|
+
locale: z.ZodEnum<{
|
|
38
|
+
zh: "zh";
|
|
39
|
+
ja: "ja";
|
|
40
|
+
en: "en";
|
|
41
|
+
ko: "ko";
|
|
42
|
+
}>;
|
|
43
|
+
message: z.ZodString;
|
|
44
|
+
}, z.core.$strip>>>;
|
|
45
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
46
|
+
style: z.ZodOptional<z.ZodString>;
|
|
47
|
+
min: z.ZodOptional<z.ZodString>;
|
|
48
|
+
max: z.ZodOptional<z.ZodString>;
|
|
49
|
+
step: z.ZodOptional<z.ZodString>;
|
|
50
|
+
hidden: z.ZodOptional<z.ZodString>;
|
|
51
|
+
disabled: z.ZodOptional<z.ZodString>;
|
|
52
|
+
validation: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
53
|
+
expression: z.ZodString;
|
|
54
|
+
message: z.ZodString;
|
|
55
|
+
}, z.core.$strip>>>>>;
|
|
56
|
+
}, z.core.$strip>;
|
|
57
|
+
export declare const SelectFieldC: z.ZodObject<{
|
|
58
|
+
type: z.ZodLiteral<"select">;
|
|
59
|
+
path: z.ZodString;
|
|
60
|
+
title: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
61
|
+
locale: z.ZodEnum<{
|
|
62
|
+
zh: "zh";
|
|
63
|
+
ja: "ja";
|
|
64
|
+
en: "en";
|
|
65
|
+
ko: "ko";
|
|
66
|
+
}>;
|
|
67
|
+
message: z.ZodString;
|
|
68
|
+
}, z.core.$strip>>>;
|
|
69
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
70
|
+
options: z.ZodString;
|
|
71
|
+
label: z.ZodString;
|
|
72
|
+
value: z.ZodString;
|
|
73
|
+
key: z.ZodString;
|
|
74
|
+
style: z.ZodOptional<z.ZodString>;
|
|
75
|
+
hidden: z.ZodOptional<z.ZodString>;
|
|
76
|
+
disabled: z.ZodOptional<z.ZodString>;
|
|
77
|
+
validation: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
78
|
+
expression: z.ZodString;
|
|
79
|
+
message: z.ZodString;
|
|
80
|
+
}, z.core.$strip>>>>>;
|
|
81
|
+
}, z.core.$strip>;
|
|
82
|
+
export declare const CalendarFieldC: z.ZodObject<{
|
|
83
|
+
type: z.ZodLiteral<"calendar">;
|
|
84
|
+
path: z.ZodString;
|
|
85
|
+
title: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
86
|
+
locale: z.ZodEnum<{
|
|
87
|
+
zh: "zh";
|
|
88
|
+
ja: "ja";
|
|
89
|
+
en: "en";
|
|
90
|
+
ko: "ko";
|
|
91
|
+
}>;
|
|
92
|
+
message: z.ZodString;
|
|
93
|
+
}, z.core.$strip>>>;
|
|
94
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
95
|
+
style: z.ZodOptional<z.ZodString>;
|
|
96
|
+
mode: z.ZodEnum<{
|
|
97
|
+
date: "date";
|
|
98
|
+
month: "month";
|
|
99
|
+
year: "year";
|
|
100
|
+
}>;
|
|
101
|
+
display: z.ZodOptional<z.ZodString>;
|
|
102
|
+
value: z.ZodString;
|
|
103
|
+
disableDate: z.ZodOptional<z.ZodString>;
|
|
104
|
+
hidden: z.ZodOptional<z.ZodString>;
|
|
105
|
+
disabled: z.ZodOptional<z.ZodString>;
|
|
106
|
+
validation: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
107
|
+
expression: z.ZodString;
|
|
108
|
+
message: z.ZodString;
|
|
109
|
+
}, z.core.$strip>>>>>;
|
|
110
|
+
}, z.core.$strip>;
|
|
111
|
+
export declare const FieldC: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
112
|
+
type: z.ZodLiteral<"string">;
|
|
113
|
+
path: z.ZodString;
|
|
114
|
+
title: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
115
|
+
locale: z.ZodEnum<{
|
|
116
|
+
zh: "zh";
|
|
117
|
+
ja: "ja";
|
|
118
|
+
en: "en";
|
|
119
|
+
ko: "ko";
|
|
120
|
+
}>;
|
|
121
|
+
message: z.ZodString;
|
|
122
|
+
}, z.core.$strip>>>;
|
|
123
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
124
|
+
style: z.ZodOptional<z.ZodString>;
|
|
125
|
+
discardEmptyString: z.ZodOptional<z.ZodBoolean>;
|
|
126
|
+
maxLength: z.ZodOptional<z.ZodString>;
|
|
127
|
+
hidden: z.ZodOptional<z.ZodString>;
|
|
128
|
+
disabled: z.ZodOptional<z.ZodString>;
|
|
129
|
+
validation: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
130
|
+
expression: z.ZodString;
|
|
131
|
+
message: z.ZodString;
|
|
132
|
+
}, z.core.$strip>>>>>;
|
|
133
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
134
|
+
type: z.ZodLiteral<"number">;
|
|
135
|
+
path: z.ZodString;
|
|
136
|
+
title: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
137
|
+
locale: z.ZodEnum<{
|
|
138
|
+
zh: "zh";
|
|
139
|
+
ja: "ja";
|
|
140
|
+
en: "en";
|
|
141
|
+
ko: "ko";
|
|
142
|
+
}>;
|
|
143
|
+
message: z.ZodString;
|
|
144
|
+
}, z.core.$strip>>>;
|
|
145
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
146
|
+
style: z.ZodOptional<z.ZodString>;
|
|
147
|
+
min: z.ZodOptional<z.ZodString>;
|
|
148
|
+
max: z.ZodOptional<z.ZodString>;
|
|
149
|
+
step: z.ZodOptional<z.ZodString>;
|
|
150
|
+
hidden: z.ZodOptional<z.ZodString>;
|
|
151
|
+
disabled: z.ZodOptional<z.ZodString>;
|
|
152
|
+
validation: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
153
|
+
expression: z.ZodString;
|
|
154
|
+
message: z.ZodString;
|
|
155
|
+
}, z.core.$strip>>>>>;
|
|
156
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
157
|
+
type: z.ZodLiteral<"select">;
|
|
158
|
+
path: z.ZodString;
|
|
159
|
+
title: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
160
|
+
locale: z.ZodEnum<{
|
|
161
|
+
zh: "zh";
|
|
162
|
+
ja: "ja";
|
|
163
|
+
en: "en";
|
|
164
|
+
ko: "ko";
|
|
165
|
+
}>;
|
|
166
|
+
message: z.ZodString;
|
|
167
|
+
}, z.core.$strip>>>;
|
|
168
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
169
|
+
options: z.ZodString;
|
|
170
|
+
label: z.ZodString;
|
|
171
|
+
value: z.ZodString;
|
|
172
|
+
key: z.ZodString;
|
|
173
|
+
style: z.ZodOptional<z.ZodString>;
|
|
174
|
+
hidden: z.ZodOptional<z.ZodString>;
|
|
175
|
+
disabled: z.ZodOptional<z.ZodString>;
|
|
176
|
+
validation: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
177
|
+
expression: z.ZodString;
|
|
178
|
+
message: z.ZodString;
|
|
179
|
+
}, z.core.$strip>>>>>;
|
|
180
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
181
|
+
type: z.ZodLiteral<"calendar">;
|
|
182
|
+
path: z.ZodString;
|
|
183
|
+
title: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
184
|
+
locale: z.ZodEnum<{
|
|
185
|
+
zh: "zh";
|
|
186
|
+
ja: "ja";
|
|
187
|
+
en: "en";
|
|
188
|
+
ko: "ko";
|
|
189
|
+
}>;
|
|
190
|
+
message: z.ZodString;
|
|
191
|
+
}, z.core.$strip>>>;
|
|
192
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
193
|
+
style: z.ZodOptional<z.ZodString>;
|
|
194
|
+
mode: z.ZodEnum<{
|
|
195
|
+
date: "date";
|
|
196
|
+
month: "month";
|
|
197
|
+
year: "year";
|
|
198
|
+
}>;
|
|
199
|
+
display: z.ZodOptional<z.ZodString>;
|
|
200
|
+
value: z.ZodString;
|
|
201
|
+
disableDate: z.ZodOptional<z.ZodString>;
|
|
202
|
+
hidden: z.ZodOptional<z.ZodString>;
|
|
203
|
+
disabled: z.ZodOptional<z.ZodString>;
|
|
204
|
+
validation: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
205
|
+
expression: z.ZodString;
|
|
206
|
+
message: z.ZodString;
|
|
207
|
+
}, z.core.$strip>>>>>;
|
|
208
|
+
}, z.core.$strip>], "type">;
|
|
209
|
+
export type ValidationRule = z.infer<typeof ValidationRuleC>;
|
|
210
|
+
export type Field = z.infer<typeof FieldC>;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import z from "zod";
|
|
2
|
+
import { dotPropC, expressionC, localeC } from "../../../utils/coders.js";
|
|
3
|
+
export const ValidationRuleC = z.object({
|
|
4
|
+
expression: expressionC("bool", { value: "dyn", form: "map<string, dyn>" }).describe("\u8FD4\u56DE\u5E03\u5C14\u503C\u7684 CEL \u8868\u8FBE\u5F0F\uFF0C\u53EF\u4F7F\u7528 value \u548C form \u53D8\u91CF"),
|
|
5
|
+
message: z.string().describe("\u6821\u9A8C\u5931\u8D25\u65F6\u5C55\u793A\u7684 Markdown \u6D88\u606F\uFF0C\u53EF\u5728 {{ expression }} \u4E2D\u4F7F\u7528 value \u548C form \u53D8\u91CF")
|
|
6
|
+
}).readonly();
|
|
7
|
+
export const validationC = z.array(ValidationRuleC).readonly().optional().describe("\u5B57\u6BB5\u5931\u7126\u65F6\u6309\u987A\u5E8F\u6267\u884C\u7684\u6821\u9A8C\u89C4\u5219\uFF0C\u547D\u4E2D\u7B2C\u4E00\u4E2A\u5931\u8D25\u89C4\u5219\u540E\u505C\u6B62");
|
|
8
|
+
export const StringFieldC = z.object({
|
|
9
|
+
type: z.literal("string").describe("\u5355\u884C\u6587\u672C\u8F93\u5165\u5B57\u6BB5\uFF0C\u7ED1\u5B9A string \u7C7B\u578B\u7684\u503C"),
|
|
10
|
+
path: dotPropC,
|
|
11
|
+
title: localeC.describe("\u5B57\u6BB5\u6807\u7B7E\u7684\u672C\u5730\u5316\u663E\u793A\u6587\u672C"),
|
|
12
|
+
icon: z.string().optional().describe("Iconify \u56FE\u6807\u6807\u8BC6\u7B26\uFF0C\u663E\u793A\u5728\u8F93\u5165\u6846\u5185\u4FA7"),
|
|
13
|
+
style: z.string().optional().describe("CSS \u6837\u5F0F\u5BF9\u8C61\u8868\u8FBE\u5F0F\uFF0C\u63A7\u5236\u5B57\u6BB5\u7684\u5E03\u5C40\u4E0E\u5916\u89C2"),
|
|
14
|
+
discardEmptyString: z.boolean().optional().describe("\u4E3A true \u65F6\uFF0C\u7A7A\u5B57\u7B26\u4E32\u4F5C\u4E3A\u6709\u6548\u503C\u5B58\u50A8\uFF1B\u5426\u5219\u6E05\u7A7A\u8F93\u5165\u5C06\u5220\u9664\u5BF9\u5E94\u5C5E\u6027"),
|
|
15
|
+
maxLength: expressionC("int").optional().describe('\u8FD4\u56DE\u6574\u6570\u7684 CEL \u8868\u8FBE\u5F0F\uFF0C\u9650\u5236\u8F93\u5165\u7684\u6700\u5927\u5B57\u7B26\u6570\uFF0C\u5982 "100"'),
|
|
16
|
+
hidden: expressionC("bool", { form: "map<string, dyn>" }).optional().describe("\u4E3A true \u65F6\uFF0C\u9690\u85CF\u8FD9\u4E2A\u5B57\u6BB5"),
|
|
17
|
+
disabled: expressionC("bool", { form: "map<string, dyn>" }).optional().describe("\u4E3A true \u65F6\uFF0C\u7981\u7528\u8FD9\u4E2A\u5B57\u6BB5"),
|
|
18
|
+
validation: validationC
|
|
19
|
+
});
|
|
20
|
+
export const NumberFieldC = z.object({
|
|
21
|
+
type: z.literal("number").describe("\u6570\u5B57\u8F93\u5165\u5B57\u6BB5\uFF0C\u7ED1\u5B9A number \u7C7B\u578B\u7684\u503C"),
|
|
22
|
+
path: dotPropC,
|
|
23
|
+
title: localeC.describe("\u5B57\u6BB5\u6807\u7B7E\u7684\u672C\u5730\u5316\u663E\u793A\u6587\u672C"),
|
|
24
|
+
icon: z.string().optional().describe("Iconify \u56FE\u6807\u6807\u8BC6\u7B26\uFF0C\u663E\u793A\u5728\u8F93\u5165\u6846\u5185\u4FA7"),
|
|
25
|
+
style: z.string().optional().describe("CSS \u6837\u5F0F\u5BF9\u8C61\u8868\u8FBE\u5F0F\uFF0C\u63A7\u5236\u5B57\u6BB5\u7684\u5E03\u5C40\u4E0E\u5916\u89C2"),
|
|
26
|
+
min: expressionC("double").optional().describe('\u8FD4\u56DE\u6D6E\u70B9\u6570\u7684 CEL \u8868\u8FBE\u5F0F\uFF0C\u9650\u5236\u5141\u8BB8\u7684\u6700\u5C0F\u503C\uFF0C\u5982 "0.0"'),
|
|
27
|
+
max: expressionC("double").optional().describe('\u8FD4\u56DE\u6D6E\u70B9\u6570\u7684 CEL \u8868\u8FBE\u5F0F\uFF0C\u9650\u5236\u5141\u8BB8\u7684\u6700\u5927\u503C\uFF0C\u5982 "100.0"'),
|
|
28
|
+
step: expressionC("double").optional().describe('\u8FD4\u56DE\u6D6E\u70B9\u6570\u7684 CEL \u8868\u8FBE\u5F0F\uFF0C\u63A7\u5236\u6570\u503C\u9012\u589E\u6B65\u957F\uFF0C\u5982 "0.5"'),
|
|
29
|
+
hidden: expressionC("bool", { form: "map<string, dyn>" }).optional().describe("\u4E3A true \u65F6\uFF0C\u9690\u85CF\u8FD9\u4E2A\u5B57\u6BB5"),
|
|
30
|
+
disabled: expressionC("bool", { form: "map<string, dyn>" }).optional().describe("\u4E3A true \u65F6\uFF0C\u7981\u7528\u8FD9\u4E2A\u5B57\u6BB5"),
|
|
31
|
+
validation: validationC
|
|
32
|
+
});
|
|
33
|
+
export const SelectFieldC = z.object({
|
|
34
|
+
type: z.literal("select").describe("\u4E0B\u62C9\u9009\u62E9\u5B57\u6BB5\uFF0C\u4ECE\u9884\u5B9A\u4E49\u9009\u9879\u4E2D\u9009\u53D6\u4E00\u4E2A\u503C"),
|
|
35
|
+
path: dotPropC,
|
|
36
|
+
title: localeC.describe("\u5B57\u6BB5\u6807\u7B7E\u7684\u672C\u5730\u5316\u663E\u793A\u6587\u672C"),
|
|
37
|
+
icon: z.string().optional().describe("Iconify \u56FE\u6807\u6807\u8BC6\u7B26\uFF0C\u663E\u793A\u5728\u8F93\u5165\u6846\u5185\u4FA7"),
|
|
38
|
+
options: expressionC(/^list/).describe("\u5168\u90E8\u5019\u9009\u9879"),
|
|
39
|
+
label: expressionC("string", { option: "dyn" }).describe("\u8FD4\u56DE\u5B57\u7B26\u4E32\u7684 CEL \u8868\u8FBE\u5F0F\uFF0C\u63D0\u4F9B option \u53D8\u91CF\uFF0C\u751F\u6210\u8BE5\u9009\u9879\u7684\u663E\u793A\u6587\u672C"),
|
|
40
|
+
value: expressionC(/.+/, { option: "dyn" }).describe("\u8FD4\u56DE\u4EFB\u610F\u503C\u7684 CEL \u8868\u8FBE\u5F0F\uFF0C\u63D0\u4F9B option \u53D8\u91CF\uFF0C\u8FD4\u56DE\u503C\u5C06\u88AB\u5199\u5165\u7ED1\u5B9A\u5B57\u6BB5"),
|
|
41
|
+
key: expressionC("string", { option: "dyn" }).describe("\u8FD4\u56DE\u5B57\u7B26\u4E32\u7684 CEL \u8868\u8FBE\u5F0F\uFF0C\u63D0\u4F9B option \u53D8\u91CF\uFF0C\u8FD4\u56DE\u503C\u4E0E\u9009\u9879\u6784\u6210\u5168\u6620\u5C04"),
|
|
42
|
+
style: z.string().optional().describe("CSS \u6837\u5F0F\u5BF9\u8C61\u8868\u8FBE\u5F0F\uFF0C\u63A7\u5236\u5B57\u6BB5\u7684\u5E03\u5C40\u4E0E\u5916\u89C2"),
|
|
43
|
+
hidden: expressionC("bool", { form: "map<string, dyn>" }).optional().describe("\u4E3A true \u65F6\uFF0C\u9690\u85CF\u8FD9\u4E2A\u5B57\u6BB5"),
|
|
44
|
+
disabled: expressionC("bool", { form: "map<string, dyn>" }).optional().describe("\u4E3A true \u65F6\uFF0C\u7981\u7528\u8FD9\u4E2A\u5B57\u6BB5"),
|
|
45
|
+
validation: validationC
|
|
46
|
+
});
|
|
47
|
+
export const CalendarFieldC = z.object({
|
|
48
|
+
type: z.literal("calendar").describe("\u65E5\u671F\u9009\u62E9\u5B57\u6BB5\uFF0C\u901A\u8FC7\u5F39\u51FA\u65E5\u5386\u9762\u677F\u9009\u62E9\u65E5\u671F"),
|
|
49
|
+
path: dotPropC,
|
|
50
|
+
title: localeC.describe("\u5B57\u6BB5\u6807\u7B7E\u7684\u672C\u5730\u5316\u663E\u793A\u6587\u672C"),
|
|
51
|
+
icon: z.string().optional().describe("Iconify \u56FE\u6807\u6807\u8BC6\u7B26\uFF0C\u663E\u793A\u5728\u8F93\u5165\u6846\u5185\u4FA7"),
|
|
52
|
+
style: z.string().optional().describe("CSS \u6837\u5F0F\u5BF9\u8C61\u8868\u8FBE\u5F0F\uFF0C\u63A7\u5236\u5B57\u6BB5\u7684\u5E03\u5C40\u4E0E\u5916\u89C2"),
|
|
53
|
+
mode: z.enum(["year", "month", "date"]).describe("\u65E5\u5386\u9009\u62E9\u7CBE\u5EA6\uFF1Ayear \u4EC5\u9009\u5E74\uFF0Cmonth \u9009\u5E74\u6708\uFF0Cdate \u9009\u5E74\u6708\u65E5"),
|
|
54
|
+
display: z.string().optional().describe('date-fns \u683C\u5F0F\u5B57\u7B26\u4E32\uFF0C\u63A7\u5236\u8F93\u5165\u6846\u4E2D\u7684\u5C55\u793A\u683C\u5F0F\uFF0C\u5982 "yyyy\u5E74MM\u6708dd\u65E5"\uFF1B\u7559\u7A7A\u5219\u663E\u793A\u539F\u59CB\u5B58\u50A8\u503C'),
|
|
55
|
+
value: z.string().describe('date-fns \u683C\u5F0F\u5B57\u7B26\u4E32\uFF0C\u5B9A\u4E49\u65E5\u671F\u5728 model \u4E2D\u7684\u5B58\u50A8\u683C\u5F0F\uFF0C\u5982 "yyyy-MM-dd"'),
|
|
56
|
+
disableDate: expressionC("bool", { date: "Date" }).optional().describe("\u8FD4\u56DE\u5E03\u5C14\u503C\u7684 CEL \u8868\u8FBE\u5F0F\uFF0C\u4EE5 date\uFF08Date \u7C7B\u578B\uFF09\u4E3A\u53D8\u91CF\uFF0C\u8FD4\u56DE true \u65F6\u8BE5\u65E5\u671F\u5728\u65E5\u5386\u4E2D\u88AB\u7981\u7528"),
|
|
57
|
+
hidden: expressionC("bool", { form: "map<string, dyn>" }).optional().describe("\u4E3A true \u65F6\uFF0C\u9690\u85CF\u8FD9\u4E2A\u5B57\u6BB5"),
|
|
58
|
+
disabled: expressionC("bool", { form: "map<string, dyn>" }).optional().describe("\u4E3A true \u65F6\uFF0C\u7981\u7528\u8FD9\u4E2A\u5B57\u6BB5"),
|
|
59
|
+
validation: validationC
|
|
60
|
+
});
|
|
61
|
+
export const FieldC = z.discriminatedUnion("type", [
|
|
62
|
+
StringFieldC,
|
|
63
|
+
NumberFieldC,
|
|
64
|
+
SelectFieldC,
|
|
65
|
+
CalendarFieldC
|
|
66
|
+
]);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type Field } from '../fields/schema.js';
|
|
2
2
|
type __VLS_Props = {
|
|
3
3
|
fields: ReadonlyArray<Field>;
|
|
4
4
|
};
|
|
@@ -69,7 +69,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
69
69
|
locale: "zh" | "ja" | "en" | "ko";
|
|
70
70
|
message: string;
|
|
71
71
|
}[];
|
|
72
|
-
mode: "
|
|
72
|
+
mode: "date" | "month" | "year";
|
|
73
73
|
value: string;
|
|
74
74
|
icon?: string | undefined;
|
|
75
75
|
style?: string | undefined;
|
|
@@ -145,7 +145,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
145
145
|
locale: "zh" | "ja" | "en" | "ko";
|
|
146
146
|
message: string;
|
|
147
147
|
}[];
|
|
148
|
-
mode: "
|
|
148
|
+
mode: "date" | "month" | "year";
|
|
149
149
|
value: string;
|
|
150
150
|
icon?: string | undefined;
|
|
151
151
|
style?: string | undefined;
|