@genesislcap/pbc-notify-ui 1.0.26 → 1.0.28
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/components.d.ts.map +1 -1
- package/dist/dts/components/foundation-inbox/components/foundation-inbox-counter/foundation-inbox-counter.d.ts +3 -0
- package/dist/dts/components/foundation-inbox/components/foundation-inbox-counter/foundation-inbox-counter.d.ts.map +1 -1
- 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/components/foundation-inbox-counter/foundation-inbox-counter.template.d.ts.map +1 -1
- package/dist/dts/components/foundation-inbox/components/foundation-inbox-flyout/foundation-inbox-flyout.d.ts +4 -0
- package/dist/dts/components/foundation-inbox/components/foundation-inbox-flyout/foundation-inbox-flyout.d.ts.map +1 -1
- package/dist/dts/components/foundation-inbox/inbox-base/inbox-base.d.ts +15 -14
- package/dist/dts/components/foundation-inbox/inbox-base/inbox-base.d.ts.map +1 -1
- package/dist/dts/components/foundation-inbox/inbox.template.d.ts.map +1 -1
- package/dist/dts/index.d.ts +1 -0
- package/dist/dts/index.d.ts.map +1 -1
- package/dist/dts/services/inbox.service.d.ts +12 -0
- package/dist/dts/services/inbox.service.d.ts.map +1 -0
- package/dist/dts/services/rule.service.d.ts.map +1 -1
- package/dist/esm/components/components.js +0 -2
- package/dist/esm/components/foundation-inbox/components/foundation-inbox-counter/foundation-inbox-counter.js +10 -2
- package/dist/esm/components/foundation-inbox/components/foundation-inbox-counter/foundation-inbox-counter.styles.js +0 -7
- package/dist/esm/components/foundation-inbox/components/foundation-inbox-counter/foundation-inbox-counter.template.js +4 -4
- package/dist/esm/components/foundation-inbox/components/foundation-inbox-flyout/foundation-inbox-flyout.js +25 -4
- package/dist/esm/components/foundation-inbox/components/foundation-inbox-flyout/foundation-inbox-flyout.template.js +1 -1
- package/dist/esm/components/foundation-inbox/inbox-base/inbox-base.js +36 -45
- package/dist/esm/components/foundation-inbox/inbox.template.js +2 -1
- package/dist/esm/index.js +1 -0
- package/dist/esm/services/inbox.service.js +77 -0
- package/dist/esm/services/rule.service.js +1 -2
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../../src/components/components.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../../src/components/components.ts"],"names":[],"mappings":"AA4EA,wBAAsB,WAAW;;GAShC"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { FASTElement } from '@microsoft/fast-element';
|
|
2
|
+
import { FoundationInboxService } from '../../../../services/inbox.service';
|
|
2
3
|
export declare class FoundationInboxCounter extends FASTElement {
|
|
3
4
|
value: number;
|
|
5
|
+
inboxService: FoundationInboxService;
|
|
6
|
+
private subscriptionHandler;
|
|
4
7
|
connectedCallback(): Promise<void>;
|
|
5
8
|
disconnectedCallback(): void;
|
|
6
9
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"foundation-inbox-counter.d.ts","sourceRoot":"","sources":["../../../../../../src/components/foundation-inbox/components/foundation-inbox-counter/foundation-inbox-counter.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6B,WAAW,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"foundation-inbox-counter.d.ts","sourceRoot":"","sources":["../../../../../../src/components/foundation-inbox/components/foundation-inbox-counter/foundation-inbox-counter.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6B,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAGjF,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAG5E,qBAKa,sBAAuB,SAAQ,WAAW;IACzC,KAAK,EAAE,MAAM,CAAK;IACN,YAAY,EAAE,sBAAsB,CAAC;IAC7D,OAAO,CAAC,mBAAmB,CAAgB;IAErC,iBAAiB;IAQvB,oBAAoB;CAIrB"}
|
|
@@ -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,iDAkBxC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"foundation-inbox-counter.template.d.ts","sourceRoot":"","sources":["../../../../../../src/components/foundation-inbox/components/foundation-inbox-counter/foundation-inbox-counter.template.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAIzE,eAAO,MAAM,8BAA8B,
|
|
1
|
+
{"version":3,"file":"foundation-inbox-counter.template.d.ts","sourceRoot":"","sources":["../../../../../../src/components/foundation-inbox/components/foundation-inbox-counter/foundation-inbox-counter.template.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAIzE,eAAO,MAAM,8BAA8B,6EAO1C,CAAC"}
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import { Flyout } from '@genesislcap/foundation-zero';
|
|
2
2
|
import { FoundationInboxBase } from '../../inbox-base/inbox-base';
|
|
3
3
|
export declare class FoundationInboxFlyout extends FoundationInboxBase {
|
|
4
|
+
ready: boolean;
|
|
4
5
|
flyout: Flyout;
|
|
5
6
|
flyoutClosed: boolean;
|
|
7
|
+
connectedCallback(): Promise<void>;
|
|
8
|
+
disconnectedCallback(): void;
|
|
6
9
|
open(): Promise<void>;
|
|
7
10
|
close(): void;
|
|
11
|
+
loadRemotes(): Promise<void>;
|
|
8
12
|
}
|
|
9
13
|
//# sourceMappingURL=foundation-inbox-flyout.d.ts.map
|
|
@@ -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;AAEtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;
|
|
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;AAEtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAKlE,qBAKa,qBAAsB,SAAQ,mBAAmB;IAEhD,KAAK,EAAE,OAAO,CAAS;IAEnC,MAAM,EAAE,MAAM,CAAC;IACH,YAAY,EAAE,OAAO,CAAQ;IAEnC,iBAAiB;IAKvB,oBAAoB,IAAI,IAAI;IAIf,IAAI;IAMV,KAAK;IAKN,WAAW;CAIlB"}
|
|
@@ -1,21 +1,23 @@
|
|
|
1
|
-
import { Auth } from
|
|
2
|
-
import { FASTElement } from
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
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
|
+
import { FoundationInboxService } from "../../../services/inbox.service";
|
|
9
10
|
export declare class FoundationInboxBase extends FASTElement {
|
|
10
11
|
auth: Auth;
|
|
11
|
-
ready: boolean;
|
|
12
12
|
alertService: AlertService;
|
|
13
|
+
inboxService: FoundationInboxService;
|
|
14
|
+
private alertSubscription;
|
|
13
15
|
private alerts;
|
|
14
16
|
alertsFilter: Alert[];
|
|
15
17
|
ruleService: RuleService;
|
|
16
|
-
|
|
18
|
+
rules: Rule[];
|
|
17
19
|
rulesFilter: Rule[];
|
|
18
|
-
|
|
20
|
+
templateService: TemplateService;
|
|
19
21
|
templates: RuleTemplate[];
|
|
20
22
|
templatesFilter: RuleTemplate[];
|
|
21
23
|
searchSubscribe: string;
|
|
@@ -23,8 +25,7 @@ export declare class FoundationInboxBase extends FASTElement {
|
|
|
23
25
|
selectedTab: InboxTab;
|
|
24
26
|
tabs: Tabs;
|
|
25
27
|
connectedCallback(): Promise<void>;
|
|
26
|
-
|
|
27
|
-
close(): void;
|
|
28
|
+
disconnectedCallback(): void;
|
|
28
29
|
checkActiveTab(inboxTab: InboxTab): "" | "display: none;";
|
|
29
30
|
inboxTabChanged(inboxTab: InboxTab): Promise<void>;
|
|
30
31
|
alertsChanged: () => Alert[];
|
|
@@ -34,10 +35,10 @@ export declare class FoundationInboxBase extends FASTElement {
|
|
|
34
35
|
searchAlertLogChanged: () => void;
|
|
35
36
|
private filterAlerts;
|
|
36
37
|
searchSubscribeChanged: () => void;
|
|
38
|
+
dismissAlert(alertId: string): void;
|
|
37
39
|
editAlert(): void;
|
|
38
40
|
playPauseAlert(ruleClicked: Rule): Promise<void>;
|
|
39
41
|
deleteAlert(ruleClicked: Rule): Promise<void>;
|
|
40
42
|
openTemplateSubscription(ruleTemplate: any): Promise<void>;
|
|
41
|
-
dismissAlert(alertId: string): void;
|
|
42
43
|
}
|
|
43
44
|
//# sourceMappingURL=inbox-base.d.ts.map
|
|
@@ -1 +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,
|
|
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,EAA6B,MAAM,+BAA+B,CAAC;AAChF,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;AACnH,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAElD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAEzE,qBAAa,mBAAoB,SAAQ,WAAW;IAE5C,IAAI,EAAE,IAAI,CAAC;IAEH,YAAY,EAAE,YAAY,CAAC;IACjB,YAAY,EAAE,sBAAsB,CAAC;IAC7D,OAAO,CAAC,iBAAiB,CAAgB;IAC7B,OAAO,CAAC,MAAM,CAAe;IAC7B,YAAY,EAAE,KAAK,EAAE,CAAM;IAE1B,WAAW,EAAE,WAAW,CAAC;IAC1B,KAAK,EAAE,IAAI,EAAE,CAAM;IACnB,WAAW,EAAE,IAAI,EAAE,CAAM;IAEpB,eAAe,EAAE,eAAe,CAAC;IACtC,SAAS,EAAE,YAAY,EAAE,CAAM;IAC/B,eAAe,EAAE,YAAY,EAAE,CAAM;IAErC,eAAe,EAAE,MAAM,CAAM;IAC7B,mBAAmB,EAAE,6BAA6B,CAAQ;IAC1D,WAAW,EAAE,QAAQ,CAAsB;IAEhD,IAAI,EAAE,IAAI,CAAC;IAEZ,iBAAiB;IAWvB,oBAAoB;IAMpB,cAAc,CAAC,QAAQ,EAAE,QAAQ;IAM3B,eAAe,CAAC,QAAQ,EAAE,QAAQ;IAuBxC,aAAa,gBAA2C;IAExD,YAAY,eAAyC;IAErD,gBAAgB,uBAAiD;IAErD,cAAc,EAAE,MAAM,CAAM;IACxC,qBAAqB,aAEnB;IAEF,OAAO,CAAC,YAAY;IAUpB,sBAAsB,aASpB;IAKF,YAAY,CAAC,OAAO,EAAE,MAAM;IAO5B,SAAS;IAEH,cAAc,CAAC,WAAW,EAAE,IAAI;IAgBhC,WAAW,CAAC,WAAW,EAAE,IAAI;IAO7B,wBAAwB,CAAC,YAAY,EAAE,GAAG;CAajD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inbox.template.d.ts","sourceRoot":"","sources":["../../../../src/components/foundation-inbox/inbox.template.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAI1C,oBAAY,QAAQ;IAClB,SAAS,IAAA;IACT,YAAY,IAAA;IACZ,QAAQ,IAAA;IACR,SAAS,IAAA;CACV;AAgDD;;GAEG;AACH,eAAO,MAAM,uBAAuB,
|
|
1
|
+
{"version":3,"file":"inbox.template.d.ts","sourceRoot":"","sources":["../../../../src/components/foundation-inbox/inbox.template.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAI1C,oBAAY,QAAQ;IAClB,SAAS,IAAA;IACT,YAAY,IAAA;IACZ,QAAQ,IAAA;IACR,SAAS,IAAA;CACV;AAgDD;;GAEG;AACH,eAAO,MAAM,uBAAuB,sEAkJnC,CAAC"}
|
package/dist/dts/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * from './components/foundation-inbox/inbox';
|
|
2
2
|
export * from './components/foundation-inbox/components/foundation-inbox-flyout/foundation-inbox-flyout';
|
|
3
|
+
export * from './components/foundation-inbox/components/foundation-inbox-counter/foundation-inbox-counter';
|
|
3
4
|
export * from './components/foundation-notification-dashboard';
|
|
4
5
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/dts/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,qCAAqC,CAAC;AACpD,cAAc,0FAA0F,CAAC;AACzG,cAAc,gDAAgD,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,qCAAqC,CAAC;AACpD,cAAc,0FAA0F,CAAC;AACzG,cAAc,4FAA4F,CAAC;AAC3G,cAAc,gDAAgD,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface FoundationInboxServiceStore {
|
|
2
|
+
items: Array<any>;
|
|
3
|
+
}
|
|
4
|
+
export type SubscribeCallback = ({ store }: {
|
|
5
|
+
store: FoundationInboxServiceStore;
|
|
6
|
+
}) => any;
|
|
7
|
+
export interface FoundationInboxService {
|
|
8
|
+
subscribe(callback: SubscribeCallback): void;
|
|
9
|
+
unsubscribe(callback: SubscribeCallback): void;
|
|
10
|
+
}
|
|
11
|
+
export declare const FoundationInboxService: import("@microsoft/fast-foundation").InterfaceSymbol<FoundationInboxService>;
|
|
12
|
+
//# sourceMappingURL=inbox.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inbox.service.d.ts","sourceRoot":"","sources":["../../../src/services/inbox.service.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,2BAA2B;IAC1C,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;CACnB;AAED,MAAM,MAAM,iBAAiB,GAAG,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,2BAA2B,CAAA;CAAE,KAAK,GAAG,CAAC;AAE3F,MAAM,WAAW,sBAAsB;IACrC,SAAS,CAAC,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAC;IAC7C,WAAW,CAAC,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAC;CAChD;AAuFD,eAAO,MAAM,sBAAsB,8EAElC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rule.service.d.ts","sourceRoot":"","sources":["../../../src/services/rule.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,OAAO,EAAE,MAAM,+BAA+B,CAAC;AAEjE,OAAO,EAAE,IAAI,EAAE,MAAM,gGAAgG,CAAC;AAEtH,MAAM,WAAW,WAAW;IAC1B,aAAa,CAAC,aAAa,EAAE,MAAM,EAAE,gBAAgB,EAAE,GAAG,OAAE;IAC5D,eAAe,CAAC,aAAa,EAAE,MAAM,OAAE;IACvC,UAAU,CAAC,aAAa,EAAE,MAAM,OAAE;IAClC,WAAW,CAAC,aAAa,EAAE,MAAM,OAAE;IACnC,QAAQ,IAAI,OAAO,CAAC,GAAG,CAAC,CAAC;IACzB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9C,UAAU,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACzC,UAAU,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACzC,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CAClC;
|
|
1
|
+
{"version":3,"file":"rule.service.d.ts","sourceRoot":"","sources":["../../../src/services/rule.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,OAAO,EAAE,MAAM,+BAA+B,CAAC;AAEjE,OAAO,EAAE,IAAI,EAAE,MAAM,gGAAgG,CAAC;AAEtH,MAAM,WAAW,WAAW;IAC1B,aAAa,CAAC,aAAa,EAAE,MAAM,EAAE,gBAAgB,EAAE,GAAG,OAAE;IAC5D,eAAe,CAAC,aAAa,EAAE,MAAM,OAAE;IACvC,UAAU,CAAC,aAAa,EAAE,MAAM,OAAE;IAClC,WAAW,CAAC,aAAa,EAAE,MAAM,OAAE;IACnC,QAAQ,IAAI,OAAO,CAAC,GAAG,CAAC,CAAC;IACzB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9C,UAAU,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACzC,UAAU,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACzC,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CAClC;AAkHD,eAAO,MAAM,WAAW,mEAAuE,CAAC"}
|
|
@@ -2,7 +2,6 @@ import { __awaiter } from "tslib";
|
|
|
2
2
|
import { foundationLayoutComponents } from '@genesislcap/foundation-layout';
|
|
3
3
|
import { logger } from '../utils';
|
|
4
4
|
import { FoundationInboxCounter } from './foundation-inbox/components/foundation-inbox-counter/foundation-inbox-counter';
|
|
5
|
-
import { FoundationInboxFlyout } from './foundation-inbox/components/foundation-inbox-flyout/foundation-inbox-flyout';
|
|
6
5
|
import { InboxSubscription } from './foundation-inbox/components/inbox-subscription/inbox-subscription';
|
|
7
6
|
import { RuleParameter } from './foundation-inbox/components/inbox-subscription/rule-parameter/rule-parameter';
|
|
8
7
|
import { NotifyAuditManagement } from './foundation-notification-dashboard/components/notify-audit/notify-audit-management';
|
|
@@ -22,7 +21,6 @@ import { TemplateManagement } from './foundation-notification-dashboard/componen
|
|
|
22
21
|
// Components
|
|
23
22
|
// #region Inbox
|
|
24
23
|
FoundationInboxCounter;
|
|
25
|
-
FoundationInboxFlyout;
|
|
26
24
|
InboxSubscription;
|
|
27
25
|
RuleParameter;
|
|
28
26
|
// #endregion Inbox
|
|
@@ -2,8 +2,8 @@ import { __awaiter, __decorate } from "tslib";
|
|
|
2
2
|
import { observable, customElement, FASTElement } from '@microsoft/fast-element';
|
|
3
3
|
import { FoundationInboxCounterStyles } from './foundation-inbox-counter.styles';
|
|
4
4
|
import { FoundationInboxCounterTemplate } from './foundation-inbox-counter.template';
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
import { FoundationInboxService } from '../../../../services/inbox.service';
|
|
6
|
+
import { AlertStatus } from '../../inbox.types';
|
|
7
7
|
let FoundationInboxCounter = class FoundationInboxCounter extends FASTElement {
|
|
8
8
|
constructor() {
|
|
9
9
|
super(...arguments);
|
|
@@ -15,15 +15,23 @@ let FoundationInboxCounter = class FoundationInboxCounter extends FASTElement {
|
|
|
15
15
|
});
|
|
16
16
|
return __awaiter(this, void 0, void 0, function* () {
|
|
17
17
|
_super.connectedCallback.call(this);
|
|
18
|
+
this.subscriptionHandler = ({ store }) => {
|
|
19
|
+
this.value = store === null || store === void 0 ? void 0 : store.items.filter(alert => alert.ALERT_STATUS === AlertStatus.NEW).length;
|
|
20
|
+
};
|
|
21
|
+
this.inboxService.subscribe(this.subscriptionHandler);
|
|
18
22
|
});
|
|
19
23
|
}
|
|
20
24
|
disconnectedCallback() {
|
|
21
25
|
super.disconnectedCallback();
|
|
26
|
+
this.inboxService.unsubscribe(this.subscriptionHandler);
|
|
22
27
|
}
|
|
23
28
|
};
|
|
24
29
|
__decorate([
|
|
25
30
|
observable
|
|
26
31
|
], FoundationInboxCounter.prototype, "value", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
FoundationInboxService
|
|
34
|
+
], FoundationInboxCounter.prototype, "inboxService", void 0);
|
|
27
35
|
FoundationInboxCounter = __decorate([
|
|
28
36
|
customElement({
|
|
29
37
|
name: 'foundation-inbox-counter',
|
|
@@ -2,13 +2,6 @@ import { css } from '@microsoft/fast-element';
|
|
|
2
2
|
const BACKGROUND_COLOR = '#EF5547';
|
|
3
3
|
export const FoundationInboxCounterStyles = css `
|
|
4
4
|
:host {
|
|
5
|
-
position: relative;
|
|
6
|
-
top: 4px;
|
|
7
|
-
right: 8px;
|
|
8
|
-
pointer-events: none;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
div {
|
|
12
5
|
display: inline-block;
|
|
13
6
|
min-width: 16px;
|
|
14
7
|
height: 16px;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { html } from '@microsoft/fast-element';
|
|
1
|
+
import { html, when } from '@microsoft/fast-element';
|
|
2
2
|
const MAX_NUMBER_TO_DISPLAY = 99;
|
|
3
3
|
export const FoundationInboxCounterTemplate = html `
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
${when((x) => x.value > 0, html `
|
|
5
|
+
${(x) => (x.value > MAX_NUMBER_TO_DISPLAY ? `${MAX_NUMBER_TO_DISPLAY}+` : x.value)}
|
|
6
|
+
`)}
|
|
7
7
|
`;
|
|
@@ -3,25 +3,46 @@ import { observable, customElement } from '@microsoft/fast-element';
|
|
|
3
3
|
import { FoundationInboxBase } from '../../inbox-base/inbox-base';
|
|
4
4
|
import { FoundationInboxFlyoutStyles } from './foundation-inbox-flyout.styles';
|
|
5
5
|
import { FoundationInboxFlyoutTemplate } from './foundation-inbox-flyout.template';
|
|
6
|
+
import { loadRemotes } from '../../../components';
|
|
6
7
|
let FoundationInboxFlyout = class FoundationInboxFlyout extends FoundationInboxBase {
|
|
7
8
|
constructor() {
|
|
8
9
|
super(...arguments);
|
|
10
|
+
this.ready = false;
|
|
9
11
|
this.flyoutClosed = true;
|
|
10
12
|
}
|
|
11
|
-
|
|
13
|
+
connectedCallback() {
|
|
12
14
|
const _super = Object.create(null, {
|
|
13
|
-
|
|
15
|
+
connectedCallback: { get: () => super.connectedCallback }
|
|
16
|
+
});
|
|
17
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
18
|
+
_super.connectedCallback.call(this);
|
|
19
|
+
yield this.loadRemotes();
|
|
14
20
|
});
|
|
21
|
+
}
|
|
22
|
+
disconnectedCallback() {
|
|
23
|
+
super.disconnectedCallback();
|
|
24
|
+
}
|
|
25
|
+
open() {
|
|
15
26
|
return __awaiter(this, void 0, void 0, function* () {
|
|
16
|
-
_super.open.call(this);
|
|
17
27
|
this.flyoutClosed = false;
|
|
28
|
+
this.rules = yield this.ruleService.getRules();
|
|
29
|
+
this.templates = yield this.templateService.getRuleTemplates();
|
|
18
30
|
});
|
|
19
31
|
}
|
|
20
32
|
close() {
|
|
21
|
-
|
|
33
|
+
this.ruleTemplateDetails = null;
|
|
22
34
|
this.flyout.closeFlyout();
|
|
23
35
|
}
|
|
36
|
+
loadRemotes() {
|
|
37
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
+
const remoteComponents = yield loadRemotes();
|
|
39
|
+
this.ready = true;
|
|
40
|
+
});
|
|
41
|
+
}
|
|
24
42
|
};
|
|
43
|
+
__decorate([
|
|
44
|
+
observable
|
|
45
|
+
], FoundationInboxFlyout.prototype, "ready", void 0);
|
|
25
46
|
__decorate([
|
|
26
47
|
observable
|
|
27
48
|
], FoundationInboxFlyout.prototype, "flyoutClosed", void 0);
|
|
@@ -9,7 +9,7 @@ export const FoundationInboxFlyoutTemplate = html `
|
|
|
9
9
|
displayHeader=${false}
|
|
10
10
|
>
|
|
11
11
|
<div class="inbox-header">
|
|
12
|
-
<div class="inbox-header-title">Alerts</div>
|
|
12
|
+
<div class="inbox-header-title">Alerts Centre</div>
|
|
13
13
|
<zero-button class="inbox-header-close" @click=${(x) => x.close()}>
|
|
14
14
|
<zero-icon part="icon" name="xmark" size="xl"></zero-icon>
|
|
15
15
|
</zero-button>
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { __awaiter, __decorate } from "tslib";
|
|
2
|
-
import { Auth } from
|
|
3
|
-
import { FASTElement, observable } from
|
|
4
|
-
import { AlertService } from
|
|
5
|
-
import { RuleService } from
|
|
6
|
-
import { TemplateService } from
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
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 { AlertStatus, RuleStatus } from "../inbox.types";
|
|
8
|
+
import { logger } from "../../../utils";
|
|
9
|
+
import { InboxTab } from "../inbox.template";
|
|
10
|
+
import { FoundationInboxService } from "../../../services/inbox.service";
|
|
10
11
|
export class FoundationInboxBase extends FASTElement {
|
|
11
12
|
constructor() {
|
|
12
13
|
super(...arguments);
|
|
13
|
-
this.ready = false;
|
|
14
14
|
this.alerts = [];
|
|
15
15
|
this.alertsFilter = [];
|
|
16
16
|
this.rules = [];
|
|
@@ -36,6 +36,7 @@ export class FoundationInboxBase extends FASTElement {
|
|
|
36
36
|
}
|
|
37
37
|
this.templatesFilter = this.templates.filter((item) => item.NAME.toLowerCase().startsWith(this.searchSubscribe.toLowerCase()));
|
|
38
38
|
};
|
|
39
|
+
// #endregion
|
|
39
40
|
}
|
|
40
41
|
connectedCallback() {
|
|
41
42
|
const _super = Object.create(null, {
|
|
@@ -43,35 +44,24 @@ export class FoundationInboxBase extends FASTElement {
|
|
|
43
44
|
});
|
|
44
45
|
return __awaiter(this, void 0, void 0, function* () {
|
|
45
46
|
_super.connectedCallback.call(this);
|
|
46
|
-
this.
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
return;
|
|
52
|
-
}
|
|
53
|
-
this.alerts = updateArray((_a = streamMessage.ROW) !== null && _a !== void 0 ? _a : null, this.alerts);
|
|
54
|
-
this.filterAlerts();
|
|
55
|
-
},
|
|
56
|
-
error: (error) => {
|
|
57
|
-
logger.error(error);
|
|
58
|
-
},
|
|
59
|
-
});
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
open() {
|
|
63
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
64
|
-
// Alerts is updated by stream
|
|
47
|
+
this.alertSubscription = ({ store }) => {
|
|
48
|
+
this.alerts = (store === null || store === void 0 ? void 0 : store.items) || [];
|
|
49
|
+
this.filterAlerts();
|
|
50
|
+
};
|
|
51
|
+
this.inboxService.subscribe(this.alertSubscription);
|
|
65
52
|
this.rules = yield this.ruleService.getRules();
|
|
66
|
-
this.templates = yield this.
|
|
53
|
+
this.templates = yield this.templateService.getRuleTemplates();
|
|
67
54
|
});
|
|
68
55
|
}
|
|
69
|
-
|
|
70
|
-
|
|
56
|
+
disconnectedCallback() {
|
|
57
|
+
super.disconnectedCallback();
|
|
58
|
+
this.inboxService.unsubscribe(this.alertSubscription);
|
|
71
59
|
}
|
|
72
60
|
// #region Tabs
|
|
73
61
|
checkActiveTab(inboxTab) {
|
|
74
|
-
return this.tabs.activeid === inboxTab.toString()
|
|
62
|
+
return this.tabs.activeid === inboxTab.toString()
|
|
63
|
+
? ''
|
|
64
|
+
: 'display: none;';
|
|
75
65
|
}
|
|
76
66
|
inboxTabChanged(inboxTab) {
|
|
77
67
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -86,7 +76,7 @@ export class FoundationInboxBase extends FASTElement {
|
|
|
86
76
|
this.rules = yield this.ruleService.getRules();
|
|
87
77
|
break;
|
|
88
78
|
case InboxTab.Subscribe:
|
|
89
|
-
this.templates = yield this.
|
|
79
|
+
this.templates = yield this.templateService.getRuleTemplates();
|
|
90
80
|
break;
|
|
91
81
|
default:
|
|
92
82
|
logger.error('Unexpected inboxTab:', inboxTab);
|
|
@@ -97,11 +87,16 @@ export class FoundationInboxBase extends FASTElement {
|
|
|
97
87
|
filterAlerts() {
|
|
98
88
|
this.alertsFilter = this.alerts.filter((alert) => (!this.searchAlertLog ||
|
|
99
89
|
alert.HEADER.toLowerCase().startsWith(this.searchAlertLog.toLowerCase())) &&
|
|
100
|
-
((this.selectedTab === InboxTab.AlertsNew && alert.ALERT_STATUS ===
|
|
101
|
-
(this.selectedTab === InboxTab.AlertHistory && alert.ALERT_STATUS !==
|
|
90
|
+
((this.selectedTab === InboxTab.AlertsNew && alert.ALERT_STATUS === AlertStatus.NEW) ||
|
|
91
|
+
(this.selectedTab === InboxTab.AlertHistory && alert.ALERT_STATUS !== AlertStatus.NEW)));
|
|
102
92
|
}
|
|
103
93
|
// #endregion
|
|
104
|
-
// #region
|
|
94
|
+
// #region New and History
|
|
95
|
+
dismissAlert(alertId) {
|
|
96
|
+
this.alertService.dismissNotifyAlert(alertId);
|
|
97
|
+
}
|
|
98
|
+
// #endregion
|
|
99
|
+
// #region Subscriptions
|
|
105
100
|
// TODO:
|
|
106
101
|
editAlert() { }
|
|
107
102
|
playPauseAlert(ruleClicked) {
|
|
@@ -136,23 +131,19 @@ export class FoundationInboxBase extends FASTElement {
|
|
|
136
131
|
return;
|
|
137
132
|
}
|
|
138
133
|
// Open
|
|
139
|
-
this.ruleTemplateDetails = yield this.
|
|
134
|
+
this.ruleTemplateDetails = yield this.templateService.getRuleTemplateDetails(ruleTemplate.ID);
|
|
140
135
|
});
|
|
141
136
|
}
|
|
142
|
-
// #endregion
|
|
143
|
-
dismissAlert(alertId) {
|
|
144
|
-
this.alertService.dismissNotifyAlert(alertId);
|
|
145
|
-
}
|
|
146
137
|
}
|
|
147
138
|
__decorate([
|
|
148
139
|
Auth
|
|
149
140
|
], FoundationInboxBase.prototype, "auth", void 0);
|
|
150
|
-
__decorate([
|
|
151
|
-
observable
|
|
152
|
-
], FoundationInboxBase.prototype, "ready", void 0);
|
|
153
141
|
__decorate([
|
|
154
142
|
AlertService
|
|
155
143
|
], FoundationInboxBase.prototype, "alertService", void 0);
|
|
144
|
+
__decorate([
|
|
145
|
+
FoundationInboxService
|
|
146
|
+
], FoundationInboxBase.prototype, "inboxService", void 0);
|
|
156
147
|
__decorate([
|
|
157
148
|
observable
|
|
158
149
|
], FoundationInboxBase.prototype, "alerts", void 0);
|
|
@@ -170,7 +161,7 @@ __decorate([
|
|
|
170
161
|
], FoundationInboxBase.prototype, "rulesFilter", void 0);
|
|
171
162
|
__decorate([
|
|
172
163
|
TemplateService
|
|
173
|
-
], FoundationInboxBase.prototype, "
|
|
164
|
+
], FoundationInboxBase.prototype, "templateService", void 0);
|
|
174
165
|
__decorate([
|
|
175
166
|
observable
|
|
176
167
|
], FoundationInboxBase.prototype, "templates", void 0);
|
|
@@ -93,7 +93,8 @@ export const FoundationInboxTemplate = html `
|
|
|
93
93
|
`)}
|
|
94
94
|
|
|
95
95
|
<!-- Alerts -->
|
|
96
|
-
${(
|
|
96
|
+
${(_) => alertsTab(InboxTab.AlertsNew)}
|
|
97
|
+
${(_) => alertsTab(InboxTab.AlertHistory)}
|
|
97
98
|
${when((x) => { var _a; return (_a = x.auth.currentUser) === null || _a === void 0 ? void 0 : _a.hasPermission(NotifyPermission.NotificationRuleView); }, html `
|
|
98
99
|
<!-- Rules -->
|
|
99
100
|
<zero-tab-panel
|
package/dist/esm/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export * from './components/foundation-inbox/inbox';
|
|
2
2
|
export * from './components/foundation-inbox/components/foundation-inbox-flyout/foundation-inbox-flyout';
|
|
3
|
+
export * from './components/foundation-inbox/components/foundation-inbox-counter/foundation-inbox-counter';
|
|
3
4
|
export * from './components/foundation-notification-dashboard';
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { Auth, Connect } from '@genesislcap/foundation-comms';
|
|
3
|
+
import { DI } from '@microsoft/fast-foundation';
|
|
4
|
+
import { logger } from '../utils';
|
|
5
|
+
class FoundationInboxServiceImpl {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.subscriptions = [];
|
|
8
|
+
this.store = {
|
|
9
|
+
items: [],
|
|
10
|
+
};
|
|
11
|
+
this.modifyAlert = (alert, details) => {
|
|
12
|
+
var _a;
|
|
13
|
+
return ((_a = alert.DETAILS) === null || _a === void 0 ? void 0 : _a.ROW_REF) === (details === null || details === void 0 ? void 0 : details.DETAILS.ROW_REF)
|
|
14
|
+
? Object.assign(Object.assign({}, alert), details) : alert;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
getStream() {
|
|
18
|
+
return this.connect.stream('ALL_NOTIFY_ALERT_RECORDS', (result) => {
|
|
19
|
+
this.sourceRef = result.SOURCE_REF;
|
|
20
|
+
if (!(result === null || result === void 0 ? void 0 : result.ROW)) {
|
|
21
|
+
this.store.items = [];
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
if (result.SEQUENCE_ID === 1) {
|
|
25
|
+
this.store.items = result.ROW;
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
const details = result === null || result === void 0 ? void 0 : result.ROW[0];
|
|
29
|
+
switch (details === null || details === void 0 ? void 0 : details.DETAILS.OPERATION) {
|
|
30
|
+
case 'INSERT':
|
|
31
|
+
this.store.items.push(details);
|
|
32
|
+
break;
|
|
33
|
+
case 'MODIFY':
|
|
34
|
+
this.store.items = this.store.items.map((alert) => this.modifyAlert(alert, details));
|
|
35
|
+
break;
|
|
36
|
+
case 'DELETE':
|
|
37
|
+
// Implement if there's a case that a NOTIFY_ALERT record is deleted
|
|
38
|
+
break;
|
|
39
|
+
default:
|
|
40
|
+
logger.error('Unexpected operation');
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
this.subscriptions.forEach((callback) => callback({ store: this.store }));
|
|
44
|
+
}, (response) => logger.error(response));
|
|
45
|
+
}
|
|
46
|
+
subscribe(callback) {
|
|
47
|
+
this.subscriptions.push(callback);
|
|
48
|
+
if (this.stream) {
|
|
49
|
+
callback({ store: this.store });
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
this.stream = this.getStream();
|
|
53
|
+
this.stream.subscribe();
|
|
54
|
+
}
|
|
55
|
+
unsubscribe(callback) {
|
|
56
|
+
const index = this.subscriptions.indexOf(callback);
|
|
57
|
+
if (index >= 0) {
|
|
58
|
+
this.subscriptions.splice(index, 1);
|
|
59
|
+
}
|
|
60
|
+
this.dataLogoff();
|
|
61
|
+
}
|
|
62
|
+
dataLogoff() {
|
|
63
|
+
if (this.sourceRef && this.auth.isLoggedIn) {
|
|
64
|
+
this.connect.dataLogoff(this.sourceRef);
|
|
65
|
+
}
|
|
66
|
+
this.stream = undefined;
|
|
67
|
+
this.store = { items: [] };
|
|
68
|
+
this.sourceRef = undefined;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
__decorate([
|
|
72
|
+
Connect
|
|
73
|
+
], FoundationInboxServiceImpl.prototype, "connect", void 0);
|
|
74
|
+
__decorate([
|
|
75
|
+
Auth
|
|
76
|
+
], FoundationInboxServiceImpl.prototype, "auth", void 0);
|
|
77
|
+
export const FoundationInboxService = DI.createInterface((x) => x.singleton(FoundationInboxServiceImpl));
|
|
@@ -5,8 +5,7 @@ class RuleServiceImpl {
|
|
|
5
5
|
getRules() {
|
|
6
6
|
return __awaiter(this, void 0, void 0, function* () {
|
|
7
7
|
const response = yield this.connect.request('REQ_NOTIFICATION_RULE', { REQUEST: true });
|
|
8
|
-
return;
|
|
9
|
-
response.REPLY;
|
|
8
|
+
return response.REPLY;
|
|
10
9
|
});
|
|
11
10
|
}
|
|
12
11
|
getRuleDetails(ruleId) {
|