@genesislcap/pbc-notify-ui 1.0.48 → 1.0.49
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/dist/dts/components/foundation-inbox/inbox-base/inbox-base.d.ts +3 -1
- package/dist/dts/components/foundation-inbox/inbox-base/inbox-base.d.ts.map +1 -1
- package/dist/dts/components/foundation-inbox/inbox.styles.d.ts.map +1 -1
- package/dist/dts/components/foundation-inbox/inbox.template.d.ts.map +1 -1
- package/dist/dts/components/foundation-inbox/inbox.utils.d.ts.map +1 -1
- package/dist/dts/sandbox.d.ts +2 -0
- package/dist/dts/sandbox.d.ts.map +1 -1
- package/dist/esm/components/foundation-inbox/inbox-base/inbox-base.js +29 -6
- package/dist/esm/components/foundation-inbox/inbox.styles.js +5 -3
- package/dist/esm/components/foundation-inbox/inbox.template.js +44 -40
- package/dist/esm/components/foundation-inbox/inbox.utils.js +14 -12
- package/dist/esm/sandbox.js +23 -2
- package/package.json +1 -1
|
@@ -41,6 +41,7 @@ export declare class FoundationInboxBase extends GenesisElement {
|
|
|
41
41
|
filterSearchAlertLog(): void;
|
|
42
42
|
reverseOrder(reverse: boolean): void;
|
|
43
43
|
filterSearchSubscribe(): void;
|
|
44
|
+
clearSearch(): void;
|
|
44
45
|
dismissAlert(alertId: string): void;
|
|
45
46
|
validateResponse(response: any): void;
|
|
46
47
|
dismissAllAlerts(): void;
|
|
@@ -48,6 +49,7 @@ export declare class FoundationInboxBase extends GenesisElement {
|
|
|
48
49
|
playPauseAlert(ruleClicked: Rule): Promise<void>;
|
|
49
50
|
deleteAlert(ruleClicked: Rule): Promise<void>;
|
|
50
51
|
openTemplateSubscription(ruleTemplate: any): Promise<void>;
|
|
51
|
-
|
|
52
|
+
formatDateStrForMatchCriteria(date: string): string;
|
|
53
|
+
formatDateForMatchCriteria(date: Date): string;
|
|
52
54
|
}
|
|
53
55
|
//# sourceMappingURL=inbox-base.d.ts.map
|
|
@@ -1 +1 @@
|
|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inbox.styles.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"inbox.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/foundation-inbox/inbox.styles.ts"],"names":[],"mappings":"AA0FA,eAAO,MAAM,WAAW,iDA+BvB,CAAC;AAEF,eAAO,MAAM,yBAAyB,iDAkDrC,CAAC;AAEF,eAAO,MAAM,aAAa,iDAYzB,CAAC;AAEF,eAAO,MAAM,SAAS,iDAYrB,CAAC;AAEF,eAAO,MAAM,eAAe,iDA0D3B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,qBAAqB,iDAyBjC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inbox.template.d.ts","sourceRoot":"","sources":["../../../../src/components/foundation-inbox/inbox.template.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"inbox.template.d.ts","sourceRoot":"","sources":["../../../../src/components/foundation-inbox/inbox.template.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AA0J/C;;GAEG;AACH,eAAO,MAAM,uBAAuB,sEAoJnC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inbox.utils.d.ts","sourceRoot":"","sources":["../../../../src/components/foundation-inbox/inbox.utils.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,SAAS,0CAAkE,CAAC;AAEzF,eAAO,MAAM,OAAO,uCAAgE,CAAC;AAErF,eAAO,MAAM,gBAAgB,kCAG5B,CAAC;AAEF,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"inbox.utils.d.ts","sourceRoot":"","sources":["../../../../src/components/foundation-inbox/inbox.utils.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,SAAS,0CAAkE,CAAC;AAEzF,eAAO,MAAM,OAAO,uCAAgE,CAAC;AAErF,eAAO,MAAM,gBAAgB,kCAG5B,CAAC;AAEF,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,4JAgBhD"}
|
package/dist/dts/sandbox.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sandbox.d.ts","sourceRoot":"","sources":["../../src/sandbox.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAY,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxE,OAAO,EAAsB,cAAc,EAA0B,MAAM,uBAAuB,CAAC;AAEnG,
|
|
1
|
+
{"version":3,"file":"sandbox.d.ts","sourceRoot":"","sources":["../../src/sandbox.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAY,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxE,OAAO,EAAsB,cAAc,EAA0B,MAAM,uBAAuB,CAAC;AAEnG,qBA6Ca,qBAAsB,SAAQ,cAAc;IAC9C,OAAO,EAAG,OAAO,CAAC;IACrB,IAAI,EAAG,IAAI,CAAC;IACN,KAAK,UAAS;IACd,iBAAiB,UAAS;IAEhC,iBAAiB;IAsBvB,UAAU;CAGX"}
|
|
@@ -101,10 +101,15 @@ export class FoundationInboxBase extends GenesisElement {
|
|
|
101
101
|
filterCriteria.withExpression(expressionBuilder('NOTIFY_SEVERITY', this.severitySearchValue, Serialisers.equals));
|
|
102
102
|
}
|
|
103
103
|
if (this.fromDatePickerValue) {
|
|
104
|
-
filterCriteria.withExpression(expressionBuilder('CREATED_AT', this.
|
|
104
|
+
filterCriteria.withExpression(expressionBuilder('CREATED_AT', this.formatDateStrForMatchCriteria(this.fromDatePickerValue), Serialisers.dateIsGreaterEqual));
|
|
105
105
|
}
|
|
106
106
|
if (this.toDatePickerValue) {
|
|
107
|
-
filterCriteria.withExpression(expressionBuilder('CREATED_AT', this.
|
|
107
|
+
filterCriteria.withExpression(expressionBuilder('CREATED_AT', this.formatDateStrForMatchCriteria(this.toDatePickerValue), Serialisers.dateIsLessEqual));
|
|
108
|
+
}
|
|
109
|
+
else {
|
|
110
|
+
// if no toDate is set, then force it to be today
|
|
111
|
+
const today = new Date();
|
|
112
|
+
filterCriteria.withExpression(expressionBuilder('CREATED_AT', this.formatDateForMatchCriteria(today), Serialisers.dateIsLessEqual));
|
|
108
113
|
}
|
|
109
114
|
// Refresh the data subscription
|
|
110
115
|
this.inboxService.unsubscribe(this.alertSubscription);
|
|
@@ -112,8 +117,10 @@ export class FoundationInboxBase extends GenesisElement {
|
|
|
112
117
|
this.inboxService.subscribe(this.alertSubscription, this.reverse, filterCriteria.build());
|
|
113
118
|
}
|
|
114
119
|
reverseOrder(reverse) {
|
|
115
|
-
this.reverse
|
|
116
|
-
|
|
120
|
+
if (this.reverse != reverse) {
|
|
121
|
+
this.reverse = reverse;
|
|
122
|
+
this.filterSearchAlertLog();
|
|
123
|
+
}
|
|
117
124
|
}
|
|
118
125
|
filterSearchSubscribe() {
|
|
119
126
|
if (!this.searchSubscribe) {
|
|
@@ -122,6 +129,14 @@ export class FoundationInboxBase extends GenesisElement {
|
|
|
122
129
|
}
|
|
123
130
|
this.templatesFilter = this.templates.filter((item) => item.NAME.toLowerCase().startsWith(this.searchSubscribe.toLowerCase()));
|
|
124
131
|
}
|
|
132
|
+
clearSearch() {
|
|
133
|
+
this.titleSearchValue = '';
|
|
134
|
+
this.bodySearchValue = '';
|
|
135
|
+
this.severitySearchValue = undefined;
|
|
136
|
+
this.fromDatePickerValue = undefined;
|
|
137
|
+
this.toDatePickerValue = undefined;
|
|
138
|
+
this.filterSearchAlertLog();
|
|
139
|
+
}
|
|
125
140
|
// #endregion
|
|
126
141
|
// #region New and History
|
|
127
142
|
dismissAlert(alertId) {
|
|
@@ -194,9 +209,17 @@ export class FoundationInboxBase extends GenesisElement {
|
|
|
194
209
|
});
|
|
195
210
|
}
|
|
196
211
|
// #endregion
|
|
212
|
+
formatDateStrForMatchCriteria(date) {
|
|
213
|
+
const dateObj = new Date(date);
|
|
214
|
+
return this.formatDateForMatchCriteria(dateObj);
|
|
215
|
+
}
|
|
197
216
|
formatDateForMatchCriteria(date) {
|
|
198
|
-
const
|
|
199
|
-
|
|
217
|
+
const formattedDateString = date.getFullYear() +
|
|
218
|
+
'' +
|
|
219
|
+
('0' + (date.getMonth() + 1)).slice(-2) +
|
|
220
|
+
'' +
|
|
221
|
+
('0' + date.getDate()).slice(-2);
|
|
222
|
+
return formattedDateString;
|
|
200
223
|
}
|
|
201
224
|
}
|
|
202
225
|
__decorate([
|
|
@@ -50,8 +50,7 @@ const search = css `
|
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
.clear-all {
|
|
53
|
-
width:
|
|
54
|
-
min-width: auto;
|
|
53
|
+
min-width: 100px;
|
|
55
54
|
margin-right: 10px;
|
|
56
55
|
}
|
|
57
56
|
|
|
@@ -63,10 +62,12 @@ const search = css `
|
|
|
63
62
|
|
|
64
63
|
.date-input {
|
|
65
64
|
margin-bottom: 0;
|
|
65
|
+
max-width: fit-content;
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
.date-input::part(control) {
|
|
69
|
-
width:
|
|
69
|
+
min-width: 120px;
|
|
70
|
+
width: 120px;
|
|
70
71
|
}
|
|
71
72
|
|
|
72
73
|
.sort-button {
|
|
@@ -262,6 +263,7 @@ export const FoundationInboxStyles = css `
|
|
|
262
263
|
display: flex;
|
|
263
264
|
min-height: 0;
|
|
264
265
|
height: 100%;
|
|
266
|
+
width: 96%;
|
|
265
267
|
}
|
|
266
268
|
|
|
267
269
|
${tabs}
|
|
@@ -11,55 +11,59 @@ const alertsTab = (tab) => html `
|
|
|
11
11
|
style=${(x) => (x.selectedTab === tab ? '' : 'display: none;')}
|
|
12
12
|
>
|
|
13
13
|
<div class="search">
|
|
14
|
-
<div style="display:flex;
|
|
15
|
-
<
|
|
16
|
-
<
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
14
|
+
<div style="display:flex;align-items:center;justify-content:space-between;">
|
|
15
|
+
<div style="display: flex; align-items: center;">
|
|
16
|
+
<label part="label" for="control" class="search-label">
|
|
17
|
+
<slot>Severity ...</slot>
|
|
18
|
+
</label>
|
|
19
|
+
<rapid-select
|
|
20
|
+
class="select-input"
|
|
21
|
+
:value=${(x) => x.severitySearchValue}
|
|
22
|
+
@input=${(x, c) => {
|
|
22
23
|
x.severitySearchValue = c.event.target.value;
|
|
23
24
|
x.filterSearchAlertLog();
|
|
24
25
|
}}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
26
|
+
autocomplete="off"
|
|
27
|
+
>
|
|
28
|
+
<rapid-option value="">--Select--</rapid-option>
|
|
29
|
+
${repeat((x) => ALL_SEVERITIES, html `
|
|
30
|
+
<rapid-option
|
|
31
|
+
value=${(x) => x.text}
|
|
32
|
+
style="color: ${(x) => getSeverityColor(x.type)}"
|
|
33
|
+
>
|
|
34
|
+
${(x) => x.text}
|
|
35
|
+
</rapid-option>
|
|
36
|
+
`)}
|
|
37
|
+
</rapid-select>
|
|
38
|
+
</div>
|
|
37
39
|
|
|
38
|
-
<
|
|
39
|
-
<
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
40
|
+
<div style="display: flex; align-items: center;">
|
|
41
|
+
<label part="label" for="control" class="search-label">
|
|
42
|
+
<slot>From ...</slot>
|
|
43
|
+
</label>
|
|
44
|
+
<rapid-text-field
|
|
45
|
+
class="date-input"
|
|
46
|
+
type="date"
|
|
47
|
+
:value=${(x) => x.fromDatePickerValue}
|
|
48
|
+
@input=${(x, c) => {
|
|
46
49
|
x.fromDatePickerValue = c.event.target.value;
|
|
47
50
|
x.filterSearchAlertLog();
|
|
48
51
|
}}
|
|
49
|
-
|
|
52
|
+
></rapid-text-field>
|
|
50
53
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
54
|
+
<label part="label" for="control" class="search-label" style="padding-left: 5px">
|
|
55
|
+
<slot>To ...</slot>
|
|
56
|
+
</label>
|
|
57
|
+
<rapid-text-field
|
|
58
|
+
class="date-input"
|
|
59
|
+
type="date"
|
|
60
|
+
:value=${(x) => x.toDatePickerValue}
|
|
61
|
+
@input=${(x, c) => {
|
|
59
62
|
x.toDatePickerValue = c.event.target.value;
|
|
60
63
|
x.filterSearchAlertLog();
|
|
61
64
|
}}
|
|
62
|
-
|
|
65
|
+
></rapid-text-field>
|
|
66
|
+
</div>
|
|
63
67
|
</div>
|
|
64
68
|
|
|
65
69
|
<rapid-text-field
|
|
@@ -84,14 +88,14 @@ const alertsTab = (tab) => html `
|
|
|
84
88
|
autocomplete="off"
|
|
85
89
|
></rapid-text-field>
|
|
86
90
|
|
|
87
|
-
<div style="display:flex; align-items: center; justify-content: end;">
|
|
91
|
+
<div style="display:flex; align-items: center; justify-content: flex-end;">
|
|
88
92
|
${when(() => tab === InboxTab.ALERTS_NEW, html `
|
|
89
93
|
<rapid-button
|
|
90
94
|
class="clear-all"
|
|
91
95
|
appearance="primary"
|
|
92
96
|
@click=${(x) => x.dismissAllAlerts()}
|
|
93
97
|
>
|
|
94
|
-
Clear All
|
|
98
|
+
Clear All Alerts
|
|
95
99
|
</rapid-button>
|
|
96
100
|
`)}
|
|
97
101
|
<a
|
|
@@ -6,17 +6,19 @@ export const getFormattedDate = (dateTimeInMills) => {
|
|
|
6
6
|
return `${dateTime.toLocaleDateString()} ${dateTime.toLocaleTimeString()}`;
|
|
7
7
|
};
|
|
8
8
|
export function getSeverityColor(severity) {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
9
|
+
if (severity) {
|
|
10
|
+
switch (severity.toUpperCase()) {
|
|
11
|
+
case SEVERITY_INFORMATION:
|
|
12
|
+
return 'var(--info-color, #11C9FC)';
|
|
13
|
+
case SEVERITY_CRITICAL:
|
|
14
|
+
return 'var(--error-color)';
|
|
15
|
+
case SEVERITY_SERIOUS:
|
|
16
|
+
return 'var(--serious-notify-color, #F9644D)';
|
|
17
|
+
case SEVERITY_WARNING:
|
|
18
|
+
return 'var(--warning-color)';
|
|
19
|
+
default:
|
|
20
|
+
console.error('Unexpected severity:', severity);
|
|
21
|
+
return 'var(--neutral-foreground-rest)';
|
|
22
|
+
}
|
|
21
23
|
}
|
|
22
24
|
}
|
package/dist/esm/sandbox.js
CHANGED
|
@@ -5,6 +5,7 @@ let ReconciliationSandbox = class ReconciliationSandbox extends GenesisElement {
|
|
|
5
5
|
constructor() {
|
|
6
6
|
super(...arguments);
|
|
7
7
|
this.ready = false;
|
|
8
|
+
this.rightFlyoutActive = false;
|
|
8
9
|
}
|
|
9
10
|
connectedCallback() {
|
|
10
11
|
const _super = Object.create(null, {
|
|
@@ -28,6 +29,9 @@ let ReconciliationSandbox = class ReconciliationSandbox extends GenesisElement {
|
|
|
28
29
|
});
|
|
29
30
|
});
|
|
30
31
|
}
|
|
32
|
+
openFlyout() {
|
|
33
|
+
this.rightFlyoutActive = true;
|
|
34
|
+
}
|
|
31
35
|
};
|
|
32
36
|
__decorate([
|
|
33
37
|
Connect
|
|
@@ -38,12 +42,29 @@ __decorate([
|
|
|
38
42
|
__decorate([
|
|
39
43
|
observable
|
|
40
44
|
], ReconciliationSandbox.prototype, "ready", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
observable
|
|
47
|
+
], ReconciliationSandbox.prototype, "rightFlyoutActive", void 0);
|
|
41
48
|
ReconciliationSandbox = __decorate([
|
|
42
49
|
customElement({
|
|
43
50
|
name: 'notify-sandbox',
|
|
44
51
|
template: html `
|
|
45
52
|
${when((x) => x.ready, html `
|
|
46
53
|
<rapid-design-system-provider>
|
|
54
|
+
<div
|
|
55
|
+
style="width:100%; display:flex; justify-content:flex-end; margin-top:10px; margin-bottom:10px;"
|
|
56
|
+
>
|
|
57
|
+
<rapid-button @click=${(x) => x.openFlyout()}>
|
|
58
|
+
Open right positioned flyout
|
|
59
|
+
</rapid-button>
|
|
60
|
+
<rapid-flyout
|
|
61
|
+
:closed="${(x) => !x.rightFlyoutActive}"
|
|
62
|
+
@closed=${(x) => (x.rightFlyoutActive = false)}
|
|
63
|
+
>
|
|
64
|
+
<div slot="title">Alerts Center</div>
|
|
65
|
+
<foundation-inbox></foundation-inbox>
|
|
66
|
+
</rapid-flyout>
|
|
67
|
+
</div>
|
|
47
68
|
<rapid-tabs>
|
|
48
69
|
<rapid-tab slot="dashboard">Dashboard</rapid-tab>
|
|
49
70
|
<rapid-tab slot="inbox">Inbox</rapid-tab>
|
|
@@ -62,8 +83,8 @@ ReconciliationSandbox = __decorate([
|
|
|
62
83
|
`)}
|
|
63
84
|
`,
|
|
64
85
|
styles: css `
|
|
65
|
-
|
|
66
|
-
|
|
86
|
+
rapid-flyout::part(flyout) {
|
|
87
|
+
min-width: 800px;
|
|
67
88
|
}
|
|
68
89
|
`,
|
|
69
90
|
})
|