@vaadin/field-highlighter 24.0.0-alpha1 → 24.0.0-alpha10

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": "24.0.0-alpha1",
3
+ "version": "24.0.0-alpha10",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -34,29 +34,29 @@
34
34
  ],
35
35
  "dependencies": {
36
36
  "@polymer/polymer": "^3.0.0",
37
- "@vaadin/component-base": "24.0.0-alpha1",
38
- "@vaadin/overlay": "24.0.0-alpha1",
39
- "@vaadin/vaadin-lumo-styles": "24.0.0-alpha1",
40
- "@vaadin/vaadin-material-styles": "24.0.0-alpha1",
41
- "@vaadin/vaadin-themable-mixin": "24.0.0-alpha1",
37
+ "@vaadin/component-base": "24.0.0-alpha10",
38
+ "@vaadin/overlay": "24.0.0-alpha10",
39
+ "@vaadin/vaadin-lumo-styles": "24.0.0-alpha10",
40
+ "@vaadin/vaadin-material-styles": "24.0.0-alpha10",
41
+ "@vaadin/vaadin-themable-mixin": "24.0.0-alpha10",
42
42
  "lit": "^2.0.0"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@esm-bundle/chai": "^4.3.4",
46
- "@vaadin/checkbox": "24.0.0-alpha1",
47
- "@vaadin/checkbox-group": "24.0.0-alpha1",
48
- "@vaadin/combo-box": "24.0.0-alpha1",
49
- "@vaadin/date-picker": "24.0.0-alpha1",
50
- "@vaadin/date-time-picker": "24.0.0-alpha1",
51
- "@vaadin/item": "24.0.0-alpha1",
52
- "@vaadin/list-box": "24.0.0-alpha1",
53
- "@vaadin/radio-group": "24.0.0-alpha1",
54
- "@vaadin/select": "24.0.0-alpha1",
46
+ "@vaadin/checkbox": "24.0.0-alpha10",
47
+ "@vaadin/checkbox-group": "24.0.0-alpha10",
48
+ "@vaadin/combo-box": "24.0.0-alpha10",
49
+ "@vaadin/date-picker": "24.0.0-alpha10",
50
+ "@vaadin/date-time-picker": "24.0.0-alpha10",
51
+ "@vaadin/item": "24.0.0-alpha10",
52
+ "@vaadin/list-box": "24.0.0-alpha10",
53
+ "@vaadin/radio-group": "24.0.0-alpha10",
54
+ "@vaadin/select": "24.0.0-alpha10",
55
55
  "@vaadin/testing-helpers": "^0.3.2",
56
- "@vaadin/text-area": "24.0.0-alpha1",
57
- "@vaadin/text-field": "24.0.0-alpha1",
58
- "@vaadin/time-picker": "24.0.0-alpha1",
56
+ "@vaadin/text-area": "24.0.0-alpha10",
57
+ "@vaadin/text-field": "24.0.0-alpha10",
58
+ "@vaadin/time-picker": "24.0.0-alpha10",
59
59
  "sinon": "^13.0.2"
60
60
  },
61
- "gitHead": "427527c27c4b27822d61fd41d38d7b170134770b"
61
+ "gitHead": "2e04534d8b47bcd216f89b5f849bafef1a73b174"
62
62
  }
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2021 - 2022 Vaadin Ltd.
3
+ * Copyright (c) 2021 - 2023 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 - 2022 Vaadin Ltd.
3
+ * Copyright (c) 2021 - 2023 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 - 2022 Vaadin Ltd.
3
+ * Copyright (c) 2021 - 2023 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 - 2022 Vaadin Ltd.
3
+ * Copyright (c) 2021 - 2023 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';
@@ -36,15 +36,19 @@ export class DatePickerObserver extends ComponentObserver {
36
36
  datePicker.addEventListener('focusout', (event) => this.onFocusOut(event));
37
37
  }
38
38
 
