@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/date-time-picker",
3
- "version": "24.6.0-alpha7",
3
+ "version": "24.6.0-alpha9",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -35,19 +35,21 @@
35
35
  "polymer"
36
36
  ],
37
37
  "dependencies": {
38
+ "@open-wc/dedupe-mixin": "^1.3.0",
38
39
  "@polymer/polymer": "^3.0.0",
39
- "@vaadin/a11y-base": "24.6.0-alpha7",
40
- "@vaadin/component-base": "24.6.0-alpha7",
41
- "@vaadin/custom-field": "24.6.0-alpha7",
42
- "@vaadin/date-picker": "24.6.0-alpha7",
43
- "@vaadin/field-base": "24.6.0-alpha7",
44
- "@vaadin/time-picker": "24.6.0-alpha7",
45
- "@vaadin/vaadin-lumo-styles": "24.6.0-alpha7",
46
- "@vaadin/vaadin-material-styles": "24.6.0-alpha7",
47
- "@vaadin/vaadin-themable-mixin": "24.6.0-alpha7"
40
+ "@vaadin/a11y-base": "24.6.0-alpha9",
41
+ "@vaadin/component-base": "24.6.0-alpha9",
42
+ "@vaadin/custom-field": "24.6.0-alpha9",
43
+ "@vaadin/date-picker": "24.6.0-alpha9",
44
+ "@vaadin/field-base": "24.6.0-alpha9",
45
+ "@vaadin/time-picker": "24.6.0-alpha9",
46
+ "@vaadin/vaadin-lumo-styles": "24.6.0-alpha9",
47
+ "@vaadin/vaadin-material-styles": "24.6.0-alpha9",
48
+ "@vaadin/vaadin-themable-mixin": "24.6.0-alpha9",
49
+ "lit": "^3.0.0"
48
50
  },
49
51
  "devDependencies": {
50
- "@vaadin/chai-plugins": "24.6.0-alpha7",
52
+ "@vaadin/chai-plugins": "24.6.0-alpha9",
51
53
  "@vaadin/testing-helpers": "^1.0.0",
52
54
  "sinon": "^18.0.0"
53
55
  },
@@ -55,5 +57,5 @@
55
57
  "web-types.json",
56
58
  "web-types.lit.json"
57
59
  ],
58
- "gitHead": "675d6fe0a08b8cc63ac00140c63f28fc3f52e4ea"
60
+ "gitHead": "e303d77ba20c3089c9998be9a318733d9ec5b53c"
59
61
  }
