@memberjunction/ng-link-directives 0.9.2 → 0.9.3
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 +0 -3
- package/dist/lib/ng-email-link.js +17 -14
- package/dist/lib/ng-field-link.d.ts +0 -3
- package/dist/lib/ng-field-link.js +26 -26
- package/dist/lib/ng-link-directives.module.d.ts +0 -8
- package/dist/lib/ng-link-directives.module.js +26 -29
- package/dist/lib/ng-web-link.d.ts +0 -3
- package/dist/lib/ng-web-link.js +17 -14
- package/package.json +33 -28
|
@@ -1,13 +1,10 @@
|
|
|
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";
|
|
5
4
|
export declare class EmailLink extends BaseLink implements OnInit {
|
|
6
5
|
private el;
|
|
7
6
|
private renderer;
|
|
8
7
|
field: EntityField;
|
|
9
8
|
constructor(el: ElementRef, renderer: Renderer2);
|
|
10
9
|
ngOnInit(): void;
|
|
11
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<EmailLink, never>;
|
|
12
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<EmailLink, "[mjEmailLink]", never, { "field": "field"; }, {}, never, never, false, never>;
|
|
13
10
|
}
|
|
@@ -1,8 +1,13 @@
|
|
|
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
|
+
};
|
|
1
7
|
import { Directive, Input } from '@angular/core';
|
|
2
8
|
import { LogError } from '@memberjunction/core';
|
|
3
9
|
import { BaseLink } from './ng-base-link';
|
|
4
|
-
|
|
5
|
-
export class EmailLink extends BaseLink {
|
|
10
|
+
let EmailLink = class EmailLink extends BaseLink {
|
|
6
11
|
constructor(el, renderer) {
|
|
7
12
|
super();
|
|
8
13
|
this.el = el;
|
|
@@ -15,15 +20,13 @@ export class EmailLink extends BaseLink {
|
|
|
15
20
|
else
|
|
16
21
|
LogError('Entity Field must have ExtendedType of URL to use the mjWebLink directive. Field:' + this.field.Name);
|
|
17
22
|
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
args: ['field']
|
|
29
|
-
}] }); })();
|
|
23
|
+
};
|
|
24
|
+
__decorate([
|
|
25
|
+
Input('field')
|
|
26
|
+
], EmailLink.prototype, "field", void 0);
|
|
27
|
+
EmailLink = __decorate([
|
|
28
|
+
Directive({
|
|
29
|
+
selector: '[mjEmailLink]'
|
|
30
|
+
})
|
|
31
|
+
], EmailLink);
|
|
32
|
+
export { EmailLink };
|
|
@@ -2,7 +2,6 @@ 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";
|
|
6
5
|
export declare class FieldLink extends BaseLink implements OnInit {
|
|
7
6
|
private el;
|
|
8
7
|
private renderer;
|
|
@@ -17,6 +16,4 @@ export declare class FieldLink extends BaseLink implements OnInit {
|
|
|
17
16
|
get field(): EntityField;
|
|
18
17
|
ngOnInit(): void;
|
|
19
18
|
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>;
|
|
22
19
|
}
|
|
@@ -1,9 +1,13 @@
|
|
|
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
|
+
};
|
|
1
7
|
import { Directive, Input, HostListener } from '@angular/core';
|
|
2
8
|
import { LogStatus, Metadata } from '@memberjunction/core';
|
|
3
9
|
import { BaseLink } from './ng-base-link';
|
|
4
|
-
|
|
5
|
-
import * as i1 from "@angular/router";
|
|
6
|
-
export class FieldLink extends BaseLink {
|
|
10
|
+
let FieldLink = class FieldLink extends BaseLink {
|
|
7
11
|
constructor(el, renderer, route, router) {
|
|
8
12
|
super();
|
|
9
13
|
this.el = el;
|
|
@@ -59,26 +63,22 @@ export class FieldLink extends BaseLink {
|
|
|
59
63
|
event.preventDefault();
|
|
60
64
|
this.router.navigate(['resource', 'record', this._targetRecordID], { queryParams: { Entity: this._targetEntity } });
|
|
61
65
|
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
(
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
}], onClick: [{
|
|
82
|
-
type: HostListener,
|
|
83
|
-
args: ['click', ['$event']]
|
|
84
|
-
}] }); })();
|
|
66
|
+
};
|
|
67
|
+
__decorate([
|
|
68
|
+
Input('record')
|
|
69
|
+
], FieldLink.prototype, "record", void 0);
|
|
70
|
+
__decorate([
|
|
71
|
+
Input('fieldName')
|
|
72
|
+
], FieldLink.prototype, "fieldName", void 0);
|
|
73
|
+
__decorate([
|
|
74
|
+
Input('replaceText')
|
|
75
|
+
], FieldLink.prototype, "replaceText", void 0);
|
|
76
|
+
__decorate([
|
|
77
|
+
HostListener('click', ['$event'])
|
|
78
|
+
], FieldLink.prototype, "onClick", null);
|
|
79
|
+
FieldLink = __decorate([
|
|
80
|
+
Directive({
|
|
81
|
+
selector: '[mjFieldLink]'
|
|
82
|
+
})
|
|
83
|
+
], FieldLink);
|
|
84
|
+
export { FieldLink };
|
|
@@ -1,10 +1,2 @@
|
|
|
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";
|
|
6
1
|
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>;
|
|
10
2
|
}
|
|
@@ -1,34 +1,31 @@
|
|
|
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
|
+
};
|
|
1
7
|
import { NgModule } from '@angular/core';
|
|
2
8
|
import { CommonModule } from '@angular/common';
|
|
3
9
|
import { EmailLink } from './ng-email-link';
|
|
4
10
|
import { FieldLink } from './ng-field-link';
|
|
5
11
|
import { WebLink } from './ng-web-link';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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] }); })();
|
|
12
|
+
let LinkDirectivesModule = class LinkDirectivesModule {
|
|
13
|
+
};
|
|
14
|
+
LinkDirectivesModule = __decorate([
|
|
15
|
+
NgModule({
|
|
16
|
+
declarations: [
|
|
17
|
+
EmailLink,
|
|
18
|
+
FieldLink,
|
|
19
|
+
WebLink
|
|
20
|
+
],
|
|
21
|
+
imports: [
|
|
22
|
+
CommonModule
|
|
23
|
+
],
|
|
24
|
+
exports: [
|
|
25
|
+
EmailLink,
|
|
26
|
+
FieldLink,
|
|
27
|
+
WebLink
|
|
28
|
+
]
|
|
29
|
+
})
|
|
30
|
+
], LinkDirectivesModule);
|
|
31
|
+
export { LinkDirectivesModule };
|
|
@@ -1,13 +1,10 @@
|
|
|
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";
|
|
5
4
|
export declare class WebLink extends BaseLink implements OnInit {
|
|
6
5
|
private el;
|
|
7
6
|
private renderer;
|
|
8
7
|
field: EntityField;
|
|
9
8
|
constructor(el: ElementRef, renderer: Renderer2);
|
|
10
9
|
ngOnInit(): void;
|
|
11
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<WebLink, never>;
|
|
12
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<WebLink, "[mjWebLink]", never, { "field": "field"; }, {}, never, never, false, never>;
|
|
13
10
|
}
|
package/dist/lib/ng-web-link.js
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
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
|
+
};
|
|
1
7
|
import { Directive, Input } from '@angular/core';
|
|
2
8
|
import { LogError } from '@memberjunction/core';
|
|
3
9
|
import { BaseLink } from './ng-base-link';
|
|
4
|
-
|
|
5
|
-
export class WebLink extends BaseLink {
|
|
10
|
+
let WebLink = class WebLink extends BaseLink {
|
|
6
11
|
constructor(el, renderer) {
|
|
7
12
|
super();
|
|
8
13
|
this.el = el;
|
|
@@ -15,15 +20,13 @@ export class WebLink extends BaseLink {
|
|
|
15
20
|
else
|
|
16
21
|
LogError('Entity Field must have ExtendedType of URL to use the mjWebLink directive. Field:' + this.field.Name);
|
|
17
22
|
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
args: ['field']
|
|
29
|
-
}] }); })();
|
|
23
|
+
};
|
|
24
|
+
__decorate([
|
|
25
|
+
Input('field')
|
|
26
|
+
], WebLink.prototype, "field", void 0);
|
|
27
|
+
WebLink = __decorate([
|
|
28
|
+
Directive({
|
|
29
|
+
selector: '[mjWebLink]'
|
|
30
|
+
})
|
|
31
|
+
], WebLink);
|
|
32
|
+
export { WebLink };
|
package/package.json
CHANGED
|
@@ -1,28 +1,33 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@memberjunction/ng-link-directives",
|
|
3
|
-
"version": "0.9.
|
|
4
|
-
"description": "MemberJunction: Angular Link Directives for turning an element in an angular app into an email, web, or record link",
|
|
5
|
-
"main": "./dist/public-api.js",
|
|
6
|
-
"typings": "./dist/public-api.d.ts",
|
|
7
|
-
"scripts": {
|
|
8
|
-
"test": "echo \"Error: no test specified\" && exit 1",
|
|
9
|
-
"build": "ngc"
|
|
10
|
-
},
|
|
11
|
-
"keywords": [
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
"
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
"
|
|
19
|
-
|
|
20
|
-
"@angular/
|
|
21
|
-
"@angular/
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
"
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@memberjunction/ng-link-directives",
|
|
3
|
+
"version": "0.9.3",
|
|
4
|
+
"description": "MemberJunction: Angular Link Directives for turning an element in an angular app into an email, web, or record link",
|
|
5
|
+
"main": "./dist/public-api.js",
|
|
6
|
+
"typings": "./dist/public-api.d.ts",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
9
|
+
"build": "ngc"
|
|
10
|
+
},
|
|
11
|
+
"keywords": [
|
|
12
|
+
"MemberJunction",
|
|
13
|
+
"Angular",
|
|
14
|
+
"Link",
|
|
15
|
+
"Directives"
|
|
16
|
+
],
|
|
17
|
+
"author": "",
|
|
18
|
+
"license": "ISC",
|
|
19
|
+
"devDependencies": {
|
|
20
|
+
"@angular/compiler": "^15.2.0",
|
|
21
|
+
"@angular/compiler-cli": "^15.2.0"
|
|
22
|
+
},
|
|
23
|
+
"peerDependencies": {
|
|
24
|
+
"@angular/common": "^15.2.0",
|
|
25
|
+
"@angular/core": "^15.2.0",
|
|
26
|
+
"@angular/router": "^15.2.0",
|
|
27
|
+
"@memberjunction/core": "^0.9.15"
|
|
28
|
+
},
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"tslib": "^2.3.0"
|
|
31
|
+
},
|
|
32
|
+
"sideEffects": false
|
|
33
|
+
}
|