@memberjunction/ng-shared 0.9.2
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/urlPipe.d.ts +7 -0
- package/dist/lib/urlPipe.js +16 -0
- package/dist/lib/util.d.ts +1 -0
- package/dist/lib/util.js +16 -0
- package/dist/module.d.ts +8 -0
- package/dist/module.js +24 -0
- package/dist/public-api.d.ts +3 -0
- package/dist/public-api.js +6 -0
- package/package.json +33 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class URLPipe implements PipeTransform {
|
|
4
|
+
transform(value: string): string;
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<URLPipe, never>;
|
|
6
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<URLPipe, "formatUrl", false>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Pipe } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export class URLPipe {
|
|
4
|
+
transform(value) {
|
|
5
|
+
if (value && !value.includes('http'))
|
|
6
|
+
return 'https://' + value;
|
|
7
|
+
else
|
|
8
|
+
return value;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
URLPipe.ɵfac = function URLPipe_Factory(t) { return new (t || URLPipe)(); };
|
|
12
|
+
URLPipe.ɵpipe = /*@__PURE__*/ i0.ɵɵdefinePipe({ name: "formatUrl", type: URLPipe, pure: true });
|
|
13
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(URLPipe, [{
|
|
14
|
+
type: Pipe,
|
|
15
|
+
args: [{ name: 'formatUrl' }]
|
|
16
|
+
}], null, null); })();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function kendoSVGIcon(iconName: string): any;
|
package/dist/lib/util.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as KendoSVGIcons from "@progress/kendo-svg-icons";
|
|
2
|
+
export function kendoSVGIcon(iconName) {
|
|
3
|
+
// Cast KendoSVGIcons to any to bypass the index signature check
|
|
4
|
+
try {
|
|
5
|
+
const lookupName = iconName.endsWith('Icon') ? iconName : iconName + 'Icon';
|
|
6
|
+
const icon = KendoSVGIcons[lookupName];
|
|
7
|
+
if (!icon)
|
|
8
|
+
console.log('Icon not found: ' + iconName);
|
|
9
|
+
return icon || null;
|
|
10
|
+
}
|
|
11
|
+
catch (e) {
|
|
12
|
+
// icon not found
|
|
13
|
+
console.log('Icon not found: ' + iconName);
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
16
|
+
}
|
package/dist/module.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./lib/urlPipe";
|
|
3
|
+
import * as i2 from "@progress/kendo-angular-icons";
|
|
4
|
+
export declare class MemberJunctionSharedModule {
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MemberJunctionSharedModule, never>;
|
|
6
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<MemberJunctionSharedModule, [typeof i1.URLPipe], [typeof i2.IconsModule], [typeof i1.URLPipe]>;
|
|
7
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<MemberJunctionSharedModule>;
|
|
8
|
+
}
|
package/dist/module.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { NgModule } from '@angular/core';
|
|
2
|
+
import { IconsModule } from '@progress/kendo-angular-icons';
|
|
3
|
+
import { URLPipe } from './lib/urlPipe';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export class MemberJunctionSharedModule {
|
|
6
|
+
}
|
|
7
|
+
MemberJunctionSharedModule.ɵfac = function MemberJunctionSharedModule_Factory(t) { return new (t || MemberJunctionSharedModule)(); };
|
|
8
|
+
MemberJunctionSharedModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MemberJunctionSharedModule });
|
|
9
|
+
MemberJunctionSharedModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [IconsModule] });
|
|
10
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MemberJunctionSharedModule, [{
|
|
11
|
+
type: NgModule,
|
|
12
|
+
args: [{
|
|
13
|
+
declarations: [
|
|
14
|
+
URLPipe
|
|
15
|
+
],
|
|
16
|
+
imports: [
|
|
17
|
+
IconsModule
|
|
18
|
+
],
|
|
19
|
+
exports: [
|
|
20
|
+
URLPipe
|
|
21
|
+
]
|
|
22
|
+
}]
|
|
23
|
+
}], null, null); })();
|
|
24
|
+
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MemberJunctionSharedModule, { declarations: [URLPipe], imports: [IconsModule], exports: [URLPipe] }); })();
|
package/package.json
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@memberjunction/ng-shared",
|
|
3
|
+
"version": "0.9.2",
|
|
4
|
+
"description": "MemberJunction: Angular Shared Package - utility functions and other reusable elements used across other MJ Angular packages",
|
|
5
|
+
"main": "./dist/public-api.js",
|
|
6
|
+
"typings": "./dist/public-api.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"/dist"
|
|
9
|
+
],
|
|
10
|
+
"scripts": {
|
|
11
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
12
|
+
"build": "ngc"
|
|
13
|
+
},
|
|
14
|
+
"keywords": [
|
|
15
|
+
"MemberJunction",
|
|
16
|
+
"Angular"
|
|
17
|
+
],
|
|
18
|
+
"author": "",
|
|
19
|
+
"license": "ISC",
|
|
20
|
+
"devDependencies": {
|
|
21
|
+
"@angular/compiler": "^17.1.2",
|
|
22
|
+
"@angular/compiler-cli": "^17.1.2"
|
|
23
|
+
},
|
|
24
|
+
"peerDependencies": {
|
|
25
|
+
"@angular/common": "^17.1.2",
|
|
26
|
+
"@angular/core": "^17.1.2",
|
|
27
|
+
"@progress/kendo-svg-icons": "^15.0.1"
|
|
28
|
+
},
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"tslib": "^2.3.0"
|
|
31
|
+
},
|
|
32
|
+
"sideEffects": false
|
|
33
|
+
}
|