@vunk/form 0.0.0-alpha.3 → 0.0.0-alpha.7
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/components/date-picker/index.d.ts +4 -0
- package/components/date-picker/index.js +81 -0
- package/components/date-picker/src/ctx.d.ts +163 -0
- package/components/date-picker/src/index.vue.d.ts +407 -0
- package/components/date-picker/src/types.d.ts +14 -0
- package/components/form/index.js +16 -1
- package/components/ground/index.css +6 -3
- package/components/ground/index.js +50 -22
- package/components/ground/src/ground-main/src/index.vue.d.ts +5 -1
- package/components/ground/src/ground-widget/src/form-item-widget/src/index.vue.d.ts +594 -0
- package/components/ground/src/index.vue.d.ts +30 -5
- package/components/select/index.js +20 -6
- package/components/select/src/ctx.d.ts +5 -0
- package/components/select/src/index.vue.d.ts +9 -0
- package/components/select/src/types.d.ts +5 -3
- package/full-entry/main.d.ts +1 -1
- package/index.css +6 -3
- package/index.d.ts +11 -9
- package/index.esm.js +1 -1
- package/package.json +1 -1
- package/shared/element-plus/ctx/index.d.ts +2 -0
- package/shared/element-plus/ctx/index.js +22 -2
- package/shared/element-plus/instances/date-picker.d.ts +126 -0
- package/shared/element-plus/instances/date-picker.js +21 -0
- package/shared/types/form-item/date-picker.d.ts +8 -0
- package/shared/types/form-item/date-picker.js +1 -0
- package/shared/types/form-item/index.d.ts +1 -0
- package/shared/types/index.d.ts +2 -2
- package/shared/types/shared/index.d.ts +4 -0
- package/types/components/date-picker/index.d.ts +4 -0
- package/types/components/date-picker/src/ctx.d.ts +163 -0
- package/types/components/date-picker/src/index.vue.d.ts +407 -0
- package/types/components/date-picker/src/types.d.ts +14 -0
- package/types/components/ground/src/ground-main/src/index.vue.d.ts +5 -1
- package/types/components/ground/src/ground-widget/src/form-item-widget/src/index.vue.d.ts +594 -0
- package/types/components/ground/src/index.vue.d.ts +30 -5
- package/types/components/select/src/ctx.d.ts +5 -0
- package/types/components/select/src/index.vue.d.ts +9 -0
- package/types/components/select/src/types.d.ts +5 -3
- package/types/full-entry/main.d.ts +1 -1
- package/types/shared/element-plus/ctx/index.d.ts +2 -0
- package/types/shared/element-plus/instances/date-picker.d.ts +126 -0
- package/types/shared/types/form-item/date-picker.d.ts +8 -0
- package/types/shared/types/form-item/index.d.ts +1 -0
- package/types/shared/types/index.d.ts +2 -2
- package/types/shared/types/shared/index.d.ts +4 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PropType
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
2
|
import { SetDataEvent } from '@vunk/form/shared/types';
|
|
3
3
|
import { FormItemRendererSource } from '@vunk/form/shared/types';
|
|
4
4
|
import { VkfInputSource } from '@vunk/form/shared/types/form-item';
|
|
@@ -7,10 +7,17 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
7
7
|
type: PropType<any[]>;
|
|
8
8
|
default: undefined;
|
|
9
9
|
};
|
|
10
|
+
source: {
|
|
11
|
+
type: PropType<any[]>;
|
|
12
|
+
default: () => never[];
|
|
13
|
+
};
|
|
14
|
+
data: {
|
|
15
|
+
type: PropType<Record<string, any>>;
|
|
16
|
+
default: () => {};
|
|
17
|
+
};
|
|
10
18
|
}, {
|
|
11
|
-
propToFormItem: import("vue").ComputedRef<
|
|
12
|
-
|
|
13
|
-
editProp: Ref<string>;
|
|
19
|
+
propToFormItem: import("vue").ComputedRef<any>;
|
|
20
|
+
editProp: import("vue").Ref<string>;
|
|
14
21
|
setData: (obj: any, e: {
|
|
15
22
|
k: any;
|
|
16
23
|
v: any;
|
|
@@ -21,19 +28,37 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
21
28
|
n?: number | undefined;
|
|
22
29
|
}) => void;
|
|
23
30
|
setFormItem: (props: FormItemRendererSource, e: SetDataEvent<keyof VkfInputSource>) => void;
|
|
24
|
-
configPropDisabled: Ref<boolean>;
|
|
31
|
+
configPropDisabled: import("vue").Ref<boolean>;
|
|
25
32
|
formItemClip: import("@vueuse/core").ClipboardReturn<true>;
|
|
26
33
|
inputJson: () => void;
|
|
27
34
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
35
|
+
'update:source': null;
|
|
36
|
+
'setData:source': (e: SetDataEvent) => SetDataEvent<any>;
|
|
37
|
+
'unsetData:source': null;
|
|
38
|
+
setData: (e: SetDataEvent) => SetDataEvent<any>;
|
|
28
39
|
'update:componentLibCollapseExpanded': null;
|
|
29
40
|
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
30
41
|
componentLibCollapseExpanded: {
|
|
31
42
|
type: PropType<any[]>;
|
|
32
43
|
default: undefined;
|
|
33
44
|
};
|
|
45
|
+
source: {
|
|
46
|
+
type: PropType<any[]>;
|
|
47
|
+
default: () => never[];
|
|
48
|
+
};
|
|
49
|
+
data: {
|
|
50
|
+
type: PropType<Record<string, any>>;
|
|
51
|
+
default: () => {};
|
|
52
|
+
};
|
|
34
53
|
}>> & {
|
|
54
|
+
onSetData?: ((e: SetDataEvent<any>) => any) | undefined;
|
|
55
|
+
"onSetData:source"?: ((e: SetDataEvent<any>) => any) | undefined;
|
|
35
56
|
"onUpdate:componentLibCollapseExpanded"?: ((...args: any[]) => any) | undefined;
|
|
57
|
+
"onUpdate:source"?: ((...args: any[]) => any) | undefined;
|
|
58
|
+
"onUnsetData:source"?: ((...args: any[]) => any) | undefined;
|
|
36
59
|
}, {
|
|
60
|
+
data: Record<string, any>;
|
|
61
|
+
source: any[];
|
|
37
62
|
componentLibCollapseExpanded: any[];
|
|
38
63
|
}>;
|
|
39
64
|
export default _default;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { VueComponentPropsType } from 'vunk/shared/types';
|
|
2
2
|
import { PropType } from 'vue';
|
|
3
|
+
import { SelectSlots } from './types';
|
|
3
4
|
export declare const props: {
|
|
4
5
|
options: {
|
|
5
6
|
type: PropType<VueComponentPropsType<import("element-plus/es/utils").SFCWithInstall<import("vue").DefineComponent<{
|
|
@@ -64,6 +65,10 @@ export declare const props: {
|
|
|
64
65
|
}>>>[]>;
|
|
65
66
|
default: () => never[];
|
|
66
67
|
};
|
|
68
|
+
selectSlots: {
|
|
69
|
+
type: PropType<SelectSlots>;
|
|
70
|
+
default: undefined;
|
|
71
|
+
};
|
|
67
72
|
name: StringConstructor;
|
|
68
73
|
id: StringConstructor;
|
|
69
74
|
modelValue: {
|
|
@@ -62,6 +62,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
62
62
|
}>>>[]>;
|
|
63
63
|
default: () => never[];
|
|
64
64
|
};
|
|
65
|
+
selectSlots: {
|
|
66
|
+
type: import("vue").PropType<import("./types").SelectSlots>;
|
|
67
|
+
default: undefined;
|
|
68
|
+
};
|
|
65
69
|
name: StringConstructor;
|
|
66
70
|
id: StringConstructor;
|
|
67
71
|
modelValue: {
|
|
@@ -365,6 +369,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
365
369
|
}>>>[]>;
|
|
366
370
|
default: () => never[];
|
|
367
371
|
};
|
|
372
|
+
selectSlots: {
|
|
373
|
+
type: import("vue").PropType<import("./types").SelectSlots>;
|
|
374
|
+
default: undefined;
|
|
375
|
+
};
|
|
368
376
|
name: StringConstructor;
|
|
369
377
|
id: StringConstructor;
|
|
370
378
|
modelValue: {
|
|
@@ -576,5 +584,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
576
584
|
disabled: boolean;
|
|
577
585
|
created: boolean;
|
|
578
586
|
}>>>[];
|
|
587
|
+
selectSlots: import("./types").SelectSlots;
|
|
579
588
|
}>;
|
|
580
589
|
export default _default;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare type
|
|
3
|
-
|
|
1
|
+
import { Func } from '@vunk/form/shared/types';
|
|
2
|
+
export declare type SelectSlots = {
|
|
3
|
+
prefix?: Func;
|
|
4
|
+
empty?: Func;
|
|
5
|
+
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export * from '@vunk-form/components/input';
|
|
2
|
-
export * from '@vunk-form/components/ground';
|
|
3
2
|
export * from '@vunk-form/components/form-item-renderer';
|
|
4
3
|
export * from '@vunk-form/components/form-item-renderer-template';
|
|
5
4
|
export * from '@vunk-form/components/drag-wrapper';
|
|
@@ -15,3 +14,4 @@ export * from '@vunk-form/components/switch';
|
|
|
15
14
|
export * from '@vunk-form/components/form-item';
|
|
16
15
|
export * from '@vunk-form/components/select';
|
|
17
16
|
export * from '@vunk-form/components/select-config';
|
|
17
|
+
export * from '@vunk-form/components/date-picker';
|
|
@@ -7,3 +7,5 @@ export declare const createSwitchBindProps: <T2 extends Record<string, any>, EX
|
|
|
7
7
|
export declare const createSwitchOnEmits: <T2 extends (...args: any) => any, EX extends ("update:modelValue" | "input" | "change")[], K extends "update:modelValue" | "input" | "change">(emit: T2, excludes?: EX | undefined) => { [k in K]: T2; };
|
|
8
8
|
export declare const createSelectBindProps: <T2 extends Record<string, any>, EX extends ("size" | "id" | "disabled" | "modelValue" | "autocomplete" | "placeholder" | "clearable" | "suffixIcon" | "name" | "loading" | "automaticDropdown" | "effect" | "filterable" | "allowCreate" | "popperClass" | "remote" | "loadingText" | "noMatchText" | "noDataText" | "remoteMethod" | "filterMethod" | "multiple" | "multipleLimit" | "defaultFirstOption" | "reserveKeyword" | "valueKey" | "collapseTags" | "collapseTagsTooltip" | "teleported" | "persistent" | "clearIcon" | "fitInputWidth" | "tagType")[] | undefined, K extends Extract<EX extends (infer V)[] ? Exclude<keyof T2, V> : keyof T2, "size" | "id" | "disabled" | "modelValue" | "autocomplete" | "placeholder" | "clearable" | "suffixIcon" | "name" | "loading" | "automaticDropdown" | "effect" | "filterable" | "allowCreate" | "popperClass" | "remote" | "loadingText" | "noMatchText" | "noDataText" | "remoteMethod" | "filterMethod" | "multiple" | "multipleLimit" | "defaultFirstOption" | "reserveKeyword" | "valueKey" | "collapseTags" | "collapseTagsTooltip" | "teleported" | "persistent" | "clearIcon" | "fitInputWidth" | "tagType">>(propsArg: T2, excludes?: EX | undefined) => import("vue").ComputedRef<{ [k in K]: T2[k]; }>;
|
|
9
9
|
export declare const createSelectOnEmits: <T2 extends (...args: any) => any, EX extends ("update:modelValue" | "change" | "focus" | "blur" | "clear" | "remove-tag" | "visible-change")[], K extends "update:modelValue" | "change" | "focus" | "blur" | "clear" | "remove-tag" | "visible-change">(emit: T2, excludes?: EX | undefined) => { [k in K]: T2; };
|
|
10
|
+
export declare const createDatePickerBindProps: <T2 extends Record<string, any>, EX extends ("type" | "size" | "label" | "id" | "disabled" | "modelValue" | "placeholder" | "readonly" | "clearable" | "prefixIcon" | "tabindex" | "validateEvent" | "name" | "popperClass" | "clearIcon" | "format" | "valueFormat" | "editable" | "popperOptions" | "rangeSeparator" | "startPlaceholder" | "endPlaceholder" | "defaultValue" | "defaultTime" | "isRange" | "disabledHours" | "disabledMinutes" | "disabledSeconds" | "disabledDate" | "cellClassName" | "shortcuts" | "arrowControl" | "unlinkPanels")[] | undefined, K extends Extract<EX extends (infer V)[] ? Exclude<keyof T2, V> : keyof T2, "type" | "size" | "label" | "id" | "disabled" | "modelValue" | "placeholder" | "readonly" | "clearable" | "prefixIcon" | "tabindex" | "validateEvent" | "name" | "popperClass" | "clearIcon" | "format" | "valueFormat" | "editable" | "popperOptions" | "rangeSeparator" | "startPlaceholder" | "endPlaceholder" | "defaultValue" | "defaultTime" | "isRange" | "disabledHours" | "disabledMinutes" | "disabledSeconds" | "disabledDate" | "cellClassName" | "shortcuts" | "arrowControl" | "unlinkPanels">>(propsArg: T2, excludes?: EX | undefined) => import("vue").ComputedRef<{ [k in K]: T2[k]; }>;
|
|
11
|
+
export declare const createDatePickerOnEmits: <T2 extends (...args: any) => any, EX extends ("update:modelValue" | "change" | "focus" | "blur" | "keydown" | "visible-change" | "calendar-change" | "panel-change")[], K extends "update:modelValue" | "change" | "focus" | "blur" | "keydown" | "visible-change" | "calendar-change" | "panel-change">(emit: T2, excludes?: EX | undefined) => { [k in K]: T2; };
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
export declare const datePickerProps: {
|
|
3
|
+
type: {
|
|
4
|
+
type: PropType<"year" | "month" | "date" | "dates" | "week" | "datetime" | "datetimerange" | "daterange" | "monthrange">;
|
|
5
|
+
default: string;
|
|
6
|
+
};
|
|
7
|
+
id: {
|
|
8
|
+
type: (StringConstructor | ArrayConstructor)[];
|
|
9
|
+
};
|
|
10
|
+
name: {
|
|
11
|
+
type: (StringConstructor | ArrayConstructor)[];
|
|
12
|
+
default: string;
|
|
13
|
+
};
|
|
14
|
+
popperClass: {
|
|
15
|
+
type: StringConstructor;
|
|
16
|
+
default: string;
|
|
17
|
+
};
|
|
18
|
+
format: {
|
|
19
|
+
type: StringConstructor;
|
|
20
|
+
};
|
|
21
|
+
valueFormat: {
|
|
22
|
+
type: PropType<string>;
|
|
23
|
+
};
|
|
24
|
+
clearable: {
|
|
25
|
+
type: BooleanConstructor;
|
|
26
|
+
default: boolean;
|
|
27
|
+
};
|
|
28
|
+
clearIcon: {
|
|
29
|
+
type: PropType<string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>>;
|
|
30
|
+
default: import("vue").DefineComponent<{}, {}, {}, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
31
|
+
};
|
|
32
|
+
editable: {
|
|
33
|
+
type: BooleanConstructor;
|
|
34
|
+
default: boolean;
|
|
35
|
+
};
|
|
36
|
+
prefixIcon: {
|
|
37
|
+
type: PropType<string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>>;
|
|
38
|
+
default: string;
|
|
39
|
+
};
|
|
40
|
+
size: {
|
|
41
|
+
type: PropType<"" | "default" | "small" | "large">;
|
|
42
|
+
validator: (val: string) => val is "" | "default" | "small" | "large";
|
|
43
|
+
};
|
|
44
|
+
readonly: {
|
|
45
|
+
type: BooleanConstructor;
|
|
46
|
+
default: boolean;
|
|
47
|
+
};
|
|
48
|
+
disabled: {
|
|
49
|
+
type: BooleanConstructor;
|
|
50
|
+
default: boolean;
|
|
51
|
+
};
|
|
52
|
+
placeholder: {
|
|
53
|
+
type: StringConstructor;
|
|
54
|
+
default: string;
|
|
55
|
+
};
|
|
56
|
+
popperOptions: {
|
|
57
|
+
type: PropType<Partial<import("element-plus").Options>>;
|
|
58
|
+
default: () => {};
|
|
59
|
+
};
|
|
60
|
+
modelValue: {
|
|
61
|
+
type: PropType<string | number | Date | (string | number | Date)[]>;
|
|
62
|
+
default: string;
|
|
63
|
+
};
|
|
64
|
+
rangeSeparator: {
|
|
65
|
+
type: StringConstructor;
|
|
66
|
+
default: string;
|
|
67
|
+
};
|
|
68
|
+
startPlaceholder: StringConstructor;
|
|
69
|
+
endPlaceholder: StringConstructor;
|
|
70
|
+
defaultValue: {
|
|
71
|
+
type: PropType<Date | Date[]>;
|
|
72
|
+
};
|
|
73
|
+
defaultTime: {
|
|
74
|
+
type: PropType<Date | Date[]>;
|
|
75
|
+
};
|
|
76
|
+
isRange: {
|
|
77
|
+
type: BooleanConstructor;
|
|
78
|
+
default: boolean;
|
|
79
|
+
};
|
|
80
|
+
disabledHours: {
|
|
81
|
+
type: FunctionConstructor;
|
|
82
|
+
};
|
|
83
|
+
disabledMinutes: {
|
|
84
|
+
type: FunctionConstructor;
|
|
85
|
+
};
|
|
86
|
+
disabledSeconds: {
|
|
87
|
+
type: FunctionConstructor;
|
|
88
|
+
};
|
|
89
|
+
disabledDate: {
|
|
90
|
+
type: FunctionConstructor;
|
|
91
|
+
};
|
|
92
|
+
cellClassName: {
|
|
93
|
+
type: FunctionConstructor;
|
|
94
|
+
};
|
|
95
|
+
shortcuts: {
|
|
96
|
+
type: ArrayConstructor;
|
|
97
|
+
default: () => never[];
|
|
98
|
+
};
|
|
99
|
+
arrowControl: {
|
|
100
|
+
type: BooleanConstructor;
|
|
101
|
+
default: boolean;
|
|
102
|
+
};
|
|
103
|
+
label: {
|
|
104
|
+
type: StringConstructor;
|
|
105
|
+
default: undefined;
|
|
106
|
+
};
|
|
107
|
+
tabindex: {
|
|
108
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
109
|
+
default: number;
|
|
110
|
+
};
|
|
111
|
+
validateEvent: {
|
|
112
|
+
type: BooleanConstructor;
|
|
113
|
+
default: boolean;
|
|
114
|
+
};
|
|
115
|
+
unlinkPanels: BooleanConstructor;
|
|
116
|
+
};
|
|
117
|
+
export declare const datePickerEmits: {
|
|
118
|
+
'update:modelValue': null;
|
|
119
|
+
change: null;
|
|
120
|
+
focus: null;
|
|
121
|
+
blur: null;
|
|
122
|
+
'calendar-change': null;
|
|
123
|
+
'panel-change': null;
|
|
124
|
+
'visible-change': null;
|
|
125
|
+
keydown: null;
|
|
126
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { VkfDatePicker } from '@vunk/form/components/date-picker';
|
|
2
|
+
import { VueComponentPropsType } from 'vunk/shared/types';
|
|
3
|
+
import { Replace } from '../shared';
|
|
4
|
+
export declare type VkfDatePickerProps<T = undefined> = Replace<VueComponentPropsType<typeof VkfDatePicker>, T>;
|
|
5
|
+
export declare type VkfDatePickerSource<P = string> = VkfDatePickerProps<{
|
|
6
|
+
prop: P;
|
|
7
|
+
templateType: 'VkfDatePicker';
|
|
8
|
+
}>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { VkfInputSource, VkfSwitchSource, VkfSelectSource } from './form-item';
|
|
1
|
+
import { VkfInputSource, VkfSwitchSource, VkfSelectSource, VkfDatePickerSource } from './form-item';
|
|
2
2
|
export * from './shared';
|
|
3
|
-
export declare type FormItemRendererSource<P = string> = VkfInputSource<P> | VkfSwitchSource<P> | VkfSelectSource<P>;
|
|
3
|
+
export declare type FormItemRendererSource<P = string> = VkfInputSource<P> | VkfSwitchSource<P> | VkfSelectSource<P> | VkfDatePickerSource<P>;
|