@memberjunction/ng-link-directives 0.9.3 → 0.9.5
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.
- package/dist/lib/ng-email-link.d.ts +3 -0
- package/dist/lib/ng-email-link.js +14 -17
- package/dist/lib/ng-field-link.d.ts +3 -0
- package/dist/lib/ng-field-link.js +26 -26
- package/dist/lib/ng-link-directives.module.d.ts +8 -0
- package/dist/lib/ng-link-directives.module.js +29 -26
- package/dist/lib/ng-web-link.d.ts +3 -0
- package/dist/lib/ng-web-link.js +14 -17
- package/package.json +2 -2
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { ElementRef, Renderer2, OnInit } from '@angular/core';
|
|
2
2
|
import { EntityField } from '@memberjunction/core';
|
|
3
3
|
import { BaseLink } from './ng-base-link';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
4
5
|
export declare class EmailLink extends BaseLink implements OnInit {
|
|
5
6
|
private el;
|
|
6
7
|
private renderer;
|
|
7
8
|
field: EntityField;
|
|
8
9
|
constructor(el: ElementRef, renderer: Renderer2);
|
|
9
10
|
ngOnInit(): void;
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EmailLink, never>;
|
|
12
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<EmailLink, "[mjEmailLink]", never, { "field": "field"; }, {}, never, never, false, never>;
|
|
10
13
|
}
|
|
@@ -1,13 +1,8 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
1
|
import { Directive, Input } from '@angular/core';
|
|
8
2
|
import { LogError } from '@memberjunction/core';
|
|
9
3
|
import { BaseLink } from './ng-base-link';
|
|
10
|
-
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export class EmailLink extends BaseLink {
|
|
11
6
|
constructor(el, renderer) {
|
|
12
7
|
super();
|
|
13
8
|
this.el = el;
|
|
@@ -20,13 +15,15 @@ let EmailLink = class EmailLink extends BaseLink {
|
|
|
20
15
|
else
|
|
21
16
|
LogError('Entity Field must have ExtendedType of URL to use the mjWebLink directive. Field:' + this.field.Name);
|
|
22
17
|
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
],
|
|
32
|
-
|
|
18
|
+
}
|
|
19
|
+
EmailLink.ɵfac = function EmailLink_Factory(t) { return new (t || EmailLink)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.Renderer2)); };
|
|
20
|
+
EmailLink.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: EmailLink, selectors: [["", "mjEmailLink", ""]], inputs: { field: "field" }, features: [i0.ɵɵInheritDefinitionFeature] });
|
|
21
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(EmailLink, [{
|
|
22
|
+
type: Directive,
|
|
23
|
+
args: [{
|
|
24
|
+
selector: '[mjEmailLink]'
|
|
25
|
+
}]
|
|
26
|
+
}], function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }]; }, { field: [{
|
|
27
|
+
type: Input,
|
|
28
|
+
args: ['field']
|
|
29
|
+
}] }); })();
|
|
@@ -2,6 +2,7 @@ import { ElementRef, Renderer2, OnInit } from '@angular/core';
|
|
|
2
2
|
import { ActivatedRoute, Router } from '@angular/router';
|
|
3
3
|
import { BaseEntity, EntityField } from '@memberjunction/core';
|
|
4
4
|
import { BaseLink } from './ng-base-link';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
5
6
|
export declare class FieldLink extends BaseLink implements OnInit {
|
|
6
7
|
private el;
|
|
7
8
|
private renderer;
|
|
@@ -16,4 +17,6 @@ export declare class FieldLink extends BaseLink implements OnInit {
|
|
|
16
17
|
get field(): EntityField;
|
|
17
18
|
ngOnInit(): void;
|
|
18
19
|
onClick(event: Event): void;
|
|
20
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FieldLink, never>;
|
|
21
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<FieldLink, "[mjFieldLink]", never, { "record": "record"; "fieldName": "fieldName"; "replaceText": "replaceText"; }, {}, never, never, false, never>;
|
|
19
22
|
}
|
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
1
|
import { Directive, Input, HostListener } from '@angular/core';
|
|
8
2
|
import { LogStatus, Metadata } from '@memberjunction/core';
|
|
9
3
|
import { BaseLink } from './ng-base-link';
|
|
10
|
-
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
import * as i1 from "@angular/router";
|
|
6
|
+
export class FieldLink extends BaseLink {
|
|
11
7
|
constructor(el, renderer, route, router) {
|
|
12
8
|
super();
|
|
13
9
|
this.el = el;
|
|
@@ -63,22 +59,26 @@ let FieldLink = class FieldLink extends BaseLink {
|
|
|
63
59
|
event.preventDefault();
|
|
64
60
|
this.router.navigate(['resource', 'record', this._targetRecordID], { queryParams: { Entity: this._targetEntity } });
|
|
65
61
|
}
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
]
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
]
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
62
|
+
}
|
|
63
|
+
FieldLink.ɵfac = function FieldLink_Factory(t) { return new (t || FieldLink)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.Renderer2), i0.ɵɵdirectiveInject(i1.ActivatedRoute), i0.ɵɵdirectiveInject(i1.Router)); };
|
|
64
|
+
FieldLink.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: FieldLink, selectors: [["", "mjFieldLink", ""]], hostBindings: function FieldLink_HostBindings(rf, ctx) { if (rf & 1) {
|
|
65
|
+
i0.ɵɵlistener("click", function FieldLink_click_HostBindingHandler($event) { return ctx.onClick($event); });
|
|
66
|
+
} }, inputs: { record: "record", fieldName: "fieldName", replaceText: "replaceText" }, features: [i0.ɵɵInheritDefinitionFeature] });
|
|
67
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FieldLink, [{
|
|
68
|
+
type: Directive,
|
|
69
|
+
args: [{
|
|
70
|
+
selector: '[mjFieldLink]'
|
|
71
|
+
}]
|
|
72
|
+
}], function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i1.ActivatedRoute }, { type: i1.Router }]; }, { record: [{
|
|
73
|
+
type: Input,
|
|
74
|
+
args: ['record']
|
|
75
|
+
}], fieldName: [{
|
|
76
|
+
type: Input,
|
|
77
|
+
args: ['fieldName']
|
|
78
|
+
}], replaceText: [{
|
|
79
|
+
type: Input,
|
|
80
|
+
args: ['replaceText']
|
|
81
|
+
}], onClick: [{
|
|
82
|
+
type: HostListener,
|
|
83
|
+
args: ['click', ['$event']]
|
|
84
|
+
}] }); })();
|
|
@@ -1,2 +1,10 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./ng-email-link";
|
|
3
|
+
import * as i2 from "./ng-field-link";
|
|
4
|
+
import * as i3 from "./ng-web-link";
|
|
5
|
+
import * as i4 from "@angular/common";
|
|
1
6
|
export declare class LinkDirectivesModule {
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LinkDirectivesModule, never>;
|
|
8
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<LinkDirectivesModule, [typeof i1.EmailLink, typeof i2.FieldLink, typeof i3.WebLink], [typeof i4.CommonModule], [typeof i1.EmailLink, typeof i2.FieldLink, typeof i3.WebLink]>;
|
|
9
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<LinkDirectivesModule>;
|
|
2
10
|
}
|
|
@@ -1,31 +1,34 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
1
|
import { NgModule } from '@angular/core';
|
|
8
2
|
import { CommonModule } from '@angular/common';
|
|
9
3
|
import { EmailLink } from './ng-email-link';
|
|
10
4
|
import { FieldLink } from './ng-field-link';
|
|
11
5
|
import { WebLink } from './ng-web-link';
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export class LinkDirectivesModule {
|
|
8
|
+
}
|
|
9
|
+
LinkDirectivesModule.ɵfac = function LinkDirectivesModule_Factory(t) { return new (t || LinkDirectivesModule)(); };
|
|
10
|
+
LinkDirectivesModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: LinkDirectivesModule });
|
|
11
|
+
LinkDirectivesModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [CommonModule] });
|
|
12
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LinkDirectivesModule, [{
|
|
13
|
+
type: NgModule,
|
|
14
|
+
args: [{
|
|
15
|
+
declarations: [
|
|
16
|
+
EmailLink,
|
|
17
|
+
FieldLink,
|
|
18
|
+
WebLink
|
|
19
|
+
],
|
|
20
|
+
imports: [
|
|
21
|
+
CommonModule
|
|
22
|
+
],
|
|
23
|
+
exports: [
|
|
24
|
+
EmailLink,
|
|
25
|
+
FieldLink,
|
|
26
|
+
WebLink
|
|
27
|
+
]
|
|
28
|
+
}]
|
|
29
|
+
}], null, null); })();
|
|
30
|
+
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(LinkDirectivesModule, { declarations: [EmailLink,
|
|
31
|
+
FieldLink,
|
|
32
|
+
WebLink], imports: [CommonModule], exports: [EmailLink,
|
|
33
|
+
FieldLink,
|
|
34
|
+
WebLink] }); })();
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { ElementRef, Renderer2, OnInit } from '@angular/core';
|
|
2
2
|
import { EntityField } from '@memberjunction/core';
|
|
3
3
|
import { BaseLink } from './ng-base-link';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
4
5
|
export declare class WebLink extends BaseLink implements OnInit {
|
|
5
6
|
private el;
|
|
6
7
|
private renderer;
|
|
7
8
|
field: EntityField;
|
|
8
9
|
constructor(el: ElementRef, renderer: Renderer2);
|
|
9
10
|
ngOnInit(): void;
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WebLink, never>;
|
|
12
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<WebLink, "[mjWebLink]", never, { "field": "field"; }, {}, never, never, false, never>;
|
|
10
13
|
}
|
package/dist/lib/ng-web-link.js
CHANGED
|
@@ -1,13 +1,8 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
1
|
import { Directive, Input } from '@angular/core';
|
|
8
2
|
import { LogError } from '@memberjunction/core';
|
|
9
3
|
import { BaseLink } from './ng-base-link';
|
|
10
|
-
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export class WebLink extends BaseLink {
|
|
11
6
|
constructor(el, renderer) {
|
|
12
7
|
super();
|
|
13
8
|
this.el = el;
|
|
@@ -20,13 +15,15 @@ let WebLink = class WebLink extends BaseLink {
|
|
|
20
15
|
else
|
|
21
16
|
LogError('Entity Field must have ExtendedType of URL to use the mjWebLink directive. Field:' + this.field.Name);
|
|
22
17
|
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
],
|
|
32
|
-
|
|
18
|
+
}
|
|
19
|
+
WebLink.ɵfac = function WebLink_Factory(t) { return new (t || WebLink)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.Renderer2)); };
|
|
20
|
+
WebLink.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: WebLink, selectors: [["", "mjWebLink", ""]], inputs: { field: "field" }, features: [i0.ɵɵInheritDefinitionFeature] });
|
|
21
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WebLink, [{
|
|
22
|
+
type: Directive,
|
|
23
|
+
args: [{
|
|
24
|
+
selector: '[mjWebLink]'
|
|
25
|
+
}]
|
|
26
|
+
}], function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }]; }, { field: [{
|
|
27
|
+
type: Input,
|
|
28
|
+
args: ['field']
|
|
29
|
+
}] }); })();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@memberjunction/ng-link-directives",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.5",
|
|
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",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"@angular/common": "^15.2.0",
|
|
25
25
|
"@angular/core": "^15.2.0",
|
|
26
26
|
"@angular/router": "^15.2.0",
|
|
27
|
-
"@memberjunction/core": "^0.9.
|
|
27
|
+
"@memberjunction/core": "^0.9.16"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"tslib": "^2.3.0"
|