39
+ isEventInOverlay(node) {
40
+ return this.datePicker._overlayContent && this.datePicker._overlayContent.contains(node);
41
+ }
42
+
39
43
  onBlur(event) {
40
44
  const datePicker = this.datePicker;
41
- if (datePicker._fullscreen && event.relatedTarget !== this.overlay) {
45
+ if (datePicker._fullscreen && !this.isEventInOverlay(event.relatedTarget)) {
42
46
  this.fullscreenFocus = true;
43
47
  }
44
48
  }
45
49
 
46
50
  onFocusIn(event) {
47
- if (event.relatedTarget === this.overlay) {
51
+ if (this.isEventInOverlay(event.relatedTarget)) {
48
52
  // Focus returns from the overlay, do nothing.
49
53
  return;
50
54
  }
@@ -59,7 +63,7 @@ export class DatePickerObserver extends ComponentObserver {
59
63
  }
60
64
 
61
65
  onFocusOut(event) {
62
- if (this.fullscreenFocus || event.relatedTarget === this.overlay) {
66
+ if (this.fullscreenFocus || this.isEventInOverlay(event.relatedTarget)) {
63
67
  // Do nothing, overlay is opening.
64
68
  } else if (!this.datePicker.opened) {
65
69
  // Field blur when closed.
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2021 - 2022 Vaadin Ltd.
3
+ * Copyright (c) 2021 - 2023 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 - 2022 Vaadin Ltd.
3
+ * Copyright (c) 2021 - 2023 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 - 2022 Vaadin Ltd.
3
+ * Copyright (c) 2021 - 2023 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 - 2022 Vaadin Ltd.
3
+ * Copyright (c) 2021 - 2023 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 - 2022 Vaadin Ltd.
3
+ * Copyright (c) 2021 - 2023 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 - 2022 Vaadin Ltd.
3
+ * Copyright (c) 2021 - 2023 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 type { ReactiveController } from 'lit';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2021 - 2022 Vaadin Ltd.
3
+ * Copyright (c) 2021 - 2023 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';
@@ -53,20 +53,6 @@ const initFieldObserver = (field) => {
53
53
  * See https://vaadin.com/collaboration for Collaboration Engine documentation.
54
54
  */
55
55
  export class FieldHighlighterController {
56
- get user() {
57
- return this._user;
58
- }
59
-
60
- set user(user) {
61
- this._user = user;
62
-
63
- if (user) {
64
- const msg = `${user.name} started editing`;
65
- const { label } = this.host;
66
- announce(label ? `${msg} ${label}` : msg);
67
- }
68
- }
69
-
70
56
  constructor(host) {
71
57
  this.host = host;
72
58
 
@@ -94,6 +80,20 @@ export class FieldHighlighterController {
94
80
  this.users = [];
95
81
  }
96
82
 
83
+ get user() {
84
+ return this._user;
85
+ }
86
+
87
+ set user(user) {
88
+ this._user = user;
89
+
90
+ if (user) {
91
+ const msg = `${user.name} started editing`;
92
+ const { label } = this.host;
93
+ announce(label ? `${msg} ${label}` : msg);
94
+ }
95
+ }
96
+
97
97
  hostConnected() {
98
98
  this.redraw();
99
99
  }
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2021 - 2022 Vaadin Ltd.
3
+ * Copyright (c) 2021 - 2023 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 - 2022 Vaadin Ltd.
3
+ * Copyright (c) 2021 - 2023 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 - 2022 Vaadin Ltd.
3
+ * Copyright (c) 2021 - 2023 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 { Overlay } from '@vaadin/overlay/src/vaadin-overlay.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2021 - 2022 Vaadin Ltd.
3
+ * Copyright (c) 2021 - 2023 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';
@@ -128,6 +128,11 @@ export class UserTags extends PolymerElement {
128
128
  );
129
129
  }
130
130
 
131
+ /** @protected */
132
+ get wrapper() {
133
+ return this.$.overlay.querySelector('[part="tags"]');
134
+ }
135
+
131
136
  /** @protected */
132
137
  connectedCallback() {
133
138
  super.connectedCallback();
@@ -208,10 +213,6 @@ export class UserTags extends PolymerElement {
208
213
  }
209
214
  }
210
215
 
211
- get wrapper() {
212
- return this.$.overlay.querySelector('[part="tags"]');
213
- }
214
-
215
216
  createUserTag(user) {
216
217
  const tag = document.createElement('vaadin-user-tag');
217
218
  tag.name = user.name;
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2021 - 2022 Vaadin Ltd.
3
+ * Copyright (c) 2021 - 2023 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 - 2022 Vaadin Ltd.
3
+ * Copyright (c) 2021 - 2023 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';
@@ -24,7 +24,7 @@ registerStyles(
24
24
  right: 0;
25
25
  bottom: 0;
26
26
  box-shadow: 0 0 0 2px var(--_active-user-color);
27
- border-radius: var(--lumo-border-radius);
27
+ border-radius: var(--lumo-border-radius-s);
28
28
  transition: box-shadow 0.3s;
29
29
  }
30
30
 
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2021 - 2022 Vaadin Ltd.
3
+ * Copyright (c) 2021 - 2023 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 - 2022 Vaadin Ltd.
3
+ * Copyright (c) 2021 - 2023 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/overlay/theme/lumo/vaadin-overlay.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2021 - 2022 Vaadin Ltd.
3
+ * Copyright (c) 2021 - 2023 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 - 2022 Vaadin Ltd.
3
+ * Copyright (c) 2021 - 2023 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 - 2022 Vaadin Ltd.
3
+ * Copyright (c) 2021 - 2023 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 - 2022 Vaadin Ltd.
3
+ * Copyright (c) 2021 - 2023 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/overlay/theme/material/vaadin-overlay.js';