@vaadin/time-picker 23.1.0-rc2 → 23.1.1

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/time-picker",
3
- "version": "23.1.0-rc2",
3
+ "version": "23.1.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -34,18 +34,18 @@
34
34
  ],
35
35
  "dependencies": {
36
36
  "@polymer/polymer": "^3.0.0",
37
- "@vaadin/combo-box": "23.1.0-rc2",
38
- "@vaadin/component-base": "23.1.0-rc2",
39
- "@vaadin/field-base": "23.1.0-rc2",
40
- "@vaadin/input-container": "23.1.0-rc2",
41
- "@vaadin/vaadin-lumo-styles": "23.1.0-rc2",
42
- "@vaadin/vaadin-material-styles": "23.1.0-rc2",
43
- "@vaadin/vaadin-themable-mixin": "23.1.0-rc2"
37
+ "@vaadin/combo-box": "^23.1.1",
38
+ "@vaadin/component-base": "^23.1.1",
39
+ "@vaadin/field-base": "^23.1.1",
40
+ "@vaadin/input-container": "^23.1.1",
41
+ "@vaadin/vaadin-lumo-styles": "^23.1.1",
42
+ "@vaadin/vaadin-material-styles": "^23.1.1",
43
+ "@vaadin/vaadin-themable-mixin": "^23.1.1"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@esm-bundle/chai": "^4.3.4",
47
47
  "@vaadin/testing-helpers": "^0.3.2",
48
48
  "sinon": "^13.0.2"
49
49
  },
50
- "gitHead": "154c6782c42145fed21e443559fbe2d781ad3ec7"
50
+ "gitHead": "390458d6519433a2dd502cef90da48e84573a275"
51
51
  }
@@ -14,6 +14,7 @@ import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mix
14
14
  * @extends HTMLElement
15
15
  * @mixes ComboBoxMixin
16
16
  * @mixes ThemableMixin
17
+ * @private
17
18
  */
18
19
  class TimePickerComboBox extends ComboBoxMixin(ThemableMixin(PolymerElement)) {
19
20
  static get is() {
@@ -106,6 +106,7 @@ class TimePicker extends PatternMixin(InputControlMixin(ThemableMixin(ElementMix
106
106
  value="{{_comboBoxValue}}"
107
107
  disabled="[[disabled]]"
108
108
  readonly="[[readonly]]"
109
+ clear-button-visible="[[clearButtonVisible]]"
109
110
  auto-open-disabled="[[autoOpenDisabled]]"
110
111
  position-target="[[_inputContainer]]"
111
112
  theme$="[[_theme]]"
@@ -304,7 +305,7 @@ class TimePicker extends PatternMixin(InputControlMixin(ThemableMixin(ElementMix
304
305
  }
305
306
 
306
307
  /**
307
- * Used by `ClearButtonMixin` as a reference to the clear button element.
308
+ * Used by `InputControlMixin` as a reference to the clear button element.
308
309
  * @protected
309
310
  * @return {!HTMLElement}
310
311
  */
@@ -375,12 +376,13 @@ class TimePicker extends PatternMixin(InputControlMixin(ThemableMixin(ElementMix
375
376
  }
376
377
 
377
378
  /**
378
- * Override an event listener from `ClearButtonMixin`
379
- * to prevent clearing the input value on Esc key.
380
- * @param {Event} event
379
+ * Override an event listener from `KeyboardMixin`.
380
+ * @param {!KeyboardEvent} e
381
381
  * @protected
382
382
  */
383
383
  _onKeyDown(e) {
384
+ super._onKeyDown(e);
385
+
384
386
  if (this.readonly || this.disabled || this.__dropdownItems.length) {
385
387
  return;
386
388
  }
@@ -394,6 +396,17 @@ class TimePicker extends PatternMixin(InputControlMixin(ThemableMixin(ElementMix
394
396
  }
395
397
  }
396
398
 
399
+ /**
400
+ * Override an event listener from `KeyboardMixin`.
401
+ * Do not call `super` in order to override clear
402
+ * button logic defined in `InputControlMixin`.
403
+ * @param {Event} event
404
+ * @protected
405
+ */
406
+ _onEscape() {
407
+ // Do nothing, the internal combo-box handles Escape.
408
+ }
409
+
397
410
  /** @private */
398
411
  __onArrowPressWithStep(step) {
399
412
  const objWithStep = this.__addStep(this.__getMsec(this.__memoValue), step, true);
@@ -646,7 +659,7 @@ class TimePicker extends PatternMixin(InputControlMixin(ThemableMixin(ElementMix
646
659
  }
647
660
 
648
661
  /**
649
- * Override method inherited from `ClearButtonMixin`.
662
+ * Override method inherited from `InputControlMixin`.
650
663
  * @protected
651
664
  */
652
665
  _onClearButtonClick() {}