@genesislcap/pbc-notify-ui 1.0.23 → 1.0.24
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/.husky/commit-msg +3 -0
- package/.husky/pre-commit +4 -0
- package/commitlint.config.js +25 -0
- 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/components/foundation-inbox-flyout/foundation-inbox-flyout.d.ts.map +1 -1
- package/dist/dts/components/foundation-inbox/components/foundation-inbox-flyout/foundation-inbox-flyout.template.d.ts.map +1 -1
- package/dist/dts/components/foundation-inbox/components/inbox-subscription/inbox-subscription.d.ts +3 -3
- package/dist/dts/components/foundation-inbox/components/inbox-subscription/inbox-subscription.d.ts.map +1 -1
- package/dist/dts/components/foundation-inbox/components/inbox-subscription/inbox-subscription.template.d.ts.map +1 -1
- package/dist/dts/components/foundation-inbox/components/inbox-subscription/rule-parameter/rule-parameter.d.ts +2 -2
- package/dist/dts/components/foundation-inbox/components/inbox-subscription/rule-parameter/rule-parameter.d.ts.map +1 -1
- package/dist/dts/components/foundation-inbox/components/inbox-subscription/rule-parameter/rule-parameter.template.d.ts +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 +8 -8
- package/dist/dts/components/foundation-inbox/inbox-base/inbox-base.d.ts.map +1 -1
- package/dist/dts/components/foundation-inbox/inbox.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.map +1 -1
- package/dist/dts/components/foundation-inbox/inbox.types.d.ts.map +1 -1
- package/dist/dts/components/foundation-inbox/inbox.utils.d.ts.map +1 -1
- package/dist/dts/components/foundation-notification-dashboard/components/notify-audit/notify-audit-management.d.ts.map +1 -1
- package/dist/dts/components/foundation-notification-dashboard/components/routes/route-management.d.ts +1 -1
- package/dist/dts/components/foundation-notification-dashboard/components/routes/tabs/email-distribution-route-management.d.ts.map +1 -1
- package/dist/dts/components/foundation-notification-dashboard/components/routes/tabs/email-user-route-management.d.ts.map +1 -1
- package/dist/dts/components/foundation-notification-dashboard/components/routes/tabs/log-route-management.d.ts.map +1 -1
- package/dist/dts/components/foundation-notification-dashboard/components/routes/tabs/ms-teams-route-management.d.ts.map +1 -1
- package/dist/dts/components/foundation-notification-dashboard/components/routes/tabs/screen-route-management.d.ts.map +1 -1
- package/dist/dts/components/foundation-notification-dashboard/components/rules/columns.d.ts +1 -1
- package/dist/dts/components/foundation-notification-dashboard/components/rules/columns.d.ts.map +1 -1
- 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.map +1 -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.styles.d.ts.map +1 -1
- package/dist/dts/components/foundation-notification-dashboard/components/rules/rule-dialog/rule-dialog.template.d.ts +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.map +1 -1
- package/dist/dts/components/foundation-notification-dashboard/components/rules/rule-management.d.ts +1 -1
- package/dist/dts/components/foundation-notification-dashboard/components/rules/rule-management.d.ts.map +1 -1
- package/dist/dts/components/foundation-notification-dashboard/components/templates/columns.d.ts +1 -1
- package/dist/dts/components/foundation-notification-dashboard/components/templates/columns.d.ts.map +1 -1
- package/dist/dts/components/foundation-notification-dashboard/components/templates/template-dialog/condition-builder/condition-builder.d.ts.map +1 -1
- package/dist/dts/components/foundation-notification-dashboard/components/templates/template-dialog/condition-builder/condition-builder.template.d.ts +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.d.ts +3 -3
- package/dist/dts/components/foundation-notification-dashboard/components/templates/template-dialog/parameter-builder/parameter-builder.d.ts.map +1 -1
- package/dist/dts/components/foundation-notification-dashboard/components/templates/template-dialog/parameter-builder/parameter-builder.template.d.ts +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.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 +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.map +1 -1
- package/dist/dts/components/foundation-notification-dashboard/components/templates/template-dialog/template-dialog.utils.d.ts +1 -1
- package/dist/dts/components/foundation-notification-dashboard/components/templates/template-dialog/template-dialog.utils.d.ts.map +1 -1
- package/dist/dts/components/foundation-notification-dashboard/components/templates/template-management.d.ts +1 -1
- package/dist/dts/components/foundation-notification-dashboard/components/templates/template-management.d.ts.map +1 -1
- package/dist/dts/components/foundation-notification-dashboard/notification-dashboard.d.ts +1 -1
- package/dist/dts/components/foundation-notification-dashboard/notification-dashboard.d.ts.map +1 -1
- package/dist/dts/components/foundation-notification-dashboard/notification-dashboard.template.d.ts.map +1 -1
- package/dist/dts/components/foundation-notification-dashboard/types/right-criteria.d.ts.map +1 -1
- package/dist/dts/components/foundation-notification-dashboard/types/rule-execution-strategy.d.ts.map +1 -1
- package/dist/dts/services/alert.service.d.ts.map +1 -1
- package/dist/dts/services/notify.service.d.ts.map +1 -1
- package/dist/dts/services/rule.service.d.ts.map +1 -1
- package/dist/dts/services/system.service.d.ts.map +1 -1
- package/dist/dts/services/template.service.d.ts.map +1 -1
- package/dist/dts/utils/eventDetail.d.ts +1 -1
- package/dist/dts/utils/gridConfig.d.ts.map +1 -1
- package/dist/dts/utils/humanize.d.ts.map +1 -1
- package/dist/dts/utils/icons.d.ts.map +1 -1
- package/dist/dts/utils/logger.d.ts.map +1 -1
- package/dist/dts/utils/updateArray.d.ts.map +1 -1
- package/dist/esm/components/components.js +10 -10
- package/dist/esm/components/foundation-inbox/components/foundation-inbox-counter/foundation-inbox-counter.template.js +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 +1 -1
- package/dist/esm/components/foundation-inbox/components/foundation-inbox-flyout/foundation-inbox-flyout.template.js +5 -10
- package/dist/esm/components/foundation-inbox/components/inbox-subscription/inbox-subscription.js +9 -11
- package/dist/esm/components/foundation-inbox/components/inbox-subscription/inbox-subscription.styles.js +2 -2
- package/dist/esm/components/foundation-inbox/components/inbox-subscription/inbox-subscription.template.js +12 -13
- package/dist/esm/components/foundation-inbox/components/inbox-subscription/rule-parameter/rule-parameter.js +6 -6
- package/dist/esm/components/foundation-inbox/components/inbox-subscription/rule-parameter/rule-parameter.styles.js +1 -1
- package/dist/esm/components/foundation-inbox/components/inbox-subscription/rule-parameter/rule-parameter.template.js +27 -32
- package/dist/esm/components/foundation-inbox/inbox-base/inbox-base.js +15 -22
- package/dist/esm/components/foundation-inbox/inbox.js +1 -1
- package/dist/esm/components/foundation-inbox/inbox.styles.js +17 -33
- package/dist/esm/components/foundation-inbox/inbox.template.js +44 -37
- package/dist/esm/components/foundation-inbox/inbox.utils.js +4 -8
- package/dist/esm/components/foundation-notification-dashboard/components/notify-audit/notify-audit-management.js +9 -10
- package/dist/esm/components/foundation-notification-dashboard/components/routes/route-management.js +4 -4
- package/dist/esm/components/foundation-notification-dashboard/components/routes/tabs/email-distribution-route-management.js +8 -9
- package/dist/esm/components/foundation-notification-dashboard/components/routes/tabs/email-user-route-management.js +8 -9
- package/dist/esm/components/foundation-notification-dashboard/components/routes/tabs/log-route-management.js +11 -12
- package/dist/esm/components/foundation-notification-dashboard/components/routes/tabs/ms-teams-route-management.js +12 -13
- package/dist/esm/components/foundation-notification-dashboard/components/routes/tabs/screen-route-management.js +17 -18
- package/dist/esm/components/foundation-notification-dashboard/components/rules/columns.js +10 -10
- package/dist/esm/components/foundation-notification-dashboard/components/rules/rule-dialog/rule-condition-builder/rule-condition-builder.js +2 -2
- package/dist/esm/components/foundation-notification-dashboard/components/rules/rule-dialog/rule-condition-builder/rule-condition-builder.styles.js +2 -2
- package/dist/esm/components/foundation-notification-dashboard/components/rules/rule-dialog/rule-condition-builder/rule-condition-builder.template.js +21 -32
- package/dist/esm/components/foundation-notification-dashboard/components/rules/rule-dialog/rule-dialog.js +12 -19
- package/dist/esm/components/foundation-notification-dashboard/components/rules/rule-dialog/rule-dialog.styles.js +9 -7
- package/dist/esm/components/foundation-notification-dashboard/components/rules/rule-dialog/rule-dialog.template.js +29 -61
- package/dist/esm/components/foundation-notification-dashboard/components/rules/rule-management.js +15 -19
- package/dist/esm/components/foundation-notification-dashboard/components/templates/columns.js +10 -10
- package/dist/esm/components/foundation-notification-dashboard/components/templates/template-dialog/condition-builder/condition-builder.js +4 -8
- package/dist/esm/components/foundation-notification-dashboard/components/templates/template-dialog/condition-builder/condition-builder.styles.js +2 -2
- package/dist/esm/components/foundation-notification-dashboard/components/templates/template-dialog/condition-builder/condition-builder.template.js +25 -43
- package/dist/esm/components/foundation-notification-dashboard/components/templates/template-dialog/parameter-builder/parameter-builder.js +4 -8
- package/dist/esm/components/foundation-notification-dashboard/components/templates/template-dialog/parameter-builder/parameter-builder.styles.js +4 -4
- package/dist/esm/components/foundation-notification-dashboard/components/templates/template-dialog/parameter-builder/parameter-builder.template.js +25 -42
- package/dist/esm/components/foundation-notification-dashboard/components/templates/template-dialog/template-dialog.js +23 -23
- package/dist/esm/components/foundation-notification-dashboard/components/templates/template-dialog/template-dialog.styles.js +7 -8
- package/dist/esm/components/foundation-notification-dashboard/components/templates/template-dialog/template-dialog.template.js +31 -69
- package/dist/esm/components/foundation-notification-dashboard/components/templates/template-dialog/template-dialog.utils.js +18 -18
- package/dist/esm/components/foundation-notification-dashboard/components/templates/template-management.js +15 -19
- package/dist/esm/components/foundation-notification-dashboard/notification-dashboard.js +2 -2
- package/dist/esm/components/foundation-notification-dashboard/notification-dashboard.tabs.js +5 -5
- package/dist/esm/components/foundation-notification-dashboard/notification-dashboard.template.js +7 -5
- package/dist/esm/components/foundation-notification-dashboard/styles/management.styles.js +1 -1
- package/dist/esm/components/foundation-notification-dashboard/styles/rules-and-templates.styles.js +1 -1
- package/dist/esm/components/foundation-notification-dashboard/types/expression-type.js +1 -1
- package/dist/esm/components/foundation-notification-dashboard/types/right-criteria.js +1 -4
- package/dist/esm/components/foundation-notification-dashboard/types/rule-execution-strategy.js +1 -4
- package/dist/esm/components/foundation-notification-dashboard/types/severity.js +1 -1
- package/dist/esm/index.federated.js +1 -0
- package/dist/esm/services/alert.service.js +3 -3
- package/dist/esm/services/notify.service.js +6 -6
- package/dist/esm/services/rule.service.js +15 -12
- package/dist/esm/services/system.service.js +11 -8
- package/dist/esm/services/template.service.js +11 -9
- package/dist/esm/utils/gridConfig.js +1 -1
- package/dist/esm/utils/humanize.js +3 -2
- package/dist/esm/utils/icons.js +3 -10
- package/dist/esm/utils/notifyPermissions.js +4 -4
- package/package.json +43 -5
- package/scripts/commitlint.js +24 -0
|
@@ -1,60 +1,49 @@
|
|
|
1
1
|
import { sync } from '@genesislcap/foundation-utils';
|
|
2
|
-
import { html, repeat } from
|
|
2
|
+
import { html, repeat } from '@microsoft/fast-element';
|
|
3
3
|
import { classNames } from '@microsoft/fast-web-utilities';
|
|
4
|
-
import { RIGHT_CRITERIA } from './rule-condition-builder.types';
|
|
5
4
|
import { ALL_LOGICAL_OPERATORS } from '../../../../types/logical-operator';
|
|
5
|
+
import { RIGHT_CRITERIA } from './rule-condition-builder.types';
|
|
6
6
|
export const ConditionBuilderTemplate = html `
|
|
7
7
|
<div class="condition-builder">
|
|
8
8
|
<zero-select
|
|
9
|
-
:value=${sync(x => x.leftValue)}
|
|
10
|
-
:initialValue=${sync(x => x.leftValue)}
|
|
9
|
+
:value=${sync((x) => x.leftValue)}
|
|
10
|
+
:initialValue=${sync((x) => x.leftValue)}
|
|
11
11
|
class="left-value"
|
|
12
12
|
>
|
|
13
|
-
${repeat(x => x.resourceFields, html `
|
|
14
|
-
<zero-option value=${x => JSON.stringify(x)}>${x => x.FIELD_NAME}</zero-option>
|
|
13
|
+
${repeat((x) => x.resourceFields, html `
|
|
14
|
+
<zero-option value=${(x) => JSON.stringify(x)}>${(x) => x.FIELD_NAME}</zero-option>
|
|
15
15
|
`)}
|
|
16
16
|
</zero-select>
|
|
17
17
|
|
|
18
|
-
<zero-select
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
>
|
|
22
|
-
${repeat(x => ALL_LOGICAL_OPERATORS, html `
|
|
23
|
-
<zero-option value=${x => x}>${x => x}</zero-option>
|
|
18
|
+
<zero-select class="logical-operator" :value=${sync((x) => x.logicalOperator)}>
|
|
19
|
+
${repeat((x) => ALL_LOGICAL_OPERATORS, html `
|
|
20
|
+
<zero-option value=${(x) => x}>${(x) => x}</zero-option>
|
|
24
21
|
`)}
|
|
25
22
|
</zero-select>
|
|
26
23
|
|
|
27
|
-
<zero-select
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
>
|
|
31
|
-
${repeat(x => Object.values(RIGHT_CRITERIA), html `
|
|
32
|
-
<zero-option value=${x => x}>${x => x}</zero-option>
|
|
24
|
+
<zero-select class="right-criteria" :value=${sync((x) => x.rightCriteria)}>
|
|
25
|
+
${repeat((x) => Object.values(RIGHT_CRITERIA), html `
|
|
26
|
+
<zero-option value=${(x) => x}>${(x) => x}</zero-option>
|
|
33
27
|
`)}
|
|
34
28
|
</zero-select>
|
|
35
29
|
|
|
36
30
|
<zero-text-field
|
|
37
|
-
class="right-criteria-value ${x => classNames(['display-none', x.rightCriteria !== RIGHT_CRITERIA.VALUE])}"
|
|
38
|
-
:value=${sync(x => x.rightValueText)}
|
|
31
|
+
class="right-criteria-value ${(x) => classNames(['display-none', x.rightCriteria !== RIGHT_CRITERIA.VALUE])}"
|
|
32
|
+
:value=${sync((x) => x.rightValueText)}
|
|
39
33
|
placeholder="Value"
|
|
40
34
|
autocomplete="off"
|
|
41
|
-
>
|
|
42
|
-
|
|
43
|
-
|
|
35
|
+
></zero-text-field>
|
|
36
|
+
|
|
44
37
|
<zero-select
|
|
45
|
-
class="right-criteria-user-entry ${x => classNames(['display-none', x.rightCriteria !== RIGHT_CRITERIA.FIELD])}"
|
|
46
|
-
:value=${sync(x => x.rightValueUserEntry)}
|
|
38
|
+
class="right-criteria-user-entry ${(x) => classNames(['display-none', x.rightCriteria !== RIGHT_CRITERIA.FIELD])}"
|
|
39
|
+
:value=${sync((x) => x.rightValueUserEntry)}
|
|
47
40
|
>
|
|
48
|
-
${repeat(x => x.resourceFields, html `
|
|
49
|
-
<zero-option value=${x => x.FIELD_NAME}>${x => x.FIELD_NAME}</zero-option>
|
|
41
|
+
${repeat((x) => x.resourceFields, html `
|
|
42
|
+
<zero-option value=${(x) => x.FIELD_NAME}>${(x) => x.FIELD_NAME}</zero-option>
|
|
50
43
|
`)}
|
|
51
44
|
</zero-select>
|
|
52
45
|
|
|
53
|
-
<zero-button
|
|
54
|
-
appearance="icon"
|
|
55
|
-
class="delete"
|
|
56
|
-
@click=${x => x.deleteCondition()}
|
|
57
|
-
>
|
|
46
|
+
<zero-button appearance="icon" class="delete" @click=${(x) => x.deleteCondition()}>
|
|
58
47
|
<zero-icon name="trash" part="icon"></zero-icon>
|
|
59
48
|
</zero-button>
|
|
60
49
|
</div>
|
|
@@ -8,8 +8,8 @@ import { humanize } from '../../../../../utils';
|
|
|
8
8
|
import { EXPRESSION_TYPE_PLACEHOLDER } from '../../../types/expression-type';
|
|
9
9
|
import { LOGICAL_OPERATOR_EQUALS } from '../../../types/logical-operator';
|
|
10
10
|
import { SEVERITY_INFORMATION } from '../../../types/severity';
|
|
11
|
-
import { createAssignment, createConditions, getAssignmentValue, UUIDGenerator } from '../../templates/template-dialog/template-dialog.utils';
|
|
12
|
-
import { RIGHT_CRITERIA } from './rule-condition-builder/rule-condition-builder.types';
|
|
11
|
+
import { createAssignment, createConditions, getAssignmentValue, UUIDGenerator, } from '../../templates/template-dialog/template-dialog.utils';
|
|
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
15
|
import { RuleDialogMode } from './rule-dialog.types';
|
|
@@ -43,18 +43,16 @@ let RuleDialog = class RuleDialog extends FASTElement {
|
|
|
43
43
|
this.description = rule.RULE_DESCRIPTION;
|
|
44
44
|
this.resource = rule.RULE_TABLE;
|
|
45
45
|
// Conditions
|
|
46
|
-
this.conditions = (_a = rule.RULE_EXPRESSION.CONDITIONS) === null || _a === void 0 ? void 0 : _a.map(condition => {
|
|
46
|
+
this.conditions = (_a = rule.RULE_EXPRESSION.CONDITIONS) === null || _a === void 0 ? void 0 : _a.map((condition) => {
|
|
47
47
|
var _a, _b;
|
|
48
48
|
return {
|
|
49
49
|
ID: UUIDGenerator.createUuid(),
|
|
50
50
|
LEFT_VALUE: (_a = condition.LEFT.VALUE) !== null && _a !== void 0 ? _a : condition.LEFT.NAME,
|
|
51
51
|
LOGICAL_OPERATOR: condition.OPERATION,
|
|
52
|
-
RIGHT_CRITERIA: condition.RIGHT.TYPE === 'FIELD'
|
|
53
|
-
? RIGHT_CRITERIA.FIELD
|
|
54
|
-
: RIGHT_CRITERIA.VALUE,
|
|
52
|
+
RIGHT_CRITERIA: condition.RIGHT.TYPE === 'FIELD' ? RIGHT_CRITERIA.FIELD : RIGHT_CRITERIA.VALUE,
|
|
55
53
|
RIGHT_VALUE: condition.RIGHT.TYPE === EXPRESSION_TYPE_PLACEHOLDER
|
|
56
54
|
? condition.RIGHT.KEY
|
|
57
|
-
: (_b = condition.RIGHT.VALUE) !== null && _b !== void 0 ? _b : condition.RIGHT.NAME
|
|
55
|
+
: (_b = condition.RIGHT.VALUE) !== null && _b !== void 0 ? _b : condition.RIGHT.NAME,
|
|
58
56
|
};
|
|
59
57
|
});
|
|
60
58
|
// Assignments
|
|
@@ -75,25 +73,21 @@ let RuleDialog = class RuleDialog extends FASTElement {
|
|
|
75
73
|
}
|
|
76
74
|
submit() {
|
|
77
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
|
-
CONDITIONS: createConditions(this.conditions, null)
|
|
76
|
+
CONDITIONS: createConditions(this.conditions, null),
|
|
79
77
|
}, RESULT_EXPRESSION: {
|
|
80
78
|
ASSIGNMENTS: [
|
|
81
79
|
createAssignment('TOPIC', this.topic),
|
|
82
80
|
createAssignment('HEADER', this.header),
|
|
83
81
|
createAssignment('BODY', this.message),
|
|
84
|
-
createAssignment('NOTIFY_SEVERITY', humanize(this.severity))
|
|
85
|
-
]
|
|
82
|
+
createAssignment('NOTIFY_SEVERITY', humanize(this.severity)),
|
|
83
|
+
],
|
|
86
84
|
} });
|
|
87
85
|
switch (this.ruleDialogMode) {
|
|
88
86
|
case RuleDialogMode.CREATE:
|
|
89
|
-
this.ruleService
|
|
90
|
-
.createRule(rule)
|
|
91
|
-
.then(response => this.validateResponse(response));
|
|
87
|
+
this.ruleService.createRule(rule).then((response) => this.validateResponse(response));
|
|
92
88
|
break;
|
|
93
89
|
case RuleDialogMode.EDIT:
|
|
94
|
-
this.ruleService
|
|
95
|
-
.updateRule(rule)
|
|
96
|
-
.then(response => this.validateResponse(response));
|
|
90
|
+
this.ruleService.updateRule(rule).then((response) => this.validateResponse(response));
|
|
97
91
|
break;
|
|
98
92
|
}
|
|
99
93
|
}
|
|
@@ -131,13 +125,12 @@ let RuleDialog = class RuleDialog extends FASTElement {
|
|
|
131
125
|
newCondition() {
|
|
132
126
|
this.conditions.push(this.createEmptyCondition());
|
|
133
127
|
}
|
|
134
|
-
editCondition(editedCondition) {
|
|
135
|
-
}
|
|
128
|
+
editCondition(editedCondition) { }
|
|
136
129
|
deleteCondition(deletedCondition) {
|
|
137
130
|
if (this.conditions.length <= 1) {
|
|
138
131
|
return;
|
|
139
132
|
}
|
|
140
|
-
this.conditions = this.conditions.filter(condition => condition !== deletedCondition);
|
|
133
|
+
this.conditions = this.conditions.filter((condition) => condition !== deletedCondition);
|
|
141
134
|
}
|
|
142
135
|
// #endregion
|
|
143
136
|
resourceChanged() {
|
|
@@ -4,7 +4,7 @@ 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
|
-
margin:
|
|
7
|
+
margin: 0;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
.rule-dialog-top {
|
|
@@ -15,9 +15,10 @@ const top = css `
|
|
|
15
15
|
const bottom = css `
|
|
16
16
|
zero-modal::part(bottom) {
|
|
17
17
|
padding: calc(var(--design-unit) * 4px);
|
|
18
|
-
border-top: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-divider-rest)
|
|
19
|
-
margin:
|
|
18
|
+
border-top: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-divider-rest);
|
|
19
|
+
margin: 0;
|
|
20
20
|
}
|
|
21
|
+
|
|
21
22
|
.rule-dialog-bottom {
|
|
22
23
|
display: flex;
|
|
23
24
|
}
|
|
@@ -53,12 +54,11 @@ export const RuleDialogStyles = css `
|
|
|
53
54
|
width: 100%;
|
|
54
55
|
gap: calc(var(--design-unit) * 2px);
|
|
55
56
|
}
|
|
56
|
-
|
|
57
|
+
|
|
57
58
|
.conditions {
|
|
58
59
|
border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-divider-rest);
|
|
59
60
|
border-radius: calc(var(--control-corner-radius) * 1px);
|
|
60
61
|
display: flex;
|
|
61
|
-
flex-direction: column;
|
|
62
62
|
padding: calc(var(--design-unit) * 2px);
|
|
63
63
|
flex-direction: column;
|
|
64
64
|
}
|
|
@@ -66,11 +66,11 @@ export const RuleDialogStyles = css `
|
|
|
66
66
|
.condition {
|
|
67
67
|
gap: 0;
|
|
68
68
|
flex-direction: column;
|
|
69
|
-
margin-bottom:
|
|
69
|
+
margin-bottom: 0;
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
zero-button {
|
|
73
|
-
margin:
|
|
73
|
+
margin: 0;
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
zero-select {
|
|
@@ -84,9 +84,11 @@ export const RuleDialogStyles = css `
|
|
|
84
84
|
.horizontal {
|
|
85
85
|
flex-direction: row;
|
|
86
86
|
}
|
|
87
|
+
|
|
87
88
|
.destination {
|
|
88
89
|
align-self: center;
|
|
89
90
|
}
|
|
91
|
+
|
|
90
92
|
.topic {
|
|
91
93
|
min-width: revert-layer;
|
|
92
94
|
}
|
|
@@ -1,75 +1,59 @@
|
|
|
1
1
|
import { sync } from '@genesislcap/foundation-utils';
|
|
2
|
-
import { html, ref, repeat } from
|
|
3
|
-
import { ALL_SEVERITIES } from '../../../types/severity';
|
|
2
|
+
import { html, ref, repeat } from '@microsoft/fast-element';
|
|
4
3
|
import { eventDetail } from '../../../../../utils/eventDetail';
|
|
4
|
+
import { ALL_SEVERITIES } from '../../../types/severity';
|
|
5
5
|
export const RuleDialogTemplate = html `
|
|
6
|
-
<zero-modal
|
|
7
|
-
|
|
8
|
-
class="rule-dialog"
|
|
9
|
-
:onCloseCallback=${(x) => () => x.close()}
|
|
10
|
-
>
|
|
11
|
-
<div slot="top" class="rule-dialog-top">
|
|
12
|
-
${x => x.ruleDialogTitle}
|
|
13
|
-
</div>
|
|
6
|
+
<zero-modal ${ref('dialog')} class="rule-dialog" :onCloseCallback=${(x) => () => x.close()}>
|
|
7
|
+
<div slot="top" class="rule-dialog-top">${(x) => x.ruleDialogTitle}</div>
|
|
14
8
|
|
|
15
9
|
<div class="rule-dialog-content">
|
|
16
10
|
<div class="content-row">
|
|
17
11
|
<div class="control">
|
|
18
12
|
<label>Name</label>
|
|
19
13
|
<zero-text-field
|
|
20
|
-
:value=${sync(x => x.name)}
|
|
14
|
+
:value=${sync((x) => x.name)}
|
|
21
15
|
autofocus
|
|
22
16
|
autocomplete="off"
|
|
23
|
-
>
|
|
24
|
-
</zero-text-field>
|
|
17
|
+
></zero-text-field>
|
|
25
18
|
</div>
|
|
26
19
|
|
|
27
20
|
<div class="control">
|
|
28
21
|
<label>Description</label>
|
|
29
22
|
<zero-text-field
|
|
30
|
-
:value=${sync(x => x.description)}
|
|
23
|
+
:value=${sync((x) => x.description)}
|
|
31
24
|
autocomplete="off"
|
|
32
|
-
>
|
|
33
|
-
</zero-text-field>
|
|
25
|
+
></zero-text-field>
|
|
34
26
|
</div>
|
|
35
27
|
</div>
|
|
36
28
|
|
|
37
29
|
<div class="content-row">
|
|
38
30
|
<div class="control">
|
|
39
31
|
<label>Resource</label>
|
|
40
|
-
<zero-select
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
>
|
|
44
|
-
${repeat(x => x.resources, html `
|
|
45
|
-
<zero-option value=${x => x}>${x => x}</zero-option>
|
|
32
|
+
<zero-select :value=${sync((x) => x.resource)} position="below">
|
|
33
|
+
${repeat((x) => x.resources, html `
|
|
34
|
+
<zero-option value=${(x) => x}>${(x) => x}</zero-option>
|
|
46
35
|
`)}
|
|
47
36
|
</zero-select>
|
|
48
37
|
</div>
|
|
49
38
|
|
|
50
39
|
<div class="control">
|
|
51
40
|
<label>Topic</label>
|
|
52
|
-
<zero-select
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
${repeat(x => x.topics, html `
|
|
56
|
-
<zero-option value=${x => x}>${x => x}</zero-option>
|
|
41
|
+
<zero-select :value=${sync((x) => x.topic)}>
|
|
42
|
+
${repeat((x) => x.topics, html `
|
|
43
|
+
<zero-option value=${(x) => x}>${(x) => x}</zero-option>
|
|
57
44
|
`)}
|
|
58
45
|
</zero-select>
|
|
59
46
|
</div>
|
|
60
|
-
|
|
47
|
+
|
|
61
48
|
<div class="control">
|
|
62
49
|
<label>Severity</label>
|
|
63
|
-
<zero-select
|
|
64
|
-
:value=${sync(x => x.severity)}
|
|
65
|
-
>
|
|
50
|
+
<zero-select :value=${sync((x) => x.severity)}>
|
|
66
51
|
<options-datasource
|
|
67
|
-
value-field=
|
|
68
|
-
label-field=
|
|
69
|
-
option-element=
|
|
70
|
-
:data=${_ => ALL_SEVERITIES.map(value => ({ value, label: value }))}
|
|
71
|
-
>
|
|
72
|
-
</options-datasource>
|
|
52
|
+
value-field="value"
|
|
53
|
+
label-field="value"
|
|
54
|
+
option-element="zero-option"
|
|
55
|
+
:data=${(_) => ALL_SEVERITIES.map((value) => ({ value, label: value }))}
|
|
56
|
+
></options-datasource>
|
|
73
57
|
</zero-select>
|
|
74
58
|
</div>
|
|
75
59
|
</div>
|
|
@@ -77,20 +61,12 @@ export const RuleDialogTemplate = html `
|
|
|
77
61
|
<div class="content-row">
|
|
78
62
|
<div class="control">
|
|
79
63
|
<label>Header</label>
|
|
80
|
-
<zero-text-field
|
|
81
|
-
:value=${sync(x => x.header)}
|
|
82
|
-
autocomplete="off"
|
|
83
|
-
>
|
|
84
|
-
</zero-text-field>
|
|
64
|
+
<zero-text-field :value=${sync((x) => x.header)} autocomplete="off"></zero-text-field>
|
|
85
65
|
</div>
|
|
86
|
-
|
|
66
|
+
|
|
87
67
|
<div class="control">
|
|
88
68
|
<label>Message</label>
|
|
89
|
-
<zero-text-field
|
|
90
|
-
:value=${sync(x => x.message)}
|
|
91
|
-
autocomplete="off"
|
|
92
|
-
>
|
|
93
|
-
</zero-text-field>
|
|
69
|
+
<zero-text-field :value=${sync((x) => x.message)} autocomplete="off"></zero-text-field>
|
|
94
70
|
</div>
|
|
95
71
|
</div>
|
|
96
72
|
|
|
@@ -98,21 +74,18 @@ export const RuleDialogTemplate = html `
|
|
|
98
74
|
<label>Condition(s)</label>
|
|
99
75
|
<div class="conditions">
|
|
100
76
|
<div class="content-row condition">
|
|
101
|
-
${repeat(x => x.conditions, html `
|
|
77
|
+
${repeat((x) => x.conditions, html `
|
|
102
78
|
<rule-condition-builder
|
|
103
79
|
:resource=${(x, c) => c.parent.resource}
|
|
104
|
-
:condition=${x => x}
|
|
80
|
+
:condition=${(x) => x}
|
|
105
81
|
@edit=${(x, c) => c.parent.editCondition(eventDetail(c))}
|
|
106
82
|
@delete=${(x, c) => c.parent.deleteCondition(eventDetail(c))}
|
|
107
|
-
>
|
|
108
|
-
</rule-condition-builder>
|
|
83
|
+
></rule-condition-builder>
|
|
109
84
|
`)}
|
|
110
85
|
</div>
|
|
111
86
|
|
|
112
87
|
<div class="content-row">
|
|
113
|
-
<zero-button
|
|
114
|
-
@click=${x => x.newCondition()}
|
|
115
|
-
>
|
|
88
|
+
<zero-button @click=${(x) => x.newCondition()}>
|
|
116
89
|
<zero-icon name="plus"></zero-icon>
|
|
117
90
|
Condition
|
|
118
91
|
</zero-button>
|
|
@@ -122,12 +95,7 @@ export const RuleDialogTemplate = html `
|
|
|
122
95
|
</div>
|
|
123
96
|
|
|
124
97
|
<div slot="bottom" class="rule-dialog-bottom">
|
|
125
|
-
<zero-button
|
|
126
|
-
appearance="accent"
|
|
127
|
-
@click=${x => x.submit()}
|
|
128
|
-
>
|
|
129
|
-
Submit
|
|
130
|
-
</zero-button>
|
|
98
|
+
<zero-button appearance="accent" @click=${(x) => x.submit()}>Submit</zero-button>
|
|
131
99
|
</div>
|
|
132
100
|
</zero-modal>
|
|
133
101
|
`;
|
package/dist/esm/components/foundation-notification-dashboard/components/rules/rule-management.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { __awaiter, __decorate } from "tslib";
|
|
2
|
-
import { css, customElement, FASTElement, html, ref, repeat } from '@microsoft/fast-element';
|
|
3
2
|
import { showNotificationDialog } from '@genesislcap/foundation-notifications';
|
|
4
|
-
import {
|
|
3
|
+
import { css, customElement, FASTElement, html, ref, repeat } from '@microsoft/fast-element';
|
|
4
|
+
import { RuleService } from '../../../../services/rule.service';
|
|
5
5
|
import { rulesAndTemplatesStyles } from '../../styles/rules-and-templates.styles';
|
|
6
6
|
import { RULE_MANAGEMENT_COLUMNS } from './columns';
|
|
7
|
-
import {
|
|
7
|
+
import { RuleDialogMode } from './rule-dialog/rule-dialog.types';
|
|
8
8
|
let RuleManagement = class RuleManagement extends FASTElement {
|
|
9
9
|
openRuleDialog() {
|
|
10
10
|
this.ruleDialog.openDialog({ mode: RuleDialogMode.CREATE });
|
|
@@ -22,12 +22,14 @@ let RuleManagement = class RuleManagement extends FASTElement {
|
|
|
22
22
|
dialog: {
|
|
23
23
|
dismissingAction: {
|
|
24
24
|
label: 'Dismiss',
|
|
25
|
-
action: () => null
|
|
25
|
+
action: () => null,
|
|
26
26
|
},
|
|
27
|
-
confirmingActions: [
|
|
27
|
+
confirmingActions: [
|
|
28
|
+
{
|
|
28
29
|
label: 'Confirm',
|
|
29
|
-
action: () => this.ruleService.deleteRule(rule.ID)
|
|
30
|
-
}
|
|
30
|
+
action: () => this.ruleService.deleteRule(rule.ID),
|
|
31
|
+
},
|
|
32
|
+
],
|
|
31
33
|
},
|
|
32
34
|
}, 'zero');
|
|
33
35
|
}
|
|
@@ -41,30 +43,24 @@ RuleManagement = __decorate([
|
|
|
41
43
|
template: html `
|
|
42
44
|
<div class="container">
|
|
43
45
|
<div class="header">
|
|
44
|
-
<zero-button
|
|
45
|
-
class="add"
|
|
46
|
-
@click=${x => x.openRuleDialog()}
|
|
47
|
-
>
|
|
46
|
+
<zero-button class="add" @click=${(x) => x.openRuleDialog()}>
|
|
48
47
|
<zero-icon name="plus" size="lg" variant="solid"></zero-icon>
|
|
49
48
|
Add
|
|
50
49
|
</zero-button>
|
|
51
50
|
</div>
|
|
52
|
-
|
|
51
|
+
|
|
53
52
|
<div class="grid">
|
|
54
53
|
<zero-grid-pro only-template-col-defs>
|
|
55
54
|
<grid-pro-genesis-datasource resource-name="ALL_DYNAMIC_NOTIFY_RULES">
|
|
56
|
-
${repeat(x => RULE_MANAGEMENT_COLUMNS(x), html `
|
|
57
|
-
<grid-pro-column :definition=${x => x} />
|
|
55
|
+
${repeat((x) => RULE_MANAGEMENT_COLUMNS(x), html `
|
|
56
|
+
<grid-pro-column :definition=${(x) => x} />
|
|
58
57
|
`)}
|
|
59
|
-
</grid-pro-genesis-datasource>
|
|
58
|
+
</grid-pro-genesis-datasource>
|
|
60
59
|
</zero-grid-pro>
|
|
61
60
|
</div>
|
|
62
61
|
</div>
|
|
63
62
|
|
|
64
|
-
<rule-dialog
|
|
65
|
-
${ref('ruleDialog')}
|
|
66
|
-
>
|
|
67
|
-
</rule-dialog>
|
|
63
|
+
<rule-dialog ${ref('ruleDialog')}></rule-dialog>
|
|
68
64
|
`,
|
|
69
65
|
styles: css `
|
|
70
66
|
${rulesAndTemplatesStyles}
|
package/dist/esm/components/foundation-notification-dashboard/components/templates/columns.js
CHANGED
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import { buttonCellRenderer } from
|
|
2
|
-
import { deleteIcon, editIcon } from
|
|
1
|
+
import { buttonCellRenderer } from '@genesislcap/foundation-entity-management';
|
|
2
|
+
import { deleteIcon, editIcon } from '../../../../utils';
|
|
3
3
|
export const TEMPLATE_MANAGEMENT_COLUMNS = (context) => [
|
|
4
4
|
{
|
|
5
5
|
field: 'NAME',
|
|
6
6
|
headerName: 'Name',
|
|
7
|
-
flex: 1
|
|
7
|
+
flex: 1,
|
|
8
8
|
},
|
|
9
9
|
{
|
|
10
10
|
field: 'DESCRIPTION',
|
|
11
11
|
headerName: 'Description',
|
|
12
|
-
flex: 1
|
|
12
|
+
flex: 1,
|
|
13
13
|
},
|
|
14
14
|
{
|
|
15
15
|
field: 'USER_NAME',
|
|
16
16
|
headerName: 'Username',
|
|
17
|
-
flex: 1
|
|
17
|
+
flex: 1,
|
|
18
18
|
},
|
|
19
19
|
{
|
|
20
20
|
field: 'RULE_TABLE',
|
|
21
21
|
headerName: 'Table',
|
|
22
|
-
flex: 1
|
|
22
|
+
flex: 1,
|
|
23
23
|
},
|
|
24
24
|
{
|
|
25
25
|
field: 'RULE_STATUS',
|
|
26
26
|
headerName: 'Status',
|
|
27
|
-
flex: 1
|
|
27
|
+
flex: 1,
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
30
|
field: 'RULE_EXPRESSION',
|
|
31
31
|
headerName: 'Expression',
|
|
32
|
-
flex: 1
|
|
32
|
+
flex: 1,
|
|
33
33
|
},
|
|
34
34
|
{
|
|
35
35
|
field: 'RESULT_EXPRESSION',
|
|
36
36
|
headerName: 'Result',
|
|
37
|
-
flex: 1
|
|
37
|
+
flex: 1,
|
|
38
38
|
},
|
|
39
39
|
{
|
|
40
40
|
field: 'RULE_EXECUTION_STRATEGY',
|
|
@@ -42,5 +42,5 @@ export const TEMPLATE_MANAGEMENT_COLUMNS = (context) => [
|
|
|
42
42
|
flex: 1,
|
|
43
43
|
},
|
|
44
44
|
buttonCellRenderer('Edit', (e) => context.editTemplate(e), editIcon),
|
|
45
|
-
buttonCellRenderer('Delete', (e) => context.deleteTemplate(e), deleteIcon)
|
|
45
|
+
buttonCellRenderer('Delete', (e) => context.deleteTemplate(e), deleteIcon),
|
|
46
46
|
];
|
|
@@ -39,7 +39,7 @@ let ConditionBuilder = class ConditionBuilder extends FASTElement {
|
|
|
39
39
|
}
|
|
40
40
|
createRightValueItems() {
|
|
41
41
|
let optionsInHTML = '';
|
|
42
|
-
this.rightValueItems.forEach(item => {
|
|
42
|
+
this.rightValueItems.forEach((item) => {
|
|
43
43
|
var _a, _b;
|
|
44
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
45
|
});
|
|
@@ -76,7 +76,7 @@ let ConditionBuilder = class ConditionBuilder extends FASTElement {
|
|
|
76
76
|
assignLeftValue() {
|
|
77
77
|
this.leftValue = this.condition.LEFT_VALUE
|
|
78
78
|
? typeof this.condition.LEFT_VALUE === 'string'
|
|
79
|
-
? JSON.stringify(this.leftValueItems.find(item => item.FIELD_NAME === this.condition.LEFT_VALUE)) // Edit
|
|
79
|
+
? JSON.stringify(this.leftValueItems.find((item) => item.FIELD_NAME === this.condition.LEFT_VALUE)) // Edit
|
|
80
80
|
: JSON.stringify(this.condition.LEFT_VALUE)
|
|
81
81
|
: JSON.stringify(this.leftValueItems[0]);
|
|
82
82
|
this.$emit('edit', this.condition);
|
|
@@ -87,9 +87,7 @@ let ConditionBuilder = class ConditionBuilder extends FASTElement {
|
|
|
87
87
|
this.rightValueText = this.condition.RIGHT_VALUE;
|
|
88
88
|
}
|
|
89
89
|
else {
|
|
90
|
-
this.rightValueUserEntry = ((_a = this.parameters) === null || _a === void 0 ? void 0 : _a.length) > 0
|
|
91
|
-
? this.condition.RIGHT_VALUE
|
|
92
|
-
: null;
|
|
90
|
+
this.rightValueUserEntry = ((_a = this.parameters) === null || _a === void 0 ? void 0 : _a.length) > 0 ? this.condition.RIGHT_VALUE : null;
|
|
93
91
|
}
|
|
94
92
|
this.$emit('edit', this.condition);
|
|
95
93
|
}
|
|
@@ -113,9 +111,7 @@ let ConditionBuilder = class ConditionBuilder extends FASTElement {
|
|
|
113
111
|
this.rightValueText = '';
|
|
114
112
|
}
|
|
115
113
|
else {
|
|
116
|
-
this.rightValueUserEntry = ((_a = this.parameters) === null || _a === void 0 ? void 0 : _a.length) > 0
|
|
117
|
-
? this.parameters[0].UUID
|
|
118
|
-
: null;
|
|
114
|
+
this.rightValueUserEntry = ((_a = this.parameters) === null || _a === void 0 ? void 0 : _a.length) > 0 ? this.parameters[0].UUID : null;
|
|
119
115
|
this.condition.RIGHT_VALUE = this.rightValueUserEntry;
|
|
120
116
|
}
|
|
121
117
|
this.$emit('edit', this.condition);
|
|
@@ -1,59 +1,41 @@
|
|
|
1
1
|
import { sync } from '@genesislcap/foundation-utils';
|
|
2
|
-
import { html, repeat, when } from
|
|
2
|
+
import { html, repeat, when } from '@microsoft/fast-element';
|
|
3
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';
|
|
4
|
+
import { ALL_RIGHT_CRITERIAS, RIGHT_CRITERIA_USER_ENTRY, RIGHT_CRITERIA_VALUE, } from '../../../../types/right-criteria';
|
|
5
5
|
export const ConditionBuilderTemplate = html `
|
|
6
6
|
<div class="condition-builder">
|
|
7
|
-
<zero-select
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
>
|
|
11
|
-
${repeat(x => x.leftValueItems, html `
|
|
12
|
-
<zero-option value=${x => JSON.stringify(x)}>${x => x.FIELD_NAME}</zero-option>
|
|
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>
|
|
13
10
|
`)}
|
|
14
11
|
</zero-select>
|
|
15
12
|
|
|
16
|
-
<zero-select
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
>
|
|
20
|
-
${repeat(x => ALL_LOGICAL_OPERATORS, html `
|
|
21
|
-
<zero-option value=${x => x}>${x => x}</zero-option>
|
|
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>
|
|
22
16
|
`)}
|
|
23
17
|
</zero-select>
|
|
24
|
-
|
|
25
|
-
<zero-select
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
>
|
|
29
|
-
${repeat(x => ALL_RIGHT_CRITERIAS, html `
|
|
30
|
-
<zero-option value=${x => x}>${x => x}</zero-option>
|
|
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>
|
|
31
22
|
`)}
|
|
32
23
|
</zero-select>
|
|
33
24
|
|
|
34
|
-
${when(x => x.rightCriteria === RIGHT_CRITERIA_VALUE, html `
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
`
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
:value=${sync(x => x.rightValueUserEntry)}
|
|
47
|
-
>
|
|
48
|
-
${x => x.rightValueItemsProperty}
|
|
49
|
-
</zero-select>
|
|
50
|
-
`)}
|
|
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
|
+
`)}
|
|
51
37
|
|
|
52
|
-
<zero-button
|
|
53
|
-
appearance="icon"
|
|
54
|
-
class="delete"
|
|
55
|
-
@click=${x => x.deleteCondition()}
|
|
56
|
-
>
|
|
38
|
+
<zero-button appearance="icon" class="delete" @click=${(x) => x.deleteCondition()}>
|
|
57
39
|
<zero-icon name="trash" part="icon"></zero-icon>
|
|
58
40
|
</zero-button>
|
|
59
41
|
</div>
|