@vaadin/date-time-picker 24.3.0-alpha1 → 24.3.0-alpha11

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.3.0-alpha1",
3
+ "version": "24.3.0-alpha11",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -36,24 +36,24 @@
36
36
  ],
37
37
  "dependencies": {
38
38
  "@polymer/polymer": "^3.0.0",
39
- "@vaadin/a11y-base": "24.3.0-alpha1",
40
- "@vaadin/component-base": "24.3.0-alpha1",
41
- "@vaadin/custom-field": "24.3.0-alpha1",
42
- "@vaadin/date-picker": "24.3.0-alpha1",
43
- "@vaadin/field-base": "24.3.0-alpha1",
44
- "@vaadin/time-picker": "24.3.0-alpha1",
45
- "@vaadin/vaadin-lumo-styles": "24.3.0-alpha1",
46
- "@vaadin/vaadin-material-styles": "24.3.0-alpha1",
47
- "@vaadin/vaadin-themable-mixin": "24.3.0-alpha1"
39
+ "@vaadin/a11y-base": "24.3.0-alpha11",
40
+ "@vaadin/component-base": "24.3.0-alpha11",
41
+ "@vaadin/custom-field": "24.3.0-alpha11",
42
+ "@vaadin/date-picker": "24.3.0-alpha11",
43
+ "@vaadin/field-base": "24.3.0-alpha11",
44
+ "@vaadin/time-picker": "24.3.0-alpha11",
45
+ "@vaadin/vaadin-lumo-styles": "24.3.0-alpha11",
46
+ "@vaadin/vaadin-material-styles": "24.3.0-alpha11",
47
+ "@vaadin/vaadin-themable-mixin": "24.3.0-alpha11"
48
48
  },
49
49
  "devDependencies": {
50
50
  "@esm-bundle/chai": "^4.3.4",
51
- "@vaadin/testing-helpers": "^0.5.0",
51
+ "@vaadin/testing-helpers": "^0.6.0",
52
52
  "sinon": "^13.0.2"
53
53
  },
54
54
  "web-types": [
55
55
  "web-types.json",
56
56
  "web-types.lit.json"
57
57
  ],
58
- "gitHead": "9ca6f3ca220a777e8eea181a1f5717e39a732240"
58
+ "gitHead": "123cf569a1b6ef6f4ef5fe8e60cb8d988699b98c"
59
59
  }
