@vaadin/field-highlighter 23.1.0-beta1 → 23.1.0-beta2

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.1.0-beta1",
3
+ "version": "23.1.0-beta2",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -34,27 +34,27 @@
34
34
  ],
35
35
  "dependencies": {
36
36
  "@polymer/polymer": "^3.0.0",
37
- "@vaadin/component-base": "23.1.0-beta1",
38
- "@vaadin/vaadin-lumo-styles": "23.1.0-beta1",
39
- "@vaadin/vaadin-material-styles": "23.1.0-beta1",
40
- "@vaadin/vaadin-overlay": "23.1.0-beta1",
41
- "@vaadin/vaadin-themable-mixin": "23.1.0-beta1",
37
+ "@vaadin/component-base": "23.1.0-beta2",
38
+ "@vaadin/vaadin-lumo-styles": "23.1.0-beta2",
39
+ "@vaadin/vaadin-material-styles": "23.1.0-beta2",
40
+ "@vaadin/vaadin-overlay": "23.1.0-beta2",
41
+ "@vaadin/vaadin-themable-mixin": "23.1.0-beta2",
42
42
  "lit": "^2.0.0"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@esm-bundle/chai": "^4.3.4",
46
- "@vaadin/checkbox": "23.1.0-beta1",
47
- "@vaadin/combo-box": "23.1.0-beta1",
48
- "@vaadin/date-picker": "23.1.0-beta1",
49
- "@vaadin/date-time-picker": "23.1.0-beta1",
50
- "@vaadin/item": "23.1.0-beta1",
51
- "@vaadin/list-box": "23.1.0-beta1",
52
- "@vaadin/radio-group": "23.1.0-beta1",
53
- "@vaadin/select": "23.1.0-beta1",
46
+ "@vaadin/checkbox": "23.1.0-beta2",
47
+ "@vaadin/combo-box": "23.1.0-beta2",
48
+ "@vaadin/date-picker": "23.1.0-beta2",
49
+ "@vaadin/date-time-picker": "23.1.0-beta2",
50
+ "@vaadin/item": "23.1.0-beta2",
51
+ "@vaadin/list-box": "23.1.0-beta2",
52
+ "@vaadin/radio-group": "23.1.0-beta2",
53
+ "@vaadin/select": "23.1.0-beta2",
54
54
  "@vaadin/testing-helpers": "^0.3.2",
55
- "@vaadin/text-field": "23.1.0-beta1",
56
- "@vaadin/time-picker": "23.1.0-beta1",
55
+ "@vaadin/text-field": "23.1.0-beta2",
56
+ "@vaadin/time-picker": "23.1.0-beta2",
57
57
  "sinon": "^13.0.2"
58
58
  },
59
- "gitHead": "8be43cf83102a6b9ccf309687446e590ce0164e8"
59
+ "gitHead": "f11f9245a0b5e6bf912725a501c27c24b74e7c8d"
60
60
  }
