@vaadin/vaadin-date-time-picker 22.0.0-alpha6 → 22.0.0-beta1

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,10 +1,29 @@
1
1
  {
2
2
  "name": "@vaadin/vaadin-date-time-picker",
3
- "version": "22.0.0-alpha6",
3
+ "version": "22.0.0-beta1",
4
+ "publishConfig": {
5
+ "access": "public"
6
+ },
4
7
  "description": "vaadin-date-time-picker",
8
+ "license": "Apache-2.0",
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "https://github.com/vaadin/web-components.git",
12
+ "directory": "packages/vaadin-date-time-picker"
13
+ },
14
+ "author": "Vaadin Ltd",
15
+ "homepage": "https://vaadin.com/components",
16
+ "bugs": {
17
+ "url": "https://github.com/vaadin/vaadin-date-time-picker/issues"
18
+ },
5
19
  "main": "vaadin-date-time-picker.js",
6
20
  "module": "vaadin-date-time-picker.js",
7
- "repository": "vaadin/vaadin-date-time-picker",
21
+ "files": [
22
+ "src",
23
+ "theme",
24
+ "vaadin-*.d.ts",
25
+ "vaadin-*.js"
26
+ ],
8
27
  "keywords": [
9
28
  "Vaadin",
10
29
  "vaadin-date-time-picker",
@@ -12,35 +31,8 @@
12
31
  "web-component",
13
32
  "polymer"
14
33
  ],
15
- "author": "Vaadin Ltd",
16
- "license": "Apache-2.0",
17
- "bugs": {
18
- "url": "https://github.com/vaadin/vaadin-date-time-picker/issues"
19
- },
20
- "homepage": "https://vaadin.com/components",
21
- "files": [
22
- "vaadin-*.d.ts",
23
- "vaadin-*.js",
24
- "src",
25
- "theme"
26
- ],
27
34
  "dependencies": {
28
- "@polymer/polymer": "^3.0.0",
29
- "@vaadin/vaadin-custom-field": "^22.0.0-alpha6",
30
- "@vaadin/vaadin-date-picker": "^22.0.0-alpha6",
31
- "@vaadin/vaadin-element-mixin": "^22.0.0-alpha6",
32
- "@vaadin/vaadin-lumo-styles": "^22.0.0-alpha6",
33
- "@vaadin/vaadin-material-styles": "^22.0.0-alpha6",
34
- "@vaadin/vaadin-themable-mixin": "^22.0.0-alpha6",
35
- "@vaadin/vaadin-time-picker": "^22.0.0-alpha6"
36
- },
37
- "devDependencies": {
38
- "@esm-bundle/chai": "^4.3.4",
39
- "@vaadin/testing-helpers": "^0.3.0",
40
- "sinon": "^9.2.1"
41
- },
42
- "publishConfig": {
43
- "access": "public"
35
+ "@vaadin/date-time-picker": "22.0.0-beta1"
44
36
  },
45
- "gitHead": "4b136b1c7da8942960e7255f40c27859125b3a45"
37
+ "gitHead": "4cf8a9d0504994200c610e44b3676114fef49c1e"
46
38
  }
