@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.
Files changed (139) hide show
  1. package/.husky/commit-msg +3 -0
  2. package/.husky/pre-commit +4 -0
  3. package/commitlint.config.js +25 -0
  4. package/dist/dts/components/components.d.ts.map +1 -1
  5. package/dist/dts/components/foundation-inbox/components/foundation-inbox-counter/foundation-inbox-counter.d.ts.map +1 -1
  6. package/dist/dts/components/foundation-inbox/components/foundation-inbox-flyout/foundation-inbox-flyout.d.ts.map +1 -1
  7. package/dist/dts/components/foundation-inbox/components/foundation-inbox-flyout/foundation-inbox-flyout.template.d.ts.map +1 -1
  8. package/dist/dts/components/foundation-inbox/components/inbox-subscription/inbox-subscription.d.ts +3 -3
  9. package/dist/dts/components/foundation-inbox/components/inbox-subscription/inbox-subscription.d.ts.map +1 -1
  10. package/dist/dts/components/foundation-inbox/components/inbox-subscription/inbox-subscription.template.d.ts.map +1 -1
  11. package/dist/dts/components/foundation-inbox/components/inbox-subscription/rule-parameter/rule-parameter.d.ts +2 -2
  12. package/dist/dts/components/foundation-inbox/components/inbox-subscription/rule-parameter/rule-parameter.d.ts.map +1 -1
  13. package/dist/dts/components/foundation-inbox/components/inbox-subscription/rule-parameter/rule-parameter.template.d.ts +1 -1
  14. package/dist/dts/components/foundation-inbox/components/inbox-subscription/rule-parameter/rule-parameter.template.d.ts.map +1 -1
  15. package/dist/dts/components/foundation-inbox/inbox-base/inbox-base.d.ts +8 -8
  16. package/dist/dts/components/foundation-inbox/inbox-base/inbox-base.d.ts.map +1 -1
  17. package/dist/dts/components/foundation-inbox/inbox.d.ts.map +1 -1
  18. package/dist/dts/components/foundation-inbox/inbox.styles.d.ts.map +1 -1
  19. package/dist/dts/components/foundation-inbox/inbox.template.d.ts.map +1 -1
  20. package/dist/dts/components/foundation-inbox/inbox.types.d.ts.map +1 -1
  21. package/dist/dts/components/foundation-inbox/inbox.utils.d.ts.map +1 -1
  22. package/dist/dts/components/foundation-notification-dashboard/components/notify-audit/notify-audit-management.d.ts.map +1 -1
  23. package/dist/dts/components/foundation-notification-dashboard/components/routes/route-management.d.ts +1 -1
  24. package/dist/dts/components/foundation-notification-dashboard/components/routes/tabs/email-distribution-route-management.d.ts.map +1 -1
  25. package/dist/dts/components/foundation-notification-dashboard/components/routes/tabs/email-user-route-management.d.ts.map +1 -1
  26. package/dist/dts/components/foundation-notification-dashboard/components/routes/tabs/log-route-management.d.ts.map +1 -1
  27. package/dist/dts/components/foundation-notification-dashboard/components/routes/tabs/ms-teams-route-management.d.ts.map +1 -1
  28. package/dist/dts/components/foundation-notification-dashboard/components/routes/tabs/screen-route-management.d.ts.map +1 -1
  29. package/dist/dts/components/foundation-notification-dashboard/components/rules/columns.d.ts +1 -1
  30. package/dist/dts/components/foundation-notification-dashboard/components/rules/columns.d.ts.map +1 -1
  31. package/dist/dts/components/foundation-notification-dashboard/components/rules/rule-dialog/rule-condition-builder/rule-condition-builder.d.ts.map +1 -1
  32. package/dist/dts/components/foundation-notification-dashboard/components/rules/rule-dialog/rule-condition-builder/rule-condition-builder.template.d.ts +1 -1
  33. package/dist/dts/components/foundation-notification-dashboard/components/rules/rule-dialog/rule-condition-builder/rule-condition-builder.template.d.ts.map +1 -1
  34. package/dist/dts/components/foundation-notification-dashboard/components/rules/rule-dialog/rule-condition-builder/rule-condition-builder.types.d.ts.map +1 -1
  35. package/dist/dts/components/foundation-notification-dashboard/components/rules/rule-dialog/rule-dialog.d.ts.map +1 -1
  36. package/dist/dts/components/foundation-notification-dashboard/components/rules/rule-dialog/rule-dialog.styles.d.ts.map +1 -1
  37. package/dist/dts/components/foundation-notification-dashboard/components/rules/rule-dialog/rule-dialog.template.d.ts +1 -1
  38. package/dist/dts/components/foundation-notification-dashboard/components/rules/rule-dialog/rule-dialog.template.d.ts.map +1 -1
  39. package/dist/dts/components/foundation-notification-dashboard/components/rules/rule-dialog/rule-dialog.types.d.ts.map +1 -1
  40. package/dist/dts/components/foundation-notification-dashboard/components/rules/rule-management.d.ts +1 -1
  41. package/dist/dts/components/foundation-notification-dashboard/components/rules/rule-management.d.ts.map +1 -1
  42. package/dist/dts/components/foundation-notification-dashboard/components/templates/columns.d.ts +1 -1
  43. package/dist/dts/components/foundation-notification-dashboard/components/templates/columns.d.ts.map +1 -1
  44. package/dist/dts/components/foundation-notification-dashboard/components/templates/template-dialog/condition-builder/condition-builder.d.ts.map +1 -1
  45. package/dist/dts/components/foundation-notification-dashboard/components/templates/template-dialog/condition-builder/condition-builder.template.d.ts +1 -1
  46. package/dist/dts/components/foundation-notification-dashboard/components/templates/template-dialog/condition-builder/condition-builder.template.d.ts.map +1 -1
  47. package/dist/dts/components/foundation-notification-dashboard/components/templates/template-dialog/parameter-builder/parameter-builder.d.ts +3 -3
  48. package/dist/dts/components/foundation-notification-dashboard/components/templates/template-dialog/parameter-builder/parameter-builder.d.ts.map +1 -1
  49. package/dist/dts/components/foundation-notification-dashboard/components/templates/template-dialog/parameter-builder/parameter-builder.template.d.ts +1 -1
  50. package/dist/dts/components/foundation-notification-dashboard/components/templates/template-dialog/parameter-builder/parameter-builder.template.d.ts.map +1 -1
  51. package/dist/dts/components/foundation-notification-dashboard/components/templates/template-dialog/template-dialog.d.ts.map +1 -1
  52. package/dist/dts/components/foundation-notification-dashboard/components/templates/template-dialog/template-dialog.styles.d.ts.map +1 -1
  53. package/dist/dts/components/foundation-notification-dashboard/components/templates/template-dialog/template-dialog.template.d.ts +1 -1
  54. package/dist/dts/components/foundation-notification-dashboard/components/templates/template-dialog/template-dialog.template.d.ts.map +1 -1
  55. package/dist/dts/components/foundation-notification-dashboard/components/templates/template-dialog/template-dialog.types.d.ts.map +1 -1
  56. package/dist/dts/components/foundation-notification-dashboard/components/templates/template-dialog/template-dialog.utils.d.ts +1 -1
  57. package/dist/dts/components/foundation-notification-dashboard/components/templates/template-dialog/template-dialog.utils.d.ts.map +1 -1
  58. package/dist/dts/components/foundation-notification-dashboard/components/templates/template-management.d.ts +1 -1
  59. package/dist/dts/components/foundation-notification-dashboard/components/templates/template-management.d.ts.map +1 -1
  60. package/dist/dts/components/foundation-notification-dashboard/notification-dashboard.d.ts +1 -1
  61. package/dist/dts/components/foundation-notification-dashboard/notification-dashboard.d.ts.map +1 -1
  62. package/dist/dts/components/foundation-notification-dashboard/notification-dashboard.template.d.ts.map +1 -1
  63. package/dist/dts/components/foundation-notification-dashboard/types/right-criteria.d.ts.map +1 -1
  64. package/dist/dts/components/foundation-notification-dashboard/types/rule-execution-strategy.d.ts.map +1 -1
  65. package/dist/dts/services/alert.service.d.ts.map +1 -1
  66. package/dist/dts/services/notify.service.d.ts.map +1 -1
  67. package/dist/dts/services/rule.service.d.ts.map +1 -1
  68. package/dist/dts/services/system.service.d.ts.map +1 -1
  69. package/dist/dts/services/template.service.d.ts.map +1 -1
  70. package/dist/dts/utils/eventDetail.d.ts +1 -1
  71. package/dist/dts/utils/gridConfig.d.ts.map +1 -1
  72. package/dist/dts/utils/humanize.d.ts.map +1 -1
  73. package/dist/dts/utils/icons.d.ts.map +1 -1
  74. package/dist/dts/utils/logger.d.ts.map +1 -1
  75. package/dist/dts/utils/updateArray.d.ts.map +1 -1
  76. package/dist/esm/components/components.js +10 -10
  77. package/dist/esm/components/foundation-inbox/components/foundation-inbox-counter/foundation-inbox-counter.template.js +1 -1
  78. package/dist/esm/components/foundation-inbox/components/foundation-inbox-flyout/foundation-inbox-flyout.js +1 -1
  79. package/dist/esm/components/foundation-inbox/components/foundation-inbox-flyout/foundation-inbox-flyout.styles.js +1 -1
  80. package/dist/esm/components/foundation-inbox/components/foundation-inbox-flyout/foundation-inbox-flyout.template.js +5 -10
  81. package/dist/esm/components/foundation-inbox/components/inbox-subscription/inbox-subscription.js +9 -11
  82. package/dist/esm/components/foundation-inbox/components/inbox-subscription/inbox-subscription.styles.js +2 -2
  83. package/dist/esm/components/foundation-inbox/components/inbox-subscription/inbox-subscription.template.js +12 -13
  84. package/dist/esm/components/foundation-inbox/components/inbox-subscription/rule-parameter/rule-parameter.js +6 -6
  85. package/dist/esm/components/foundation-inbox/components/inbox-subscription/rule-parameter/rule-parameter.styles.js +1 -1
  86. package/dist/esm/components/foundation-inbox/components/inbox-subscription/rule-parameter/rule-parameter.template.js +27 -32
  87. package/dist/esm/components/foundation-inbox/inbox-base/inbox-base.js +15 -22
  88. package/dist/esm/components/foundation-inbox/inbox.js +1 -1
  89. package/dist/esm/components/foundation-inbox/inbox.styles.js +17 -33
  90. package/dist/esm/components/foundation-inbox/inbox.template.js +44 -37
  91. package/dist/esm/components/foundation-inbox/inbox.utils.js +4 -8
  92. package/dist/esm/components/foundation-notification-dashboard/components/notify-audit/notify-audit-management.js +9 -10
  93. package/dist/esm/components/foundation-notification-dashboard/components/routes/route-management.js +4 -4
  94. package/dist/esm/components/foundation-notification-dashboard/components/routes/tabs/email-distribution-route-management.js +8 -9
  95. package/dist/esm/components/foundation-notification-dashboard/components/routes/tabs/email-user-route-management.js +8 -9
  96. package/dist/esm/components/foundation-notification-dashboard/components/routes/tabs/log-route-management.js +11 -12
  97. package/dist/esm/components/foundation-notification-dashboard/components/routes/tabs/ms-teams-route-management.js +12 -13
  98. package/dist/esm/components/foundation-notification-dashboard/components/routes/tabs/screen-route-management.js +17 -18
  99. package/dist/esm/components/foundation-notification-dashboard/components/rules/columns.js +10 -10
  100. package/dist/esm/components/foundation-notification-dashboard/components/rules/rule-dialog/rule-condition-builder/rule-condition-builder.js +2 -2
  101. package/dist/esm/components/foundation-notification-dashboard/components/rules/rule-dialog/rule-condition-builder/rule-condition-builder.styles.js +2 -2
  102. package/dist/esm/components/foundation-notification-dashboard/components/rules/rule-dialog/rule-condition-builder/rule-condition-builder.template.js +21 -32
  103. package/dist/esm/components/foundation-notification-dashboard/components/rules/rule-dialog/rule-dialog.js +12 -19
  104. package/dist/esm/components/foundation-notification-dashboard/components/rules/rule-dialog/rule-dialog.styles.js +9 -7
  105. package/dist/esm/components/foundation-notification-dashboard/components/rules/rule-dialog/rule-dialog.template.js +29 -61
  106. package/dist/esm/components/foundation-notification-dashboard/components/rules/rule-management.js +15 -19
  107. package/dist/esm/components/foundation-notification-dashboard/components/templates/columns.js +10 -10
  108. package/dist/esm/components/foundation-notification-dashboard/components/templates/template-dialog/condition-builder/condition-builder.js +4 -8
  109. package/dist/esm/components/foundation-notification-dashboard/components/templates/template-dialog/condition-builder/condition-builder.styles.js +2 -2
  110. package/dist/esm/components/foundation-notification-dashboard/components/templates/template-dialog/condition-builder/condition-builder.template.js +25 -43
  111. package/dist/esm/components/foundation-notification-dashboard/components/templates/template-dialog/parameter-builder/parameter-builder.js +4 -8
  112. package/dist/esm/components/foundation-notification-dashboard/components/templates/template-dialog/parameter-builder/parameter-builder.styles.js +4 -4
  113. package/dist/esm/components/foundation-notification-dashboard/components/templates/template-dialog/parameter-builder/parameter-builder.template.js +25 -42
  114. package/dist/esm/components/foundation-notification-dashboard/components/templates/template-dialog/template-dialog.js +23 -23
  115. package/dist/esm/components/foundation-notification-dashboard/components/templates/template-dialog/template-dialog.styles.js +7 -8
  116. package/dist/esm/components/foundation-notification-dashboard/components/templates/template-dialog/template-dialog.template.js +31 -69
  117. package/dist/esm/components/foundation-notification-dashboard/components/templates/template-dialog/template-dialog.utils.js +18 -18
  118. package/dist/esm/components/foundation-notification-dashboard/components/templates/template-management.js +15 -19
  119. package/dist/esm/components/foundation-notification-dashboard/notification-dashboard.js +2 -2
  120. package/dist/esm/components/foundation-notification-dashboard/notification-dashboard.tabs.js +5 -5
  121. package/dist/esm/components/foundation-notification-dashboard/notification-dashboard.template.js +7 -5
  122. package/dist/esm/components/foundation-notification-dashboard/styles/management.styles.js +1 -1
  123. package/dist/esm/components/foundation-notification-dashboard/styles/rules-and-templates.styles.js +1 -1
  124. package/dist/esm/components/foundation-notification-dashboard/types/expression-type.js +1 -1
  125. package/dist/esm/components/foundation-notification-dashboard/types/right-criteria.js +1 -4
  126. package/dist/esm/components/foundation-notification-dashboard/types/rule-execution-strategy.js +1 -4
  127. package/dist/esm/components/foundation-notification-dashboard/types/severity.js +1 -1
  128. package/dist/esm/index.federated.js +1 -0
  129. package/dist/esm/services/alert.service.js +3 -3
  130. package/dist/esm/services/notify.service.js +6 -6
  131. package/dist/esm/services/rule.service.js +15 -12
  132. package/dist/esm/services/system.service.js +11 -8
  133. package/dist/esm/services/template.service.js +11 -9
  134. package/dist/esm/utils/gridConfig.js +1 -1
  135. package/dist/esm/utils/humanize.js +3 -2
  136. package/dist/esm/utils/icons.js +3 -10
  137. package/dist/esm/utils/notifyPermissions.js +4 -4
  138. package/package.json +43 -5
  139. package/scripts/commitlint.js +24 -0
