@genesislcap/pbc-notify-ui 1.0.49 → 1.0.51

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.
@@ -1 +1 @@
1
- {"version":3,"file":"foundation-inbox-counter.d.ts","sourceRoot":"","sources":["../../../../../../src/components/foundation-inbox/components/foundation-inbox-counter/foundation-inbox-counter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,cAAc,EAAc,MAAM,uBAAuB,CAAC;AAClF,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAI5E,qBAKa,sBAAuB,SAAQ,cAAc;IAC5C,KAAK,EAAE,MAAM,CAAK;IACN,YAAY,EAAE,sBAAsB,CAAC;IAC7D,OAAO,CAAC,mBAAmB,CAAgB;IAErC,iBAAiB;IAQvB,oBAAoB;CAIrB"}
1
+ {"version":3,"file":"foundation-inbox-counter.d.ts","sourceRoot":"","sources":["../../../../../../src/components/foundation-inbox/components/foundation-inbox-counter/foundation-inbox-counter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,cAAc,EAAc,MAAM,uBAAuB,CAAC;AAClF,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAK5E,qBAKa,sBAAuB,SAAQ,cAAc;IAC5C,KAAK,EAAE,MAAM,CAAK;IACN,YAAY,EAAE,sBAAsB,CAAC;IAC7D,OAAO,CAAC,mBAAmB,CAAgB;IAErC,iBAAiB;IAQvB,oBAAoB;CAIrB"}
@@ -1 +1 @@
1
- {"version":3,"file":"updateArray.d.ts","sourceRoot":"","sources":["../../../src/utils/updateArray.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,YAAa,KAAK,CAAC,GAAG,CAAC,WAAW,KAAK,CAAC,GAAG,CAAC,KAAG,KAAK,CAAC,GAAG,CA+B/E,CAAC"}
1
+ {"version":3,"file":"updateArray.d.ts","sourceRoot":"","sources":["../../../src/utils/updateArray.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,YAAa,KAAK,CAAC,GAAG,CAAC,WAAW,KAAK,CAAC,GAAG,CAAC,KAAG,KAAK,CAAC,GAAG,CAgC/E,CAAC"}
@@ -3,6 +3,7 @@ import { customElement, GenesisElement, observable } from '@genesislcap/web-core
3
3
  import { FoundationInboxService } from '../../../../services/inbox.service';
4
4
  import { FoundationInboxCounterStyles } from './foundation-inbox-counter.styles';
5
5
  import { FoundationInboxCounterTemplate } from './foundation-inbox-counter.template';
6
+ import { AlertStatus } from '../../inbox.types';
6
7
  let FoundationInboxCounter = class FoundationInboxCounter extends GenesisElement {
7
8
  constructor() {
8
9
  super(...arguments);
@@ -15,9 +16,9 @@ let FoundationInboxCounter = class FoundationInboxCounter extends GenesisElement
15
16
  return __awaiter(this, void 0, void 0, function* () {
16
17
  _super.connectedCallback.call(this);
17
18
  this.subscriptionHandler = ({ store }) => {
18
- this.value = store === null || store === void 0 ? void 0 : store.items.length;
19
+ this.value = ((store === null || store === void 0 ? void 0 : store.items) || []).length;
19
20
  };
20
- this.inboxService.subscribe(this.subscriptionHandler, false, "ALERT_STATUS=='NEW'");
21
+ this.inboxService.subscribe(this.subscriptionHandler, false, `ALERT_STATUS=='${AlertStatus.NEW}'`);
21
22
  });
22
23
  }
23
24
  disconnectedCallback() {
@@ -51,4 +51,4 @@ __decorate([
51
51
  __decorate([
52
52
  Auth
53
53
  ], FoundationInboxServiceImpl.prototype, "auth", void 0);
54
- export const FoundationInboxService = DI.createInterface((x) => x.singleton(FoundationInboxServiceImpl));
54
+ export const FoundationInboxService = DI.createInterface((x) => x.transient(FoundationInboxServiceImpl));
@@ -19,8 +19,9 @@ export const updateArray = (newData, oldData) => {
19
19
  }
20
20
  });
21
21
  }
22
- else if (newData && (!oldData || oldData.length === 0)) {
23
- oldData = [...new Set(newData)];
22
+ else if (Array.isArray(newData) && (!oldData || oldData.length === 0)) {
23
+ const inserts = newData.filter((row) => { var _a; return ((_a = row === null || row === void 0 ? void 0 : row.DETAILS) === null || _a === void 0 ? void 0 : _a.OPERATION) === 'INSERT'; });
24
+ oldData = [...new Set(inserts)];
24
25
  }
25
26
  return oldData;
26
27
  };
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.49",
4
+ "version": "1.0.51",
5
5
  "license": "SEE LICENSE IN license.txt",
6
6
  "workspaces": [
7
7
  "client"