@genesislcap/pbc-notify-ui 1.0.20 → 1.0.22

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,5 +1,5 @@
1
1
  import { Flyout } from '@genesislcap/foundation-zero';
2
- import { FoundationInboxBase } from "../../inbox";
2
+ import { FoundationInboxBase } from '../../inbox-base/inbox-base';
3
3
  export declare class FoundationInboxFlyout extends FoundationInboxBase {
4
4
  flyout: Flyout;
5
5
  flyoutClosed: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"foundation-inbox-flyout.d.ts","sourceRoot":"","sources":["../../../../../../src/components/foundation-inbox/components/foundation-inbox-flyout/foundation-inbox-flyout.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AAItD,OAAO,EAAC,mBAAmB,EAAC,MAAM,aAAa,CAAC;AAEhD,qBAKa,qBAAsB,SAAQ,mBAAmB;IAE5D,MAAM,EAAE,MAAM,CAAC;IACH,YAAY,EAAE,OAAO,CAAQ;IAE5B,IAAI;IAKV,KAAK;CAIb"}
1
+ {"version":3,"file":"foundation-inbox-flyout.d.ts","sourceRoot":"","sources":["../../../../../../src/components/foundation-inbox/components/foundation-inbox-flyout/foundation-inbox-flyout.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AAItD,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAElE,qBAKa,qBAAsB,SAAQ,mBAAmB;IAE5D,MAAM,EAAE,MAAM,CAAC;IACH,YAAY,EAAE,OAAO,CAAQ;IAE5B,IAAI;IAKV,KAAK;CAIb"}
@@ -0,0 +1,40 @@
1
+ import { Auth } from "@genesislcap/foundation-comms";
2
+ import { FASTElement } from "@microsoft/fast-element";
3
+ import { AlertService } from "../../../services/alert.service";
4
+ import { RuleService } from "../../../services/rule.service";
5
+ import { TemplateService } from "../../../services/template.service";
6
+ import { Alert, NotificationRuleTemplateReply, Rule, RuleTemplate } from "../inbox.types";
7
+ import { Tabs } from "@microsoft/fast-foundation";
8
+ import { InboxTab } from "../inbox.template";
9
+ export declare class FoundationInboxBase extends FASTElement {
10
+ auth: Auth;
11
+ ready: boolean;
12
+ alertService: AlertService;
13
+ private alerts;
14
+ alertsFilter: Alert[];
15
+ searchAlertLog: string;
16
+ ruleService: RuleService;
17
+ private rules;
18
+ rulesFilter: Rule[];
19
+ ruleTemplateService: TemplateService;
20
+ templates: RuleTemplate[];
21
+ templatesFilter: RuleTemplate[];
22
+ searchSubscribe: string;
23
+ ruleTemplateDetails: NotificationRuleTemplateReply;
24
+ tabs: Tabs;
25
+ connectedCallback(): Promise<void>;
26
+ open(): Promise<void>;
27
+ close(): void;
28
+ checkActiveTab(inboxTab: InboxTab): "" | "display: none;";
29
+ inboxTabChanged(inboxTab: InboxTab): Promise<void>;
30
+ alertsChanged: () => Alert[];
31
+ rulesChanged: () => Rule[];
32
+ templatesChanged: () => RuleTemplate[];
33
+ searchAlertLogChanged: () => void;
34
+ searchSubscribeChanged: () => void;
35
+ editAlert(): void;
36
+ playPauseAlert(ruleClicked: Rule): Promise<void>;
37
+ deleteAlert(ruleClicked: Rule): Promise<void>;
38
+ openTemplateSubscription(ruleTemplate: any): Promise<void>;
39
+ }
40
+ //# sourceMappingURL=inbox-base.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inbox-base.d.ts","sourceRoot":"","sources":["../../../../../src/components/foundation-inbox/inbox-base/inbox-base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAW,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAc,MAAM,yBAAyB,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AACrE,OAAO,EAAE,KAAK,EAAE,6BAA6B,EAAE,IAAI,EAAc,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACtG,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAElD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,qBAAa,mBAAoB,SAAQ,WAAW;IAE5C,IAAI,EAAE,IAAI,CAAC;IACL,KAAK,EAAE,OAAO,CAAS;IAErB,YAAY,EAAE,YAAY,CAAC;IAC7B,OAAO,CAAC,MAAM,CAAe;IAC7B,YAAY,EAAE,KAAK,EAAE,CAAM;IAC3B,cAAc,EAAE,MAAM,CAAM;IAE3B,WAAW,EAAE,WAAW,CAAC;IAC1B,OAAO,CAAC,KAAK,CAAc;IAC3B,WAAW,EAAE,IAAI,EAAE,CAAM;IAEpB,mBAAmB,EAAE,eAAe,CAAC;IAC1C,SAAS,EAAE,YAAY,EAAE,CAAM;IAC/B,eAAe,EAAE,YAAY,EAAE,CAAM;IAErC,eAAe,EAAE,MAAM,CAAM;IAC7B,mBAAmB,EAAE,6BAA6B,CAAQ;IAE/D,IAAI,EAAE,IAAI,CAAC;IAEZ,iBAAiB;IAiBV,IAAI;IAMV,KAAK;IAKZ,cAAc,CAAC,QAAQ,EAAE,QAAQ;IAM3B,eAAe,CAAC,QAAQ,EAAE,QAAQ;IAqBxC,aAAa,gBAAyC;IAEtD,YAAY,eAAuC;IAEnD,gBAAgB,uBAA+C;IAE/D,qBAAqB,aAWpB;IAED,sBAAsB,aAWrB;IAKD,SAAS;IAGH,cAAc,CAAC,WAAW,EAAE,IAAI;IAgBhC,WAAW,CAAC,WAAW,EAAE,IAAI;IAQ7B,wBAAwB,CAAC,YAAY,EAAE,GAAG;CAYjD"}
@@ -1,41 +1,4 @@
1
- import { FASTElement } from '@microsoft/fast-element';
2
- import { InboxTab } from './inbox.template';
3
- import { RuleTemplate, Rule, NotificationRuleTemplateReply, Alert } from './inbox.types';
4
- import { Tabs } from '@genesislcap/foundation-zero';
5
- import { Auth } from '@genesislcap/foundation-comms';
6
- import { AlertService } from '../../services/alert.service';
7
- import { RuleService } from '../../services/rule.service';
8
- import { TemplateService } from '../../services/template.service';
9
- export declare class FoundationInboxBase extends FASTElement {
10
- auth: Auth;
11
- ready: boolean;
12
- alertService: AlertService;
13
- private alerts;
14
- alertsFilter: Alert[];
15
- searchAlertLog: string;
16
- ruleService: RuleService;
17
- private rules;
18
- rulesFilter: Rule[];
19
- ruleTemplateService: TemplateService;
20
- templates: RuleTemplate[];
21
- templatesFilter: RuleTemplate[];
22
- searchSubscribe: string;
23
- ruleTemplateDetails: NotificationRuleTemplateReply;
24
- tabs: Tabs;
25
- open(): Promise<void>;
26
- close(): void;
27
- checkActiveTab(inboxTab: InboxTab): "" | "display: none;";
28
- inboxTabChanged(inboxTab: InboxTab): Promise<void>;
29
- alertsChanged: () => Alert[];
30
- rulesChanged: () => Rule[];
31
- templatesChanged: () => RuleTemplate[];
32
- searchAlertLogChanged: () => void;
33
- searchSubscribeChanged: () => void;
34
- editAlert(): void;
35
- playPauseAlert(ruleClicked: Rule): Promise<void>;
36
- deleteAlert(ruleClicked: Rule): Promise<void>;
37
- openTemplateSubscription(ruleTemplate: any): Promise<void>;
38
- }
1
+ import { FoundationInboxBase } from './inbox-base/inbox-base';
39
2
  /**
40
3
  * Foundation inbox component for displaying notifies list.
41
4
  * Allow searching, filtering and deleting notifies
@@ -1 +1 @@
1
- {"version":3,"file":"inbox.d.ts","sourceRoot":"","sources":["../../../../src/components/foundation-inbox/inbox.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6B,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEjF,OAAO,EAAE,QAAQ,EAAuC,MAAM,kBAAkB,CAAC;AACjF,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,6BAA6B,EAAE,KAAK,EAAmC,MAAM,eAAe,CAAC;AAC1H,OAAO,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AAEpD,OAAO,EAAE,IAAI,EAAW,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAElE,qBAAa,mBAAoB,SAAQ,WAAW;IAE5C,IAAI,EAAE,IAAI,CAAC;IACL,KAAK,EAAE,OAAO,CAAS;IAErB,YAAY,EAAE,YAAY,CAAC;IAC7B,OAAO,CAAC,MAAM,CAAe;IAC7B,YAAY,EAAE,KAAK,EAAE,CAAM;IAC3B,cAAc,EAAE,MAAM,CAAM;IAE3B,WAAW,EAAE,WAAW,CAAC;IAC1B,OAAO,CAAC,KAAK,CAAc;IAC3B,WAAW,EAAE,IAAI,EAAE,CAAM;IAEpB,mBAAmB,EAAE,eAAe,CAAC;IAC1C,SAAS,EAAE,YAAY,EAAE,CAAM;IAC/B,eAAe,EAAE,YAAY,EAAE,CAAM;IAErC,eAAe,EAAE,MAAM,CAAM;IAC7B,mBAAmB,EAAE,6BAA6B,CAAQ;IAE/D,IAAI,EAAE,IAAI,CAAC;IAEL,IAAI;IAiBV,KAAK;IAKZ,cAAc,CAAC,QAAQ,EAAE,QAAQ;IAM3B,eAAe,CAAC,QAAQ,EAAE,QAAQ;IAqBxC,aAAa,gBAAyC;IAEtD,YAAY,eAAuC;IAEnD,gBAAgB,uBAA+C;IAE/D,qBAAqB,aAWpB;IAED,sBAAsB,aAWrB;IAKD,SAAS;IAGH,cAAc,CAAC,WAAW,EAAE,IAAI;IAgBhC,WAAW,CAAC,WAAW,EAAE,IAAI;IAQ7B,wBAAwB,CAAC,YAAY,EAAE,GAAG;CAYjD;AAED;;;;GAIG;AACH,qBAKa,eAAgB,SAAQ,mBAAmB;CACvD"}
1
+ {"version":3,"file":"inbox.d.ts","sourceRoot":"","sources":["../../../../src/components/foundation-inbox/inbox.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAE9D;;;;GAIG;AACH,qBAKa,eAAgB,SAAQ,mBAAmB;CACvD"}
@@ -1,5 +1,5 @@
1
1
  /**
2
2
  * @public
3
3
  */
4
- export declare const InboxStyles: import("@microsoft/fast-element").ElementStyles;
4
+ export declare const FoundationInboxStyles: import("@microsoft/fast-element").ElementStyles;
5
5
  //# sourceMappingURL=inbox.styles.d.ts.map
@@ -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,iDAkOvB,CAAC"}
1
+ {"version":3,"file":"inbox.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/foundation-inbox/inbox.styles.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,eAAO,MAAM,qBAAqB,iDAkOjC,CAAC"}
@@ -2,7 +2,7 @@ import { __awaiter, __decorate } from "tslib";
2
2
  import { observable, customElement } from '@microsoft/fast-element';
3
3
  import { FoundationInboxFlyoutStyles } from './foundation-inbox-flyout.styles';
4
4
  import { FoundationInboxFlyoutTemplate } from './foundation-inbox-flyout.template';
5
- import { FoundationInboxBase } from "../../inbox";
5
+ import { FoundationInboxBase } from '../../inbox-base/inbox-base';
6
6
  let FoundationInboxFlyout = class FoundationInboxFlyout extends FoundationInboxBase {
7
7
  constructor() {
8
8
  super(...arguments);
@@ -1,5 +1,5 @@
1
1
  import { css } from '@microsoft/fast-element';
2
- import { InboxStyles } from '../../inbox.styles';
2
+ import { FoundationInboxStyles } from '../../inbox.styles';
3
3
  export const FoundationInboxFlyoutStyles = css `
4
4
  zero-flyout::part(flyout) {
5
5
  width: 30%;
@@ -13,5 +13,5 @@ export const FoundationInboxFlyoutStyles = css `
13
13
  flex-direction: column;
14
14
  }
15
15
 
16
- ${InboxStyles}
16
+ ${FoundationInboxStyles}
17
17
  `;
@@ -0,0 +1,185 @@
1
+ import { __awaiter, __decorate } from "tslib";
2
+ import { Auth } from "@genesislcap/foundation-comms";
3
+ import { FASTElement, observable } from "@microsoft/fast-element";
4
+ import { AlertService } from "../../../services/alert.service";
5
+ import { RuleService } from "../../../services/rule.service";
6
+ import { TemplateService } from "../../../services/template.service";
7
+ import { RuleStatus } from "../inbox.types";
8
+ import { logger, updateArray } from "../../../utils";
9
+ import { InboxTab } from "../inbox.template";
10
+ export class FoundationInboxBase extends FASTElement {
11
+ constructor() {
12
+ super(...arguments);
13
+ this.ready = false;
14
+ this.alerts = [];
15
+ this.alertsFilter = [];
16
+ this.searchAlertLog = '';
17
+ this.rules = [];
18
+ this.rulesFilter = [];
19
+ this.templates = [];
20
+ this.templatesFilter = [];
21
+ this.searchSubscribe = '';
22
+ this.ruleTemplateDetails = null;
23
+ // #endregion
24
+ // #region Changed Events
25
+ this.alertsChanged = () => this.alertsFilter = this.alerts;
26
+ this.rulesChanged = () => this.rulesFilter = this.rules;
27
+ this.templatesChanged = () => this.templatesFilter = this.templates;
28
+ this.searchAlertLogChanged = () => {
29
+ if (!this.searchAlertLog) {
30
+ this.alertsFilter = this.alerts;
31
+ return;
32
+ }
33
+ this.alertsFilter = this.alerts.filter(item => item.HEADER
34
+ .toLowerCase()
35
+ .startsWith(this.searchAlertLog.toLowerCase()));
36
+ };
37
+ this.searchSubscribeChanged = () => {
38
+ if (!this.searchSubscribe) {
39
+ this.templatesFilter = this.templates;
40
+ return;
41
+ }
42
+ this.templatesFilter = this.templates.filter(item => item.NAME
43
+ .toLowerCase()
44
+ .startsWith(this.searchSubscribe.toLowerCase()));
45
+ };
46
+ // #endregion
47
+ }
48
+ connectedCallback() {
49
+ const _super = Object.create(null, {
50
+ connectedCallback: { get: () => super.connectedCallback }
51
+ });
52
+ return __awaiter(this, void 0, void 0, function* () {
53
+ _super.connectedCallback.call(this);
54
+ this.alertService.getAlerts().subscribe({
55
+ next: (streamMessage) => {
56
+ var _a;
57
+ if (streamMessage.ERROR) {
58
+ logger.error(streamMessage.ERROR);
59
+ return;
60
+ }
61
+ this.alerts = updateArray((_a = streamMessage.ROW) !== null && _a !== void 0 ? _a : null, this.alerts);
62
+ },
63
+ error: (error) => {
64
+ logger.error(error);
65
+ },
66
+ });
67
+ });
68
+ }
69
+ open() {
70
+ return __awaiter(this, void 0, void 0, function* () {
71
+ // Alerts is updated by stream
72
+ this.rules = yield this.ruleService.getRules();
73
+ this.templates = yield this.ruleTemplateService.getRuleTemplates();
74
+ });
75
+ }
76
+ close() {
77
+ this.ruleTemplateDetails = null;
78
+ }
79
+ // #region Tabs
80
+ checkActiveTab(inboxTab) {
81
+ return this.tabs.activeid === inboxTab.toString()
82
+ ? ''
83
+ : 'display: none;';
84
+ }
85
+ inboxTabChanged(inboxTab) {
86
+ return __awaiter(this, void 0, void 0, function* () {
87
+ this.ruleTemplateDetails = null;
88
+ switch (inboxTab) {
89
+ case InboxTab.AlertLog:
90
+ break;
91
+ case InboxTab.MyAlerts:
92
+ this.rules = yield this.ruleService.getRules();
93
+ break;
94
+ case InboxTab.Subscribe:
95
+ this.templates = yield this.ruleTemplateService.getRuleTemplates();
96
+ break;
97
+ default:
98
+ logger.error('Unexpected inboxTab:', inboxTab);
99
+ break;
100
+ }
101
+ });
102
+ }
103
+ // #endregion
104
+ // #region My Alerts
105
+ // TODO:
106
+ editAlert() {
107
+ }
108
+ playPauseAlert(ruleClicked) {
109
+ return __awaiter(this, void 0, void 0, function* () {
110
+ switch (ruleClicked.RULE_STATUS) {
111
+ case RuleStatus.ENABLED:
112
+ yield this.ruleService.disableRule(ruleClicked.ID);
113
+ break;
114
+ case RuleStatus.DISABLED:
115
+ yield this.ruleService.enableRule(ruleClicked.ID);
116
+ break;
117
+ default:
118
+ logger.error('Unexpected ruleStatus:', ruleClicked.RULE_STATUS);
119
+ break;
120
+ }
121
+ this.rules = yield this.ruleService.getRules();
122
+ });
123
+ }
124
+ deleteAlert(ruleClicked) {
125
+ return __awaiter(this, void 0, void 0, function* () {
126
+ yield this.ruleService.unsubscribeRule(ruleClicked.ID);
127
+ this.rules = yield this.ruleService.getRules();
128
+ });
129
+ }
130
+ // #endregion
131
+ // #region Subscribe
132
+ openTemplateSubscription(ruleTemplate) {
133
+ return __awaiter(this, void 0, void 0, function* () {
134
+ if (this.ruleTemplateDetails) {
135
+ // Close
136
+ this.ruleTemplateDetails = null;
137
+ return;
138
+ }
139
+ // Open
140
+ this.ruleTemplateDetails = yield this.ruleTemplateService.getRuleTemplateDetails(ruleTemplate.ID);
141
+ });
142
+ }
143
+ }
144
+ __decorate([
145
+ Auth
146
+ ], FoundationInboxBase.prototype, "auth", void 0);
147
+ __decorate([
148
+ observable
149
+ ], FoundationInboxBase.prototype, "ready", void 0);
150
+ __decorate([
151
+ AlertService
152
+ ], FoundationInboxBase.prototype, "alertService", void 0);
153
+ __decorate([
154
+ observable
155
+ ], FoundationInboxBase.prototype, "alerts", void 0);
156
+ __decorate([
157
+ observable
158
+ ], FoundationInboxBase.prototype, "alertsFilter", void 0);
159
+ __decorate([
160
+ observable
161
+ ], FoundationInboxBase.prototype, "searchAlertLog", void 0);
162
+ __decorate([
163
+ RuleService
164
+ ], FoundationInboxBase.prototype, "ruleService", void 0);
165
+ __decorate([
166
+ observable
167
+ ], FoundationInboxBase.prototype, "rules", void 0);
168
+ __decorate([
169
+ observable
170
+ ], FoundationInboxBase.prototype, "rulesFilter", void 0);
171
+ __decorate([
172
+ TemplateService
173
+ ], FoundationInboxBase.prototype, "ruleTemplateService", void 0);
174
+ __decorate([
175
+ observable
176
+ ], FoundationInboxBase.prototype, "templates", void 0);
177
+ __decorate([
178
+ observable
179
+ ], FoundationInboxBase.prototype, "templatesFilter", void 0);
180
+ __decorate([
181
+ observable
182
+ ], FoundationInboxBase.prototype, "searchSubscribe", void 0);
183
+ __decorate([
184
+ observable
185
+ ], FoundationInboxBase.prototype, "ruleTemplateDetails", void 0);
@@ -1,180 +1,8 @@
1
- import { __awaiter, __decorate } from "tslib";
2
- import { observable, customElement, FASTElement } from '@microsoft/fast-element';
3
- import { InboxStyles as styles } from './inbox.styles';
4
- import { InboxTab, FoundationInboxTemplate as template } from './inbox.template';
5
- import { RuleStatus } from './inbox.types';
6
- import { logger, updateArray } from '../../utils';
7
- import { Auth } from '@genesislcap/foundation-comms';
8
- import { AlertService } from '../../services/alert.service';
9
- import { RuleService } from '../../services/rule.service';
10
- import { TemplateService } from '../../services/template.service';
11
- export class FoundationInboxBase extends FASTElement {
12
- constructor() {
13
- super(...arguments);
14
- this.ready = false;
15
- this.alerts = [];
16
- this.alertsFilter = [];
17
- this.searchAlertLog = '';
18
- this.rules = [];
19
- this.rulesFilter = [];
20
- this.templates = [];
21
- this.templatesFilter = [];
22
- this.searchSubscribe = '';
23
- this.ruleTemplateDetails = null;
24
- // #endregion
25
- // #region Changed Events
26
- this.alertsChanged = () => this.alertsFilter = this.alerts;
27
- this.rulesChanged = () => this.rulesFilter = this.rules;
28
- this.templatesChanged = () => this.templatesFilter = this.templates;
29
- this.searchAlertLogChanged = () => {
30
- if (!this.searchAlertLog) {
31
- this.alertsFilter = this.alerts;
32
- return;
33
- }
34
- this.alertsFilter = this.alerts.filter(item => item.HEADER
35
- .toLowerCase()
36
- .startsWith(this.searchAlertLog.toLowerCase()));
37
- };
38
- this.searchSubscribeChanged = () => {
39
- if (!this.searchSubscribe) {
40
- this.templatesFilter = this.templates;
41
- return;
42
- }
43
- this.templatesFilter = this.templates.filter(item => item.NAME
44
- .toLowerCase()
45
- .startsWith(this.searchSubscribe.toLowerCase()));
46
- };
47
- // #endregion
48
- }
49
- open() {
50
- return __awaiter(this, void 0, void 0, function* () {
51
- this.alertService.getAlerts().subscribe({
52
- next: (streamMessage) => {
53
- var _a;
54
- if (streamMessage.ERROR) {
55
- logger.error(streamMessage.ERROR);
56
- return;
57
- }
58
- this.alerts = updateArray((_a = streamMessage.ROW) !== null && _a !== void 0 ? _a : null, this.alerts);
59
- },
60
- error: (error) => {
61
- logger.error(error);
62
- },
63
- });
64
- this.rules = yield this.ruleService.getRules();
65
- this.templates = yield this.ruleTemplateService.getRuleTemplates();
66
- });
67
- }
68
- close() {
69
- this.ruleTemplateDetails = null;
70
- }
71
- // #region Tabs
72
- checkActiveTab(inboxTab) {
73
- return this.tabs.activeid === inboxTab.toString()
74
- ? ''
75
- : 'display: none;';
76
- }
77
- inboxTabChanged(inboxTab) {
78
- return __awaiter(this, void 0, void 0, function* () {
79
- this.ruleTemplateDetails = null;
80
- switch (inboxTab) {
81
- case InboxTab.AlertLog:
82
- break;
83
- case InboxTab.MyAlerts:
84
- this.rules = yield this.ruleService.getRules();
85
- break;
86
- case InboxTab.Subscribe:
87
- this.templates = yield this.ruleTemplateService.getRuleTemplates();
88
- break;
89
- default:
90
- logger.error('Unexpected inboxTab:', inboxTab);
91
- break;
92
- }
93
- });
94
- }
95
- // #endregion
96
- // #region My Alerts
97
- // TODO:
98
- editAlert() {
99
- }
100
- playPauseAlert(ruleClicked) {
101
- return __awaiter(this, void 0, void 0, function* () {
102
- switch (ruleClicked.RULE_STATUS) {
103
- case RuleStatus.ENABLED:
104
- yield this.ruleService.disableRule(ruleClicked.ID);
105
- break;
106
- case RuleStatus.DISABLED:
107
- yield this.ruleService.enableRule(ruleClicked.ID);
108
- break;
109
- default:
110
- logger.error('Unexpected ruleStatus:', ruleClicked.RULE_STATUS);
111
- break;
112
- }
113
- this.rules = yield this.ruleService.getRules();
114
- });
115
- }
116
- deleteAlert(ruleClicked) {
117
- return __awaiter(this, void 0, void 0, function* () {
118
- yield this.ruleService.unsubscribeRule(ruleClicked.ID);
119
- this.rules = yield this.ruleService.getRules();
120
- });
121
- }
122
- // #endregion
123
- // #region Subscribe
124
- openTemplateSubscription(ruleTemplate) {
125
- return __awaiter(this, void 0, void 0, function* () {
126
- if (this.ruleTemplateDetails) {
127
- // Close
128
- this.ruleTemplateDetails = null;
129
- return;
130
- }
131
- // Open
132
- this.ruleTemplateDetails = yield this.ruleTemplateService.getRuleTemplateDetails(ruleTemplate.ID);
133
- });
134
- }
135
- }
136
- __decorate([
137
- Auth
138
- ], FoundationInboxBase.prototype, "auth", void 0);
139
- __decorate([
140
- observable
141
- ], FoundationInboxBase.prototype, "ready", void 0);
142
- __decorate([
143
- AlertService
144
- ], FoundationInboxBase.prototype, "alertService", void 0);
145
- __decorate([
146
- observable
147
- ], FoundationInboxBase.prototype, "alerts", void 0);
148
- __decorate([
149
- observable
150
- ], FoundationInboxBase.prototype, "alertsFilter", void 0);
151
- __decorate([
152
- observable
153
- ], FoundationInboxBase.prototype, "searchAlertLog", void 0);
154
- __decorate([
155
- RuleService
156
- ], FoundationInboxBase.prototype, "ruleService", void 0);
157
- __decorate([
158
- observable
159
- ], FoundationInboxBase.prototype, "rules", void 0);
160
- __decorate([
161
- observable
162
- ], FoundationInboxBase.prototype, "rulesFilter", void 0);
163
- __decorate([
164
- TemplateService
165
- ], FoundationInboxBase.prototype, "ruleTemplateService", void 0);
166
- __decorate([
167
- observable
168
- ], FoundationInboxBase.prototype, "templates", void 0);
169
- __decorate([
170
- observable
171
- ], FoundationInboxBase.prototype, "templatesFilter", void 0);
172
- __decorate([
173
- observable
174
- ], FoundationInboxBase.prototype, "searchSubscribe", void 0);
175
- __decorate([
176
- observable
177
- ], FoundationInboxBase.prototype, "ruleTemplateDetails", void 0);
1
+ import { __decorate } from "tslib";
2
+ import { customElement } from '@microsoft/fast-element';
3
+ import { FoundationInboxStyles } from './inbox.styles';
4
+ import { FoundationInboxTemplate } from './inbox.template';
5
+ import { FoundationInboxBase } from './inbox-base/inbox-base';
178
6
  /**
179
7
  * Foundation inbox component for displaying notifies list.
180
8
  * Allow searching, filtering and deleting notifies
@@ -185,8 +13,8 @@ let FoundationInbox = class FoundationInbox extends FoundationInboxBase {
185
13
  FoundationInbox = __decorate([
186
14
  customElement({
187
15
  name: 'foundation-inbox',
188
- template,
189
- styles,
16
+ template: FoundationInboxTemplate,
17
+ styles: FoundationInboxStyles,
190
18
  })
191
19
  ], FoundationInbox);
192
20
  export { FoundationInbox };
@@ -2,7 +2,7 @@ import { css } from '@microsoft/fast-element';
2
2
  /**
3
3
  * @public
4
4
  */
5
- export const InboxStyles = css `
5
+ export const FoundationInboxStyles = css `
6
6
  .inbox {
7
7
  width: 100%;
8
8
  height: 100%;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@genesislcap/pbc-notify-ui",
3
3
  "description": "Genesis PBC Notify UI",
4
- "version": "1.0.20",
4
+ "version": "1.0.22",
5
5
  "license": "SEE LICENSE IN license.txt",
6
6
  "main": "dist/esm/index.js",
7
7
  "types": "dist/dts/index.d.ts",
@@ -0,0 +1,5 @@
1
+ sonar.projectKey=genesislcap_genesis-notify_client
2
+ sonar.projectName=pbc-notify-ui
3
+ sonar.organization=genesislcap
4
+ sonar.host.url=https://sonarcloud.io
5
+ sonar.sourceEncoding=UTF-8