@vaadin/field-highlighter 23.0.0-alpha1 → 23.0.0-alpha5

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/field-highlighter",
3
- "version": "23.0.0-alpha1",
3
+ "version": "23.0.0-alpha5",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -18,6 +18,7 @@
18
18
  },
19
19
  "main": "vaadin-field-highlighter.js",
20
20
  "module": "vaadin-field-highlighter.js",
21
+ "type": "module",
21
22
  "files": [
22
23
  "src",
23
24
  "theme",
@@ -32,29 +33,28 @@
32
33
  "field"
33
34
  ],
34
35
  "dependencies": {
35
- "@polymer/iron-a11y-announcer": "^3.0.0",
36
36
  "@polymer/polymer": "^3.0.0",
37
- "@vaadin/component-base": "23.0.0-alpha1",
38
- "@vaadin/vaadin-lumo-styles": "23.0.0-alpha1",
39
- "@vaadin/vaadin-material-styles": "23.0.0-alpha1",
40
- "@vaadin/vaadin-overlay": "23.0.0-alpha1",
41
- "@vaadin/vaadin-themable-mixin": "23.0.0-alpha1",
37
+ "@vaadin/component-base": "23.0.0-alpha5",
38
+ "@vaadin/vaadin-lumo-styles": "23.0.0-alpha5",
39
+ "@vaadin/vaadin-material-styles": "23.0.0-alpha5",
40
+ "@vaadin/vaadin-overlay": "23.0.0-alpha5",
41
+ "@vaadin/vaadin-themable-mixin": "23.0.0-alpha5",
42
42
  "lit": "^2.0.0"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@esm-bundle/chai": "^4.3.4",
46
- "@vaadin/checkbox": "23.0.0-alpha1",
47
- "@vaadin/combo-box": "23.0.0-alpha1",
48
- "@vaadin/date-picker": "23.0.0-alpha1",
49
- "@vaadin/date-time-picker": "23.0.0-alpha1",
50
- "@vaadin/item": "23.0.0-alpha1",
51
- "@vaadin/list-box": "23.0.0-alpha1",
52
- "@vaadin/radio-group": "23.0.0-alpha1",
53
- "@vaadin/select": "23.0.0-alpha1",
54
- "@vaadin/testing-helpers": "^0.3.0",
55
- "@vaadin/text-field": "23.0.0-alpha1",
56
- "@vaadin/time-picker": "23.0.0-alpha1",
46
+ "@vaadin/checkbox": "23.0.0-alpha5",
47
+ "@vaadin/combo-box": "23.0.0-alpha5",
48
+ "@vaadin/date-picker": "23.0.0-alpha5",
49
+ "@vaadin/date-time-picker": "23.0.0-alpha5",
50
+ "@vaadin/item": "23.0.0-alpha5",
51
+ "@vaadin/list-box": "23.0.0-alpha5",
52
+ "@vaadin/radio-group": "23.0.0-alpha5",
53
+ "@vaadin/select": "23.0.0-alpha5",
54
+ "@vaadin/testing-helpers": "^0.3.2",
55
+ "@vaadin/text-field": "23.0.0-alpha5",
56
+ "@vaadin/time-picker": "23.0.0-alpha5",
57
57
  "sinon": "^9.2.1"
58
58
  },
59
- "gitHead": "fbcb07328fdf88260e3b461088d207426b21c710"
59
+ "gitHead": "74f9294964eb8552d96578c14af6ad214f5257bc"
60
60
  }
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2021 Vaadin Ltd.
3
+ * Copyright (c) 2021 - 2022 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
 
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2021 Vaadin Ltd.
3
+ * Copyright (c) 2021 - 2022 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import { FieldObserver } from './vaadin-field-observer.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2021 Vaadin Ltd.
3
+ * Copyright (c) 2021 - 2022 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import { timeOut } from '@vaadin/component-base/src/async.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2021 Vaadin Ltd.
3
+ * Copyright (c) 2021 - 2022 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import { ComponentObserver } from './vaadin-component-observer.js';
@@ -72,7 +72,7 @@ export class DatePickerObserver extends ComponentObserver {
72
72
  }
73
73
 
