@memberjunction/ng-link-directives 1.2.2 → 1.3.0

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":"ng-field-link.d.ts","sourceRoot":"","sources":["../../src/lib/ng-field-link.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,UAAU,EAAE,SAAS,EAAS,MAAM,EAAgB,MAAM,eAAe,CAAC;AAC9F,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,WAAW,EAAmC,MAAM,sBAAsB,CAAC;AAChG,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;;AAE1C,qBAGa,SAAU,SAAQ,QAAS,YAAW,MAAM;IAU3C,OAAO,CAAC,EAAE;IAAc,OAAO,CAAC,QAAQ;IAAa,OAAO,CAAC,KAAK;IAAkB,OAAO,CAAC,MAAM;IAR7F,MAAM,EAAG,UAAU,CAAC;IACjB,SAAS,EAAG,MAAM,CAAC;IACjB,WAAW,EAAE,OAAO,CAAS;IAEnD,OAAO,CAAC,aAAa,CAAc;IACnC,OAAO,CAAC,iBAAiB,CAAyB;IAClD,OAAO,CAAC,eAAe,CAAa;gBAEhB,EAAE,EAAE,UAAU,EAAU,QAAQ,EAAE,SAAS,EAAU,KAAK,EAAE,cAAc,EAAU,MAAM,EAAE,MAAM;IAItH,IAAW,KAAK,IAAI,WAAW,CAM9B;IAED,QAAQ;IA6CR,OAAO,CAAC,KAAK,EAAE,KAAK;yCAnET,SAAS;2CAAT,SAAS;CA6ErB"}
1
+ {"version":3,"file":"ng-field-link.d.ts","sourceRoot":"","sources":["../../src/lib/ng-field-link.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,UAAU,EAAE,SAAS,EAAS,MAAM,EAAgB,MAAM,eAAe,CAAC;AAC9F,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,UAAU,EAAgB,WAAW,EAAmC,MAAM,sBAAsB,CAAC;AAC9G,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;;AAE1C,qBAGa,SAAU,SAAQ,QAAS,YAAW,MAAM;IAU3C,OAAO,CAAC,EAAE;IAAc,OAAO,CAAC,QAAQ;IAAa,OAAO,CAAC,KAAK;IAAkB,OAAO,CAAC,MAAM;IAR7F,MAAM,EAAG,UAAU,CAAC;IACjB,SAAS,EAAG,MAAM,CAAC;IACjB,WAAW,EAAE,OAAO,CAAS;IAEnD,OAAO,CAAC,aAAa,CAAc;IACnC,OAAO,CAAC,iBAAiB,CAAyB;IAClD,OAAO,CAAC,eAAe,CAAa;gBAEhB,EAAE,EAAE,UAAU,EAAU,QAAQ,EAAE,SAAS,EAAU,KAAK,EAAE,cAAc,EAAU,MAAM,EAAE,MAAM;IAItH,IAAW,KAAK,IAAI,WAAW,CAM9B;IAED,QAAQ;IA6CR,OAAO,CAAC,KAAK,EAAE,KAAK;yCAnET,SAAS;2CAAT,SAAS;CA6ErB"}
@@ -1,5 +1,5 @@
1
1
  import { Directive, Input, HostListener } from '@angular/core';
2
- import { LogStatus, Metadata } from '@memberjunction/core';
2
+ import { CompositeKey, LogStatus, Metadata } from '@memberjunction/core';
3
3
  import { BaseLink } from './ng-base-link';
4
4
  import * as i0 from "@angular/core";
5
5
  import * as i1 from "@angular/router";
@@ -48,11 +48,11 @@ export class FieldLink extends BaseLink {
48
48
  // make sure that this.field.Value is not null or undefined
49
49
  // we didn't have the related field mapping info (above), no related entity name field map provided in the entity field metadata, so do a lookup
50
50
  // requires a server round trip and hitting the DB, so we try to avoid this
51
- const pkVals = [{
51
+ let compositeKey = new CompositeKey([{
52
52
  FieldName: this._targetEntityInfo.PrimaryKey.Name, // AT THE MOMENT - we only support foreign keys with a single value
53
53
  Value: this.field.Value
54
- }];
55
- md.GetEntityRecordName(relatedEntity, pkVals).then(recordName => {
54
+ }]);
55
+ md.GetEntityRecordName(relatedEntity, compositeKey).then(recordName => {
56
56
  if (recordName && recordName.length > 0)
57
57
  this.renderer.setProperty(this.el.nativeElement, 'textContent', recordName);
58
58
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@memberjunction/ng-link-directives",
3
- "version": "1.2.2",
3
+ "version": "1.3.0",
4
4
  "description": "MemberJunction: Angular Link Directives for turning an element in an angular app into an email, web, or record link",
5
5
  "main": "./dist/public-api.js",
6
6
  "typings": "./dist/public-api.d.ts",
@@ -30,7 +30,7 @@
30
30
  },
31
31
  "dependencies": {
32
32
  "tslib": "^2.3.0",
33
- "@memberjunction/core": "~1.2.2"
33
+ "@memberjunction/core": "~1.3.0"
34
34
  },
35
35
  "sideEffects": false
36
36
  }