@@ -1,230 +1,18 @@
1
- import { ElementMixin } from '@vaadin/vaadin-element-mixin/vaadin-element-mixin.js';
2
-
3
- import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
4
-
5
- import { DateTimePickerEventMap, DateTimePickerI18n } from './interfaces';
6
-
7
1
  /**
8
- * `<vaadin-date-time-picker>` is a Web Component providing a date time selection field.
9
- *
10
- * ```html
11
- * <vaadin-date-time-picker value="2019-09-16T15:00"></vaadin-date-time-picker>
12
- * ```
13
- *
14
- * ```js
15
- * dateTimePicker.value = '2019-09-16T15:00';
16
- * ```
17
- *
18
- * When the selected `value` is changed, a `value-changed` event is triggered.
19
- *
20
- * ### Styling
21
- *
22
- * The following shadow DOM parts are available for styling:
23
- *
24
- * Part name | Description | Theme for Element
25
- * ----------|-------------|------------------
26
- * `date` | Date picker element | vaadin-date-time-picker
27
- * `time` | Time picker element | vaadin-date-time-picker
28
- *
29
- * The following state attributes are available for styling:
30
- *
31
- * Attribute | Description | Part name
32
- * ----------|-------------|----------
33
- * `disabled` | Set when the element is disabled | :host
34
- * `readonly` | Set when the element is read-only | :host
35
- *
36
- * See [ThemableMixin – Stylable Shadow Parts](https://github.com/vaadin/vaadin-themable-mixin#stylable-shadow-parts)
37
- *
38
- * ### Internal components
39
- *
40
- * In addition to `<vaadin-date-time-picker>` itself, the following internal
41
- * components are themable:
42
- *
43
- * - `<vaadin-date-time-picker-date-picker>` - has the same API as [`<vaadin-date-picker>`](#/elements/vaadin-date-picker).
44
- * - `<vaadin-date-time-picker-time-picker>` - has the same API as [`<vaadin-time-picker>`](#/elements/vaadin-time-picker).
45
- * - `<vaadin-date-time-picker-date-text-field>` - has the same API as [`<vaadin-text-field>`](#/elements/vaadin-text-field).
46
- * - `<vaadin-date-time-picker-time-text-field>` - has the same API as [`<vaadin-text-field>`](#/elements/vaadin-text-field).
47
- * - `<vaadin-date-time-picker-custom-field>` - has the same API as [`<vaadin-custom-field>`](#/elements/vaadin-custom-field).
48
- *
49
- * Note: the `theme` attribute value set on `<vaadin-date-time-picker>` is
50
- * propagated to the internal components listed above.
51
- *
52
- * @fires {Event} change - Fired when the user commits a value change.
53
- * @fires {CustomEvent} invalid-changed - Fired when the `invalid` property changes.
54
- * @fires {CustomEvent} value-changed - Fired when the `value` property changes.
2
+ * @license
3
+ * Copyright (c) 2021 Vaadin Ltd.
4
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
55
5
  */
