@genesislcap/pbc-notify-ui 1.0.21 → 1.0.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dts/components/foundation-inbox/components/foundation-inbox-flyout/foundation-inbox-flyout.d.ts +1 -1
- package/dist/dts/components/foundation-inbox/components/foundation-inbox-flyout/foundation-inbox-flyout.d.ts.map +1 -1
- package/dist/dts/components/foundation-inbox/components/inbox-subscription/rule-parameter/rule-parameter.template.d.ts.map +1 -1
- package/dist/dts/components/foundation-inbox/inbox-base/inbox-base.d.ts +40 -0
- package/dist/dts/components/foundation-inbox/inbox-base/inbox-base.d.ts.map +1 -0
- package/dist/dts/components/foundation-inbox/inbox.d.ts +1 -38
- package/dist/dts/components/foundation-inbox/inbox.d.ts.map +1 -1
- package/dist/dts/components/foundation-inbox/inbox.styles.d.ts +1 -1
- package/dist/dts/components/foundation-inbox/inbox.styles.d.ts.map +1 -1
- package/dist/dts/components/foundation-notification-dashboard/components/rules/rule-dialog/rule-dialog.styles.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/templates/template-dialog/condition-builder/condition-builder.template.d.ts.map +1 -1
- package/dist/dts/components/foundation-notification-dashboard/components/templates/template-dialog/parameter-builder/parameter-builder.template.d.ts.map +1 -1
- package/dist/dts/components/foundation-notification-dashboard/components/templates/template-dialog/template-dialog.d.ts +2 -2
- 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/esm/components/foundation-inbox/components/foundation-inbox-flyout/foundation-inbox-flyout.js +1 -1
- package/dist/esm/components/foundation-inbox/components/foundation-inbox-flyout/foundation-inbox-flyout.styles.js +2 -2
- package/dist/esm/components/foundation-inbox/components/inbox-subscription/rule-parameter/rule-parameter.template.js +0 -1
- package/dist/esm/components/foundation-inbox/inbox-base/inbox-base.js +185 -0
- package/dist/esm/components/foundation-inbox/inbox.js +7 -179
- package/dist/esm/components/foundation-inbox/inbox.styles.js +1 -1
- package/dist/esm/components/foundation-notification-dashboard/components/rules/rule-dialog/rule-dialog.styles.js +23 -14
- package/dist/esm/components/foundation-notification-dashboard/components/rules/rule-dialog/rule-dialog.template.js +8 -10
- package/dist/esm/components/foundation-notification-dashboard/components/templates/template-dialog/condition-builder/condition-builder.template.js +0 -4
- package/dist/esm/components/foundation-notification-dashboard/components/templates/template-dialog/parameter-builder/parameter-builder.template.js +0 -2
- package/dist/esm/components/foundation-notification-dashboard/components/templates/template-dialog/template-dialog.js +7 -7
- package/dist/esm/components/foundation-notification-dashboard/components/templates/template-dialog/template-dialog.styles.js +25 -16
- package/dist/esm/components/foundation-notification-dashboard/components/templates/template-dialog/template-dialog.template.js +8 -10
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Flyout } from '@genesislcap/foundation-zero';
|
|
2
|
-
import { FoundationInboxBase } from
|
|
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,
|
|
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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rule-parameter.template.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/foundation-inbox/components/inbox-subscription/rule-parameter/rule-parameter.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAsB,MAAM,yBAAyB,CAAC;AAO3E,eAAO,MAAM,qBAAqB,EAAE,
|
|
1
|
+
{"version":3,"file":"rule-parameter.template.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/foundation-inbox/components/inbox-subscription/rule-parameter/rule-parameter.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAsB,MAAM,yBAAyB,CAAC;AAO3E,eAAO,MAAM,qBAAqB,EAAE,YAqFnC,CAAC"}
|
|
@@ -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 {
|
|
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":"
|
|
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 +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,
|
|
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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rule-dialog.styles.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/foundation-notification-dashboard/components/rules/rule-dialog/rule-dialog.styles.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"rule-dialog.styles.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/foundation-notification-dashboard/components/rules/rule-dialog/rule-dialog.styles.ts"],"names":[],"mappings":"AA4BA,eAAO,MAAM,gBAAgB,iDAoE5B,CAAC"}
|
|
@@ -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;AAM1E,eAAO,MAAM,kBAAkB,EAAE,
|
|
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;AAM1E,eAAO,MAAM,kBAAkB,EAAE,YAyIhC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"condition-builder.template.d.ts","sourceRoot":"","sources":["../../../../../../../../src/components/foundation-notification-dashboard/components/templates/template-dialog/condition-builder/condition-builder.template.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAsB,MAAM,yBAAyB,CAAC;AAM3E,eAAO,MAAM,wBAAwB,EAAE,
|
|
1
|
+
{"version":3,"file":"condition-builder.template.d.ts","sourceRoot":"","sources":["../../../../../../../../src/components/foundation-notification-dashboard/components/templates/template-dialog/condition-builder/condition-builder.template.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAsB,MAAM,yBAAyB,CAAC;AAM3E,eAAO,MAAM,wBAAwB,EAAE,YAgEtC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parameter-builder.template.d.ts","sourceRoot":"","sources":["../../../../../../../../src/components/foundation-notification-dashboard/components/templates/template-dialog/parameter-builder/parameter-builder.template.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAA2B,MAAM,yBAAyB,CAAC;AAMhF,eAAO,MAAM,wBAAwB,EAAE,
|
|
1
|
+
{"version":3,"file":"parameter-builder.template.d.ts","sourceRoot":"","sources":["../../../../../../../../src/components/foundation-notification-dashboard/components/templates/template-dialog/parameter-builder/parameter-builder.template.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAA2B,MAAM,yBAAyB,CAAC;AAMhF,eAAO,MAAM,wBAAwB,EAAE,YA8FtC,CAAC"}
|
|
@@ -5,10 +5,10 @@ import { Field, SystemService } from '../../../../../services/system.service';
|
|
|
5
5
|
import { TemplateService } from '../../../../../services/template.service';
|
|
6
6
|
import { ConditionBuilderEntity, ParameterBuilderEntity, TemplateDialogMode } from './template-dialog.types';
|
|
7
7
|
export declare class TemplateDialog extends FASTElement {
|
|
8
|
-
|
|
8
|
+
templateService: TemplateService;
|
|
9
9
|
systemService: SystemService;
|
|
10
10
|
notifyService: NotifyService;
|
|
11
|
-
|
|
11
|
+
templateId: string;
|
|
12
12
|
name: string;
|
|
13
13
|
description: string;
|
|
14
14
|
header: any;
|
|
@@ -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;AAO3E,OAAO,EAAE,sBAAsB,EAAE,sBAAsB,EAAY,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAKvH,qBAKa,cAAe,SAAQ,WAAW;IAE5B,
|
|
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;AAO3E,OAAO,EAAE,sBAAsB,EAAE,sBAAsB,EAAY,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAKvH,qBAKa,cAAe,SAAQ,WAAW;IAE5B,eAAe,EAAE,eAAe,CAAC;IACnC,aAAa,EAAE,aAAa,CAAC;IAC7B,aAAa,EAAE,aAAa,CAAC;IAEhC,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,MAAC;IACP,OAAO,MAAC;IACR,QAAQ,EAAE,MAAM,CAAM;IACtB,KAAK,MAAC;IACN,QAAQ,MAAC;IAET,UAAU,EAAE,KAAK,CAAC,sBAAsB,CAAC,CAAM;IAC/C,UAAU,EAAE,KAAK,CAAC,sBAAsB,CAAC,CAAM;IAE/C,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,CAAM;IAC9B,MAAM,EAAE,KAAK,CAAC,KAAK,CAAC,CAAM;IAC1B,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAM;IAE3B,kBAAkB,EAAE,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,OAAO,kBAAkB,CAAC,CAAC;IAE7F,MAAM,EAAE,MAAM,CAAC;IAEF,UAAU,CAAC,MAAM,EAAE,GAAG;IAmEnC,IAAI,mBAAmB,IAAI,MAAM,CAKhC;IAED,MAAM;IAuCN,gBAAgB,CAAC,QAAQ,KAAA;IAoBzB,KAAK;IAkBL,YAAY;IAIZ,aAAa,CAAC,eAAe,EAAE,sBAAsB;IAGrD,eAAe,CAAC,gBAAgB,EAAE,sBAAsB;IAYxD,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":"AAEA,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":"AAEA,OAAO,EAAE,YAAY,EAAqB,MAAM,yBAAyB,CAAC;AAK1E,eAAO,MAAM,sBAAsB,EAAE,YAkKpC,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
|
|
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 {
|
|
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
|
-
${
|
|
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 {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
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 };
|
|
@@ -1,31 +1,30 @@
|
|
|
1
1
|
import { css } from '@microsoft/fast-element';
|
|
2
2
|
const modalWidthPx = 940;
|
|
3
|
-
const
|
|
3
|
+
const top = css `
|
|
4
4
|
zero-modal::part(top) {
|
|
5
5
|
padding: calc(var(--design-unit) * 4px);
|
|
6
6
|
border-bottom: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-divider-rest);
|
|
7
7
|
margin: 0px;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
.rule-dialog-
|
|
10
|
+
.rule-dialog-top {
|
|
11
11
|
font-weight: bold;
|
|
12
12
|
align-self: center;
|
|
13
13
|
}
|
|
14
14
|
`;
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
const bottom = css `
|
|
16
|
+
zero-modal::part(bottom) {
|
|
17
|
+
padding: calc(var(--design-unit) * 4px);
|
|
18
|
+
border-top: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-divider-rest);;
|
|
19
|
+
margin: 0px;
|
|
19
20
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
margin-left: auto;
|
|
23
|
-
margin-bottom: 0px;
|
|
21
|
+
.rule-dialog-bottom {
|
|
22
|
+
display: flex;
|
|
24
23
|
}
|
|
25
24
|
`;
|
|
26
25
|
export const RuleDialogStyles = css `
|
|
27
|
-
${
|
|
28
|
-
${
|
|
26
|
+
${top}
|
|
27
|
+
${bottom}
|
|
29
28
|
|
|
30
29
|
zero-modal::part(dialog) {
|
|
31
30
|
padding: 0;
|
|
@@ -39,8 +38,8 @@ export const RuleDialogStyles = css `
|
|
|
39
38
|
width: ${String(modalWidthPx)}px;
|
|
40
39
|
gap: calc(var(--design-unit) * 3px);
|
|
41
40
|
padding: calc(var(--design-unit) * 4px);
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
max-height: 380px;
|
|
42
|
+
overflow-y: scroll;
|
|
44
43
|
}
|
|
45
44
|
|
|
46
45
|
.content-row {
|
|
@@ -81,4 +80,14 @@ export const RuleDialogStyles = css `
|
|
|
81
80
|
zero-select::part(listbox) {
|
|
82
81
|
max-height: 160px;
|
|
83
82
|
}
|
|
83
|
+
|
|
84
|
+
.horizontal {
|
|
85
|
+
flex-direction: row;
|
|
86
|
+
}
|
|
87
|
+
.destination {
|
|
88
|
+
align-self: center;
|
|
89
|
+
}
|
|
90
|
+
.topic {
|
|
91
|
+
min-width: revert-layer;
|
|
92
|
+
}
|
|
84
93
|
`;
|
|
@@ -8,7 +8,7 @@ export const RuleDialogTemplate = html `
|
|
|
8
8
|
class="rule-dialog"
|
|
9
9
|
:onCloseCallback=${(x) => () => x.close()}
|
|
10
10
|
>
|
|
11
|
-
<div slot="top" class="rule-dialog-
|
|
11
|
+
<div slot="top" class="rule-dialog-top">
|
|
12
12
|
${x => x.ruleDialogTitle}
|
|
13
13
|
</div>
|
|
14
14
|
|
|
@@ -121,15 +121,13 @@ export const RuleDialogTemplate = html `
|
|
|
121
121
|
</div>
|
|
122
122
|
</div>
|
|
123
123
|
|
|
124
|
-
<div class="rule-dialog-
|
|
125
|
-
<
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
</zero-button>
|
|
132
|
-
</div>
|
|
124
|
+
<div slot="bottom" class="rule-dialog-bottom">
|
|
125
|
+
<zero-button
|
|
126
|
+
appearance="accent"
|
|
127
|
+
@click=${x => x.submit()}
|
|
128
|
+
>
|
|
129
|
+
Submit
|
|
130
|
+
</zero-button>
|
|
133
131
|
</div>
|
|
134
132
|
</zero-modal>
|
|
135
133
|
`;
|
|
@@ -7,7 +7,6 @@ export const ConditionBuilderTemplate = html `
|
|
|
7
7
|
<zero-select
|
|
8
8
|
:value=${sync(x => x.leftValue)}
|
|
9
9
|
class="left-value"
|
|
10
|
-
position="below"
|
|
11
10
|
>
|
|
12
11
|
${repeat(x => x.leftValueItems, html `
|
|
13
12
|
<zero-option value=${x => JSON.stringify(x)}>${x => x.FIELD_NAME}</zero-option>
|
|
@@ -17,7 +16,6 @@ export const ConditionBuilderTemplate = html `
|
|
|
17
16
|
<zero-select
|
|
18
17
|
class="logical-operator"
|
|
19
18
|
:value=${sync(x => x.logicalOperator)}
|
|
20
|
-
position="below"
|
|
21
19
|
>
|
|
22
20
|
${repeat(x => ALL_LOGICAL_OPERATORS, html `
|
|
23
21
|
<zero-option value=${x => x}>${x => x}</zero-option>
|
|
@@ -27,7 +25,6 @@ export const ConditionBuilderTemplate = html `
|
|
|
27
25
|
<zero-select
|
|
28
26
|
class="right-criteria"
|
|
29
27
|
:value=${sync(x => x.rightCriteria)}
|
|
30
|
-
position="below"
|
|
31
28
|
>
|
|
32
29
|
${repeat(x => ALL_RIGHT_CRITERIAS, html `
|
|
33
30
|
<zero-option value=${x => x}>${x => x}</zero-option>
|
|
@@ -47,7 +44,6 @@ export const ConditionBuilderTemplate = html `
|
|
|
47
44
|
<zero-select
|
|
48
45
|
class="right-criteria-user-entry"
|
|
49
46
|
:value=${sync(x => x.rightValueUserEntry)}
|
|
50
|
-
position="below"
|
|
51
47
|
>
|
|
52
48
|
${x => x.rightValueItemsProperty}
|
|
53
49
|
</zero-select>
|
|
@@ -22,7 +22,6 @@ export const ParameterBuilderTemplate = html `
|
|
|
22
22
|
id="param-source-type"
|
|
23
23
|
:value=${sync(x => x.sourceType)}
|
|
24
24
|
class="param-source-type"
|
|
25
|
-
position="below"
|
|
26
25
|
>
|
|
27
26
|
${repeat(x => ALL_PARAM_SOURCE_TYPES, html `
|
|
28
27
|
<zero-option value=${x => x}>${x => x}</zero-option>
|
|
@@ -65,7 +64,6 @@ export const ParameterBuilderTemplate = html `
|
|
|
65
64
|
id="param-type"
|
|
66
65
|
:value=${sync(x => x.type)}
|
|
67
66
|
class="param-type"
|
|
68
|
-
position="below"
|
|
69
67
|
>
|
|
70
68
|
${repeat(x => ALL_PARAM_TYPES, html `
|
|
71
69
|
<zero-option value=${x => x}>${x => x}</zero-option>
|
|
@@ -39,7 +39,7 @@ let TemplateDialog = class TemplateDialog extends FASTElement {
|
|
|
39
39
|
break;
|
|
40
40
|
case TemplateDialogMode.EDIT:
|
|
41
41
|
const ruleTemplate = params.data;
|
|
42
|
-
this.
|
|
42
|
+
this.templateId = ruleTemplate.DYNAMIC_RULE_ID;
|
|
43
43
|
this.name = ruleTemplate.RULE_NAME;
|
|
44
44
|
this.description = ruleTemplate.RULE_DESCRIPTION;
|
|
45
45
|
this.resource = ruleTemplate.RULE_TABLE;
|
|
@@ -93,7 +93,7 @@ let TemplateDialog = class TemplateDialog extends FASTElement {
|
|
|
93
93
|
return `${mode} Template`;
|
|
94
94
|
}
|
|
95
95
|
submit() {
|
|
96
|
-
const template = Object.assign(Object.assign({}, (this.templateDialogMode === TemplateDialogMode.EDIT && { DYNAMIC_RULE_ID: this.
|
|
96
|
+
const template = Object.assign(Object.assign({}, (this.templateDialogMode === TemplateDialogMode.EDIT && { DYNAMIC_RULE_ID: this.templateId })), { RULE_NAME: this.name, RULE_DESCRIPTION: this.description, RULE_TABLE: this.resource, RULE_EXPRESSION: {
|
|
97
97
|
CONDITIONS: createConditions(this.conditions, this.parameters)
|
|
98
98
|
}, RAW_RULE_EXPRESSION: null, RESULT_EXPRESSION: {
|
|
99
99
|
ASSIGNMENTS: [
|
|
@@ -105,12 +105,12 @@ let TemplateDialog = class TemplateDialog extends FASTElement {
|
|
|
105
105
|
}, PARAMETER_DETAILS: createParameterDetails(this.parameters), RULE_EXECUTION_STRATEGY: 'UNLIMITED' });
|
|
106
106
|
switch (this.templateDialogMode) {
|
|
107
107
|
case TemplateDialogMode.CREATE:
|
|
108
|
-
this.
|
|
108
|
+
this.templateService
|
|
109
109
|
.createRuleTemplate(template)
|
|
110
110
|
.then(response => this.validateResponse(response));
|
|
111
111
|
break;
|
|
112
112
|
case TemplateDialogMode.EDIT:
|
|
113
|
-
this.
|
|
113
|
+
this.templateService
|
|
114
114
|
.editRuleTemplate(template)
|
|
115
115
|
.then(response => this.validateResponse(response));
|
|
116
116
|
break;
|
|
@@ -137,7 +137,7 @@ let TemplateDialog = class TemplateDialog extends FASTElement {
|
|
|
137
137
|
}
|
|
138
138
|
close() {
|
|
139
139
|
this.dialog.close();
|
|
140
|
-
this.
|
|
140
|
+
this.templateId = null;
|
|
141
141
|
this.name = null;
|
|
142
142
|
this.description = null;
|
|
143
143
|
this.header = null;
|
|
@@ -187,7 +187,7 @@ let TemplateDialog = class TemplateDialog extends FASTElement {
|
|
|
187
187
|
};
|
|
188
188
|
__decorate([
|
|
189
189
|
TemplateService
|
|
190
|
-
], TemplateDialog.prototype, "
|
|
190
|
+
], TemplateDialog.prototype, "templateService", void 0);
|
|
191
191
|
__decorate([
|
|
192
192
|
SystemService
|
|
193
193
|
], TemplateDialog.prototype, "systemService", void 0);
|
|
@@ -196,7 +196,7 @@ __decorate([
|
|
|
196
196
|
], TemplateDialog.prototype, "notifyService", void 0);
|
|
197
197
|
__decorate([
|
|
198
198
|
observable
|
|
199
|
-
], TemplateDialog.prototype, "
|
|
199
|
+
], TemplateDialog.prototype, "templateId", void 0);
|
|
200
200
|
__decorate([
|
|
201
201
|
observable
|
|
202
202
|
], TemplateDialog.prototype, "name", void 0);
|
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
import { css } from '@microsoft/fast-element';
|
|
2
2
|
const modalWidthPx = 940;
|
|
3
|
-
const
|
|
3
|
+
const top = css `
|
|
4
4
|
zero-modal::part(top) {
|
|
5
5
|
padding: calc(var(--design-unit) * 4px);
|
|
6
6
|
border-bottom: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-divider-rest);
|
|
7
7
|
margin: 0px;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
.template-dialog-
|
|
10
|
+
.template-dialog-top {
|
|
11
11
|
font-weight: bold;
|
|
12
12
|
align-self: center;
|
|
13
13
|
}
|
|
14
14
|
`;
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
const bottom = css `
|
|
16
|
+
zero-modal::part(bottom) {
|
|
17
|
+
padding: calc(var(--design-unit) * 4px);
|
|
18
|
+
border-top: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-divider-rest);;
|
|
19
|
+
margin: 0px;
|
|
19
20
|
}
|
|
20
21
|
|
|
21
|
-
.template-dialog-
|
|
22
|
-
|
|
23
|
-
margin-bottom: 0px;
|
|
22
|
+
.template-dialog-bottom {
|
|
23
|
+
display: flex;
|
|
24
24
|
}
|
|
25
25
|
`;
|
|
26
26
|
export const TemplateDialogStyles = css `
|
|
27
|
-
${
|
|
28
|
-
${
|
|
27
|
+
${top}
|
|
28
|
+
${bottom}
|
|
29
29
|
|
|
30
30
|
zero-modal::part(dialog) {
|
|
31
31
|
padding: 0;
|
|
@@ -35,9 +35,10 @@ export const TemplateDialogStyles = css `
|
|
|
35
35
|
|
|
36
36
|
.template-dialog-content {
|
|
37
37
|
display: flex;
|
|
38
|
-
justify-content: center;
|
|
39
38
|
flex-direction: column;
|
|
40
39
|
width: ${String(modalWidthPx)}px;
|
|
40
|
+
max-height: 500px;
|
|
41
|
+
overflow-y: scroll;
|
|
41
42
|
gap: calc(var(--design-unit) * 3px);
|
|
42
43
|
padding: calc(var(--design-unit) * 4px);
|
|
43
44
|
}
|
|
@@ -56,15 +57,11 @@ export const TemplateDialogStyles = css `
|
|
|
56
57
|
|
|
57
58
|
.parameters,
|
|
58
59
|
.conditions {
|
|
59
|
-
height: 150px;
|
|
60
|
-
max-height: 200px;
|
|
61
60
|
border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-divider-rest);
|
|
62
61
|
border-radius: calc(var(--control-corner-radius) * 1px);
|
|
63
62
|
display: flex;
|
|
64
63
|
flex-direction: column;
|
|
65
64
|
padding: calc(var(--design-unit) * 2px);
|
|
66
|
-
flex-direction: column;
|
|
67
|
-
overflow-y: scroll;
|
|
68
65
|
}
|
|
69
66
|
|
|
70
67
|
.parameter,
|
|
@@ -85,4 +82,16 @@ export const TemplateDialogStyles = css `
|
|
|
85
82
|
zero-select::part(listbox) {
|
|
86
83
|
max-height: 160px;
|
|
87
84
|
}
|
|
85
|
+
|
|
86
|
+
.horizontal {
|
|
87
|
+
flex-direction: row;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.destination {
|
|
91
|
+
align-self: center;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.topic {
|
|
95
|
+
min-width: revert-layer;
|
|
96
|
+
}
|
|
88
97
|
`;
|
|
@@ -8,7 +8,7 @@ export const TemplateDialogTemplate = html `
|
|
|
8
8
|
class="template-dialog"
|
|
9
9
|
:onCloseCallback=${(x) => () => x.close()}
|
|
10
10
|
>
|
|
11
|
-
<div slot="top" class="template-dialog-
|
|
11
|
+
<div slot="top" class="template-dialog-top">
|
|
12
12
|
${x => x.templateDialogTitle}
|
|
13
13
|
</div>
|
|
14
14
|
|
|
@@ -143,15 +143,13 @@ export const TemplateDialogTemplate = html `
|
|
|
143
143
|
</div>
|
|
144
144
|
</div>
|
|
145
145
|
|
|
146
|
-
<div class="template-dialog-
|
|
147
|
-
<
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
</zero-button>
|
|
154
|
-
</div>
|
|
146
|
+
<div slot="bottom" class="template-dialog-bottom">
|
|
147
|
+
<zero-button
|
|
148
|
+
appearance="accent"
|
|
149
|
+
@click=${x => x.submit()}
|
|
150
|
+
>
|
|
151
|
+
Submit
|
|
152
|
+
</zero-button>
|
|
155
153
|
</div>
|
|
156
154
|
</zero-modal>
|
|
157
155
|
`;
|
package/package.json
CHANGED