@memberjunction/ng-explorer-core 0.9.62 → 0.9.64

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.
@@ -25,7 +25,11 @@ export function LoadRecordResource() {
25
25
  }
26
26
  let EntityRecordResource = class EntityRecordResource extends BaseResourceComponent {
27
27
  get primaryKeyValues() {
28
- const pKeys = SharedService.ParsePrimaryKeys(this.Data.Configuration.Entity, this.Data.ResourceRecordID);
28
+ const md = new Metadata();
29
+ const e = md.Entities.find(e => e.Name.trim().toLowerCase() === this.Data.Configuration.Entity.trim().toLowerCase());
30
+ if (!e)
31
+ throw new Error(`Entity ${this.Data.Configuration.Entity} not found in metadata`);
32
+ const pKeys = SharedService.ParsePrimaryKeys(e, this.Data.ResourceRecordID);
29
33
  return pKeys;
30
34
  }
31
35
  GetResourceDisplayName(data) {
@@ -36,6 +40,10 @@ let EntityRecordResource = class EntityRecordResource extends BaseResourceCompon
36
40
  const md = new Metadata();
37
41
  const name = yield md.GetEntityRecordName(data.Configuration.Entity, data.ResourceRecordID);
38
42
  const e = md.Entities.find(e => e.Name === data.Configuration.Entity);
43
+ if (!e)
44
+ throw new Error(`Entity ${data.Configuration.Entity} not found in metadata`);
45
+ const pKeys = SharedService.ParsePrimaryKeys(e, data.ResourceRecordID);
46
+ const displayId = pKeys.length > 1 ? pKeys.map(p => p.Value).join(', ') : pKeys[0].Value;
39
47
  return (name ? name : data.Configuration.Entity) + ` (${data.ResourceRecordID.toString().trim()})`;
40
48
  }
41
49
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@memberjunction/ng-explorer-core",
3
- "version": "0.9.62",
3
+ "version": "0.9.64",
4
4
  "description": "MemberJunction Explorer: Core Angular Components",
5
5
  "main": "./dist/public-api.js",
6
6
  "typings": "./dist/public-api.d.ts",