@genesislcap/pbc-notify-ui 1.0.64 → 14.308.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.
- package/api-extractor.json +4 -0
- package/dist/dts/components/foundation-inbox/components/inbox-subscription/inbox-subscription.d.ts.map +1 -1
- package/dist/dts/components/foundation-inbox/inbox.utils.d.ts.map +1 -1
- package/dist/dts/components/foundation-notification-dashboard/components/rules/columns.d.ts.map +1 -1
- package/dist/dts/components/foundation-notification-dashboard/components/templates/columns.d.ts.map +1 -1
- package/dist/dts/components/foundation-notification-dashboard/notification-dashboard.utils.d.ts.map +1 -1
- package/dist/dts/tsdoc-metadata.json +11 -0
- package/dist/dts/utils/gridConfig.d.ts.map +1 -1
- package/dist/dts/utils/humanize.d.ts.map +1 -1
- package/dist/dts/utils/toBoolean.d.ts.map +1 -1
- package/dist/dts/utils/updateArray.d.ts.map +1 -1
- package/dist/esm/index.federated.js +0 -1
- package/dist/pbc-notify-ui.api.json +889 -0
- package/dist/pbc-notify-ui.d.ts +252 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/docs/api/index.md +30 -0
- package/docs/api/pbc-notify-ui.foundationinbox.connectedcallback.md +18 -0
- package/docs/api/pbc-notify-ui.foundationinbox.disconnectedcallback.md +18 -0
- package/docs/api/pbc-notify-ui.foundationinbox.md +66 -0
- package/docs/api/pbc-notify-ui.foundationinboxcounter.connectedcallback.md +15 -0
- package/docs/api/pbc-notify-ui.foundationinboxcounter.disconnectedcallback.md +15 -0
- package/docs/api/pbc-notify-ui.foundationinboxcounter.inboxservice.md +11 -0
- package/docs/api/pbc-notify-ui.foundationinboxcounter.md +116 -0
- package/docs/api/pbc-notify-ui.foundationinboxcounter.value.md +11 -0
- package/docs/api/pbc-notify-ui.foundationinboxflyout.close.md +15 -0
- package/docs/api/pbc-notify-ui.foundationinboxflyout.connectedcallback.md +15 -0
- package/docs/api/pbc-notify-ui.foundationinboxflyout.disconnectedcallback.md +15 -0
- package/docs/api/pbc-notify-ui.foundationinboxflyout.flyout.md +11 -0
- package/docs/api/pbc-notify-ui.foundationinboxflyout.flyoutclosed.md +11 -0
- package/docs/api/pbc-notify-ui.foundationinboxflyout.loadremotes.md +15 -0
- package/docs/api/pbc-notify-ui.foundationinboxflyout.md +169 -0
- package/docs/api/pbc-notify-ui.foundationinboxflyout.open.md +15 -0
- package/docs/api/pbc-notify-ui.foundationinboxflyout.ready.md +11 -0
- package/docs/api/pbc-notify-ui.foundationnotificationdashboard.auth.md +11 -0
- package/docs/api/pbc-notify-ui.foundationnotificationdashboard.connectedcallback.md +15 -0
- package/docs/api/pbc-notify-ui.foundationnotificationdashboard.haspermissions.md +11 -0
- package/docs/api/pbc-notify-ui.foundationnotificationdashboard.md +122 -0
- package/docs/api/pbc-notify-ui.foundationnotificationdashboard.ready.md +11 -0
- package/docs/api/pbc-notify-ui.md +60 -0
- package/docs/api-report.md.api.md +76 -0
- package/license.txt +46 -0
- package/package.json +26 -39
- package/src/components/components.ts +54 -0
- package/src/components/foundation-inbox/components/foundation-inbox-counter/foundation-inbox-counter.styles.ts +30 -0
- package/src/components/foundation-inbox/components/foundation-inbox-counter/foundation-inbox-counter.template.ts +16 -0
- package/src/components/foundation-inbox/components/foundation-inbox-counter/foundation-inbox-counter.ts +33 -0
- package/src/components/foundation-inbox/components/foundation-inbox-flyout/foundation-inbox-flyout.styles.ts +18 -0
- package/src/components/foundation-inbox/components/foundation-inbox-flyout/foundation-inbox-flyout.template.ts +22 -0
- package/src/components/foundation-inbox/components/foundation-inbox-flyout/foundation-inbox-flyout.ts +43 -0
- package/src/components/foundation-inbox/components/inbox-subscription/inbox-subscription.styles.ts +37 -0
- package/src/components/foundation-inbox/components/inbox-subscription/inbox-subscription.template.ts +50 -0
- package/src/components/foundation-inbox/components/inbox-subscription/inbox-subscription.ts +81 -0
- package/src/components/foundation-inbox/components/inbox-subscription/rule-parameter/rule-parameter.styles.ts +25 -0
- package/src/components/foundation-inbox/components/inbox-subscription/rule-parameter/rule-parameter.template.ts +96 -0
- package/src/components/foundation-inbox/components/inbox-subscription/rule-parameter/rule-parameter.ts +55 -0
- package/src/components/foundation-inbox/inbox-base/inbox-base.ts +320 -0
- package/src/components/foundation-inbox/inbox.styles.ts +309 -0
- package/src/components/foundation-inbox/inbox.template.ts +317 -0
- package/src/components/foundation-inbox/inbox.ts +26 -0
- package/src/components/foundation-inbox/inbox.types.ts +84 -0
- package/src/components/foundation-inbox/inbox.utils.ts +33 -0
- package/src/components/foundation-notification-dashboard/components/notify-audit/notify-audit-management.ts +96 -0
- package/src/components/foundation-notification-dashboard/components/routes/route-management.ts +56 -0
- package/src/components/foundation-notification-dashboard/components/routes/tabs/email-distribution-route-management.ts +58 -0
- package/src/components/foundation-notification-dashboard/components/routes/tabs/email-user-route-management.ts +68 -0
- package/src/components/foundation-notification-dashboard/components/routes/tabs/log-route-management.ts +43 -0
- package/src/components/foundation-notification-dashboard/components/routes/tabs/ms-teams-route-management.ts +48 -0
- package/src/components/foundation-notification-dashboard/components/routes/tabs/screen-route-management.ts +73 -0
- package/src/components/foundation-notification-dashboard/components/rules/columns.ts +48 -0
- package/src/components/foundation-notification-dashboard/components/rules/rule-dialog/rule-condition-builder/rule-condition-builder.template.ts +139 -0
- package/src/components/foundation-notification-dashboard/components/rules/rule-dialog/rule-condition-builder/rule-condition-builder.ts +255 -0
- package/src/components/foundation-notification-dashboard/components/rules/rule-dialog/rule-condition-builder/rule-condition-builder.types.ts +4 -0
- package/src/components/foundation-notification-dashboard/components/rules/rule-dialog/rule-dialog.template.ts +159 -0
- package/src/components/foundation-notification-dashboard/components/rules/rule-dialog/rule-dialog.ts +202 -0
- package/src/components/foundation-notification-dashboard/components/rules/rule-dialog/rule-dialog.types.ts +28 -0
- package/src/components/foundation-notification-dashboard/components/rules/rule-management.ts +72 -0
- package/src/components/foundation-notification-dashboard/components/templates/columns.ts +48 -0
- package/src/components/foundation-notification-dashboard/components/templates/template-dialog/parameter-builder/parameter-builder.styles.ts +59 -0
- package/src/components/foundation-notification-dashboard/components/templates/template-dialog/parameter-builder/parameter-builder.template.ts +95 -0
- package/src/components/foundation-notification-dashboard/components/templates/template-dialog/parameter-builder/parameter-builder.ts +124 -0
- package/src/components/foundation-notification-dashboard/components/templates/template-dialog/template-condition-builder/template-condition-builder.template.ts +107 -0
- package/src/components/foundation-notification-dashboard/components/templates/template-dialog/template-condition-builder/template-condition-builder.ts +185 -0
- package/src/components/foundation-notification-dashboard/components/templates/template-dialog/template-dialog.template.ts +139 -0
- package/src/components/foundation-notification-dashboard/components/templates/template-dialog/template-dialog.ts +246 -0
- package/src/components/foundation-notification-dashboard/components/templates/template-dialog/template-dialog.types.ts +38 -0
- package/src/components/foundation-notification-dashboard/components/templates/template-management.ts +72 -0
- package/src/components/foundation-notification-dashboard/index.ts +1 -0
- package/src/components/foundation-notification-dashboard/notification-dashboard.styles.ts +21 -0
- package/src/components/foundation-notification-dashboard/notification-dashboard.tabs.ts +35 -0
- package/src/components/foundation-notification-dashboard/notification-dashboard.template.ts +58 -0
- package/src/components/foundation-notification-dashboard/notification-dashboard.ts +40 -0
- package/src/components/foundation-notification-dashboard/notification-dashboard.utils.ts +295 -0
- package/src/components/foundation-notification-dashboard/styles/condition-builder.styles.ts +66 -0
- package/src/components/foundation-notification-dashboard/styles/dynamic-rule.styles.ts +159 -0
- package/src/components/foundation-notification-dashboard/styles/management.styles.ts +21 -0
- package/src/components/foundation-notification-dashboard/types/expression-type.ts +13 -0
- package/src/components/foundation-notification-dashboard/types/logical-operator.ts +18 -0
- package/src/components/foundation-notification-dashboard/types/param-source-type.ts +11 -0
- package/src/components/foundation-notification-dashboard/types/param-type.ts +13 -0
- package/src/components/foundation-notification-dashboard/types/right-criteria.ts +6 -0
- package/src/components/foundation-notification-dashboard/types/rule-execution-strategy.ts +6 -0
- package/src/components/foundation-notification-dashboard/types/severity.ts +13 -0
- package/src/globals.d.ts +7 -0
- package/src/index.federated.ts +1 -0
- package/src/index.ts +4 -0
- package/src/notify.types.ts +143 -0
- package/src/sandbox.ts +83 -0
- package/src/services/alert.service.ts +36 -0
- package/src/services/inbox.service.ts +85 -0
- package/src/services/notify.service.ts +21 -0
- package/src/services/rule.service.ts +129 -0
- package/src/services/system.service.ts +43 -0
- package/src/services/template.service.ts +71 -0
- package/src/styles/scrollbar.styles.ts +15 -0
- package/src/utils/eventDetail.ts +5 -0
- package/src/utils/gridConfig.ts +14 -0
- package/src/utils/humanize.ts +14 -0
- package/src/utils/icons.ts +15 -0
- package/src/utils/index.ts +6 -0
- package/src/utils/logger.ts +3 -0
- package/src/utils/notifyPermissions.ts +6 -0
- package/src/utils/toBoolean.ts +7 -0
- package/src/utils/updateArray.ts +33 -0
- package/temp/api-report.md.api.md +76 -0
- package/tsconfig.json +11 -0
- package/.husky/commit-msg +0 -3
- package/.husky/pre-commit +0 -4
- package/README.md +0 -31
- package/commitlint.config.js +0 -25
- package/index.html +0 -28
- package/scripts/commitlint.js +0 -24
- package/sonar-project.properties +0 -5
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
import { classNames, html, ref, repeat, when } from '@genesislcap/web-core';
|
|
2
|
+
import { NotifyPermission } from '../../utils/notifyPermissions';
|
|
3
|
+
import { ALL_SEVERITIES } from '../foundation-notification-dashboard/types/severity';
|
|
4
|
+
import type { FoundationInbox } from './inbox';
|
|
5
|
+
import { Alert, AlertStatus, InboxTab } from './inbox.types';
|
|
6
|
+
import { getFormattedDate, getIcon, getSeverityColor, getStatus } from './inbox.utils';
|
|
7
|
+
|
|
8
|
+
const alertsTab = (tab: InboxTab) => html<FoundationInbox>`
|
|
9
|
+
<rapid-tab-panel
|
|
10
|
+
slot="alert-log-tab"
|
|
11
|
+
class="alert-log-tab-panel"
|
|
12
|
+
id=${tab}
|
|
13
|
+
style=${(x) => (x.selectedTab === tab ? '' : 'display: none;')}
|
|
14
|
+
>
|
|
15
|
+
<div class="search">
|
|
16
|
+
<div style="display:flex;align-items:center;justify-content:space-between;">
|
|
17
|
+
<div style="display: flex; align-items: center;">
|
|
18
|
+
<label part="label" for="control" class="search-label">
|
|
19
|
+
<slot>Severity ...</slot>
|
|
20
|
+
</label>
|
|
21
|
+
<rapid-multiselect
|
|
22
|
+
class="select-input"
|
|
23
|
+
:selectedOptions=${(x) => x.severityType}
|
|
24
|
+
@selectionChange=${(x, c) => {
|
|
25
|
+
x.severityType = (c.event as CustomEvent).detail;
|
|
26
|
+
x.filterSearchAlertLog();
|
|
27
|
+
}}
|
|
28
|
+
:options=${() =>
|
|
29
|
+
ALL_SEVERITIES.map((value) => ({
|
|
30
|
+
value: value.text,
|
|
31
|
+
label: value.text,
|
|
32
|
+
labelStyle: `color:${getSeverityColor(value.type)}`,
|
|
33
|
+
}))}
|
|
34
|
+
search="false"
|
|
35
|
+
all="false"
|
|
36
|
+
></rapid-multiselect>
|
|
37
|
+
</div>
|
|
38
|
+
|
|
39
|
+
<div style="display: flex; align-items: center;">
|
|
40
|
+
<label part="label" for="control" class="search-label">
|
|
41
|
+
<slot>From ...</slot>
|
|
42
|
+
</label>
|
|
43
|
+
<rapid-text-field
|
|
44
|
+
class="date-input"
|
|
45
|
+
type="date"
|
|
46
|
+
:value=${(x) => x.fromDatePickerValue}
|
|
47
|
+
@input=${(x, c) => {
|
|
48
|
+
x.fromDatePickerValue = (c.event.target as HTMLInputElement).value;
|
|
49
|
+
x.filterSearchAlertLog();
|
|
50
|
+
}}
|
|
51
|
+
></rapid-text-field>
|
|
52
|
+
|
|
53
|
+
<label part="label" for="control" class="search-label" style="padding-left: 5px">
|
|
54
|
+
<slot>To ...</slot>
|
|
55
|
+
</label>
|
|
56
|
+
<rapid-text-field
|
|
57
|
+
class="date-input"
|
|
58
|
+
type="date"
|
|
59
|
+
:value=${(x) => x.toDatePickerValue}
|
|
60
|
+
@input=${(x, c) => {
|
|
61
|
+
x.toDatePickerValue = (c.event.target as HTMLInputElement).value;
|
|
62
|
+
x.filterSearchAlertLog();
|
|
63
|
+
}}
|
|
64
|
+
></rapid-text-field>
|
|
65
|
+
</div>
|
|
66
|
+
</div>
|
|
67
|
+
|
|
68
|
+
<rapid-text-field
|
|
69
|
+
class="search-input"
|
|
70
|
+
:value=${(x) => x.titleSearchValue}
|
|
71
|
+
@input=${(x, c) => {
|
|
72
|
+
x.titleSearchValue = (c.event.target as HTMLInputElement).value;
|
|
73
|
+
x.debouncedFilterSearchAlertLog();
|
|
74
|
+
}}
|
|
75
|
+
placeholder="Search by Title..."
|
|
76
|
+
autocomplete="off"
|
|
77
|
+
></rapid-text-field>
|
|
78
|
+
|
|
79
|
+
<rapid-text-field
|
|
80
|
+
class="search-input"
|
|
81
|
+
:value=${(x) => x.bodySearchValue}
|
|
82
|
+
@input=${(x, c) => {
|
|
83
|
+
x.bodySearchValue = (c.event.target as HTMLInputElement).value;
|
|
84
|
+
x.debouncedFilterSearchAlertLog();
|
|
85
|
+
}}
|
|
86
|
+
placeholder="Search by Body ..."
|
|
87
|
+
autocomplete="off"
|
|
88
|
+
></rapid-text-field>
|
|
89
|
+
|
|
90
|
+
<div style="display:flex; align-items: center; justify-content: flex-end;">
|
|
91
|
+
${when(
|
|
92
|
+
() => tab === InboxTab.ALERTS_NEW,
|
|
93
|
+
html`
|
|
94
|
+
<rapid-button
|
|
95
|
+
class="clear-all"
|
|
96
|
+
appearance="primary"
|
|
97
|
+
@click=${(x) => x.dismissAllAlerts()}
|
|
98
|
+
>
|
|
99
|
+
Clear All Alerts
|
|
100
|
+
</rapid-button>
|
|
101
|
+
`,
|
|
102
|
+
)}
|
|
103
|
+
<a
|
|
104
|
+
href="#"
|
|
105
|
+
class="${(x) => classNames('sort-button', ['sort-button-selected', x.reverse])}"
|
|
106
|
+
@click="${(x) => x.reverseOrder(true)}"
|
|
107
|
+
>
|
|
108
|
+
Asc
|
|
109
|
+
</a>
|
|
110
|
+
<a
|
|
111
|
+
href="#"
|
|
112
|
+
class="${(x) => classNames('sort-button', ['sort-button-selected', !x.reverse])}"
|
|
113
|
+
@click="${(x) => x.reverseOrder(false)}"
|
|
114
|
+
>
|
|
115
|
+
Desc
|
|
116
|
+
</a>
|
|
117
|
+
</div>
|
|
118
|
+
</div>
|
|
119
|
+
|
|
120
|
+
<div class="alert-log-tab-content" part="alert-log">
|
|
121
|
+
${repeat(
|
|
122
|
+
(x) => x.alertsFilter,
|
|
123
|
+
html<Alert, FoundationInbox>`
|
|
124
|
+
<div class="toast" id=${(x) => x.ALERT_ID}>
|
|
125
|
+
<div
|
|
126
|
+
class="toast-severity"
|
|
127
|
+
style="background-color: ${(x) => getSeverityColor(x.NOTIFY_SEVERITY)}"
|
|
128
|
+
></div>
|
|
129
|
+
|
|
130
|
+
<div class="toast-content">
|
|
131
|
+
${when(
|
|
132
|
+
(x) => x.ALERT_STATUS === AlertStatus.NEW,
|
|
133
|
+
html`
|
|
134
|
+
<div class="close-icon" @click=${(x, c) => c.parent.dismissAlert(x.ALERT_ID)}>
|
|
135
|
+
<rapid-icon name="times"></rapid-icon>
|
|
136
|
+
</div>
|
|
137
|
+
`,
|
|
138
|
+
)}
|
|
139
|
+
<span class="toast-header">${(x) => x.HEADER}</span>
|
|
140
|
+
<span class="toast-message">${(x) => x.MESSAGE}</span>
|
|
141
|
+
<div class="toast-bottom" slot="bottom">
|
|
142
|
+
<span class="toast-date" slot="date">${(x) => getFormattedDate(x.CREATED_AT)}</span>
|
|
143
|
+
</div>
|
|
144
|
+
</div>
|
|
145
|
+
</div>
|
|
146
|
+
`,
|
|
147
|
+
)}
|
|
148
|
+
${when(
|
|
149
|
+
(x) => x.alertsFilter.length === 0 && !x.showLoadingIndicator,
|
|
150
|
+
html`
|
|
151
|
+
<div class="no-row-container">No Rows To Show</div>
|
|
152
|
+
`,
|
|
153
|
+
)}
|
|
154
|
+
${when(
|
|
155
|
+
(x) => x.showLoadingIndicator,
|
|
156
|
+
html`
|
|
157
|
+
<div class="no-row-container">
|
|
158
|
+
<div class="loading-indicator">Loading...</div>
|
|
159
|
+
</div>
|
|
160
|
+
`,
|
|
161
|
+
)}
|
|
162
|
+
</div>
|
|
163
|
+
</rapid-tab-panel>
|
|
164
|
+
`;
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* @public
|
|
168
|
+
*/
|
|
169
|
+
export const FoundationInboxTemplate = html<FoundationInbox>`
|
|
170
|
+
<div class="inbox-content">
|
|
171
|
+
<rapid-tabs ${ref('tabs')} appearance="secondary" activeid=${(x) => InboxTab.ALERTS_NEW}>
|
|
172
|
+
<rapid-tab
|
|
173
|
+
slot="alert-log-tab"
|
|
174
|
+
id=${InboxTab.ALERTS_NEW}
|
|
175
|
+
@click=${(x) => x.inboxTabChanged(InboxTab.ALERTS_NEW)}
|
|
176
|
+
appearance="secondary"
|
|
177
|
+
>
|
|
178
|
+
Alerts
|
|
179
|
+
</rapid-tab>
|
|
180
|
+
<rapid-tab
|
|
181
|
+
slot="alert-log-tab"
|
|
182
|
+
id=${InboxTab.ALERT_HISTORY}
|
|
183
|
+
@click=${(x) => x.inboxTabChanged(InboxTab.ALERT_HISTORY)}
|
|
184
|
+
appearance="secondary"
|
|
185
|
+
>
|
|
186
|
+
Alert History
|
|
187
|
+
</rapid-tab>
|
|
188
|
+
${when(
|
|
189
|
+
(x) => x.auth.currentUser?.hasPermission(NotifyPermission.NotificationRuleView),
|
|
190
|
+
html`
|
|
191
|
+
<rapid-tab
|
|
192
|
+
slot="my-alerts-tab"
|
|
193
|
+
id=${InboxTab.MY_ALERTS}
|
|
194
|
+
@click=${(x) => x.inboxTabChanged(InboxTab.MY_ALERTS)}
|
|
195
|
+
appearance="secondary"
|
|
196
|
+
>
|
|
197
|
+
Subscriptions
|
|
198
|
+
</rapid-tab>
|
|
199
|
+
`,
|
|
200
|
+
)}
|
|
201
|
+
${when(
|
|
202
|
+
(x) => x.auth.currentUser?.hasPermission(NotifyPermission.NotificationRuleTemplateView),
|
|
203
|
+
html`
|
|
204
|
+
<rapid-tab
|
|
205
|
+
slot="subscribe-tab"
|
|
206
|
+
id=${InboxTab.SUBSCRIBE}
|
|
207
|
+
@click=${(x) => x.inboxTabChanged(InboxTab.SUBSCRIBE)}
|
|
208
|
+
appearance="secondary"
|
|
209
|
+
>
|
|
210
|
+
Subscribe
|
|
211
|
+
</rapid-tab>
|
|
212
|
+
`,
|
|
213
|
+
)}
|
|
214
|
+
|
|
215
|
+
<!-- Alerts -->
|
|
216
|
+
${(_) => alertsTab(InboxTab.ALERTS_NEW)} ${(_) => alertsTab(InboxTab.ALERT_HISTORY)}
|
|
217
|
+
${when(
|
|
218
|
+
(x) => x.auth.currentUser?.hasPermission(NotifyPermission.NotificationRuleView),
|
|
219
|
+
html`
|
|
220
|
+
<!-- Rules -->
|
|
221
|
+
<rapid-tab-panel
|
|
222
|
+
slot="my-alerts-tab"
|
|
223
|
+
class="my-alerts-tab-panel"
|
|
224
|
+
id=${InboxTab.MY_ALERTS}
|
|
225
|
+
style=${(x) => (x.selectedTab === InboxTab.MY_ALERTS ? '' : 'display: none;')}
|
|
226
|
+
>
|
|
227
|
+
<div class="my-alerts-tab-content">
|
|
228
|
+
${repeat(
|
|
229
|
+
(x) => x.rulesFilter,
|
|
230
|
+
html<any>`
|
|
231
|
+
<div class="rule">
|
|
232
|
+
<div class="rule-name">${(x) => x.NAME}</div>
|
|
233
|
+
<div class="rule-expression">${(x) => x.RULE_EXPRESSION}</div>
|
|
234
|
+
<div class="rule-datetime">${(x, c) => getFormattedDate(x.DATETIME)}</div>
|
|
235
|
+
<div class="rule-status-actions">
|
|
236
|
+
<div class="rule-status ${(x) => getStatus(x.RULE_STATUS).toLowerCase()}">
|
|
237
|
+
${(x, c) => getStatus(x.RULE_STATUS)}
|
|
238
|
+
</div>
|
|
239
|
+
<div class="rule-actions">
|
|
240
|
+
<!--
|
|
241
|
+
<span class="rule-action-edit" @click=${(x, c) => c.parent.editAlert(x)}}>
|
|
242
|
+
<rapid-icon name="gear"></rapid-icon>
|
|
243
|
+
</span>
|
|
244
|
+
-->
|
|
245
|
+
<span
|
|
246
|
+
class="rule-action-enable-disable"
|
|
247
|
+
@click=${(x, c) => c.parent.playPauseAlert(x)}
|
|
248
|
+
>
|
|
249
|
+
<rapid-icon name=${(x) => getIcon(x.RULE_STATUS)}></rapid-icon>
|
|
250
|
+
</span>
|
|
251
|
+
<span
|
|
252
|
+
class="rule-action-delete"
|
|
253
|
+
@click=${(x, c) => c.parent.deleteAlert(x)}
|
|
254
|
+
>
|
|
255
|
+
<rapid-icon name="trash"></rapid-icon>
|
|
256
|
+
</span>
|
|
257
|
+
</div>
|
|
258
|
+
</div>
|
|
259
|
+
</div>
|
|
260
|
+
`,
|
|
261
|
+
)}
|
|
262
|
+
</div>
|
|
263
|
+
</rapid-tab-panel>
|
|
264
|
+
`,
|
|
265
|
+
)}
|
|
266
|
+
${when(
|
|
267
|
+
(x) => x.auth.currentUser?.hasPermission(NotifyPermission.NotificationRuleTemplateView),
|
|
268
|
+
html`
|
|
269
|
+
<!-- Templates -->
|
|
270
|
+
<rapid-tab-panel
|
|
271
|
+
slot="subscribe-tab"
|
|
272
|
+
class="subscribe-tab-panel"
|
|
273
|
+
id=${InboxTab.SUBSCRIBE}
|
|
274
|
+
style=${(x) => (x.selectedTab === InboxTab.SUBSCRIBE ? '' : 'display: none;')}
|
|
275
|
+
>
|
|
276
|
+
<div class="search">
|
|
277
|
+
<rapid-text-field
|
|
278
|
+
class="search-input"
|
|
279
|
+
@input=${(x, c) => {
|
|
280
|
+
x.searchSubscribe = (c.event.target as HTMLInputElement).value;
|
|
281
|
+
x.filterSearchSubscribe();
|
|
282
|
+
}}
|
|
283
|
+
placeholder="Search Templates..."
|
|
284
|
+
autocomplete="off"
|
|
285
|
+
></rapid-text-field>
|
|
286
|
+
</div>
|
|
287
|
+
<div class="subscribe-tab-content">
|
|
288
|
+
${repeat(
|
|
289
|
+
(x) => x.templatesFilter,
|
|
290
|
+
html`
|
|
291
|
+
<div
|
|
292
|
+
class="template"
|
|
293
|
+
@click=${(x, c) => c.parent.openTemplateSubscription(x)}
|
|
294
|
+
id=${(x) => x.ID}
|
|
295
|
+
>
|
|
296
|
+
<div class="template-name">${(x) => x.NAME}</div>
|
|
297
|
+
<div class="template-description">${(x) => x.DESCRIPTION}</div>
|
|
298
|
+
<div class="template-datetime">${(x, c) => getFormattedDate(x.DATETIME)}</div>
|
|
299
|
+
</div>
|
|
300
|
+
`,
|
|
301
|
+
)}
|
|
302
|
+
</div>
|
|
303
|
+
${when(
|
|
304
|
+
(x) => x.ruleTemplateDetails,
|
|
305
|
+
html`
|
|
306
|
+
<inbox-subscription
|
|
307
|
+
:template=${(x) => x.ruleTemplateDetails}
|
|
308
|
+
@templateSubscribed=${(x) => (x.ruleTemplateDetails = null)}
|
|
309
|
+
></inbox-subscription>
|
|
310
|
+
`,
|
|
311
|
+
)}
|
|
312
|
+
</rapid-tab-panel>
|
|
313
|
+
`,
|
|
314
|
+
)}
|
|
315
|
+
</rapid-tabs>
|
|
316
|
+
</div>
|
|
317
|
+
`;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { customElement } from '@genesislcap/web-core';
|
|
2
|
+
import { loadRemotes } from '../components';
|
|
3
|
+
import { FoundationInboxBase } from './inbox-base/inbox-base';
|
|
4
|
+
import { FoundationInboxStyles } from './inbox.styles';
|
|
5
|
+
import { FoundationInboxTemplate } from './inbox.template';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Foundation inbox component for displaying notifies list.
|
|
9
|
+
* Allow searching, filtering and deleting notifies
|
|
10
|
+
* @beta
|
|
11
|
+
*/
|
|
12
|
+
@customElement({
|
|
13
|
+
name: 'foundation-inbox',
|
|
14
|
+
template: FoundationInboxTemplate,
|
|
15
|
+
styles: FoundationInboxStyles,
|
|
16
|
+
})
|
|
17
|
+
export class FoundationInbox extends FoundationInboxBase {
|
|
18
|
+
async connectedCallback() {
|
|
19
|
+
super.connectedCallback();
|
|
20
|
+
await loadRemotes();
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
disconnectedCallback() {
|
|
24
|
+
super.disconnectedCallback();
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
export interface Alert {
|
|
2
|
+
ALERT_ID: string;
|
|
3
|
+
ALERT_STATUS: AlertStatus;
|
|
4
|
+
CREATED_AT: number;
|
|
5
|
+
HEADER: string;
|
|
6
|
+
MESSAGE: string;
|
|
7
|
+
USER_NAME: string;
|
|
8
|
+
EXPIRY: number;
|
|
9
|
+
NOTIFY_SEVERITY: string;
|
|
10
|
+
TABLE_ENTITY_ID: string;
|
|
11
|
+
TOPIC: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export enum AlertStatus {
|
|
15
|
+
NEW = 'NEW',
|
|
16
|
+
DISMISSED = 'DISMISSED',
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface Rule {
|
|
20
|
+
ID: string;
|
|
21
|
+
NAME: string;
|
|
22
|
+
DESCRIPTION: string;
|
|
23
|
+
RULE_EXPRESSION: string;
|
|
24
|
+
RULE_EXECUTION_STRATEGY: string;
|
|
25
|
+
RULE_STATUS: string;
|
|
26
|
+
RULE_TABLE: string;
|
|
27
|
+
PROCESS_NAME: string;
|
|
28
|
+
TABLE_OPERATION: string;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface RuleParameterEntity {
|
|
32
|
+
DYNAMIC_RULE_ID;
|
|
33
|
+
PARAM_LABEL;
|
|
34
|
+
PARAM_NAME;
|
|
35
|
+
PARAM_OPERATOR;
|
|
36
|
+
PARAM_SOURCE;
|
|
37
|
+
PARAM_SOURCE_TYPE;
|
|
38
|
+
PARAM_TYPE;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export interface RuleTemplate {
|
|
42
|
+
ID: string;
|
|
43
|
+
NAME: string;
|
|
44
|
+
DESCRIPTION: string;
|
|
45
|
+
USER_NAME: string;
|
|
46
|
+
RULE_TABLE: string;
|
|
47
|
+
RULE_STATUS: string;
|
|
48
|
+
RULE_EXPRESSION: string;
|
|
49
|
+
PROCESS_NAME: string;
|
|
50
|
+
MESSAGE_TYPE: string;
|
|
51
|
+
RESULT_EXPRESSION: string;
|
|
52
|
+
TABLE_OPERATION: string;
|
|
53
|
+
IS_TEMPLATE: boolean;
|
|
54
|
+
RULE_EXECUTION_STRATEGY: string;
|
|
55
|
+
RULE_TYPE: string;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export interface NotificationRuleTemplateReply {
|
|
59
|
+
DYNAMIC_RULE_ID: string;
|
|
60
|
+
RULE_NAME: string;
|
|
61
|
+
RULE_DESCRIPTION: string;
|
|
62
|
+
RULE_TABLE: string;
|
|
63
|
+
RULE_EXECUTION_STRATEGY: string;
|
|
64
|
+
RULE_EXPRESSION: {
|
|
65
|
+
CONDITIONS: Array<any>;
|
|
66
|
+
};
|
|
67
|
+
RAW_RULE_EXPRESSION: string;
|
|
68
|
+
RESULT_EXPRESSION: {
|
|
69
|
+
ASSIGNMENTS: Array<any>;
|
|
70
|
+
};
|
|
71
|
+
PARAMETERS: any;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export enum RuleStatus {
|
|
75
|
+
ENABLED = 'ENABLED',
|
|
76
|
+
DISABLED = 'DISABLED',
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export enum InboxTab {
|
|
80
|
+
ALERTS_NEW,
|
|
81
|
+
ALERT_HISTORY,
|
|
82
|
+
MY_ALERTS,
|
|
83
|
+
SUBSCRIBE,
|
|
84
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import {
|
|
2
|
+
SEVERITY_CRITICAL,
|
|
3
|
+
SEVERITY_INFORMATION,
|
|
4
|
+
SEVERITY_SERIOUS,
|
|
5
|
+
SEVERITY_WARNING,
|
|
6
|
+
} from '../foundation-notification-dashboard/types/severity';
|
|
7
|
+
|
|
8
|
+
export const getStatus = (ruleStatus) => (ruleStatus == 'ENABLED' ? 'Active' : 'Paused');
|
|
9
|
+
|
|
10
|
+
export const getIcon = (ruleStatus) => (ruleStatus === 'ENABLED' ? 'pause' : 'play');
|
|
11
|
+
|
|
12
|
+
export const getFormattedDate = (dateTimeInMills) => {
|
|
13
|
+
const dateTime = new Date(dateTimeInMills);
|
|
14
|
+
return `${dateTime.toLocaleDateString()} ${dateTime.toLocaleTimeString()}`;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export function getSeverityColor(severity: string) {
|
|
18
|
+
if (severity) {
|
|
19
|
+
switch (severity.toUpperCase()) {
|
|
20
|
+
case SEVERITY_INFORMATION:
|
|
21
|
+
return 'var(--info-color, #11C9FC)';
|
|
22
|
+
case SEVERITY_CRITICAL:
|
|
23
|
+
return 'var(--error-color)';
|
|
24
|
+
case SEVERITY_SERIOUS:
|
|
25
|
+
return 'var(--serious-notify-color, #F9644D)';
|
|
26
|
+
case SEVERITY_WARNING:
|
|
27
|
+
return 'var(--warning-color)';
|
|
28
|
+
default:
|
|
29
|
+
console.error('Unexpected severity:', severity);
|
|
30
|
+
return 'var(--neutral-foreground-rest)';
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { css, customElement, GenesisElement, html } from '@genesislcap/web-core';
|
|
2
|
+
import { managementGridStyles } from '../../styles/management.styles';
|
|
3
|
+
|
|
4
|
+
const NOTIFY_AUDIT_MANAGEMENT_COLUMNS = [
|
|
5
|
+
{
|
|
6
|
+
field: 'ALERT_ID',
|
|
7
|
+
headerName: 'Alert',
|
|
8
|
+
flex: 1,
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
field: 'MESSAGE',
|
|
12
|
+
headerName: 'Message',
|
|
13
|
+
flex: 1,
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
field: 'HEADER',
|
|
17
|
+
headerName: 'Header',
|
|
18
|
+
flex: 1,
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
field: 'USER_NAME',
|
|
22
|
+
headerName: 'User Name',
|
|
23
|
+
flex: 1,
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
field: 'EXPIRY',
|
|
27
|
+
headerName: 'Expiry',
|
|
28
|
+
flex: 1,
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
field: 'NOTIFY_SEVERITY',
|
|
32
|
+
headerName: 'Notify Serverity',
|
|
33
|
+
flex: 1,
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
field: 'CREATED_AT',
|
|
37
|
+
headerName: 'Created At',
|
|
38
|
+
flex: 1,
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
field: 'TABLE_ENTITY_ID',
|
|
42
|
+
headerName: 'Table Entity Id',
|
|
43
|
+
flex: 1,
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
field: 'TOPIC',
|
|
47
|
+
headerName: 'Topic',
|
|
48
|
+
flex: 1,
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
field: 'NOTIFY_ALERT_AUDIT_ID',
|
|
52
|
+
headerName: 'Table Entity Id',
|
|
53
|
+
flex: 1,
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
field: 'AUDIT_EVENT_TYPE',
|
|
57
|
+
headerName: 'Audit Event Type',
|
|
58
|
+
flex: 1,
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
field: 'AUDIT_EVENT_DATETIME',
|
|
62
|
+
headerName: 'Audit Event Datetime',
|
|
63
|
+
flex: 1,
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
field: 'AUDIT_EVENT_TEXT',
|
|
67
|
+
headerName: 'Audit Event Text',
|
|
68
|
+
flex: 1,
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
field: 'AUDIT_EVENT_USER',
|
|
72
|
+
headerName: 'Audit Event User',
|
|
73
|
+
flex: 1,
|
|
74
|
+
},
|
|
75
|
+
];
|
|
76
|
+
|
|
77
|
+
@customElement({
|
|
78
|
+
name: 'notify-audit-management',
|
|
79
|
+
template: html<NotifyAuditManagement>`
|
|
80
|
+
<div class="grid">
|
|
81
|
+
<entity-management
|
|
82
|
+
design-system-prefix="rapid"
|
|
83
|
+
resourceName="ALL_NOTIFY_AUDIT"
|
|
84
|
+
:columns=${() => [...NOTIFY_AUDIT_MANAGEMENT_COLUMNS]}
|
|
85
|
+
></entity-management>
|
|
86
|
+
</div>
|
|
87
|
+
`,
|
|
88
|
+
styles: css`
|
|
89
|
+
${managementGridStyles}
|
|
90
|
+
|
|
91
|
+
entity-management::part(header) {
|
|
92
|
+
display: none;
|
|
93
|
+
}
|
|
94
|
+
`,
|
|
95
|
+
})
|
|
96
|
+
export class NotifyAuditManagement extends GenesisElement {}
|
package/src/components/foundation-notification-dashboard/components/routes/route-management.ts
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { css, customElement, GenesisElement, html } from '@genesislcap/web-core';
|
|
2
|
+
|
|
3
|
+
@customElement({
|
|
4
|
+
name: 'route-management',
|
|
5
|
+
template: html<RouteManagement>`
|
|
6
|
+
<rapid-tabs appearance="secondary">
|
|
7
|
+
<rapid-tab appearance="secondary">Screen Routes</rapid-tab>
|
|
8
|
+
<rapid-tab appearance="secondary">Email Distribution Routes</rapid-tab>
|
|
9
|
+
<rapid-tab appearance="secondary">Email User Routes</rapid-tab>
|
|
10
|
+
<rapid-tab appearance="secondary">Log Routes</rapid-tab>
|
|
11
|
+
<rapid-tab appearance="secondary">MS Teams Routes</rapid-tab>
|
|
12
|
+
|
|
13
|
+
<rapid-tab-panel>
|
|
14
|
+
<screen-route-management></screen-route-management>
|
|
15
|
+
</rapid-tab-panel>
|
|
16
|
+
<rapid-tab-panel>
|
|
17
|
+
<email-distribution-route-management></email-distribution-route-management>
|
|
18
|
+
</rapid-tab-panel>
|
|
19
|
+
<rapid-tab-panel>
|
|
20
|
+
<email-user-route-management></email-user-route-management>
|
|
21
|
+
</rapid-tab-panel>
|
|
22
|
+
<rapid-tab-panel>
|
|
23
|
+
<log-route-management></log-route-management>
|
|
24
|
+
</rapid-tab-panel>
|
|
25
|
+
<rapid-tab-panel>
|
|
26
|
+
<ms-teams-route-management></ms-teams-route-management>
|
|
27
|
+
</rapid-tab-panel>
|
|
28
|
+
</rapid-tabs>
|
|
29
|
+
`,
|
|
30
|
+
styles: css`
|
|
31
|
+
rapid-tabs {
|
|
32
|
+
display: flex;
|
|
33
|
+
flex-direction: column;
|
|
34
|
+
width: 100%;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
rapid-tabs::part(tablist) {
|
|
38
|
+
grid-template-columns: none;
|
|
39
|
+
flex: 0;
|
|
40
|
+
align-self: start;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
rapid-tabs::part(tabpanel) {
|
|
44
|
+
display: flex;
|
|
45
|
+
flex-direction: column;
|
|
46
|
+
flex: 1;
|
|
47
|
+
min-height: 0;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
rapid-tabs,
|
|
51
|
+
rapid-tab-panel {
|
|
52
|
+
height: 100%;
|
|
53
|
+
}
|
|
54
|
+
`,
|
|
55
|
+
})
|
|
56
|
+
export class RouteManagement extends GenesisElement {}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { customElement, GenesisElement, html } from '@genesislcap/web-core';
|
|
2
|
+
import { managementGridStyles } from '../../../styles/management.styles';
|
|
3
|
+
|
|
4
|
+
const EMAIL_DISTRIBUTION_ROUTE_MANAGEMENT_COLUMNS = [
|
|
5
|
+
{
|
|
6
|
+
field: 'NOTIFY_ROUTE_ID',
|
|
7
|
+
headerName: 'Notify Route Id',
|
|
8
|
+
flex: 1,
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
field: 'TOPIC_MATCH',
|
|
12
|
+
headerName: 'Topic Match',
|
|
13
|
+
flex: 1,
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
field: 'GATEWAY_ID',
|
|
17
|
+
headerName: 'Gateway Id',
|
|
18
|
+
flex: 1,
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
field: 'ROUTE_ENABLED',
|
|
22
|
+
headerName: 'Route Enabled',
|
|
23
|
+
flex: 1,
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
field: 'EMAIL_TO',
|
|
27
|
+
headerName: 'Email To',
|
|
28
|
+
flex: 1,
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
field: 'EMAIL_CC',
|
|
32
|
+
headerName: 'Email Cc',
|
|
33
|
+
flex: 1,
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
field: 'EMAIL_BCC',
|
|
37
|
+
headerName: 'Email Bcc',
|
|
38
|
+
flex: 1,
|
|
39
|
+
},
|
|
40
|
+
];
|
|
41
|
+
|
|
42
|
+
@customElement({
|
|
43
|
+
name: 'email-distribution-route-management',
|
|
44
|
+
template: html<EmailDistributionRouteManagement>`
|
|
45
|
+
<div class="grid">
|
|
46
|
+
<entity-management
|
|
47
|
+
design-system-prefix="rapid"
|
|
48
|
+
resourceName="ALL_EMAIL_DISTRIBUTION_ROUTES"
|
|
49
|
+
createEvent="EVENT_EMAIL_DISTRIBUTION_ROUTE_CREATE"
|
|
50
|
+
updateEvent="EVENT_EMAIL_DISTRIBUTION_ROUTE_UPDATE"
|
|
51
|
+
deleteEvent="EVENT_EMAIL_DISTRIBUTION_ROUTE_DELETE"
|
|
52
|
+
:columns=${() => [...EMAIL_DISTRIBUTION_ROUTE_MANAGEMENT_COLUMNS]}
|
|
53
|
+
></entity-management>
|
|
54
|
+
</div>
|
|
55
|
+
`,
|
|
56
|
+
styles: managementGridStyles,
|
|
57
|
+
})
|
|
58
|
+
export class EmailDistributionRouteManagement extends GenesisElement {}
|