@genesislcap/pbc-notify-ui 1.0.61 → 1.0.63

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.
@@ -21,7 +21,6 @@ export declare class FoundationInboxBase extends GenesisElement {
21
21
  templates: RuleTemplate[];
22
22
  templatesFilter: RuleTemplate[];
23
23
  searchAlertLog: string;
24
- severitySearchValue: string;
25
24
  titleSearchValue: string;
26
25
  bodySearchValue: string;
27
26
  searchSubscribe: string;
@@ -32,6 +31,7 @@ export declare class FoundationInboxBase extends GenesisElement {
32
31
  criteriaMatchAlertStatus: Expression;
33
32
  reverse: boolean;
34
33
  showLoadingIndicator: boolean;
34
+ severityType: any[];
35
35
  tabs: Tabs;
36
36
  connectedCallback(): Promise<void>;
37
37
  disconnectedCallback(): void;
@@ -1 +1 @@
1
- {"version":3,"file":"inbox-base.d.ts","sourceRoot":"","sources":["../../../../../src/components/foundation-inbox/inbox-base/inbox-base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,+BAA+B,CAAC;AACrD,OAAO,EAEL,UAAU,EAIX,MAAM,kCAAkC,CAAC;AAE1C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,EAAE,cAAc,EAAc,MAAM,uBAAuB,CAAC;AAInE,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC/D,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AACzE,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AAGrE,OAAO,EACL,KAAK,EACL,QAAQ,EACR,6BAA6B,EAC7B,IAAI,EAEJ,YAAY,EACb,MAAM,gBAAgB,CAAC;AAgBxB,qBAAa,mBAAoB,SAAQ,cAAc;IAC/C,IAAI,EAAE,IAAI,CAAC;IAEH,YAAY,EAAE,YAAY,CAAC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AE,MAAM,CAAQ;IAC/B,mBAAmB,EAAE,6BAA6B,CAAQ;IAC1D,WAAW,EAAE,QAAQ,CAAuB;IAE5C,mBAAmB,EAAE,MAAM,CAAQ;IACnC,iBAAiB,EAAE,MAAM,CAAQ;IAEjC,wBAAwB,EAAE,UAAU,CAAC;IACrC,OAAO,EAAE,OAAO,CAAS;IACzB,oBAAoB,EAAE,OAAO,CAAS;IAEtC,YAAY,QAAM;IAEvB,IAAI,EAAE,IAAI,CAAC;IAEZ,iBAAiB;IAoBvB,oBAAoB;IAMd,eAAe,CAAC,QAAQ,EAAE,QAAQ;IA+BxC,aAAa,gBAA2C;IAExD,YAAY,eAAyC;IAErD,gBAAgB,uBAAiD;IAEjE,6BAA6B,MAAsD;IAEnF,oBAAoB;IA4DpB,YAAY,CAAC,OAAO,EAAE,OAAO;IAO7B,qBAAqB;IAWrB,WAAW;IAaX,YAAY,CAAC,OAAO,EAAE,MAAM;IAI5B,gBAAgB,CAAC,QAAQ,KAAA;IASzB,gBAAgB;IA4BhB,SAAS;IAEH,cAAc,CAAC,WAAW,EAAE,IAAI;IAgBhC,WAAW,CAAC,WAAW,EAAE,IAAI;IAO7B,wBAAwB,CAAC,YAAY,EAAE,GAAG;IAYhD,6BAA6B,CAAC,IAAI,CAAC,EAAE,MAAM;CAG5C"}
@@ -1 +1 @@
1
- {"version":3,"file":"inbox.template.d.ts","sourceRoot":"","sources":["../../../../src/components/foundation-inbox/inbox.template.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAwK/C;;GAEG;AACH,eAAO,MAAM,uBAAuB,sEAoJnC,CAAC"}
1
+ {"version":3,"file":"inbox.template.d.ts","sourceRoot":"","sources":["../../../../src/components/foundation-inbox/inbox.template.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAkK/C;;GAEG;AACH,eAAO,MAAM,uBAAuB,sEAoJnC,CAAC"}
@@ -1,9 +1,14 @@
1
+ import { SocketSubscription } from '@genesislcap/foundation-comms';
1
2
  export interface FoundationInboxServiceStore {
2
3
  items: Array<any>;
3
4
  }
4
5
  export type SubscribeCallback = ({ store }: {
5
6
  store: FoundationInboxServiceStore;
6
7
  }) => any;
8
+ export type Subscription = {
9
+ callback: SubscribeCallback;
10
+ socketSubscription: SocketSubscription;
11
+ };
7
12
  export interface FoundationInboxService {
8
13
  subscribe(callback: SubscribeCallback, reverse: boolean, criteriaMatch: string): void;
9
14
  unsubscribe(callback: SubscribeCallback): void;
@@ -1 +1 @@
1
- {"version":3,"file":"inbox.service.d.ts","sourceRoot":"","sources":["../../../src/services/inbox.service.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,2BAA2B;IAC1C,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;CACnB;AAED,MAAM,MAAM,iBAAiB,GAAG,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,2BAA2B,CAAA;CAAE,KAAK,GAAG,CAAC;AAE3F,MAAM,WAAW,sBAAsB;IACrC,SAAS,CAAC,QAAQ,EAAE,iBAAiB,EAAE,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IACtF,WAAW,CAAC,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAC;CAChD;AAqED,eAAO,MAAM,sBAAsB,8EAElC,CAAC"}
1
+ {"version":3,"file":"inbox.service.d.ts","sourceRoot":"","sources":["../../../src/services/inbox.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmC,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAIpG,MAAM,WAAW,2BAA2B;IAC1C,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;CACnB;AAED,MAAM,MAAM,iBAAiB,GAAG,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,2BAA2B,CAAA;CAAE,KAAK,GAAG,CAAC;AAE3F,MAAM,MAAM,YAAY,GAAG;IACzB,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,kBAAkB,EAAE,kBAAkB,CAAC;CACxC,CAAC;AAEF,MAAM,WAAW,sBAAsB;IACrC,SAAS,CAAC,QAAQ,EAAE,iBAAiB,EAAE,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IACtF,WAAW,CAAC,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAC;CAChD;AAgED,eAAO,MAAM,sBAAsB,8EAElC,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { __awaiter, __decorate } from "tslib";
2
2
  import { Auth } from '@genesislcap/foundation-comms';
3
- import { CriteriaBuilder, ExpressionBuilder, Serialisers, } from '@genesislcap/foundation-criteria';
3
+ import { CriteriaBuilder, ExpressionBuilder, Join, Serialisers, } from '@genesislcap/foundation-criteria';
4
4
  import { showNotificationDialog } from '@genesislcap/foundation-notifications';
5
5
  import { GenesisElement, observable } from '@genesislcap/web-core';
6
6
  import dayjs from 'dayjs';
@@ -33,7 +33,6 @@ export class FoundationInboxBase extends GenesisElement {
33
33
  this.templates = [];
34
34
  this.templatesFilter = [];
35
35
  this.searchAlertLog = null;
36
- this.severitySearchValue = null;
37
36
  this.titleSearchValue = null;
38
37
  this.bodySearchValue = null;
39
38
  this.searchSubscribe = null;
@@ -43,6 +42,7 @@ export class FoundationInboxBase extends GenesisElement {
43
42
  this.toDatePickerValue = null;
44
43
  this.reverse = false;
45
44
  this.showLoadingIndicator = false;
45
+ this.severityType = [];
46
46
  // #endregion
47
47
  // #region Changed Events
48
48
  this.alertsChanged = () => (this.alertsFilter = this.alerts);
@@ -106,8 +106,9 @@ export class FoundationInboxBase extends GenesisElement {
106
106
  if (this.bodySearchValue) {
107
107
  filterCriteria.withExpression(expressionBuilder('MESSAGE', this.bodySearchValue, Serialisers.containsIgnoreCase));
108
108
  }
109
- if (this.severitySearchValue) {
110
- filterCriteria.withExpression(expressionBuilder('NOTIFY_SEVERITY', this.severitySearchValue, Serialisers.equals));
109
+ if (this.severityType.length > 0) {
110
+ const severityExpressions = this.severityType.map((severity) => expressionBuilder('NOTIFY_SEVERITY', severity, Serialisers.equals));
111
+ filterCriteria.withExpression(severityExpressions, { join: Join.Or() });
111
112
  }
112
113
  if (this.fromDatePickerValue) {
113
114
  filterCriteria.withExpression(expressionBuilder('CREATED_AT', this.formatDateStrForMatchCriteria(this.fromDatePickerValue), Serialisers.dateIsGreaterEqual));
@@ -121,7 +122,6 @@ export class FoundationInboxBase extends GenesisElement {
121
122
  }
122
123
  // Refresh the data subscription
123
124
  this.inboxService.unsubscribe(this.alertSubscription);
124
- this.alerts = [];
125
125
  this.inboxService.subscribe(this.alertSubscription, this.reverse, filterCriteria.build());
126
126
  }
127
127
  reverseOrder(reverse) {
@@ -140,7 +140,7 @@ export class FoundationInboxBase extends GenesisElement {
140
140
  clearSearch() {
141
141
  this.titleSearchValue = '';
142
142
  this.bodySearchValue = '';
143
- this.severitySearchValue = undefined;
143
+ this.severityType = [];
144
144
  this.fromDatePickerValue = undefined;
145
145
  this.toDatePickerValue = undefined;
146
146
  this.filterSearchAlertLog();
@@ -257,9 +257,6 @@ __decorate([
257
257
  __decorate([
258
258
  observable
259
259
  ], FoundationInboxBase.prototype, "searchAlertLog", void 0);
260
- __decorate([
261
- observable
262
- ], FoundationInboxBase.prototype, "severitySearchValue", void 0);
263
260
  __decorate([
264
261
  observable
265
262
  ], FoundationInboxBase.prototype, "titleSearchValue", void 0);
@@ -290,3 +287,6 @@ __decorate([
290
287
  __decorate([
291
288
  observable
292
289
  ], FoundationInboxBase.prototype, "showLoadingIndicator", void 0);
290
+ __decorate([
291
+ observable
292
+ ], FoundationInboxBase.prototype, "severityType", void 0);
@@ -16,25 +16,21 @@ const alertsTab = (tab) => html `
16
16
  <label part="label" for="control" class="search-label">
17
17
  <slot>Severity ...</slot>
18
18
  </label>
19
- <rapid-select
19
+ <rapid-multiselect
20
20
  class="select-input"
21
- :value=${(x) => x.severitySearchValue}
22
- @input=${(x, c) => {
23
- x.severitySearchValue = c.event.target.value;
21
+ :selectedOptions=${(x) => x.severityType}
22
+ @selectionChange=${(x, c) => {
23
+ x.severityType = c.event.detail;
24
24
  x.filterSearchAlertLog();
25
25
  }}
26
- autocomplete="off"
27
- >
28
- <rapid-option value="">--Select--</rapid-option>
29
- ${repeat((x) => ALL_SEVERITIES, html `
30
- <rapid-option
31
- value=${(x) => x.text}
32
- style="color: ${(x) => getSeverityColor(x.type)}"
33
- >
34
- ${(x) => x.text}
35
- </rapid-option>
36
- `)}
37
- </rapid-select>
26
+ :options=${() => ALL_SEVERITIES.map((value) => ({
27
+ value: value.text,
28
+ label: value.text,
29
+ labelStyle: `color:${getSeverityColor(value.type)}`,
30
+ }))}
31
+ search="false"
32
+ all="false"
33
+ ></rapid-multiselect>
38
34
  </div>
39
35
 
40
36
  <div style="display: flex; align-items: center;">
@@ -15,34 +15,32 @@ class FoundationInboxServiceImpl {
15
15
  logger.error(result.ERROR);
16
16
  return;
17
17
  }
18
- this.sourceRef = result.SOURCE_REF;
19
18
  this.store.items = updateArray(result === null || result === void 0 ? void 0 : result.ROW, this.store.items);
20
- this.subscriptions.forEach((callback) => callback({ store: this.store }));
19
+ this.subscriptions.forEach((subscription) => {
20
+ subscription.callback({ store: this.store });
21
+ });
21
22
  }, (response) => logger.error(response), Object.assign({ REVERSE: reverse }, (criteriaMatch != '' && { CRITERIA_MATCH: criteriaMatch })));
22
23
  }
23
24
  subscribe(callback, reverse, criteriaMatch) {
24
- this.subscriptions.push(callback);
25
25
  if (this.stream) {
26
26
  callback({ store: this.store });
27
27
  return;
28
28
  }
29
29
  this.stream = this.getStream(reverse, criteriaMatch);
30
- this.stream.subscribe();
30
+ const socketSubscription = this.stream.subscribe();
31
+ this.subscriptions.push({ callback, socketSubscription });
31
32
  }
32
33
  unsubscribe(callback) {
33
- const index = this.subscriptions.indexOf(callback);
34
+ const index = this.subscriptions.findIndex((subscription) => subscription.callback === callback);
34
35
  if (index >= 0) {
35
- this.subscriptions.splice(index, 1);
36
- }
37
- this.dataLogoff();
38
- }
39
- dataLogoff() {
40
- if (this.sourceRef && this.auth.isLoggedIn) {
41
- this.connect.dataLogoff(this.sourceRef);
36
+ const found = this.subscriptions.splice(index, 1);
37
+ found.forEach((subscription) => {
38
+ subscription.socketSubscription.unsubscribe();
39
+ subscription.callback({ store: { items: [] } });
40
+ });
42
41
  }
43
42
  this.stream = undefined;
44
43
  this.store = { items: [] };
45
- this.sourceRef = undefined;
46
44
  }
47
45
  }
48
46
  __decorate([
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@genesislcap/pbc-notify-ui",
3
3
  "description": "Genesis PBC Notify UI",
4
- "version": "1.0.61",
4
+ "version": "1.0.63",
5
5
  "license": "SEE LICENSE IN license.txt",
6
6
  "workspaces": [
7
7
  "client"