@genesislcap/pbc-notify-ui 1.0.24 → 1.0.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dts/components/foundation-inbox/inbox-base/inbox-base.d.ts +4 -1
- package/dist/dts/components/foundation-inbox/inbox-base/inbox-base.d.ts.map +1 -1
- package/dist/dts/components/foundation-inbox/inbox.styles.d.ts.map +1 -1
- package/dist/dts/components/foundation-inbox/inbox.template.d.ts +4 -3
- package/dist/dts/components/foundation-inbox/inbox.template.d.ts.map +1 -1
- package/dist/dts/components/foundation-inbox/inbox.types.d.ts +6 -0
- package/dist/dts/components/foundation-inbox/inbox.types.d.ts.map +1 -1
- package/dist/dts/components/foundation-notification-dashboard/components/rules/rule-dialog/rule-dialog.d.ts +2 -1
- package/dist/dts/components/foundation-notification-dashboard/components/rules/rule-dialog/rule-dialog.d.ts.map +1 -1
- package/dist/dts/components/foundation-notification-dashboard/components/rules/rule-dialog/rule-dialog.template.d.ts.map +1 -1
- package/dist/dts/components/foundation-notification-dashboard/components/rules/rule-dialog/rule-dialog.types.d.ts +7 -0
- package/dist/dts/components/foundation-notification-dashboard/components/rules/rule-dialog/rule-dialog.types.d.ts.map +1 -1
- package/dist/dts/components/foundation-notification-dashboard/components/templates/template-dialog/template-dialog.d.ts +2 -0
- package/dist/dts/components/foundation-notification-dashboard/components/templates/template-dialog/template-dialog.d.ts.map +1 -1
- package/dist/dts/components/foundation-notification-dashboard/components/templates/template-dialog/template-dialog.styles.d.ts.map +1 -1
- package/dist/dts/components/foundation-notification-dashboard/components/templates/template-dialog/template-dialog.template.d.ts.map +1 -1
- package/dist/dts/components/foundation-notification-dashboard/components/templates/template-dialog/template-dialog.types.d.ts +2 -1
- package/dist/dts/components/foundation-notification-dashboard/components/templates/template-dialog/template-dialog.types.d.ts.map +1 -1
- package/dist/esm/components/foundation-inbox/inbox-base/inbox-base.js +24 -11
- package/dist/esm/components/foundation-inbox/inbox.styles.js +8 -0
- package/dist/esm/components/foundation-inbox/inbox.template.js +58 -42
- package/dist/esm/components/foundation-inbox/inbox.types.js +5 -0
- package/dist/esm/components/foundation-notification-dashboard/components/rules/rule-dialog/rule-dialog.js +10 -3
- package/dist/esm/components/foundation-notification-dashboard/components/rules/rule-dialog/rule-dialog.template.js +18 -0
- package/dist/esm/components/foundation-notification-dashboard/components/rules/rule-dialog/rule-dialog.types.js +7 -0
- package/dist/esm/components/foundation-notification-dashboard/components/templates/template-dialog/template-dialog.js +11 -3
- package/dist/esm/components/foundation-notification-dashboard/components/templates/template-dialog/template-dialog.styles.js +1 -0
- package/dist/esm/components/foundation-notification-dashboard/components/templates/template-dialog/template-dialog.template.js +18 -0
- package/dist/esm/services/alert.service.js +1 -1
- package/package.json +1 -1
|
@@ -12,7 +12,6 @@ export declare class FoundationInboxBase extends FASTElement {
|
|
|
12
12
|
alertService: AlertService;
|
|
13
13
|
private alerts;
|
|
14
14
|
alertsFilter: Alert[];
|
|
15
|
-
searchAlertLog: string;
|
|
16
15
|
ruleService: RuleService;
|
|
17
16
|
private rules;
|
|
18
17
|
rulesFilter: Rule[];
|
|
@@ -21,6 +20,7 @@ export declare class FoundationInboxBase extends FASTElement {
|
|
|
21
20
|
templatesFilter: RuleTemplate[];
|
|
22
21
|
searchSubscribe: string;
|
|
23
22
|
ruleTemplateDetails: NotificationRuleTemplateReply;
|
|
23
|
+
selectedTab: InboxTab;
|
|
24
24
|
tabs: Tabs;
|
|
25
25
|
connectedCallback(): Promise<void>;
|
|
26
26
|
open(): Promise<void>;
|
|
@@ -30,11 +30,14 @@ export declare class FoundationInboxBase extends FASTElement {
|
|
|
30
30
|
alertsChanged: () => Alert[];
|
|
31
31
|
rulesChanged: () => Rule[];
|
|
32
32
|
templatesChanged: () => RuleTemplate[];
|
|
33
|
+
searchAlertLog: string;
|
|
33
34
|
searchAlertLogChanged: () => void;
|
|
35
|
+
private filterAlerts;
|
|
34
36
|
searchSubscribeChanged: () => void;
|
|
35
37
|
editAlert(): void;
|
|
36
38
|
playPauseAlert(ruleClicked: Rule): Promise<void>;
|
|
37
39
|
deleteAlert(ruleClicked: Rule): Promise<void>;
|
|
38
40
|
openTemplateSubscription(ruleTemplate: any): Promise<void>;
|
|
41
|
+
dismissAlert(alertId: string): void;
|
|
39
42
|
}
|
|
40
43
|
//# 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,EAAW,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAc,MAAM,yBAAyB,CAAC;AAClE,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AAErE,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EACL,KAAK,EACL,6BAA6B,EAC7B,IAAI,EAEJ,YAAY,EACb,MAAM,gBAAgB,CAAC;AAExB,qBAAa,mBAAoB,SAAQ,WAAW;IAC5C,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;
|
|
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,IAAI,E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wBAAwB,CAAC,YAAY,EAAE,GAAG;IAehD,YAAY,CAAC,OAAO,EAAE,MAAM;CAG7B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inbox.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/foundation-inbox/inbox.styles.ts"],"names":[],"mappings":"AACA;;GAEG;AACH,eAAO,MAAM,qBAAqB,
|
|
1
|
+
{"version":3,"file":"inbox.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/foundation-inbox/inbox.styles.ts"],"names":[],"mappings":"AACA;;GAEG;AACH,eAAO,MAAM,qBAAqB,iDA0NjC,CAAC"}
|
|
@@ -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;
|
|
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,sEAiJnC,CAAC"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export interface Alert {
|
|
2
2
|
ALERT_ID: string;
|
|
3
|
+
ALERT_STATUS: AlertStatus;
|
|
4
|
+
CREATED_AT: number;
|
|
3
5
|
HEADER: string;
|
|
4
6
|
MESSAGE: string;
|
|
5
7
|
USER_NAME: string;
|
|
@@ -8,6 +10,10 @@ export interface Alert {
|
|
|
8
10
|
TABLE_ENTITY_ID: string;
|
|
9
11
|
TOPIC: string;
|
|
10
12
|
}
|
|
13
|
+
export declare enum AlertStatus {
|
|
14
|
+
NEW = "NEW",
|
|
15
|
+
DISMISSED = "DISMISSED"
|
|
16
|
+
}
|
|
11
17
|
export interface Rule {
|
|
12
18
|
ID: string;
|
|
13
19
|
NAME: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inbox.types.d.ts","sourceRoot":"","sources":["../../../../src/components/foundation-inbox/inbox.types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,KAAK;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,IAAI;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,uBAAuB,EAAE,MAAM,CAAC;IAChC,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,mBAAmB;IAClC,eAAe,MAAC;IAChB,WAAW,MAAC;IACZ,UAAU,MAAC;IACX,cAAc,MAAC;IACf,YAAY,MAAC;IACb,iBAAiB,MAAC;IAClB,UAAU,MAAC;CACZ;AAED,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,OAAO,CAAC;IACrB,uBAAuB,EAAE,MAAM,CAAC;IAChC,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,6BAA6B;IAC5C,eAAe,EAAE,MAAM,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,MAAM,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,uBAAuB,EAAE,MAAM,CAAC;IAChC,eAAe,EAAE;QACf,UAAU,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;KACxB,CAAC;IACF,mBAAmB,EAAE,MAAM,CAAC;IAC5B,iBAAiB,EAAE;QACjB,WAAW,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;KACzB,CAAC;IACF,UAAU,EAAE,GAAG,CAAC;CACjB;AAED,oBAAY,UAAU;IACpB,OAAO,YAAY;IACnB,QAAQ,aAAa;CACtB"}
|
|
1
|
+
{"version":3,"file":"inbox.types.d.ts","sourceRoot":"","sources":["../../../../src/components/foundation-inbox/inbox.types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,KAAK;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,WAAW,CAAC;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,oBAAY,WAAW;IACrB,GAAG,QAAQ;IACX,SAAS,cAAc;CACxB;AAED,MAAM,WAAW,IAAI;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;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AAO,YAAY;IACnB,QAAQ,aAAa;CACtB"}
|
|
@@ -4,7 +4,7 @@ import { NotifyService } from '../../../../../services/notify.service';
|
|
|
4
4
|
import { RuleService } from '../../../../../services/rule.service';
|
|
5
5
|
import { Field, SystemService } from '../../../../../services/system.service';
|
|
6
6
|
import { ConditionBuilderEntity } from './rule-condition-builder/rule-condition-builder.types';
|
|
7
|
-
import { RuleDialogMode, RuleDialogParams } from './rule-dialog.types';
|
|
7
|
+
import { RuleDialogMode, RuleDialogParams, UpdateType } from './rule-dialog.types';
|
|
8
8
|
export declare class RuleDialog extends FASTElement {
|
|
9
9
|
ruleService: RuleService;
|
|
10
10
|
systemService: SystemService;
|
|
@@ -19,6 +19,7 @@ export declare class RuleDialog extends FASTElement {
|
|
|
19
19
|
topics: string[];
|
|
20
20
|
resourceFields: Field[];
|
|
21
21
|
severity: string;
|
|
22
|
+
updateType: UpdateType[];
|
|
22
23
|
header: string;
|
|
23
24
|
message: string;
|
|
24
25
|
conditions: Array<ConditionBuilderEntity>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rule-dialog.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/foundation-notification-dashboard/components/rules/rule-dialog/rule-dialog.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAiB,WAAW,EAAc,MAAM,yBAAyB,CAAC;AACjF,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AACnE,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AAW9E,OAAO,EACL,sBAAsB,EAEvB,MAAM,uDAAuD,CAAC;AAG/D,OAAO,
|
|
1
|
+
{"version":3,"file":"rule-dialog.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/foundation-notification-dashboard/components/rules/rule-dialog/rule-dialog.ts"],"names":[],"mapp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AAY;IAIZ,aAAa,CAAC,eAAe,EAAE,sBAAsB;IAErD,eAAe,CAAC,gBAAgB,EAAE,sBAAsB;IASlD,eAAe;IAKrB,oBAAoB,IAAI,sBAAsB;CAS/C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rule-dialog.template.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/foundation-notification-dashboard/components/rules/rule-dialog/rule-dialog.template.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAqB,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"rule-dialog.template.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/foundation-notification-dashboard/components/rules/rule-dialog/rule-dialog.template.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAqB,MAAM,yBAAyB,CAAC;AAO1E,eAAO,MAAM,kBAAkB,EAAE,YA0HhC,CAAC"}
|
|
@@ -13,10 +13,17 @@ export type Rule = {
|
|
|
13
13
|
RULE_NAME: string;
|
|
14
14
|
RULE_DESCRIPTION: string;
|
|
15
15
|
RULE_TABLE: string;
|
|
16
|
+
TABLE_OPERATIONS: UpdateType[];
|
|
16
17
|
RULE_EXPRESSION?: any;
|
|
17
18
|
RAW_RULE_EXPRESSION?: string;
|
|
18
19
|
RESULT_EXPRESSION?: {
|
|
19
20
|
ASSIGNMENTS: Array<any>;
|
|
20
21
|
};
|
|
21
22
|
};
|
|
23
|
+
export declare enum UpdateType {
|
|
24
|
+
INSERT = "INSERT",
|
|
25
|
+
MODIFY = "MODIFY",
|
|
26
|
+
DELETE = "DELETE"
|
|
27
|
+
}
|
|
28
|
+
export declare const defaultUpdateType: UpdateType[];
|
|
22
29
|
//# sourceMappingURL=rule-dialog.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rule-dialog.types.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/foundation-notification-dashboard/components/rules/rule-dialog/rule-dialog.types.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc;;;CAGjB,CAAC;AAEX,MAAM,MAAM,gBAAgB,GACxB;IACE,IAAI,EAAE,OAAO,cAAc,CAAC,MAAM,CAAC;CACpC,GACD;IACE,IAAI,EAAE,OAAO,cAAc,CAAC,IAAI,CAAC;IACjC,IAAI,EAAE,IAAI,CAAC;CACZ,CAAC;AAEN,MAAM,MAAM,IAAI,GAAG;IACjB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,MAAM,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,GAAG,CAAC;IACtB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,iBAAiB,CAAC,EAAE;QAClB,WAAW,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;KACzB,CAAC;CACH,CAAC"}
|
|
1
|
+
{"version":3,"file":"rule-dialog.types.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/foundation-notification-dashboard/components/rules/rule-dialog/rule-dialog.types.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc;;;CAGjB,CAAC;AAEX,MAAM,MAAM,gBAAgB,GACxB;IACE,IAAI,EAAE,OAAO,cAAc,CAAC,MAAM,CAAC;CACpC,GACD;IACE,IAAI,EAAE,OAAO,cAAc,CAAC,IAAI,CAAC;IACjC,IAAI,EAAE,IAAI,CAAC;CACZ,CAAC;AAEN,MAAM,MAAM,IAAI,GAAG;IACjB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,MAAM,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,gBAAgB,EAAE,UAAU,EAAE,CAAC;IAC/B,eAAe,CAAC,EAAE,GAAG,CAAC;IACtB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,iBAAiB,CAAC,EAAE;QAClB,WAAW,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;KACzB,CAAC;CACH,CAAC;AAEF,oBAAY,UAAU;IACpB,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,MAAM,WAAW;CAClB;AAED,eAAO,MAAM,iBAAiB,cAAsB,CAAC"}
|
|
@@ -3,6 +3,7 @@ import { FASTElement } from '@microsoft/fast-element';
|
|
|
3
3
|
import { NotifyService } from '../../../../../services/notify.service';
|
|
4
4
|
import { Field, SystemService } from '../../../../../services/system.service';
|
|
5
5
|
import { TemplateService } from '../../../../../services/template.service';
|
|
6
|
+
import { UpdateType } from '../../rules/rule-dialog/rule-dialog.types';
|
|
6
7
|
import { ConditionBuilderEntity, ParameterBuilderEntity, TemplateDialogMode } from './template-dialog.types';
|
|
7
8
|
export declare class TemplateDialog extends FASTElement {
|
|
8
9
|
templateService: TemplateService;
|
|
@@ -16,6 +17,7 @@ export declare class TemplateDialog extends FASTElement {
|
|
|
16
17
|
resource: string;
|
|
17
18
|
topic: any;
|
|
18
19
|
severity: any;
|
|
20
|
+
updateType: UpdateType[];
|
|
19
21
|
parameters: Array<ParameterBuilderEntity>;
|
|
20
22
|
conditions: Array<ConditionBuilderEntity>;
|
|
21
23
|
resources: Array<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"template-dialog.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/foundation-notification-dashboard/components/templates/template-dialog/template-dialog.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAiB,WAAW,EAAc,MAAM,yBAAyB,CAAC;AACjF,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AACvE,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;
|
|
1
|
+
{"version":3,"file":"template-dialog.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/foundation-not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AI,MAAM,CAGhC;IAED,MAAM;IAyCN,gBAAgB,CAAC,QAAQ,KAAA;IAoBzB,KAAK;IAmBL,YAAY;IAIZ,aAAa,CAAC,eAAe,EAAE,sBAAsB;IAErD,eAAe,CAAC,gBAAgB,EAAE,sBAAsB;IAUxD,YAAY;IAIZ,aAAa,CAAC,eAAe,EAAE,sBAAsB;IAIrD,eAAe,CAAC,gBAAgB,EAAE,sBAAsB;IAWlD,eAAe;CAItB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"template-dialog.styles.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/foundation-notification-dashboard/components/templates/template-dialog/template-dialog.styles.ts"],"names":[],"mappings":"AA6BA,eAAO,MAAM,oBAAoB,
|
|
1
|
+
{"version":3,"file":"template-dialog.styles.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/foundation-notification-dashboard/components/templates/template-dialog/template-dialog.styles.ts"],"names":[],"mappings":"AA6BA,eAAO,MAAM,oBAAoB,iDAuEhC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"template-dialog.template.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/foundation-notification-dashboard/components/templates/template-dialog/template-dialog.template.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAqB,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"template-dialog.template.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/foundation-notification-dashboard/components/templates/template-dialog/template-dialog.template.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAqB,MAAM,yBAAyB,CAAC;AAO1E,eAAO,MAAM,sBAAsB,EAAE,YA6IpC,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { UpdateType } from '../../rules/rule-dialog/rule-dialog.types';
|
|
1
2
|
export declare const TemplateDialogMode: {
|
|
2
3
|
readonly CREATE: "create";
|
|
3
4
|
readonly EDIT: "edit";
|
|
@@ -14,12 +15,12 @@ export type Template = {
|
|
|
14
15
|
RULE_DESCRIPTION: string;
|
|
15
16
|
RULE_TABLE: string;
|
|
16
17
|
RULE_EXPRESSION?: any;
|
|
18
|
+
TABLE_OPERATIONS: UpdateType[];
|
|
17
19
|
RAW_RULE_EXPRESSION?: string;
|
|
18
20
|
RESULT_EXPRESSION?: {
|
|
19
21
|
ASSIGNMENTS: Array<any>;
|
|
20
22
|
};
|
|
21
23
|
PARAMETER_DETAILS: any;
|
|
22
|
-
RULE_EXECUTION_STRATEGY: string;
|
|
23
24
|
};
|
|
24
25
|
export type ConditionBuilderEntity = {
|
|
25
26
|
ID: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"template-dialog.types.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/foundation-notification-dashboard/components/templates/template-dialog/template-dialog.types.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB;;;CAGrB,CAAC;AAEX,MAAM,MAAM,oBAAoB,GAC5B;IACE,IAAI,EAAE,OAAO,kBAAkB,CAAC,MAAM,CAAC;CACxC,GACD;IACE,IAAI,EAAE,OAAO,kBAAkB,CAAC,IAAI,CAAC;IACrC,IAAI,EAAE,QAAQ,CAAC;CAChB,CAAC;AAEN,MAAM,MAAM,QAAQ,GAAG;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,MAAM,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,GAAG,CAAC;IACtB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,iBAAiB,CAAC,EAAE;QAClB,WAAW,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;KACzB,CAAC;IACF,iBAAiB,EAAE,GAAG,CAAC;
|
|
1
|
+
{"version":3,"file":"template-dialog.types.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/foundation-notification-dashboard/components/templates/template-dialog/template-dialog.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,2CAA2C,CAAC;AAEvE,eAAO,MAAM,kBAAkB;;;CAGrB,CAAC;AAEX,MAAM,MAAM,oBAAoB,GAC5B;IACE,IAAI,EAAE,OAAO,kBAAkB,CAAC,MAAM,CAAC;CACxC,GACD;IACE,IAAI,EAAE,OAAO,kBAAkB,CAAC,IAAI,CAAC;IACrC,IAAI,EAAE,QAAQ,CAAC;CAChB,CAAC;AAEN,MAAM,MAAM,QAAQ,GAAG;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,MAAM,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,GAAG,CAAC;IACtB,gBAAgB,EAAE,UAAU,EAAE,CAAC;IAC/B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,iBAAiB,CAAC,EAAE;QAClB,WAAW,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;KACzB,CAAC;IACF,iBAAiB,EAAE,GAAG,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,GAAG,CAAC;IAChB,gBAAgB,EAAE,MAAM,CAAC;IACzB,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC"}
|
|
@@ -13,24 +13,21 @@ export class FoundationInboxBase extends FASTElement {
|
|
|
13
13
|
this.ready = false;
|
|
14
14
|
this.alerts = [];
|
|
15
15
|
this.alertsFilter = [];
|
|
16
|
-
this.searchAlertLog = '';
|
|
17
16
|
this.rules = [];
|
|
18
17
|
this.rulesFilter = [];
|
|
19
18
|
this.templates = [];
|
|
20
19
|
this.templatesFilter = [];
|
|
21
20
|
this.searchSubscribe = '';
|
|
22
21
|
this.ruleTemplateDetails = null;
|
|
22
|
+
this.selectedTab = InboxTab.AlertsNew;
|
|
23
23
|
// #endregion
|
|
24
24
|
// #region Changed Events
|
|
25
25
|
this.alertsChanged = () => (this.alertsFilter = this.alerts);
|
|
26
26
|
this.rulesChanged = () => (this.rulesFilter = this.rules);
|
|
27
27
|
this.templatesChanged = () => (this.templatesFilter = this.templates);
|
|
28
|
+
this.searchAlertLog = '';
|
|
28
29
|
this.searchAlertLogChanged = () => {
|
|
29
|
-
|
|
30
|
-
this.alertsFilter = this.alerts;
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
this.alertsFilter = this.alerts.filter((item) => item.HEADER.toLowerCase().startsWith(this.searchAlertLog.toLowerCase()));
|
|
30
|
+
this.filterAlerts();
|
|
34
31
|
};
|
|
35
32
|
this.searchSubscribeChanged = () => {
|
|
36
33
|
if (!this.searchSubscribe) {
|
|
@@ -39,7 +36,6 @@ export class FoundationInboxBase extends FASTElement {
|
|
|
39
36
|
}
|
|
40
37
|
this.templatesFilter = this.templates.filter((item) => item.NAME.toLowerCase().startsWith(this.searchSubscribe.toLowerCase()));
|
|
41
38
|
};
|
|
42
|
-
// #endregion
|
|
43
39
|
}
|
|
44
40
|
connectedCallback() {
|
|
45
41
|
const _super = Object.create(null, {
|
|
@@ -55,6 +51,7 @@ export class FoundationInboxBase extends FASTElement {
|
|
|
55
51
|
return;
|
|
56
52
|
}
|
|
57
53
|
this.alerts = updateArray((_a = streamMessage.ROW) !== null && _a !== void 0 ? _a : null, this.alerts);
|
|
54
|
+
this.filterAlerts();
|
|
58
55
|
},
|
|
59
56
|
error: (error) => {
|
|
60
57
|
logger.error(error);
|
|
@@ -78,9 +75,12 @@ export class FoundationInboxBase extends FASTElement {
|
|
|
78
75
|
}
|
|
79
76
|
inboxTabChanged(inboxTab) {
|
|
80
77
|
return __awaiter(this, void 0, void 0, function* () {
|
|
78
|
+
this.selectedTab = inboxTab;
|
|
81
79
|
this.ruleTemplateDetails = null;
|
|
82
80
|
switch (inboxTab) {
|
|
83
|
-
case InboxTab.
|
|
81
|
+
case InboxTab.AlertsNew:
|
|
82
|
+
case InboxTab.AlertHistory:
|
|
83
|
+
this.filterAlerts();
|
|
84
84
|
break;
|
|
85
85
|
case InboxTab.MyAlerts:
|
|
86
86
|
this.rules = yield this.ruleService.getRules();
|
|
@@ -94,6 +94,12 @@ export class FoundationInboxBase extends FASTElement {
|
|
|
94
94
|
}
|
|
95
95
|
});
|
|
96
96
|
}
|
|
97
|
+
filterAlerts() {
|
|
98
|
+
this.alertsFilter = this.alerts.filter((alert) => (!this.searchAlertLog ||
|
|
99
|
+
alert.HEADER.toLowerCase().startsWith(this.searchAlertLog.toLowerCase())) &&
|
|
100
|
+
((this.selectedTab === InboxTab.AlertsNew && alert.ALERT_STATUS === 'NEW') ||
|
|
101
|
+
(this.selectedTab === InboxTab.AlertHistory && alert.ALERT_STATUS !== 'NEW')));
|
|
102
|
+
}
|
|
97
103
|
// #endregion
|
|
98
104
|
// #region My Alerts
|
|
99
105
|
// TODO:
|
|
@@ -133,6 +139,10 @@ export class FoundationInboxBase extends FASTElement {
|
|
|
133
139
|
this.ruleTemplateDetails = yield this.ruleTemplateService.getRuleTemplateDetails(ruleTemplate.ID);
|
|
134
140
|
});
|
|
135
141
|
}
|
|
142
|
+
// #endregion
|
|
143
|
+
dismissAlert(alertId) {
|
|
144
|
+
this.alertService.dismissNotifyAlert(alertId);
|
|
145
|
+
}
|
|
136
146
|
}
|
|
137
147
|
__decorate([
|
|
138
148
|
Auth
|
|
@@ -149,9 +159,6 @@ __decorate([
|
|
|
149
159
|
__decorate([
|
|
150
160
|
observable
|
|
151
161
|
], FoundationInboxBase.prototype, "alertsFilter", void 0);
|
|
152
|
-
__decorate([
|
|
153
|
-
observable
|
|
154
|
-
], FoundationInboxBase.prototype, "searchAlertLog", void 0);
|
|
155
162
|
__decorate([
|
|
156
163
|
RuleService
|
|
157
164
|
], FoundationInboxBase.prototype, "ruleService", void 0);
|
|
@@ -176,3 +183,9 @@ __decorate([
|
|
|
176
183
|
__decorate([
|
|
177
184
|
observable
|
|
178
185
|
], FoundationInboxBase.prototype, "ruleTemplateDetails", void 0);
|
|
186
|
+
__decorate([
|
|
187
|
+
observable
|
|
188
|
+
], FoundationInboxBase.prototype, "selectedTab", void 0);
|
|
189
|
+
__decorate([
|
|
190
|
+
observable
|
|
191
|
+
], FoundationInboxBase.prototype, "searchAlertLog", void 0);
|
|
@@ -82,6 +82,7 @@ export const FoundationInboxStyles = css `
|
|
|
82
82
|
flex: 1;
|
|
83
83
|
min-height: 0;
|
|
84
84
|
display: flex;
|
|
85
|
+
height: calc(100% - 54px);
|
|
85
86
|
}
|
|
86
87
|
|
|
87
88
|
/* Alert Log */
|
|
@@ -123,6 +124,7 @@ export const FoundationInboxStyles = css `
|
|
|
123
124
|
|
|
124
125
|
.toast-content {
|
|
125
126
|
display: flex;
|
|
127
|
+
position: relative;
|
|
126
128
|
flex-direction: column;
|
|
127
129
|
width: 100%;
|
|
128
130
|
margin: calc(var(--design-unit) * 2px) calc(var(--design-unit) * 0px)
|
|
@@ -212,4 +214,10 @@ export const FoundationInboxStyles = css `
|
|
|
212
214
|
.rule-action-delete {
|
|
213
215
|
cursor: pointer;
|
|
214
216
|
}
|
|
217
|
+
|
|
218
|
+
.close-icon {
|
|
219
|
+
position: absolute;
|
|
220
|
+
right: calc(var(--design-unit) * 2px);
|
|
221
|
+
cursor: pointer;
|
|
222
|
+
}
|
|
215
223
|
`;
|
|
@@ -1,26 +1,75 @@
|
|
|
1
1
|
import { sync } from '@genesislcap/foundation-utils';
|
|
2
2
|
import { html, ref, repeat, when } from '@microsoft/fast-element';
|
|
3
3
|
import { NotifyPermission } from '../../utils/notifyPermissions';
|
|
4
|
+
import { AlertStatus } from './inbox.types';
|
|
4
5
|
import { getFormattedDate, getIcon, getSeverityColor, getStatus } from './inbox.utils';
|
|
5
6
|
export var InboxTab;
|
|
6
7
|
(function (InboxTab) {
|
|
7
|
-
InboxTab[InboxTab["
|
|
8
|
-
InboxTab[InboxTab["
|
|
9
|
-
InboxTab[InboxTab["
|
|
8
|
+
InboxTab[InboxTab["AlertsNew"] = 0] = "AlertsNew";
|
|
9
|
+
InboxTab[InboxTab["AlertHistory"] = 1] = "AlertHistory";
|
|
10
|
+
InboxTab[InboxTab["MyAlerts"] = 2] = "MyAlerts";
|
|
11
|
+
InboxTab[InboxTab["Subscribe"] = 3] = "Subscribe";
|
|
10
12
|
})(InboxTab || (InboxTab = {}));
|
|
13
|
+
const alertsTab = (tab) => html `
|
|
14
|
+
<zero-tab-panel
|
|
15
|
+
slot="alert-log-tab"
|
|
16
|
+
class="alert-log-tab-panel"
|
|
17
|
+
id=${tab}
|
|
18
|
+
style=${(x) => x.checkActiveTab(tab)}
|
|
19
|
+
>
|
|
20
|
+
<div class="search">
|
|
21
|
+
<zero-text-field
|
|
22
|
+
class="search-input"
|
|
23
|
+
:value=${sync((x) => x.searchAlertLog)}
|
|
24
|
+
placeholder="Search Alerts..."
|
|
25
|
+
autocomplete="off"
|
|
26
|
+
></zero-text-field>
|
|
27
|
+
</div>
|
|
28
|
+
<div class="alert-log-tab-content">
|
|
29
|
+
${repeat((x) => x.alertsFilter, html `
|
|
30
|
+
<div class="toast" id=${(x) => x.ALERT_ID}>
|
|
31
|
+
<div
|
|
32
|
+
class="toast-severity"
|
|
33
|
+
style="background-color: ${(x) => getSeverityColor(x.NOTIFY_SEVERITY)}"
|
|
34
|
+
></div>
|
|
35
|
+
<div class="toast-content">
|
|
36
|
+
${when((x) => x.ALERT_STATUS === AlertStatus.NEW, html `
|
|
37
|
+
<div class="close-icon" @click=${(x, c) => c.parent.dismissAlert(x.ALERT_ID)}>
|
|
38
|
+
<zero-icon name="times"></zero-icon>
|
|
39
|
+
</div>
|
|
40
|
+
`)}
|
|
41
|
+
<span class="toast-header">${(x) => x.HEADER}</span>
|
|
42
|
+
<span class="toast-message">${(x) => x.MESSAGE}</span>
|
|
43
|
+
<div class="toast-bottom" slot="bottom">
|
|
44
|
+
<span class="toast-date" slot="date">${(x) => getFormattedDate(x.CREATED_AT)}</span>
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
|
48
|
+
`)}
|
|
49
|
+
</div>
|
|
50
|
+
</zero-tab-panel>
|
|
51
|
+
`;
|
|
11
52
|
/**
|
|
12
53
|
* @public
|
|
13
54
|
*/
|
|
14
55
|
export const FoundationInboxTemplate = html `
|
|
15
56
|
<div class="inbox-content">
|
|
16
|
-
<zero-tabs ${ref('tabs')} appearance="secondary" activeid=${(x) => InboxTab.
|
|
57
|
+
<zero-tabs ${ref('tabs')} appearance="secondary" activeid=${(x) => InboxTab.AlertsNew}>
|
|
17
58
|
<zero-tab
|
|
18
59
|
slot="alert-log-tab"
|
|
19
|
-
id=${InboxTab.
|
|
20
|
-
@click=${(x) => x.inboxTabChanged(InboxTab.
|
|
60
|
+
id=${InboxTab.AlertsNew}
|
|
61
|
+
@click=${(x) => x.inboxTabChanged(InboxTab.AlertsNew)}
|
|
21
62
|
appearance="secondary"
|
|
22
63
|
>
|
|
23
|
-
|
|
64
|
+
Alerts
|
|
65
|
+
</zero-tab>
|
|
66
|
+
<zero-tab
|
|
67
|
+
slot="alert-log-tab"
|
|
68
|
+
id=${InboxTab.AlertHistory}
|
|
69
|
+
@click=${(x) => x.inboxTabChanged(InboxTab.AlertHistory)}
|
|
70
|
+
appearance="secondary"
|
|
71
|
+
>
|
|
72
|
+
Alert History
|
|
24
73
|
</zero-tab>
|
|
25
74
|
${when((x) => { var _a; return (_a = x.auth.currentUser) === null || _a === void 0 ? void 0 : _a.hasPermission(NotifyPermission.NotificationRuleView); }, html `
|
|
26
75
|
<zero-tab
|
|
@@ -29,7 +78,7 @@ export const FoundationInboxTemplate = html `
|
|
|
29
78
|
@click=${(x) => x.inboxTabChanged(InboxTab.MyAlerts)}
|
|
30
79
|
appearance="secondary"
|
|
31
80
|
>
|
|
32
|
-
|
|
81
|
+
Subscriptions
|
|
33
82
|
</zero-tab>
|
|
34
83
|
`)}
|
|
35
84
|
${when((x) => { var _a; return (_a = x.auth.currentUser) === null || _a === void 0 ? void 0 : _a.hasPermission(NotifyPermission.NotificationRuleTemplateView); }, html `
|
|
@@ -44,40 +93,7 @@ export const FoundationInboxTemplate = html `
|
|
|
44
93
|
`)}
|
|
45
94
|
|
|
46
95
|
<!-- Alerts -->
|
|
47
|
-
|
|
48
|
-
slot="alert-log-tab"
|
|
49
|
-
class="alert-log-tab-panel"
|
|
50
|
-
id=${InboxTab.AlertLog}
|
|
51
|
-
style=${(x) => x.checkActiveTab(InboxTab.AlertLog)}
|
|
52
|
-
>
|
|
53
|
-
<div class="search">
|
|
54
|
-
<zero-text-field
|
|
55
|
-
class="search-input"
|
|
56
|
-
:value=${sync((x) => x.searchAlertLog)}
|
|
57
|
-
placeholder="Search Alerts..."
|
|
58
|
-
autocomplete="off"
|
|
59
|
-
></zero-text-field>
|
|
60
|
-
</div>
|
|
61
|
-
<div class="alert-log-tab-content">
|
|
62
|
-
${repeat((x) => x.alertsFilter, html `
|
|
63
|
-
<div class="toast" id=${(x) => x.ALERT_ID}>
|
|
64
|
-
<div
|
|
65
|
-
class="toast-severity"
|
|
66
|
-
style="background-color: ${(x) => getSeverityColor(x.NOTIFY_SEVERITY)}"
|
|
67
|
-
></div>
|
|
68
|
-
<div class="toast-content">
|
|
69
|
-
<span class="toast-header">${(x) => x.HEADER}</span>
|
|
70
|
-
<span class="toast-message">${(x) => x.MESSAGE}</span>
|
|
71
|
-
<div class="toast-bottom" slot="bottom">
|
|
72
|
-
<span class="toast-date" slot="date">
|
|
73
|
-
${(x) => getFormattedDate(x.CREATED_AT)}
|
|
74
|
-
</span>
|
|
75
|
-
</div>
|
|
76
|
-
</div>
|
|
77
|
-
</div>
|
|
78
|
-
`)}
|
|
79
|
-
</div>
|
|
80
|
-
</zero-tab-panel>
|
|
96
|
+
${(x) => alertsTab(InboxTab.AlertsNew)} ${(x) => alertsTab(InboxTab.AlertHistory)}
|
|
81
97
|
${when((x) => { var _a; return (_a = x.auth.currentUser) === null || _a === void 0 ? void 0 : _a.hasPermission(NotifyPermission.NotificationRuleView); }, html `
|
|
82
98
|
<!-- Rules -->
|
|
83
99
|
<zero-tab-panel
|
|
@@ -12,19 +12,20 @@ import { createAssignment, createConditions, getAssignmentValue, UUIDGenerator,
|
|
|
12
12
|
import { RIGHT_CRITERIA, } from './rule-condition-builder/rule-condition-builder.types';
|
|
13
13
|
import { RuleDialogStyles } from './rule-dialog.styles';
|
|
14
14
|
import { RuleDialogTemplate } from './rule-dialog.template';
|
|
15
|
-
import { RuleDialogMode } from './rule-dialog.types';
|
|
15
|
+
import { defaultUpdateType, RuleDialogMode, } from './rule-dialog.types';
|
|
16
16
|
let RuleDialog = class RuleDialog extends FASTElement {
|
|
17
17
|
constructor() {
|
|
18
18
|
super(...arguments);
|
|
19
19
|
this.resource = ''; // Tables + Views
|
|
20
20
|
this.topic = '';
|
|
21
21
|
this.severity = '';
|
|
22
|
+
this.updateType = defaultUpdateType;
|
|
22
23
|
this.conditions = [];
|
|
23
24
|
this.resources = [];
|
|
24
25
|
}
|
|
25
26
|
openDialog(params) {
|
|
26
|
-
var _a, _b, _c;
|
|
27
27
|
return __awaiter(this, void 0, void 0, function* () {
|
|
28
|
+
var _a, _b, _c;
|
|
28
29
|
this.resources = yield this.systemService.getResources();
|
|
29
30
|
this.topics = yield this.notifyService.getNotifyRouteTopics();
|
|
30
31
|
this.ruleDialogMode = params.mode;
|
|
@@ -35,6 +36,7 @@ let RuleDialog = class RuleDialog extends FASTElement {
|
|
|
35
36
|
this.resourceFields = yield this.systemService.getFields(this.resource);
|
|
36
37
|
this.topic = this.topics[0];
|
|
37
38
|
this.severity = SEVERITY_INFORMATION;
|
|
39
|
+
this.updateType = defaultUpdateType;
|
|
38
40
|
break;
|
|
39
41
|
case RuleDialogMode.EDIT:
|
|
40
42
|
const rule = params.data;
|
|
@@ -42,6 +44,7 @@ let RuleDialog = class RuleDialog extends FASTElement {
|
|
|
42
44
|
this.name = rule.RULE_NAME;
|
|
43
45
|
this.description = rule.RULE_DESCRIPTION;
|
|
44
46
|
this.resource = rule.RULE_TABLE;
|
|
47
|
+
this.updateType = rule.TABLE_OPERATIONS;
|
|
45
48
|
// Conditions
|
|
46
49
|
this.conditions = (_a = rule.RULE_EXPRESSION.CONDITIONS) === null || _a === void 0 ? void 0 : _a.map((condition) => {
|
|
47
50
|
var _a, _b;
|
|
@@ -72,7 +75,7 @@ let RuleDialog = class RuleDialog extends FASTElement {
|
|
|
72
75
|
return `${this.ruleDialogMode === RuleDialogMode.CREATE ? 'Create' : 'Edit'} Rule`;
|
|
73
76
|
}
|
|
74
77
|
submit() {
|
|
75
|
-
const rule = Object.assign(Object.assign({}, (this.ruleDialogMode === RuleDialogMode.EDIT && { DYNAMIC_RULE_ID: this.ruleId })), { RULE_NAME: this.name, RULE_DESCRIPTION: this.description, RULE_TABLE: this.resource, RULE_EXPRESSION: {
|
|
78
|
+
const rule = Object.assign(Object.assign({}, (this.ruleDialogMode === RuleDialogMode.EDIT && { DYNAMIC_RULE_ID: this.ruleId })), { RULE_NAME: this.name, RULE_DESCRIPTION: this.description, RULE_TABLE: this.resource, TABLE_OPERATIONS: this.updateType, RULE_EXPRESSION: {
|
|
76
79
|
CONDITIONS: createConditions(this.conditions, null),
|
|
77
80
|
}, RESULT_EXPRESSION: {
|
|
78
81
|
ASSIGNMENTS: [
|
|
@@ -119,6 +122,7 @@ let RuleDialog = class RuleDialog extends FASTElement {
|
|
|
119
122
|
this.topic = null;
|
|
120
123
|
this.topics = [];
|
|
121
124
|
this.severity = null;
|
|
125
|
+
this.updateType = defaultUpdateType;
|
|
122
126
|
this.conditions = [];
|
|
123
127
|
}
|
|
124
128
|
// #region Condition
|
|
@@ -182,6 +186,9 @@ __decorate([
|
|
|
182
186
|
__decorate([
|
|
183
187
|
observable
|
|
184
188
|
], RuleDialog.prototype, "severity", void 0);
|
|
189
|
+
__decorate([
|
|
190
|
+
observable
|
|
191
|
+
], RuleDialog.prototype, "updateType", void 0);
|
|
185
192
|
__decorate([
|
|
186
193
|
observable
|
|
187
194
|
], RuleDialog.prototype, "header", void 0);
|
|
@@ -2,6 +2,7 @@ import { sync } from '@genesislcap/foundation-utils';
|
|
|
2
2
|
import { html, ref, repeat } from '@microsoft/fast-element';
|
|
3
3
|
import { eventDetail } from '../../../../../utils/eventDetail';
|
|
4
4
|
import { ALL_SEVERITIES } from '../../../types/severity';
|
|
5
|
+
import { UpdateType } from './rule-dialog.types';
|
|
5
6
|
export const RuleDialogTemplate = html `
|
|
6
7
|
<zero-modal ${ref('dialog')} class="rule-dialog" :onCloseCallback=${(x) => () => x.close()}>
|
|
7
8
|
<div slot="top" class="rule-dialog-top">${(x) => x.ruleDialogTitle}</div>
|
|
@@ -56,6 +57,23 @@ export const RuleDialogTemplate = html `
|
|
|
56
57
|
></options-datasource>
|
|
57
58
|
</zero-select>
|
|
58
59
|
</div>
|
|
60
|
+
<div class="control">
|
|
61
|
+
<label>Update Type</label>
|
|
62
|
+
<zero-multiselect
|
|
63
|
+
:selectedOptions=${(x) => x.updateType}
|
|
64
|
+
@selectionChange=${(x, c) => {
|
|
65
|
+
x.updateType = c.event.detail;
|
|
66
|
+
}}
|
|
67
|
+
search="false"
|
|
68
|
+
all="false"
|
|
69
|
+
>
|
|
70
|
+
<multiselect-datasource
|
|
71
|
+
value-field="value"
|
|
72
|
+
label-field="value"
|
|
73
|
+
:data=${() => Object.values(UpdateType).map((value) => ({ value, label: value }))}
|
|
74
|
+
></multiselect-datasource>
|
|
75
|
+
</zero-multiselect>
|
|
76
|
+
</div>
|
|
59
77
|
</div>
|
|
60
78
|
|
|
61
79
|
<div class="content-row">
|
|
@@ -2,3 +2,10 @@ export const RuleDialogMode = {
|
|
|
2
2
|
CREATE: 'create',
|
|
3
3
|
EDIT: 'edit',
|
|
4
4
|
};
|
|
5
|
+
export var UpdateType;
|
|
6
|
+
(function (UpdateType) {
|
|
7
|
+
UpdateType["INSERT"] = "INSERT";
|
|
8
|
+
UpdateType["MODIFY"] = "MODIFY";
|
|
9
|
+
UpdateType["DELETE"] = "DELETE";
|
|
10
|
+
})(UpdateType || (UpdateType = {}));
|
|
11
|
+
export const defaultUpdateType = [UpdateType.INSERT];
|
|
@@ -8,6 +8,7 @@ import { humanize, logger } from '../../../../../utils';
|
|
|
8
8
|
import { EXPRESSION_TYPE_PLACEHOLDER } from '../../../types/expression-type';
|
|
9
9
|
import { RIGHT_CRITERIA_USER_ENTRY, RIGHT_CRITERIA_VALUE } from '../../../types/right-criteria';
|
|
10
10
|
import { SEVERITY_INFORMATION } from '../../../types/severity';
|
|
11
|
+
import { defaultUpdateType } from '../../rules/rule-dialog/rule-dialog.types';
|
|
11
12
|
import { TemplateDialogStyles as styles } from './template-dialog.styles';
|
|
12
13
|
import { TemplateDialogTemplate as template } from './template-dialog.template';
|
|
13
14
|
import { TemplateDialogMode, } from './template-dialog.types';
|
|
@@ -17,6 +18,7 @@ let TemplateDialog = class TemplateDialog extends FASTElement {
|
|
|
17
18
|
constructor() {
|
|
18
19
|
super(...arguments);
|
|
19
20
|
this.resource = ''; // Tables + Views
|
|
21
|
+
this.updateType = defaultUpdateType;
|
|
20
22
|
this.parameters = [];
|
|
21
23
|
this.conditions = [];
|
|
22
24
|
this.resources = [];
|
|
@@ -24,8 +26,8 @@ let TemplateDialog = class TemplateDialog extends FASTElement {
|
|
|
24
26
|
this.topics = [];
|
|
25
27
|
}
|
|
26
28
|
openDialog(params) {
|
|
27
|
-
var _a, _b;
|
|
28
29
|
return __awaiter(this, void 0, void 0, function* () {
|
|
30
|
+
var _a, _b;
|
|
29
31
|
this.resources = yield this.systemService.getResources(); // TODO: Tables + Views
|
|
30
32
|
this.topics = yield this.notifyService.getNotifyRouteTopics();
|
|
31
33
|
this.templateDialogMode = params.mode;
|
|
@@ -36,6 +38,7 @@ let TemplateDialog = class TemplateDialog extends FASTElement {
|
|
|
36
38
|
this.fields = yield this.systemService.getFields(this.resource);
|
|
37
39
|
this.topic = this.topics[0];
|
|
38
40
|
this.severity = SEVERITY_INFORMATION;
|
|
41
|
+
this.updateType = defaultUpdateType;
|
|
39
42
|
break;
|
|
40
43
|
case TemplateDialogMode.EDIT:
|
|
41
44
|
const ruleTemplate = params.data;
|
|
@@ -43,6 +46,7 @@ let TemplateDialog = class TemplateDialog extends FASTElement {
|
|
|
43
46
|
this.name = ruleTemplate.RULE_NAME;
|
|
44
47
|
this.description = ruleTemplate.RULE_DESCRIPTION;
|
|
45
48
|
this.resource = ruleTemplate.RULE_TABLE;
|
|
49
|
+
this.updateType = ruleTemplate.TABLE_OPERATIONS;
|
|
46
50
|
this.fields = yield this.systemService.getFields(this.resource);
|
|
47
51
|
// Parameters
|
|
48
52
|
this.parameters = Object.keys(ruleTemplate.PARAMETERS).map((key) => {
|
|
@@ -94,7 +98,7 @@ let TemplateDialog = class TemplateDialog extends FASTElement {
|
|
|
94
98
|
submit() {
|
|
95
99
|
const ruleTemplate = Object.assign(Object.assign({}, (this.templateDialogMode === TemplateDialogMode.EDIT && {
|
|
96
100
|
DYNAMIC_RULE_ID: this.templateId,
|
|
97
|
-
})), { RULE_NAME: this.name, RULE_DESCRIPTION: this.description, RULE_TABLE: this.resource, RULE_EXPRESSION: {
|
|
101
|
+
})), { RULE_NAME: this.name, RULE_DESCRIPTION: this.description, RULE_TABLE: this.resource, TABLE_OPERATIONS: this.updateType, RULE_EXPRESSION: {
|
|
98
102
|
CONDITIONS: createConditions(this.conditions, this.parameters),
|
|
99
103
|
}, RAW_RULE_EXPRESSION: null, RESULT_EXPRESSION: {
|
|
100
104
|
ASSIGNMENTS: [
|
|
@@ -103,7 +107,7 @@ let TemplateDialog = class TemplateDialog extends FASTElement {
|
|
|
103
107
|
createAssignment('BODY', this.message),
|
|
104
108
|
createAssignment('NOTIFY_SEVERITY', humanize(this.severity)),
|
|
105
109
|
],
|
|
106
|
-
}, PARAMETER_DETAILS: createParameterDetails(this.parameters)
|
|
110
|
+
}, PARAMETER_DETAILS: createParameterDetails(this.parameters) });
|
|
107
111
|
switch (this.templateDialogMode) {
|
|
108
112
|
case TemplateDialogMode.CREATE:
|
|
109
113
|
this.templateService
|
|
@@ -146,6 +150,7 @@ let TemplateDialog = class TemplateDialog extends FASTElement {
|
|
|
146
150
|
this.resource = null;
|
|
147
151
|
this.topic = null;
|
|
148
152
|
this.severity = null;
|
|
153
|
+
this.updateType = defaultUpdateType;
|
|
149
154
|
this.conditions = [];
|
|
150
155
|
this.parameters = [];
|
|
151
156
|
this.resources = [];
|
|
@@ -218,6 +223,9 @@ __decorate([
|
|
|
218
223
|
__decorate([
|
|
219
224
|
observable
|
|
220
225
|
], TemplateDialog.prototype, "severity", void 0);
|
|
226
|
+
__decorate([
|
|
227
|
+
observable
|
|
228
|
+
], TemplateDialog.prototype, "updateType", void 0);
|
|
221
229
|
__decorate([
|
|
222
230
|
observable
|
|
223
231
|
], TemplateDialog.prototype, "parameters", void 0);
|
|
@@ -2,6 +2,7 @@ import { sync } from '@genesislcap/foundation-utils';
|
|
|
2
2
|
import { html, ref, repeat } from '@microsoft/fast-element';
|
|
3
3
|
import { eventDetail } from '../../../../../utils/eventDetail';
|
|
4
4
|
import { ALL_SEVERITIES } from '../../../types/severity';
|
|
5
|
+
import { UpdateType } from '../../rules/rule-dialog/rule-dialog.types';
|
|
5
6
|
export const TemplateDialogTemplate = html `
|
|
6
7
|
<zero-modal ${ref('dialog')} class="template-dialog" :onCloseCallback=${(x) => () => x.close()}>
|
|
7
8
|
<div slot="top" class="template-dialog-top">${(x) => x.templateDialogTitle}</div>
|
|
@@ -49,6 +50,23 @@ export const TemplateDialogTemplate = html `
|
|
|
49
50
|
></options-datasource>
|
|
50
51
|
</zero-select>
|
|
51
52
|
</div>
|
|
53
|
+
<div class="control">
|
|
54
|
+
<label>Update Type</label>
|
|
55
|
+
<zero-multiselect
|
|
56
|
+
:selectedOptions=${(x) => x.updateType}
|
|
57
|
+
@selectionChange=${(x, c) => {
|
|
58
|
+
x.updateType = c.event.detail;
|
|
59
|
+
}}
|
|
60
|
+
search="false"
|
|
61
|
+
all="false"
|
|
62
|
+
>
|
|
63
|
+
<multiselect-datasource
|
|
64
|
+
value-field="value"
|
|
65
|
+
label-field="value"
|
|
66
|
+
:data=${() => Object.values(UpdateType).map((value) => ({ value, label: value }))}
|
|
67
|
+
></multiselect-datasource>
|
|
68
|
+
</zero-multiselect>
|
|
69
|
+
</div>
|
|
52
70
|
</div>
|
|
53
71
|
|
|
54
72
|
<div class="content-row">
|
|
@@ -3,7 +3,7 @@ import { Connect } from '@genesislcap/foundation-comms';
|
|
|
3
3
|
import { DI } from '@microsoft/fast-foundation';
|
|
4
4
|
class AlertServiceImpl {
|
|
5
5
|
getAlerts() {
|
|
6
|
-
return this.connect.stream('
|
|
6
|
+
return this.connect.stream('ALL_NOTIFY_ALERT_RECORDS', (streamMessage) => {
|
|
7
7
|
() => { };
|
|
8
8
|
}, (x) => { });
|
|
9
9
|
}
|