@shwfed/nuxt 0.11.47 → 0.11.49
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/module.mjs +40 -1
- package/dist/runtime/components/fields.d.vue.ts +6 -850
- package/dist/runtime/components/fields.vue +2 -0
- package/dist/runtime/components/fields.vue.d.ts +6 -850
- package/dist/runtime/components/ui/fields/Fields.d.vue.ts +10 -1698
- package/dist/runtime/components/ui/fields/Fields.vue +162 -627
- package/dist/runtime/components/ui/fields/Fields.vue.d.ts +10 -1698
- package/dist/runtime/components/ui/fields/FieldsBody.d.vue.ts +17 -0
- package/dist/runtime/components/ui/fields/FieldsBody.vue +720 -0
- package/dist/runtime/components/ui/fields/FieldsBody.vue.d.ts +17 -0
- package/dist/runtime/components/ui/fields/render-context.d.ts +120 -0
- package/dist/runtime/components/ui/fields/render-context.js +0 -0
- package/dist/runtime/components/ui/fields/schema.d.ts +134 -5606
- package/dist/runtime/components/ui/fields/schema.js +80 -83
- package/dist/runtime/components/ui/fields-configurator/FieldsConfiguratorDialog.d.vue.ts +5 -849
- package/dist/runtime/components/ui/fields-configurator/FieldsConfiguratorDialog.vue +618 -224
- package/dist/runtime/components/ui/fields-configurator/FieldsConfiguratorDialog.vue.d.ts +5 -849
- package/package.json +8 -1
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { FieldsRenderContext, FieldsRenderableBody } from './render-context.js';
|
|
2
|
+
import type { FieldsSlotProps } from './slot-props.js';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
body: FieldsRenderableBody;
|
|
5
|
+
renderer: FieldsRenderContext;
|
|
6
|
+
applyStyle?: boolean;
|
|
7
|
+
};
|
|
8
|
+
type __VLS_Slots = Record<string, (_props?: FieldsSlotProps) => unknown>;
|
|
9
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
11
|
+
declare const _default: typeof __VLS_export;
|
|
12
|
+
export default _default;
|
|
13
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
14
|
+
new (): {
|
|
15
|
+
$slots: S;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import type { Effect } from 'effect';
|
|
2
|
+
import type { CSSProperties } from 'vue';
|
|
3
|
+
import type { DateValue } from 'reka-ui';
|
|
4
|
+
import type { ContainerField, EmptyField, Field, FieldGroup, FieldsConfig, MarkdownBodyField, MarkdownField, SlotField, UploadField } from './schema.js';
|
|
5
|
+
export type FieldsRenderableBody = Readonly<{
|
|
6
|
+
orientation?: FieldsConfig['orientation'];
|
|
7
|
+
bordered?: boolean;
|
|
8
|
+
style?: FieldsConfig['style'];
|
|
9
|
+
fields: ReadonlyArray<Field>;
|
|
10
|
+
groups?: ReadonlyArray<FieldGroup>;
|
|
11
|
+
}>;
|
|
12
|
+
export type PassiveField = SlotField | EmptyField;
|
|
13
|
+
export type DisplayField = MarkdownField | MarkdownBodyField;
|
|
14
|
+
export type InteractiveField = Exclude<Field, PassiveField | DisplayField | ContainerField>;
|
|
15
|
+
export type DisplayLabelField = MarkdownField | SlotField | ContainerField;
|
|
16
|
+
export type HiddenField = Exclude<Field, EmptyField>;
|
|
17
|
+
export type LabelField = Exclude<Field, EmptyField | MarkdownBodyField>;
|
|
18
|
+
export type CellStyledField = Exclude<Field, EmptyField | MarkdownBodyField>;
|
|
19
|
+
export type SelectOption = Readonly<{
|
|
20
|
+
key: string;
|
|
21
|
+
label: string;
|
|
22
|
+
value: unknown;
|
|
23
|
+
}>;
|
|
24
|
+
export type SelectFieldState = Readonly<{
|
|
25
|
+
options: Array<SelectOption>;
|
|
26
|
+
selectedKey?: string;
|
|
27
|
+
}>;
|
|
28
|
+
export type ConfigEntry = Readonly<{
|
|
29
|
+
key: string;
|
|
30
|
+
group?: FieldGroup;
|
|
31
|
+
field?: Field;
|
|
32
|
+
}>;
|
|
33
|
+
export type StyledField = Readonly<{
|
|
34
|
+
style?: string;
|
|
35
|
+
}>;
|
|
36
|
+
export type FieldsRenderContext = Readonly<{
|
|
37
|
+
id: string;
|
|
38
|
+
isCheating: boolean;
|
|
39
|
+
modelValue: Record<string, unknown>;
|
|
40
|
+
slotForm: Readonly<Record<string, unknown>>;
|
|
41
|
+
valid: Effect.Effect<boolean, never>;
|
|
42
|
+
calendarOpen: Record<string, boolean>;
|
|
43
|
+
selectOpen: Record<string, boolean>;
|
|
44
|
+
templateDownloading: Record<string, boolean>;
|
|
45
|
+
getBodyEntries: (body: FieldsRenderableBody) => Array<ConfigEntry>;
|
|
46
|
+
getBodyOrientation: (body: FieldsRenderableBody) => 'horizontal' | 'vertical' | 'floating' | 'contents';
|
|
47
|
+
isBodyBordered: (body: FieldsRenderableBody) => boolean;
|
|
48
|
+
getBodyStyle: (body: FieldsRenderableBody) => CSSProperties;
|
|
49
|
+
getGroupStyle: (group: FieldGroup, body: FieldsRenderableBody) => CSSProperties;
|
|
50
|
+
getFieldStyle: (field: StyledField) => CSSProperties;
|
|
51
|
+
getFieldContainerStyle: (field: Field, body: FieldsRenderableBody) => CSSProperties;
|
|
52
|
+
getFieldLabelStyle: (field: CellStyledField, body: FieldsRenderableBody) => CSSProperties;
|
|
53
|
+
getFieldContentStyle: (field: CellStyledField, body: FieldsRenderableBody) => CSSProperties;
|
|
54
|
+
getMarkdownBodyContentStyle: (field: MarkdownBodyField, body: FieldsRenderableBody) => CSSProperties;
|
|
55
|
+
isInteractiveField: (field: Field) => field is InteractiveField;
|
|
56
|
+
isFieldLabelHidden: (field: LabelField) => boolean;
|
|
57
|
+
isFieldHidden: (field: HiddenField) => boolean;
|
|
58
|
+
isFieldDisabled: (field: InteractiveField) => boolean;
|
|
59
|
+
isFieldInvalid: (field: InteractiveField) => boolean;
|
|
60
|
+
getFieldLabel: (field: InteractiveField) => string;
|
|
61
|
+
getDisplayFieldLabel: (field: DisplayLabelField) => string;
|
|
62
|
+
isFieldRequired: (field: InteractiveField | SlotField | ContainerField) => boolean;
|
|
63
|
+
renderValidationMessage: (field: InteractiveField) => string;
|
|
64
|
+
renderMarkdownField: (field: MarkdownField) => string;
|
|
65
|
+
renderMarkdownBodyField: (field: MarkdownBodyField) => string;
|
|
66
|
+
toCalendarDateValue: (value: unknown, valueFormat: string) => DateValue | undefined;
|
|
67
|
+
displayCalendarValue: (stored: unknown, displayFormat: string | null | undefined, valueFormat: string) => unknown;
|
|
68
|
+
isCalendarDateDisabled: (field: Extract<InteractiveField, {
|
|
69
|
+
type: 'calendar';
|
|
70
|
+
}>, date: DateValue) => boolean;
|
|
71
|
+
handleCalendarOpenChange: (field: Extract<InteractiveField, {
|
|
72
|
+
type: 'calendar';
|
|
73
|
+
}>, open: boolean) => void;
|
|
74
|
+
handleCalendarBlur: (field: Extract<InteractiveField, {
|
|
75
|
+
type: 'calendar';
|
|
76
|
+
}>) => void;
|
|
77
|
+
validateField: (field: InteractiveField) => void;
|
|
78
|
+
getFieldMaxLength: (field: Extract<InteractiveField, {
|
|
79
|
+
type: 'string' | 'textarea';
|
|
80
|
+
}>) => number | undefined;
|
|
81
|
+
getNumberFieldMin: (field: Extract<InteractiveField, {
|
|
82
|
+
type: 'number';
|
|
83
|
+
}>) => number | undefined;
|
|
84
|
+
getNumberFieldMax: (field: Extract<InteractiveField, {
|
|
85
|
+
type: 'number';
|
|
86
|
+
}>) => number | undefined;
|
|
87
|
+
getNumberFieldStep: (field: Extract<InteractiveField, {
|
|
88
|
+
type: 'number';
|
|
89
|
+
}>) => number | undefined;
|
|
90
|
+
getSelectFieldState: (field: Extract<InteractiveField, {
|
|
91
|
+
type: 'select' | 'radio';
|
|
92
|
+
}>) => SelectFieldState;
|
|
93
|
+
getSelectDisplayValue: (state: SelectFieldState, value: unknown) => string;
|
|
94
|
+
handleSelectValueChange: (field: Extract<InteractiveField, {
|
|
95
|
+
type: 'select' | 'radio';
|
|
96
|
+
}>, state: SelectFieldState, value: unknown) => void;
|
|
97
|
+
handleSelectOpenChange: (field: Extract<InteractiveField, {
|
|
98
|
+
type: 'select';
|
|
99
|
+
}>, open: boolean) => void;
|
|
100
|
+
handleSelectBlur: (field: Extract<InteractiveField, {
|
|
101
|
+
type: 'select';
|
|
102
|
+
}>) => void;
|
|
103
|
+
handleSelectCommandValueChange: (field: Extract<InteractiveField, {
|
|
104
|
+
type: 'select';
|
|
105
|
+
}>, state: SelectFieldState, value: unknown) => void;
|
|
106
|
+
clearSelectField: (field: Extract<InteractiveField, {
|
|
107
|
+
type: 'select' | 'radio';
|
|
108
|
+
}>) => void;
|
|
109
|
+
getUploadTemplateIcon: (field: UploadField) => string;
|
|
110
|
+
getUploadAcceptString: (field: UploadField) => string | undefined;
|
|
111
|
+
getUploadDescription: (field: UploadField) => string;
|
|
112
|
+
getUploadMaxCount: (field: UploadField) => number;
|
|
113
|
+
getUploadFiles: (field: UploadField) => Array<File>;
|
|
114
|
+
handleUploadInputChange: (field: UploadField, event: Event) => void;
|
|
115
|
+
handleUploadDrop: (field: UploadField, event: DragEvent) => void;
|
|
116
|
+
handleUploadDragOver: (event: DragEvent) => void;
|
|
117
|
+
handleTemplateDownload: (field: UploadField) => Promise<void>;
|
|
118
|
+
getFileIcon: (filename: string) => string;
|
|
119
|
+
removeUploadFile: (field: UploadField, index: number) => void;
|
|
120
|
+
}>;
|
|
File without changes
|