74
74
  onOverlayFocusOut(event) {
75
- if (event.relatedTarget !== this.datePicker) {
75
+ if (!this.datePicker.contains(event.relatedTarget)) {
76
76
  // Mark as blurred to wait for opened-changed.
77
77
  this.blurWhileOpened = true;
78
78
  }
@@ -88,7 +88,6 @@ export class DatePickerObserver extends ComponentObserver {
88
88
  if (event.detail.value === false && this.blurWhileOpened) {
89
89
  this.blurWhileOpened = false;
90
90
  this.hideOutline(this.datePicker);
91
- return;
92
91
  }
93
92
  }
94
93
  }
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2021 Vaadin Ltd.
3
+ * Copyright (c) 2021 - 2022 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import { ComponentObserver } from './vaadin-component-observer.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2021 Vaadin Ltd.
3
+ * Copyright (c) 2021 - 2022 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import { ComponentObserver } from './vaadin-component-observer.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2021 Vaadin Ltd.
3
+ * Copyright (c) 2021 - 2022 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import { FieldObserver } from './vaadin-field-observer.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2021 Vaadin Ltd.
3
+ * Copyright (c) 2021 - 2022 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import { FieldObserver } from './vaadin-field-observer.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2021 Vaadin Ltd.
3
+ * Copyright (c) 2021 - 2022 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import { FieldObserver } from './vaadin-field-observer.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2021 Vaadin Ltd.
3
+ * Copyright (c) 2021 - 2022 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import { ReactiveController } from 'lit';
@@ -1,11 +1,11 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2021 Vaadin Ltd.
3
+ * Copyright (c) 2021 - 2022 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import './vaadin-field-outline.js';
7
7
  import './vaadin-user-tags.js';
8
- import { IronA11yAnnouncer } from '@polymer/iron-a11y-announcer/iron-a11y-announcer.js';
8
+ import { announce } from '@vaadin/component-base/src/a11y-announcer.js';
9
9
  import { CheckboxGroupObserver } from './fields/vaadin-checkbox-group-observer.js';
10
10
  import { DatePickerObserver } from './fields/vaadin-date-picker-observer.js';
11
11
  import { DateTimePickerObserver } from './fields/vaadin-date-time-picker-observer.js';
@@ -61,7 +61,9 @@ export class FieldHighlighterController {
61
61
  this._user = user;
62
62
 
63
63
  if (user) {
64
- this._announce(`${user.name} started editing`);
64
+ const msg = `${user.name} started editing`;
65
+ const { label } = this.host;
66
+ announce(label ? `${msg} ${label}` : msg);
65
67
  }
66
68
  }
67
69
 
@@ -94,7 +96,6 @@ export class FieldHighlighterController {
94
96
 
95
97
  hostConnected() {
96
98
  this.redraw();
97
- IronA11yAnnouncer.requestAvailability();
98
99
  }
99
100
 
100
101
  addUser(user) {
@@ -143,23 +144,6 @@ export class FieldHighlighterController {
143
144
  redraw() {
144
145
  this.observer.redraw([...this.users].reverse());
145
146
  }
146
-
147
- /**
148
- * @param {string} msg
149
- * @protected
150
- */
151
- _announce(msg) {
152
- const label = this.host.label || '';
153
- this.host.dispatchEvent(
154
- new CustomEvent('iron-announce', {
155
- bubbles: true,
156
- composed: true,
157
- detail: {
158
- text: label ? `${msg} ${label}` : msg
159
- }
160
- })
161
- );
162
- }
163
147
  }
164
148
 
165
149
  /**
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2021 Vaadin Ltd.
3
+ * Copyright (c) 2021 - 2022 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import { html, PolymerElement } from '@polymer/polymer/polymer-element.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2021 Vaadin Ltd.
3
+ * Copyright (c) 2021 - 2022 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import { html, PolymerElement } from '@polymer/polymer/polymer-element.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2021 Vaadin Ltd.
3
+ * Copyright (c) 2021 - 2022 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import { OverlayElement } from '@vaadin/vaadin-overlay/src/vaadin-overlay.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2021 Vaadin Ltd.
3
+ * Copyright (c) 2021 - 2022 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import './vaadin-user-tag.js';
@@ -279,7 +279,6 @@ export class UserTags extends PolymerElement {
279
279
 
280
280
  if (this.opened && this.hasFocus) {
281
281
  this.updateTags(users, changedTags);
282
- return;
283
282
  } else if (addedUsers.length && document.visibilityState !== 'hidden') {
284
283
  // Avoid adding to queue if window is not visible.
285
284
  const tags = changedTags.added;
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2021 Vaadin Ltd.
3
+ * Copyright (c) 2021 - 2022 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import '@vaadin/vaadin-lumo-styles/user-colors.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2021 Vaadin Ltd.
3
+ * Copyright (c) 2021 - 2022 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import '@vaadin/vaadin-lumo-styles/spacing.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2021 Vaadin Ltd.
3
+ * Copyright (c) 2021 - 2022 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import '@vaadin/vaadin-lumo-styles/color.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2021 Vaadin Ltd.
3
+ * Copyright (c) 2021 - 2022 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import './vaadin-user-tags-styles.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2021 Vaadin Ltd.
3
+ * Copyright (c) 2021 - 2022 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import '@vaadin/vaadin-material-styles/user-colors.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2021 Vaadin Ltd.
3
+ * Copyright (c) 2021 - 2022 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2021 Vaadin Ltd.
3
+ * Copyright (c) 2021 - 2022 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import '@vaadin/vaadin-material-styles/color.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2021 Vaadin Ltd.
3
+ * Copyright (c) 2021 - 2022 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import './vaadin-user-tags-styles.js';