@vaadin/date-time-picker 24.6.0-alpha7 → 24.6.0-alpha9
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/package.json +14 -12
- package/src/vaadin-date-time-picker-mixin.d.ts +167 -0
- package/src/vaadin-date-time-picker-mixin.js +923 -0
- package/src/vaadin-date-time-picker.d.ts +4 -141
- package/src/vaadin-date-time-picker.js +5 -921
- package/src/vaadin-lit-date-time-picker.d.ts +1 -0
- package/src/vaadin-lit-date-time-picker.js +86 -0
- package/theme/lumo/vaadin-date-time-picker-styles.d.ts +1 -2
- package/theme/lumo/vaadin-date-time-picker-styles.js +0 -2
- package/theme/lumo/vaadin-date-time-picker.d.ts +2 -0
- package/theme/lumo/vaadin-date-time-picker.js +2 -0
- package/theme/lumo/vaadin-lit-date-time-picker.d.ts +4 -0
- package/theme/lumo/vaadin-lit-date-time-picker.js +4 -0
- package/theme/material/vaadin-date-time-picker-styles.d.ts +1 -2
- package/theme/material/vaadin-date-time-picker-styles.js +0 -2
- package/theme/material/vaadin-date-time-picker.d.ts +2 -0
- package/theme/material/vaadin-date-time-picker.js +2 -0
- package/theme/material/vaadin-lit-date-time-picker.d.ts +4 -0
- package/theme/material/vaadin-lit-date-time-picker.js +4 -0
- package/vaadin-lit-date-time-picker.d.ts +1 -0
- package/vaadin-lit-date-time-picker.js +2 -0
- package/web-types.json +31 -9
- package/web-types.lit.json +15 -8
|
@@ -3,30 +3,12 @@
|
|
|
3
3
|
* Copyright (c) 2019 - 2024 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
|
-
import { DisabledMixin } from '@vaadin/a11y-base/src/disabled-mixin.js';
|
|
7
|
-
import { FocusMixin } from '@vaadin/a11y-base/src/focus-mixin.js';
|
|
8
6
|
import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
|
|
9
|
-
import type { DatePickerI18n } from '@vaadin/date-picker/src/vaadin-date-picker.js';
|
|
10
|
-
import { FieldMixin } from '@vaadin/field-base/src/field-mixin.js';
|
|
11
|
-
import type { TimePickerI18n } from '@vaadin/time-picker/src/vaadin-time-picker.js';
|
|
12
7
|
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
8
|
+
import { DateTimePickerMixin } from './vaadin-date-time-picker-mixin.js';
|
|
9
|
+
|
|
10
|
+
export { DateTimePickerI18n } from './vaadin-date-time-picker-mixin.js';
|
|
13
11
|
|
|
14
|
-
export interface DateTimePickerI18n extends DatePickerI18n, TimePickerI18n {
|
|
15
|
-
/**
|
|
16
|
-
* Accessible label to the date picker.
|
|
17
|
-
* The property works in conjunction with label and accessibleName defined on the field.
|
|
18
|
-
* If both properties are defined, then accessibleName takes precedence.
|
|
19
|
-
* Then, the dateLabel value is concatenated with it.
|
|
20
|
-
*/
|
|
21
|
-
dateLabel: string | null | undefined;
|
|
22
|
-
/**
|
|
23
|
-
* Accessible label to the time picker.
|
|
24
|
-
* The property works in conjunction with label and accessibleName defined on the field.
|
|
25
|
-
* If both properties are defined, then accessibleName takes precedence.
|
|
26
|
-
* Then, the dateLabel value is concatenated with it.
|
|
27
|
-
*/
|
|
28
|
-
timeLabel: string | null | undefined;
|
|
29
|
-
}
|
|
30
12
|
/**
|
|
31
13
|
* Fired when the user commits a value change.
|
|
32
14
|
*/
|
|
@@ -116,126 +98,7 @@ export interface DateTimePickerEventMap extends DateTimePickerCustomEventMap, HT
|
|
|
116
98
|
* @fires {CustomEvent} value-changed - Fired when the `value` property changes.
|
|
117
99
|
* @fires {CustomEvent} validated - Fired whenever the field is validated.
|
|
118
100
|
*/
|
|
119
|
-
declare class DateTimePicker extends
|
|
120
|
-
/**
|
|
121
|
-
* The name of the control, which is submitted with the form data.
|
|
122
|
-
*/
|
|
123
|
-
name: string | null | undefined;
|
|
124
|
-
|
|
125
|
-
/**
|
|
126
|
-
* The value for this element.
|
|
127
|
-
*
|
|
128
|
-
* Supported date time format is based on ISO 8601 (without a time zone designator):
|
|
129
|
-
* - Minute precision `"YYYY-MM-DDThh:mm"` (default)
|
|
130
|
-
* - Second precision `"YYYY-MM-DDThh:mm:ss"`
|
|
131
|
-
* - Millisecond precision `"YYYY-MM-DDThh:mm:ss.fff"`
|
|
132
|
-
*/
|
|
133
|
-
value: string;
|
|
134
|
-
|
|
135
|
-
/**
|
|
136
|
-
* The earliest allowed value (date and time) that can be selected. All earlier values will be disabled.
|
|
137
|
-
*
|
|
138
|
-
* Supported date time format is based on ISO 8601 (without a time zone designator):
|
|
139
|
-
* - Minute precision `"YYYY-MM-DDThh:mm"`
|
|
140
|
-
* - Second precision `"YYYY-MM-DDThh:mm:ss"`
|
|
141
|
-
* - Millisecond precision `"YYYY-MM-DDThh:mm:ss.fff"`
|
|
142
|
-
*/
|
|
143
|
-
min: string | undefined;
|
|
144
|
-
|
|
145
|
-
/**
|
|
146
|
-
* The latest value (date and time) that can be selected. All later values will be disabled.
|
|
147
|
-
*
|
|
148
|
-
* Supported date time format is based on ISO 8601 (without a time zone designator):
|
|
149
|
-
* - Minute precision `"YYYY-MM-DDThh:mm"`
|
|
150
|
-
* - Second precision `"YYYY-MM-DDThh:mm:ss"`
|
|
151
|
-
* - Millisecond precision `"YYYY-MM-DDThh:mm:ss.fff"`
|
|
152
|
-
*/
|
|
153
|
-
max: string | undefined;
|
|
154
|
-
|
|
155
|
-
/**
|
|
156
|
-
* A placeholder string for the date field.
|
|
157
|
-
* @attr {string} date-placeholder
|
|
158
|
-
*/
|
|
159
|
-
datePlaceholder: string | null | undefined;
|
|
160
|
-
|
|
161
|
-
/**
|
|
162
|
-
* A placeholder string for the time field.
|
|
163
|
-
* @attr {string} time-placeholder
|
|
164
|
-
*/
|
|
165
|
-
timePlaceholder: string | null | undefined;
|
|
166
|
-
|
|
167
|
-
/**
|
|
168
|
-
* Specifies the number of valid intervals in a day used for
|
|
169
|
-
* configuring the items displayed in the time selection box.
|
|
170
|
-
*
|
|
171
|
-
* It also configures the precision of the time part of the value string. By default
|
|
172
|
-
* the component formats time values as `hh:mm` but setting a step value
|
|
173
|
-
* lower than one minute or one second, format resolution changes to
|
|
174
|
-
* `hh:mm:ss` and `hh:mm:ss.fff` respectively.
|
|
175
|
-
*
|
|
176
|
-
* Unit must be set in seconds, and for correctly configuring intervals
|
|
177
|
-
* in the dropdown, it need to evenly divide a day.
|
|
178
|
-
*
|
|
179
|
-
* Note: it is possible to define step that is dividing an hour in inexact
|
|
180
|
-
* fragments (i.e. 5760 seconds which equals 1 hour 36 minutes), but it is
|
|
181
|
-
* not recommended to use it for better UX.
|
|
182
|
-
*/
|
|
183
|
-
step: number | null | undefined;
|
|
184
|
-
|
|
185
|
-
/**
|
|
186
|
-
* Date which should be visible in the date picker overlay when there is no value selected.
|
|
187
|
-
*
|
|
188
|
-
* The same date formats as for the `value` property are supported but without the time part.
|
|
189
|
-
* @attr {string} initial-position
|
|
190
|
-
*/
|
|
191
|
-
initialPosition: string | null | undefined;
|
|
192
|
-
|
|
193
|
-
/**
|
|
194
|
-
* Set true to display ISO-8601 week numbers in the calendar. Notice that
|
|
195
|
-
* displaying week numbers is only supported when `i18n.firstDayOfWeek`
|
|
196
|
-
* is 1 (Monday).
|
|
197
|
-
* @attr {boolean} show-week-numbers
|
|
198
|
-
*/
|
|
199
|
-
showWeekNumbers: boolean | null | undefined;
|
|
200
|
-
|
|
201
|
-
/**
|
|
202
|
-
* Set to true to prevent the overlays from opening automatically.
|
|
203
|
-
* @attr {boolean} auto-open-disabled
|
|
204
|
-
*/
|
|
205
|
-
autoOpenDisabled: boolean | null | undefined;
|
|
206
|
-
|
|
207
|
-
/**
|
|
208
|
-
* Set to true to make this element read-only.
|
|
209
|
-
*/
|
|
210
|
-
readonly: boolean;
|
|
211
|
-
|
|
212
|
-
/**
|
|
213
|
-
* Specify that this control should have input focus when the page loads.
|
|
214
|
-
*/
|
|
215
|
-
autofocus: boolean;
|
|
216
|
-
|
|
217
|
-
/**
|
|
218
|
-
* The object used to localize this component.
|
|
219
|
-
* To change the default localization, replace the entire
|
|
220
|
-
* `i18n` object or just the properties you want to modify.
|
|
221
|
-
*
|
|
222
|
-
* The object is a combination of the i18n properties supported by
|
|
223
|
-
* [`<vaadin-date-picker>`](#/elements/vaadin-date-picker) and
|
|
224
|
-
* [`<vaadin-time-picker>`](#/elements/vaadin-time-picker).
|
|
225
|
-
*/
|
|
226
|
-
i18n: DateTimePickerI18n;
|
|
227
|
-
|
|
228
|
-
/**
|
|
229
|
-
* A space-delimited list of CSS class names to set on the overlay elements
|
|
230
|
-
* of the internal components controlled by the `<vaadin-date-time-picker>`:
|
|
231
|
-
*
|
|
232
|
-
* - [`<vaadin-date-picker>`](#/elements/vaadin-date-picker#property-overlayClass)
|
|
233
|
-
* - [`<vaadin-time-picker>`](#/elements/vaadin-time-picker#property-overlayClass)
|
|
234
|
-
*
|
|
235
|
-
* @attr {string} overlay-class
|
|
236
|
-
*/
|
|
237
|
-
overlayClass: string;
|
|
238
|
-
|
|
101
|
+
declare class DateTimePicker extends DateTimePickerMixin(ThemableMixin(ElementMixin(HTMLElement))) {
|
|
239
102
|
addEventListener<K extends keyof DateTimePickerEventMap>(
|
|
240
103
|
type: K,
|
|
241
104
|
listener: (this: DateTimePicker, ev: DateTimePickerEventMap[K]) => void,
|