@shwfed/nuxt 0.11.32 → 0.11.34
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 +48 -0
- package/dist/runtime/components/fields.vue.d.ts +48 -0
- package/dist/runtime/components/ui/fields/Fields.d.vue.ts +96 -0
- package/dist/runtime/components/ui/fields/Fields.vue +32 -0
- package/dist/runtime/components/ui/fields/Fields.vue.d.ts +96 -0
- package/dist/runtime/components/ui/fields/schema.d.ts +175 -0
- package/dist/runtime/components/ui/fields/schema.js +19 -0
- package/dist/runtime/components/ui/fields-configurator/FieldsConfiguratorDialog.d.vue.ts +48 -0
- package/dist/runtime/components/ui/fields-configurator/FieldsConfiguratorDialog.vue +20 -9
- package/dist/runtime/components/ui/fields-configurator/FieldsConfiguratorDialog.vue.d.ts +48 -0
- package/dist/runtime/composables/useNavigationTabs.js +0 -32
- package/package.json +1 -1
package/dist/module.json
CHANGED
|
@@ -105,6 +105,30 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
105
105
|
expression: string;
|
|
106
106
|
message: string;
|
|
107
107
|
}>[] | undefined;
|
|
108
|
+
} | {
|
|
109
|
+
id: string;
|
|
110
|
+
type: "radio";
|
|
111
|
+
path: string;
|
|
112
|
+
title: readonly {
|
|
113
|
+
locale: "en" | "ja" | "ko" | "zh";
|
|
114
|
+
message: string;
|
|
115
|
+
}[];
|
|
116
|
+
options: string;
|
|
117
|
+
label: string;
|
|
118
|
+
value: string;
|
|
119
|
+
key: string;
|
|
120
|
+
labelStyle?: string | undefined;
|
|
121
|
+
contentStyle?: string | undefined;
|
|
122
|
+
required?: boolean | undefined;
|
|
123
|
+
icon?: string | undefined;
|
|
124
|
+
style?: string | undefined;
|
|
125
|
+
initialValue?: string | undefined;
|
|
126
|
+
hidden?: string | undefined;
|
|
127
|
+
disabled?: string | undefined;
|
|
128
|
+
validation?: readonly Readonly<{
|
|
129
|
+
expression: string;
|
|
130
|
+
message: string;
|
|
131
|
+
}>[] | undefined;
|
|
108
132
|
} | {
|
|
109
133
|
id: string;
|
|
110
134
|
type: "calendar";
|
|
@@ -269,6 +293,30 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
269
293
|
expression: string;
|
|
270
294
|
message: string;
|
|
271
295
|
}>[] | undefined;
|
|
296
|
+
} | {
|
|
297
|
+
id: string;
|
|
298
|
+
type: "radio";
|
|
299
|
+
path: string;
|
|
300
|
+
title: readonly {
|
|
301
|
+
locale: "en" | "ja" | "ko" | "zh";
|
|
302
|
+
message: string;
|
|
303
|
+
}[];
|
|
304
|
+
options: string;
|
|
305
|
+
label: string;
|
|
306
|
+
value: string;
|
|
307
|
+
key: string;
|
|
308
|
+
labelStyle?: string | undefined;
|
|
309
|
+
contentStyle?: string | undefined;
|
|
310
|
+
required?: boolean | undefined;
|
|
311
|
+
icon?: string | undefined;
|
|
312
|
+
style?: string | undefined;
|
|
313
|
+
initialValue?: string | undefined;
|
|
314
|
+
hidden?: string | undefined;
|
|
315
|
+
disabled?: string | undefined;
|
|
316
|
+
validation?: readonly Readonly<{
|
|
317
|
+
expression: string;
|
|
318
|
+
message: string;
|
|
319
|
+
}>[] | undefined;
|
|
272
320
|
} | {
|
|
273
321
|
id: string;
|
|
274
322
|
type: "calendar";
|
|
@@ -105,6 +105,30 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
105
105
|
expression: string;
|
|
106
106
|
message: string;
|
|
107
107
|
}>[] | undefined;
|
|
108
|
+
} | {
|
|
109
|
+
id: string;
|
|
110
|
+
type: "radio";
|
|
111
|
+
path: string;
|
|
112
|
+
title: readonly {
|
|
113
|
+
locale: "en" | "ja" | "ko" | "zh";
|
|
114
|
+
message: string;
|
|
115
|
+
}[];
|
|
116
|
+
options: string;
|
|
117
|
+
label: string;
|
|
118
|
+
value: string;
|
|
119
|
+
key: string;
|
|
120
|
+
labelStyle?: string | undefined;
|
|
121
|
+
contentStyle?: string | undefined;
|
|
122
|
+
required?: boolean | undefined;
|
|
123
|
+
icon?: string | undefined;
|
|
124
|
+
style?: string | undefined;
|
|
125
|
+
initialValue?: string | undefined;
|
|
126
|
+
hidden?: string | undefined;
|
|
127
|
+
disabled?: string | undefined;
|
|
128
|
+
validation?: readonly Readonly<{
|
|
129
|
+
expression: string;
|
|
130
|
+
message: string;
|
|
131
|
+
}>[] | undefined;
|
|
108
132
|
} | {
|
|
109
133
|
id: string;
|
|
110
134
|
type: "calendar";
|
|
@@ -269,6 +293,30 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
269
293
|
expression: string;
|
|
270
294
|
message: string;
|
|
271
295
|
}>[] | undefined;
|
|
296
|
+
} | {
|
|
297
|
+
id: string;
|
|
298
|
+
type: "radio";
|
|
299
|
+
path: string;
|
|
300
|
+
title: readonly {
|
|
301
|
+
locale: "en" | "ja" | "ko" | "zh";
|
|
302
|
+
message: string;
|
|
303
|
+
}[];
|
|
304
|
+
options: string;
|
|
305
|
+
label: string;
|
|
306
|
+
value: string;
|
|
307
|
+
key: string;
|
|
308
|
+
labelStyle?: string | undefined;
|
|
309
|
+
contentStyle?: string | undefined;
|
|
310
|
+
required?: boolean | undefined;
|
|
311
|
+
icon?: string | undefined;
|
|
312
|
+
style?: string | undefined;
|
|
313
|
+
initialValue?: string | undefined;
|
|
314
|
+
hidden?: string | undefined;
|
|
315
|
+
disabled?: string | undefined;
|
|
316
|
+
validation?: readonly Readonly<{
|
|
317
|
+
expression: string;
|
|
318
|
+
message: string;
|
|
319
|
+
}>[] | undefined;
|
|
272
320
|
} | {
|
|
273
321
|
id: string;
|
|
274
322
|
type: "calendar";
|
|
@@ -99,6 +99,30 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
99
99
|
expression: string;
|
|
100
100
|
message: string;
|
|
101
101
|
}>[] | undefined;
|
|
102
|
+
} | {
|
|
103
|
+
id: string;
|
|
104
|
+
type: "radio";
|
|
105
|
+
path: string;
|
|
106
|
+
title: readonly {
|
|
107
|
+
locale: "en" | "ja" | "ko" | "zh";
|
|
108
|
+
message: string;
|
|
109
|
+
}[];
|
|
110
|
+
options: string;
|
|
111
|
+
label: string;
|
|
112
|
+
value: string;
|
|
113
|
+
key: string;
|
|
114
|
+
labelStyle?: string | undefined;
|
|
115
|
+
contentStyle?: string | undefined;
|
|
116
|
+
required?: boolean | undefined;
|
|
117
|
+
icon?: string | undefined;
|
|
118
|
+
style?: string | undefined;
|
|
119
|
+
initialValue?: string | undefined;
|
|
120
|
+
hidden?: string | undefined;
|
|
121
|
+
disabled?: string | undefined;
|
|
122
|
+
validation?: readonly Readonly<{
|
|
123
|
+
expression: string;
|
|
124
|
+
message: string;
|
|
125
|
+
}>[] | undefined;
|
|
102
126
|
} | {
|
|
103
127
|
id: string;
|
|
104
128
|
type: "calendar";
|
|
@@ -262,6 +286,30 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
262
286
|
expression: string;
|
|
263
287
|
message: string;
|
|
264
288
|
}>[] | undefined;
|
|
289
|
+
} | {
|
|
290
|
+
id: string;
|
|
291
|
+
type: "radio";
|
|
292
|
+
path: string;
|
|
293
|
+
title: readonly {
|
|
294
|
+
locale: "en" | "ja" | "ko" | "zh";
|
|
295
|
+
message: string;
|
|
296
|
+
}[];
|
|
297
|
+
options: string;
|
|
298
|
+
label: string;
|
|
299
|
+
value: string;
|
|
300
|
+
key: string;
|
|
301
|
+
labelStyle?: string | undefined;
|
|
302
|
+
contentStyle?: string | undefined;
|
|
303
|
+
required?: boolean | undefined;
|
|
304
|
+
icon?: string | undefined;
|
|
305
|
+
style?: string | undefined;
|
|
306
|
+
initialValue?: string | undefined;
|
|
307
|
+
hidden?: string | undefined;
|
|
308
|
+
disabled?: string | undefined;
|
|
309
|
+
validation?: readonly Readonly<{
|
|
310
|
+
expression: string;
|
|
311
|
+
message: string;
|
|
312
|
+
}>[] | undefined;
|
|
265
313
|
} | {
|
|
266
314
|
id: string;
|
|
267
315
|
type: "calendar";
|
|
@@ -421,6 +469,30 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
421
469
|
expression: string;
|
|
422
470
|
message: string;
|
|
423
471
|
}>[] | undefined;
|
|
472
|
+
} | {
|
|
473
|
+
id: string;
|
|
474
|
+
type: "radio";
|
|
475
|
+
path: string;
|
|
476
|
+
title: readonly {
|
|
477
|
+
locale: "en" | "ja" | "ko" | "zh";
|
|
478
|
+
message: string;
|
|
479
|
+
}[];
|
|
480
|
+
options: string;
|
|
481
|
+
label: string;
|
|
482
|
+
value: string;
|
|
483
|
+
key: string;
|
|
484
|
+
labelStyle?: string | undefined;
|
|
485
|
+
contentStyle?: string | undefined;
|
|
486
|
+
required?: boolean | undefined;
|
|
487
|
+
icon?: string | undefined;
|
|
488
|
+
style?: string | undefined;
|
|
489
|
+
initialValue?: string | undefined;
|
|
490
|
+
hidden?: string | undefined;
|
|
491
|
+
disabled?: string | undefined;
|
|
492
|
+
validation?: readonly Readonly<{
|
|
493
|
+
expression: string;
|
|
494
|
+
message: string;
|
|
495
|
+
}>[] | undefined;
|
|
424
496
|
} | {
|
|
425
497
|
id: string;
|
|
426
498
|
type: "calendar";
|
|
@@ -582,6 +654,30 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
582
654
|
expression: string;
|
|
583
655
|
message: string;
|
|
584
656
|
}>[] | undefined;
|
|
657
|
+
} | {
|
|
658
|
+
id: string;
|
|
659
|
+
type: "radio";
|
|
660
|
+
path: string;
|
|
661
|
+
title: readonly {
|
|
662
|
+
locale: "en" | "ja" | "ko" | "zh";
|
|
663
|
+
message: string;
|
|
664
|
+
}[];
|
|
665
|
+
options: string;
|
|
666
|
+
label: string;
|
|
667
|
+
value: string;
|
|
668
|
+
key: string;
|
|
669
|
+
labelStyle?: string | undefined;
|
|
670
|
+
contentStyle?: string | undefined;
|
|
671
|
+
required?: boolean | undefined;
|
|
672
|
+
icon?: string | undefined;
|
|
673
|
+
style?: string | undefined;
|
|
674
|
+
initialValue?: string | undefined;
|
|
675
|
+
hidden?: string | undefined;
|
|
676
|
+
disabled?: string | undefined;
|
|
677
|
+
validation?: readonly Readonly<{
|
|
678
|
+
expression: string;
|
|
679
|
+
message: string;
|
|
680
|
+
}>[] | undefined;
|
|
585
681
|
} | {
|
|
586
682
|
id: string;
|
|
587
683
|
type: "calendar";
|
|
@@ -10,6 +10,7 @@ import { deleteProperty, getProperty, hasProperty, setProperty } from "dot-prop"
|
|
|
10
10
|
import { computed, nextTick, readonly, ref, toRaw, useId, watch, watchEffect } from "vue";
|
|
11
11
|
import { useI18n } from "vue-i18n";
|
|
12
12
|
import { useCheating } from "#imports";
|
|
13
|
+
import { RadioGroupIndicator, RadioGroupItem, RadioGroupRoot } from "reka-ui";
|
|
13
14
|
import { mergeDslContexts, useCELContext } from "../../../plugins/cel/context";
|
|
14
15
|
import { Calendar } from "../calendar";
|
|
15
16
|
import { Button } from "../button";
|
|
@@ -910,6 +911,37 @@ export {
|
|
|
910
911
|
</Popover>
|
|
911
912
|
</template>
|
|
912
913
|
|
|
914
|
+
<template v-else-if="field.type === 'radio'">
|
|
915
|
+
<RadioGroupRoot
|
|
916
|
+
v-for="radioState in [getSelectFieldState(field)]"
|
|
917
|
+
:key="`${field.id}:radio:${radioState.selectedKey ?? 'empty'}`"
|
|
918
|
+
:model-value="radioState.selectedKey"
|
|
919
|
+
:disabled="isFieldDisabled(field)"
|
|
920
|
+
:aria-invalid="isFieldInvalid(field) ? 'true' : void 0"
|
|
921
|
+
class="flex flex-wrap gap-x-4 gap-y-1.5"
|
|
922
|
+
@update:model-value="(value) => handleSelectValueChange(field, radioState, value)"
|
|
923
|
+
@focusout="validateField(field)"
|
|
924
|
+
>
|
|
925
|
+
<label
|
|
926
|
+
v-for="option in radioState.options"
|
|
927
|
+
:key="option.key"
|
|
928
|
+
class="flex items-center gap-1.5 text-sm cursor-pointer data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50"
|
|
929
|
+
:data-disabled="isFieldDisabled(field) ? 'true' : void 0"
|
|
930
|
+
>
|
|
931
|
+
<RadioGroupItem
|
|
932
|
+
:value="option.key"
|
|
933
|
+
data-slot="radio-group-item"
|
|
934
|
+
class="size-4 rounded-full border border-zinc-300 data-[state=checked]:border-(--primary) data-[state=checked]:bg-(--primary) focus:outline-none focus-visible:ring-1 focus-visible:ring-(--primary) focus-visible:ring-offset-1 disabled:cursor-not-allowed disabled:opacity-50 transition-colors"
|
|
935
|
+
>
|
|
936
|
+
<RadioGroupIndicator class="flex items-center justify-center">
|
|
937
|
+
<span class="size-1.5 rounded-full bg-white" />
|
|
938
|
+
</RadioGroupIndicator>
|
|
939
|
+
</RadioGroupItem>
|
|
940
|
+
{{ option.label }}
|
|
941
|
+
</label>
|
|
942
|
+
</RadioGroupRoot>
|
|
943
|
+
</template>
|
|
944
|
+
|
|
913
945
|
<InputGroup
|
|
914
946
|
v-else
|
|
915
947
|
:data-disabled="isFieldDisabled(field) ? 'true' : void 0"
|
|
@@ -99,6 +99,30 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
99
99
|
expression: string;
|
|
100
100
|
message: string;
|
|
101
101
|
}>[] | undefined;
|
|
102
|
+
} | {
|
|
103
|
+
id: string;
|
|
104
|
+
type: "radio";
|
|
105
|
+
path: string;
|
|
106
|
+
title: readonly {
|
|
107
|
+
locale: "en" | "ja" | "ko" | "zh";
|
|
108
|
+
message: string;
|
|
109
|
+
}[];
|
|
110
|
+
options: string;
|
|
111
|
+
label: string;
|
|
112
|
+
value: string;
|
|
113
|
+
key: string;
|
|
114
|
+
labelStyle?: string | undefined;
|
|
115
|
+
contentStyle?: string | undefined;
|
|
116
|
+
required?: boolean | undefined;
|
|
117
|
+
icon?: string | undefined;
|
|
118
|
+
style?: string | undefined;
|
|
119
|
+
initialValue?: string | undefined;
|
|
120
|
+
hidden?: string | undefined;
|
|
121
|
+
disabled?: string | undefined;
|
|
122
|
+
validation?: readonly Readonly<{
|
|
123
|
+
expression: string;
|
|
124
|
+
message: string;
|
|
125
|
+
}>[] | undefined;
|
|
102
126
|
} | {
|
|
103
127
|
id: string;
|
|
104
128
|
type: "calendar";
|
|
@@ -262,6 +286,30 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
262
286
|
expression: string;
|
|
263
287
|
message: string;
|
|
264
288
|
}>[] | undefined;
|
|
289
|
+
} | {
|
|
290
|
+
id: string;
|
|
291
|
+
type: "radio";
|
|
292
|
+
path: string;
|
|
293
|
+
title: readonly {
|
|
294
|
+
locale: "en" | "ja" | "ko" | "zh";
|
|
295
|
+
message: string;
|
|
296
|
+
}[];
|
|
297
|
+
options: string;
|
|
298
|
+
label: string;
|
|
299
|
+
value: string;
|
|
300
|
+
key: string;
|
|
301
|
+
labelStyle?: string | undefined;
|
|
302
|
+
contentStyle?: string | undefined;
|
|
303
|
+
required?: boolean | undefined;
|
|
304
|
+
icon?: string | undefined;
|
|
305
|
+
style?: string | undefined;
|
|
306
|
+
initialValue?: string | undefined;
|
|
307
|
+
hidden?: string | undefined;
|
|
308
|
+
disabled?: string | undefined;
|
|
309
|
+
validation?: readonly Readonly<{
|
|
310
|
+
expression: string;
|
|
311
|
+
message: string;
|
|
312
|
+
}>[] | undefined;
|
|
265
313
|
} | {
|
|
266
314
|
id: string;
|
|
267
315
|
type: "calendar";
|
|
@@ -421,6 +469,30 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
421
469
|
expression: string;
|
|
422
470
|
message: string;
|
|
423
471
|
}>[] | undefined;
|
|
472
|
+
} | {
|
|
473
|
+
id: string;
|
|
474
|
+
type: "radio";
|
|
475
|
+
path: string;
|
|
476
|
+
title: readonly {
|
|
477
|
+
locale: "en" | "ja" | "ko" | "zh";
|
|
478
|
+
message: string;
|
|
479
|
+
}[];
|
|
480
|
+
options: string;
|
|
481
|
+
label: string;
|
|
482
|
+
value: string;
|
|
483
|
+
key: string;
|
|
484
|
+
labelStyle?: string | undefined;
|
|
485
|
+
contentStyle?: string | undefined;
|
|
486
|
+
required?: boolean | undefined;
|
|
487
|
+
icon?: string | undefined;
|
|
488
|
+
style?: string | undefined;
|
|
489
|
+
initialValue?: string | undefined;
|
|
490
|
+
hidden?: string | undefined;
|
|
491
|
+
disabled?: string | undefined;
|
|
492
|
+
validation?: readonly Readonly<{
|
|
493
|
+
expression: string;
|
|
494
|
+
message: string;
|
|
495
|
+
}>[] | undefined;
|
|
424
496
|
} | {
|
|
425
497
|
id: string;
|
|
426
498
|
type: "calendar";
|
|
@@ -582,6 +654,30 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
582
654
|
expression: string;
|
|
583
655
|
message: string;
|
|
584
656
|
}>[] | undefined;
|
|
657
|
+
} | {
|
|
658
|
+
id: string;
|
|
659
|
+
type: "radio";
|
|
660
|
+
path: string;
|
|
661
|
+
title: readonly {
|
|
662
|
+
locale: "en" | "ja" | "ko" | "zh";
|
|
663
|
+
message: string;
|
|
664
|
+
}[];
|
|
665
|
+
options: string;
|
|
666
|
+
label: string;
|
|
667
|
+
value: string;
|
|
668
|
+
key: string;
|
|
669
|
+
labelStyle?: string | undefined;
|
|
670
|
+
contentStyle?: string | undefined;
|
|
671
|
+
required?: boolean | undefined;
|
|
672
|
+
icon?: string | undefined;
|
|
673
|
+
style?: string | undefined;
|
|
674
|
+
initialValue?: string | undefined;
|
|
675
|
+
hidden?: string | undefined;
|
|
676
|
+
disabled?: string | undefined;
|
|
677
|
+
validation?: readonly Readonly<{
|
|
678
|
+
expression: string;
|
|
679
|
+
message: string;
|
|
680
|
+
}>[] | undefined;
|
|
585
681
|
} | {
|
|
586
682
|
id: string;
|
|
587
683
|
type: "calendar";
|
|
@@ -125,6 +125,36 @@ export declare const SelectFieldC: z.ZodObject<{
|
|
|
125
125
|
message: z.ZodString;
|
|
126
126
|
}, z.core.$strip>>>>>;
|
|
127
127
|
}, z.core.$strip>;
|
|
128
|
+
export declare const RadioGroupFieldC: z.ZodObject<{
|
|
129
|
+
labelStyle: z.ZodOptional<z.ZodString>;
|
|
130
|
+
contentStyle: z.ZodOptional<z.ZodString>;
|
|
131
|
+
id: z.ZodUUID;
|
|
132
|
+
type: z.ZodLiteral<"radio">;
|
|
133
|
+
path: z.ZodString;
|
|
134
|
+
title: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
135
|
+
locale: z.ZodEnum<{
|
|
136
|
+
en: "en";
|
|
137
|
+
ja: "ja";
|
|
138
|
+
ko: "ko";
|
|
139
|
+
zh: "zh";
|
|
140
|
+
}>;
|
|
141
|
+
message: z.ZodString;
|
|
142
|
+
}, z.core.$strip>>>;
|
|
143
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
144
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
145
|
+
options: z.ZodString;
|
|
146
|
+
label: z.ZodString;
|
|
147
|
+
value: z.ZodString;
|
|
148
|
+
key: z.ZodString;
|
|
149
|
+
style: z.ZodOptional<z.ZodString>;
|
|
150
|
+
initialValue: z.ZodOptional<z.ZodString>;
|
|
151
|
+
hidden: z.ZodOptional<z.ZodString>;
|
|
152
|
+
disabled: z.ZodOptional<z.ZodString>;
|
|
153
|
+
validation: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
154
|
+
expression: z.ZodString;
|
|
155
|
+
message: z.ZodString;
|
|
156
|
+
}, z.core.$strip>>>>>;
|
|
157
|
+
}, z.core.$strip>;
|
|
128
158
|
export declare const CalendarFieldC: z.ZodObject<{
|
|
129
159
|
labelStyle: z.ZodOptional<z.ZodString>;
|
|
130
160
|
contentStyle: z.ZodOptional<z.ZodString>;
|
|
@@ -317,6 +347,35 @@ export declare const FieldC: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
317
347
|
expression: z.ZodString;
|
|
318
348
|
message: z.ZodString;
|
|
319
349
|
}, z.core.$strip>>>>>;
|
|
350
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
351
|
+
labelStyle: z.ZodOptional<z.ZodString>;
|
|
352
|
+
contentStyle: z.ZodOptional<z.ZodString>;
|
|
353
|
+
id: z.ZodUUID;
|
|
354
|
+
type: z.ZodLiteral<"radio">;
|
|
355
|
+
path: z.ZodString;
|
|
356
|
+
title: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
357
|
+
locale: z.ZodEnum<{
|
|
358
|
+
en: "en";
|
|
359
|
+
ja: "ja";
|
|
360
|
+
ko: "ko";
|
|
361
|
+
zh: "zh";
|
|
362
|
+
}>;
|
|
363
|
+
message: z.ZodString;
|
|
364
|
+
}, z.core.$strip>>>;
|
|
365
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
366
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
367
|
+
options: z.ZodString;
|
|
368
|
+
label: z.ZodString;
|
|
369
|
+
value: z.ZodString;
|
|
370
|
+
key: z.ZodString;
|
|
371
|
+
style: z.ZodOptional<z.ZodString>;
|
|
372
|
+
initialValue: z.ZodOptional<z.ZodString>;
|
|
373
|
+
hidden: z.ZodOptional<z.ZodString>;
|
|
374
|
+
disabled: z.ZodOptional<z.ZodString>;
|
|
375
|
+
validation: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
376
|
+
expression: z.ZodString;
|
|
377
|
+
message: z.ZodString;
|
|
378
|
+
}, z.core.$strip>>>>>;
|
|
320
379
|
}, z.core.$strip>, z.ZodObject<{
|
|
321
380
|
labelStyle: z.ZodOptional<z.ZodString>;
|
|
322
381
|
contentStyle: z.ZodOptional<z.ZodString>;
|
|
@@ -522,6 +581,35 @@ export declare const FieldsBodyC: z.ZodReadonly<z.ZodObject<{
|
|
|
522
581
|
expression: z.ZodString;
|
|
523
582
|
message: z.ZodString;
|
|
524
583
|
}, z.core.$strip>>>>>;
|
|
584
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
585
|
+
labelStyle: z.ZodOptional<z.ZodString>;
|
|
586
|
+
contentStyle: z.ZodOptional<z.ZodString>;
|
|
587
|
+
id: z.ZodUUID;
|
|
588
|
+
type: z.ZodLiteral<"radio">;
|
|
589
|
+
path: z.ZodString;
|
|
590
|
+
title: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
591
|
+
locale: z.ZodEnum<{
|
|
592
|
+
en: "en";
|
|
593
|
+
ja: "ja";
|
|
594
|
+
ko: "ko";
|
|
595
|
+
zh: "zh";
|
|
596
|
+
}>;
|
|
597
|
+
message: z.ZodString;
|
|
598
|
+
}, z.core.$strip>>>;
|
|
599
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
600
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
601
|
+
options: z.ZodString;
|
|
602
|
+
label: z.ZodString;
|
|
603
|
+
value: z.ZodString;
|
|
604
|
+
key: z.ZodString;
|
|
605
|
+
style: z.ZodOptional<z.ZodString>;
|
|
606
|
+
initialValue: z.ZodOptional<z.ZodString>;
|
|
607
|
+
hidden: z.ZodOptional<z.ZodString>;
|
|
608
|
+
disabled: z.ZodOptional<z.ZodString>;
|
|
609
|
+
validation: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
610
|
+
expression: z.ZodString;
|
|
611
|
+
message: z.ZodString;
|
|
612
|
+
}, z.core.$strip>>>>>;
|
|
525
613
|
}, z.core.$strip>, z.ZodObject<{
|
|
526
614
|
labelStyle: z.ZodOptional<z.ZodString>;
|
|
527
615
|
contentStyle: z.ZodOptional<z.ZodString>;
|
|
@@ -721,6 +809,35 @@ export declare const FieldsBodyInputC: z.ZodReadonly<z.ZodObject<{
|
|
|
721
809
|
expression: z.ZodString;
|
|
722
810
|
message: z.ZodString;
|
|
723
811
|
}, z.core.$strip>>>>>;
|
|
812
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
813
|
+
labelStyle: z.ZodOptional<z.ZodString>;
|
|
814
|
+
contentStyle: z.ZodOptional<z.ZodString>;
|
|
815
|
+
id: z.ZodUUID;
|
|
816
|
+
type: z.ZodLiteral<"radio">;
|
|
817
|
+
path: z.ZodString;
|
|
818
|
+
title: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
819
|
+
locale: z.ZodEnum<{
|
|
820
|
+
en: "en";
|
|
821
|
+
ja: "ja";
|
|
822
|
+
ko: "ko";
|
|
823
|
+
zh: "zh";
|
|
824
|
+
}>;
|
|
825
|
+
message: z.ZodString;
|
|
826
|
+
}, z.core.$strip>>>;
|
|
827
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
828
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
829
|
+
options: z.ZodString;
|
|
830
|
+
label: z.ZodString;
|
|
831
|
+
value: z.ZodString;
|
|
832
|
+
key: z.ZodString;
|
|
833
|
+
style: z.ZodOptional<z.ZodString>;
|
|
834
|
+
initialValue: z.ZodOptional<z.ZodString>;
|
|
835
|
+
hidden: z.ZodOptional<z.ZodString>;
|
|
836
|
+
disabled: z.ZodOptional<z.ZodString>;
|
|
837
|
+
validation: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
838
|
+
expression: z.ZodString;
|
|
839
|
+
message: z.ZodString;
|
|
840
|
+
}, z.core.$strip>>>>>;
|
|
724
841
|
}, z.core.$strip>, z.ZodObject<{
|
|
725
842
|
labelStyle: z.ZodOptional<z.ZodString>;
|
|
726
843
|
contentStyle: z.ZodOptional<z.ZodString>;
|
|
@@ -920,6 +1037,35 @@ export declare const FieldsConfigC: z.ZodReadonly<z.ZodObject<{
|
|
|
920
1037
|
expression: z.ZodString;
|
|
921
1038
|
message: z.ZodString;
|
|
922
1039
|
}, z.core.$strip>>>>>;
|
|
1040
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1041
|
+
labelStyle: z.ZodOptional<z.ZodString>;
|
|
1042
|
+
contentStyle: z.ZodOptional<z.ZodString>;
|
|
1043
|
+
id: z.ZodUUID;
|
|
1044
|
+
type: z.ZodLiteral<"radio">;
|
|
1045
|
+
path: z.ZodString;
|
|
1046
|
+
title: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
1047
|
+
locale: z.ZodEnum<{
|
|
1048
|
+
en: "en";
|
|
1049
|
+
ja: "ja";
|
|
1050
|
+
ko: "ko";
|
|
1051
|
+
zh: "zh";
|
|
1052
|
+
}>;
|
|
1053
|
+
message: z.ZodString;
|
|
1054
|
+
}, z.core.$strip>>>;
|
|
1055
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
1056
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
1057
|
+
options: z.ZodString;
|
|
1058
|
+
label: z.ZodString;
|
|
1059
|
+
value: z.ZodString;
|
|
1060
|
+
key: z.ZodString;
|
|
1061
|
+
style: z.ZodOptional<z.ZodString>;
|
|
1062
|
+
initialValue: z.ZodOptional<z.ZodString>;
|
|
1063
|
+
hidden: z.ZodOptional<z.ZodString>;
|
|
1064
|
+
disabled: z.ZodOptional<z.ZodString>;
|
|
1065
|
+
validation: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
1066
|
+
expression: z.ZodString;
|
|
1067
|
+
message: z.ZodString;
|
|
1068
|
+
}, z.core.$strip>>>>>;
|
|
923
1069
|
}, z.core.$strip>, z.ZodObject<{
|
|
924
1070
|
labelStyle: z.ZodOptional<z.ZodString>;
|
|
925
1071
|
contentStyle: z.ZodOptional<z.ZodString>;
|
|
@@ -1121,6 +1267,35 @@ export declare const FieldsConfigInputC: z.ZodReadonly<z.ZodObject<{
|
|
|
1121
1267
|
expression: z.ZodString;
|
|
1122
1268
|
message: z.ZodString;
|
|
1123
1269
|
}, z.core.$strip>>>>>;
|
|
1270
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1271
|
+
labelStyle: z.ZodOptional<z.ZodString>;
|
|
1272
|
+
contentStyle: z.ZodOptional<z.ZodString>;
|
|
1273
|
+
id: z.ZodUUID;
|
|
1274
|
+
type: z.ZodLiteral<"radio">;
|
|
1275
|
+
path: z.ZodString;
|
|
1276
|
+
title: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
1277
|
+
locale: z.ZodEnum<{
|
|
1278
|
+
en: "en";
|
|
1279
|
+
ja: "ja";
|
|
1280
|
+
ko: "ko";
|
|
1281
|
+
zh: "zh";
|
|
1282
|
+
}>;
|
|
1283
|
+
message: z.ZodString;
|
|
1284
|
+
}, z.core.$strip>>>;
|
|
1285
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
1286
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
1287
|
+
options: z.ZodString;
|
|
1288
|
+
label: z.ZodString;
|
|
1289
|
+
value: z.ZodString;
|
|
1290
|
+
key: z.ZodString;
|
|
1291
|
+
style: z.ZodOptional<z.ZodString>;
|
|
1292
|
+
initialValue: z.ZodOptional<z.ZodString>;
|
|
1293
|
+
hidden: z.ZodOptional<z.ZodString>;
|
|
1294
|
+
disabled: z.ZodOptional<z.ZodString>;
|
|
1295
|
+
validation: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
1296
|
+
expression: z.ZodString;
|
|
1297
|
+
message: z.ZodString;
|
|
1298
|
+
}, z.core.$strip>>>>>;
|
|
1124
1299
|
}, z.core.$strip>, z.ZodObject<{
|
|
1125
1300
|
labelStyle: z.ZodOptional<z.ZodString>;
|
|
1126
1301
|
contentStyle: z.ZodOptional<z.ZodString>;
|
|
@@ -87,6 +87,24 @@ export const SelectFieldC = z.object({
|
|
|
87
87
|
validation: validationC,
|
|
88
88
|
...fieldCellStyleShape
|
|
89
89
|
});
|
|
90
|
+
export const RadioGroupFieldC = z.object({
|
|
91
|
+
id: fieldIdC,
|
|
92
|
+
type: z.literal("radio").describe("\u5355\u9009\u6309\u94AE\u7EC4\u5B57\u6BB5\uFF0C\u4EE5 radio group \u5F62\u5F0F\u5448\u73B0\u9884\u5B9A\u4E49\u9009\u9879\uFF0C\u9009\u53D6\u4E00\u4E2A\u503C"),
|
|
93
|
+
path: dotPropC,
|
|
94
|
+
title: localeC.describe("\u5B57\u6BB5\u6807\u7B7E\u7684\u672C\u5730\u5316\u663E\u793A\u6587\u672C"),
|
|
95
|
+
required: z.boolean().optional().describe("\u4E3A true \u65F6\uFF0C\u4EC5\u5728\u5B57\u6BB5\u6807\u7B7E\u540E\u663E\u793A\u5FC5\u586B\u63D0\u793A\u661F\u53F7\uFF0C\u4E0D\u5F71\u54CD\u5B9E\u9645\u6821\u9A8C\u903B\u8F91"),
|
|
96
|
+
icon: z.string().optional().describe("Iconify \u56FE\u6807\u6807\u8BC6\u7B26\uFF08\u6682\u4E0D\u6E32\u67D3\uFF0C\u4EC5\u4FDD\u7559\u914D\u7F6E\u517C\u5BB9\u6027\uFF09"),
|
|
97
|
+
options: expressionC(/^list/).describe("\u5168\u90E8\u5019\u9009\u9879"),
|
|
98
|
+
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"),
|
|
99
|
+
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"),
|
|
100
|
+
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"),
|
|
101
|
+
style: z.string().optional().describe("CSS \u6837\u5F0F\u5BF9\u8C61\u8868\u8FBE\u5F0F\uFF0C\u63A7\u5236\u5B57\u6BB5\u7684\u5E03\u5C40\u4E0E\u5916\u89C2"),
|
|
102
|
+
initialValue: expressionC(/.+/, inheritedFieldContext).optional().describe("\u8FD4\u56DE\u4EFB\u610F\u503C\u7684 CEL \u8868\u8FBE\u5F0F\uFF0C\u5728\u5B57\u6BB5\u9996\u6B21\u521D\u59CB\u5316\u4E14 path \u4E0D\u5B58\u5728\u65F6\u5199\u5165\u521D\u59CB\u503C\uFF0C\u53EF\u4F7F\u7528 form\u3001row\u3001index \u548C id \u53D8\u91CF"),
|
|
103
|
+
hidden: expressionC(["bool", "dyn"], inheritedFieldContext).optional().describe("\u4E3A true \u65F6\uFF0C\u9690\u85CF\u8FD9\u4E2A\u5B57\u6BB5\uFF0C\u53EF\u4F7F\u7528 form\u3001row\u3001index \u548C id \u53D8\u91CF"),
|
|
104
|
+
disabled: expressionC(["bool", "dyn"], inheritedFieldContext).optional().describe("\u4E3A true \u65F6\uFF0C\u7981\u7528\u8FD9\u4E2A\u5B57\u6BB5\uFF0C\u53EF\u4F7F\u7528 form\u3001row\u3001index \u548C id \u53D8\u91CF"),
|
|
105
|
+
validation: validationC,
|
|
106
|
+
...fieldCellStyleShape
|
|
107
|
+
});
|
|
90
108
|
export const CalendarFieldC = z.object({
|
|
91
109
|
id: fieldIdC,
|
|
92
110
|
type: z.literal("calendar").describe("\u65E5\u671F\u9009\u62E9\u5B57\u6BB5\uFF0C\u901A\u8FC7\u5F39\u51FA\u65E5\u5386\u9762\u677F\u9009\u62E9\u65E5\u671F"),
|
|
@@ -137,6 +155,7 @@ export const FieldC = z.discriminatedUnion("type", [
|
|
|
137
155
|
TextareaFieldC,
|
|
138
156
|
NumberFieldC,
|
|
139
157
|
SelectFieldC,
|
|
158
|
+
RadioGroupFieldC,
|
|
140
159
|
CalendarFieldC,
|
|
141
160
|
UploadFieldC,
|
|
142
161
|
SlotFieldC,
|
|
@@ -100,6 +100,30 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
100
100
|
expression: string;
|
|
101
101
|
message: string;
|
|
102
102
|
}>[] | undefined;
|
|
103
|
+
} | {
|
|
104
|
+
id: string;
|
|
105
|
+
type: "radio";
|
|
106
|
+
path: string;
|
|
107
|
+
title: readonly {
|
|
108
|
+
locale: "en" | "ja" | "ko" | "zh";
|
|
109
|
+
message: string;
|
|
110
|
+
}[];
|
|
111
|
+
options: string;
|
|
112
|
+
label: string;
|
|
113
|
+
value: string;
|
|
114
|
+
key: string;
|
|
115
|
+
labelStyle?: string | undefined;
|
|
116
|
+
contentStyle?: string | undefined;
|
|
117
|
+
required?: boolean | undefined;
|
|
118
|
+
icon?: string | undefined;
|
|
119
|
+
style?: string | undefined;
|
|
120
|
+
initialValue?: string | undefined;
|
|
121
|
+
hidden?: string | undefined;
|
|
122
|
+
disabled?: string | undefined;
|
|
123
|
+
validation?: readonly Readonly<{
|
|
124
|
+
expression: string;
|
|
125
|
+
message: string;
|
|
126
|
+
}>[] | undefined;
|
|
103
127
|
} | {
|
|
104
128
|
id: string;
|
|
105
129
|
type: "calendar";
|
|
@@ -259,6 +283,30 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
259
283
|
expression: string;
|
|
260
284
|
message: string;
|
|
261
285
|
}>[] | undefined;
|
|
286
|
+
} | {
|
|
287
|
+
id: string;
|
|
288
|
+
type: "radio";
|
|
289
|
+
path: string;
|
|
290
|
+
title: readonly {
|
|
291
|
+
locale: "en" | "ja" | "ko" | "zh";
|
|
292
|
+
message: string;
|
|
293
|
+
}[];
|
|
294
|
+
options: string;
|
|
295
|
+
label: string;
|
|
296
|
+
value: string;
|
|
297
|
+
key: string;
|
|
298
|
+
labelStyle?: string | undefined;
|
|
299
|
+
contentStyle?: string | undefined;
|
|
300
|
+
required?: boolean | undefined;
|
|
301
|
+
icon?: string | undefined;
|
|
302
|
+
style?: string | undefined;
|
|
303
|
+
initialValue?: string | undefined;
|
|
304
|
+
hidden?: string | undefined;
|
|
305
|
+
disabled?: string | undefined;
|
|
306
|
+
validation?: readonly Readonly<{
|
|
307
|
+
expression: string;
|
|
308
|
+
message: string;
|
|
309
|
+
}>[] | undefined;
|
|
262
310
|
} | {
|
|
263
311
|
id: string;
|
|
264
312
|
type: "calendar";
|
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
FieldsConfigC,
|
|
13
13
|
FieldsStyleC,
|
|
14
14
|
NumberFieldC,
|
|
15
|
+
RadioGroupFieldC,
|
|
15
16
|
SelectFieldC,
|
|
16
17
|
SlotFieldC,
|
|
17
18
|
StringFieldC,
|
|
@@ -63,6 +64,7 @@ const fieldTypeOptions = computed(() => [
|
|
|
63
64
|
{ type: "textarea", label: t("field-type-textarea") },
|
|
64
65
|
{ type: "number", label: t("field-type-number") },
|
|
65
66
|
{ type: "select", label: t("field-type-select") },
|
|
67
|
+
{ type: "radio", label: t("field-type-radio") },
|
|
66
68
|
{ type: "calendar", label: t("field-type-calendar") },
|
|
67
69
|
{ type: "upload", label: t("field-type-upload") },
|
|
68
70
|
{ type: "empty", label: t("field-type-empty") },
|
|
@@ -252,6 +254,7 @@ function normalizeField(field) {
|
|
|
252
254
|
validation: normalizeValidationRules(field.validation)
|
|
253
255
|
};
|
|
254
256
|
case "select":
|
|
257
|
+
case "radio":
|
|
255
258
|
return {
|
|
256
259
|
...field,
|
|
257
260
|
path: field.path.trim(),
|
|
@@ -336,6 +339,7 @@ function createField(type) {
|
|
|
336
339
|
title
|
|
337
340
|
};
|
|
338
341
|
case "select":
|
|
342
|
+
case "radio":
|
|
339
343
|
return {
|
|
340
344
|
id,
|
|
341
345
|
type,
|
|
@@ -725,12 +729,12 @@ function updateSelectedNumberStep(value) {
|
|
|
725
729
|
}
|
|
726
730
|
function updateSelectedSelectOptions(value) {
|
|
727
731
|
const selected = selectedField.value;
|
|
728
|
-
if (!selected || selected.field.type !== "select") {
|
|
732
|
+
if (!selected || selected.field.type !== "select" && selected.field.type !== "radio") {
|
|
729
733
|
return;
|
|
730
734
|
}
|
|
731
735
|
clearFieldError(selected.draftId, "options");
|
|
732
736
|
updateDraftField(selected.draftId, (field) => {
|
|
733
|
-
if (field.type !== "select") {
|
|
737
|
+
if (field.type !== "select" && field.type !== "radio") {
|
|
734
738
|
return field;
|
|
735
739
|
}
|
|
736
740
|
return {
|
|
@@ -741,12 +745,12 @@ function updateSelectedSelectOptions(value) {
|
|
|
741
745
|
}
|
|
742
746
|
function updateSelectedSelectLabel(value) {
|
|
743
747
|
const selected = selectedField.value;
|
|
744
|
-
if (!selected || selected.field.type !== "select") {
|
|
748
|
+
if (!selected || selected.field.type !== "select" && selected.field.type !== "radio") {
|
|
745
749
|
return;
|
|
746
750
|
}
|
|
747
751
|
clearFieldError(selected.draftId, "label");
|
|
748
752
|
updateDraftField(selected.draftId, (field) => {
|
|
749
|
-
if (field.type !== "select") {
|
|
753
|
+
if (field.type !== "select" && field.type !== "radio") {
|
|
750
754
|
return field;
|
|
751
755
|
}
|
|
752
756
|
return {
|
|
@@ -757,12 +761,12 @@ function updateSelectedSelectLabel(value) {
|
|
|
757
761
|
}
|
|
758
762
|
function updateSelectedSelectValue(value) {
|
|
759
763
|
const selected = selectedField.value;
|
|
760
|
-
if (!selected || selected.field.type !== "select") {
|
|
764
|
+
if (!selected || selected.field.type !== "select" && selected.field.type !== "radio") {
|
|
761
765
|
return;
|
|
762
766
|
}
|
|
763
767
|
clearFieldError(selected.draftId, "value");
|
|
764
768
|
updateDraftField(selected.draftId, (field) => {
|
|
765
|
-
if (field.type !== "select") {
|
|
769
|
+
if (field.type !== "select" && field.type !== "radio") {
|
|
766
770
|
return field;
|
|
767
771
|
}
|
|
768
772
|
return {
|
|
@@ -773,12 +777,12 @@ function updateSelectedSelectValue(value) {
|
|
|
773
777
|
}
|
|
774
778
|
function updateSelectedSelectKey(value) {
|
|
775
779
|
const selected = selectedField.value;
|
|
776
|
-
if (!selected || selected.field.type !== "select") {
|
|
780
|
+
if (!selected || selected.field.type !== "select" && selected.field.type !== "radio") {
|
|
777
781
|
return;
|
|
778
782
|
}
|
|
779
783
|
clearFieldError(selected.draftId, "key");
|
|
780
784
|
updateDraftField(selected.draftId, (field) => {
|
|
781
|
-
if (field.type !== "select") {
|
|
785
|
+
if (field.type !== "select" && field.type !== "radio") {
|
|
782
786
|
return field;
|
|
783
787
|
}
|
|
784
788
|
return {
|
|
@@ -1057,6 +1061,10 @@ function getSchemaIssues(field) {
|
|
|
1057
1061
|
const result = SelectFieldC.safeParse(field);
|
|
1058
1062
|
return result.success ? [] : result.error.issues;
|
|
1059
1063
|
}
|
|
1064
|
+
case "radio": {
|
|
1065
|
+
const result = RadioGroupFieldC.safeParse(field);
|
|
1066
|
+
return result.success ? [] : result.error.issues;
|
|
1067
|
+
}
|
|
1060
1068
|
case "calendar": {
|
|
1061
1069
|
const result = CalendarFieldC.safeParse(field);
|
|
1062
1070
|
return result.success ? [] : result.error.issues;
|
|
@@ -2051,7 +2059,7 @@ function confirmChanges() {
|
|
|
2051
2059
|
</section>
|
|
2052
2060
|
|
|
2053
2061
|
<section
|
|
2054
|
-
v-if="selectedField.field.type === 'select'"
|
|
2062
|
+
v-if="selectedField.field.type === 'select' || selectedField.field.type === 'radio'"
|
|
2055
2063
|
data-slot="fields-configurator-select-options"
|
|
2056
2064
|
class="grid gap-4 md:grid-cols-2"
|
|
2057
2065
|
>
|
|
@@ -2508,6 +2516,7 @@ function confirmChanges() {
|
|
|
2508
2516
|
"field-type-textarea": "多行文本",
|
|
2509
2517
|
"field-type-number": "数字",
|
|
2510
2518
|
"field-type-select": "选择",
|
|
2519
|
+
"field-type-radio": "单选按钮组",
|
|
2511
2520
|
"field-type-calendar": "日期",
|
|
2512
2521
|
"field-type-upload": "上传",
|
|
2513
2522
|
"field-type-empty": "空白",
|
|
@@ -2624,6 +2633,7 @@ function confirmChanges() {
|
|
|
2624
2633
|
"field-type-textarea": "複数行テキスト",
|
|
2625
2634
|
"field-type-number": "数値",
|
|
2626
2635
|
"field-type-select": "選択",
|
|
2636
|
+
"field-type-radio": "ラジオグループ",
|
|
2627
2637
|
"field-type-calendar": "日付",
|
|
2628
2638
|
"field-type-upload": "アップロード",
|
|
2629
2639
|
"field-type-empty": "空白",
|
|
@@ -2740,6 +2750,7 @@ function confirmChanges() {
|
|
|
2740
2750
|
"field-type-textarea": "Textarea",
|
|
2741
2751
|
"field-type-number": "Number",
|
|
2742
2752
|
"field-type-select": "Select",
|
|
2753
|
+
"field-type-radio": "Radio Group",
|
|
2743
2754
|
"field-type-calendar": "Date",
|
|
2744
2755
|
"field-type-upload": "Upload",
|
|
2745
2756
|
"field-type-empty": "Empty",
|
|
@@ -100,6 +100,30 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
100
100
|
expression: string;
|
|
101
101
|
message: string;
|
|
102
102
|
}>[] | undefined;
|
|
103
|
+
} | {
|
|
104
|
+
id: string;
|
|
105
|
+
type: "radio";
|
|
106
|
+
path: string;
|
|
107
|
+
title: readonly {
|
|
108
|
+
locale: "en" | "ja" | "ko" | "zh";
|
|
109
|
+
message: string;
|
|
110
|
+
}[];
|
|
111
|
+
options: string;
|
|
112
|
+
label: string;
|
|
113
|
+
value: string;
|
|
114
|
+
key: string;
|
|
115
|
+
labelStyle?: string | undefined;
|
|
116
|
+
contentStyle?: string | undefined;
|
|
117
|
+
required?: boolean | undefined;
|
|
118
|
+
icon?: string | undefined;
|
|
119
|
+
style?: string | undefined;
|
|
120
|
+
initialValue?: string | undefined;
|
|
121
|
+
hidden?: string | undefined;
|
|
122
|
+
disabled?: string | undefined;
|
|
123
|
+
validation?: readonly Readonly<{
|
|
124
|
+
expression: string;
|
|
125
|
+
message: string;
|
|
126
|
+
}>[] | undefined;
|
|
103
127
|
} | {
|
|
104
128
|
id: string;
|
|
105
129
|
type: "calendar";
|
|
@@ -259,6 +283,30 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
259
283
|
expression: string;
|
|
260
284
|
message: string;
|
|
261
285
|
}>[] | undefined;
|
|
286
|
+
} | {
|
|
287
|
+
id: string;
|
|
288
|
+
type: "radio";
|
|
289
|
+
path: string;
|
|
290
|
+
title: readonly {
|
|
291
|
+
locale: "en" | "ja" | "ko" | "zh";
|
|
292
|
+
message: string;
|
|
293
|
+
}[];
|
|
294
|
+
options: string;
|
|
295
|
+
label: string;
|
|
296
|
+
value: string;
|
|
297
|
+
key: string;
|
|
298
|
+
labelStyle?: string | undefined;
|
|
299
|
+
contentStyle?: string | undefined;
|
|
300
|
+
required?: boolean | undefined;
|
|
301
|
+
icon?: string | undefined;
|
|
302
|
+
style?: string | undefined;
|
|
303
|
+
initialValue?: string | undefined;
|
|
304
|
+
hidden?: string | undefined;
|
|
305
|
+
disabled?: string | undefined;
|
|
306
|
+
validation?: readonly Readonly<{
|
|
307
|
+
expression: string;
|
|
308
|
+
message: string;
|
|
309
|
+
}>[] | undefined;
|
|
262
310
|
} | {
|
|
263
311
|
id: string;
|
|
264
312
|
type: "calendar";
|
|
@@ -11,40 +11,8 @@ export function useNavigationTabs(navigations) {
|
|
|
11
11
|
const clean = (path) => path.replace(/\/$/g, "");
|
|
12
12
|
const route = useRoute();
|
|
13
13
|
const router = useRouter();
|
|
14
|
-
const has = (raw) => {
|
|
15
|
-
const path = clean(raw);
|
|
16
|
-
for (const group of toValue(navigations)) {
|
|
17
|
-
if ("children" in group) {
|
|
18
|
-
for (const item of group.children) {
|
|
19
|
-
if (item.route === path) {
|
|
20
|
-
return true;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
} else {
|
|
24
|
-
if (group.route === path) {
|
|
25
|
-
return true;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
14
|
onMounted(() => {
|
|
31
15
|
const path = clean(route.path);
|
|
32
|
-
if (!has(path)) {
|
|
33
|
-
const [first] = Array.from(tabs.value);
|
|
34
|
-
if (first) {
|
|
35
|
-
active.value = first;
|
|
36
|
-
router.replace(first);
|
|
37
|
-
return;
|
|
38
|
-
}
|
|
39
|
-
const nav = toValue(navigations)[0];
|
|
40
|
-
const fallback = nav && "children" in nav ? nav.children[0]?.route : nav?.route;
|
|
41
|
-
if (fallback) {
|
|
42
|
-
router.replace(fallback);
|
|
43
|
-
active.value = fallback;
|
|
44
|
-
tabs.value.add(fallback);
|
|
45
|
-
}
|
|
46
|
-
return;
|
|
47
|
-
}
|
|
48
16
|
if (!tabs.value.has(path))
|
|
49
17
|
tabs.value.add(path);
|
|
50
18
|
active.value = path;
|