@genesislcap/foundation-fdc3 14.214.1-openfin-notifications.2 → 14.214.1-openfin-notifications.3
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/dts/notifications/openfin-notifications-listener.d.ts +15 -3
- package/dist/dts/notifications/openfin-notifications-listener.d.ts.map +1 -1
- package/dist/esm/notifications/openfin-notifications-listener.js +50 -69
- package/dist/foundation-fdc3.api.json +132 -7
- package/dist/foundation-fdc3.d.ts +16 -2
- package/docs/api/foundation-fdc3.md +2 -1
- package/docs/api/foundation-fdc3.openfinnotificationslistener.connectedcallback.md +15 -0
- package/docs/api/foundation-fdc3.openfinnotificationslistener.md +32 -0
- package/docs/api/foundation-fdc3.openfinnotificationslistener.notificationsplatform.md +11 -0
- package/docs/api/{foundation-fdc3.openfinnotifications.shownotificationtoast.md → foundation-fdc3.openfinnotificationslistener.shownotificationtoast.md} +2 -2
- package/docs/api/foundation-fdc3.openfinnotificationslistener.toast.md +11 -0
- package/docs/api/foundation-fdc3.openfinnotificationslistener.toastbuttons.md +11 -0
- package/docs/api/foundation-fdc3.openfintoastbutton.md +23 -0
- package/docs/api/foundation-fdc3.openfintoastbutton.task.md +11 -0
- package/docs/api-report.md +13 -1
- package/package.json +2 -2
- package/docs/api/foundation-fdc3.openfinnotifications.connectedcallback.md +0 -15
- package/docs/api/foundation-fdc3.openfinnotifications.md +0 -30
- package/docs/api/foundation-fdc3.openfinnotifications.toast.md +0 -11
@@ -1,14 +1,26 @@
|
|
1
|
-
import { NotificationDataRow } from '@genesislcap/foundation-notifications';
|
1
|
+
import { NotificationDataRow, ToastButton } from '@genesislcap/foundation-notifications';
|
2
2
|
import { NotificationListener } from '@genesislcap/foundation-ui';
|
3
|
+
import { NotificationsPlatform } from '@openfin/workspace/notifications';
|
3
4
|
/**
|
4
|
-
* @
|
5
|
+
* @public
|
6
|
+
* @remarks
|
7
|
+
* OpenfinToastButton interface which extends ToastButton
|
8
|
+
*/
|
9
|
+
export interface OpenfinToastButton extends ToastButton {
|
10
|
+
task: string;
|
11
|
+
}
|
12
|
+
/**
|
13
|
+
* @tagname openfin-notifications-listener
|
5
14
|
* @public
|
6
15
|
* @remarks
|
7
16
|
* This component extends the notification listener class and overrides the logic for showing the toast message to instead dispatch the event to the openfin notifications bus.
|
8
17
|
*/
|
9
|
-
export declare class
|
18
|
+
export declare class OpenfinNotificationsListener extends NotificationListener {
|
19
|
+
notificationsPlatform: NotificationsPlatform;
|
10
20
|
toast: string;
|
21
|
+
toastButtons: OpenfinToastButton[];
|
11
22
|
connectedCallback(): Promise<void>;
|
23
|
+
private addButtonListeners;
|
12
24
|
protected showNotificationToast(row: NotificationDataRow): Promise<void>;
|
13
25
|
private mapToastButtons;
|
14
26
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"openfin-notifications-listener.d.ts","sourceRoot":"","sources":["../../../src/notifications/openfin-notifications-listener.ts"],"names":[],"mappings":"AAAA,OAAO,
|
1
|
+
{"version":3,"file":"openfin-notifications-listener.d.ts","sourceRoot":"","sources":["../../../src/notifications/openfin-notifications-listener.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,WAAW,EAEZ,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAIlE,OAAO,EAGL,qBAAqB,EACtB,MAAM,kCAAkC,CAAC;AAgB1C;;;;GAIG;AACH,MAAM,WAAW,kBAAmB,SAAQ,WAAW;IACrD,IAAI,EAAE,MAAM,CAAC;CACd;AAUD;;;;;GAKG;AACH,qBAQa,4BAA6B,SAAQ,oBAAoB;IACpE,qBAAqB,EAAE,qBAAqB,CAAC;IAEvC,KAAK,EAAE,MAAM,CAAe;IAElC,YAAY,EAAE,kBAAkB,EAAE,CAAC;IAE7B,iBAAiB;YAMT,kBAAkB;cAqBhB,qBAAqB,CAAC,GAAG,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC;IA8B9E,OAAO,CAAC,eAAe;CAyBxB"}
|
@@ -3,60 +3,33 @@ import { NotificationListener } from '@genesislcap/foundation-ui';
|
|
3
3
|
import { attr } from '@genesislcap/web-core';
|
4
4
|
import { customElement, html, ref } from '@microsoft/fast-element';
|
5
5
|
import * as Notifications from '@openfin/workspace/notifications';
|
6
|
-
import { IndicatorColor } from '@openfin/workspace/notifications';
|
7
|
-
|
8
|
-
const PLATFORM_ID = 'use-notifications';
|
9
|
-
const PLATFORM_ICON = 'http://localhost:8080/images/icon-dot.png';
|
10
|
-
const PLATFORM_TITLE = 'Use Notifications';
|
11
|
-
const OpenfinGensisPriorityMap = {
|
6
|
+
import { IndicatorColor, } from '@openfin/workspace/notifications';
|
7
|
+
const OpenfinGenesisPriorityMap = {
|
12
8
|
Information: 1,
|
13
9
|
Warning: 2,
|
14
10
|
Serious: 3,
|
15
11
|
Critical: 4,
|
16
12
|
};
|
17
|
-
const
|
18
|
-
Information:
|
19
|
-
Warning:
|
20
|
-
Serious:
|
21
|
-
Critical:
|
13
|
+
const OpenfinGenesisColorMap = {
|
14
|
+
Information: IndicatorColor.BLUE,
|
15
|
+
Warning: IndicatorColor.YELLOW,
|
16
|
+
Serious: IndicatorColor.MAGENTA,
|
17
|
+
Critical: IndicatorColor.RED,
|
22
18
|
};
|
23
|
-
function
|
19
|
+
function initializeNotifications(notificationsPlatformOptions) {
|
24
20
|
return __awaiter(this, void 0, void 0, function* () {
|
25
|
-
yield init({
|
26
|
-
browser: {
|
27
|
-
defaultWindowOptions: {
|
28
|
-
icon: PLATFORM_ICON,
|
29
|
-
workspacePlatform: {
|
30
|
-
pages: [],
|
31
|
-
favicon: PLATFORM_ICON,
|
32
|
-
},
|
33
|
-
},
|
34
|
-
},
|
35
|
-
});
|
36
|
-
});
|
37
|
-
}
|
38
|
-
function initializeNotifications() {
|
39
|
-
return __awaiter(this, void 0, void 0, function* () {
|
40
|
-
console.log('initialise notifications');
|
41
21
|
yield Notifications.register({
|
42
|
-
notificationsPlatformOptions
|
43
|
-
id: PLATFORM_ID,
|
44
|
-
icon: PLATFORM_ICON,
|
45
|
-
title: PLATFORM_TITLE,
|
46
|
-
},
|
47
|
-
});
|
48
|
-
yield Notifications.addEventListener('notification-action', (event) => {
|
49
|
-
console.log(event, 'notification-action button clicked');
|
22
|
+
notificationsPlatformOptions,
|
50
23
|
});
|
51
24
|
});
|
52
25
|
}
|
53
26
|
/**
|
54
|
-
* @tagname openfin-
|
27
|
+
* @tagname openfin-notifications-listener
|
55
28
|
* @public
|
56
29
|
* @remarks
|
57
30
|
* This component extends the notification listener class and overrides the logic for showing the toast message to instead dispatch the event to the openfin notifications bus.
|
58
31
|
*/
|
59
|
-
let
|
32
|
+
let OpenfinNotificationsListener = class OpenfinNotificationsListener extends NotificationListener {
|
60
33
|
constructor() {
|
61
34
|
super(...arguments);
|
62
35
|
this.toast = 'transient';
|
@@ -67,44 +40,49 @@ let OpenfinNotifications = class OpenfinNotifications extends NotificationListen
|
|
67
40
|
});
|
68
41
|
return __awaiter(this, void 0, void 0, function* () {
|
69
42
|
yield _super.connectedCallback.call(this);
|
70
|
-
yield
|
71
|
-
yield
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
43
|
+
yield initializeNotifications(this.notificationsPlatform);
|
44
|
+
yield this.addButtonListeners();
|
45
|
+
});
|
46
|
+
}
|
47
|
+
addButtonListeners() {
|
48
|
+
return __awaiter(this, void 0, void 0, function* () {
|
49
|
+
try {
|
50
|
+
yield Notifications.addEventListener('notification-action', (event) => {
|
51
|
+
var _a;
|
52
|
+
console.log(event, 'notification-action button clicked');
|
53
|
+
const button = (_a = this.toastButtons) === null || _a === void 0 ? void 0 : _a.find((t) => t.task === event.result.task);
|
54
|
+
if (!button) {
|
55
|
+
return;
|
56
|
+
}
|
57
|
+
button.action({ details: event.result.customData.details, buttonElement: this });
|
58
|
+
});
|
59
|
+
}
|
60
|
+
catch (e) {
|
61
|
+
console.log(e);
|
62
|
+
}
|
85
63
|
});
|
86
64
|
}
|
87
65
|
showNotificationToast(row) {
|
88
66
|
return __awaiter(this, void 0, void 0, function* () {
|
89
|
-
const { HEADER: title, MESSAGE: body, NOTIFY_SEVERITY: type } = row;
|
67
|
+
const { HEADER: title, MESSAGE: body, NOTIFY_SEVERITY: type, ALERT_ID } = row;
|
90
68
|
const notification = {
|
91
69
|
title,
|
92
70
|
body,
|
93
|
-
priority:
|
71
|
+
priority: OpenfinGenesisPriorityMap[type],
|
94
72
|
toast: this.toast || 'transient',
|
95
73
|
category: type,
|
96
74
|
template: 'markdown',
|
97
|
-
id:
|
75
|
+
id: ALERT_ID,
|
98
76
|
soundOptions: {
|
99
77
|
mode: 'silent',
|
100
78
|
},
|
101
79
|
indicator: {
|
102
80
|
text: title,
|
103
|
-
color:
|
104
|
-
fallback:
|
81
|
+
color: OpenfinGenesisColorMap[type],
|
82
|
+
fallback: OpenfinGenesisColorMap[type],
|
105
83
|
},
|
106
|
-
buttons: this.mapToastButtons(this.toastButtons),
|
107
|
-
platform: PLATFORM_ID
|
84
|
+
buttons: this.mapToastButtons(this.toastButtons, row), // To Do add action buttons
|
85
|
+
// platform: PLATFORM_ID
|
108
86
|
};
|
109
87
|
try {
|
110
88
|
yield Notifications.create(notification);
|
@@ -114,19 +92,22 @@ let OpenfinNotifications = class OpenfinNotifications extends NotificationListen
|
|
114
92
|
}
|
115
93
|
});
|
116
94
|
}
|
117
|
-
mapToastButtons(toastButtons) {
|
95
|
+
mapToastButtons(toastButtons, row) {
|
118
96
|
if (!toastButtons) {
|
119
97
|
return null;
|
120
98
|
}
|
121
|
-
return toastButtons
|
99
|
+
return toastButtons
|
100
|
+
.filter((t) => !!t.condition({ details: row }))
|
101
|
+
.map((t) => {
|
122
102
|
return {
|
123
103
|
title: t.placeholder,
|
124
104
|
type: 'button',
|
105
|
+
cta: true,
|
125
106
|
onClick: {
|
126
|
-
|
127
|
-
task: 'acknowledge-task',
|
107
|
+
task: t.task,
|
128
108
|
customData: {
|
129
109
|
message: 'Notification button clicked',
|
110
|
+
details: row,
|
130
111
|
},
|
131
112
|
},
|
132
113
|
};
|
@@ -135,15 +116,15 @@ let OpenfinNotifications = class OpenfinNotifications extends NotificationListen
|
|
135
116
|
};
|
136
117
|
__decorate([
|
137
118
|
attr
|
138
|
-
],
|
139
|
-
|
119
|
+
], OpenfinNotificationsListener.prototype, "toast", void 0);
|
120
|
+
OpenfinNotificationsListener = __decorate([
|
140
121
|
customElement({
|
141
|
-
name: 'openfin-
|
122
|
+
name: 'openfin-notifications-listener',
|
142
123
|
template: html `
|
143
124
|
<template ${ref('notificationListener')}>
|
144
125
|
<slot></slot>
|
145
126
|
</template>
|
146
127
|
`,
|
147
128
|
})
|
148
|
-
],
|
149
|
-
export {
|
129
|
+
], OpenfinNotificationsListener);
|
130
|
+
export { OpenfinNotificationsListener };
|
@@ -1718,12 +1718,12 @@
|
|
1718
1718
|
},
|
1719
1719
|
{
|
1720
1720
|
"kind": "Class",
|
1721
|
-
"canonicalReference": "@genesislcap/foundation-fdc3!
|
1722
|
-
"docComment": "/**\n * @remarks\n *\n * This component extends the notification listener class and overrides the logic for showing the toast message to instead dispatch the event to the openfin notifications bus.\n *\n * @tagname\n *\n * openfin-
|
1721
|
+
"canonicalReference": "@genesislcap/foundation-fdc3!OpenfinNotificationsListener:class",
|
1722
|
+
"docComment": "/**\n * @remarks\n *\n * This component extends the notification listener class and overrides the logic for showing the toast message to instead dispatch the event to the openfin notifications bus.\n *\n * @tagname\n *\n * openfin-notifications-listener\n *\n * @public\n */\n",
|
1723
1723
|
"excerptTokens": [
|
1724
1724
|
{
|
1725
1725
|
"kind": "Content",
|
1726
|
-
"text": "export declare class
|
1726
|
+
"text": "export declare class OpenfinNotificationsListener extends "
|
1727
1727
|
},
|
1728
1728
|
{
|
1729
1729
|
"kind": "Reference",
|
@@ -1738,12 +1738,12 @@
|
|
1738
1738
|
"fileUrlPath": "src/notifications/openfin-notifications-listener.ts",
|
1739
1739
|
"releaseTag": "Public",
|
1740
1740
|
"isAbstract": false,
|
1741
|
-
"name": "
|
1741
|
+
"name": "OpenfinNotificationsListener",
|
1742
1742
|
"preserveMemberOrder": false,
|
1743
1743
|
"members": [
|
1744
1744
|
{
|
1745
1745
|
"kind": "Method",
|
1746
|
-
"canonicalReference": "@genesislcap/foundation-fdc3!
|
1746
|
+
"canonicalReference": "@genesislcap/foundation-fdc3!OpenfinNotificationsListener#connectedCallback:member(1)",
|
1747
1747
|
"docComment": "",
|
1748
1748
|
"excerptTokens": [
|
1749
1749
|
{
|
@@ -1777,9 +1777,40 @@
|
|
1777
1777
|
"isAbstract": false,
|
1778
1778
|
"name": "connectedCallback"
|
1779
1779
|
},
|
1780
|
+
{
|
1781
|
+
"kind": "Property",
|
1782
|
+
"canonicalReference": "@genesislcap/foundation-fdc3!OpenfinNotificationsListener#notificationsPlatform:member",
|
1783
|
+
"docComment": "",
|
1784
|
+
"excerptTokens": [
|
1785
|
+
{
|
1786
|
+
"kind": "Content",
|
1787
|
+
"text": "notificationsPlatform: "
|
1788
|
+
},
|
1789
|
+
{
|
1790
|
+
"kind": "Reference",
|
1791
|
+
"text": "NotificationsPlatform",
|
1792
|
+
"canonicalReference": "@openfin/workspace!NotificationsPlatform:interface"
|
1793
|
+
},
|
1794
|
+
{
|
1795
|
+
"kind": "Content",
|
1796
|
+
"text": ";"
|
1797
|
+
}
|
1798
|
+
],
|
1799
|
+
"isReadonly": false,
|
1800
|
+
"isOptional": false,
|
1801
|
+
"releaseTag": "Public",
|
1802
|
+
"name": "notificationsPlatform",
|
1803
|
+
"propertyTypeTokenRange": {
|
1804
|
+
"startIndex": 1,
|
1805
|
+
"endIndex": 2
|
1806
|
+
},
|
1807
|
+
"isStatic": false,
|
1808
|
+
"isProtected": false,
|
1809
|
+
"isAbstract": false
|
1810
|
+
},
|
1780
1811
|
{
|
1781
1812
|
"kind": "Method",
|
1782
|
-
"canonicalReference": "@genesislcap/foundation-fdc3!
|
1813
|
+
"canonicalReference": "@genesislcap/foundation-fdc3!OpenfinNotificationsListener#showNotificationToast:member(1)",
|
1783
1814
|
"docComment": "",
|
1784
1815
|
"excerptTokens": [
|
1785
1816
|
{
|
@@ -1833,7 +1864,7 @@
|
|
1833
1864
|
},
|
1834
1865
|
{
|
1835
1866
|
"kind": "Property",
|
1836
|
-
"canonicalReference": "@genesislcap/foundation-fdc3!
|
1867
|
+
"canonicalReference": "@genesislcap/foundation-fdc3!OpenfinNotificationsListener#toast:member",
|
1837
1868
|
"docComment": "",
|
1838
1869
|
"excerptTokens": [
|
1839
1870
|
{
|
@@ -1860,6 +1891,41 @@
|
|
1860
1891
|
"isStatic": false,
|
1861
1892
|
"isProtected": false,
|
1862
1893
|
"isAbstract": false
|
1894
|
+
},
|
1895
|
+
{
|
1896
|
+
"kind": "Property",
|
1897
|
+
"canonicalReference": "@genesislcap/foundation-fdc3!OpenfinNotificationsListener#toastButtons:member",
|
1898
|
+
"docComment": "",
|
1899
|
+
"excerptTokens": [
|
1900
|
+
{
|
1901
|
+
"kind": "Content",
|
1902
|
+
"text": "toastButtons: "
|
1903
|
+
},
|
1904
|
+
{
|
1905
|
+
"kind": "Reference",
|
1906
|
+
"text": "OpenfinToastButton",
|
1907
|
+
"canonicalReference": "@genesislcap/foundation-fdc3!OpenfinToastButton:interface"
|
1908
|
+
},
|
1909
|
+
{
|
1910
|
+
"kind": "Content",
|
1911
|
+
"text": "[]"
|
1912
|
+
},
|
1913
|
+
{
|
1914
|
+
"kind": "Content",
|
1915
|
+
"text": ";"
|
1916
|
+
}
|
1917
|
+
],
|
1918
|
+
"isReadonly": false,
|
1919
|
+
"isOptional": false,
|
1920
|
+
"releaseTag": "Public",
|
1921
|
+
"name": "toastButtons",
|
1922
|
+
"propertyTypeTokenRange": {
|
1923
|
+
"startIndex": 1,
|
1924
|
+
"endIndex": 3
|
1925
|
+
},
|
1926
|
+
"isStatic": false,
|
1927
|
+
"isProtected": false,
|
1928
|
+
"isAbstract": false
|
1863
1929
|
}
|
1864
1930
|
],
|
1865
1931
|
"extendsTokenRange": {
|
@@ -1867,6 +1933,65 @@
|
|
1867
1933
|
"endIndex": 2
|
1868
1934
|
},
|
1869
1935
|
"implementsTokenRanges": []
|
1936
|
+
},
|
1937
|
+
{
|
1938
|
+
"kind": "Interface",
|
1939
|
+
"canonicalReference": "@genesislcap/foundation-fdc3!OpenfinToastButton:interface",
|
1940
|
+
"docComment": "/**\n * @remarks\n *\n * OpenfinToastButton interface which extends ToastButton\n *\n * @public\n */\n",
|
1941
|
+
"excerptTokens": [
|
1942
|
+
{
|
1943
|
+
"kind": "Content",
|
1944
|
+
"text": "export interface OpenfinToastButton extends "
|
1945
|
+
},
|
1946
|
+
{
|
1947
|
+
"kind": "Reference",
|
1948
|
+
"text": "ToastButton",
|
1949
|
+
"canonicalReference": "@genesislcap/foundation-notifications!ToastButton:interface"
|
1950
|
+
},
|
1951
|
+
{
|
1952
|
+
"kind": "Content",
|
1953
|
+
"text": " "
|
1954
|
+
}
|
1955
|
+
],
|
1956
|
+
"fileUrlPath": "src/notifications/openfin-notifications-listener.ts",
|
1957
|
+
"releaseTag": "Public",
|
1958
|
+
"name": "OpenfinToastButton",
|
1959
|
+
"preserveMemberOrder": false,
|
1960
|
+
"members": [
|
1961
|
+
{
|
1962
|
+
"kind": "PropertySignature",
|
1963
|
+
"canonicalReference": "@genesislcap/foundation-fdc3!OpenfinToastButton#task:member",
|
1964
|
+
"docComment": "",
|
1965
|
+
"excerptTokens": [
|
1966
|
+
{
|
1967
|
+
"kind": "Content",
|
1968
|
+
"text": "task: "
|
1969
|
+
},
|
1970
|
+
{
|
1971
|
+
"kind": "Content",
|
1972
|
+
"text": "string"
|
1973
|
+
},
|
1974
|
+
{
|
1975
|
+
"kind": "Content",
|
1976
|
+
"text": ";"
|
1977
|
+
}
|
1978
|
+
],
|
1979
|
+
"isReadonly": false,
|
1980
|
+
"isOptional": false,
|
1981
|
+
"releaseTag": "Public",
|
1982
|
+
"name": "task",
|
1983
|
+
"propertyTypeTokenRange": {
|
1984
|
+
"startIndex": 1,
|
1985
|
+
"endIndex": 2
|
1986
|
+
}
|
1987
|
+
}
|
1988
|
+
],
|
1989
|
+
"extendsTokenRanges": [
|
1990
|
+
{
|
1991
|
+
"startIndex": 1,
|
1992
|
+
"endIndex": 2
|
1993
|
+
}
|
1994
|
+
]
|
1870
1995
|
}
|
1871
1996
|
]
|
1872
1997
|
}
|
@@ -19,10 +19,12 @@ import type { Listener } from '@finos/fdc3';
|
|
19
19
|
import { Logger } from '@genesislcap/foundation-logger';
|
20
20
|
import { NotificationDataRow } from '@genesislcap/foundation-notifications';
|
21
21
|
import { NotificationListener } from '@genesislcap/foundation-ui';
|
22
|
+
import { NotificationsPlatform } from '@openfin/workspace/notifications';
|
22
23
|
import { Observable } from 'rxjs';
|
23
24
|
import { OverrideFoundationElementDefinition } from '@microsoft/fast-foundation';
|
24
25
|
import type { PrivateChannel } from '@finos/fdc3';
|
25
26
|
import type { StandardIntent } from '@finos/fdc3';
|
27
|
+
import { ToastButton } from '@genesislcap/foundation-notifications';
|
26
28
|
import { ViewTemplate } from '@microsoft/fast-element';
|
27
29
|
|
28
30
|
/**
|
@@ -1678,18 +1680,30 @@ export { Listener }
|
|
1678
1680
|
export declare const logger: Logger;
|
1679
1681
|
|
1680
1682
|
/**
|
1681
|
-
* @tagname openfin-
|
1683
|
+
* @tagname openfin-notifications-listener
|
1682
1684
|
* @public
|
1683
1685
|
* @remarks
|
1684
1686
|
* This component extends the notification listener class and overrides the logic for showing the toast message to instead dispatch the event to the openfin notifications bus.
|
1685
1687
|
*/
|
1686
|
-
export declare class
|
1688
|
+
export declare class OpenfinNotificationsListener extends NotificationListener {
|
1689
|
+
notificationsPlatform: NotificationsPlatform;
|
1687
1690
|
toast: string;
|
1691
|
+
toastButtons: OpenfinToastButton[];
|
1688
1692
|
connectedCallback(): Promise<void>;
|
1693
|
+
private addButtonListeners;
|
1689
1694
|
protected showNotificationToast(row: NotificationDataRow): Promise<void>;
|
1690
1695
|
private mapToastButtons;
|
1691
1696
|
}
|
1692
1697
|
|
1698
|
+
/**
|
1699
|
+
* @public
|
1700
|
+
* @remarks
|
1701
|
+
* OpenfinToastButton interface which extends ToastButton
|
1702
|
+
*/
|
1703
|
+
export declare interface OpenfinToastButton extends ToastButton {
|
1704
|
+
task: string;
|
1705
|
+
}
|
1706
|
+
|
1693
1707
|
export { PrivateChannel }
|
1694
1708
|
|
1695
1709
|
export { StandardIntent }
|
@@ -9,7 +9,7 @@
|
|
9
9
|
| Class | Description |
|
10
10
|
| --- | --- |
|
11
11
|
| [InteropNotificationsListener](./foundation-fdc3.interopnotificationslistener.md) | |
|
12
|
-
| [
|
12
|
+
| [OpenfinNotificationsListener](./foundation-fdc3.openfinnotificationslistener.md) | |
|
13
13
|
|
14
14
|
## Interfaces
|
15
15
|
|
@@ -20,6 +20,7 @@
|
|
20
20
|
| [FDC3Channel](./foundation-fdc3.fdc3channel.md) | |
|
21
21
|
| [FDC3Context](./foundation-fdc3.fdc3context.md) | |
|
22
22
|
| [FDC3IntentResolution](./foundation-fdc3.fdc3intentresolution.md) | |
|
23
|
+
| [OpenfinToastButton](./foundation-fdc3.openfintoastbutton.md) | |
|
23
24
|
|
24
25
|
## Variables
|
25
26
|
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-fdc3](./foundation-fdc3.md) > [OpenfinNotificationsListener](./foundation-fdc3.openfinnotificationslistener.md) > [connectedCallback](./foundation-fdc3.openfinnotificationslistener.connectedcallback.md)
|
4
|
+
|
5
|
+
## OpenfinNotificationsListener.connectedCallback() method
|
6
|
+
|
7
|
+
**Signature:**
|
8
|
+
|
9
|
+
```typescript
|
10
|
+
connectedCallback(): Promise<void>;
|
11
|
+
```
|
12
|
+
**Returns:**
|
13
|
+
|
14
|
+
Promise<void>
|
15
|
+
|
@@ -0,0 +1,32 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-fdc3](./foundation-fdc3.md) > [OpenfinNotificationsListener](./foundation-fdc3.openfinnotificationslistener.md)
|
4
|
+
|
5
|
+
## OpenfinNotificationsListener class
|
6
|
+
|
7
|
+
**Signature:**
|
8
|
+
|
9
|
+
```typescript
|
10
|
+
export declare class OpenfinNotificationsListener extends NotificationListener
|
11
|
+
```
|
12
|
+
**Extends:** NotificationListener
|
13
|
+
|
14
|
+
## Remarks
|
15
|
+
|
16
|
+
This component extends the notification listener class and overrides the logic for showing the toast message to instead dispatch the event to the openfin notifications bus.
|
17
|
+
|
18
|
+
## Properties
|
19
|
+
|
20
|
+
| Property | Modifiers | Type | Description |
|
21
|
+
| --- | --- | --- | --- |
|
22
|
+
| [notificationsPlatform](./foundation-fdc3.openfinnotificationslistener.notificationsplatform.md) | | NotificationsPlatform | |
|
23
|
+
| [toast](./foundation-fdc3.openfinnotificationslistener.toast.md) | | string | |
|
24
|
+
| [toastButtons](./foundation-fdc3.openfinnotificationslistener.toastbuttons.md) | | [OpenfinToastButton](./foundation-fdc3.openfintoastbutton.md)<!-- -->\[\] | |
|
25
|
+
|
26
|
+
## Methods
|
27
|
+
|
28
|
+
| Method | Modifiers | Description |
|
29
|
+
| --- | --- | --- |
|
30
|
+
| [connectedCallback()](./foundation-fdc3.openfinnotificationslistener.connectedcallback.md) | | |
|
31
|
+
| [showNotificationToast(row)](./foundation-fdc3.openfinnotificationslistener.shownotificationtoast.md) | <code>protected</code> | |
|
32
|
+
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-fdc3](./foundation-fdc3.md) > [OpenfinNotificationsListener](./foundation-fdc3.openfinnotificationslistener.md) > [notificationsPlatform](./foundation-fdc3.openfinnotificationslistener.notificationsplatform.md)
|
4
|
+
|
5
|
+
## OpenfinNotificationsListener.notificationsPlatform property
|
6
|
+
|
7
|
+
**Signature:**
|
8
|
+
|
9
|
+
```typescript
|
10
|
+
notificationsPlatform: NotificationsPlatform;
|
11
|
+
```
|
@@ -1,8 +1,8 @@
|
|
1
1
|
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
2
|
|
3
|
-
[Home](./index.md) > [@genesislcap/foundation-fdc3](./foundation-fdc3.md) > [
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-fdc3](./foundation-fdc3.md) > [OpenfinNotificationsListener](./foundation-fdc3.openfinnotificationslistener.md) > [showNotificationToast](./foundation-fdc3.openfinnotificationslistener.shownotificationtoast.md)
|
4
4
|
|
5
|
-
##
|
5
|
+
## OpenfinNotificationsListener.showNotificationToast() method
|
6
6
|
|
7
7
|
**Signature:**
|
8
8
|
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-fdc3](./foundation-fdc3.md) > [OpenfinNotificationsListener](./foundation-fdc3.openfinnotificationslistener.md) > [toast](./foundation-fdc3.openfinnotificationslistener.toast.md)
|
4
|
+
|
5
|
+
## OpenfinNotificationsListener.toast property
|
6
|
+
|
7
|
+
**Signature:**
|
8
|
+
|
9
|
+
```typescript
|
10
|
+
toast: string;
|
11
|
+
```
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-fdc3](./foundation-fdc3.md) > [OpenfinNotificationsListener](./foundation-fdc3.openfinnotificationslistener.md) > [toastButtons](./foundation-fdc3.openfinnotificationslistener.toastbuttons.md)
|
4
|
+
|
5
|
+
## OpenfinNotificationsListener.toastButtons property
|
6
|
+
|
7
|
+
**Signature:**
|
8
|
+
|
9
|
+
```typescript
|
10
|
+
toastButtons: OpenfinToastButton[];
|
11
|
+
```
|
@@ -0,0 +1,23 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-fdc3](./foundation-fdc3.md) > [OpenfinToastButton](./foundation-fdc3.openfintoastbutton.md)
|
4
|
+
|
5
|
+
## OpenfinToastButton interface
|
6
|
+
|
7
|
+
**Signature:**
|
8
|
+
|
9
|
+
```typescript
|
10
|
+
export interface OpenfinToastButton extends ToastButton
|
11
|
+
```
|
12
|
+
**Extends:** ToastButton
|
13
|
+
|
14
|
+
## Remarks
|
15
|
+
|
16
|
+
OpenfinToastButton interface which extends ToastButton
|
17
|
+
|
18
|
+
## Properties
|
19
|
+
|
20
|
+
| Property | Modifiers | Type | Description |
|
21
|
+
| --- | --- | --- | --- |
|
22
|
+
| [task](./foundation-fdc3.openfintoastbutton.task.md) | | string | |
|
23
|
+
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-fdc3](./foundation-fdc3.md) > [OpenfinToastButton](./foundation-fdc3.openfintoastbutton.md) > [task](./foundation-fdc3.openfintoastbutton.task.md)
|
4
|
+
|
5
|
+
## OpenfinToastButton.task property
|
6
|
+
|
7
|
+
**Signature:**
|
8
|
+
|
9
|
+
```typescript
|
10
|
+
task: string;
|
11
|
+
```
|
package/docs/api-report.md
CHANGED
@@ -25,10 +25,12 @@ import type { Listener } from '@finos/fdc3';
|
|
25
25
|
import { Logger } from '@genesislcap/foundation-logger';
|
26
26
|
import { NotificationDataRow } from '@genesislcap/foundation-notifications';
|
27
27
|
import { NotificationListener } from '@genesislcap/foundation-ui';
|
28
|
+
import { NotificationsPlatform } from '@openfin/workspace/notifications';
|
28
29
|
import { Observable } from 'rxjs';
|
29
30
|
import { OverrideFoundationElementDefinition } from '@microsoft/fast-foundation';
|
30
31
|
import type { PrivateChannel } from '@finos/fdc3';
|
31
32
|
import type { StandardIntent } from '@finos/fdc3';
|
33
|
+
import { ToastButton } from '@genesislcap/foundation-notifications';
|
32
34
|
import { ViewTemplate } from '@microsoft/fast-element';
|
33
35
|
|
34
36
|
// @alpha
|
@@ -265,13 +267,23 @@ export { Listener }
|
|
265
267
|
export const logger: Logger;
|
266
268
|
|
267
269
|
// @public (undocumented)
|
268
|
-
export class
|
270
|
+
export class OpenfinNotificationsListener extends NotificationListener {
|
269
271
|
// (undocumented)
|
270
272
|
connectedCallback(): Promise<void>;
|
271
273
|
// (undocumented)
|
274
|
+
notificationsPlatform: NotificationsPlatform;
|
275
|
+
// (undocumented)
|
272
276
|
protected showNotificationToast(row: NotificationDataRow): Promise<void>;
|
273
277
|
// (undocumented)
|
274
278
|
toast: string;
|
279
|
+
// (undocumented)
|
280
|
+
toastButtons: OpenfinToastButton[];
|
281
|
+
}
|
282
|
+
|
283
|
+
// @public (undocumented)
|
284
|
+
export interface OpenfinToastButton extends ToastButton {
|
285
|
+
// (undocumented)
|
286
|
+
task: string;
|
275
287
|
}
|
276
288
|
|
277
289
|
export { PrivateChannel }
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@genesislcap/foundation-fdc3",
|
3
3
|
"description": "Genesis Foundation FDC3",
|
4
|
-
"version": "14.214.1-openfin-notifications.
|
4
|
+
"version": "14.214.1-openfin-notifications.3",
|
5
5
|
"sideEffects": false,
|
6
6
|
"license": "SEE LICENSE IN license.txt",
|
7
7
|
"main": "dist/esm/index.js",
|
@@ -92,5 +92,5 @@
|
|
92
92
|
"publishConfig": {
|
93
93
|
"access": "public"
|
94
94
|
},
|
95
|
-
"gitHead": "
|
95
|
+
"gitHead": "29caa03d47e5d72c3f23090321fe6cc3ccdd5ff4"
|
96
96
|
}
|
@@ -1,15 +0,0 @@
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
-
|
3
|
-
[Home](./index.md) > [@genesislcap/foundation-fdc3](./foundation-fdc3.md) > [OpenfinNotifications](./foundation-fdc3.openfinnotifications.md) > [connectedCallback](./foundation-fdc3.openfinnotifications.connectedcallback.md)
|
4
|
-
|
5
|
-
## OpenfinNotifications.connectedCallback() method
|
6
|
-
|
7
|
-
**Signature:**
|
8
|
-
|
9
|
-
```typescript
|
10
|
-
connectedCallback(): Promise<void>;
|
11
|
-
```
|
12
|
-
**Returns:**
|
13
|
-
|
14
|
-
Promise<void>
|
15
|
-
|
@@ -1,30 +0,0 @@
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
-
|
3
|
-
[Home](./index.md) > [@genesislcap/foundation-fdc3](./foundation-fdc3.md) > [OpenfinNotifications](./foundation-fdc3.openfinnotifications.md)
|
4
|
-
|
5
|
-
## OpenfinNotifications class
|
6
|
-
|
7
|
-
**Signature:**
|
8
|
-
|
9
|
-
```typescript
|
10
|
-
export declare class OpenfinNotifications extends NotificationListener
|
11
|
-
```
|
12
|
-
**Extends:** NotificationListener
|
13
|
-
|
14
|
-
## Remarks
|
15
|
-
|
16
|
-
This component extends the notification listener class and overrides the logic for showing the toast message to instead dispatch the event to the openfin notifications bus.
|
17
|
-
|
18
|
-
## Properties
|
19
|
-
|
20
|
-
| Property | Modifiers | Type | Description |
|
21
|
-
| --- | --- | --- | --- |
|
22
|
-
| [toast](./foundation-fdc3.openfinnotifications.toast.md) | | string | |
|
23
|
-
|
24
|
-
## Methods
|
25
|
-
|
26
|
-
| Method | Modifiers | Description |
|
27
|
-
| --- | --- | --- |
|
28
|
-
| [connectedCallback()](./foundation-fdc3.openfinnotifications.connectedcallback.md) | | |
|
29
|
-
| [showNotificationToast(row)](./foundation-fdc3.openfinnotifications.shownotificationtoast.md) | <code>protected</code> | |
|
30
|
-
|
@@ -1,11 +0,0 @@
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
-
|
3
|
-
[Home](./index.md) > [@genesislcap/foundation-fdc3](./foundation-fdc3.md) > [OpenfinNotifications](./foundation-fdc3.openfinnotifications.md) > [toast](./foundation-fdc3.openfinnotifications.toast.md)
|
4
|
-
|
5
|
-
## OpenfinNotifications.toast property
|
6
|
-
|
7
|
-
**Signature:**
|
8
|
-
|
9
|
-
```typescript
|
10
|
-
toast: string;
|
11
|
-
```
|