@genesislcap/foundation-ui 14.174.0 → 14.175.0
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ToastButton } from '@genesislcap/foundation-notifications';
|
|
1
|
+
import { NotificationDataRow, ToastButton } from '@genesislcap/foundation-notifications';
|
|
2
2
|
import { FoundationElement } from '@microsoft/fast-foundation';
|
|
3
3
|
import { Subscription } from 'rxjs';
|
|
4
4
|
export declare const foundationNotificationListenerShadowOptions: ShadowRootInit;
|
|
@@ -28,6 +28,7 @@ export declare class NotificationListener extends FoundationElement {
|
|
|
28
28
|
connectedCallback(): Promise<void>;
|
|
29
29
|
disconnectedCallback(): void;
|
|
30
30
|
private handleStreamUpdate;
|
|
31
|
+
protected showNotificationToast(row: NotificationDataRow): void;
|
|
31
32
|
}
|
|
32
33
|
/**
|
|
33
34
|
* The Foundation Notification Listener
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification-listener.d.ts","sourceRoot":"","sources":["../../../src/notification-listener/notification-listener.ts"],"names":[],"mappings":"AAOA,OAAO,
|
|
1
|
+
{"version":3,"file":"notification-listener.d.ts","sourceRoot":"","sources":["../../../src/notification-listener/notification-listener.ts"],"names":[],"mappings":"AAOA,OAAO,EAIL,mBAAmB,EACnB,WAAW,EAEZ,MAAM,uCAAuC,CAAC;AAE/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AAIpC,eAAO,MAAM,2CAA2C,EAAE,cAGzD,CAAC;AAEF;;GAEG;AACH,qBAAa,oBAAqB,SAAQ,iBAAiB;IAC7C,oBAAoB,EAAG,WAAW,CAAC;IAE/C;;;;OAIG;IACmC,YAAY,MAAC;IACnD;;;OAGG;IACuE,YAAY,SAAK;IAC3F;;;OAGG;IACS,YAAY,EAAE,WAAW,EAAE,CAAM;IAE7C,SAAS,CAAC,OAAO,EAAE,YAAY,CAAC;IACpB,OAAO,CAAC,UAAU,CAAa;IACrC,iBAAiB;IA8BvB,oBAAoB;IAWpB,OAAO,CAAC,kBAAkB;IAU1B,SAAS,CAAC,qBAAqB,CAAC,GAAG,EAAE,mBAAmB,GAAG,IAAI;CA2BhE;AAED;;;;;;GAMG;AACH,eAAO,MAAM,8BAA8B;;;;;;;;+BAIzC,CAAC"}
|
|
@@ -69,29 +69,32 @@ export class NotificationListener extends FoundationElement {
|
|
|
69
69
|
const rows = dataServerResult.inserts;
|
|
70
70
|
if (rows.length > 0) {
|
|
71
71
|
rows.forEach((row) => {
|
|
72
|
-
|
|
73
|
-
const createdAt = row.CREATED_AT ? new Date(row.CREATED_AT) : undefined;
|
|
74
|
-
const expiry = row.EXPIRY ? row.EXPIRY - row.CREATED_AT : undefined;
|
|
75
|
-
let buttons = [];
|
|
76
|
-
if (this.toastButtons && this.toastButtons.length > 0) {
|
|
77
|
-
buttons = this.toastButtons.filter(({ condition }) => !!condition ? condition({ details: row }) : true);
|
|
78
|
-
}
|
|
79
|
-
const toastStructure = {
|
|
80
|
-
title: title,
|
|
81
|
-
body: message,
|
|
82
|
-
createdAt: createdAt,
|
|
83
|
-
toast: {
|
|
84
|
-
details: row,
|
|
85
|
-
type: type === null || type === void 0 ? void 0 : type.toLowerCase(),
|
|
86
|
-
buttons: buttons,
|
|
87
|
-
autoClose: expiry !== undefined ? !!expiry : !!this.closeTimeout,
|
|
88
|
-
closeTimeout: expiry !== null && expiry !== void 0 ? expiry : this.closeTimeout,
|
|
89
|
-
},
|
|
90
|
-
};
|
|
91
|
-
showNotificationToast(toastStructure, this.tagName);
|
|
72
|
+
this.showNotificationToast(row);
|
|
92
73
|
});
|
|
93
74
|
}
|
|
94
75
|
}
|
|
76
|
+
showNotificationToast(row) {
|
|
77
|
+
const { HEADER: title, MESSAGE: message, NOTIFY_SEVERITY: type } = row;
|
|
78
|
+
const createdAt = row.CREATED_AT ? new Date(row.CREATED_AT) : undefined;
|
|
79
|
+
const expiry = row.EXPIRY ? row.EXPIRY - row.CREATED_AT : undefined;
|
|
80
|
+
let buttons = [];
|
|
81
|
+
if (this.toastButtons && this.toastButtons.length > 0) {
|
|
82
|
+
buttons = this.toastButtons.filter(({ condition }) => !!condition ? condition({ details: row }) : true);
|
|
83
|
+
}
|
|
84
|
+
const toastStructure = {
|
|
85
|
+
title: title,
|
|
86
|
+
body: message,
|
|
87
|
+
createdAt: createdAt,
|
|
88
|
+
toast: {
|
|
89
|
+
details: row,
|
|
90
|
+
type: type === null || type === void 0 ? void 0 : type.toLowerCase(),
|
|
91
|
+
buttons: buttons,
|
|
92
|
+
autoClose: expiry !== undefined ? !!expiry : !!this.closeTimeout,
|
|
93
|
+
closeTimeout: expiry !== null && expiry !== void 0 ? expiry : this.closeTimeout,
|
|
94
|
+
},
|
|
95
|
+
};
|
|
96
|
+
showNotificationToast(toastStructure, this.tagName);
|
|
97
|
+
}
|
|
95
98
|
}
|
|
96
99
|
__decorate([
|
|
97
100
|
observable
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@genesislcap/foundation-ui",
|
|
3
3
|
"description": "Genesis Foundation UI",
|
|
4
|
-
"version": "14.
|
|
4
|
+
"version": "14.175.0",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"license": "SEE LICENSE IN license.txt",
|
|
7
7
|
"main": "dist/esm/index.js",
|
|
@@ -74,13 +74,13 @@
|
|
|
74
74
|
"test:debug": "genx test --debug"
|
|
75
75
|
},
|
|
76
76
|
"devDependencies": {
|
|
77
|
-
"@genesislcap/foundation-testing": "14.
|
|
78
|
-
"@genesislcap/genx": "14.
|
|
79
|
-
"@genesislcap/rollup-builder": "14.
|
|
80
|
-
"@genesislcap/ts-builder": "14.
|
|
81
|
-
"@genesislcap/uvu-playwright-builder": "14.
|
|
82
|
-
"@genesislcap/vite-builder": "14.
|
|
83
|
-
"@genesislcap/webpack-builder": "14.
|
|
77
|
+
"@genesislcap/foundation-testing": "14.175.0",
|
|
78
|
+
"@genesislcap/genx": "14.175.0",
|
|
79
|
+
"@genesislcap/rollup-builder": "14.175.0",
|
|
80
|
+
"@genesislcap/ts-builder": "14.175.0",
|
|
81
|
+
"@genesislcap/uvu-playwright-builder": "14.175.0",
|
|
82
|
+
"@genesislcap/vite-builder": "14.175.0",
|
|
83
|
+
"@genesislcap/webpack-builder": "14.175.0",
|
|
84
84
|
"copyfiles": "^2.4.1",
|
|
85
85
|
"rimraf": "^3.0.2",
|
|
86
86
|
"rxjs": "^7.5.4"
|
|
@@ -91,12 +91,12 @@
|
|
|
91
91
|
"@fortawesome/free-regular-svg-icons": "^6.2.1",
|
|
92
92
|
"@fortawesome/free-solid-svg-icons": "^6.2.1",
|
|
93
93
|
"@genesiscommunitysuccess/analyzer-import-alias-plugin": "^4.0.0",
|
|
94
|
-
"@genesislcap/foundation-comms": "14.
|
|
95
|
-
"@genesislcap/foundation-criteria": "14.
|
|
96
|
-
"@genesislcap/foundation-errors": "14.
|
|
97
|
-
"@genesislcap/foundation-logger": "14.
|
|
98
|
-
"@genesislcap/foundation-notifications": "14.
|
|
99
|
-
"@genesislcap/foundation-utils": "14.
|
|
94
|
+
"@genesislcap/foundation-comms": "14.175.0",
|
|
95
|
+
"@genesislcap/foundation-criteria": "14.175.0",
|
|
96
|
+
"@genesislcap/foundation-errors": "14.175.0",
|
|
97
|
+
"@genesislcap/foundation-logger": "14.175.0",
|
|
98
|
+
"@genesislcap/foundation-notifications": "14.175.0",
|
|
99
|
+
"@genesislcap/foundation-utils": "14.175.0",
|
|
100
100
|
"@microsoft/fast-colors": "^5.3.1",
|
|
101
101
|
"@microsoft/fast-components": "^2.30.6",
|
|
102
102
|
"@microsoft/fast-element": "^1.12.0",
|
|
@@ -118,5 +118,5 @@
|
|
|
118
118
|
"access": "public"
|
|
119
119
|
},
|
|
120
120
|
"customElements": "dist/custom-elements.json",
|
|
121
|
-
"gitHead": "
|
|
121
|
+
"gitHead": "4dab49e3b537a4166f54d4ecd48855f0cc7b0414"
|
|
122
122
|
}
|