@manik02/vue3-timepicker 0.4.6 → 1.1.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/dist/TimePicker/TimeColumn.vue.d.ts +4 -8
- package/dist/TimePicker/TimePicker.vue.d.ts +25 -25
- package/dist/TimePicker/types.d.ts +12 -41
- package/dist/TimePicker/useTimeMask.d.ts +0 -1
- package/dist/helpers.d.ts +2 -6
- package/dist/stories/TimePicker.stories.d.ts +100 -100
- package/dist/vue-timepicker.js +683 -731
- package/dist/vue-timepicker.umd.cjs +1 -1
- package/package.json +4 -1
|
@@ -1,18 +1,14 @@
|
|
|
1
|
+
import { Item } from './types';
|
|
1
2
|
type __VLS_Props = {
|
|
2
|
-
items:
|
|
3
|
-
key: string | number;
|
|
4
|
-
value: any;
|
|
5
|
-
text: string;
|
|
6
|
-
disabled?: boolean;
|
|
7
|
-
}>;
|
|
3
|
+
items: Item[];
|
|
8
4
|
activeIndex: number;
|
|
9
5
|
};
|
|
10
6
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
11
7
|
"update:activeIndex": (index: number) => any;
|
|
12
|
-
select: (v:
|
|
8
|
+
select: (v: string | number) => any;
|
|
13
9
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
14
10
|
"onUpdate:activeIndex"?: ((index: number) => any) | undefined;
|
|
15
|
-
onSelect?: ((v:
|
|
11
|
+
onSelect?: ((v: string | number) => any) | undefined;
|
|
16
12
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
17
13
|
menu: HTMLDivElement;
|
|
18
14
|
}, HTMLDivElement>;
|
|
@@ -32,17 +32,17 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
32
32
|
readonly minTime: {
|
|
33
33
|
readonly type: import('vue').PropType<string | undefined>;
|
|
34
34
|
readonly default: undefined;
|
|
35
|
-
readonly validator: (v
|
|
35
|
+
readonly validator: (v: string | undefined) => boolean;
|
|
36
36
|
};
|
|
37
37
|
readonly maxTime: {
|
|
38
38
|
readonly type: import('vue').PropType<string | undefined>;
|
|
39
39
|
readonly default: undefined;
|
|
40
|
-
readonly validator: (v
|
|
40
|
+
readonly validator: (v: string | undefined) => boolean;
|
|
41
41
|
};
|
|
42
42
|
readonly disabledTimes: {
|
|
43
43
|
readonly type: import('vue').PropType<ReadonlyArray<DisabledTimeInput> | undefined>;
|
|
44
44
|
readonly default: undefined;
|
|
45
|
-
readonly validator: (v
|
|
45
|
+
readonly validator: (v: readonly DisabledTimeInput[] | undefined) => boolean;
|
|
46
46
|
};
|
|
47
47
|
readonly isTimeDisabled: {
|
|
48
48
|
readonly type: import('vue').PropType<(time: InternalFormat) => boolean>;
|
|
@@ -51,7 +51,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
51
51
|
readonly format: {
|
|
52
52
|
readonly type: import('vue').PropType<import('./types').TimeFormat>;
|
|
53
53
|
readonly default: "HH:mm";
|
|
54
|
-
readonly validator: (
|
|
54
|
+
readonly validator: (v: string) => boolean;
|
|
55
55
|
};
|
|
56
56
|
readonly placeholder: {
|
|
57
57
|
readonly type: StringConstructor;
|
|
@@ -60,12 +60,12 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
60
60
|
readonly id: {
|
|
61
61
|
readonly type: import('vue').PropType<string | undefined>;
|
|
62
62
|
readonly default: undefined;
|
|
63
|
-
readonly validator: (v
|
|
63
|
+
readonly validator: (v: string | undefined) => boolean;
|
|
64
64
|
};
|
|
65
65
|
readonly name: {
|
|
66
66
|
readonly type: import('vue').PropType<string | undefined>;
|
|
67
67
|
readonly default: undefined;
|
|
68
|
-
readonly validator: (v
|
|
68
|
+
readonly validator: (v: string | undefined) => boolean;
|
|
69
69
|
};
|
|
70
70
|
readonly tabindex: {
|
|
71
71
|
readonly type: NumberConstructor;
|
|
@@ -80,32 +80,32 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
80
80
|
readonly inputClass: {
|
|
81
81
|
readonly type: import('vue').PropType<string | string[] | Record<string, boolean> | undefined>;
|
|
82
82
|
readonly default: undefined;
|
|
83
|
-
readonly validator: (v
|
|
83
|
+
readonly validator: (v: unknown) => boolean;
|
|
84
84
|
};
|
|
85
85
|
readonly inputWidth: {
|
|
86
86
|
readonly type: import('vue').PropType<string | number | undefined>;
|
|
87
87
|
readonly default: undefined;
|
|
88
|
-
readonly validator: (v
|
|
88
|
+
readonly validator: (v: unknown) => boolean;
|
|
89
89
|
};
|
|
90
90
|
readonly componentWidth: {
|
|
91
91
|
readonly type: import('vue').PropType<string | number | undefined>;
|
|
92
92
|
readonly default: undefined;
|
|
93
|
-
readonly validator: (v
|
|
93
|
+
readonly validator: (v: unknown) => boolean;
|
|
94
94
|
};
|
|
95
95
|
readonly minInputWidth: {
|
|
96
96
|
readonly type: import('vue').PropType<string | number | undefined>;
|
|
97
97
|
readonly default: undefined;
|
|
98
|
-
readonly validator: (v
|
|
98
|
+
readonly validator: (v: unknown) => boolean;
|
|
99
99
|
};
|
|
100
100
|
readonly maxInputWidth: {
|
|
101
101
|
readonly type: import('vue').PropType<string | number | undefined>;
|
|
102
102
|
readonly default: undefined;
|
|
103
|
-
readonly validator: (v
|
|
103
|
+
readonly validator: (v: unknown) => boolean;
|
|
104
104
|
};
|
|
105
105
|
readonly size: {
|
|
106
106
|
readonly type: import('vue').PropType<"xs" | "sm" | "md" | "lg" | "xl">;
|
|
107
107
|
readonly default: "md";
|
|
108
|
-
readonly validator: (v: string) =>
|
|
108
|
+
readonly validator: (v: string) => boolean;
|
|
109
109
|
};
|
|
110
110
|
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
111
111
|
"update:modelValue": (v: string | [string, string] | null) => any;
|
|
@@ -155,17 +155,17 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
155
155
|
readonly minTime: {
|
|
156
156
|
readonly type: import('vue').PropType<string | undefined>;
|
|
157
157
|
readonly default: undefined;
|
|
158
|
-
readonly validator: (v
|
|
158
|
+
readonly validator: (v: string | undefined) => boolean;
|
|
159
159
|
};
|
|
160
160
|
readonly maxTime: {
|
|
161
161
|
readonly type: import('vue').PropType<string | undefined>;
|
|
162
162
|
readonly default: undefined;
|
|
163
|
-
readonly validator: (v
|
|
163
|
+
readonly validator: (v: string | undefined) => boolean;
|
|
164
164
|
};
|
|
165
165
|
readonly disabledTimes: {
|
|
166
166
|
readonly type: import('vue').PropType<ReadonlyArray<DisabledTimeInput> | undefined>;
|
|
167
167
|
readonly default: undefined;
|
|
168
|
-
readonly validator: (v
|
|
168
|
+
readonly validator: (v: readonly DisabledTimeInput[] | undefined) => boolean;
|
|
169
169
|
};
|
|
170
170
|
readonly isTimeDisabled: {
|
|
171
171
|
readonly type: import('vue').PropType<(time: InternalFormat) => boolean>;
|
|
@@ -174,7 +174,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
174
174
|
readonly format: {
|
|
175
175
|
readonly type: import('vue').PropType<import('./types').TimeFormat>;
|
|
176
176
|
readonly default: "HH:mm";
|
|
177
|
-
readonly validator: (
|
|
177
|
+
readonly validator: (v: string) => boolean;
|
|
178
178
|
};
|
|
179
179
|
readonly placeholder: {
|
|
180
180
|
readonly type: StringConstructor;
|
|
@@ -183,12 +183,12 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
183
183
|
readonly id: {
|
|
184
184
|
readonly type: import('vue').PropType<string | undefined>;
|
|
185
185
|
readonly default: undefined;
|
|
186
|
-
readonly validator: (v
|
|
186
|
+
readonly validator: (v: string | undefined) => boolean;
|
|
187
187
|
};
|
|
188
188
|
readonly name: {
|
|
189
189
|
readonly type: import('vue').PropType<string | undefined>;
|
|
190
190
|
readonly default: undefined;
|
|
191
|
-
readonly validator: (v
|
|
191
|
+
readonly validator: (v: string | undefined) => boolean;
|
|
192
192
|
};
|
|
193
193
|
readonly tabindex: {
|
|
194
194
|
readonly type: NumberConstructor;
|
|
@@ -203,32 +203,32 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
203
203
|
readonly inputClass: {
|
|
204
204
|
readonly type: import('vue').PropType<string | string[] | Record<string, boolean> | undefined>;
|
|
205
205
|
readonly default: undefined;
|
|
206
|
-
readonly validator: (v
|
|
206
|
+
readonly validator: (v: unknown) => boolean;
|
|
207
207
|
};
|
|
208
208
|
readonly inputWidth: {
|
|
209
209
|
readonly type: import('vue').PropType<string | number | undefined>;
|
|
210
210
|
readonly default: undefined;
|
|
211
|
-
readonly validator: (v
|
|
211
|
+
readonly validator: (v: unknown) => boolean;
|
|
212
212
|
};
|
|
213
213
|
readonly componentWidth: {
|
|
214
214
|
readonly type: import('vue').PropType<string | number | undefined>;
|
|
215
215
|
readonly default: undefined;
|
|
216
|
-
readonly validator: (v
|
|
216
|
+
readonly validator: (v: unknown) => boolean;
|
|
217
217
|
};
|
|
218
218
|
readonly minInputWidth: {
|
|
219
219
|
readonly type: import('vue').PropType<string | number | undefined>;
|
|
220
220
|
readonly default: undefined;
|
|
221
|
-
readonly validator: (v
|
|
221
|
+
readonly validator: (v: unknown) => boolean;
|
|
222
222
|
};
|
|
223
223
|
readonly maxInputWidth: {
|
|
224
224
|
readonly type: import('vue').PropType<string | number | undefined>;
|
|
225
225
|
readonly default: undefined;
|
|
226
|
-
readonly validator: (v
|
|
226
|
+
readonly validator: (v: unknown) => boolean;
|
|
227
227
|
};
|
|
228
228
|
readonly size: {
|
|
229
229
|
readonly type: import('vue').PropType<"xs" | "sm" | "md" | "lg" | "xl">;
|
|
230
230
|
readonly default: "md";
|
|
231
|
-
readonly validator: (v: string) =>
|
|
231
|
+
readonly validator: (v: string) => boolean;
|
|
232
232
|
};
|
|
233
233
|
}>> & Readonly<{
|
|
234
234
|
"onUpdate:modelValue"?: ((v: string | [string, string] | null) => any) | undefined;
|
|
@@ -246,7 +246,6 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
246
246
|
message: string;
|
|
247
247
|
}) => any) | undefined;
|
|
248
248
|
}>, {
|
|
249
|
-
readonly tabindex: number;
|
|
250
249
|
readonly modelValue: string | [string, string] | null;
|
|
251
250
|
readonly range: boolean;
|
|
252
251
|
readonly disabled: boolean;
|
|
@@ -262,6 +261,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
262
261
|
readonly placeholder: string;
|
|
263
262
|
readonly id: string | undefined;
|
|
264
263
|
readonly name: string | undefined;
|
|
264
|
+
readonly tabindex: number;
|
|
265
265
|
readonly autocomplete: string;
|
|
266
266
|
readonly inputClass: string | string[] | Record<string, boolean> | undefined;
|
|
267
267
|
readonly inputWidth: string | number | undefined;
|
|
@@ -51,17 +51,17 @@ export declare const timePickerProps: {
|
|
|
51
51
|
readonly minTime: {
|
|
52
52
|
readonly type: PropType<string | undefined>;
|
|
53
53
|
readonly default: undefined;
|
|
54
|
-
readonly validator: (v
|
|
54
|
+
readonly validator: (v: string | undefined) => boolean;
|
|
55
55
|
};
|
|
56
56
|
readonly maxTime: {
|
|
57
57
|
readonly type: PropType<string | undefined>;
|
|
58
58
|
readonly default: undefined;
|
|
59
|
-
readonly validator: (v
|
|
59
|
+
readonly validator: (v: string | undefined) => boolean;
|
|
60
60
|
};
|
|
61
61
|
readonly disabledTimes: {
|
|
62
62
|
readonly type: PropType<ReadonlyArray<DisabledTimeInput> | undefined>;
|
|
63
63
|
readonly default: undefined;
|
|
64
|
-
readonly validator: (v
|
|
64
|
+
readonly validator: (v: readonly DisabledTimeInput[] | undefined) => boolean;
|
|
65
65
|
};
|
|
66
66
|
readonly isTimeDisabled: {
|
|
67
67
|
readonly type: PropType<(time: InternalFormat) => boolean>;
|
|
@@ -70,7 +70,7 @@ export declare const timePickerProps: {
|
|
|
70
70
|
readonly format: {
|
|
71
71
|
readonly type: PropType<TimeFormat>;
|
|
72
72
|
readonly default: "HH:mm";
|
|
73
|
-
readonly validator: (
|
|
73
|
+
readonly validator: (v: string) => boolean;
|
|
74
74
|
};
|
|
75
75
|
readonly placeholder: {
|
|
76
76
|
readonly type: StringConstructor;
|
|
@@ -79,12 +79,12 @@ export declare const timePickerProps: {
|
|
|
79
79
|
readonly id: {
|
|
80
80
|
readonly type: PropType<string | undefined>;
|
|
81
81
|
readonly default: undefined;
|
|
82
|
-
readonly validator: (v
|
|
82
|
+
readonly validator: (v: string | undefined) => boolean;
|
|
83
83
|
};
|
|
84
84
|
readonly name: {
|
|
85
85
|
readonly type: PropType<string | undefined>;
|
|
86
86
|
readonly default: undefined;
|
|
87
|
-
readonly validator: (v
|
|
87
|
+
readonly validator: (v: string | undefined) => boolean;
|
|
88
88
|
};
|
|
89
89
|
readonly tabindex: {
|
|
90
90
|
readonly type: NumberConstructor;
|
|
@@ -99,64 +99,35 @@ export declare const timePickerProps: {
|
|
|
99
99
|
readonly inputClass: {
|
|
100
100
|
readonly type: PropType<string | string[] | Record<string, boolean> | undefined>;
|
|
101
101
|
readonly default: undefined;
|
|
102
|
-
readonly validator: (v
|
|
102
|
+
readonly validator: (v: unknown) => boolean;
|
|
103
103
|
};
|
|
104
104
|
readonly inputWidth: {
|
|
105
105
|
readonly type: PropType<string | number | undefined>;
|
|
106
106
|
readonly default: undefined;
|
|
107
|
-
readonly validator: (v
|
|
107
|
+
readonly validator: (v: unknown) => boolean;
|
|
108
108
|
};
|
|
109
109
|
readonly componentWidth: {
|
|
110
110
|
readonly type: PropType<string | number | undefined>;
|
|
111
111
|
readonly default: undefined;
|
|
112
|
-
readonly validator: (v
|
|
112
|
+
readonly validator: (v: unknown) => boolean;
|
|
113
113
|
};
|
|
114
114
|
readonly minInputWidth: {
|
|
115
115
|
readonly type: PropType<string | number | undefined>;
|
|
116
116
|
readonly default: undefined;
|
|
117
|
-
readonly validator: (v
|
|
117
|
+
readonly validator: (v: unknown) => boolean;
|
|
118
118
|
};
|
|
119
119
|
readonly maxInputWidth: {
|
|
120
120
|
readonly type: PropType<string | number | undefined>;
|
|
121
121
|
readonly default: undefined;
|
|
122
|
-
readonly validator: (v
|
|
122
|
+
readonly validator: (v: unknown) => boolean;
|
|
123
123
|
};
|
|
124
124
|
readonly size: {
|
|
125
125
|
readonly type: PropType<"xs" | "sm" | "md" | "lg" | "xl">;
|
|
126
126
|
readonly default: "md";
|
|
127
|
-
readonly validator: (v: string) =>
|
|
127
|
+
readonly validator: (v: string) => boolean;
|
|
128
128
|
};
|
|
129
129
|
};
|
|
130
130
|
export type TimePickerProps = ExtractPropTypes<typeof timePickerProps>;
|
|
131
|
-
export declare const TimeSelectionProps: {
|
|
132
|
-
readonly modelValue: {
|
|
133
|
-
readonly type: PropType<string | [string, string] | null>;
|
|
134
|
-
readonly default: null;
|
|
135
|
-
readonly validator: (v: any) => boolean;
|
|
136
|
-
};
|
|
137
|
-
readonly range: {
|
|
138
|
-
readonly type: BooleanConstructor;
|
|
139
|
-
readonly default: false;
|
|
140
|
-
};
|
|
141
|
-
readonly hourStep: {
|
|
142
|
-
readonly type: NumberConstructor;
|
|
143
|
-
readonly default: 1;
|
|
144
|
-
};
|
|
145
|
-
readonly minuteStep: {
|
|
146
|
-
readonly type: NumberConstructor;
|
|
147
|
-
readonly default: 1;
|
|
148
|
-
};
|
|
149
|
-
readonly secondStep: {
|
|
150
|
-
readonly type: NumberConstructor;
|
|
151
|
-
readonly default: 1;
|
|
152
|
-
};
|
|
153
|
-
readonly format: {
|
|
154
|
-
readonly type: PropType<TimeFormat>;
|
|
155
|
-
readonly default: "HH:mm";
|
|
156
|
-
readonly validator: (fmt: string) => boolean;
|
|
157
|
-
};
|
|
158
|
-
};
|
|
159
|
-
export type TimeSelectionProps = ExtractPropTypes<typeof TimeSelectionProps>;
|
|
160
131
|
export interface TimePickerEmits {
|
|
161
132
|
(e: "update:modelValue", v: string | [string, string] | null): void;
|
|
162
133
|
(e: "update:validationState", v: ValidationState): void;
|
package/dist/helpers.d.ts
CHANGED
|
@@ -3,12 +3,8 @@ import { InternalFormat } from './TimePicker/types';
|
|
|
3
3
|
export declare function is12h(fmt: string): boolean;
|
|
4
4
|
export declare function isPm(fmt: string): boolean;
|
|
5
5
|
export declare function hasK(fmt: string): boolean;
|
|
6
|
-
/** Parse
|
|
7
|
-
export declare function parseFromModel(str: string | null | undefined
|
|
8
|
-
h: number;
|
|
9
|
-
m: number;
|
|
10
|
-
s: number;
|
|
11
|
-
};
|
|
6
|
+
/** Parse a 24-hour "HH:mm(:ss)" model string into { h, m, s } numbers */
|
|
7
|
+
export declare function parseFromModel(str: string | null | undefined): InternalFormat;
|
|
12
8
|
export declare function to12(h24: number): number;
|
|
13
9
|
export declare function to24(h12: number, isPM: boolean): number;
|
|
14
10
|
export declare function hasSeconds(fmt: string): boolean;
|