@genesislcap/pbc-notify-ui 1.0.22 → 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 +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 +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 -33
- 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 +29 -18
- package/dist/esm/components/foundation-notification-dashboard/components/rules/rule-dialog/rule-dialog.template.js +30 -64
- 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 -47
- 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 -44
- package/dist/esm/components/foundation-notification-dashboard/components/templates/template-dialog/template-dialog.js +29 -29
- package/dist/esm/components/foundation-notification-dashboard/components/templates/template-dialog/template-dialog.styles.js +29 -21
- package/dist/esm/components/foundation-notification-dashboard/components/templates/template-dialog/template-dialog.template.js +32 -72
- 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,73 +1,52 @@
|
|
|
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 TemplateDialogTemplate = html `
|
|
6
|
-
<zero-modal
|
|
7
|
-
|
|
8
|
-
class="template-dialog"
|
|
9
|
-
:onCloseCallback=${(x) => () => x.close()}
|
|
10
|
-
>
|
|
11
|
-
<div slot="top" class="template-dialog-header-title">
|
|
12
|
-
${x => x.templateDialogTitle}
|
|
13
|
-
</div>
|
|
6
|
+
<zero-modal ${ref('dialog')} class="template-dialog" :onCloseCallback=${(x) => () => x.close()}>
|
|
7
|
+
<div slot="top" class="template-dialog-top">${(x) => x.templateDialogTitle}</div>
|
|
14
8
|
|
|
15
9
|
<div class="template-dialog-content">
|
|
16
10
|
<div class="content-row">
|
|
17
11
|
<div class="control">
|
|
18
12
|
<label>Name</label>
|
|
19
|
-
<zero-text-field
|
|
20
|
-
:value=${sync(x => x.name)}
|
|
21
|
-
autofocus
|
|
22
|
-
>
|
|
23
|
-
</zero-text-field>
|
|
13
|
+
<zero-text-field :value=${sync((x) => x.name)} autofocus></zero-text-field>
|
|
24
14
|
</div>
|
|
25
15
|
|
|
26
16
|
<div class="control">
|
|
27
17
|
<label>Description</label>
|
|
28
|
-
<zero-text-field
|
|
29
|
-
:value=${sync(x => x.description)}
|
|
30
|
-
>
|
|
31
|
-
</zero-text-field>
|
|
18
|
+
<zero-text-field :value=${sync((x) => x.description)}></zero-text-field>
|
|
32
19
|
</div>
|
|
33
20
|
</div>
|
|
34
21
|
|
|
35
22
|
<div class="content-row">
|
|
36
23
|
<div class="control">
|
|
37
24
|
<label>Resource</label>
|
|
38
|
-
<zero-select
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
>
|
|
42
|
-
${repeat(x => x.resources, html `
|
|
43
|
-
<zero-option value=${x => x}>${x => x}</zero-option>
|
|
25
|
+
<zero-select :value=${sync((x) => x.resource)} position="below">
|
|
26
|
+
${repeat((x) => x.resources, html `
|
|
27
|
+
<zero-option value=${(x) => x}>${(x) => x}</zero-option>
|
|
44
28
|
`)}
|
|
45
29
|
</zero-select>
|
|
46
30
|
</div>
|
|
47
31
|
|
|
48
32
|
<div class="control">
|
|
49
33
|
<label>Topic</label>
|
|
50
|
-
<zero-select
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
${repeat(x => x.topics, html `
|
|
54
|
-
<zero-option value=${x => x}>${x => x}</zero-option>
|
|
34
|
+
<zero-select :value=${sync((x) => x.topic)}>
|
|
35
|
+
${repeat((x) => x.topics, html `
|
|
36
|
+
<zero-option value=${(x) => x}>${(x) => x}</zero-option>
|
|
55
37
|
`)}
|
|
56
38
|
</zero-select>
|
|
57
39
|
</div>
|
|
58
40
|
|
|
59
41
|
<div class="control">
|
|
60
42
|
<label>Severity</label>
|
|
61
|
-
<zero-select
|
|
62
|
-
:value=${sync(x => x.severity)}
|
|
63
|
-
>
|
|
43
|
+
<zero-select :value=${sync((x) => x.severity)}>
|
|
64
44
|
<options-datasource
|
|
65
|
-
value-field=
|
|
66
|
-
label-field=
|
|
67
|
-
option-element=
|
|
68
|
-
:data=${_ => ALL_SEVERITIES.map(value => ({ value, label: value }))}
|
|
69
|
-
>
|
|
70
|
-
</options-datasource>
|
|
45
|
+
value-field="value"
|
|
46
|
+
label-field="value"
|
|
47
|
+
option-element="zero-option"
|
|
48
|
+
:data=${(_) => ALL_SEVERITIES.map((value) => ({ value, label: value }))}
|
|
49
|
+
></options-datasource>
|
|
71
50
|
</zero-select>
|
|
72
51
|
</div>
|
|
73
52
|
</div>
|
|
@@ -75,39 +54,30 @@ export const TemplateDialogTemplate = html `
|
|
|
75
54
|
<div class="content-row">
|
|
76
55
|
<div class="control">
|
|
77
56
|
<label>Header</label>
|
|
78
|
-
<zero-text-field
|
|
79
|
-
:value=${sync(x => x.header)}
|
|
80
|
-
>
|
|
81
|
-
</zero-text-field>
|
|
57
|
+
<zero-text-field :value=${sync((x) => x.header)}></zero-text-field>
|
|
82
58
|
</div>
|
|
83
59
|
|
|
84
60
|
<div class="control">
|
|
85
61
|
<label>Message</label>
|
|
86
|
-
<zero-text-field
|
|
87
|
-
:value=${sync(x => x.message)}
|
|
88
|
-
>
|
|
89
|
-
</zero-text-field>
|
|
62
|
+
<zero-text-field :value=${sync((x) => x.message)}></zero-text-field>
|
|
90
63
|
</div>
|
|
91
64
|
</div>
|
|
92
|
-
|
|
65
|
+
|
|
93
66
|
<div class="control">
|
|
94
67
|
<label>Parameter(s)</label>
|
|
95
68
|
<div class="parameters">
|
|
96
69
|
<div class="content-row parameter">
|
|
97
|
-
${repeat(x => x.parameters, html `
|
|
70
|
+
${repeat((x) => x.parameters, html `
|
|
98
71
|
<parameter-builder
|
|
99
|
-
:parameter=${x => x}
|
|
72
|
+
:parameter=${(x) => x}
|
|
100
73
|
@edit=${(x, c) => c.parent.editParameter(eventDetail(c))}
|
|
101
74
|
@delete=${(x, c) => c.parent.deleteParameter(eventDetail(c))}
|
|
102
|
-
>
|
|
103
|
-
</parameter-builder>
|
|
75
|
+
></parameter-builder>
|
|
104
76
|
`)}
|
|
105
77
|
</div>
|
|
106
|
-
|
|
78
|
+
|
|
107
79
|
<div class="content-row">
|
|
108
|
-
<zero-button
|
|
109
|
-
@click=${x => x.newParameter()}
|
|
110
|
-
>
|
|
80
|
+
<zero-button @click=${(x) => x.newParameter()}>
|
|
111
81
|
<zero-icon name="plus"></zero-icon>
|
|
112
82
|
Parameter
|
|
113
83
|
</zero-button>
|
|
@@ -119,22 +89,19 @@ export const TemplateDialogTemplate = html `
|
|
|
119
89
|
<label>Condition(s)</label>
|
|
120
90
|
<div class="conditions">
|
|
121
91
|
<div class="content-row condition">
|
|
122
|
-
${repeat(x => x.conditions, html `
|
|
92
|
+
${repeat((x) => x.conditions, html `
|
|
123
93
|
<condition-builder
|
|
124
94
|
:resource=${(x, c) => c.parent.resource}
|
|
125
95
|
:parameters=${(x, c) => c.parent.parameters}
|
|
126
|
-
:condition=${x => x}
|
|
96
|
+
:condition=${(x) => x}
|
|
127
97
|
@edit=${(x, c) => c.parent.editCondition(eventDetail(c))}
|
|
128
98
|
@delete=${(x, c) => c.parent.deleteCondition(eventDetail(c))}
|
|
129
|
-
>
|
|
130
|
-
</condition-builder>
|
|
99
|
+
></condition-builder>
|
|
131
100
|
`)}
|
|
132
101
|
</div>
|
|
133
102
|
|
|
134
103
|
<div class="content-row">
|
|
135
|
-
<zero-button
|
|
136
|
-
@click=${x => x.newCondition()}
|
|
137
|
-
>
|
|
104
|
+
<zero-button @click=${(x) => x.newCondition()}>
|
|
138
105
|
<zero-icon name="plus"></zero-icon>
|
|
139
106
|
Condition
|
|
140
107
|
</zero-button>
|
|
@@ -143,15 +110,8 @@ export const TemplateDialogTemplate = html `
|
|
|
143
110
|
</div>
|
|
144
111
|
</div>
|
|
145
112
|
|
|
146
|
-
<div class="template-dialog-
|
|
147
|
-
<
|
|
148
|
-
<zero-button
|
|
149
|
-
appearance="accent"
|
|
150
|
-
@click=${x => x.submit()}
|
|
151
|
-
>
|
|
152
|
-
Submit
|
|
153
|
-
</zero-button>
|
|
154
|
-
</div>
|
|
113
|
+
<div slot="bottom" class="template-dialog-bottom">
|
|
114
|
+
<zero-button appearance="accent" @click=${(x) => x.submit()}>Submit</zero-button>
|
|
155
115
|
</div>
|
|
156
116
|
</zero-modal>
|
|
157
117
|
`;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
|
-
import { LOGICAL_OPERATOR_EQUALS } from "../../../types/logical-operator";
|
|
3
|
-
import { PARAM_SOURCE_TYPE_USER_TEXT } from "../../../types/param-source-type";
|
|
4
|
-
import { PARAM_TYPE_FIELD, PARAM_TYPE_STRING } from "../../../types/param-type";
|
|
5
|
-
import { RIGHT_CRITERIA_VALUE } from "../../../types/right-criteria";
|
|
6
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
7
|
export class UUIDGenerator {
|
|
8
8
|
static createUuid() {
|
|
9
9
|
return this.uuid.createId();
|
|
@@ -35,30 +35,30 @@ export function createAssignment(field, value) {
|
|
|
35
35
|
return {
|
|
36
36
|
FIELD: {
|
|
37
37
|
TYPE: 'FIELD',
|
|
38
|
-
NAME: field
|
|
38
|
+
NAME: field,
|
|
39
39
|
},
|
|
40
40
|
VALUE: {
|
|
41
41
|
TYPE: 'STRING',
|
|
42
|
-
VALUE: value
|
|
43
|
-
}
|
|
42
|
+
VALUE: value,
|
|
43
|
+
},
|
|
44
44
|
};
|
|
45
45
|
}
|
|
46
46
|
export function getAssignmentValue(assignments, field) {
|
|
47
|
-
return assignments.find(assignment => assignment.FIELD.NAME === field).VALUE.VALUE;
|
|
47
|
+
return assignments.find((assignment) => assignment.FIELD.NAME === field).VALUE.VALUE;
|
|
48
48
|
}
|
|
49
49
|
export function createConditions(conditions, parameters) {
|
|
50
|
-
return conditions.map(condition => {
|
|
50
|
+
return conditions.map((condition) => {
|
|
51
51
|
return {
|
|
52
52
|
LEFT: getLeftExpression(condition),
|
|
53
53
|
OPERATION: condition.LOGICAL_OPERATOR,
|
|
54
|
-
RIGHT: getRightExpression(condition, parameters)
|
|
54
|
+
RIGHT: getRightExpression(condition, parameters),
|
|
55
55
|
};
|
|
56
56
|
});
|
|
57
57
|
}
|
|
58
58
|
export function getLeftExpression(condition) {
|
|
59
59
|
return {
|
|
60
60
|
TYPE: PARAM_TYPE_FIELD,
|
|
61
|
-
NAME: condition.LEFT_VALUE.FIELD_NAME
|
|
61
|
+
NAME: condition.LEFT_VALUE.FIELD_NAME,
|
|
62
62
|
};
|
|
63
63
|
}
|
|
64
64
|
export function getRightExpression(condition, parameters) {
|
|
@@ -66,25 +66,25 @@ export function getRightExpression(condition, parameters) {
|
|
|
66
66
|
case 'USER_ENTRY':
|
|
67
67
|
return {
|
|
68
68
|
TYPE: 'PLACEHOLDER',
|
|
69
|
-
KEY: parameters.find(parameter => parameter.UUID === condition.RIGHT_VALUE).PARAM_NAME
|
|
69
|
+
KEY: parameters.find((parameter) => parameter.UUID === condition.RIGHT_VALUE).PARAM_NAME,
|
|
70
70
|
};
|
|
71
71
|
case 'FIELD': // Only for Rules
|
|
72
72
|
return {
|
|
73
73
|
TYPE: 'FIELD',
|
|
74
|
-
NAME: condition.RIGHT_VALUE
|
|
74
|
+
NAME: condition.RIGHT_VALUE,
|
|
75
75
|
};
|
|
76
76
|
default:
|
|
77
77
|
switch (condition.LEFT_VALUE.FIELD_TYPE) {
|
|
78
78
|
case 'BOOLEAN':
|
|
79
79
|
return {
|
|
80
80
|
TYPE: 'BOOLEAN',
|
|
81
|
-
VALUE: condition.RIGHT_VALUE
|
|
81
|
+
VALUE: condition.RIGHT_VALUE,
|
|
82
82
|
};
|
|
83
83
|
case 'STRING':
|
|
84
84
|
case 'ENUM':
|
|
85
85
|
return {
|
|
86
86
|
TYPE: 'STRING',
|
|
87
|
-
VALUE: condition.RIGHT_VALUE
|
|
87
|
+
VALUE: condition.RIGHT_VALUE,
|
|
88
88
|
};
|
|
89
89
|
case 'INT':
|
|
90
90
|
case 'SHORT':
|
|
@@ -93,12 +93,12 @@ export function getRightExpression(condition, parameters) {
|
|
|
93
93
|
case 'BIGDECIMAL':
|
|
94
94
|
return {
|
|
95
95
|
TYPE: 'NUMBER',
|
|
96
|
-
VALUE: condition.RIGHT_VALUE
|
|
96
|
+
VALUE: condition.RIGHT_VALUE,
|
|
97
97
|
};
|
|
98
98
|
default:
|
|
99
99
|
return {
|
|
100
100
|
TYPE: 'FIELD',
|
|
101
|
-
NAME: condition.RIGHT_VALUE
|
|
101
|
+
NAME: condition.RIGHT_VALUE,
|
|
102
102
|
};
|
|
103
103
|
}
|
|
104
104
|
}
|
|
@@ -112,7 +112,7 @@ export function createParameterDetails(parameters) {
|
|
|
112
112
|
PARAM_TYPE: parameter.PARAM_TYPE,
|
|
113
113
|
PARAM_SOURCE_TYPE: parameter.PARAM_SOURCE_TYPE,
|
|
114
114
|
PARAM_SOURCE: (_a = parameter.PARAM_SOURCE) !== null && _a !== void 0 ? _a : '',
|
|
115
|
-
PARAM_OPERATOR: 'EQUALS'
|
|
115
|
+
PARAM_OPERATOR: 'EQUALS',
|
|
116
116
|
};
|
|
117
117
|
});
|
|
118
118
|
return map;
|
|
@@ -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 { TemplateService } from '../../../../services/template.service';
|
|
5
5
|
import { rulesAndTemplatesStyles } from '../../styles/rules-and-templates.styles';
|
|
6
6
|
import { TEMPLATE_MANAGEMENT_COLUMNS } from './columns';
|
|
7
|
-
import {
|
|
7
|
+
import { TemplateDialogMode } from './template-dialog/template-dialog.types';
|
|
8
8
|
let TemplateManagement = class TemplateManagement extends FASTElement {
|
|
9
9
|
openTemplateDialog() {
|
|
10
10
|
this.templateDialog.openDialog({ mode: TemplateDialogMode.CREATE });
|
|
@@ -22,12 +22,14 @@ let TemplateManagement = class TemplateManagement 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.templateService.deleteRuleTemplate(template.ID)
|
|
30
|
-
}
|
|
30
|
+
action: () => this.templateService.deleteRuleTemplate(template.ID),
|
|
31
|
+
},
|
|
32
|
+
],
|
|
31
33
|
},
|
|
32
34
|
}, 'zero');
|
|
33
35
|
}
|
|
@@ -41,30 +43,24 @@ TemplateManagement = __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.openTemplateDialog()}
|
|
47
|
-
>
|
|
46
|
+
<zero-button class="add" @click=${(x) => x.openTemplateDialog()}>
|
|
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_RULE_TEMPLATES">
|
|
56
|
-
${repeat(x => TEMPLATE_MANAGEMENT_COLUMNS(x), html `
|
|
57
|
-
<grid-pro-column :definition=${x => x} />
|
|
55
|
+
${repeat((x) => TEMPLATE_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
|
-
<template-dialog
|
|
65
|
-
${ref('templateDialog')}
|
|
66
|
-
>
|
|
67
|
-
</template-dialog>
|
|
63
|
+
<template-dialog ${ref('templateDialog')}></template-dialog>
|
|
68
64
|
`,
|
|
69
65
|
styles: css `
|
|
70
66
|
${rulesAndTemplatesStyles}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { __awaiter, __decorate } from "tslib";
|
|
2
|
-
import {
|
|
2
|
+
import { Auth } from '@genesislcap/foundation-comms';
|
|
3
3
|
import { FASTElement, customElement, observable } from '@microsoft/fast-element';
|
|
4
|
+
import { loadRemotes } from '../components';
|
|
4
5
|
import { FoundationNotificationDashboardStyles as styles } from './notification-dashboard.styles';
|
|
5
6
|
import { FoundationNotificationDashboardTemplate as template } from './notification-dashboard.template';
|
|
6
|
-
import { Auth } from '@genesislcap/foundation-comms';
|
|
7
7
|
/**
|
|
8
8
|
* @public
|
|
9
9
|
*/
|
package/dist/esm/components/foundation-notification-dashboard/notification-dashboard.tabs.js
CHANGED
|
@@ -5,24 +5,24 @@ export const NOTIFICATION_DASHBOARD_TABS = [
|
|
|
5
5
|
id: 'rules',
|
|
6
6
|
name: 'Rules',
|
|
7
7
|
component: 'rule-management',
|
|
8
|
-
right: 'NotificationRuleView'
|
|
8
|
+
right: 'NotificationRuleView',
|
|
9
9
|
},
|
|
10
10
|
{
|
|
11
11
|
id: 'templates',
|
|
12
12
|
name: 'Templates',
|
|
13
13
|
component: 'template-management',
|
|
14
|
-
right: 'NotificationRuleTemplateView'
|
|
14
|
+
right: 'NotificationRuleTemplateView',
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
17
|
id: 'routes',
|
|
18
18
|
name: 'Routes',
|
|
19
19
|
component: 'route-management',
|
|
20
|
-
right: 'NotificationRouteView'
|
|
20
|
+
right: 'NotificationRouteView',
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
23
|
id: 'notify-audit',
|
|
24
24
|
name: 'Notify Audit',
|
|
25
25
|
component: 'notify-audit-management',
|
|
26
|
-
right: 'NotificationAuditView'
|
|
27
|
-
}
|
|
26
|
+
right: 'NotificationAuditView',
|
|
27
|
+
},
|
|
28
28
|
];
|
package/dist/esm/components/foundation-notification-dashboard/notification-dashboard.template.js
CHANGED
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
import { html, repeat, when } from '@microsoft/fast-element';
|
|
2
|
-
import { NOTIFICATION_DASHBOARD_TABS } from './notification-dashboard.tabs';
|
|
2
|
+
import { NOTIFICATION_DASHBOARD_TABS, } from './notification-dashboard.tabs';
|
|
3
3
|
export const FoundationNotificationDashboardTemplate = html `
|
|
4
4
|
<div class="notification-dashboard">
|
|
5
5
|
<zero-tabs class="tabs">
|
|
6
6
|
<!-- Tabs -->
|
|
7
|
-
${repeat(_ => NOTIFICATION_DASHBOARD_TABS, html `
|
|
7
|
+
${repeat((_) => NOTIFICATION_DASHBOARD_TABS, html `
|
|
8
8
|
${when((x, c) => c.parent.auth.currentUser.hasPermission(x.right), html `
|
|
9
|
-
<zero-tab slot="${x => x.id}-tab">${x => x.name}</zero-tab>
|
|
9
|
+
<zero-tab slot="${(x) => x.id}-tab">${(x) => x.name}</zero-tab>
|
|
10
10
|
`)}
|
|
11
11
|
`)}
|
|
12
12
|
|
|
13
13
|
<!-- Panels -->
|
|
14
|
-
${repeat(_ => NOTIFICATION_DASHBOARD_TABS, html `
|
|
14
|
+
${repeat((_) => NOTIFICATION_DASHBOARD_TABS, html `
|
|
15
15
|
${when((x, c) => c.parent.auth.currentUser.hasPermission(x.right), html `
|
|
16
|
-
${
|
|
16
|
+
${
|
|
17
|
+
/* HTML Render */
|
|
18
|
+
(x) => html `
|
|
17
19
|
<zero-tab-panel slot="${x.id}-tab" id="${x.id}-tab-panel">
|
|
18
20
|
<${x.component}></${x.component}>
|
|
19
21
|
</zero-tab-panel>
|
|
@@ -1,6 +1,3 @@
|
|
|
1
1
|
export const RIGHT_CRITERIA_VALUE = 'VALUE';
|
|
2
2
|
export const RIGHT_CRITERIA_USER_ENTRY = 'USER_ENTRY';
|
|
3
|
-
export const ALL_RIGHT_CRITERIAS = [
|
|
4
|
-
RIGHT_CRITERIA_VALUE,
|
|
5
|
-
RIGHT_CRITERIA_USER_ENTRY,
|
|
6
|
-
];
|
|
3
|
+
export const ALL_RIGHT_CRITERIAS = [RIGHT_CRITERIA_VALUE, RIGHT_CRITERIA_USER_ENTRY];
|
package/dist/esm/components/foundation-notification-dashboard/types/rule-execution-strategy.js
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
1
|
export const RULE_EXECUTION_UNLIMITED = 'UNLIMITED';
|
|
2
2
|
export const RULE_EXECUTION = 'ONCE_ONLY';
|
|
3
|
-
export const ALL_RULE_EXECUTION_STRATEGIES = [
|
|
4
|
-
RULE_EXECUTION_UNLIMITED,
|
|
5
|
-
RULE_EXECUTION,
|
|
6
|
-
];
|
|
3
|
+
export const ALL_RULE_EXECUTION_STRATEGIES = [RULE_EXECUTION_UNLIMITED, RULE_EXECUTION];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __awaiter, __decorate } from "tslib";
|
|
2
|
-
import { DI } from '@microsoft/fast-foundation';
|
|
3
2
|
import { Connect } from '@genesislcap/foundation-comms';
|
|
3
|
+
import { DI } from '@microsoft/fast-foundation';
|
|
4
4
|
class AlertServiceImpl {
|
|
5
5
|
getAlerts() {
|
|
6
6
|
return this.connect.stream('ALL_NOTIFY_AUDIT', (streamMessage) => {
|
|
@@ -9,7 +9,7 @@ class AlertServiceImpl {
|
|
|
9
9
|
}
|
|
10
10
|
dismissNotifyAlert(alertId) {
|
|
11
11
|
return __awaiter(this, void 0, void 0, function* () {
|
|
12
|
-
return
|
|
12
|
+
return this.connect.commitEvent('EVENT_DISMISS_NOTIFY_ALERT', {
|
|
13
13
|
DETAILS: {
|
|
14
14
|
ALERT_ID: alertId,
|
|
15
15
|
},
|
|
@@ -20,4 +20,4 @@ class AlertServiceImpl {
|
|
|
20
20
|
__decorate([
|
|
21
21
|
Connect
|
|
22
22
|
], AlertServiceImpl.prototype, "connect", void 0);
|
|
23
|
-
export const AlertService = DI.createInterface(x => x.singleton(AlertServiceImpl));
|
|
23
|
+
export const AlertService = DI.createInterface((x) => x.singleton(AlertServiceImpl));
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { __awaiter, __decorate } from "tslib";
|
|
2
|
-
import { DI } from '@microsoft/fast-foundation';
|
|
3
2
|
import { Connect } from '@genesislcap/foundation-comms';
|
|
3
|
+
import { DI } from '@microsoft/fast-foundation';
|
|
4
4
|
class NotifyServiceImpl {
|
|
5
5
|
getNotifyRouteTopics() {
|
|
6
6
|
return __awaiter(this, void 0, void 0, function* () {
|
|
7
|
-
const data = yield this.connect.request('REQ_NOTIFY_ROUTE_TOPICS', {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
const data = yield this.connect.request('REQ_NOTIFY_ROUTE_TOPICS', {
|
|
8
|
+
REQUEST: { NOTIFY_ROUTE_ID: '' },
|
|
9
|
+
});
|
|
10
|
+
return data.REPLY ? data.REPLY[0].TOPICS : [];
|
|
11
11
|
});
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
__decorate([
|
|
15
15
|
Connect
|
|
16
16
|
], NotifyServiceImpl.prototype, "connect", void 0);
|
|
17
|
-
export const NotifyService = DI.createInterface(x => x.singleton(NotifyServiceImpl));
|
|
17
|
+
export const NotifyService = DI.createInterface((x) => x.singleton(NotifyServiceImpl));
|
|
@@ -5,15 +5,16 @@ class RuleServiceImpl {
|
|
|
5
5
|
getRules() {
|
|
6
6
|
return __awaiter(this, void 0, void 0, function* () {
|
|
7
7
|
const response = yield this.connect.request('REQ_NOTIFICATION_RULE', { REQUEST: true });
|
|
8
|
-
return
|
|
8
|
+
return;
|
|
9
|
+
response.REPLY;
|
|
9
10
|
});
|
|
10
11
|
}
|
|
11
12
|
getRuleDetails(ruleId) {
|
|
12
13
|
return __awaiter(this, void 0, void 0, function* () {
|
|
13
14
|
const response = yield this.connect.request('REQ_NOTIFICATION_RULE_DETAILS', {
|
|
14
15
|
REQUEST: {
|
|
15
|
-
ID: ruleId
|
|
16
|
-
}
|
|
16
|
+
ID: ruleId,
|
|
17
|
+
},
|
|
17
18
|
});
|
|
18
19
|
if (!response.REPLY) {
|
|
19
20
|
return;
|
|
@@ -23,7 +24,7 @@ class RuleServiceImpl {
|
|
|
23
24
|
}
|
|
24
25
|
createRule(rule) {
|
|
25
26
|
return __awaiter(this, void 0, void 0, function* () {
|
|
26
|
-
return
|
|
27
|
+
return this.connect.commitEvent('EVENT_NOTIFICATION_RULE_CREATE', {
|
|
27
28
|
DETAILS: rule,
|
|
28
29
|
IGNORE_WARNINGS: true,
|
|
29
30
|
VALIDATE: false,
|
|
@@ -32,7 +33,7 @@ class RuleServiceImpl {
|
|
|
32
33
|
}
|
|
33
34
|
updateRule(rule) {
|
|
34
35
|
return __awaiter(this, void 0, void 0, function* () {
|
|
35
|
-
return
|
|
36
|
+
return this.connect.commitEvent('EVENT_NOTIFICATION_RULE_UPDATE', {
|
|
36
37
|
DETAILS: rule,
|
|
37
38
|
IGNORE_WARNINGS: true,
|
|
38
39
|
VALIDATE: false,
|
|
@@ -42,7 +43,7 @@ class RuleServiceImpl {
|
|
|
42
43
|
deleteRule(ruleId) {
|
|
43
44
|
this.connect.commitEvent('EVENT_NOTIFICATION_RULE_DELETE', {
|
|
44
45
|
DETAILS: {
|
|
45
|
-
ID: ruleId
|
|
46
|
+
ID: ruleId,
|
|
46
47
|
},
|
|
47
48
|
IGNORE_WARNINGS: true,
|
|
48
49
|
VALIDATE: false,
|
|
@@ -54,10 +55,10 @@ class RuleServiceImpl {
|
|
|
54
55
|
console.error('Invalid dynamicRuleId');
|
|
55
56
|
return;
|
|
56
57
|
}
|
|
57
|
-
return
|
|
58
|
+
return this.connect.commitEvent('EVENT_NOTIFICATION_RULE_SUBSCRIBE', {
|
|
58
59
|
DETAILS: {
|
|
59
60
|
DYNAMIC_RULE_ID: dynamicRuleId,
|
|
60
|
-
PARAMETER_DETAILS: parameterDetails
|
|
61
|
+
PARAMETER_DETAILS: parameterDetails,
|
|
61
62
|
},
|
|
62
63
|
IGNORE_WARNINGS: true,
|
|
63
64
|
VALIDATE: false,
|
|
@@ -70,7 +71,7 @@ class RuleServiceImpl {
|
|
|
70
71
|
console.error('Invalid dynamicRuleId');
|
|
71
72
|
return;
|
|
72
73
|
}
|
|
73
|
-
return
|
|
74
|
+
return this.connect.commitEvent('EVENT_NOTIFICATION_RULE_UNSUBSCRIBE', this.createDynamicRuleIDParams(dynamicRuleId));
|
|
74
75
|
});
|
|
75
76
|
}
|
|
76
77
|
enableRule(dynamicRuleId) {
|
|
@@ -79,7 +80,7 @@ class RuleServiceImpl {
|
|
|
79
80
|
console.error('Invalid dynamicRuleId');
|
|
80
81
|
return;
|
|
81
82
|
}
|
|
82
|
-
return
|
|
83
|
+
return this.connect.commitEvent('EVENT_NOTIFICATION_RULE_ENABLE', this.createDynamicRuleIDParams(dynamicRuleId));
|
|
83
84
|
});
|
|
84
85
|
}
|
|
85
86
|
disableRule(dynamicRuleId) {
|
|
@@ -88,7 +89,9 @@ class RuleServiceImpl {
|
|
|
88
89
|
console.error('Invalid dynamicRuleId');
|
|
89
90
|
return;
|
|
90
91
|
}
|
|
91
|
-
return
|
|
92
|
+
return this.connect
|
|
93
|
+
.commitEvent('EVENT_NOTIFICATION_RULE_DISABLE', this.createDynamicRuleIDParams(dynamicRuleId))
|
|
94
|
+
.then((data) => {
|
|
92
95
|
console.log(data);
|
|
93
96
|
});
|
|
94
97
|
});
|
|
@@ -106,4 +109,4 @@ class RuleServiceImpl {
|
|
|
106
109
|
__decorate([
|
|
107
110
|
Connect
|
|
108
111
|
], RuleServiceImpl.prototype, "connect", void 0);
|
|
109
|
-
export const RuleService = DI.createInterface(x => x.singleton(RuleServiceImpl));
|
|
112
|
+
export const RuleService = DI.createInterface((x) => x.singleton(RuleServiceImpl));
|