@@ -32,7 +32,7 @@ export class ComponentObserver {
32
32
  this._tags = tags;
33
33
 
34
34
  component.addEventListener('mouseenter', (event) => {
35
- // ignore mouseleave on overlay opening
35
+ // Ignore mouseleave on overlay opening
36
36
  if (event.relatedTarget === this._tags.$.overlay) {
37
37
  return;
38
38
  }
@@ -45,7 +45,7 @@ export class ComponentObserver {
45
45
  });
46
46
 
47
47
  component.addEventListener('mouseleave', (event) => {
48
- // ignore mouseleave on overlay opening
48
+ // Ignore mouseleave on overlay opening
49
49
  if (event.relatedTarget === this._tags.$.overlay) {
50
50
  return;
51
51
  }
@@ -76,7 +76,7 @@ export class ComponentObserver {
76
76
  });
77
77
 
78
78
  this._tags.$.overlay.addEventListener('mouseleave', (event) => {
79
- // ignore mouseleave when moving back to field
79
+ // Ignore mouseleave when moving back to field
80
80
  if (event.relatedTarget === component) {
81
81
  return;
82
82
  }
@@ -45,13 +45,13 @@ export class DatePickerObserver extends ComponentObserver {
45
45
 
46
46
  onFocusIn(event) {
47
47
  if (event.relatedTarget === this.overlay) {
48
- // focus returns from the overlay, do nothing.
48
+ // Focus returns from the overlay, do nothing.
49
49
  return;
50
50
  }
51
51
 
52
52
  if (this.blurWhileOpened) {
53
53
  this.blurWhileOpened = false;
54
- // focus returns from outside the browser tab, ignore.
54
+ // Focus returns from outside the browser tab, ignore.
55
55
  return;
56
56
  }
57
57
 
@@ -60,9 +60,9 @@ export class DatePickerObserver extends ComponentObserver {
60
60
 
61
61
  onFocusOut(event) {
62
62
  if (this.fullscreenFocus || event.relatedTarget === this.overlay) {
63
- // do nothing, overlay is opening.
63
+ // Do nothing, overlay is opening.
64
64
  } else if (!this.datePicker.opened) {
65
- // field blur when closed.
65
+ // Field blur when closed.
66
66
  this.hideOutline(this.datePicker);
67
67
  } else {
68
68
  // Focus moves away while still opened, e.g. outside the browser.
@@ -84,7 +84,7 @@ export class DatePickerObserver extends ComponentObserver {
84
84
  this.showOutline(this.datePicker);
85
85
  }
86
86
 
87
- // closing after previously moving focus away.
87
+ // Closing after previously moving focus away.
88
88
  if (event.detail.value === false && this.blurWhileOpened) {
89
89
  this.blurWhileOpened = false;
90
90
  this.hideOutline(this.datePicker);
@@ -11,7 +11,7 @@ class DateObserver extends DatePickerObserver {
11
11
  constructor(datePicker, host) {
12
12
  super(datePicker);
13
13
 
14
- // fire events on the host
14
+ // Fire events on the host
15
15
  this.component = host;
16
16
  }
17
17
 
@@ -24,7 +24,7 @@ class TimeObserver extends FieldObserver {
24
24
  constructor(timePicker, host) {
25
25
  super(timePicker);
26
26
 
27
- // fire events on the host
27
+ // Fire events on the host
28
28
  this.component = host;
29
29
  this.timePicker = timePicker;
30
30
  }
@@ -17,7 +17,7 @@ export class SelectObserver extends FieldObserver {
17
17
  super.addListeners(select);
18
18
 
19
19
  select.addEventListener('opened-changed', (event) => {
20
- // when in phone mode, focus is lost when closing.
20
+ // When in phone mode, focus is lost when closing.
21
21
  if (select._phone && event.detail.value === false) {
22
22
  this.hideOutline(select);
23
23
  }
@@ -26,12 +26,12 @@ export class SelectObserver extends FieldObserver {
26
26
 
27
27
  onFocusIn(event) {
28
28
  if (this.overlay.contains(event.relatedTarget)) {
29
- // focus returns on item select, do nothing.
29
+ // Focus returns on item select, do nothing.
30
30
  return;
31
31
  }
32
32
 
33
33
  if (!this.component._phone && this.overlay.hasAttribute('closing')) {
34
- // focus returns on outside click, do nothing.
34
+ // Focus returns on outside click, do nothing.
35
35
  return;
36
36
  }
37
37
 
@@ -40,7 +40,7 @@ export class SelectObserver extends FieldObserver {
40
40
 
41
41
  onFocusOut(event) {
42
42
  if (this.overlay.contains(event.relatedTarget)) {
43
- // do nothing, overlay is opening.
43
+ // Do nothing, overlay is opening.
44
44
  return;
45
45
  }
46
46
  super.onFocusOut(event);
@@ -220,7 +220,7 @@ export class UserTags extends PolymerElement {
220
220
  }
221
221
  });
222
222
 
223
- // filter out users that are only moved
223
+ // Filter out users that are only moved
224
224
  const addedUsers = usersToAdd.filter((u) => !usersToRemove.some((u2) => u.id === u2.id));
225
225
  const removedUsers = usersToRemove.filter((u) => !usersToAdd.some((u2) => u.id === u2.id));
226
226
 
@@ -264,7 +264,7 @@ export class UserTags extends PolymerElement {
264
264
 
265
265
  const changedTags = this.getChangedTags(addedUsers, removedUsers);
266
266
 
267
- // check if flash queue contains pending tags for removed users
267
+ // Check if flash queue contains pending tags for removed users
268
268
  if (this._flashQueue.length > 0) {
269
269
  for (let i = 0; i < removedUsers.length; i++) {
270
270
  if (changedTags.removed[i] === null) {
@@ -283,7 +283,7 @@ export class UserTags extends PolymerElement {
283
283
  // Avoid adding to queue if window is not visible.
284
284
  const tags = changedTags.added;
285
285
  if (this.flashing) {
286
- // schedule next flash later
286
+ // Schedule next flash later
287
287
  this.push('_flashQueue', tags);
288
288
  } else {
289
289
  this.flashTags(tags);
@@ -296,7 +296,7 @@ export class UserTags extends PolymerElement {
296
296
 
297
297
  /** @private */
298
298
  _onOverlayOpen() {
299
- // animate all tags except removing ones
299
+ // Animate all tags except removing ones
300
300
  Array.from(this.wrapper.children).forEach((tag) => {
301
301
  if (!tag.classList.contains('removing')) {
302
302
  tag.classList.add('show');
@@ -308,11 +308,11 @@ export class UserTags extends PolymerElement {
308
308
  this.flashing = true;
309
309
  const wrapper = this.wrapper;
310
310
 
311
- // hide existing tags
311
+ // Hide existing tags
312
312
  const hidden = Array.from(wrapper.children);
313
313
  hidden.forEach((tag) => (tag.style.display = 'none'));
314
314
 
315
- // render new tags
315
+ // Render new tags
316
316
  added.forEach((tag) => {
317
317
  wrapper.insertBefore(tag, wrapper.firstChild);
318
318
  });
@@ -320,12 +320,12 @@ export class UserTags extends PolymerElement {
320
320
  this.flashPromise = new Promise((resolve) => {
321
321
  listenOnce(this.$.overlay, 'vaadin-overlay-open').then(() => {
322
322
  this._debounceFlashStart = Debouncer.debounce(this._debounceFlashStart, timeOut.after(DURATION + DELAY), () => {
323
- // animate disappearing
323
+ // Animate disappearing
324
324
  if (!this.hasFocus) {
325
325
  added.forEach((tag) => tag.classList.remove('show'));
326
326
  }
327
327
  this._debounceFlashEnd = Debouncer.debounce(this._debounceFlashEnd, timeOut.after(DURATION), () => {
328
- // show all tags
328
+ // Show all tags
329
329
  const finishFlash = () => {
330
330
  hidden.forEach((tag) => (tag.style.display = 'block'));
331
331
  this.flashing = false;
@@ -335,7 +335,7 @@ export class UserTags extends PolymerElement {
335
335
  if (this.hasFocus) {
336
336
  finishFlash();
337
337
  } else {
338
- // wait for overlay closing animation to complete
338
+ // Wait for overlay closing animation to complete
339
339
  listenOnce(this.$.overlay, 'animationend').then(() => {
340
340
  finishFlash();
341
341
  });