@shwfed/nuxt 0.8.1 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@shwfed/nuxt",
3
3
  "configKey": "shwfed",
4
- "version": "0.8.1",
4
+ "version": "0.8.2",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
@@ -5,12 +5,12 @@ declare const _default: typeof __VLS_export;
5
5
  export default _default;
6
6
  declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
7
7
  orientation?: "horizontal" | "vertical" | "floating";
8
- fields: import("effect").Effect.Effect<ReadonlyArray<Field>>;
8
+ config: import("effect").Effect.Effect<ReadonlyArray<Field>>;
9
9
  } & {
10
10
  modelValue?: Record<string, unknown>;
11
11
  }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
12
12
  "update:modelValue": (value: Record<string, unknown>) => any;
13
- "update:fields": (args_0: readonly ({
13
+ "update:config": (args_0: readonly ({
14
14
  type: "string";
15
15
  path: string;
16
16
  title: readonly {
@@ -71,7 +71,7 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
71
71
  locale: "zh" | "ja" | "en" | "ko";
72
72
  message: string;
73
73
  }[];
74
- mode: "year" | "month" | "date";
74
+ mode: "date" | "month" | "year";
75
75
  value: string;
76
76
  icon?: string | undefined;
77
77
  style?: string | undefined;
@@ -86,12 +86,12 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
86
86
  })[]) => any;
87
87
  }, string, import("vue").PublicProps, Readonly<{
88
88
  orientation?: "horizontal" | "vertical" | "floating";
89
- fields: import("effect").Effect.Effect<ReadonlyArray<Field>>;
89
+ config: import("effect").Effect.Effect<ReadonlyArray<Field>>;
90
90
  } & {
91
91
  modelValue?: Record<string, unknown>;
92
92
  }> & Readonly<{
93
93
  "onUpdate:modelValue"?: ((value: Record<string, unknown>) => any) | undefined;
94
- "onUpdate:fields"?: ((args_0: readonly ({
94
+ "onUpdate:config"?: ((args_0: readonly ({
95
95
  type: "string";
96
96
  path: string;
97
97
  title: readonly {
@@ -152,7 +152,7 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
152
152
  locale: "zh" | "ja" | "en" | "ko";
153
153
  message: string;
154
154
  }[];
155
- mode: "year" | "month" | "date";
155
+ mode: "date" | "month" | "year";
156
156
  value: string;
157
157
  icon?: string | undefined;
158
158
  style?: string | undefined;
@@ -5,14 +5,14 @@ defineOptions({
5
5
  });
6
6
  const props = defineProps({
7
7
  orientation: { type: String, required: false, default: "horizontal" },
8
- fields: { type: null, required: true }
8
+ config: { type: null, required: true }
9
9
  });
10
- const emit = defineEmits(["update:fields"]);
10
+ const emit = defineEmits(["update:config"]);
11
11
  const modelValue = defineModel("modelValue", { type: Object, ...{
12
12
  default: () => ({})
13
13
  } });
14
- function handleFieldsUpdate(fields) {
15
- emit("update:fields", fields);
14
+ function handleConfigUpdate(config) {
15
+ emit("update:config", config);
16
16
  }
17
17
  </script>
18
18
 
@@ -31,8 +31,8 @@ export {
31
31
  v-bind="$attrs"
32
32
  v-model="modelValue"
33
33
  :orientation="props.orientation"
34
- :fields="props.fields"
35
- @update:fields="handleFieldsUpdate"
34
+ :fields="props.config"
35
+ @update:fields="handleConfigUpdate"
36
36
  >
37
37
  <template
38
38
  v-for="(_, slotName) in $slots"
@@ -5,12 +5,12 @@ declare const _default: typeof __VLS_export;
5
5
  export default _default;
6
6
  declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
7
7
  orientation?: "horizontal" | "vertical" | "floating";
8
- fields: import("effect").Effect.Effect<ReadonlyArray<Field>>;
8
+ config: import("effect").Effect.Effect<ReadonlyArray<Field>>;
9
9
  } & {
10
10
  modelValue?: Record<string, unknown>;
11
11
  }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
12
12
  "update:modelValue": (value: Record<string, unknown>) => any;
13
- "update:fields": (args_0: readonly ({
13
+ "update:config": (args_0: readonly ({
14
14
  type: "string";
15
15
  path: string;
16
16
  title: readonly {
@@ -71,7 +71,7 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
71
71
  locale: "zh" | "ja" | "en" | "ko";
72
72
  message: string;
73
73
  }[];
74
- mode: "year" | "month" | "date";
74
+ mode: "date" | "month" | "year";
75
75
  value: string;
76
76
  icon?: string | undefined;
77
77
  style?: string | undefined;
@@ -86,12 +86,12 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
86
86
  })[]) => any;
87
87
  }, string, import("vue").PublicProps, Readonly<{
88
88
  orientation?: "horizontal" | "vertical" | "floating";
89
- fields: import("effect").Effect.Effect<ReadonlyArray<Field>>;
89
+ config: import("effect").Effect.Effect<ReadonlyArray<Field>>;
90
90
  } & {
91
91
  modelValue?: Record<string, unknown>;
92
92
  }> & Readonly<{
93
93
  "onUpdate:modelValue"?: ((value: Record<string, unknown>) => any) | undefined;
94
- "onUpdate:fields"?: ((args_0: readonly ({
94
+ "onUpdate:config"?: ((args_0: readonly ({
95
95
  type: "string";
96
96
  path: string;
97
97
  title: readonly {
@@ -152,7 +152,7 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
152
152
  locale: "zh" | "ja" | "en" | "ko";
153
153
  message: string;
154
154
  }[];
155
- mode: "year" | "month" | "date";
155
+ mode: "date" | "month" | "year";
156
156
  value: string;
157
157
  icon?: string | undefined;
158
158
  style?: string | undefined;
@@ -1,205 +1,8 @@
1
- import z from 'zod';
2
1
  import { Effect } from 'effect';
3
- export declare const StringFieldC: z.ZodObject<{
4
- type: z.ZodLiteral<"string">;
5
- path: z.ZodString;
6
- title: z.ZodReadonly<z.ZodArray<z.ZodObject<{
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: "year" | "month" | "date";
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: "year" | "month" | "date";
157
+ mode: "date" | "month" | "year";
355
158
  value: string;
356
159
  icon?: string | undefined;
357
160
  style?: string | undefined;
@@ -1,93 +1,27 @@
1
- <script>
2
- import { Icon } from "@iconify/vue";
1
+ <script setup>
3
2
  import { useNuxtApp } from "#app";
3
+ import { computedAsync } from "@vueuse/core";
4
+ import { TZDate } from "@date-fns/tz";
5
+ import { CalendarDate, getLocalTimeZone } from "@internationalized/date";
6
+ import { Icon } from "@iconify/vue";
7
+ import { Effect } from "effect";
8
+ import { format, parse } from "date-fns";
9
+ import { deleteProperty, getProperty, hasProperty, setProperty } from "dot-prop";
4
10
  import { ref, toRaw, useId, watch, watchEffect } from "vue";
5
- import { Field, FieldContent, FieldError, FieldLabel } from "../field";
11
+ import { useI18n } from "vue-i18n";
12
+ import z from "zod";
13
+ import { useCheating } from "#imports";
14
+ import { Calendar } from "../calendar";
6
15
  import { Button } from "../button";
7
- import { InputGroup, InputGroupAddon, InputGroupButton, InputGroupCombobox, InputGroupInput, InputGroupNumberField } from "../input-group";
8
16
  import { CommandGroup, CommandItem } from "../command";
9
- import { Tooltip, TooltipContent, TooltipTrigger } from "../tooltip";
17
+ import { Field, FieldContent, FieldError, FieldLabel } from "../field";
18
+ import FieldsConfiguratorDialog from "../fields-configurator/FieldsConfiguratorDialog.vue";
19
+ import { InputGroup, InputGroupAddon, InputGroupButton, InputGroupCombobox, InputGroupInput, InputGroupNumberField } from "../input-group";
10
20
  import { Popover, PopoverAnchor, PopoverContent, PopoverTrigger } from "../popover";
11
- import { Calendar } from "../calendar";
12
- import { useI18n } from "vue-i18n";
13
- import { deleteProperty, getProperty, hasProperty, setProperty } from "dot-prop";
14
- import { useCheating } from "#imports";
15
21
  import { Skeleton } from "../skeleton";
16
- import z from "zod";
17
- import { Effect } from "effect";
18
- import { computedAsync } from "@vueuse/core";
19
- import { getLocalizedText, localeC, dotPropC, expressionC } from "../../../utils/coders";
20
- import { CalendarDate, getLocalTimeZone } from "@internationalized/date";
21
- import { format, parse } from "date-fns";
22
- import { TZDate } from "@date-fns/tz";
23
- import FieldsConfiguratorDialog from "../fields-configurator/FieldsConfiguratorDialog.vue";
24
- const ValidationRuleC = z.object({
25
- 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"),
26
- 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")
27
- }).readonly();
28
- 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");
29
- export const StringFieldC = z.object({
30
- type: z.literal("string").describe("\u5355\u884C\u6587\u672C\u8F93\u5165\u5B57\u6BB5\uFF0C\u7ED1\u5B9A string \u7C7B\u578B\u7684\u503C"),
31
- path: dotPropC,
32
- title: localeC.describe("\u5B57\u6BB5\u6807\u7B7E\u7684\u672C\u5730\u5316\u663E\u793A\u6587\u672C"),
33
- icon: z.string().optional().describe("Iconify \u56FE\u6807\u6807\u8BC6\u7B26\uFF0C\u663E\u793A\u5728\u8F93\u5165\u6846\u5185\u4FA7"),
34
- style: z.string().optional().describe("CSS \u6837\u5F0F\u5BF9\u8C61\u8868\u8FBE\u5F0F\uFF0C\u63A7\u5236\u5B57\u6BB5\u7684\u5E03\u5C40\u4E0E\u5916\u89C2"),
35
- 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"),
36
- 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"'),
37
- hidden: expressionC("bool", { form: "map<string, dyn>" }).optional().describe("\u4E3A true \u65F6\uFF0C\u9690\u85CF\u8FD9\u4E2A\u5B57\u6BB5"),
38
- disabled: expressionC("bool", { form: "map<string, dyn>" }).optional().describe("\u4E3A true \u65F6\uFF0C\u7981\u7528\u8FD9\u4E2A\u5B57\u6BB5"),
39
- validation: validationC
40
- });
41
- export const NumberFieldC = z.object({
42
- type: z.literal("number").describe("\u6570\u5B57\u8F93\u5165\u5B57\u6BB5\uFF0C\u7ED1\u5B9A number \u7C7B\u578B\u7684\u503C"),
43
- path: dotPropC,
44
- title: localeC.describe("\u5B57\u6BB5\u6807\u7B7E\u7684\u672C\u5730\u5316\u663E\u793A\u6587\u672C"),
45
- icon: z.string().optional().describe("Iconify \u56FE\u6807\u6807\u8BC6\u7B26\uFF0C\u663E\u793A\u5728\u8F93\u5165\u6846\u5185\u4FA7"),
46
- style: z.string().optional().describe("CSS \u6837\u5F0F\u5BF9\u8C61\u8868\u8FBE\u5F0F\uFF0C\u63A7\u5236\u5B57\u6BB5\u7684\u5E03\u5C40\u4E0E\u5916\u89C2"),
47
- 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"'),
48
- 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"'),
49
- 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"'),
50
- hidden: expressionC("bool", { form: "map<string, dyn>" }).optional().describe("\u4E3A true \u65F6\uFF0C\u9690\u85CF\u8FD9\u4E2A\u5B57\u6BB5"),
51
- disabled: expressionC("bool", { form: "map<string, dyn>" }).optional().describe("\u4E3A true \u65F6\uFF0C\u7981\u7528\u8FD9\u4E2A\u5B57\u6BB5"),
52
- validation: validationC
53
- });
54
- export const SelectFieldC = z.object({
55
- type: z.literal("select").describe("\u4E0B\u62C9\u9009\u62E9\u5B57\u6BB5\uFF0C\u4ECE\u9884\u5B9A\u4E49\u9009\u9879\u4E2D\u9009\u53D6\u4E00\u4E2A\u503C"),
56
- path: dotPropC,
57
- title: localeC.describe("\u5B57\u6BB5\u6807\u7B7E\u7684\u672C\u5730\u5316\u663E\u793A\u6587\u672C"),
58
- icon: z.string().optional().describe("Iconify \u56FE\u6807\u6807\u8BC6\u7B26\uFF0C\u663E\u793A\u5728\u8F93\u5165\u6846\u5185\u4FA7"),
59
- options: expressionC(/^list/).describe("\u5168\u90E8\u5019\u9009\u9879"),
60
- 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"),
61
- 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"),
62
- 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"),
63
- style: z.string().optional().describe("CSS \u6837\u5F0F\u5BF9\u8C61\u8868\u8FBE\u5F0F\uFF0C\u63A7\u5236\u5B57\u6BB5\u7684\u5E03\u5C40\u4E0E\u5916\u89C2"),
64
- hidden: expressionC("bool", { form: "map<string, dyn>" }).optional().describe("\u4E3A true \u65F6\uFF0C\u9690\u85CF\u8FD9\u4E2A\u5B57\u6BB5"),
65
- disabled: expressionC("bool", { form: "map<string, dyn>" }).optional().describe("\u4E3A true \u65F6\uFF0C\u7981\u7528\u8FD9\u4E2A\u5B57\u6BB5"),
66
- validation: validationC
67
- });
68
- export const CalendarFieldC = z.object({
69
- type: z.literal("calendar").describe("\u65E5\u671F\u9009\u62E9\u5B57\u6BB5\uFF0C\u901A\u8FC7\u5F39\u51FA\u65E5\u5386\u9762\u677F\u9009\u62E9\u65E5\u671F"),
70
- path: dotPropC,
71
- title: localeC.describe("\u5B57\u6BB5\u6807\u7B7E\u7684\u672C\u5730\u5316\u663E\u793A\u6587\u672C"),
72
- icon: z.string().optional().describe("Iconify \u56FE\u6807\u6807\u8BC6\u7B26\uFF0C\u663E\u793A\u5728\u8F93\u5165\u6846\u5185\u4FA7"),
73
- style: z.string().optional().describe("CSS \u6837\u5F0F\u5BF9\u8C61\u8868\u8FBE\u5F0F\uFF0C\u63A7\u5236\u5B57\u6BB5\u7684\u5E03\u5C40\u4E0E\u5916\u89C2"),
74
- 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"),
75
- 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'),
76
- 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"'),
77
- 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"),
78
- hidden: expressionC("bool", { form: "map<string, dyn>" }).optional().describe("\u4E3A true \u65F6\uFF0C\u9690\u85CF\u8FD9\u4E2A\u5B57\u6BB5"),
79
- disabled: expressionC("bool", { form: "map<string, dyn>" }).optional().describe("\u4E3A true \u65F6\uFF0C\u7981\u7528\u8FD9\u4E2A\u5B57\u6BB5"),
80
- validation: validationC
81
- });
82
- export const FieldC = z.union([
83
- StringFieldC,
84
- NumberFieldC,
85
- SelectFieldC,
86
- CalendarFieldC
87
- ]);
88
- </script>
89
-
90
- <script setup>
22
+ import { Tooltip, TooltipContent, TooltipTrigger } from "../tooltip";
23
+ import { getLocalizedText } from "../../../utils/coders";
24
+ import { FieldC } from "./schema";
91
25
  const id = useId();
92
26
  const props = defineProps({
93
27
  orientation: { type: String, required: false, default: "horizontal" },
@@ -210,6 +144,18 @@ watchEffect(() => {
210
144
  });
211
145
  </script>
212
146
 
147
+ <script>
148
+ export {
149
+ CalendarFieldC,
150
+ FieldC,
151
+ NumberFieldC,
152
+ SelectFieldC,
153
+ StringFieldC,
154
+ ValidationRuleC,
155
+ validationC
156
+ } from "./schema";
157
+ </script>
158
+
213
159
  <template>
214
160
  <div
215
161
  :class="[