@component-hook/picker 0.2.5 → 1.0.0-alpha.0
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/README.md +47 -163
- package/dist/react/index.css +1 -1
- package/dist/react/picker.es.d.ts +78 -40
- package/dist/react/picker.es.js +1601 -2948
- package/dist/react/picker.umd.js +15 -36
- package/dist/vue/index.css +1 -1
- package/dist/vue/picker.es.d.ts +188 -55
- package/dist/vue/picker.es.js +499 -1811
- package/dist/vue/picker.umd.js +2 -23
- package/package.json +5 -6
package/dist/vue/picker.es.d.ts
CHANGED
|
@@ -1,78 +1,211 @@
|
|
|
1
1
|
import { ComponentOptionsMixin } from 'vue';
|
|
2
2
|
import { ComponentProvideOptions } from 'vue';
|
|
3
|
+
import { CreateComponentPublicInstanceWithMixins } from 'vue';
|
|
3
4
|
import { DefineComponent } from 'vue';
|
|
5
|
+
import { GlobalComponents } from 'vue';
|
|
6
|
+
import { GlobalDirectives } from 'vue';
|
|
7
|
+
import { Props as Props_2 } from './PickerColumn.vue';
|
|
4
8
|
import { PublicProps } from 'vue';
|
|
5
9
|
|
|
6
|
-
declare
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
"update:
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}, string, PublicProps, Readonly<
|
|
14
|
-
"onUpdate:
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
10
|
+
declare const __VLS_component: DefineComponent<Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
11
|
+
"update:modelValue": (args_0: PickerSelectedValues) => any;
|
|
12
|
+
open: () => any;
|
|
13
|
+
closed: () => any;
|
|
14
|
+
"update:show": (args_0: boolean) => any;
|
|
15
|
+
confirm: (args_0: PickerSelectedValues) => any;
|
|
16
|
+
cancel: () => any;
|
|
17
|
+
}, string, PublicProps, Readonly<Props> & Readonly<{
|
|
18
|
+
"onUpdate:modelValue"?: ((args_0: PickerSelectedValues) => any) | undefined;
|
|
19
|
+
onOpen?: (() => any) | undefined;
|
|
20
|
+
onClosed?: (() => any) | undefined;
|
|
21
|
+
"onUpdate:show"?: ((args_0: boolean) => any) | undefined;
|
|
22
|
+
onConfirm?: ((args_0: PickerSelectedValues) => any) | undefined;
|
|
23
|
+
onCancel?: (() => any) | undefined;
|
|
18
24
|
}>, {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
|
|
25
|
+
confirmButtonText: string;
|
|
26
|
+
cancelButtonText: string;
|
|
27
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
28
|
+
columnsRef: (CreateComponentPublicInstanceWithMixins<Readonly<Props_2> & Readonly<{
|
|
29
|
+
onChange?: ((args_0: number) => any) | undefined;
|
|
30
|
+
}>, {
|
|
31
|
+
scrollToSelected: (index?: number, behavior?: ScrollBehavior) => void;
|
|
32
|
+
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
33
|
+
change: (args_0: number) => any;
|
|
34
|
+
}, PublicProps, {
|
|
35
|
+
selectedIndex: number;
|
|
36
|
+
}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {}, HTMLDivElement, ComponentProvideOptions, {
|
|
37
|
+
P: {};
|
|
38
|
+
B: {};
|
|
39
|
+
D: {};
|
|
40
|
+
C: {};
|
|
41
|
+
M: {};
|
|
42
|
+
Defaults: {};
|
|
43
|
+
}, Readonly<Props_2> & Readonly<{
|
|
44
|
+
onChange?: ((args_0: number) => any) | undefined;
|
|
45
|
+
}>, {
|
|
46
|
+
scrollToSelected: (index?: number, behavior?: ScrollBehavior) => void;
|
|
47
|
+
}, {}, {}, {}, {
|
|
48
|
+
selectedIndex: number;
|
|
49
|
+
}> | null)[];
|
|
50
|
+
}, any>;
|
|
51
|
+
|
|
52
|
+
declare function __VLS_template(): {
|
|
53
|
+
attrs: Partial<{}>;
|
|
54
|
+
slots: {
|
|
55
|
+
empty?(_: {}): any;
|
|
56
|
+
loading?(_: {}): any;
|
|
57
|
+
};
|
|
58
|
+
refs: {
|
|
59
|
+
columnsRef: (CreateComponentPublicInstanceWithMixins<Readonly<Props_2> & Readonly<{
|
|
60
|
+
onChange?: ((args_0: number) => any) | undefined;
|
|
61
|
+
}>, {
|
|
62
|
+
scrollToSelected: (index?: number, behavior?: ScrollBehavior) => void;
|
|
63
|
+
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
64
|
+
change: (args_0: number) => any;
|
|
65
|
+
}, PublicProps, {
|
|
66
|
+
selectedIndex: number;
|
|
67
|
+
}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {}, HTMLDivElement, ComponentProvideOptions, {
|
|
68
|
+
P: {};
|
|
69
|
+
B: {};
|
|
70
|
+
D: {};
|
|
71
|
+
C: {};
|
|
72
|
+
M: {};
|
|
73
|
+
Defaults: {};
|
|
74
|
+
}, Readonly<Props_2> & Readonly<{
|
|
75
|
+
onChange?: ((args_0: number) => any) | undefined;
|
|
76
|
+
}>, {
|
|
77
|
+
scrollToSelected: (index?: number, behavior?: ScrollBehavior) => void;
|
|
78
|
+
}, {}, {}, {}, {
|
|
79
|
+
selectedIndex: number;
|
|
80
|
+
}> | null)[];
|
|
81
|
+
};
|
|
82
|
+
rootEl: any;
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
declare type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
86
|
+
|
|
87
|
+
declare type __VLS_WithTemplateSlots<T, S> = T & {
|
|
88
|
+
new (): {
|
|
89
|
+
$slots: S;
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
export declare const DatePicker: DefineComponent<Props_3, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
94
|
+
"update:modelValue": (args_0: PickerSelectedValues) => any;
|
|
95
|
+
open: () => any;
|
|
96
|
+
closed: () => any;
|
|
97
|
+
"update:show": (args_0: boolean) => any;
|
|
98
|
+
confirm: (args_0: PickerSelectedValues) => any;
|
|
99
|
+
cancel: () => any;
|
|
100
|
+
}, string, PublicProps, Readonly<Props_3> & Readonly<{
|
|
101
|
+
"onUpdate:modelValue"?: ((args_0: PickerSelectedValues) => any) | undefined;
|
|
102
|
+
onOpen?: (() => any) | undefined;
|
|
103
|
+
onClosed?: (() => any) | undefined;
|
|
104
|
+
"onUpdate:show"?: ((args_0: boolean) => any) | undefined;
|
|
105
|
+
onConfirm?: ((args_0: PickerSelectedValues) => any) | undefined;
|
|
106
|
+
onCancel?: (() => any) | undefined;
|
|
107
|
+
}>, {
|
|
108
|
+
title: string;
|
|
109
|
+
columnsType: DatePickerColumnType[];
|
|
110
|
+
minDate: Date;
|
|
111
|
+
maxDate: Date;
|
|
112
|
+
formatYearLabel: PickerFormatLabel;
|
|
113
|
+
formatMonthLabel: PickerFormatLabel;
|
|
114
|
+
formatDayLabel: PickerFormatLabel;
|
|
115
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
26
116
|
|
|
27
|
-
declare type
|
|
117
|
+
export declare type DatePickerColumnType = 'year' | 'month' | 'day';
|
|
28
118
|
|
|
29
|
-
export declare type
|
|
119
|
+
export declare type Direction = '' | 'vertical' | 'horizontal';
|
|
30
120
|
|
|
31
|
-
export declare
|
|
121
|
+
export declare const Picker: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
32
122
|
|
|
33
|
-
export declare type
|
|
123
|
+
export declare type PickerColumn = PickerOption[];
|
|
34
124
|
|
|
35
|
-
export declare type
|
|
125
|
+
export declare type PickerColumnsType = 'single' | 'multiple' | 'cascade';
|
|
36
126
|
|
|
37
|
-
export declare interface
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
anchor: T;
|
|
42
|
-
showKey?: string | Array<string>;
|
|
43
|
-
swipeTime?: number;
|
|
44
|
-
type?: PickerBuiltIn;
|
|
127
|
+
export declare interface PickerFields {
|
|
128
|
+
label?: string;
|
|
129
|
+
value?: string;
|
|
130
|
+
children?: string;
|
|
45
131
|
}
|
|
46
132
|
|
|
47
|
-
export declare type
|
|
133
|
+
export declare type PickerFormatLabel = (label: string) => string;
|
|
134
|
+
|
|
135
|
+
export declare interface PickerOption {
|
|
136
|
+
label?: string | number;
|
|
137
|
+
value?: string | number;
|
|
138
|
+
children?: PickerColumn;
|
|
139
|
+
[key: PropertyKey]: any;
|
|
140
|
+
}
|
|
48
141
|
|
|
49
|
-
export declare type
|
|
142
|
+
export declare type PickerSelectedValues = Array<PickerOption['value']>;
|
|
50
143
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
144
|
+
declare interface Props {
|
|
145
|
+
show: boolean;
|
|
146
|
+
modelValue?: PickerSelectedValues;
|
|
147
|
+
title?: string;
|
|
148
|
+
columns: PickerColumn | PickerColumn[];
|
|
149
|
+
linkage?: boolean;
|
|
150
|
+
loading?: boolean;
|
|
151
|
+
teleport?: string | Element;
|
|
152
|
+
confirmButtonText?: string;
|
|
153
|
+
cancelButtonText?: string;
|
|
154
|
+
columnsFieldNames?: PickerFields;
|
|
61
155
|
}
|
|
62
156
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
157
|
+
declare interface Props_3 {
|
|
158
|
+
show: boolean;
|
|
159
|
+
modelValue?: PickerSelectedValues;
|
|
160
|
+
title?: string;
|
|
161
|
+
columnsType?: DatePickerColumnType[];
|
|
162
|
+
minDate?: Date;
|
|
163
|
+
maxDate?: Date;
|
|
164
|
+
teleport?: string | Element;
|
|
165
|
+
confirmButtonText?: string;
|
|
166
|
+
cancelButtonText?: string;
|
|
167
|
+
formatYearLabel?: PickerFormatLabel;
|
|
168
|
+
formatMonthLabel?: PickerFormatLabel;
|
|
169
|
+
formatDayLabel?: PickerFormatLabel;
|
|
71
170
|
}
|
|
72
171
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
172
|
+
declare interface Props_4 {
|
|
173
|
+
show: boolean;
|
|
174
|
+
modelValue?: PickerSelectedValues;
|
|
175
|
+
title?: string;
|
|
176
|
+
columnsType?: TimePickerColumnType[];
|
|
177
|
+
minTime?: string;
|
|
178
|
+
maxTime?: string;
|
|
179
|
+
teleport?: string | Element;
|
|
180
|
+
confirmButtonText?: string;
|
|
181
|
+
cancelButtonText?: string;
|
|
182
|
+
formatHourLabel?: PickerFormatLabel;
|
|
183
|
+
formatMinuteLabel?: PickerFormatLabel;
|
|
184
|
+
formatSecondLabel?: PickerFormatLabel;
|
|
76
185
|
}
|
|
77
186
|
|
|
187
|
+
export declare const TimePicker: DefineComponent<Props_4, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
188
|
+
"update:modelValue": (args_0: PickerSelectedValues) => any;
|
|
189
|
+
open: () => any;
|
|
190
|
+
closed: () => any;
|
|
191
|
+
"update:show": (args_0: boolean) => any;
|
|
192
|
+
confirm: (args_0: PickerSelectedValues) => any;
|
|
193
|
+
cancel: () => any;
|
|
194
|
+
}, string, PublicProps, Readonly<Props_4> & Readonly<{
|
|
195
|
+
"onUpdate:modelValue"?: ((args_0: PickerSelectedValues) => any) | undefined;
|
|
196
|
+
onOpen?: (() => any) | undefined;
|
|
197
|
+
onClosed?: (() => any) | undefined;
|
|
198
|
+
"onUpdate:show"?: ((args_0: boolean) => any) | undefined;
|
|
199
|
+
onConfirm?: ((args_0: PickerSelectedValues) => any) | undefined;
|
|
200
|
+
onCancel?: (() => any) | undefined;
|
|
201
|
+
}>, {
|
|
202
|
+
title: string;
|
|
203
|
+
columnsType: TimePickerColumnType[];
|
|
204
|
+
formatHourLabel: PickerFormatLabel;
|
|
205
|
+
formatMinuteLabel: PickerFormatLabel;
|
|
206
|
+
formatSecondLabel: PickerFormatLabel;
|
|
207
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
208
|
+
|
|
209
|
+
export declare type TimePickerColumnType = 'hour' | 'minute' | 'second';
|
|
210
|
+
|
|
78
211
|
export { }
|