@vaadin/time-picker 24.1.6 → 24.1.8
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 +11 -11
- package/src/vaadin-time-picker.js +19 -3
- package/web-types.json +2 -2
- package/web-types.lit.json +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/time-picker",
|
|
3
|
-
"version": "24.1.
|
|
3
|
+
"version": "24.1.8",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -36,15 +36,15 @@
|
|
|
36
36
|
],
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@polymer/polymer": "^3.0.0",
|
|
39
|
-
"@vaadin/combo-box": "~24.1.
|
|
40
|
-
"@vaadin/component-base": "~24.1.
|
|
41
|
-
"@vaadin/field-base": "~24.1.
|
|
42
|
-
"@vaadin/input-container": "~24.1.
|
|
43
|
-
"@vaadin/item": "~24.1.
|
|
44
|
-
"@vaadin/overlay": "~24.1.
|
|
45
|
-
"@vaadin/vaadin-lumo-styles": "~24.1.
|
|
46
|
-
"@vaadin/vaadin-material-styles": "~24.1.
|
|
47
|
-
"@vaadin/vaadin-themable-mixin": "~24.1.
|
|
39
|
+
"@vaadin/combo-box": "~24.1.8",
|
|
40
|
+
"@vaadin/component-base": "~24.1.8",
|
|
41
|
+
"@vaadin/field-base": "~24.1.8",
|
|
42
|
+
"@vaadin/input-container": "~24.1.8",
|
|
43
|
+
"@vaadin/item": "~24.1.8",
|
|
44
|
+
"@vaadin/overlay": "~24.1.8",
|
|
45
|
+
"@vaadin/vaadin-lumo-styles": "~24.1.8",
|
|
46
|
+
"@vaadin/vaadin-material-styles": "~24.1.8",
|
|
47
|
+
"@vaadin/vaadin-themable-mixin": "~24.1.8"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@esm-bundle/chai": "^4.3.4",
|
|
@@ -55,5 +55,5 @@
|
|
|
55
55
|
"web-types.json",
|
|
56
56
|
"web-types.lit.json"
|
|
57
57
|
],
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "7dd501f5c346495cb34bc34e06e186bbcde2aa49"
|
|
59
59
|
}
|
|
@@ -484,6 +484,14 @@ class TimePicker extends PatternMixin(InputControlMixin(ThemableMixin(ElementMix
|
|
|
484
484
|
this.__dispatchChange();
|
|
485
485
|
}
|
|
486
486
|
|
|
487
|
+
/** @private */
|
|
488
|
+
__commitPendingValue() {
|
|
489
|
+
if (this.__committedValue !== this.value) {
|
|
490
|
+
this.__dispatchChange();
|
|
491
|
+
this.__committedValue = this.value;
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
|
|
487
495
|
/** @private */
|
|
488
496
|
__dispatchChange() {
|
|
489
497
|
this.dispatchEvent(new CustomEvent('change', { bubbles: true }));
|
|
@@ -615,6 +623,12 @@ class TimePicker extends PatternMixin(InputControlMixin(ThemableMixin(ElementMix
|
|
|
615
623
|
this.__updateInputValue(parsedObj);
|
|
616
624
|
}
|
|
617
625
|
|
|
626
|
+
// Mark value set programmatically by the user
|
|
627
|
+
// as committed for the change event detection.
|
|
628
|
+
if (!this.__skipCommittedValueUpdate) {
|
|
629
|
+
this.__committedValue = this.value;
|
|
630
|
+
}
|
|
631
|
+
|
|
618
632
|
this._toggleHasValue(this._hasValue);
|
|
619
633
|
}
|
|
620
634
|
|
|
@@ -631,7 +645,9 @@ class TimePicker extends PatternMixin(InputControlMixin(ThemableMixin(ElementMix
|
|
|
631
645
|
if (value !== newValue) {
|
|
632
646
|
this._comboBoxValue = newValue;
|
|
633
647
|
} else {
|
|
648
|
+
this.__skipCommittedValueUpdate = true;
|
|
634
649
|
this.__updateValue(parsedObj);
|
|
650
|
+
this.__skipCommittedValueUpdate = false;
|
|
635
651
|
}
|
|
636
652
|
} else {
|
|
637
653
|
// If the user input can not be parsed, set a flag
|
|
@@ -641,17 +657,17 @@ class TimePicker extends PatternMixin(InputControlMixin(ThemableMixin(ElementMix
|
|
|
641
657
|
this.__keepInvalidInput = true;
|
|
642
658
|
}
|
|
643
659
|
|
|
660
|
+
this.__skipCommittedValueUpdate = true;
|
|
644
661
|
this.value = '';
|
|
662
|
+
this.__skipCommittedValueUpdate = false;
|
|
645
663
|
}
|
|
646
664
|
}
|
|
647
665
|
|
|
648
666
|
/** @private */
|
|
649
667
|
__onComboBoxChange(event) {
|
|
650
668
|
event.stopPropagation();
|
|
651
|
-
|
|
652
669
|
this.validate();
|
|
653
|
-
|
|
654
|
-
this.__dispatchChange();
|
|
670
|
+
this.__commitPendingValue();
|
|
655
671
|
}
|
|
656
672
|
|
|
657
673
|
/**
|
package/web-types.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/web-types",
|
|
3
3
|
"name": "@vaadin/time-picker",
|
|
4
|
-
"version": "24.1.
|
|
4
|
+
"version": "24.1.8",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
8
8
|
"elements": [
|
|
9
9
|
{
|
|
10
10
|
"name": "vaadin-time-picker",
|
|
11
|
-
"description": "`<vaadin-time-picker>` is a Web Component providing a time-selection field.\n\n```html\n<vaadin-time-picker></vaadin-time-picker>\n```\n```js\ntimePicker.value = '14:30';\n```\n\nWhen the selected `value` is changed, a `value-changed` event is triggered.\n\n### Styling\n\nThe following custom properties are available for styling:\n\nCustom property | Description | Default\n----------------------------------------|----------------------------|---------\n`--vaadin-field-default-width` | Default width of the field | `12em`\n`--vaadin-combo-box-overlay-max-height` | Max height of the overlay | `65vh`\n\n`<vaadin-time-picker>` provides the same set of shadow DOM parts and state attributes as `<vaadin-text-field>`.\nSee [`<vaadin-text-field>`](https://cdn.vaadin.com/vaadin-web-components/24.1.
|
|
11
|
+
"description": "`<vaadin-time-picker>` is a Web Component providing a time-selection field.\n\n```html\n<vaadin-time-picker></vaadin-time-picker>\n```\n```js\ntimePicker.value = '14:30';\n```\n\nWhen the selected `value` is changed, a `value-changed` event is triggered.\n\n### Styling\n\nThe following custom properties are available for styling:\n\nCustom property | Description | Default\n----------------------------------------|----------------------------|---------\n`--vaadin-field-default-width` | Default width of the field | `12em`\n`--vaadin-combo-box-overlay-max-height` | Max height of the overlay | `65vh`\n\n`<vaadin-time-picker>` provides the same set of shadow DOM parts and state attributes as `<vaadin-text-field>`.\nSee [`<vaadin-text-field>`](https://cdn.vaadin.com/vaadin-web-components/24.1.8/#/elements/vaadin-text-field) for the styling documentation.\n\nIn addition to `<vaadin-text-field>` parts, the following parts are available for theming:\n\nPart name | Description\n----------------|----------------\n`toggle-button` | The toggle button\n\nIn addition to `<vaadin-text-field>` state attributes, the following state attributes are available for theming:\n\nAttribute | Description\n----------|------------------------------------------\n`opened` | Set when the time-picker dropdown is open\n\n### Internal components\n\nIn addition to `<vaadin-time-picker>` itself, the following internal\ncomponents are themable:\n\n- `<vaadin-time-picker-combo-box>` - has the same API as [`<vaadin-combo-box-light>`](https://cdn.vaadin.com/vaadin-web-components/24.1.8/#/elements/vaadin-combo-box-light).\n- `<vaadin-time-picker-overlay>` - has the same API as [`<vaadin-overlay>`](https://cdn.vaadin.com/vaadin-web-components/24.1.8/#/elements/vaadin-overlay).\n- `<vaadin-time-picker-item>` - has the same API as [`<vaadin-item>`](https://cdn.vaadin.com/vaadin-web-components/24.1.8/#/elements/vaadin-item).\n- [`<vaadin-input-container>`](https://cdn.vaadin.com/vaadin-web-components/24.1.8/#/elements/vaadin-input-container) - an internal element wrapping the input.\n\nNote: the `theme` attribute value set on `<vaadin-time-picker>` is\npropagated to the internal components listed above.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
|
|
12
12
|
"attributes": [
|
|
13
13
|
{
|
|
14
14
|
"name": "disabled",
|
package/web-types.lit.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/web-types",
|
|
3
3
|
"name": "@vaadin/time-picker",
|
|
4
|
-
"version": "24.1.
|
|
4
|
+
"version": "24.1.8",
|
|
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-time-picker",
|
|
19
|
-
"description": "`<vaadin-time-picker>` is a Web Component providing a time-selection field.\n\n```html\n<vaadin-time-picker></vaadin-time-picker>\n```\n```js\ntimePicker.value = '14:30';\n```\n\nWhen the selected `value` is changed, a `value-changed` event is triggered.\n\n### Styling\n\nThe following custom properties are available for styling:\n\nCustom property | Description | Default\n----------------------------------------|----------------------------|---------\n`--vaadin-field-default-width` | Default width of the field | `12em`\n`--vaadin-combo-box-overlay-max-height` | Max height of the overlay | `65vh`\n\n`<vaadin-time-picker>` provides the same set of shadow DOM parts and state attributes as `<vaadin-text-field>`.\nSee [`<vaadin-text-field>`](https://cdn.vaadin.com/vaadin-web-components/24.1.
|
|
19
|
+
"description": "`<vaadin-time-picker>` is a Web Component providing a time-selection field.\n\n```html\n<vaadin-time-picker></vaadin-time-picker>\n```\n```js\ntimePicker.value = '14:30';\n```\n\nWhen the selected `value` is changed, a `value-changed` event is triggered.\n\n### Styling\n\nThe following custom properties are available for styling:\n\nCustom property | Description | Default\n----------------------------------------|----------------------------|---------\n`--vaadin-field-default-width` | Default width of the field | `12em`\n`--vaadin-combo-box-overlay-max-height` | Max height of the overlay | `65vh`\n\n`<vaadin-time-picker>` provides the same set of shadow DOM parts and state attributes as `<vaadin-text-field>`.\nSee [`<vaadin-text-field>`](https://cdn.vaadin.com/vaadin-web-components/24.1.8/#/elements/vaadin-text-field) for the styling documentation.\n\nIn addition to `<vaadin-text-field>` parts, the following parts are available for theming:\n\nPart name | Description\n----------------|----------------\n`toggle-button` | The toggle button\n\nIn addition to `<vaadin-text-field>` state attributes, the following state attributes are available for theming:\n\nAttribute | Description\n----------|------------------------------------------\n`opened` | Set when the time-picker dropdown is open\n\n### Internal components\n\nIn addition to `<vaadin-time-picker>` itself, the following internal\ncomponents are themable:\n\n- `<vaadin-time-picker-combo-box>` - has the same API as [`<vaadin-combo-box-light>`](https://cdn.vaadin.com/vaadin-web-components/24.1.8/#/elements/vaadin-combo-box-light).\n- `<vaadin-time-picker-overlay>` - has the same API as [`<vaadin-overlay>`](https://cdn.vaadin.com/vaadin-web-components/24.1.8/#/elements/vaadin-overlay).\n- `<vaadin-time-picker-item>` - has the same API as [`<vaadin-item>`](https://cdn.vaadin.com/vaadin-web-components/24.1.8/#/elements/vaadin-item).\n- [`<vaadin-input-container>`](https://cdn.vaadin.com/vaadin-web-components/24.1.8/#/elements/vaadin-input-container) - an internal element wrapping the input.\n\nNote: the `theme` attribute value set on `<vaadin-time-picker>` is\npropagated to the internal components listed above.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
|
|
20
20
|
"extension": true,
|
|
21
21
|
"attributes": [
|
|
22
22
|
{
|