@@ -0,0 +1,167 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) 2018 - 2024 Vaadin Ltd.
4
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
+ */
6
+ import type { Constructor } from '@open-wc/dedupe-mixin';
7
+ import type { DisabledMixinClass } from '@vaadin/a11y-base/src/disabled-mixin.js';
8
+ import type { FocusMixinClass } from '@vaadin/a11y-base/src/focus-mixin.js';
9
+ import type { ControllerMixinClass } from '@vaadin/component-base/src/controller-mixin.js';
10
+ import type { DatePickerI18n } from '@vaadin/date-picker/src/vaadin-date-picker.js';
11
+ import type { FieldMixinClass } from '@vaadin/field-base/src/field-mixin.js';
12
+ import type { LabelMixinClass } from '@vaadin/field-base/src/label-mixin.js';
13
+ import type { ValidateMixinClass } from '@vaadin/field-base/src/validate-mixin.js';
14
+ import type { TimePickerI18n } from '@vaadin/time-picker/src/vaadin-time-picker.js';
15
+
16
+ export interface DateTimePickerI18n extends DatePickerI18n, TimePickerI18n {
17
+ /**
18
+ * Accessible label to the date picker.
19
+ * The property works in conjunction with label and accessibleName defined on the field.
20
+ * If both properties are defined, then accessibleName takes precedence.
21
+ * Then, the dateLabel value is concatenated with it.
22
+ */
23
+ dateLabel: string | null | undefined;
24
+
25
+ /**
26
+ * Accessible label to the time picker.
27
+ * The property works in conjunction with label and accessibleName defined on the field.
28
+ * If both properties are defined, then accessibleName takes precedence.
29
+ * Then, the dateLabel value is concatenated with it.
30
+ */
31
+ timeLabel: string | null | undefined;
32
+ }
33
+
34
+ /**
35
+ * A mixin providing common date-time-picker functionality.
36
+ */
37
+ export declare function DateTimePickerMixin<T extends Constructor<HTMLElement>>(
38
+ base: T,
39
+ ): Constructor<ControllerMixinClass> &
40
+ Constructor<DateTimePickerMixinClass> &
41
+ Constructor<DisabledMixinClass> &
42
+ Constructor<FieldMixinClass> &
43
+ Constructor<FocusMixinClass> &
44
+ Constructor<LabelMixinClass> &
45
+ Constructor<ValidateMixinClass> &
46
+ T;
47
+
48
+ export declare class DateTimePickerMixinClass {
49
+ /**
50
+ * The name of the control, which is submitted with the form data.
51
+ */
52
+ name: string | null | undefined;
53
+
54
+ /**
55
+ * The value for this element.
56
+ *
57
+ * Supported date time format is based on ISO 8601 (without a time zone designator):
58
+ * - Minute precision `"YYYY-MM-DDThh:mm"` (default)
59
+ * - Second precision `"YYYY-MM-DDThh:mm:ss"`
60
+ * - Millisecond precision `"YYYY-MM-DDThh:mm:ss.fff"`
61
+ */
62
+ value: string;
63
+
64
+ /**
65
+ * The earliest allowed value (date and time) that can be selected. All earlier values will be disabled.
66
+ *
67
+ * Supported date time format is based on ISO 8601 (without a time zone designator):
68
+ * - Minute precision `"YYYY-MM-DDThh:mm"`
69
+ * - Second precision `"YYYY-MM-DDThh:mm:ss"`
70
+ * - Millisecond precision `"YYYY-MM-DDThh:mm:ss.fff"`
71
+ */
72
+ min: string | undefined;
73
+
74
+ /**
75
+ * The latest value (date and time) that can be selected. All later values will be disabled.
76
+ *
77
+ * Supported date time format is based on ISO 8601 (without a time zone designator):
78
+ * - Minute precision `"YYYY-MM-DDThh:mm"`
79
+ * - Second precision `"YYYY-MM-DDThh:mm:ss"`
80
+ * - Millisecond precision `"YYYY-MM-DDThh:mm:ss.fff"`
81
+ */
82
+ max: string | undefined;
83
+
84
+ /**
85
+ * A placeholder string for the date field.
86
+ * @attr {string} date-placeholder
87
+ */
88
+ datePlaceholder: string | null | undefined;
89
+
90
+ /**
91
+ * A placeholder string for the time field.
92
+ * @attr {string} time-placeholder
93
+ */
94
+ timePlaceholder: string | null | undefined;
95
+
96
+ /**
97
+ * Specifies the number of valid intervals in a day used for
98
+ * configuring the items displayed in the time selection box.
99
+ *
100
+ * It also configures the precision of the time part of the value string. By default
101
+ * the component formats time values as `hh:mm` but setting a step value
102
+ * lower than one minute or one second, format resolution changes to
103
+ * `hh:mm:ss` and `hh:mm:ss.fff` respectively.
104
+ *
105
+ * Unit must be set in seconds, and for correctly configuring intervals
106
+ * in the dropdown, it need to evenly divide a day.
107
+ *
108
+ * Note: it is possible to define step that is dividing an hour in inexact
109
+ * fragments (i.e. 5760 seconds which equals 1 hour 36 minutes), but it is
110
+ * not recommended to use it for better UX.
111
+ */
112
+ step: number | null | undefined;
113
+
114
+ /**
115
+ * Date which should be visible in the date picker overlay when there is no value selected.
116
+ *
117
+ * The same date formats as for the `value` property are supported but without the time part.
118
+ * @attr {string} initial-position
119
+ */
120
+ initialPosition: string | null | undefined;
121
+
122
+ /**
123
+ * Set true to display ISO-8601 week numbers in the calendar. Notice that
124
+ * displaying week numbers is only supported when `i18n.firstDayOfWeek`
125
+ * is 1 (Monday).
126
+ * @attr {boolean} show-week-numbers
127
+ */
128
+ showWeekNumbers: boolean | null | undefined;
129
+
130
+ /**
131
+ * Set to true to prevent the overlays from opening automatically.
132
+ * @attr {boolean} auto-open-disabled
133
+ */
134
+ autoOpenDisabled: boolean | null | undefined;
135
+
136
+ /**
137
+ * Set to true to make this element read-only.
138
+ */
139
+ readonly: boolean;
140
+
141
+ /**
142
+ * Specify that this control should have input focus when the page loads.
143
+ */
144
+ autofocus: boolean;
145
+
146
+ /**
147
+ * The object used to localize this component.
148
+ * To change the default localization, replace the entire
149
+ * `i18n` object or just the properties you want to modify.
150
+ *
151
+ * The object is a combination of the i18n properties supported by
152
+ * [`<vaadin-date-picker>`](#/elements/vaadin-date-picker) and
153
+ * [`<vaadin-time-picker>`](#/elements/vaadin-time-picker).
154
+ */
155
+ i18n: DateTimePickerI18n;
156
+
157
+ /**
158
+ * A space-delimited list of CSS class names to set on the overlay elements
159
+ * of the internal components controlled by the `<vaadin-date-time-picker>`:
160
+ *
161
+ * - [`<vaadin-date-picker>`](#/elements/vaadin-date-picker#property-overlayClass)
162
+ * - [`<vaadin-time-picker>`](#/elements/vaadin-time-picker#property-overlayClass)
163
+ *
164
+ * @attr {string} overlay-class
165
+ */
166
+ overlayClass: string;
167
+ }