56
- declare class DateTimePickerElement extends ElementMixin(ThemableMixin(HTMLElement)) {
57
- /**
58
- * The name of the control, which is submitted with the form data.
59
- */
60
- name: string | null | undefined;
61
-
62
- /**
63
- * Set to true if the value is invalid.
64
- */
65
- invalid: boolean;
66
-
67
- /**
68
- * Set to true to mark the input as required.
69
- */
70
- required: boolean;
71
-
72
- /**
73
- * The error message to display when the input is invalid.
74
- * @attr {string} error-message
75
- */
76
- errorMessage: string | null | undefined;
77
-
78
- /**
79
- * The value for this element.
80
- *
81
- * Supported date time format is based on ISO 8601 (without a time zone designator):
82
- * - Minute precision `"YYYY-MM-DDThh:mm"` (default)
83
- * - Second precision `"YYYY-MM-DDThh:mm:ss"`
84
- * - Millisecond precision `"YYYY-MM-DDThh:mm:ss.fff"`
85
- */
86
- value: string;
87
-
88
- /**
89
- * The earliest allowed value (date and time) that can be selected. All earlier values will be disabled.
90
- *
91
- * Supported date time format is based on ISO 8601 (without a time zone designator):
92
- * - Minute precision `"YYYY-MM-DDThh:mm"`
93
- * - Second precision `"YYYY-MM-DDThh:mm:ss"`
94
- * - Millisecond precision `"YYYY-MM-DDThh:mm:ss.fff"`
95
- */
96
- min: string | undefined;
97
-
98
- /**
99
- * The latest value (date and time) that can be selected. All later values will be disabled.
100
- *
101
- * Supported date time format is based on ISO 8601 (without a time zone designator):
102
- * - Minute precision `"YYYY-MM-DDThh:mm"`
103
- * - Second precision `"YYYY-MM-DDThh:mm:ss"`
104
- * - Millisecond precision `"YYYY-MM-DDThh:mm:ss.fff"`
105
- */
106
- max: string | undefined;
107
-
108
- /**
109
- * A placeholder string for the date field.
110
- * @attr {string} date-placeholder
111
- */
112
- datePlaceholder: string | null | undefined;
113
-
114
- /**
115
- * A placeholder string for the time field.
116
- * @attr {string} time-placeholder
117
- */
118
- timePlaceholder: string | null | undefined;
119
-
120
- /**
121
- * String used for the helper text.
122
- * @attr {string} helper-text
123
- */
124
- helperText: string | null | undefined;
125
-
126
- /**
127
- * Specifies the number of valid intervals in a day used for
128
- * configuring the items displayed in the time selection box.
129
- *
130
- * It also configures the precision of the time part of the value string. By default
131
- * the component formats time values as `hh:mm` but setting a step value
132
- * lower than one minute or one second, format resolution changes to
133
- * `hh:mm:ss` and `hh:mm:ss.fff` respectively.
134
- *
135
- * Unit must be set in seconds, and for correctly configuring intervals
136
- * in the dropdown, it need to evenly divide a day.
137
- *
138
- * Note: it is possible to define step that is dividing an hour in inexact
139
- * fragments (i.e. 5760 seconds which equals 1 hour 36 minutes), but it is
140
- * not recommended to use it for better UX.
141
- */
142
- step: number | null | undefined;
143
-
144
- /**
145
- * Date which should be visible in the date picker overlay when there is no value selected.
146
- *
147
- * The same date formats as for the `value` property are supported but without the time part.
148
- * @attr {string} initial-position
149
- */
150
- initialPosition: string | null | undefined;
6
+ import { DateTimePicker } from '@vaadin/date-time-picker/src/vaadin-date-time-picker.js';
151
7
 
152
- /**
153
- * Set true to display ISO-8601 week numbers in the calendar. Notice that
154
- * displaying week numbers is only supported when `i18n.firstDayOfWeek`
155
- * is 1 (Monday).
156
- * @attr {boolean} show-week-numbers
157
- */
158
- showWeekNumbers: boolean | null | undefined;
159
-
160
- /**
161
- * String used for the label element.
162
- */
163
- label: string;
164
-
165
- /**
166
- * Set to true to prevent the overlays from opening automatically.
167
- * @attr {boolean} auto-open-disabled
168
- */
169
- autoOpenDisabled: boolean | null | undefined;
170
-
171
- /**
172
- * Set to true to disable this element.
173
- */
174
- disabled: boolean;
175
-
176
- /**
177
- * Set to true to make this element read-only.
178
- */
179
- readonly: boolean;
180
-
181
- /**
182
- * Specify that this control should have input focus when the page loads.
183
- */
184
- autofocus: boolean;
185
-
186
- /**
187
- * The object used to localize this component.
188
- * To change the default localization, replace the entire
189
- * `i18n` object or just the properties you want to modify.
190
- *
191
- * The object is a combination of the i18n properties supported by
192
- * [`<vaadin-date-picker>`](#/elements/vaadin-date-picker) and
193
- * [`<vaadin-time-picker>`](#/elements/vaadin-time-picker).
194
- */
195
- i18n: DateTimePickerI18n;
196
-
197
- /**
198
- * Returns true if `value` is valid, and sets the `invalid` flag appropriately.
199
- *
200
- * @returns True if the value is valid.
201
- */
202
- validate(): boolean;
203
-
204
- /**
205
- * Returns true if the current input value satisfies all constraints (if any)
206
- *
207
- * You can override the `checkValidity` method for custom validations.
208
- */
209
- checkValidity(): boolean;
210
-
211
- addEventListener<K extends keyof DateTimePickerEventMap>(
212
- type: K,
213
- listener: (this: DateTimePickerElement, ev: DateTimePickerEventMap[K]) => void,
214
- options?: boolean | AddEventListenerOptions
215
- ): void;
216
-
217
- removeEventListener<K extends keyof DateTimePickerEventMap>(
218
- type: K,
219
- listener: (this: DateTimePickerElement, ev: DateTimePickerEventMap[K]) => void,
220
- options?: boolean | EventListenerOptions
221
- ): void;
222
- }
8
+ /**
9
+ * @deprecated Import `DateTimePicker` from `@vaadin/date-time-picker` instead.
10
+ */
11
+ export type DateTimePickerElement = DateTimePicker;
223
12
 
224
- declare global {
225
- interface HTMLElementTagNameMap {
226
- 'vaadin-date-time-picker': DateTimePickerElement;
227
- }
228
- }
13
+ /**
14
+ * @deprecated Import `DateTimePicker` from `@vaadin/date-time-picker` instead.
15
+ */
16
+ export const DateTimePickerElement: typeof DateTimePicker;
229
17
 
230
- export { DateTimePickerElement };
18
+ export * from '@vaadin/date-time-picker/src/vaadin-date-time-picker.js';