@@ -39,11 +39,6 @@ export type DateTimePickerChangeEvent = Event & {
39
39
  */
40
40
  export type DateTimePickerInvalidChangedEvent = CustomEvent<{ value: boolean }>;
41
41
 
42
- /**
43
- * Fired when the `dirty` property changes.
44
- */
45
- export type DateTimePickerDirtyChangedEvent = CustomEvent<{ value: boolean }>;
46
-
47
42
  /**
48
43
  * Fired when the `value` property changes.
49
44
  */
@@ -57,8 +52,6 @@ export type DateTimePickerValidatedEvent = CustomEvent<{ valid: boolean }>;
57
52
  export interface DateTimePickerCustomEventMap {
58
53
  'invalid-changed': DateTimePickerInvalidChangedEvent;
59
54
 
60
- 'dirty-changed': DateTimePickerDirtyChangedEvent;
61
-
62
55
  'value-changed': DateTimePickerValueChangedEvent;
63
56
 
64
57
  validated: DateTimePickerValidatedEvent;
@@ -120,7 +113,6 @@ export interface DateTimePickerEventMap extends DateTimePickerCustomEventMap, HT
120
113
  *
121
114
  * @fires {Event} change - Fired when the user commits a value change.
122
115
  * @fires {CustomEvent} invalid-changed - Fired when the `invalid` property changes.
123
- * @fires {CustomEvent} dirty-changed - Fired when the `dirty` property changes.
124
116
  * @fires {CustomEvent} value-changed - Fired when the `value` property changes.
125
117
  * @fires {CustomEvent} validated - Fired whenever the field is validated.
126
118
  */
@@ -222,15 +214,6 @@ declare class DateTimePicker extends FieldMixin(DisabledMixin(FocusMixin(Themabl
222
214
  */
223
215
  autofocus: boolean;
224
216
 
225
- /**
226
- * Whether the field is dirty.
227
- *
228
- * The field is automatically marked as dirty once the user triggers
229
- * an `input` or `change` event on the child pickers. Additionally, the field
230
- * can be manually marked as dirty by setting the property to `true`.
231
- */
232
- dirty: boolean;
233
-
234
217
  /**
235
218
  * The object used to localize this component.
236
219
  * To change the default localization, replace the entire
@@ -324,19 +324,6 @@ class DateTimePicker extends FieldMixin(DisabledMixin(FocusMixin(ThemableMixin(E
324
324
  type: Boolean,
325
325
  },
326
326
 
327
- /**
328
- * Whether the field is dirty.
329
- *
330
- * The field is automatically marked as dirty once the user triggers
331
- * an `input` or `change` event on the child pickers. Additionally, the field
332
- * can be manually marked as dirty by setting the property to `true`.
333
- */
334
- dirty: {
335
- type: Boolean,
336
- value: false,
337
- notify: true,
338
- },
339
-
340
327
  /**
341
328
  * The current selected date time.
342
329
  * @private
@@ -424,7 +411,6 @@ class DateTimePicker extends FieldMixin(DisabledMixin(FocusMixin(ThemableMixin(E
424
411
  this.__defaultTimeMaxValue = '23:59:59.999';
425
412
 
426
413
  this.__changeEventHandler = this.__changeEventHandler.bind(this);
427
- this.__dirtyChangedEventHandler = this.__dirtyChangedEventHandler.bind(this);
428
414
  this.__valueChangedEventHandler = this.__valueChangedEventHandler.bind(this);
429
415
  }
430
416
 
@@ -532,24 +518,15 @@ class DateTimePicker extends FieldMixin(DisabledMixin(FocusMixin(ThemableMixin(E
532
518
  this.__dispatchChangeForValue = undefined;
533
519
  }
534
520
 
535
- /** @private */
536
- __dirtyChangedEventHandler(event) {
537
- if (event.detail.value) {
538
- this.dirty = true;
539
- }
540
- }
541
-
542
521
  /** @private */
543
522
  __addInputListeners(node) {
544
523
  node.addEventListener('change', this.__changeEventHandler);
545
- node.addEventListener('dirty-changed', this.__dirtyChangedEventHandler);
546
524
  node.addEventListener('value-changed', this.__valueChangedEventHandler);
547
525
  }
548
526
 
549
527
  /** @private */
550
528
  __removeInputListeners(node) {
551
529
  node.removeEventListener('change', this.__changeEventHandler);
552
- node.removeEventListener('dirty-changed', this.__dirtyChangedEventHandler);
553
530
  node.removeEventListener('value-changed', this.__valueChangedEventHandler);
554
531
  }
555
532
 
package/web-types.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/date-time-picker",
4
- "version": "24.3.0-alpha1",
4
+ "version": "24.3.0-alpha11",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
8
8
  "elements": [
9
9
  {
10
10
  "name": "vaadin-date-time-picker",
11
- "description": "`<vaadin-date-time-picker>` is a Web Component providing a date time selection field.\n\n```html\n<vaadin-date-time-picker value=\"2019-09-16T15:00\"></vaadin-date-time-picker>\n```\n```js\ndateTimePicker.value = '2019-09-16T15:00';\n```\n\nWhen the selected `value` is changed, a `value-changed` event is triggered.\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n---------------------|----------------\n`label` | The slotted label element wrapper\n`helper-text` | The slotted helper text element wrapper\n`error-message` | The slotted error message element wrapper\n`required-indicator` | The `required` state indicator element\n\nThe following state attributes are available for styling:\n\nAttribute | Description | Part name\n--------------------|-------------------------------------------|------------\n`disabled` | Set when the element is disabled | :host\n`focused` | Set when the element is focused | :host\n`focus-ring` | Set when the element is keyboard focused | :host\n`readonly` | Set when the element is readonly | :host\n`invalid` | Set when the element is invalid | :host\n`has-label` | Set when the element has a label | :host\n`has-value` | Set when the element has a value | :host\n`has-helper` | Set when the element has helper text | :host\n`has-error-message` | Set when the element has an error message | :host\n\n### Internal components\n\nThe following components are created by `<vaadin-date-time-picker>` and placed in light DOM:\n\n- [`<vaadin-date-picker>`](https://cdn.vaadin.com/vaadin-web-components/24.3.0-alpha1/#/elements/vaadin-date-picker).\n- [`<vaadin-time-picker>`](https://cdn.vaadin.com/vaadin-web-components/24.3.0-alpha1/#/elements/vaadin-time-picker).\n\nNote: the `theme` attribute value set on `<vaadin-date-time-picker>` is\npropagated to these components.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
11
+ "description": "`<vaadin-date-time-picker>` is a Web Component providing a date time selection field.\n\n```html\n<vaadin-date-time-picker value=\"2019-09-16T15:00\"></vaadin-date-time-picker>\n```\n```js\ndateTimePicker.value = '2019-09-16T15:00';\n```\n\nWhen the selected `value` is changed, a `value-changed` event is triggered.\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n---------------------|----------------\n`label` | The slotted label element wrapper\n`helper-text` | The slotted helper text element wrapper\n`error-message` | The slotted error message element wrapper\n`required-indicator` | The `required` state indicator element\n\nThe following state attributes are available for styling:\n\nAttribute | Description | Part name\n--------------------|-------------------------------------------|------------\n`disabled` | Set when the element is disabled | :host\n`focused` | Set when the element is focused | :host\n`focus-ring` | Set when the element is keyboard focused | :host\n`readonly` | Set when the element is readonly | :host\n`invalid` | Set when the element is invalid | :host\n`has-label` | Set when the element has a label | :host\n`has-value` | Set when the element has a value | :host\n`has-helper` | Set when the element has helper text | :host\n`has-error-message` | Set when the element has an error message | :host\n\n### Internal components\n\nThe following components are created by `<vaadin-date-time-picker>` and placed in light DOM:\n\n- [`<vaadin-date-picker>`](https://cdn.vaadin.com/vaadin-web-components/24.3.0-alpha11/#/elements/vaadin-date-picker).\n- [`<vaadin-time-picker>`](https://cdn.vaadin.com/vaadin-web-components/24.3.0-alpha11/#/elements/vaadin-time-picker).\n\nNote: the `theme` attribute value set on `<vaadin-date-time-picker>` is\npropagated to these components.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
12
12
  "attributes": [
13
13
  {
14
14
  "name": "disabled",
@@ -222,20 +222,9 @@
222
222
  ]
223
223
  }
224
224
  },
225
- {
226
- "name": "dirty",
227
- "description": "Whether the field is dirty.\n\nThe field is automatically marked as dirty once the user triggers\nan `input` or `change` event on the child pickers. Additionally, the field\ncan be manually marked as dirty by setting the property to `true`.",
228
- "value": {
229
- "type": [
230
- "boolean",
231
- "null",
232
- "undefined"
233
- ]
234
- }
235
- },
236
225
  {
237
226
  "name": "overlay-class",
238
- "description": "A space-delimited list of CSS class names to set on the overlay elements\nof the internal components controlled by the `<vaadin-date-time-picker>`:\n\n- [`<vaadin-date-picker>`](https://cdn.vaadin.com/vaadin-web-components/24.3.0-alpha1/#/elements/vaadin-date-picker#property-overlayClass)\n- [`<vaadin-time-picker>`](https://cdn.vaadin.com/vaadin-web-components/24.3.0-alpha1/#/elements/vaadin-time-picker#property-overlayClass)",
227
+ "description": "A space-delimited list of CSS class names to set on the overlay elements\nof the internal components controlled by the `<vaadin-date-time-picker>`:\n\n- [`<vaadin-date-picker>`](https://cdn.vaadin.com/vaadin-web-components/24.3.0-alpha11/#/elements/vaadin-date-picker#property-overlayClass)\n- [`<vaadin-time-picker>`](https://cdn.vaadin.com/vaadin-web-components/24.3.0-alpha11/#/elements/vaadin-time-picker#property-overlayClass)",
239
228
  "value": {
240
229
  "type": [
241
230
  "string",
@@ -470,20 +459,9 @@
470
459
  ]
471
460
  }
472
461
  },
473
- {
474
- "name": "dirty",
475
- "description": "Whether the field is dirty.\n\nThe field is automatically marked as dirty once the user triggers\nan `input` or `change` event on the child pickers. Additionally, the field\ncan be manually marked as dirty by setting the property to `true`.",
476
- "value": {
477
- "type": [
478
- "boolean",
479
- "null",
480
- "undefined"
481
- ]
482
- }
483
- },
484
462
  {
485
463
  "name": "i18n",
486
- "description": "The object used to localize this component.\nTo change the default localization, replace the entire\n`i18n` object or just the properties you want to modify.\n\nThe object is a combination of the i18n properties supported by\n[`<vaadin-date-picker>`](https://cdn.vaadin.com/vaadin-web-components/24.3.0-alpha1/#/elements/vaadin-date-picker) and\n[`<vaadin-time-picker>`](https://cdn.vaadin.com/vaadin-web-components/24.3.0-alpha1/#/elements/vaadin-time-picker).",
464
+ "description": "The object used to localize this component.\nTo change the default localization, replace the entire\n`i18n` object or just the properties you want to modify.\n\nThe object is a combination of the i18n properties supported by\n[`<vaadin-date-picker>`](https://cdn.vaadin.com/vaadin-web-components/24.3.0-alpha11/#/elements/vaadin-date-picker) and\n[`<vaadin-time-picker>`](https://cdn.vaadin.com/vaadin-web-components/24.3.0-alpha11/#/elements/vaadin-time-picker).",
487
465
  "value": {
488
466
  "type": [
489
467
  "DateTimePickerI18n"
@@ -492,7 +470,7 @@
492
470
  },
493
471
  {
494
472
  "name": "overlayClass",
495
- "description": "A space-delimited list of CSS class names to set on the overlay elements\nof the internal components controlled by the `<vaadin-date-time-picker>`:\n\n- [`<vaadin-date-picker>`](https://cdn.vaadin.com/vaadin-web-components/24.3.0-alpha1/#/elements/vaadin-date-picker#property-overlayClass)\n- [`<vaadin-time-picker>`](https://cdn.vaadin.com/vaadin-web-components/24.3.0-alpha1/#/elements/vaadin-time-picker#property-overlayClass)",
473
+ "description": "A space-delimited list of CSS class names to set on the overlay elements\nof the internal components controlled by the `<vaadin-date-time-picker>`:\n\n- [`<vaadin-date-picker>`](https://cdn.vaadin.com/vaadin-web-components/24.3.0-alpha11/#/elements/vaadin-date-picker#property-overlayClass)\n- [`<vaadin-time-picker>`](https://cdn.vaadin.com/vaadin-web-components/24.3.0-alpha11/#/elements/vaadin-time-picker#property-overlayClass)",
496
474
  "value": {
497
475
  "type": [
498
476
  "string",
@@ -515,10 +493,6 @@
515
493
  "name": "value-changed",
516
494
  "description": "Fired when the `value` property changes."
517
495
  },
518
- {
519
- "name": "dirty-changed",
520
- "description": "Fired when the `dirty` property changes."
521
- },
522
496
  {
523
497
  "name": "invalid-changed",
524
498
  "description": "Fired when the `invalid` property changes."
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/date-time-picker",
4
- "version": "24.3.0-alpha1",
4
+ "version": "24.3.0-alpha11",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {
@@ -16,7 +16,7 @@
16
16
  "elements": [
17
17
  {
18
18
  "name": "vaadin-date-time-picker",
19
- "description": "`<vaadin-date-time-picker>` is a Web Component providing a date time selection field.\n\n```html\n<vaadin-date-time-picker value=\"2019-09-16T15:00\"></vaadin-date-time-picker>\n```\n```js\ndateTimePicker.value = '2019-09-16T15:00';\n```\n\nWhen the selected `value` is changed, a `value-changed` event is triggered.\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n---------------------|----------------\n`label` | The slotted label element wrapper\n`helper-text` | The slotted helper text element wrapper\n`error-message` | The slotted error message element wrapper\n`required-indicator` | The `required` state indicator element\n\nThe following state attributes are available for styling:\n\nAttribute | Description | Part name\n--------------------|-------------------------------------------|------------\n`disabled` | Set when the element is disabled | :host\n`focused` | Set when the element is focused | :host\n`focus-ring` | Set when the element is keyboard focused | :host\n`readonly` | Set when the element is readonly | :host\n`invalid` | Set when the element is invalid | :host\n`has-label` | Set when the element has a label | :host\n`has-value` | Set when the element has a value | :host\n`has-helper` | Set when the element has helper text | :host\n`has-error-message` | Set when the element has an error message | :host\n\n### Internal components\n\nThe following components are created by `<vaadin-date-time-picker>` and placed in light DOM:\n\n- [`<vaadin-date-picker>`](https://cdn.vaadin.com/vaadin-web-components/24.3.0-alpha1/#/elements/vaadin-date-picker).\n- [`<vaadin-time-picker>`](https://cdn.vaadin.com/vaadin-web-components/24.3.0-alpha1/#/elements/vaadin-time-picker).\n\nNote: the `theme` attribute value set on `<vaadin-date-time-picker>` is\npropagated to these components.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
19
+ "description": "`<vaadin-date-time-picker>` is a Web Component providing a date time selection field.\n\n```html\n<vaadin-date-time-picker value=\"2019-09-16T15:00\"></vaadin-date-time-picker>\n```\n```js\ndateTimePicker.value = '2019-09-16T15:00';\n```\n\nWhen the selected `value` is changed, a `value-changed` event is triggered.\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n---------------------|----------------\n`label` | The slotted label element wrapper\n`helper-text` | The slotted helper text element wrapper\n`error-message` | The slotted error message element wrapper\n`required-indicator` | The `required` state indicator element\n\nThe following state attributes are available for styling:\n\nAttribute | Description | Part name\n--------------------|-------------------------------------------|------------\n`disabled` | Set when the element is disabled | :host\n`focused` | Set when the element is focused | :host\n`focus-ring` | Set when the element is keyboard focused | :host\n`readonly` | Set when the element is readonly | :host\n`invalid` | Set when the element is invalid | :host\n`has-label` | Set when the element has a label | :host\n`has-value` | Set when the element has a value | :host\n`has-helper` | Set when the element has helper text | :host\n`has-error-message` | Set when the element has an error message | :host\n\n### Internal components\n\nThe following components are created by `<vaadin-date-time-picker>` and placed in light DOM:\n\n- [`<vaadin-date-picker>`](https://cdn.vaadin.com/vaadin-web-components/24.3.0-alpha11/#/elements/vaadin-date-picker).\n- [`<vaadin-time-picker>`](https://cdn.vaadin.com/vaadin-web-components/24.3.0-alpha11/#/elements/vaadin-time-picker).\n\nNote: the `theme` attribute value set on `<vaadin-date-time-picker>` is\npropagated to these components.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
20
20
  "extension": true,
21
21
  "attributes": [
22
22
  {
@@ -68,13 +68,6 @@
68
68
  "kind": "expression"
69
69
  }
70
70
  },
71
- {
72
- "name": "?dirty",
73
- "description": "Whether the field is dirty.\n\nThe field is automatically marked as dirty once the user triggers\nan `input` or `change` event on the child pickers. Additionally, the field\ncan be manually marked as dirty by setting the property to `true`.",
74
- "value": {
75
- "kind": "expression"
76
- }
77
- },
78
71
  {
79
72
  "name": ".label",
80
73
  "description": "The label text for the input node.\nWhen no light dom defined via [slot=label], this value will be used.",
@@ -168,14 +161,14 @@
168
161
  },
169
162
  {
170
163
  "name": ".i18n",
171
- "description": "The object used to localize this component.\nTo change the default localization, replace the entire\n`i18n` object or just the properties you want to modify.\n\nThe object is a combination of the i18n properties supported by\n[`<vaadin-date-picker>`](https://cdn.vaadin.com/vaadin-web-components/24.3.0-alpha1/#/elements/vaadin-date-picker) and\n[`<vaadin-time-picker>`](https://cdn.vaadin.com/vaadin-web-components/24.3.0-alpha1/#/elements/vaadin-time-picker).",
164
+ "description": "The object used to localize this component.\nTo change the default localization, replace the entire\n`i18n` object or just the properties you want to modify.\n\nThe object is a combination of the i18n properties supported by\n[`<vaadin-date-picker>`](https://cdn.vaadin.com/vaadin-web-components/24.3.0-alpha11/#/elements/vaadin-date-picker) and\n[`<vaadin-time-picker>`](https://cdn.vaadin.com/vaadin-web-components/24.3.0-alpha11/#/elements/vaadin-time-picker).",
172
165
  "value": {
173
166
  "kind": "expression"
174
167
  }
175
168
  },
176
169
  {
177
170
  "name": ".overlayClass",
178
- "description": "A space-delimited list of CSS class names to set on the overlay elements\nof the internal components controlled by the `<vaadin-date-time-picker>`:\n\n- [`<vaadin-date-picker>`](https://cdn.vaadin.com/vaadin-web-components/24.3.0-alpha1/#/elements/vaadin-date-picker#property-overlayClass)\n- [`<vaadin-time-picker>`](https://cdn.vaadin.com/vaadin-web-components/24.3.0-alpha1/#/elements/vaadin-time-picker#property-overlayClass)",
171
+ "description": "A space-delimited list of CSS class names to set on the overlay elements\nof the internal components controlled by the `<vaadin-date-time-picker>`:\n\n- [`<vaadin-date-picker>`](https://cdn.vaadin.com/vaadin-web-components/24.3.0-alpha11/#/elements/vaadin-date-picker#property-overlayClass)\n- [`<vaadin-time-picker>`](https://cdn.vaadin.com/vaadin-web-components/24.3.0-alpha11/#/elements/vaadin-time-picker#property-overlayClass)",
179
172
  "value": {
180
173
  "kind": "expression"
181
174
  }
@@ -201,13 +194,6 @@
201
194
  "kind": "expression"
202
195
  }
203
196
  },
204
- {
205
- "name": "@dirty-changed",
206
- "description": "Fired when the `dirty` property changes.",
207
- "value": {
208
- "kind": "expression"
209
- }
210
- },
211
197
  {
212
198
  "name": "@invalid-changed",
213
199
  "description": "Fired when the `invalid` property changes.",