@vaadin/notification 22.0.0-alpha7 → 22.0.0-alpha8
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": "22.0.0-
|
|
3
|
+
"version": "22.0.0-alpha8",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -33,18 +33,18 @@
|
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@polymer/polymer": "^3.0.0",
|
|
36
|
-
"@vaadin/component-base": "22.0.0-
|
|
37
|
-
"@vaadin/vaadin-lumo-styles": "22.0.0-
|
|
38
|
-
"@vaadin/vaadin-material-styles": "22.0.0-
|
|
39
|
-
"@vaadin/vaadin-themable-mixin": "22.0.0-
|
|
36
|
+
"@vaadin/component-base": "22.0.0-alpha8",
|
|
37
|
+
"@vaadin/vaadin-lumo-styles": "22.0.0-alpha8",
|
|
38
|
+
"@vaadin/vaadin-material-styles": "22.0.0-alpha8",
|
|
39
|
+
"@vaadin/vaadin-themable-mixin": "22.0.0-alpha8",
|
|
40
40
|
"lit": "^2.0.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@esm-bundle/chai": "^4.3.4",
|
|
44
|
-
"@vaadin/button": "22.0.0-
|
|
45
|
-
"@vaadin/polymer-legacy-adapter": "22.0.0-
|
|
44
|
+
"@vaadin/button": "22.0.0-alpha8",
|
|
45
|
+
"@vaadin/polymer-legacy-adapter": "22.0.0-alpha8",
|
|
46
46
|
"@vaadin/testing-helpers": "^0.3.0",
|
|
47
47
|
"sinon": "^9.2.1"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "c24468526298ee26ad7f7280b59f6c8789e1f75f"
|
|
50
50
|
}
|
|
@@ -1,8 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) 2021 Vaadin Ltd.
|
|
4
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
|
+
*/
|
|
1
6
|
import { TemplateResult } from 'lit';
|
|
2
7
|
import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
|
|
3
8
|
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
4
9
|
import { ThemePropertyMixin } from '@vaadin/vaadin-themable-mixin/vaadin-theme-property-mixin.js';
|
|
5
|
-
|
|
10
|
+
|
|
11
|
+
export type NotificationPosition =
|
|
12
|
+
| 'top-stretch'
|
|
13
|
+
| 'top-start'
|
|
14
|
+
| 'top-center'
|
|
15
|
+
| 'top-end'
|
|
16
|
+
| 'middle'
|
|
17
|
+
| 'bottom-start'
|
|
18
|
+
| 'bottom-center'
|
|
19
|
+
| 'bottom-end'
|
|
20
|
+
| 'bottom-stretch';
|
|
21
|
+
|
|
22
|
+
export type NotificationRenderer = (root: HTMLElement, notification?: Notification) => void;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Fired when the `opened` property changes.
|
|
26
|
+
*/
|
|
27
|
+
export type NotificationOpenedChangedEvent = CustomEvent<{ value: boolean }>;
|
|
28
|
+
|
|
29
|
+
export interface NotificationCustomEventMap {
|
|
30
|
+
'opened-changed': NotificationOpenedChangedEvent;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export interface NotificationEventMap extends HTMLElementEventMap, NotificationCustomEventMap {}
|
|
34
|
+
|
|
35
|
+
export interface ShowOptions {
|
|
36
|
+
duration?: number;
|
|
37
|
+
position?: NotificationPosition;
|
|
38
|
+
}
|
|
6
39
|
|
|
7
40
|
/**
|
|
8
41
|
* An element used internally by `<vaadin-notification>`. Not intended to be used separately.
|
|
@@ -101,13 +134,6 @@ declare class Notification extends ThemePropertyMixin(ElementMixin(HTMLElement))
|
|
|
101
134
|
*/
|
|
102
135
|
requestContentUpdate(): void;
|
|
103
136
|
|
|
104
|
-
/**
|
|
105
|
-
* Manually invoke existing renderer.
|
|
106
|
-
*
|
|
107
|
-
* @deprecated Since Vaadin 21, `render()` is deprecated. Please use `requestContentUpdate()` instead.
|
|
108
|
-
*/
|
|
109
|
-
render(): void;
|
|
110
|
-
|
|
111
137
|
/**
|
|
112
138
|
* Opens the notification.
|
|
113
139
|
*/
|
|
@@ -325,17 +325,6 @@ class Notification extends ThemePropertyMixin(ElementMixin(PolymerElement)) {
|
|
|
325
325
|
this.renderer(this._card, this);
|
|
326
326
|
}
|
|
327
327
|
|
|
328
|
-
/**
|
|
329
|
-
* Manually invoke existing renderer.
|
|
330
|
-
*
|
|
331
|
-
* @deprecated Since Vaadin 21, `render()` is deprecated. Please use `requestContentUpdate()` instead.
|
|
332
|
-
*/
|
|
333
|
-
render() {
|
|
334
|
-
console.warn('WARNING: Since Vaadin 21, render() is deprecated. Please use requestContentUpdate() instead.');
|
|
335
|
-
|
|
336
|
-
this.requestContentUpdate();
|
|
337
|
-
}
|
|
338
|
-
|
|
339
328
|
/** @private */
|
|
340
329
|
_rendererChanged(renderer, opened, card) {
|
|
341
330
|
if (!card) {
|
package/vaadin-notification.d.ts
CHANGED
package/src/interfaces.d.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { Notification } from './vaadin-notification';
|
|
2
|
-
|
|
3
|
-
export type NotificationPosition =
|
|
4
|
-
| 'top-stretch'
|
|
5
|
-
| 'top-start'
|
|
6
|
-
| 'top-center'
|
|
7
|
-
| 'top-end'
|
|
8
|
-
| 'middle'
|
|
9
|
-
| 'bottom-start'
|
|
10
|
-
| 'bottom-center'
|
|
11
|
-
| 'bottom-end'
|
|
12
|
-
| 'bottom-stretch';
|
|
13
|
-
|
|
14
|
-
export type NotificationRenderer = (root: HTMLElement, notification?: Notification) => void;
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Fired when the `opened` property changes.
|
|
18
|
-
*/
|
|
19
|
-
export type NotificationOpenedChangedEvent = CustomEvent<{ value: boolean }>;
|
|
20
|
-
|
|
21
|
-
export interface NotificationCustomEventMap {
|
|
22
|
-
'opened-changed': NotificationOpenedChangedEvent;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export interface NotificationEventMap extends HTMLElementEventMap, NotificationCustomEventMap {}
|
|
26
|
-
|
|
27
|
-
export interface ShowOptions {
|
|
28
|
-
duration?: number;
|
|
29
|
-
position?: NotificationPosition;
|
|
30
|
-
}
|