@vaadin/notification 24.4.0-alpha22 → 24.4.0-alpha23

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/notification",
3
- "version": "24.4.0-alpha22",
3
+ "version": "24.4.0-alpha23",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -38,16 +38,16 @@
38
38
  ],
39
39
  "dependencies": {
40
40
  "@polymer/polymer": "^3.0.0",
41
- "@vaadin/component-base": "24.4.0-alpha22",
42
- "@vaadin/lit-renderer": "24.4.0-alpha22",
43
- "@vaadin/vaadin-lumo-styles": "24.4.0-alpha22",
44
- "@vaadin/vaadin-material-styles": "24.4.0-alpha22",
45
- "@vaadin/vaadin-themable-mixin": "24.4.0-alpha22",
41
+ "@vaadin/component-base": "24.4.0-alpha23",
42
+ "@vaadin/lit-renderer": "24.4.0-alpha23",
43
+ "@vaadin/vaadin-lumo-styles": "24.4.0-alpha23",
44
+ "@vaadin/vaadin-material-styles": "24.4.0-alpha23",
45
+ "@vaadin/vaadin-themable-mixin": "24.4.0-alpha23",
46
46
  "lit": "^3.0.0"
47
47
  },
48
48
  "devDependencies": {
49
49
  "@esm-bundle/chai": "^4.3.4",
50
- "@vaadin/button": "24.4.0-alpha22",
50
+ "@vaadin/button": "24.4.0-alpha23",
51
51
  "@vaadin/testing-helpers": "^0.6.0",
52
52
  "sinon": "^13.0.2"
53
53
  },
@@ -55,5 +55,5 @@
55
55
  "web-types.json",
56
56
  "web-types.lit.json"
57
57
  ],
58
- "gitHead": "8e5223bcb61a5561fd984db5d11b31a73ec98eaa"
58
+ "gitHead": "a2d703efa3acbb60e1dfece97c506674e0bec19d"
59
59
  }
@@ -484,16 +484,22 @@ class Notification extends OverlayClassMixin(ThemePropertyMixin(ElementMixin(Pol
484
484
  }
485
485
  }
486
486
 
487
+ /** @private */
488
+ __cleanUpOpeningClosingState() {
489
+ this._card.removeAttribute('opening');
490
+ this._card.removeAttribute('closing');
491
+ this._card.removeEventListener('animationend', this.__animationEndListener);
492
+ }
493
+
487
494
  /** @private */
488
495
  _animatedAppendNotificationCard() {
489
496
  if (this._card) {
497
+ this.__cleanUpOpeningClosingState();
498
+
490
499
  this._card.setAttribute('opening', '');
491
500
  this._appendNotificationCard();
492
- const listener = () => {
493
- this._card.removeEventListener('animationend', listener);
494
- this._card.removeAttribute('opening');
495
- };
496
- this._card.addEventListener('animationend', listener);
501
+ this.__animationEndListener = () => this.__cleanUpOpeningClosingState();
502
+ this._card.addEventListener('animationend', this.__animationEndListener);
497
503
  this._didAnimateNotificationAppend = true;
498
504
  } else {
499
505
  this._didAnimateNotificationAppend = false;
@@ -538,14 +544,16 @@ class Notification extends OverlayClassMixin(ThemePropertyMixin(ElementMixin(Pol
538
544
 
539
545
  /** @private */
540
546
  _animatedRemoveNotificationCard() {
547
+ this.__cleanUpOpeningClosingState();
548
+
541
549
  this._card.setAttribute('closing', '');
542
550
  const name = getComputedStyle(this._card).getPropertyValue('animation-name');
543
551
  if (name && name !== 'none') {
544
- const listener = () => {
552
+ this.__animationEndListener = () => {
545
553
  this._removeNotificationCard();
546
- this._card.removeEventListener('animationend', listener);
554
+ this.__cleanUpOpeningClosingState();
547
555
  };
548
- this._card.addEventListener('animationend', listener);
556
+ this._card.addEventListener('animationend', this.__animationEndListener);
549
557
  } else {
550
558
  this._removeNotificationCard();
551
559
  }
package/web-types.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/notification",
4
- "version": "24.4.0-alpha22",
4
+ "version": "24.4.0-alpha23",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/notification",
4
- "version": "24.4.0-alpha22",
4
+ "version": "24.4.0-alpha23",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {