@genesislcap/pbc-notify-ui 1.0.0 → 1.0.1
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/components/foundation-inbox-counter/foundation-inbox-counter.styles.d.ts.map +1 -1
- package/dist/dts/components/foundation-inbox/inbox.d.ts +8 -8
- package/dist/dts/components/foundation-inbox/inbox.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-notification-dashboard/components/template-dialog/template-dialog.d.ts +1 -1
- package/dist/esm/components/foundation-inbox/components/foundation-inbox-counter/foundation-inbox-counter.styles.js +7 -0
- package/dist/esm/components/foundation-inbox/inbox.js +19 -37
- package/dist/esm/components/foundation-inbox/inbox.styles.js +11 -1
- package/dist/esm/components/foundation-inbox/inbox.template.js +165 -161
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"foundation-inbox-counter.styles.d.ts","sourceRoot":"","sources":["../../../../../../src/components/foundation-inbox/components/foundation-inbox-counter/foundation-inbox-counter.styles.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,4BAA4B,
|
|
1
|
+
{"version":3,"file":"foundation-inbox-counter.styles.d.ts","sourceRoot":"","sources":["../../../../../../src/components/foundation-inbox/components/foundation-inbox-counter/foundation-inbox-counter.styles.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,4BAA4B,iDAyBxC,CAAC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Connect } from '@genesislcap/foundation-comms';
|
|
2
|
+
import { Flyout, Tabs } from '@genesislcap/foundation-zero';
|
|
2
3
|
import { FASTElement } from '@microsoft/fast-element';
|
|
3
|
-
import {
|
|
4
|
-
import { RuleTemplate, Rule, NotificationRuleTemplateReply, Alert } from './inbox.types';
|
|
5
|
-
import { Tabs } from '@genesislcap/foundation-zero';
|
|
4
|
+
import { AlertServiceInterface } from '../../services/alert.service';
|
|
6
5
|
import { RuleTemplateServiceInterface } from '../../services/rule-template.service';
|
|
7
6
|
import { RuleServiceInterface } from '../../services/rule.service';
|
|
8
|
-
import {
|
|
7
|
+
import { InboxTab } from './inbox.template';
|
|
8
|
+
import { Alert, NotificationRuleTemplateReply, Rule, RuleTemplate } from './inbox.types';
|
|
9
9
|
/**
|
|
10
10
|
* Foundation inbox component for displaying notifies list.
|
|
11
11
|
* Allow searching, filtering and deleting notifies
|
|
@@ -29,18 +29,18 @@ export declare class FoundationInbox extends FASTElement {
|
|
|
29
29
|
tabs: Tabs;
|
|
30
30
|
private flyoutNotifier;
|
|
31
31
|
private flyoutHandler;
|
|
32
|
-
|
|
32
|
+
flyout: Flyout;
|
|
33
|
+
flyoutClosed: boolean;
|
|
33
34
|
ruleTemplateSelected: NotificationRuleTemplateReply;
|
|
34
35
|
subscribeToAlertComponent: any;
|
|
35
36
|
connectedCallback(): Promise<void>;
|
|
36
|
-
|
|
37
|
-
|
|
37
|
+
open(): Promise<void>;
|
|
38
|
+
close(): void;
|
|
38
39
|
alertsChanged: () => Alert[];
|
|
39
40
|
rulesChanged: () => Rule[];
|
|
40
41
|
templatesChanged: () => RuleTemplate[];
|
|
41
42
|
private searchAlertLogChanged;
|
|
42
43
|
private searchSubscribeChanged;
|
|
43
|
-
close(): void;
|
|
44
44
|
openAlertSubscription(ruleTemplate: any): Promise<void>;
|
|
45
45
|
cleanSubscriptionFields(): void;
|
|
46
46
|
checkActiveTab(inboxTab: InboxTab): "" | "display: none;";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inbox.d.ts","sourceRoot":"","sources":["../../../../src/components/foundation-inbox/inbox.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"inbox.d.ts","sourceRoot":"","sources":["../../../../src/components/foundation-inbox/inbox.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAmD,MAAM,yBAAyB,CAAC;AACvG,OAAO,EAAgB,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACnF,OAAO,EAAuB,4BAA4B,EAAE,MAAM,sCAAsC,CAAC;AACzG,OAAO,EAAe,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAIhF,OAAO,EAAE,QAAQ,EAAuC,MAAM,kBAAkB,CAAC;AACjF,OAAO,EAAE,KAAK,EAAE,6BAA6B,EAAE,IAAI,EAAc,YAAY,EAAE,MAAM,eAAe,CAAC;AAIrG;;;;GAIG;AACH,qBAKa,eAAgB,SAAQ,WAAW;IAErC,OAAO,EAAE,OAAO,CAAC;IAEZ,YAAY,EAAE,qBAAqB,CAAC;IAC7B,mBAAmB,EAAE,4BAA4B,CAAC;IAC1D,WAAW,EAAE,oBAAoB,CAAC;IAEnC,MAAM,EAAE,KAAK,EAAE,CAAM;IACrB,YAAY,EAAE,KAAK,EAAE,CAAM;IAE3B,KAAK,EAAE,IAAI,EAAE,CAAM;IACnB,WAAW,EAAE,IAAI,EAAE,CAAM;IAEzB,SAAS,EAAE,YAAY,EAAE,CAAM;IAC/B,eAAe,EAAE,YAAY,EAAE,CAAM;IAErC,KAAK,EAAE,OAAO,CAAS;IAEvB,cAAc,EAAE,MAAM,CAAM;IAC5B,eAAe,EAAE,MAAM,CAAM;IAEzC,OAAO,CAAC,gBAAgB,CAAM;IAEvB,IAAI,EAAE,IAAI,CAAC;IAElB,OAAO,CAAC,cAAc,CAAW;IACjC,OAAO,CAAC,aAAa,CAAa;IAE3B,MAAM,EAAE,MAAM,CAAC;IACH,YAAY,EAAE,OAAO,CAAQ;IAEpC,oBAAoB,EAAE,6BAA6B,CAAQ;IAC3D,yBAAyB,EAAE,GAAG,CAAM;IAE1C,iBAAiB;IAOV,IAAI;IAOV,KAAK;IAMZ,aAAa,gBAAyC;IAEtD,YAAY,eAAuC;IAEnD,gBAAgB,uBAA+C;YAEjD,qBAAqB;YAUrB,sBAAsB;IAU9B,qBAAqB,CAAC,YAAY,EAAE,GAAG;IAoB7C,uBAAuB;IAMvB,cAAc,CAAC,QAAQ,EAAE,QAAQ;IAM3B,eAAe,CAAC,QAAQ,EAAE,QAAQ;IAsBxC,SAAS;IAGH,cAAc,CAAC,WAAW,KAAA;IAgB1B,WAAW,CAAC,WAAW,KAAA;IAK7B,aAAa,CAAC,SAAS,KAAA,EAAE,UAAU,KAAA;IAI7B,cAAc;IASpB,iBAAiB,CAAC,OAAO,EAAE,MAAM;IAIjC;;;;OAIG;IACG,WAAW;CAIlB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inbox.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/foundation-inbox/inbox.styles.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,eAAO,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"inbox.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/foundation-inbox/inbox.styles.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,eAAO,MAAM,WAAW,iDA4UvB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inbox.template.d.ts","sourceRoot":"","sources":["../../../../src/components/foundation-inbox/inbox.template.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAG1C,oBAAY,QAAQ;IAClB,QAAQ,IAAA;IACR,QAAQ,IAAA;IACR,SAAS,IAAA;CACV;AAED;;GAEG;AACH,eAAO,MAAM,uBAAuB,
|
|
1
|
+
{"version":3,"file":"inbox.template.d.ts","sourceRoot":"","sources":["../../../../src/components/foundation-inbox/inbox.template.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAG1C,oBAAY,QAAQ;IAClB,QAAQ,IAAA;IACR,QAAQ,IAAA;IACR,SAAS,IAAA;CACV;AAED;;GAEG;AACH,eAAO,MAAM,uBAAuB,sEAmMnC,CAAC"}
|
|
@@ -41,7 +41,7 @@ export declare class TemplateDialog extends FASTElement {
|
|
|
41
41
|
NAME: any;
|
|
42
42
|
VALUE?: undefined;
|
|
43
43
|
};
|
|
44
|
-
getLeftType(condition: ConditionBuilderEntity): "FIELD" | "
|
|
44
|
+
getLeftType(condition: ConditionBuilderEntity): "FIELD" | "NUMBER" | "STRING";
|
|
45
45
|
getRightExpression(condition: ConditionBuilderEntity): {
|
|
46
46
|
TYPE: string;
|
|
47
47
|
KEY: string;
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import { css } from '@microsoft/fast-element';
|
|
2
2
|
const BACKGROUND_COLOR = '#EF5547';
|
|
3
3
|
export const FoundationInboxCounterStyles = css `
|
|
4
|
+
:host {
|
|
5
|
+
position: relative;
|
|
6
|
+
top: 4px;
|
|
7
|
+
right: 8px;
|
|
8
|
+
pointer-events: none;
|
|
9
|
+
}
|
|
10
|
+
|
|
4
11
|
div {
|
|
5
12
|
display: inline-block;
|
|
6
13
|
min-width: 16px;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { __awaiter, __decorate } from "tslib";
|
|
2
|
-
import * as Components from '../index';
|
|
3
2
|
import { Connect } from '@genesislcap/foundation-comms';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { InboxStyles as styles } from './inbox.styles';
|
|
7
|
-
import { InboxTab, FoundationInboxTemplate as template } from './inbox.template';
|
|
8
|
-
import { RuleStatus } from './inbox.types';
|
|
3
|
+
import { FASTElement, customElement, observable } from '@microsoft/fast-element';
|
|
4
|
+
import { AlertService } from '../../services/alert.service';
|
|
9
5
|
import { RuleTemplateService } from '../../services/rule-template.service';
|
|
10
6
|
import { RuleService } from '../../services/rule.service';
|
|
11
7
|
import { PARAM_SOURCE_TYPE_DEFINED_GROUP } from '../foundation-notification-dashboard/types/param-source-type';
|
|
8
|
+
import * as Components from '../index';
|
|
9
|
+
import { InboxStyles as styles } from './inbox.styles';
|
|
10
|
+
import { InboxTab, FoundationInboxTemplate as template } from './inbox.template';
|
|
11
|
+
import { RuleStatus } from './inbox.types';
|
|
12
12
|
import { EMPTY_HTML, createSubscribeComponent } from './inbox.utils';
|
|
13
|
-
import {
|
|
13
|
+
import { logger } from './utils';
|
|
14
14
|
/**
|
|
15
15
|
* Foundation inbox component for displaying notifies list.
|
|
16
16
|
* Allow searching, filtering and deleting notifies
|
|
@@ -29,6 +29,7 @@ let FoundationInbox = class FoundationInbox extends FASTElement {
|
|
|
29
29
|
this.searchAlertLog = '';
|
|
30
30
|
this.searchSubscribe = '';
|
|
31
31
|
this.parameterDetails = {};
|
|
32
|
+
this.flyoutClosed = true;
|
|
32
33
|
this.ruleTemplateSelected = null;
|
|
33
34
|
this.subscribeToAlertComponent = '';
|
|
34
35
|
this.alertsChanged = () => this.alertsFilter = this.alerts;
|
|
@@ -44,34 +45,18 @@ let FoundationInbox = class FoundationInbox extends FASTElement {
|
|
|
44
45
|
this.alerts = yield this.alertService.getAlerts();
|
|
45
46
|
this.rules = yield this.ruleService.getRules();
|
|
46
47
|
this.templates = yield this.ruleTemplateService.getRuleTemplates();
|
|
47
|
-
this.handleInboxStatus();
|
|
48
48
|
});
|
|
49
49
|
}
|
|
50
|
-
|
|
51
|
-
this
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
console.log('Inbox Opened');
|
|
61
|
-
_this.rules = yield _this.ruleService.getRules();
|
|
62
|
-
_this.templates = yield _this.ruleTemplateService.getRuleTemplates();
|
|
63
|
-
}
|
|
64
|
-
else {
|
|
65
|
-
console.log('Inbox Closed');
|
|
66
|
-
_this.cleanSubscriptionFields();
|
|
67
|
-
}
|
|
68
|
-
});
|
|
69
|
-
},
|
|
70
|
-
};
|
|
71
|
-
Observable.getNotifier(this.flyout).subscribe(this.flyoutHandler, 'closed');
|
|
72
|
-
}
|
|
73
|
-
disconnectedCallback() {
|
|
74
|
-
super.disconnectedCallback();
|
|
50
|
+
open() {
|
|
51
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
52
|
+
this.rules = yield this.ruleService.getRules();
|
|
53
|
+
this.templates = yield this.ruleTemplateService.getRuleTemplates();
|
|
54
|
+
this.flyoutClosed = false;
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
close() {
|
|
58
|
+
this.cleanSubscriptionFields();
|
|
59
|
+
this.flyout.closeFlyout();
|
|
75
60
|
}
|
|
76
61
|
searchAlertLogChanged() {
|
|
77
62
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -89,9 +74,6 @@ let FoundationInbox = class FoundationInbox extends FASTElement {
|
|
|
89
74
|
this.templatesFilter = this.templates.filter(item => item.NAME.toLowerCase().startsWith(this.searchSubscribe.toLowerCase()));
|
|
90
75
|
});
|
|
91
76
|
}
|
|
92
|
-
close() {
|
|
93
|
-
this.$emit('close');
|
|
94
|
-
}
|
|
95
77
|
openAlertSubscription(ruleTemplate) {
|
|
96
78
|
return __awaiter(this, void 0, void 0, function* () {
|
|
97
79
|
if (this.ruleTemplateSelected) {
|
|
@@ -234,7 +216,7 @@ __decorate([
|
|
|
234
216
|
], FoundationInbox.prototype, "searchSubscribe", void 0);
|
|
235
217
|
__decorate([
|
|
236
218
|
observable
|
|
237
|
-
], FoundationInbox.prototype, "
|
|
219
|
+
], FoundationInbox.prototype, "flyoutClosed", void 0);
|
|
238
220
|
__decorate([
|
|
239
221
|
observable
|
|
240
222
|
], FoundationInbox.prototype, "ruleTemplateSelected", void 0);
|
|
@@ -3,7 +3,17 @@ import { css } from '@microsoft/fast-element';
|
|
|
3
3
|
* @public
|
|
4
4
|
*/
|
|
5
5
|
export const InboxStyles = css `
|
|
6
|
-
|
|
6
|
+
zero-flyout::part(flyout) {
|
|
7
|
+
width: 30%;
|
|
8
|
+
min-width: 320px;
|
|
9
|
+
padding: 0;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
zero-flyout::part(content) {
|
|
13
|
+
height: 100%;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.inbox {
|
|
7
17
|
width: 100%;
|
|
8
18
|
height: 100%;
|
|
9
19
|
background: var(--neutral-layer-4);
|
|
@@ -11,176 +11,180 @@ export var InboxTab;
|
|
|
11
11
|
* @public
|
|
12
12
|
*/
|
|
13
13
|
export const FoundationInboxTemplate = html `
|
|
14
|
-
<
|
|
15
|
-
<div class="inbox
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
14
|
+
<zero-flyout ${ref('flyout')} position="right" @closed=${(x) => (x.flyoutClosed = true)} :closed=${(x) => x.flyoutClosed} displayHeader=${false}>
|
|
15
|
+
<div class="inbox">
|
|
16
|
+
<div class="inbox-header">
|
|
17
|
+
<div class="inbox-header-title">
|
|
18
|
+
Alerts
|
|
19
|
+
</div>
|
|
20
|
+
<zero-button
|
|
21
|
+
class="inbox-header-close"
|
|
22
|
+
appearance="primary-gradient"
|
|
23
|
+
@click=${x => x.close()}
|
|
24
|
+
>
|
|
25
|
+
<zero-icon part="icon" name="xmark" size="xl"></zero-icon>
|
|
26
|
+
</zero-button>
|
|
27
|
+
</div>
|
|
26
28
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
>
|
|
39
|
-
Alert Log
|
|
40
|
-
</zero-tab>
|
|
41
|
-
<zero-tab
|
|
42
|
-
slot="my-alerts-tab"
|
|
43
|
-
id=${x => InboxTab.MyAlerts}
|
|
44
|
-
@click=${x => x.inboxTabChanged(InboxTab.MyAlerts)}
|
|
45
|
-
appearance="secondary"
|
|
46
|
-
>
|
|
47
|
-
My Alerts
|
|
48
|
-
</zero-tab>
|
|
49
|
-
<zero-tab
|
|
50
|
-
slot="subscribe-tab"
|
|
51
|
-
id=${x => InboxTab.Subscribe}
|
|
52
|
-
@click=${x => x.inboxTabChanged(InboxTab.Subscribe)}
|
|
53
|
-
appearance="secondary"
|
|
54
|
-
>
|
|
55
|
-
Subscribe
|
|
56
|
-
</zero-tab>
|
|
57
|
-
|
|
58
|
-
<zero-tab-panel
|
|
59
|
-
slot="alert-log-tab"
|
|
60
|
-
class="alert-log-tab-panel"
|
|
61
|
-
id=${x => InboxTab.AlertLog}
|
|
62
|
-
style=${x => x.checkActiveTab(InboxTab.AlertLog)}
|
|
63
|
-
>
|
|
64
|
-
<div class="search">
|
|
65
|
-
<zero-text-field
|
|
66
|
-
class="search-input"
|
|
67
|
-
:value=${sync((x) => x.searchAlertLog)}
|
|
68
|
-
placeholder="Search Alerts..."
|
|
69
|
-
autocomplete="off"
|
|
29
|
+
<div class="inbox-content">
|
|
30
|
+
<zero-tabs
|
|
31
|
+
${(ref('tabs'))}
|
|
32
|
+
appearance="secondary"
|
|
33
|
+
activeid=${x => InboxTab.AlertLog}
|
|
34
|
+
>
|
|
35
|
+
<zero-tab
|
|
36
|
+
slot="alert-log-tab"
|
|
37
|
+
id=${x => InboxTab.AlertLog}
|
|
38
|
+
@click=${x => x.inboxTabChanged(InboxTab.AlertLog)}
|
|
39
|
+
appearance="secondary"
|
|
70
40
|
>
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
41
|
+
Alert Log
|
|
42
|
+
</zero-tab>
|
|
43
|
+
<zero-tab
|
|
44
|
+
slot="my-alerts-tab"
|
|
45
|
+
id=${x => InboxTab.MyAlerts}
|
|
46
|
+
@click=${x => x.inboxTabChanged(InboxTab.MyAlerts)}
|
|
47
|
+
appearance="secondary"
|
|
48
|
+
>
|
|
49
|
+
My Alerts
|
|
50
|
+
</zero-tab>
|
|
51
|
+
<zero-tab
|
|
52
|
+
slot="subscribe-tab"
|
|
53
|
+
id=${x => InboxTab.Subscribe}
|
|
54
|
+
@click=${x => x.inboxTabChanged(InboxTab.Subscribe)}
|
|
55
|
+
appearance="secondary"
|
|
56
|
+
>
|
|
57
|
+
Subscribe
|
|
58
|
+
</zero-tab>
|
|
59
|
+
|
|
60
|
+
<zero-tab-panel
|
|
61
|
+
slot="alert-log-tab"
|
|
62
|
+
class="alert-log-tab-panel"
|
|
63
|
+
id=${x => InboxTab.AlertLog}
|
|
64
|
+
style=${x => x.checkActiveTab(InboxTab.AlertLog)}
|
|
65
|
+
>
|
|
66
|
+
<div class="search">
|
|
67
|
+
<zero-text-field
|
|
68
|
+
class="search-input"
|
|
69
|
+
:value=${sync((x) => x.searchAlertLog)}
|
|
70
|
+
placeholder="Search Alerts..."
|
|
71
|
+
autocomplete="off"
|
|
72
|
+
>
|
|
73
|
+
</zero-text-field>
|
|
74
|
+
</div>
|
|
75
|
+
<div class="alert-log-tab-content">
|
|
76
|
+
${repeat(x => x.alertsFilter, html `
|
|
77
|
+
<div class="toast" id=${(x) => x.ALERT_ID}>
|
|
78
|
+
<div class="toast-severity" style="background-color: ${(x) => getSeverityColor(x.NOTIFY_SEVERITY)}"></div>
|
|
79
|
+
<div class="toast-content">
|
|
80
|
+
<span class="toast-header">${(x) => x.HEADER}</span>
|
|
81
|
+
<span class="toast-message">${(x) => x.MESSAGE}</span>
|
|
82
|
+
<div class="toast-bottom" slot="bottom">
|
|
83
|
+
<span class="toast-date" slot="date">${(x) => x.CREATED_AT}</span>
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
<div class="toast-delete" @click=${(x, c) => c.parent.deleteNotifyAlert(x.ALERT_ID)}>
|
|
87
|
+
<zero-icon name="xmark" variant="solid" size="lg"><zero-icon>
|
|
88
|
+
</div>
|
|
82
89
|
</div>
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
</div>
|
|
87
|
-
</div>
|
|
88
|
-
`)}
|
|
89
|
-
</div>
|
|
90
|
-
</zero-tab-panel>
|
|
90
|
+
`)}
|
|
91
|
+
</div>
|
|
92
|
+
</zero-tab-panel>
|
|
91
93
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
94
|
+
<zero-tab-panel
|
|
95
|
+
slot="my-alerts-tab"
|
|
96
|
+
class="my-alerts-tab-panel"
|
|
97
|
+
id=${x => InboxTab.MyAlerts}
|
|
98
|
+
style=${x => x.checkActiveTab(InboxTab.MyAlerts)}
|
|
99
|
+
>
|
|
100
|
+
<div class="my-alerts-tab-content">
|
|
101
|
+
${repeat((x) => x.rulesFilter, html `
|
|
102
|
+
<div class="rule">
|
|
103
|
+
<div class="rule-name">${x => x.NAME}</div>
|
|
104
|
+
<div class="rule-expression">${x => x.RULE_EXPRESSION}</div>
|
|
105
|
+
<div class="rule-status-date-actions">
|
|
106
|
+
<div class="rule-status ${x => getStatus(x.RULE_STATUS).toLowerCase()}">
|
|
107
|
+
${(x, c) => getStatus(x.RULE_STATUS)}
|
|
108
|
+
</div>
|
|
109
|
+
<!-- <div class="rule-datetime">${(x, c) => c.parent.getFormattedDate(x.TIMESTAMP)}</div> -->
|
|
110
|
+
<div class="rule-actions">
|
|
111
|
+
<!--
|
|
112
|
+
<span class="rule-action-edit" @click=${(x, c) => c.parent.editAlert(x)}}>
|
|
113
|
+
<zero-icon name="gear"></zero-icon>
|
|
114
|
+
</span>
|
|
115
|
+
-->
|
|
116
|
+
<span class="rule-action-enable-disable" @click=${(x, c) => c.parent.playPauseAlert(x)}>
|
|
117
|
+
<zero-icon name=${x => getIcon(x.RULE_STATUS)}></zero-icon>
|
|
118
|
+
</span>
|
|
119
|
+
<span class="rule-action-delete" @click=${(x, c) => c.parent.deleteAlert(x)}>
|
|
120
|
+
<zero-icon name="trash"></zero-icon>
|
|
121
|
+
</span>
|
|
122
|
+
</div>
|
|
123
|
+
</div>
|
|
120
124
|
</div>
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
</div>
|
|
125
|
-
</zero-tab-panel>
|
|
125
|
+
`)}
|
|
126
|
+
</div>
|
|
127
|
+
</zero-tab-panel>
|
|
126
128
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
>
|
|
133
|
-
<div class="search">
|
|
134
|
-
<zero-text-field
|
|
135
|
-
class="search-input"
|
|
136
|
-
:value=${sync(x => x.searchSubscribe)}
|
|
137
|
-
placeholder="Search Templates..."
|
|
138
|
-
autocomplete="off"
|
|
129
|
+
<zero-tab-panel
|
|
130
|
+
slot="subscribe-tab"
|
|
131
|
+
class="subscribe-tab-panel"
|
|
132
|
+
id=${x => InboxTab.Subscribe}
|
|
133
|
+
style=${x => x.checkActiveTab(InboxTab.Subscribe)}
|
|
139
134
|
>
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
<div
|
|
147
|
-
class="rule-template"
|
|
148
|
-
@click=${(x, c) => c.parent.openAlertSubscription(x)}
|
|
149
|
-
id=${(x) => x.ID}
|
|
135
|
+
<div class="search">
|
|
136
|
+
<zero-text-field
|
|
137
|
+
class="search-input"
|
|
138
|
+
:value=${sync(x => x.searchSubscribe)}
|
|
139
|
+
placeholder="Search Templates..."
|
|
140
|
+
autocomplete="off"
|
|
150
141
|
>
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
${when(x => Object.values(x.ruleTemplateSelected.PARAMETERS).length > 0, html `
|
|
168
|
-
<div class="subscribe-to-alert-content">
|
|
169
|
-
${x => x.subscribeToAlertComponent}
|
|
142
|
+
</zero-text-field>
|
|
143
|
+
</div>
|
|
144
|
+
<div
|
|
145
|
+
class="subscribe-tab-content"
|
|
146
|
+
>
|
|
147
|
+
${repeat((x) => x.templatesFilter, html `
|
|
148
|
+
<div
|
|
149
|
+
class="rule-template"
|
|
150
|
+
@click=${(x, c) => c.parent.openAlertSubscription(x)}
|
|
151
|
+
id=${(x) => x.ID}
|
|
152
|
+
>
|
|
153
|
+
<div class="rule-template-name">${x => x.NAME}</div>
|
|
154
|
+
<div class="rule-template-description">${x => x.DESCRIPTION}</div>
|
|
155
|
+
<!--
|
|
156
|
+
<div class="rule-template-datetime">${(x, c) => c.parent.getFormattedDate(x.TIMESTAMP)}</div>
|
|
157
|
+
-->
|
|
170
158
|
</div>
|
|
171
159
|
`)}
|
|
172
|
-
<div class="subscribe-to-alert-footer">
|
|
173
|
-
<zero-button
|
|
174
|
-
class="subscribe"
|
|
175
|
-
@click=${x => x.subscribeAlert()}
|
|
176
|
-
appearance="primary-gradient"
|
|
177
|
-
>
|
|
178
|
-
Subscribe
|
|
179
|
-
</zero-button>
|
|
180
|
-
</div>
|
|
181
160
|
</div>
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
161
|
+
${when(x => x.ruleTemplateSelected, html `
|
|
162
|
+
<div class="subscribe-to-alert">
|
|
163
|
+
<div class="subscribe-to-alert-header">
|
|
164
|
+
Subscribe to <span style="font-weight: bold;">${x => { var _a; return (_a = x.templates.filter(template => template.ID === x.ruleTemplateSelected.DYNAMIC_RULE_ID)[0]) === null || _a === void 0 ? void 0 : _a.NAME; }}</span>
|
|
165
|
+
</div>
|
|
166
|
+
${when(x => Object.values(x.ruleTemplateSelected.PARAMETERS).length === 0, html `
|
|
167
|
+
<p style="padding-left: 10px;">The selected template doesn't have parameters.</p>
|
|
168
|
+
`)}
|
|
169
|
+
${when(x => Object.values(x.ruleTemplateSelected.PARAMETERS).length > 0, html `
|
|
170
|
+
<div class="subscribe-to-alert-content">
|
|
171
|
+
${x => x.subscribeToAlertComponent}
|
|
172
|
+
</div>
|
|
173
|
+
`)}
|
|
174
|
+
<div class="subscribe-to-alert-footer">
|
|
175
|
+
<zero-button
|
|
176
|
+
class="subscribe"
|
|
177
|
+
@click=${x => x.subscribeAlert()}
|
|
178
|
+
appearance="primary-gradient"
|
|
179
|
+
>
|
|
180
|
+
Subscribe
|
|
181
|
+
</zero-button>
|
|
182
|
+
</div>
|
|
183
|
+
</div>
|
|
184
|
+
`)}
|
|
185
|
+
</zero-tab-panel>
|
|
186
|
+
</zero-tabs>
|
|
187
|
+
</div>
|
|
188
|
+
</div>
|
|
189
|
+
</zero-flyout>
|
|
186
190
|
`;
|
package/package.json
CHANGED