@@ -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 { TemplateDialogMode } from './template-dialog/template-dialog.types';
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 { TemplateService } from '../../../../services/template.service';
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 { loadRemotes } from '../components';
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
  */
@@ -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
  ];
@@ -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
- ${ /* HTML Render *//* HTML Render */ x => html `
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,4 +1,4 @@
1
- import { css } from "@microsoft/fast-element";
1
+ import { css } from '@microsoft/fast-element';
2
2
  export const managementGridStyles = css `
3
3
  :host {
4
4
  height: 100%;
@@ -1,4 +1,4 @@
1
- import { css } from "@microsoft/fast-element";
1
+ import { css } from '@microsoft/fast-element';
2
2
  export const rulesAndTemplatesStyles = css `
3
3
  .container {
4
4
  display: flex;
@@ -6,5 +6,5 @@ export const ALL_EXPRESSION_TYPES = [
6
6
  EXPRESSION_TYPE_FIELD,
7
7
  EXPRESSION_TYPE_NUMBER,
8
8
  EXPRESSION_TYPE_STRING,
9
- EXPRESSION_TYPE_PLACEHOLDER
9
+ EXPRESSION_TYPE_PLACEHOLDER,
10
10
  ];
@@ -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];
@@ -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];
@@ -6,5 +6,5 @@ export const ALL_SEVERITIES = [
6
6
  SEVERITY_INFORMATION,
7
7
  SEVERITY_CRITICAL,
8
8
  SEVERITY_SERIOUS,
9
- SEVERITY_WARNING
9
+ SEVERITY_WARNING,
10
10
  ];
@@ -1 +1,2 @@
1
+ "use strict";
1
2
  import('./index');
@@ -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 yield this.connect.commitEvent('EVENT_DISMISS_NOTIFY_ALERT', {
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', { REQUEST: { NOTIFY_ROUTE_ID: '' } });
8
- return data.REPLY
9
- ? data.REPLY[0].TOPICS
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 response.REPLY;
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 yield this.connect.commitEvent('EVENT_NOTIFICATION_RULE_CREATE', {
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 yield this.connect.commitEvent('EVENT_NOTIFICATION_RULE_UPDATE', {
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 yield this.connect.commitEvent('EVENT_NOTIFICATION_RULE_SUBSCRIBE', {
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 yield this.connect.commitEvent('EVENT_NOTIFICATION_RULE_UNSUBSCRIBE', this.createDynamicRuleIDParams(dynamicRuleId));
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 yield this.connect.commitEvent('EVENT_NOTIFICATION_RULE_ENABLE', this.createDynamicRuleIDParams(dynamicRuleId));
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 yield this.connect.commitEvent('EVENT_NOTIFICATION_RULE_DISABLE', this.createDynamicRuleIDParams(dynamicRuleId)).then((data) => {
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));
@@ -4,8 +4,10 @@ import { DI } from '@microsoft/fast-foundation';
4
4
  class SystemServiceImpl {
5
5
  getResources() {
6
6
  return __awaiter(this, void 0, void 0, function* () {
7
- const response = yield this.connect.request('NOTIFY_SYSTEM_ENTITY', { REQUEST: { ENTITY_NAME: "*" } });
8
- return response.REPLY.map(table => table.ENTITY_NAME).sort();
7
+ const response = yield this.connect.request('NOTIFY_SYSTEM_ENTITY', {
8
+ REQUEST: { ENTITY_NAME: '*' },
9
+ });
10
+ return response.REPLY.map((table) => table.ENTITY_NAME).sort();
9
11
  });
10
12
  }
11
13
  getFields(resource) {
@@ -15,16 +17,17 @@ class SystemServiceImpl {
15
17
  }
16
18
  const response = yield this.connect.request('SYSTEM_ENTITY_FIELDS', {
17
19
  REQUEST: {
18
- ENTITY_NAME: resource
19
- }
20
+ ENTITY_NAME: resource,
21
+ },
20
22
  });
21
- return response.REPLY
22
- .sort((a, b) => a.NAME.localeCompare(b.NAME))
23
- .map(entity => ({ FIELD_NAME: entity.NAME, FIELD_TYPE: entity.TYPE }));
23
+ return response.REPLY.sort((a, b) => a.NAME.localeCompare(b.NAME)).map((entity) => ({
24
+ FIELD_NAME: entity.NAME,
25
+ FIELD_TYPE: entity.TYPE,
26
+ }));
24
27
  });
25
28
  }
26
29
  }
27
30
  __decorate([
28
31
  Connect
29
32
  ], SystemServiceImpl.prototype, "connect", void 0);
30
- export const SystemService = DI.createInterface(x => x.singleton(SystemServiceImpl));
33
+ export const SystemService = DI.createInterface((x) => x.singleton(SystemServiceImpl));
@@ -4,7 +4,7 @@ import { DI } from '@microsoft/fast-foundation';
4
4
  class TemplateServiceImpl {
5
5
  createRuleTemplate(ruleTemplate) {
6
6
  return __awaiter(this, void 0, void 0, function* () {
7
- return yield this.connect.commitEvent('EVENT_NOTIFICATION_RULE_TEMPLATE_CREATE', {
7
+ return this.connect.commitEvent('EVENT_NOTIFICATION_RULE_TEMPLATE_CREATE', {
8
8
  DETAILS: ruleTemplate,
9
9
  IGNORE_WARNINGS: true,
10
10
  VALIDATE: false,
@@ -13,7 +13,7 @@ class TemplateServiceImpl {
13
13
  }
14
14
  editRuleTemplate(ruleTemplate) {
15
15
  return __awaiter(this, void 0, void 0, function* () {
16
- return yield this.connect.commitEvent('EVENT_NOTIFICATION_RULE_TEMPLATE_UPDATE', {
16
+ return this.connect.commitEvent('EVENT_NOTIFICATION_RULE_TEMPLATE_UPDATE', {
17
17
  DETAILS: ruleTemplate,
18
18
  IGNORE_WARNINGS: true,
19
19
  VALIDATE: false,
@@ -23,7 +23,7 @@ class TemplateServiceImpl {
23
23
  getRuleTemplates() {
24
24
  return __awaiter(this, void 0, void 0, function* () {
25
25
  let ruleTemplates = [];
26
- yield this.connect.request('REQ_NOTIFICATION_RULE_TEMPLATE', { REQUEST: true }).then(data => {
26
+ yield this.connect.request('REQ_NOTIFICATION_RULE_TEMPLATE', { REQUEST: true }).then((data) => {
27
27
  ruleTemplates = data.REPLY;
28
28
  });
29
29
  return ruleTemplates;
@@ -32,11 +32,13 @@ class TemplateServiceImpl {
32
32
  getRuleTemplateDetails(dynamicRuleId) {
33
33
  return __awaiter(this, void 0, void 0, function* () {
34
34
  let ruleTemplateDetails = {};
35
- yield this.connect.request('REQ_NOTIFICATION_RULE_TEMPLATE_DETAILS', {
35
+ yield this.connect
36
+ .request('REQ_NOTIFICATION_RULE_TEMPLATE_DETAILS', {
36
37
  REQUEST: {
37
- ID: dynamicRuleId
38
- }
39
- }).then(data => {
38
+ ID: dynamicRuleId,
39
+ },
40
+ })
41
+ .then((data) => {
40
42
  if (!data.REPLY) {
41
43
  return;
42
44
  }
@@ -48,7 +50,7 @@ class TemplateServiceImpl {
48
50
  deleteRuleTemplate(dynamicRuleId) {
49
51
  return this.connect.commitEvent('EVENT_NOTIFICATION_RULE_TEMPLATE_DELETE', {
50
52
  DETAILS: {
51
- ID: dynamicRuleId
53
+ ID: dynamicRuleId,
52
54
  },
53
55
  IGNORE_WARNINGS: true,
54
56
  VALIDATE: false,
@@ -58,4 +60,4 @@ class TemplateServiceImpl {
58
60
  __decorate([
59
61
  Connect
60
62
  ], TemplateServiceImpl.prototype, "connect", void 0);
61
- export const TemplateService = DI.createInterface(x => x.singleton(TemplateServiceImpl));
63
+ export const TemplateService = DI.createInterface((x) => x.singleton(TemplateServiceImpl));
@@ -2,4 +2,4 @@ export const hideColumn = {
2
2
  hide: true,
3
3
  };
4
4
  export const suppressColumn = Object.assign(Object.assign({}, hideColumn), { suppressColumnsToolPanel: true });
5
- export const hideColumns = (fieldsToSuppress) => fieldsToSuppress.map(columnName => (Object.assign({ field: columnName }, suppressColumn)));
5
+ export const hideColumns = (fieldsToSuppress) => fieldsToSuppress.map((columnName) => (Object.assign({ field: columnName }, suppressColumn)));
@@ -2,8 +2,9 @@ export const humanize = (s) => {
2
2
  if (!s) {
3
3
  return '';
4
4
  }
5
- let i, frags = s.split('_');
6
- for (i = 0; i < frags.length; i++) {
5
+ let i;
6
+ const frags = s.split('_');
7
+ for (i = 0; i < frags.length; i += 1) {
7
8
  frags[i] = frags[i].charAt(0).toUpperCase() + frags[i].slice(1).toLowerCase();
8
9
  }
9
10
  return frags.join(' ');
@@ -1,4 +1,4 @@
1
- import { html } from "@microsoft/fast-element";
1
+ import { html } from '@microsoft/fast-element';
2
2
  export const editIcon = html `
3
3
  <zero-icon
4
4
  style="pointer-events: none; opacity: 0.5"
@@ -6,15 +6,8 @@ export const editIcon = html `
6
6
  variant="solid"
7
7
  name="pen"
8
8
  size="lg"
9
- >
10
- </zero-icon>
9
+ ></zero-icon>
11
10
  `;
12
11
  export const deleteIcon = html `
13
- <zero-icon
14
- style="opacity: 0.5"
15
- variant="regular"
16
- name="trash-alt"
17
- size="lg"
18
- >
19
- </zero-icon>
12
+ <zero-icon style="opacity: 0.5" variant="regular" name="trash-alt" size="lg"></zero-icon>
20
13
  `;
@@ -1,6 +1,6 @@
1
1
  export const NotifyPermission = {
2
- NotificationRuleView: "NotificationRuleView",
3
- NotificationRuleTemplateView: "NotificationRuleTemplateView",
4
- NotificationRouteView: "NotificationRouteView",
5
- NotificationAuditView: "NotificationAuditView",
2
+ NotificationRuleView: 'NotificationRuleView',
3
+ NotificationRuleTemplateView: 'NotificationRuleTemplateView',
4
+ NotificationRouteView: 'NotificationRouteView',
5
+ NotificationAuditView: 'NotificationAuditView',
6
6
  };
package/package.json CHANGED
@@ -1,8 +1,11 @@
1
1
  {
2
2
  "name": "@genesislcap/pbc-notify-ui",
3
3
  "description": "Genesis PBC Notify UI",
4
- "version": "1.0.23",
4
+ "version": "1.0.24",
5
5
  "license": "SEE LICENSE IN license.txt",
6
+ "workspaces": [
7
+ "client"
8
+ ],
6
9
  "main": "dist/esm/index.js",
7
10
  "types": "dist/dts/index.d.ts",
8
11
  "engines": {
@@ -29,12 +32,14 @@
29
32
  }
30
33
  },
31
34
  "scripts": {
35
+ "baseline": "npm run clean && npm run bootstrap",
32
36
  "bootstrap": "npm install --no-fund --no-audit",
33
37
  "bootstrap:ci": "npm ci --no-fund --no-audit",
34
38
  "build": "genx build -b ts",
35
39
  "build:webpack": "genx build",
36
40
  "build:webpack:stats": "genx analyze",
37
- "clean": "rimraf dist tsconfig.tsbuildinfo",
41
+ "clean": "genx clean dist node_modules",
42
+ "commitlint": "node ./scripts/commitlint",
38
43
  "dev": "genx dev -e API_HOST",
39
44
  "dev:docker": "npm run dev -- --host 0.0.0.0",
40
45
  "dev:intellij": "genx dev -e",
@@ -51,27 +56,60 @@
51
56
  "test:unit:browser": "genx test --browser",
52
57
  "test:unit:browser:watch": "genx test --browser --watch",
53
58
  "test:unit:watch": "genx test --watch",
54
- "test:debug": "genx test --debug"
59
+ "test:debug": "genx test --debug",
60
+ "lint": "genx lint --profile",
61
+ "lint:fix": "genx lint --fix",
62
+ "lint:eslint": "genx lint -l eslint --profile",
63
+ "lint:stylelint": "genx lint -l stylelint",
64
+ "prepare": "cd .. && husky client/.husky"
55
65
  },
66
+ "lint-staged": {
67
+ "*.{ts,js}": "eslint",
68
+ "*.styles.ts": "stylelint"
69
+ },
70
+ "dependencies": {
71
+ "web-push": "^3.4.4"
72
+ },
73
+ "eslintConfig": {
74
+ "extends": "@genesislcap/eslint-config"
75
+ },
76
+ "stylelint": {
77
+ "extends": "@genesislcap/stylelint-config"
78
+ },
79
+ "prettier": "@genesislcap/prettier-config",
56
80
  "devDependencies": {
81
+ "@commitlint/cli": "^19.2.1",
82
+ "@commitlint/config-conventional": "^19.1.0",
83
+ "@commitlint/format": "^19.0.3",
84
+ "@genesislcap/eslint-config": "~14",
85
+ "@genesislcap/eslint-stylelint-builder": "~14",
57
86
  "@genesislcap/foundation-testing": "~14",
58
87
  "@genesislcap/genx": "~14",
88
+ "@genesislcap/prettier-config": "~14",
89
+ "@genesislcap/stylelint-config": "~14",
90
+ "conventional-changelog-conventionalcommits": "^6.1.0",
91
+ "husky": "9.0.11",
92
+ "lint-prepush": "^2.2.1",
93
+ "lint-staged": "^15.2.2",
59
94
  "playwright-lighthouse": "^3.1.0",
60
95
  "rimraf": "^3.0.2",
61
96
  "tslib": "^2.3.1"
62
97
  },
63
98
  "peerDependencies": {
99
+ "@genesislcap/foundation-comms": "~14",
64
100
  "@genesislcap/foundation-entity-management": "~14",
101
+ "@genesislcap/foundation-forms": "~14",
65
102
  "@genesislcap/foundation-layout": "~14",
66
103
  "@genesislcap/foundation-logger": "~14",
67
104
  "@genesislcap/foundation-notifications": "~14",
68
105
  "@genesislcap/foundation-ui": "~14",
106
+ "@genesislcap/foundation-utils": "~14",
69
107
  "@genesislcap/foundation-zero": "~14",
70
- "@genesislcap/foundation-comms": "~14",
71
108
  "@microsoft/fast-components": "^2.21.3",
72
109
  "@microsoft/fast-element": "^1.7.0",
73
110
  "@microsoft/fast-foundation": "^2.33.2",
74
- "@microsoft/fast-router": "^0.4.2"
111
+ "@microsoft/fast-router": "^0.4.2",
112
+ "@microsoft/fast-web-utilities": "^5.4.1"
75
113
  },
76
114
  "publishConfig": {
77
115
  "access": "public"
@@ -0,0 +1,24 @@
1
+ // wrapper around commitlint CLI allowing to check commit messages
2
+ const format = require('@commitlint/format').default;
3
+ const lint = require('@commitlint/lint').default;
4
+ const load = require('@commitlint/load').default;
5
+
6
+ const message = process.argv.slice(2).join(' ');
7
+
8
+ load({}, { file: 'commitlint.config.js', cwd: process.cwd() })
9
+ .then((opts) =>
10
+ lint(
11
+ message,
12
+ opts.rules,
13
+ opts.parserPreset ? { parserOpts: opts.parserPreset.parserOpts } : {},
14
+ ),
15
+ )
16
+ .then((report) => {
17
+ if (report.valid) {
18
+ console.log(`⧗ input: ${message}
19
+ ✔ Commitlint check successful
20
+ `);
21
+ } else {
22
+ console.log(format({ results: [report] }));
23
+ }
24
+ });