@genesislcap/pbc-notify-ui 1.0.29 → 1.0.31
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.map +1 -1
- package/dist/dts/components/foundation-inbox/inbox-base/inbox-base.d.ts +9 -9
- 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/components/foundation-notification-dashboard/components/rules/rule-dialog/rule-condition-builder/rule-condition-builder.d.ts +12 -11
- package/dist/dts/components/foundation-notification-dashboard/components/rules/rule-dialog/rule-condition-builder/rule-condition-builder.d.ts.map +1 -1
- package/dist/dts/components/foundation-notification-dashboard/components/rules/rule-dialog/rule-condition-builder/rule-condition-builder.template.d.ts +1 -1
- package/dist/dts/components/foundation-notification-dashboard/components/rules/rule-dialog/rule-condition-builder/rule-condition-builder.template.d.ts.map +1 -1
- package/dist/dts/components/foundation-notification-dashboard/components/rules/rule-dialog/rule-condition-builder/rule-condition-builder.types.d.ts +4 -12
- package/dist/dts/components/foundation-notification-dashboard/components/rules/rule-dialog/rule-condition-builder/rule-condition-builder.types.d.ts.map +1 -1
- package/dist/dts/components/foundation-notification-dashboard/components/rules/rule-dialog/rule-dialog.d.ts +14 -9
- 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 +1 -6
- 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-condition-builder/template-condition-builder.d.ts +29 -0
- package/dist/dts/components/foundation-notification-dashboard/components/templates/template-dialog/template-condition-builder/template-condition-builder.d.ts.map +1 -0
- package/dist/dts/components/foundation-notification-dashboard/components/templates/template-dialog/template-condition-builder/template-condition-builder.template.d.ts +3 -0
- package/dist/dts/components/foundation-notification-dashboard/components/templates/template-dialog/template-condition-builder/template-condition-builder.template.d.ts.map +1 -0
- package/dist/dts/components/foundation-notification-dashboard/components/templates/template-dialog/template-dialog.d.ts +10 -6
- 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.template.d.ts.map +1 -1
- package/dist/dts/components/foundation-notification-dashboard/components/templates/template-dialog/template-dialog.types.d.ts +1 -8
- package/dist/dts/components/foundation-notification-dashboard/components/templates/template-dialog/template-dialog.types.d.ts.map +1 -1
- package/dist/dts/components/foundation-notification-dashboard/notification-dashboard.tabs.d.ts.map +1 -1
- package/dist/dts/components/foundation-notification-dashboard/notification-dashboard.utils.d.ts +55 -0
- package/dist/dts/components/foundation-notification-dashboard/notification-dashboard.utils.d.ts.map +1 -0
- package/dist/dts/components/foundation-notification-dashboard/styles/condition-builder.styles.d.ts.map +1 -0
- package/dist/dts/components/foundation-notification-dashboard/styles/dynamic-rule.styles.d.ts +3 -0
- package/dist/dts/components/foundation-notification-dashboard/styles/dynamic-rule.styles.d.ts.map +1 -0
- package/dist/dts/components/foundation-notification-dashboard/types/logical-operator.d.ts +4 -0
- package/dist/dts/components/foundation-notification-dashboard/types/logical-operator.d.ts.map +1 -1
- package/dist/dts/notify.types.d.ts +60 -0
- package/dist/dts/notify.types.d.ts.map +1 -0
- package/dist/dts/services/inbox.service.d.ts.map +1 -1
- package/dist/esm/components/components.js +2 -2
- package/dist/esm/components/foundation-inbox/components/foundation-inbox-counter/foundation-inbox-counter.js +3 -3
- package/dist/esm/components/foundation-inbox/inbox-base/inbox-base.js +10 -12
- package/dist/esm/components/foundation-inbox/inbox.template.js +1 -2
- package/dist/esm/components/foundation-notification-dashboard/components/rules/rule-dialog/rule-condition-builder/rule-condition-builder.js +84 -60
- package/dist/esm/components/foundation-notification-dashboard/components/rules/rule-dialog/rule-condition-builder/rule-condition-builder.template.js +42 -28
- package/dist/esm/components/foundation-notification-dashboard/components/rules/rule-dialog/rule-condition-builder/rule-condition-builder.types.js +5 -4
- package/dist/esm/components/foundation-notification-dashboard/components/rules/rule-dialog/rule-dialog.js +94 -102
- package/dist/esm/components/foundation-notification-dashboard/components/rules/rule-dialog/rule-dialog.template.js +11 -14
- package/dist/esm/components/foundation-notification-dashboard/components/rules/rule-dialog/rule-dialog.types.js +0 -7
- package/dist/esm/components/foundation-notification-dashboard/components/rules/rule-management.js +2 -2
- package/dist/esm/components/foundation-notification-dashboard/components/templates/template-dialog/template-condition-builder/template-condition-builder.js +169 -0
- package/dist/esm/components/foundation-notification-dashboard/components/templates/template-dialog/template-condition-builder/template-condition-builder.template.js +66 -0
- package/dist/esm/components/foundation-notification-dashboard/components/templates/template-dialog/template-dialog.js +95 -115
- package/dist/esm/components/foundation-notification-dashboard/components/templates/template-dialog/template-dialog.template.js +16 -22
- package/dist/esm/components/foundation-notification-dashboard/components/templates/template-management.js +2 -2
- package/dist/esm/components/foundation-notification-dashboard/notification-dashboard.tabs.js +6 -4
- package/dist/esm/components/foundation-notification-dashboard/notification-dashboard.utils.js +276 -0
- package/dist/esm/components/foundation-notification-dashboard/{components/templates/template-dialog/condition-builder → styles}/condition-builder.styles.js +6 -6
- package/dist/esm/components/foundation-notification-dashboard/{components/templates/template-dialog/template-dialog.styles.js → styles/dynamic-rule.styles.js} +24 -8
- package/dist/esm/components/foundation-notification-dashboard/types/logical-operator.js +4 -0
- package/dist/esm/notify.types.js +70 -0
- package/dist/esm/services/inbox.service.js +1 -5
- package/package.json +1 -1
- package/dist/dts/components/foundation-notification-dashboard/components/rules/rule-dialog/rule-condition-builder/rule-condition-builder.styles.d.ts +0 -2
- package/dist/dts/components/foundation-notification-dashboard/components/rules/rule-dialog/rule-condition-builder/rule-condition-builder.styles.d.ts.map +0 -1
- package/dist/dts/components/foundation-notification-dashboard/components/rules/rule-dialog/rule-dialog.styles.d.ts +0 -2
- package/dist/dts/components/foundation-notification-dashboard/components/rules/rule-dialog/rule-dialog.styles.d.ts.map +0 -1
- package/dist/dts/components/foundation-notification-dashboard/components/templates/template-dialog/condition-builder/condition-builder.d.ts +0 -32
- package/dist/dts/components/foundation-notification-dashboard/components/templates/template-dialog/condition-builder/condition-builder.d.ts.map +0 -1
- package/dist/dts/components/foundation-notification-dashboard/components/templates/template-dialog/condition-builder/condition-builder.styles.d.ts.map +0 -1
- package/dist/dts/components/foundation-notification-dashboard/components/templates/template-dialog/condition-builder/condition-builder.template.d.ts +0 -3
- package/dist/dts/components/foundation-notification-dashboard/components/templates/template-dialog/condition-builder/condition-builder.template.d.ts.map +0 -1
- package/dist/dts/components/foundation-notification-dashboard/components/templates/template-dialog/template-dialog.styles.d.ts +0 -2
- package/dist/dts/components/foundation-notification-dashboard/components/templates/template-dialog/template-dialog.styles.d.ts.map +0 -1
- package/dist/dts/components/foundation-notification-dashboard/components/templates/template-dialog/template-dialog.utils.d.ts +0 -41
- package/dist/dts/components/foundation-notification-dashboard/components/templates/template-dialog/template-dialog.utils.d.ts.map +0 -1
- package/dist/dts/components/foundation-notification-dashboard/styles/rules-and-templates.styles.d.ts +0 -2
- package/dist/dts/components/foundation-notification-dashboard/styles/rules-and-templates.styles.d.ts.map +0 -1
- package/dist/esm/components/foundation-notification-dashboard/components/rules/rule-dialog/rule-condition-builder/rule-condition-builder.styles.js +0 -53
- package/dist/esm/components/foundation-notification-dashboard/components/rules/rule-dialog/rule-dialog.styles.js +0 -95
- package/dist/esm/components/foundation-notification-dashboard/components/templates/template-dialog/condition-builder/condition-builder.js +0 -179
- package/dist/esm/components/foundation-notification-dashboard/components/templates/template-dialog/condition-builder/condition-builder.template.js +0 -42
- package/dist/esm/components/foundation-notification-dashboard/components/templates/template-dialog/template-dialog.utils.js +0 -119
- package/dist/esm/components/foundation-notification-dashboard/styles/rules-and-templates.styles.js +0 -17
- /package/dist/dts/components/foundation-notification-dashboard/{components/templates/template-dialog/condition-builder → styles}/condition-builder.styles.d.ts +0 -0
|
@@ -1 +0,0 @@
|
|
|
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;AAU3E,eAAO,MAAM,wBAAwB,EAAE,YAoDtC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
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,41 +0,0 @@
|
|
|
1
|
-
import { ParameterBuilderEntity, ConditionBuilderEntity } from './template-dialog.types';
|
|
2
|
-
export declare class UUIDGenerator {
|
|
3
|
-
private static uuid;
|
|
4
|
-
static createUuid(): string;
|
|
5
|
-
}
|
|
6
|
-
export declare function createEmptyCondition(): ConditionBuilderEntity;
|
|
7
|
-
export declare function createEmptyParameter(): ParameterBuilderEntity;
|
|
8
|
-
export declare function createAssignment(field: string, value: string): {
|
|
9
|
-
FIELD: {
|
|
10
|
-
TYPE: string;
|
|
11
|
-
NAME: string;
|
|
12
|
-
};
|
|
13
|
-
VALUE: {
|
|
14
|
-
TYPE: string;
|
|
15
|
-
VALUE: string;
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
export declare function getAssignmentValue(assignments: any[], field: string): string;
|
|
19
|
-
export declare function createConditions(conditions: ConditionBuilderEntity[], parameters?: any): any;
|
|
20
|
-
export declare function getLeftExpression(condition: ConditionBuilderEntity): {
|
|
21
|
-
TYPE: string;
|
|
22
|
-
NAME: any;
|
|
23
|
-
};
|
|
24
|
-
export declare function getRightExpression(condition: ConditionBuilderEntity, parameters?: any): {
|
|
25
|
-
TYPE: string;
|
|
26
|
-
KEY: any;
|
|
27
|
-
NAME?: undefined;
|
|
28
|
-
VALUE?: undefined;
|
|
29
|
-
} | {
|
|
30
|
-
TYPE: string;
|
|
31
|
-
NAME: string;
|
|
32
|
-
KEY?: undefined;
|
|
33
|
-
VALUE?: undefined;
|
|
34
|
-
} | {
|
|
35
|
-
TYPE: string;
|
|
36
|
-
VALUE: string;
|
|
37
|
-
KEY?: undefined;
|
|
38
|
-
NAME?: undefined;
|
|
39
|
-
};
|
|
40
|
-
export declare function createParameterDetails(parameters: any): {};
|
|
41
|
-
//# sourceMappingURL=template-dialog.utils.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"template-dialog.utils.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/foundation-notification-dashboard/components/templates/template-dialog/template-dialog.utils.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAEzF,qBAAa,aAAa;IAClB,OAAO,CAAC,MAAM,CAAC,IAAI,CAAO;IAEhC,MAAM,CAAC,UAAU,IAAI,MAAM;CAG5B;AAED,wBAAgB,oBAAoB,IAAI,sBAAsB,CAQ7D;AAED,wBAAgB,oBAAoB,IAAI,sBAAsB,CAS7D;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;;;;;;;;;EAW5D;AAED,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,GAAG,EAAE,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAE5E;AAED,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,sBAAsB,EAAE,EAAE,UAAU,CAAC,KAAA,GAAG,GAAG,CAQvF;AAED,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,sBAAsB;;;EAKlE;AAED,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,sBAAsB,EAAE,UAAU,CAAC,KAAA;;;;;;;;;;;;;;;EAyChF;AAED,wBAAgB,sBAAsB,CAAC,UAAU,KAAA,MAYhD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rules-and-templates.styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/foundation-notification-dashboard/styles/rules-and-templates.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,uBAAuB,iDAenC,CAAC"}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { css } from '@microsoft/fast-element';
|
|
2
|
-
export const ConditionBuilderStyles = css `
|
|
3
|
-
.condition-builder {
|
|
4
|
-
display: flex;
|
|
5
|
-
gap: calc(var(--design-unit) * 2px);
|
|
6
|
-
margin-bottom: calc(var(--design-unit) * 2px);
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
zero-button {
|
|
10
|
-
margin: 0;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.delete {
|
|
14
|
-
margin: 0;
|
|
15
|
-
background-color: var(--neutral-layer-1);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.delete:hover {
|
|
19
|
-
background-color: color-mix(in srgb, var(--neutral-foreground-rest), transparent 89%);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
zero-text-field {
|
|
23
|
-
width: 100%;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
zero-select {
|
|
27
|
-
min-width: auto;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
zero-select.left-value::part(control) {
|
|
31
|
-
width: 250px;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
zero-select.logical-operator::part(control) {
|
|
35
|
-
width: 160px;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
zero-select.right-criteria::part(control) {
|
|
39
|
-
width: 135px;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
zero-select.right-criteria-user-entry {
|
|
43
|
-
width: 100%;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
zero-select::part(listbox) {
|
|
47
|
-
max-height: 160px;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.display-none {
|
|
51
|
-
display: none;
|
|
52
|
-
}
|
|
53
|
-
`;
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
import { css } from '@microsoft/fast-element';
|
|
2
|
-
const modalWidthPx = 940;
|
|
3
|
-
const top = css `
|
|
4
|
-
zero-modal::part(top) {
|
|
5
|
-
padding: calc(var(--design-unit) * 4px);
|
|
6
|
-
border-bottom: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-divider-rest);
|
|
7
|
-
margin: 0;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.rule-dialog-top {
|
|
11
|
-
font-weight: bold;
|
|
12
|
-
align-self: center;
|
|
13
|
-
}
|
|
14
|
-
`;
|
|
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: 0;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.rule-dialog-bottom {
|
|
23
|
-
display: flex;
|
|
24
|
-
}
|
|
25
|
-
`;
|
|
26
|
-
export const RuleDialogStyles = css `
|
|
27
|
-
${top}
|
|
28
|
-
${bottom}
|
|
29
|
-
|
|
30
|
-
zero-modal::part(dialog) {
|
|
31
|
-
padding: 0;
|
|
32
|
-
background: var(--neutral-layer-4);
|
|
33
|
-
border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-divider-rest);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.rule-dialog-content {
|
|
37
|
-
display: flex;
|
|
38
|
-
flex-direction: column;
|
|
39
|
-
width: ${String(modalWidthPx)}px;
|
|
40
|
-
gap: calc(var(--design-unit) * 3px);
|
|
41
|
-
padding: calc(var(--design-unit) * 4px);
|
|
42
|
-
max-height: 380px;
|
|
43
|
-
overflow-y: scroll;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.content-row {
|
|
47
|
-
display: flex;
|
|
48
|
-
gap: calc(var(--design-unit) * 3px);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.control {
|
|
52
|
-
display: flex;
|
|
53
|
-
flex-direction: column;
|
|
54
|
-
width: 100%;
|
|
55
|
-
gap: calc(var(--design-unit) * 2px);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.conditions {
|
|
59
|
-
border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-divider-rest);
|
|
60
|
-
border-radius: calc(var(--control-corner-radius) * 1px);
|
|
61
|
-
display: flex;
|
|
62
|
-
padding: calc(var(--design-unit) * 2px);
|
|
63
|
-
flex-direction: column;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.condition {
|
|
67
|
-
gap: 0;
|
|
68
|
-
flex-direction: column;
|
|
69
|
-
margin-bottom: 0;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
zero-button {
|
|
73
|
-
margin: 0;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
zero-select {
|
|
77
|
-
min-width: 0;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
zero-select::part(listbox) {
|
|
81
|
-
max-height: 160px;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
.horizontal {
|
|
85
|
-
flex-direction: row;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
.destination {
|
|
89
|
-
align-self: center;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.topic {
|
|
93
|
-
min-width: revert-layer;
|
|
94
|
-
}
|
|
95
|
-
`;
|
|
@@ -1,179 +0,0 @@
|
|
|
1
|
-
import { __awaiter, __decorate } from "tslib";
|
|
2
|
-
import { FASTElement, attr, customElement, html, observable } from '@microsoft/fast-element';
|
|
3
|
-
import { SystemService } from '../../../../../../services/system.service';
|
|
4
|
-
import { RIGHT_CRITERIA_VALUE } from '../../../../types/right-criteria';
|
|
5
|
-
import { ConditionBuilderStyles as styles } from './condition-builder.styles';
|
|
6
|
-
import { ConditionBuilderTemplate as template } from './condition-builder.template';
|
|
7
|
-
const name = 'condition-builder';
|
|
8
|
-
let ConditionBuilder = class ConditionBuilder extends FASTElement {
|
|
9
|
-
constructor() {
|
|
10
|
-
super(...arguments);
|
|
11
|
-
this.leftValueItems = [];
|
|
12
|
-
this.rightCriteria = RIGHT_CRITERIA_VALUE;
|
|
13
|
-
this.rightValueItems = [];
|
|
14
|
-
this.rightValueItemsProperty = '';
|
|
15
|
-
}
|
|
16
|
-
connectedCallback() {
|
|
17
|
-
const _super = Object.create(null, {
|
|
18
|
-
connectedCallback: { get: () => super.connectedCallback }
|
|
19
|
-
});
|
|
20
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
-
_super.connectedCallback.call(this);
|
|
22
|
-
if (this.resource) {
|
|
23
|
-
this.leftValueItems = yield this.systemService.getFields(this.resource);
|
|
24
|
-
}
|
|
25
|
-
this.rightValueItems = this.parameters;
|
|
26
|
-
this.createRightValueItems();
|
|
27
|
-
if (this.condition.ID) {
|
|
28
|
-
this.assignLeftValue();
|
|
29
|
-
this.logicalOperator = this.condition.LOGICAL_OPERATOR;
|
|
30
|
-
const rightValue = this.condition.RIGHT_VALUE; // Save4Edit
|
|
31
|
-
this.rightCriteria = this.condition.RIGHT_CRITERIA;
|
|
32
|
-
this.condition.RIGHT_VALUE = rightValue;
|
|
33
|
-
this.assignRightValue();
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
disconnectedCallback() {
|
|
38
|
-
super.disconnectedCallback();
|
|
39
|
-
}
|
|
40
|
-
createRightValueItems() {
|
|
41
|
-
let optionsInHTML = '';
|
|
42
|
-
this.rightValueItems.forEach((item) => {
|
|
43
|
-
var _a, _b;
|
|
44
|
-
optionsInHTML += `<zero-option value="${(_a = item.UUID) !== null && _a !== void 0 ? _a : ''}">${(_b = item.PARAM_NAME) !== null && _b !== void 0 ? _b : ''}</zero-option>`;
|
|
45
|
-
});
|
|
46
|
-
this.rightValueItemsProperty = html `
|
|
47
|
-
${optionsInHTML}
|
|
48
|
-
`;
|
|
49
|
-
}
|
|
50
|
-
resourceChanged() {
|
|
51
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
52
|
-
if (this.resource) {
|
|
53
|
-
this.leftValueItems = yield this.systemService.getFields(this.resource);
|
|
54
|
-
}
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
parametersChanged() {
|
|
58
|
-
if (this.parameters) {
|
|
59
|
-
this.rightValueItems = this.parameters;
|
|
60
|
-
this.createRightValueItems();
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
conditionChanged() {
|
|
64
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
65
|
-
if (this.resource) {
|
|
66
|
-
this.leftValueItems = yield this.systemService.getFields(this.resource);
|
|
67
|
-
}
|
|
68
|
-
this.assignLeftValue();
|
|
69
|
-
this.logicalOperator = this.condition.LOGICAL_OPERATOR;
|
|
70
|
-
const rightValue = this.condition.RIGHT_VALUE; // Save4Edit
|
|
71
|
-
this.rightCriteria = this.condition.RIGHT_CRITERIA;
|
|
72
|
-
this.condition.RIGHT_VALUE = rightValue;
|
|
73
|
-
this.assignRightValue();
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
assignLeftValue() {
|
|
77
|
-
this.leftValue = this.condition.LEFT_VALUE
|
|
78
|
-
? typeof this.condition.LEFT_VALUE === 'string'
|
|
79
|
-
? JSON.stringify(this.leftValueItems.find((item) => item.FIELD_NAME === this.condition.LEFT_VALUE)) // Edit
|
|
80
|
-
: JSON.stringify(this.condition.LEFT_VALUE)
|
|
81
|
-
: JSON.stringify(this.leftValueItems[0]);
|
|
82
|
-
this.$emit('edit', this.condition);
|
|
83
|
-
}
|
|
84
|
-
assignRightValue() {
|
|
85
|
-
var _a;
|
|
86
|
-
if (this.condition.RIGHT_CRITERIA === RIGHT_CRITERIA_VALUE) {
|
|
87
|
-
this.rightValueText = this.condition.RIGHT_VALUE;
|
|
88
|
-
}
|
|
89
|
-
else {
|
|
90
|
-
this.rightValueUserEntry = ((_a = this.parameters) === null || _a === void 0 ? void 0 : _a.length) > 0 ? this.condition.RIGHT_VALUE : null;
|
|
91
|
-
}
|
|
92
|
-
this.$emit('edit', this.condition);
|
|
93
|
-
}
|
|
94
|
-
leftValueChanged() {
|
|
95
|
-
if (this.condition) {
|
|
96
|
-
this.condition.LEFT_VALUE = JSON.parse(this.leftValue);
|
|
97
|
-
this.$emit('edit', this.condition);
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
logicalOperatorChanged() {
|
|
101
|
-
if (this.condition) {
|
|
102
|
-
this.condition.LOGICAL_OPERATOR = this.logicalOperator;
|
|
103
|
-
this.$emit('edit', this.condition);
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
rightCriteriaChanged() {
|
|
107
|
-
var _a;
|
|
108
|
-
if (this.condition) {
|
|
109
|
-
this.condition.RIGHT_CRITERIA = this.rightCriteria;
|
|
110
|
-
if (this.condition.RIGHT_CRITERIA === RIGHT_CRITERIA_VALUE) {
|
|
111
|
-
this.rightValueText = '';
|
|
112
|
-
}
|
|
113
|
-
else {
|
|
114
|
-
this.rightValueUserEntry = ((_a = this.parameters) === null || _a === void 0 ? void 0 : _a.length) > 0 ? this.parameters[0].UUID : null;
|
|
115
|
-
this.condition.RIGHT_VALUE = this.rightValueUserEntry;
|
|
116
|
-
}
|
|
117
|
-
this.$emit('edit', this.condition);
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
rightValueTextChanged() {
|
|
121
|
-
if (this.condition) {
|
|
122
|
-
this.condition.RIGHT_VALUE = this.rightValueText;
|
|
123
|
-
this.$emit('edit', this.condition);
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
rightValueUserEntryChanged() {
|
|
127
|
-
if (this.condition) {
|
|
128
|
-
this.condition.RIGHT_VALUE = this.rightValueUserEntry;
|
|
129
|
-
this.$emit('edit', this.condition);
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
deleteCondition() {
|
|
133
|
-
this.$emit('delete', this.condition);
|
|
134
|
-
}
|
|
135
|
-
};
|
|
136
|
-
__decorate([
|
|
137
|
-
SystemService
|
|
138
|
-
], ConditionBuilder.prototype, "systemService", void 0);
|
|
139
|
-
__decorate([
|
|
140
|
-
attr
|
|
141
|
-
], ConditionBuilder.prototype, "condition", void 0);
|
|
142
|
-
__decorate([
|
|
143
|
-
attr
|
|
144
|
-
], ConditionBuilder.prototype, "resource", void 0);
|
|
145
|
-
__decorate([
|
|
146
|
-
attr
|
|
147
|
-
], ConditionBuilder.prototype, "parameters", void 0);
|
|
148
|
-
__decorate([
|
|
149
|
-
observable
|
|
150
|
-
], ConditionBuilder.prototype, "leftValueItems", void 0);
|
|
151
|
-
__decorate([
|
|
152
|
-
observable
|
|
153
|
-
], ConditionBuilder.prototype, "leftValue", void 0);
|
|
154
|
-
__decorate([
|
|
155
|
-
observable
|
|
156
|
-
], ConditionBuilder.prototype, "logicalOperator", void 0);
|
|
157
|
-
__decorate([
|
|
158
|
-
observable
|
|
159
|
-
], ConditionBuilder.prototype, "rightCriteria", void 0);
|
|
160
|
-
__decorate([
|
|
161
|
-
observable
|
|
162
|
-
], ConditionBuilder.prototype, "rightValueText", void 0);
|
|
163
|
-
__decorate([
|
|
164
|
-
observable
|
|
165
|
-
], ConditionBuilder.prototype, "rightValueUserEntry", void 0);
|
|
166
|
-
__decorate([
|
|
167
|
-
observable
|
|
168
|
-
], ConditionBuilder.prototype, "rightValueItems", void 0);
|
|
169
|
-
__decorate([
|
|
170
|
-
observable
|
|
171
|
-
], ConditionBuilder.prototype, "rightValueItemsProperty", void 0);
|
|
172
|
-
ConditionBuilder = __decorate([
|
|
173
|
-
customElement({
|
|
174
|
-
name,
|
|
175
|
-
template,
|
|
176
|
-
styles,
|
|
177
|
-
})
|
|
178
|
-
], ConditionBuilder);
|
|
179
|
-
export { ConditionBuilder };
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { sync } from '@genesislcap/foundation-utils';
|
|
2
|
-
import { html, repeat, when } from '@microsoft/fast-element';
|
|
3
|
-
import { ALL_LOGICAL_OPERATORS } from '../../../../types/logical-operator';
|
|
4
|
-
import { ALL_RIGHT_CRITERIAS, RIGHT_CRITERIA_USER_ENTRY, RIGHT_CRITERIA_VALUE, } from '../../../../types/right-criteria';
|
|
5
|
-
export const ConditionBuilderTemplate = html `
|
|
6
|
-
<div class="condition-builder">
|
|
7
|
-
<zero-select :value=${sync((x) => x.leftValue)} class="left-value">
|
|
8
|
-
${repeat((x) => x.leftValueItems, html `
|
|
9
|
-
<zero-option value=${(x) => JSON.stringify(x)}>${(x) => x.FIELD_NAME}</zero-option>
|
|
10
|
-
`)}
|
|
11
|
-
</zero-select>
|
|
12
|
-
|
|
13
|
-
<zero-select class="logical-operator" :value=${sync((x) => x.logicalOperator)}>
|
|
14
|
-
${repeat((x) => ALL_LOGICAL_OPERATORS, html `
|
|
15
|
-
<zero-option value=${(x) => x}>${(x) => x}</zero-option>
|
|
16
|
-
`)}
|
|
17
|
-
</zero-select>
|
|
18
|
-
|
|
19
|
-
<zero-select class="right-criteria" :value=${sync((x) => x.rightCriteria)}>
|
|
20
|
-
${repeat((x) => ALL_RIGHT_CRITERIAS, html `
|
|
21
|
-
<zero-option value=${(x) => x}>${(x) => x}</zero-option>
|
|
22
|
-
`)}
|
|
23
|
-
</zero-select>
|
|
24
|
-
|
|
25
|
-
${when((x) => x.rightCriteria === RIGHT_CRITERIA_VALUE, html `
|
|
26
|
-
<zero-text-field
|
|
27
|
-
class="right-criteria-value"
|
|
28
|
-
:value=${sync((x) => x.rightValueText)}
|
|
29
|
-
placeholder="Value"
|
|
30
|
-
></zero-text-field>
|
|
31
|
-
`)}
|
|
32
|
-
${when((x) => x.rightCriteria === RIGHT_CRITERIA_USER_ENTRY, html `
|
|
33
|
-
<zero-select class="right-criteria-user-entry" :value=${sync((x) => x.rightValueUserEntry)}>
|
|
34
|
-
${(x) => x.rightValueItemsProperty}
|
|
35
|
-
</zero-select>
|
|
36
|
-
`)}
|
|
37
|
-
|
|
38
|
-
<zero-button appearance="icon" class="delete" @click=${(x) => x.deleteCondition()}>
|
|
39
|
-
<zero-icon name="trash" part="icon"></zero-icon>
|
|
40
|
-
</zero-button>
|
|
41
|
-
</div>
|
|
42
|
-
`;
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
import { __decorate } from "tslib";
|
|
2
|
-
import { UUID } from '@genesislcap/foundation-utils';
|
|
3
|
-
import { LOGICAL_OPERATOR_EQUALS } from '../../../types/logical-operator';
|
|
4
|
-
import { PARAM_SOURCE_TYPE_USER_TEXT } from '../../../types/param-source-type';
|
|
5
|
-
import { PARAM_TYPE_FIELD, PARAM_TYPE_STRING } from '../../../types/param-type';
|
|
6
|
-
import { RIGHT_CRITERIA_VALUE } from '../../../types/right-criteria';
|
|
7
|
-
export class UUIDGenerator {
|
|
8
|
-
static createUuid() {
|
|
9
|
-
return this.uuid.createId();
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
__decorate([
|
|
13
|
-
UUID
|
|
14
|
-
], UUIDGenerator, "uuid", void 0);
|
|
15
|
-
export function createEmptyCondition() {
|
|
16
|
-
return {
|
|
17
|
-
ID: null,
|
|
18
|
-
LEFT_VALUE: null,
|
|
19
|
-
LOGICAL_OPERATOR: LOGICAL_OPERATOR_EQUALS,
|
|
20
|
-
RIGHT_CRITERIA: RIGHT_CRITERIA_VALUE,
|
|
21
|
-
RIGHT_VALUE: null,
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
export function createEmptyParameter() {
|
|
25
|
-
return {
|
|
26
|
-
UUID: UUIDGenerator.createUuid(),
|
|
27
|
-
PARAM_NAME: null,
|
|
28
|
-
PARAM_LABEL: null,
|
|
29
|
-
PARAM_TYPE: PARAM_TYPE_STRING,
|
|
30
|
-
PARAM_SOURCE_TYPE: PARAM_SOURCE_TYPE_USER_TEXT,
|
|
31
|
-
PARAM_SOURCE: null,
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
export function createAssignment(field, value) {
|
|
35
|
-
return {
|
|
36
|
-
FIELD: {
|
|
37
|
-
TYPE: 'FIELD',
|
|
38
|
-
NAME: field,
|
|
39
|
-
},
|
|
40
|
-
VALUE: {
|
|
41
|
-
TYPE: 'STRING',
|
|
42
|
-
VALUE: value,
|
|
43
|
-
},
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
export function getAssignmentValue(assignments, field) {
|
|
47
|
-
return assignments.find((assignment) => assignment.FIELD.NAME === field).VALUE.VALUE;
|
|
48
|
-
}
|
|
49
|
-
export function createConditions(conditions, parameters) {
|
|
50
|
-
return conditions.map((condition) => {
|
|
51
|
-
return {
|
|
52
|
-
LEFT: getLeftExpression(condition),
|
|
53
|
-
OPERATION: condition.LOGICAL_OPERATOR,
|
|
54
|
-
RIGHT: getRightExpression(condition, parameters),
|
|
55
|
-
};
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
export function getLeftExpression(condition) {
|
|
59
|
-
return {
|
|
60
|
-
TYPE: PARAM_TYPE_FIELD,
|
|
61
|
-
NAME: condition.LEFT_VALUE.FIELD_NAME,
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
export function getRightExpression(condition, parameters) {
|
|
65
|
-
switch (condition.RIGHT_CRITERIA) {
|
|
66
|
-
case 'USER_ENTRY':
|
|
67
|
-
return {
|
|
68
|
-
TYPE: 'PLACEHOLDER',
|
|
69
|
-
KEY: parameters.find((parameter) => parameter.UUID === condition.RIGHT_VALUE).PARAM_NAME,
|
|
70
|
-
};
|
|
71
|
-
case 'FIELD': // Only for Rules
|
|
72
|
-
return {
|
|
73
|
-
TYPE: 'FIELD',
|
|
74
|
-
NAME: condition.RIGHT_VALUE,
|
|
75
|
-
};
|
|
76
|
-
default:
|
|
77
|
-
switch (condition.LEFT_VALUE.FIELD_TYPE) {
|
|
78
|
-
case 'BOOLEAN':
|
|
79
|
-
return {
|
|
80
|
-
TYPE: 'BOOLEAN',
|
|
81
|
-
VALUE: condition.RIGHT_VALUE,
|
|
82
|
-
};
|
|
83
|
-
case 'STRING':
|
|
84
|
-
case 'ENUM':
|
|
85
|
-
return {
|
|
86
|
-
TYPE: 'STRING',
|
|
87
|
-
VALUE: condition.RIGHT_VALUE,
|
|
88
|
-
};
|
|
89
|
-
case 'INT':
|
|
90
|
-
case 'SHORT':
|
|
91
|
-
case 'DOUBLE':
|
|
92
|
-
case 'LONG':
|
|
93
|
-
case 'BIGDECIMAL':
|
|
94
|
-
return {
|
|
95
|
-
TYPE: 'NUMBER',
|
|
96
|
-
VALUE: condition.RIGHT_VALUE,
|
|
97
|
-
};
|
|
98
|
-
default:
|
|
99
|
-
return {
|
|
100
|
-
TYPE: 'FIELD',
|
|
101
|
-
NAME: condition.RIGHT_VALUE,
|
|
102
|
-
};
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
export function createParameterDetails(parameters) {
|
|
107
|
-
const map = {};
|
|
108
|
-
parameters.forEach((parameter) => {
|
|
109
|
-
var _a;
|
|
110
|
-
map[parameter.PARAM_NAME] = {
|
|
111
|
-
PARAM_LABEL: parameter.PARAM_LABEL,
|
|
112
|
-
PARAM_TYPE: parameter.PARAM_TYPE,
|
|
113
|
-
PARAM_SOURCE_TYPE: parameter.PARAM_SOURCE_TYPE,
|
|
114
|
-
PARAM_SOURCE: (_a = parameter.PARAM_SOURCE) !== null && _a !== void 0 ? _a : '',
|
|
115
|
-
PARAM_OPERATOR: 'EQUALS',
|
|
116
|
-
};
|
|
117
|
-
});
|
|
118
|
-
return map;
|
|
119
|
-
}
|
package/dist/esm/components/foundation-notification-dashboard/styles/rules-and-templates.styles.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { css } from '@microsoft/fast-element';
|
|
2
|
-
export const rulesAndTemplatesStyles = css `
|
|
3
|
-
.container {
|
|
4
|
-
display: flex;
|
|
5
|
-
height: 100%;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.header {
|
|
10
|
-
display: flex;
|
|
11
|
-
flex-direction: row-reverse;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.grid {
|
|
15
|
-
height: 100%;
|
|
16
|
-
}
|
|
17
|
-
`;
|