piral-ng 1.3.0-beta.5959 → 1.3.0-beta.6001
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/README.md +2 -126
- package/package.json +9 -7
- package/common/NgExtension.d.ts +0 -14
- package/common/ResourceUrlPipe.d.ts +0 -10
- package/common/SharedModule.d.ts +0 -10
- package/common/esm2022/NgExtension.mjs +0 -47
- package/common/esm2022/ResourceUrlPipe.mjs +0 -23
- package/common/esm2022/SharedModule.mjs +0 -25
- package/common/esm2022/piral-ng-common.mjs +0 -5
- package/common/esm2022/public_api.mjs +0 -4
- package/common/fesm2022/piral-ng-common.mjs +0 -93
- package/common/fesm2022/piral-ng-common.mjs.map +0 -1
- package/common/index.d.ts +0 -1
- package/common/package.json +0 -35
- package/common/piral-ng-common.js +0 -3
- package/common/public_api.d.ts +0 -3
- package/esm/common/NgExtension.d.ts +0 -11
- package/esm/common/NgExtension.js +0 -41
- package/esm/common/NgExtension.js.map +0 -1
- package/esm/common/ResourceUrlPipe.d.ts +0 -7
- package/esm/common/ResourceUrlPipe.js +0 -18
- package/esm/common/ResourceUrlPipe.js.map +0 -1
- package/esm/common/SharedModule.d.ts +0 -3
- package/esm/common/SharedModule.js +0 -21
- package/esm/common/SharedModule.js.map +0 -1
- package/esm/common/public_api.d.ts +0 -3
- package/esm/common/public_api.js +0 -4
- package/esm/common/public_api.js.map +0 -1
- package/lib/common/NgExtension.d.ts +0 -11
- package/lib/common/NgExtension.js +0 -44
- package/lib/common/NgExtension.js.map +0 -1
- package/lib/common/ResourceUrlPipe.d.ts +0 -7
- package/lib/common/ResourceUrlPipe.js +0 -21
- package/lib/common/ResourceUrlPipe.js.map +0 -1
- package/lib/common/SharedModule.d.ts +0 -3
- package/lib/common/SharedModule.js +0 -24
- package/lib/common/SharedModule.js.map +0 -1
- package/lib/common/public_api.d.ts +0 -3
- package/lib/common/public_api.js +0 -7
- package/lib/common/public_api.js.map +0 -1
- package/src/common/NgExtension.ts +0 -33
- package/src/common/ResourceUrlPipe.ts +0 -12
- package/src/common/SharedModule.ts +0 -18
- package/src/common/index.d.ts +0 -1
- package/src/common/ng-package.json +0 -11
- package/src/common/package.json +0 -19
- package/src/common/piral-ng-common.js +0 -3
- package/src/common/public_api.ts +0 -3
package/README.md
CHANGED
|
@@ -256,7 +256,7 @@ module.exports = (config) => {
|
|
|
256
256
|
esModule: false,
|
|
257
257
|
},
|
|
258
258
|
};
|
|
259
|
-
|
|
259
|
+
|
|
260
260
|
const ruleIndex = config.module.rules.findIndex(m => m.test.toString() === /\.tsx?$/i.toString());
|
|
261
261
|
|
|
262
262
|
config.module.rules.splice(ruleIndex, 1,
|
|
@@ -510,131 +510,7 @@ If you still need to use `templateUrl` (or `styleUrls`) then take a look below a
|
|
|
510
510
|
|
|
511
511
|
## Angular Versions
|
|
512
512
|
|
|
513
|
-
This plugin works with
|
|
514
|
-
|
|
515
|
-
### Angular 2
|
|
516
|
-
|
|
517
|
-
Angular 2 works with some configuration (see below) even though the usage of annotations (internally) is slightly different in `piral-ng`.
|
|
518
|
-
|
|
519
|
-
The basic dependencies look as follows:
|
|
520
|
-
|
|
521
|
-
```json
|
|
522
|
-
{
|
|
523
|
-
"@angular/common": "^2",
|
|
524
|
-
"@angular/compiler": "^2",
|
|
525
|
-
"@angular/core": "^2",
|
|
526
|
-
"@angular/router": "^2",
|
|
527
|
-
"@angular/platform-browser": "^2",
|
|
528
|
-
"@angular/platform-browser-dynamic": "^2",
|
|
529
|
-
"core-js": "^3.15.2",
|
|
530
|
-
"rxjs": "^5.0",
|
|
531
|
-
"zone.js": "~0.9"
|
|
532
|
-
}
|
|
533
|
-
```
|
|
534
|
-
|
|
535
|
-
### Angular 3
|
|
536
|
-
|
|
537
|
-
Was never released. Not covered.
|
|
538
|
-
|
|
539
|
-
### Angular 4
|
|
540
|
-
|
|
541
|
-
Angular 4 works even though the usage of annotations (internally) is slightly different in `piral-ng`.
|
|
542
|
-
|
|
543
|
-
The basic dependencies look as follows:
|
|
544
|
-
|
|
545
|
-
```json
|
|
546
|
-
{
|
|
547
|
-
"@angular/common": "^4",
|
|
548
|
-
"@angular/compiler": "^4",
|
|
549
|
-
"@angular/core": "^4",
|
|
550
|
-
"@angular/router": "^4",
|
|
551
|
-
"@angular/platform-browser": "^4",
|
|
552
|
-
"@angular/platform-browser-dynamic": "^4",
|
|
553
|
-
"core-js": "^3.15.2",
|
|
554
|
-
"rxjs": "^5.0.0",
|
|
555
|
-
"zone.js": "~0.9"
|
|
556
|
-
}
|
|
557
|
-
```
|
|
558
|
-
|
|
559
|
-
### Angular 5
|
|
560
|
-
|
|
561
|
-
In general, Angular 5 seems to work.
|
|
562
|
-
|
|
563
|
-
The basic dependencies look as follows:
|
|
564
|
-
|
|
565
|
-
```json
|
|
566
|
-
{
|
|
567
|
-
"@angular/common": "^5",
|
|
568
|
-
"@angular/compiler": "^5",
|
|
569
|
-
"@angular/core": "^5",
|
|
570
|
-
"@angular/router": "^5",
|
|
571
|
-
"@angular/platform-browser": "^5",
|
|
572
|
-
"@angular/platform-browser-dynamic": "^5",
|
|
573
|
-
"core-js": "^3.15.2",
|
|
574
|
-
"rxjs": "^5.0.0",
|
|
575
|
-
"zone.js": "~0.9"
|
|
576
|
-
}
|
|
577
|
-
```
|
|
578
|
-
|
|
579
|
-
### Angular 6
|
|
580
|
-
|
|
581
|
-
In general, Angular 6 seems to work.
|
|
582
|
-
|
|
583
|
-
The basic dependencies look as follows:
|
|
584
|
-
|
|
585
|
-
```json
|
|
586
|
-
{
|
|
587
|
-
"@angular/common": "^6",
|
|
588
|
-
"@angular/compiler": "^6",
|
|
589
|
-
"@angular/core": "^6",
|
|
590
|
-
"@angular/router": "^6",
|
|
591
|
-
"@angular/platform-browser": "^6",
|
|
592
|
-
"@angular/platform-browser-dynamic": "^6",
|
|
593
|
-
"core-js": "^3.15.2",
|
|
594
|
-
"rxjs": "^6.0.0",
|
|
595
|
-
"zone.js": "~0.9"
|
|
596
|
-
}
|
|
597
|
-
```
|
|
598
|
-
|
|
599
|
-
### Angular 7
|
|
600
|
-
|
|
601
|
-
In general, Angular 7 seems to work.
|
|
602
|
-
|
|
603
|
-
The basic dependencies look as follows:
|
|
604
|
-
|
|
605
|
-
```json
|
|
606
|
-
{
|
|
607
|
-
"@angular/common": "^7",
|
|
608
|
-
"@angular/compiler": "^7",
|
|
609
|
-
"@angular/core": "^7",
|
|
610
|
-
"@angular/router": "^7",
|
|
611
|
-
"@angular/platform-browser": "^7",
|
|
612
|
-
"@angular/platform-browser-dynamic": "^7",
|
|
613
|
-
"core-js": "^3.15.2",
|
|
614
|
-
"rxjs": "^6.4",
|
|
615
|
-
"zone.js": "~0.9"
|
|
616
|
-
}
|
|
617
|
-
```
|
|
618
|
-
|
|
619
|
-
### Angular 8
|
|
620
|
-
|
|
621
|
-
In general, Angular 8 seems to work and is **supported**.
|
|
622
|
-
|
|
623
|
-
The basic dependencies look as follows:
|
|
624
|
-
|
|
625
|
-
```json
|
|
626
|
-
{
|
|
627
|
-
"@angular/common": "^8",
|
|
628
|
-
"@angular/compiler": "^8",
|
|
629
|
-
"@angular/core": "^8",
|
|
630
|
-
"@angular/router": "^8",
|
|
631
|
-
"@angular/platform-browser": "^8",
|
|
632
|
-
"@angular/platform-browser-dynamic": "^8",
|
|
633
|
-
"core-js": "^3.15.2",
|
|
634
|
-
"rxjs": "^6.4",
|
|
635
|
-
"zone.js": "~0.9"
|
|
636
|
-
}
|
|
637
|
-
```
|
|
513
|
+
This plugin works with recent versions of Angular (right now 9 - 16). Support for Angular.js (also known as Angular 1) is given via `piral-ngjs`.
|
|
638
514
|
|
|
639
515
|
### Angular 9
|
|
640
516
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "piral-ng",
|
|
3
|
-
"version": "1.3.0-beta.
|
|
3
|
+
"version": "1.3.0-beta.6001",
|
|
4
4
|
"description": "Plugin for integrating Angular components in Piral.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"piral",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"require": "./lib/index.js"
|
|
26
26
|
},
|
|
27
27
|
"./common": {
|
|
28
|
-
"import": "./common"
|
|
28
|
+
"import": "./common.js"
|
|
29
29
|
},
|
|
30
30
|
"./convert": {
|
|
31
31
|
"import": "./convert.js"
|
|
@@ -64,14 +64,16 @@
|
|
|
64
64
|
},
|
|
65
65
|
"scripts": {
|
|
66
66
|
"cleanup": "rimraf common esm lib convert.d.ts convert.js",
|
|
67
|
-
"build": "yarn build:
|
|
68
|
-
"build:ng": "ng-packagr -p src/common/ng-package.json",
|
|
67
|
+
"build": "yarn build:commonjs && yarn build:esnext && yarn build:convert",
|
|
69
68
|
"build:convert": "tsc convert.ts --skipLibCheck --declaration --module esnext",
|
|
70
69
|
"build:commonjs": "tsc --project tsconfig.json --outDir lib --module commonjs",
|
|
71
70
|
"build:esnext": "tsc --project tsconfig.json --outDir esm --module esnext",
|
|
72
71
|
"typedoc": "typedoc --json ../../../docs/types/piral-ng.json src --exclude \"src/**/*.test.*\"",
|
|
73
72
|
"test": "echo \"Error: run tests from root\" && exit 1"
|
|
74
73
|
},
|
|
74
|
+
"peerDependencies": {
|
|
75
|
+
"piral-ng-common": "*"
|
|
76
|
+
},
|
|
75
77
|
"devDependencies": {
|
|
76
78
|
"@angular/common": "^16.0.0",
|
|
77
79
|
"@angular/compiler": "^16.0.0",
|
|
@@ -80,9 +82,9 @@
|
|
|
80
82
|
"@angular/platform-browser": "^16.0.0",
|
|
81
83
|
"@angular/platform-browser-dynamic": "^16.0.0",
|
|
82
84
|
"@angular/router": "^16.0.0",
|
|
83
|
-
"
|
|
84
|
-
"piral-
|
|
85
|
+
"piral-core": "1.3.0-beta.6001",
|
|
86
|
+
"piral-ng-common": "^16.0.0",
|
|
85
87
|
"rxjs": "^7.3.0"
|
|
86
88
|
},
|
|
87
|
-
"gitHead": "
|
|
89
|
+
"gitHead": "ea22bb317f7bfb648f0fe8ed747c6a13faff54e5"
|
|
88
90
|
}
|
package/common/NgExtension.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { PiletApi } from 'piral-core';
|
|
2
|
-
import { ElementRef, OnChanges } from '@angular/core';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class NgExtension implements OnChanges {
|
|
5
|
-
private elRef;
|
|
6
|
-
private piral;
|
|
7
|
-
name: string | undefined;
|
|
8
|
-
params: object | undefined;
|
|
9
|
-
constructor(elRef: ElementRef<HTMLElement>, piral: PiletApi);
|
|
10
|
-
ngOnChanges(): void;
|
|
11
|
-
ngAfterContentInit(): void;
|
|
12
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NgExtension, never>;
|
|
13
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NgExtension, "extension-component", never, { "name": { "alias": "name"; "required": false; }; "params": { "alias": "params"; "required": false; }; }, {}, never, never, false, never>;
|
|
14
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { PiletApi } from 'piral-core';
|
|
2
|
-
import { PipeTransform } from '@angular/core';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class ResourceUrlPipe implements PipeTransform {
|
|
5
|
-
private piral;
|
|
6
|
-
constructor(piral: PiletApi);
|
|
7
|
-
transform(value: string): string;
|
|
8
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ResourceUrlPipe, never>;
|
|
9
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<ResourceUrlPipe, "resourceUrl", false>;
|
|
10
|
-
}
|
package/common/SharedModule.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
import * as i1 from "./NgExtension";
|
|
3
|
-
import * as i2 from "./ResourceUrlPipe";
|
|
4
|
-
import * as i3 from "@angular/common";
|
|
5
|
-
export declare class SharedModule {
|
|
6
|
-
static props: {};
|
|
7
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<SharedModule, never>;
|
|
8
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<SharedModule, [typeof i1.NgExtension, typeof i2.ResourceUrlPipe], [typeof i3.CommonModule], [typeof i1.NgExtension, typeof i2.ResourceUrlPipe]>;
|
|
9
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<SharedModule>;
|
|
10
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { Component, Input, Inject } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
const selector = 'extension-component';
|
|
4
|
-
class NgExtension {
|
|
5
|
-
elRef;
|
|
6
|
-
piral;
|
|
7
|
-
name;
|
|
8
|
-
params;
|
|
9
|
-
constructor(elRef, piral) {
|
|
10
|
-
this.elRef = elRef;
|
|
11
|
-
this.piral = piral;
|
|
12
|
-
}
|
|
13
|
-
ngOnChanges() {
|
|
14
|
-
this.elRef.nativeElement.dispatchEvent(new CustomEvent('extension-props-changed', {
|
|
15
|
-
detail: {
|
|
16
|
-
name: this.name,
|
|
17
|
-
params: this.params,
|
|
18
|
-
},
|
|
19
|
-
}));
|
|
20
|
-
}
|
|
21
|
-
ngAfterContentInit() {
|
|
22
|
-
this.piral.renderHtmlExtension(this.elRef.nativeElement, {
|
|
23
|
-
name: this.name,
|
|
24
|
-
params: this.params,
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: NgExtension, deps: [{ token: i0.ElementRef }, { token: 'piral' }], target: i0.ɵɵFactoryTarget.Component });
|
|
28
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.1", type: NgExtension, selector: "extension-component", inputs: { name: "name", params: "params" }, usesOnChanges: true, ngImport: i0, template: '', isInline: true });
|
|
29
|
-
}
|
|
30
|
-
export { NgExtension };
|
|
31
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: NgExtension, decorators: [{
|
|
32
|
-
type: Component,
|
|
33
|
-
args: [{
|
|
34
|
-
selector,
|
|
35
|
-
template: '',
|
|
36
|
-
}]
|
|
37
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: undefined, decorators: [{
|
|
38
|
-
type: Inject,
|
|
39
|
-
args: ['piral']
|
|
40
|
-
}] }]; }, propDecorators: { name: [{
|
|
41
|
-
type: Input,
|
|
42
|
-
args: ['name']
|
|
43
|
-
}], params: [{
|
|
44
|
-
type: Input,
|
|
45
|
-
args: ['params']
|
|
46
|
-
}] } });
|
|
47
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTmdFeHRlbnNpb24uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvY29tbW9uL05nRXh0ZW5zaW9uLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLE9BQU8sRUFBRSxTQUFTLEVBQWMsS0FBSyxFQUFFLE1BQU0sRUFBYSxNQUFNLGVBQWUsQ0FBQzs7QUFFaEYsTUFBTSxRQUFRLEdBQUcscUJBQXFCLENBQUM7QUFFdkMsTUFJYSxXQUFXO0lBSUY7SUFBeUQ7SUFIdkQsSUFBSSxDQUFxQjtJQUN2QixNQUFNLENBQXFCO0lBRW5ELFlBQW9CLEtBQThCLEVBQTJCLEtBQWU7UUFBeEUsVUFBSyxHQUFMLEtBQUssQ0FBeUI7UUFBMkIsVUFBSyxHQUFMLEtBQUssQ0FBVTtJQUFHLENBQUM7SUFFaEcsV0FBVztRQUNULElBQUksQ0FBQyxLQUFLLENBQUMsYUFBYSxDQUFDLGFBQWEsQ0FDcEMsSUFBSSxXQUFXLENBQUMseUJBQXlCLEVBQUU7WUFDekMsTUFBTSxFQUFFO2dCQUNOLElBQUksRUFBRSxJQUFJLENBQUMsSUFBSTtnQkFDZixNQUFNLEVBQUUsSUFB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1zJykgcHVibGljIHBhcmFtczogb2JqZWN0IHwgdW5kZWZpbmVkO1xuXG4gIGNvbnN0cnVjdG9yKHByaXZhdGUgZWxSZWY6IEVsZW1lbnRSZWY8SFRNTEVsZW1lbnQ+LCBASW5qZWN0KCdwaXJhbCcpIHByaXZhdGUgcGlyYWw6IFBpbGV0QXBpKSB7fVxuXG4gIG5nT25DaGFuZ2VzKCkge1xuICAgIHRoaXMuZWxSZWYubmF0aXZlRWxlbWVudC5kaXNwYXRjaEV2ZW50KFxuICAgICAgbmV3IEN1c3RvbUV2ZW50KCdleHRlbnNpb24tcHJvcHMtY2hhbmdlZCcsIHtcbiAgICAgICAgZGV0YWlsOiB7XG4gICAgICAgICAgbmFtZTogdGhpcy5uYW1lLFxuICAgICAgICAgIHBhcmFtczogdGhpcy5wYXJhbXMsXG4gICAgICAgIH0sXG4gICAgICB9KSxcbiAgICApO1xuICB9XG5cbiAgbmdBZnRlckNvbnRlbnRJbml0KCkge1xuICAgIHRoaXMucGlyYWwucmVuZGVySHRtbEV4dGVuc2lvbih0aGlzLmVsUmVmLm5hdGl2ZUVsZW1lbnQsIHtcbiAgICAgIG5hbWU6IHRoaXMubmFtZSxcbiAgICAgIHBhcmFtczogdGhpcy5wYXJhbXMsXG4gICAgfSk7XG4gIH1cbn1cbiJdfQ==
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { Inject, Pipe } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
class ResourceUrlPipe {
|
|
4
|
-
piral;
|
|
5
|
-
constructor(piral) {
|
|
6
|
-
this.piral = piral;
|
|
7
|
-
}
|
|
8
|
-
transform(value) {
|
|
9
|
-
const { basePath = '/' } = this.piral.meta;
|
|
10
|
-
return basePath + value;
|
|
11
|
-
}
|
|
12
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: ResourceUrlPipe, deps: [{ token: 'piral' }], target: i0.ɵɵFactoryTarget.Pipe });
|
|
13
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.0.1", ngImport: i0, type: ResourceUrlPipe, name: "resourceUrl" });
|
|
14
|
-
}
|
|
15
|
-
export { ResourceUrlPipe };
|
|
16
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: ResourceUrlPipe, decorators: [{
|
|
17
|
-
type: Pipe,
|
|
18
|
-
args: [{ name: 'resourceUrl' }]
|
|
19
|
-
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
20
|
-
type: Inject,
|
|
21
|
-
args: ['piral']
|
|
22
|
-
}] }]; } });
|
|
23
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUmVzb3VyY2VVcmxQaXBlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2NvbW1vbi9SZXNvdXJjZVVybFBpcGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsT0FBTyxFQUFFLE1BQU0sRUFBRSxJQUFJLEVBQWlCLE1BQU0sZUFBZSxDQUFDOztBQUU1RCxNQUNhLGVBQWU7SUFDVztJQUFyQyxZQUFxQyxLQUFlO1FBQWYsVUFBSyxHQUFMLEtBQUssQ0FBVTtJQUFHLENBQUM7SUFFeEQsU0FBUyxDQUFDLEtBQWE7UUFDckIsTUFBTSxFQUFFLFFBQVEsR0FBRyxHQUFHLEVBQUUsR0FBRyxJQUFJLENBQUMsS0FBSyxDQUFDLElBQUksQ0FBQztRQUMzQyxPQUFPLFFBQVEsR0FBRyxLQUFLLENBQUM7SUFDMUIsQ0FBQzt1R0FOVSxlQUFlLGtCQUNOLE9BQU87cUdBRGhCLGVBQWU7O1NBQWYsZUFBZTsyRkFBZixlQUFlO2tCQUQzQixJQUFJO21CQUFDLEVBQUUsSUFBSSxFQUFFLGFBQWEsRUFBRTs7MEJBRWQsTUFBTTsyQkFBQyxPQUFPIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHR5cGUgeyBQaWxldEFwaSB9IGZyb20gJ3BpcmFsLWNvcmUnO1xuaW1wb3J0IHsgSW5qZWN0LCBQaXBlLCBQaXBlVHJhbnNmb3JtIH0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XG5cbkBQaXBlKHsgbmFtZTogJ3Jlc291cmNlVXJsJyB9KVxuZXhwb3J0IGNsYXNzIFJlc291cmNlVXJsUGlwZSBpbXBsZW1lbnRzIFBpcGVUcmFuc2Zvcm0ge1xuICBjb25zdHJ1Y3RvcihASW5qZWN0KCdwaXJhbCcpIHByaXZhdGUgcGlyYWw6IFBpbGV0QXBpKSB7fVxuXG4gIHRyYW5zZm9ybSh2YWx1ZTogc3RyaW5nKTogc3RyaW5nIHtcbiAgICBjb25zdCB7IGJhc2VQYXRoID0gJy8nIH0gPSB0aGlzLnBpcmFsLm1ldGE7XG4gICAgcmV0dXJuIGJhc2VQYXRoICsgdmFsdWU7XG4gIH1cbn1cbiJdfQ==
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { CommonModule } from '@angular/common';
|
|
2
|
-
import { NgModule } from '@angular/core';
|
|
3
|
-
import { NgExtension } from './NgExtension';
|
|
4
|
-
import { ResourceUrlPipe } from './ResourceUrlPipe';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
const declarationsDef = [NgExtension, ResourceUrlPipe];
|
|
7
|
-
const exportsDef = [NgExtension, ResourceUrlPipe];
|
|
8
|
-
const importsDef = [CommonModule];
|
|
9
|
-
class SharedModule {
|
|
10
|
-
static props = {};
|
|
11
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: SharedModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
12
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.1", ngImport: i0, type: SharedModule, declarations: [NgExtension, ResourceUrlPipe], imports: [CommonModule], exports: [NgExtension, ResourceUrlPipe] });
|
|
13
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: SharedModule, imports: [importsDef] });
|
|
14
|
-
}
|
|
15
|
-
export { SharedModule };
|
|
16
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: SharedModule, decorators: [{
|
|
17
|
-
type: NgModule,
|
|
18
|
-
args: [{
|
|
19
|
-
declarations: declarationsDef,
|
|
20
|
-
providers: [],
|
|
21
|
-
imports: importsDef,
|
|
22
|
-
exports: exportsDef,
|
|
23
|
-
}]
|
|
24
|
-
}] });
|
|
25
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiU2hhcmVkTW9kdWxlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2NvbW1vbi9TaGFyZWRNb2R1bGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLGlCQUFpQixDQUFDO0FBQy9DLE9BQU8sRUFBRSxRQUFRLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDekMsT0FBTyxFQUFFLFdBQVcsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUM1QyxPQUFPLEVBQUUsZUFBZSxFQUFFLE1BQU0sbUJBQW1CLENBQUM7O0FBRXBELE1BQU0sZUFBZSxHQUFHLENBQUMsV0FBVyxFQUFFLGVBQWUsQ0FBQyxDQUFDO0FBQ3ZELE1BQU0sVUFBVSxHQUFHLENBQUMsV0FBVyxFQUFFLGVBQWUsQ0FBQyxDQUFDO0FBQ2xELE1BQU0sVUFBVSxHQUFHLENBQUMsWUFBWSxDQUFDLENBQUM7QUFFbEMsTUFNYSxZQUFZO0lBQ3ZCLE1BQU0sQ0FB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0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated bundle index. Do not edit.
|
|
3
|
-
*/
|
|
4
|
-
export * from './public_api';
|
|
5
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGlyYWwtbmctY29tbW9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2NvbW1vbi9waXJhbC1uZy1jb21tb24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLGNBQWMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogR2VuZXJhdGVkIGJ1bmRsZSBpbmRleC4gRG8gbm90IGVkaXQuXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9wdWJsaWNfYXBpJztcbiJdfQ==
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export * from './SharedModule';
|
|
2
|
-
export * from './NgExtension';
|
|
3
|
-
export * from './ResourceUrlPipe';
|
|
4
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljX2FwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb21tb24vcHVibGljX2FwaS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLGdCQUFnQixDQUFDO0FBQy9CLGNBQWMsZUFBZSxDQUFDO0FBQzlCLGNBQWMsbUJBQW1CLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL1NoYXJlZE1vZHVsZSc7XG5leHBvcnQgKiBmcm9tICcuL05nRXh0ZW5zaW9uJztcbmV4cG9ydCAqIGZyb20gJy4vUmVzb3VyY2VVcmxQaXBlJztcbiJdfQ==
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import { CommonModule } from '@angular/common';
|
|
2
|
-
import * as i0 from '@angular/core';
|
|
3
|
-
import { Component, Inject, Input, Pipe, NgModule } from '@angular/core';
|
|
4
|
-
|
|
5
|
-
const selector = 'extension-component';
|
|
6
|
-
class NgExtension {
|
|
7
|
-
elRef;
|
|
8
|
-
piral;
|
|
9
|
-
name;
|
|
10
|
-
params;
|
|
11
|
-
constructor(elRef, piral) {
|
|
12
|
-
this.elRef = elRef;
|
|
13
|
-
this.piral = piral;
|
|
14
|
-
}
|
|
15
|
-
ngOnChanges() {
|
|
16
|
-
this.elRef.nativeElement.dispatchEvent(new CustomEvent('extension-props-changed', {
|
|
17
|
-
detail: {
|
|
18
|
-
name: this.name,
|
|
19
|
-
params: this.params,
|
|
20
|
-
},
|
|
21
|
-
}));
|
|
22
|
-
}
|
|
23
|
-
ngAfterContentInit() {
|
|
24
|
-
this.piral.renderHtmlExtension(this.elRef.nativeElement, {
|
|
25
|
-
name: this.name,
|
|
26
|
-
params: this.params,
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: NgExtension, deps: [{ token: i0.ElementRef }, { token: 'piral' }], target: i0.ɵɵFactoryTarget.Component });
|
|
30
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.1", type: NgExtension, selector: "extension-component", inputs: { name: "name", params: "params" }, usesOnChanges: true, ngImport: i0, template: '', isInline: true });
|
|
31
|
-
}
|
|
32
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: NgExtension, decorators: [{
|
|
33
|
-
type: Component,
|
|
34
|
-
args: [{
|
|
35
|
-
selector,
|
|
36
|
-
template: '',
|
|
37
|
-
}]
|
|
38
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: undefined, decorators: [{
|
|
39
|
-
type: Inject,
|
|
40
|
-
args: ['piral']
|
|
41
|
-
}] }]; }, propDecorators: { name: [{
|
|
42
|
-
type: Input,
|
|
43
|
-
args: ['name']
|
|
44
|
-
}], params: [{
|
|
45
|
-
type: Input,
|
|
46
|
-
args: ['params']
|
|
47
|
-
}] } });
|
|
48
|
-
|
|
49
|
-
class ResourceUrlPipe {
|
|
50
|
-
piral;
|
|
51
|
-
constructor(piral) {
|
|
52
|
-
this.piral = piral;
|
|
53
|
-
}
|
|
54
|
-
transform(value) {
|
|
55
|
-
const { basePath = '/' } = this.piral.meta;
|
|
56
|
-
return basePath + value;
|
|
57
|
-
}
|
|
58
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: ResourceUrlPipe, deps: [{ token: 'piral' }], target: i0.ɵɵFactoryTarget.Pipe });
|
|
59
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.0.1", ngImport: i0, type: ResourceUrlPipe, name: "resourceUrl" });
|
|
60
|
-
}
|
|
61
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: ResourceUrlPipe, decorators: [{
|
|
62
|
-
type: Pipe,
|
|
63
|
-
args: [{ name: 'resourceUrl' }]
|
|
64
|
-
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
65
|
-
type: Inject,
|
|
66
|
-
args: ['piral']
|
|
67
|
-
}] }]; } });
|
|
68
|
-
|
|
69
|
-
const declarationsDef = [NgExtension, ResourceUrlPipe];
|
|
70
|
-
const exportsDef = [NgExtension, ResourceUrlPipe];
|
|
71
|
-
const importsDef = [CommonModule];
|
|
72
|
-
class SharedModule {
|
|
73
|
-
static props = {};
|
|
74
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: SharedModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
75
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.1", ngImport: i0, type: SharedModule, declarations: [NgExtension, ResourceUrlPipe], imports: [CommonModule], exports: [NgExtension, ResourceUrlPipe] });
|
|
76
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: SharedModule, imports: [importsDef] });
|
|
77
|
-
}
|
|
78
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: SharedModule, decorators: [{
|
|
79
|
-
type: NgModule,
|
|
80
|
-
args: [{
|
|
81
|
-
declarations: declarationsDef,
|
|
82
|
-
providers: [],
|
|
83
|
-
imports: importsDef,
|
|
84
|
-
exports: exportsDef,
|
|
85
|
-
}]
|
|
86
|
-
}] });
|
|
87
|
-
|
|
88
|
-
/**
|
|
89
|
-
* Generated bundle index. Do not edit.
|
|
90
|
-
*/
|
|
91
|
-
|
|
92
|
-
export { NgExtension, ResourceUrlPipe, SharedModule };
|
|
93
|
-
//# sourceMappingURL=piral-ng-common.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"piral-ng-common.mjs","sources":["../../src/common/NgExtension.ts","../../src/common/ResourceUrlPipe.ts","../../src/common/SharedModule.ts","../../src/common/piral-ng-common.ts"],"sourcesContent":["import type { PiletApi } from 'piral-core';\nimport { Component, ElementRef, Input, Inject, OnChanges } from '@angular/core';\n\nconst selector = 'extension-component';\n\n@Component({\n selector,\n template: '',\n})\nexport class NgExtension implements OnChanges {\n @Input('name') public name: string | undefined;\n @Input('params') public params: object | undefined;\n\n constructor(private elRef: ElementRef<HTMLElement>, @Inject('piral') private piral: PiletApi) {}\n\n ngOnChanges() {\n this.elRef.nativeElement.dispatchEvent(\n new CustomEvent('extension-props-changed', {\n detail: {\n name: this.name,\n params: this.params,\n },\n }),\n );\n }\n\n ngAfterContentInit() {\n this.piral.renderHtmlExtension(this.elRef.nativeElement, {\n name: this.name,\n params: this.params,\n });\n }\n}\n","import type { PiletApi } from 'piral-core';\nimport { Inject, Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({ name: 'resourceUrl' })\nexport class ResourceUrlPipe implements PipeTransform {\n constructor(@Inject('piral') private piral: PiletApi) {}\n\n transform(value: string): string {\n const { basePath = '/' } = this.piral.meta;\n return basePath + value;\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { NgExtension } from './NgExtension';\nimport { ResourceUrlPipe } from './ResourceUrlPipe';\n\nconst declarationsDef = [NgExtension, ResourceUrlPipe];\nconst exportsDef = [NgExtension, ResourceUrlPipe];\nconst importsDef = [CommonModule];\n\n@NgModule({\n declarations: declarationsDef,\n providers: [],\n imports: importsDef,\n exports: exportsDef,\n})\nexport class SharedModule {\n static props = {};\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;AAGA,MAAM,QAAQ,GAAG,qBAAqB,CAAC;AAEvC,MAIa,WAAW,CAAA;AAIF,IAAA,KAAA,CAAA;AAAyD,IAAA,KAAA,CAAA;AAHvD,IAAA,IAAI,CAAqB;AACvB,IAAA,MAAM,CAAqB;IAEnD,WAAoB,CAAA,KAA8B,EAA2B,KAAe,EAAA;QAAxE,IAAK,CAAA,KAAA,GAAL,KAAK,CAAyB;QAA2B,IAAK,CAAA,KAAA,GAAL,KAAK,CAAU;KAAI;IAEhG,WAAW,GAAA;QACT,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,aAAa,CACpC,IAAI,WAAW,CAAC,yBAAyB,EAAE;AACzC,YAAA,MAAM,EAAE;gBACN,IAAI,EAAE,IAAI,CAAC,IAAI;gBACf,MAAM,EAAE,IAAI,CAAC,MAAM;AACpB,aAAA;AACF,SAAA,CAAC,CACH,CAAC;KACH;IAED,kBAAkB,GAAA;QAChB,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC,IAAI,CAAC,KAAK,CAAC,aAAa,EAAE;YACvD,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,MAAM,EAAE,IAAI,CAA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|
-
export * from './public_api';
|
package/common/package.json
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "piral-ng-common",
|
|
3
|
-
"version": "0.15.0",
|
|
4
|
-
"description": "Common module for piral-ng.",
|
|
5
|
-
"keywords": [],
|
|
6
|
-
"author": "smapiot",
|
|
7
|
-
"main": "piral-ng-common.js",
|
|
8
|
-
"homepage": "https://piral.io",
|
|
9
|
-
"license": "MIT",
|
|
10
|
-
"repository": {
|
|
11
|
-
"type": "git",
|
|
12
|
-
"url": "git+https://github.com/smapiot/piral.git"
|
|
13
|
-
},
|
|
14
|
-
"bugs": {
|
|
15
|
-
"url": "https://github.com/smapiot/piral/issues"
|
|
16
|
-
},
|
|
17
|
-
"peerDependencies": {},
|
|
18
|
-
"module": "fesm2022/piral-ng-common.mjs",
|
|
19
|
-
"typings": "index.d.ts",
|
|
20
|
-
"exports": {
|
|
21
|
-
"./package.json": {
|
|
22
|
-
"default": "./package.json"
|
|
23
|
-
},
|
|
24
|
-
".": {
|
|
25
|
-
"types": "./index.d.ts",
|
|
26
|
-
"esm2022": "./esm2022/piral-ng-common.mjs",
|
|
27
|
-
"esm": "./esm2022/piral-ng-common.mjs",
|
|
28
|
-
"default": "./fesm2022/piral-ng-common.mjs"
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
"sideEffects": false,
|
|
32
|
-
"dependencies": {
|
|
33
|
-
"tslib": "^2.3.0"
|
|
34
|
-
}
|
|
35
|
-
}
|
package/common/public_api.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { PiletApi } from 'piral-core';
|
|
2
|
-
import { ElementRef, OnChanges } from '@angular/core';
|
|
3
|
-
export declare class NgExtension implements OnChanges {
|
|
4
|
-
private elRef;
|
|
5
|
-
private piral;
|
|
6
|
-
name: string | undefined;
|
|
7
|
-
params: object | undefined;
|
|
8
|
-
constructor(elRef: ElementRef<HTMLElement>, piral: PiletApi);
|
|
9
|
-
ngOnChanges(): void;
|
|
10
|
-
ngAfterContentInit(): void;
|
|
11
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { __decorate, __metadata, __param } from "tslib";
|
|
2
|
-
import { Component, ElementRef, Input, Inject } from '@angular/core';
|
|
3
|
-
const selector = 'extension-component';
|
|
4
|
-
let NgExtension = class NgExtension {
|
|
5
|
-
constructor(elRef, piral) {
|
|
6
|
-
this.elRef = elRef;
|
|
7
|
-
this.piral = piral;
|
|
8
|
-
}
|
|
9
|
-
ngOnChanges() {
|
|
10
|
-
this.elRef.nativeElement.dispatchEvent(new CustomEvent('extension-props-changed', {
|
|
11
|
-
detail: {
|
|
12
|
-
name: this.name,
|
|
13
|
-
params: this.params,
|
|
14
|
-
},
|
|
15
|
-
}));
|
|
16
|
-
}
|
|
17
|
-
ngAfterContentInit() {
|
|
18
|
-
this.piral.renderHtmlExtension(this.elRef.nativeElement, {
|
|
19
|
-
name: this.name,
|
|
20
|
-
params: this.params,
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
__decorate([
|
|
25
|
-
Input('name'),
|
|
26
|
-
__metadata("design:type", String)
|
|
27
|
-
], NgExtension.prototype, "name", void 0);
|
|
28
|
-
__decorate([
|
|
29
|
-
Input('params'),
|
|
30
|
-
__metadata("design:type", Object)
|
|
31
|
-
], NgExtension.prototype, "params", void 0);
|
|
32
|
-
NgExtension = __decorate([
|
|
33
|
-
Component({
|
|
34
|
-
selector,
|
|
35
|
-
template: '',
|
|
36
|
-
}),
|
|
37
|
-
__param(1, Inject('piral')),
|
|
38
|
-
__metadata("design:paramtypes", [ElementRef, Object])
|
|
39
|
-
], NgExtension);
|
|
40
|
-
export { NgExtension };
|
|
41
|
-
//# sourceMappingURL=NgExtension.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NgExtension.js","sourceRoot":"","sources":["../../src/common/NgExtension.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAa,MAAM,eAAe,CAAC;AAEhF,MAAM,QAAQ,GAAG,qBAAqB,CAAC;AAEvC,IAIa,WAAW,GAJxB,MAIa,WAAW;IAItB,YAAoB,KAA8B,EAA2B,KAAe;QAAxE,UAAK,GAAL,KAAK,CAAyB;QAA2B,UAAK,GAAL,KAAK,CAAU;IAAG,CAAC;IAEhG,WAAW;QACT,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,aAAa,CACpC,IAAI,WAAW,CAAC,yBAAyB,EAAE;YACzC,MAAM,EAAE;gBACN,IAAI,EAAE,IAAI,CAAC,IAAI;gBACf,MAAM,EAAE,IAAI,CAAC,MAAM;aACpB;SACF,CAAC,CACH,CAAC;IACJ,CAAC;IAED,kBAAkB;QAChB,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC,IAAI,CAAC,KAAK,CAAC,aAAa,EAAE;YACvD,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,MAAM,EAAE,IAAI,CAAC,MAAM;SACpB,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AAtBuB;IAArB,KAAK,CAAC,MAAM,CAAC;;yCAAiC;AACvB;IAAvB,KAAK,CAAC,QAAQ,CAAC;;2CAAmC;AAFxC,WAAW;IAJvB,SAAS,CAAC;QACT,QAAQ;QACR,QAAQ,EAAE,EAAE;KACb,CAAC;IAKqD,WAAA,MAAM,CAAC,OAAO,CAAC,CAAA;qCAAzC,UAAU;GAJ1B,WAAW,CAuBvB;SAvBY,WAAW"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { __decorate, __metadata, __param } from "tslib";
|
|
2
|
-
import { Inject, Pipe } from '@angular/core';
|
|
3
|
-
let ResourceUrlPipe = class ResourceUrlPipe {
|
|
4
|
-
constructor(piral) {
|
|
5
|
-
this.piral = piral;
|
|
6
|
-
}
|
|
7
|
-
transform(value) {
|
|
8
|
-
const { basePath = '/' } = this.piral.meta;
|
|
9
|
-
return basePath + value;
|
|
10
|
-
}
|
|
11
|
-
};
|
|
12
|
-
ResourceUrlPipe = __decorate([
|
|
13
|
-
Pipe({ name: 'resourceUrl' }),
|
|
14
|
-
__param(0, Inject('piral')),
|
|
15
|
-
__metadata("design:paramtypes", [Object])
|
|
16
|
-
], ResourceUrlPipe);
|
|
17
|
-
export { ResourceUrlPipe };
|
|
18
|
-
//# sourceMappingURL=ResourceUrlPipe.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ResourceUrlPipe.js","sourceRoot":"","sources":["../../src/common/ResourceUrlPipe.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAiB,MAAM,eAAe,CAAC;AAE5D,IACa,eAAe,GAD5B,MACa,eAAe;IAC1B,YAAqC,KAAe;QAAf,UAAK,GAAL,KAAK,CAAU;IAAG,CAAC;IAExD,SAAS,CAAC,KAAa;QACrB,MAAM,EAAE,QAAQ,GAAG,GAAG,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC;QAC3C,OAAO,QAAQ,GAAG,KAAK,CAAC;IAC1B,CAAC;CACF,CAAA;AAPY,eAAe;IAD3B,IAAI,CAAC,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC;IAEf,WAAA,MAAM,CAAC,OAAO,CAAC,CAAA;;GADjB,eAAe,CAO3B;SAPY,eAAe"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { __decorate } from "tslib";
|
|
2
|
-
import { CommonModule } from '@angular/common';
|
|
3
|
-
import { NgModule } from '@angular/core';
|
|
4
|
-
import { NgExtension } from './NgExtension';
|
|
5
|
-
import { ResourceUrlPipe } from './ResourceUrlPipe';
|
|
6
|
-
const declarationsDef = [NgExtension, ResourceUrlPipe];
|
|
7
|
-
const exportsDef = [NgExtension, ResourceUrlPipe];
|
|
8
|
-
const importsDef = [CommonModule];
|
|
9
|
-
let SharedModule = class SharedModule {
|
|
10
|
-
};
|
|
11
|
-
SharedModule.props = {};
|
|
12
|
-
SharedModule = __decorate([
|
|
13
|
-
NgModule({
|
|
14
|
-
declarations: declarationsDef,
|
|
15
|
-
providers: [],
|
|
16
|
-
imports: importsDef,
|
|
17
|
-
exports: exportsDef,
|
|
18
|
-
})
|
|
19
|
-
], SharedModule);
|
|
20
|
-
export { SharedModule };
|
|
21
|
-
//# sourceMappingURL=SharedModule.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SharedModule.js","sourceRoot":"","sources":["../../src/common/SharedModule.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,MAAM,eAAe,GAAG,CAAC,WAAW,EAAE,eAAe,CAAC,CAAC;AACvD,MAAM,UAAU,GAAG,CAAC,WAAW,EAAE,eAAe,CAAC,CAAC;AAClD,MAAM,UAAU,GAAG,CAAC,YAAY,CAAC,CAAC;AAQlC,IAAa,YAAY,GAAzB,MAAa,YAAY;;AAChB,kBAAK,GAAG,EAAE,AAAL,CAAM;AADP,YAAY;IANxB,QAAQ,CAAC;QACR,YAAY,EAAE,eAAe;QAC7B,SAAS,EAAE,EAAE;QACb,OAAO,EAAE,UAAU;QACnB,OAAO,EAAE,UAAU;KACpB,CAAC;GACW,YAAY,CAExB;SAFY,YAAY"}
|
package/esm/common/public_api.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"public_api.js","sourceRoot":"","sources":["../../src/common/public_api.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { PiletApi } from 'piral-core';
|
|
2
|
-
import { ElementRef, OnChanges } from '@angular/core';
|
|
3
|
-
export declare class NgExtension implements OnChanges {
|
|
4
|
-
private elRef;
|
|
5
|
-
private piral;
|
|
6
|
-
name: string | undefined;
|
|
7
|
-
params: object | undefined;
|
|
8
|
-
constructor(elRef: ElementRef<HTMLElement>, piral: PiletApi);
|
|
9
|
-
ngOnChanges(): void;
|
|
10
|
-
ngAfterContentInit(): void;
|
|
11
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NgExtension = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const core_1 = require("@angular/core");
|
|
6
|
-
const selector = 'extension-component';
|
|
7
|
-
let NgExtension = class NgExtension {
|
|
8
|
-
constructor(elRef, piral) {
|
|
9
|
-
this.elRef = elRef;
|
|
10
|
-
this.piral = piral;
|
|
11
|
-
}
|
|
12
|
-
ngOnChanges() {
|
|
13
|
-
this.elRef.nativeElement.dispatchEvent(new CustomEvent('extension-props-changed', {
|
|
14
|
-
detail: {
|
|
15
|
-
name: this.name,
|
|
16
|
-
params: this.params,
|
|
17
|
-
},
|
|
18
|
-
}));
|
|
19
|
-
}
|
|
20
|
-
ngAfterContentInit() {
|
|
21
|
-
this.piral.renderHtmlExtension(this.elRef.nativeElement, {
|
|
22
|
-
name: this.name,
|
|
23
|
-
params: this.params,
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
tslib_1.__decorate([
|
|
28
|
-
(0, core_1.Input)('name'),
|
|
29
|
-
tslib_1.__metadata("design:type", String)
|
|
30
|
-
], NgExtension.prototype, "name", void 0);
|
|
31
|
-
tslib_1.__decorate([
|
|
32
|
-
(0, core_1.Input)('params'),
|
|
33
|
-
tslib_1.__metadata("design:type", Object)
|
|
34
|
-
], NgExtension.prototype, "params", void 0);
|
|
35
|
-
NgExtension = tslib_1.__decorate([
|
|
36
|
-
(0, core_1.Component)({
|
|
37
|
-
selector,
|
|
38
|
-
template: '',
|
|
39
|
-
}),
|
|
40
|
-
tslib_1.__param(1, (0, core_1.Inject)('piral')),
|
|
41
|
-
tslib_1.__metadata("design:paramtypes", [core_1.ElementRef, Object])
|
|
42
|
-
], NgExtension);
|
|
43
|
-
exports.NgExtension = NgExtension;
|
|
44
|
-
//# sourceMappingURL=NgExtension.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NgExtension.js","sourceRoot":"","sources":["../../src/common/NgExtension.ts"],"names":[],"mappings":";;;;AACA,wCAAgF;AAEhF,MAAM,QAAQ,GAAG,qBAAqB,CAAC;AAEvC,IAIa,WAAW,GAJxB,MAIa,WAAW;IAItB,YAAoB,KAA8B,EAA2B,KAAe;QAAxE,UAAK,GAAL,KAAK,CAAyB;QAA2B,UAAK,GAAL,KAAK,CAAU;IAAG,CAAC;IAEhG,WAAW;QACT,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,aAAa,CACpC,IAAI,WAAW,CAAC,yBAAyB,EAAE;YACzC,MAAM,EAAE;gBACN,IAAI,EAAE,IAAI,CAAC,IAAI;gBACf,MAAM,EAAE,IAAI,CAAC,MAAM;aACpB;SACF,CAAC,CACH,CAAC;IACJ,CAAC;IAED,kBAAkB;QAChB,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC,IAAI,CAAC,KAAK,CAAC,aAAa,EAAE;YACvD,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,MAAM,EAAE,IAAI,CAAC,MAAM;SACpB,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AAtBuB;IAArB,IAAA,YAAK,EAAC,MAAM,CAAC;;yCAAiC;AACvB;IAAvB,IAAA,YAAK,EAAC,QAAQ,CAAC;;2CAAmC;AAFxC,WAAW;IAJvB,IAAA,gBAAS,EAAC;QACT,QAAQ;QACR,QAAQ,EAAE,EAAE;KACb,CAAC;IAKqD,mBAAA,IAAA,aAAM,EAAC,OAAO,CAAC,CAAA;6CAAzC,iBAAU;GAJ1B,WAAW,CAuBvB;AAvBY,kCAAW"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ResourceUrlPipe = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const core_1 = require("@angular/core");
|
|
6
|
-
let ResourceUrlPipe = class ResourceUrlPipe {
|
|
7
|
-
constructor(piral) {
|
|
8
|
-
this.piral = piral;
|
|
9
|
-
}
|
|
10
|
-
transform(value) {
|
|
11
|
-
const { basePath = '/' } = this.piral.meta;
|
|
12
|
-
return basePath + value;
|
|
13
|
-
}
|
|
14
|
-
};
|
|
15
|
-
ResourceUrlPipe = tslib_1.__decorate([
|
|
16
|
-
(0, core_1.Pipe)({ name: 'resourceUrl' }),
|
|
17
|
-
tslib_1.__param(0, (0, core_1.Inject)('piral')),
|
|
18
|
-
tslib_1.__metadata("design:paramtypes", [Object])
|
|
19
|
-
], ResourceUrlPipe);
|
|
20
|
-
exports.ResourceUrlPipe = ResourceUrlPipe;
|
|
21
|
-
//# sourceMappingURL=ResourceUrlPipe.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ResourceUrlPipe.js","sourceRoot":"","sources":["../../src/common/ResourceUrlPipe.ts"],"names":[],"mappings":";;;;AACA,wCAA4D;AAE5D,IACa,eAAe,GAD5B,MACa,eAAe;IAC1B,YAAqC,KAAe;QAAf,UAAK,GAAL,KAAK,CAAU;IAAG,CAAC;IAExD,SAAS,CAAC,KAAa;QACrB,MAAM,EAAE,QAAQ,GAAG,GAAG,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC;QAC3C,OAAO,QAAQ,GAAG,KAAK,CAAC;IAC1B,CAAC;CACF,CAAA;AAPY,eAAe;IAD3B,IAAA,WAAI,EAAC,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC;IAEf,mBAAA,IAAA,aAAM,EAAC,OAAO,CAAC,CAAA;;GADjB,eAAe,CAO3B;AAPY,0CAAe"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SharedModule = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const common_1 = require("@angular/common");
|
|
6
|
-
const core_1 = require("@angular/core");
|
|
7
|
-
const NgExtension_1 = require("./NgExtension");
|
|
8
|
-
const ResourceUrlPipe_1 = require("./ResourceUrlPipe");
|
|
9
|
-
const declarationsDef = [NgExtension_1.NgExtension, ResourceUrlPipe_1.ResourceUrlPipe];
|
|
10
|
-
const exportsDef = [NgExtension_1.NgExtension, ResourceUrlPipe_1.ResourceUrlPipe];
|
|
11
|
-
const importsDef = [common_1.CommonModule];
|
|
12
|
-
let SharedModule = class SharedModule {
|
|
13
|
-
};
|
|
14
|
-
SharedModule.props = {};
|
|
15
|
-
SharedModule = tslib_1.__decorate([
|
|
16
|
-
(0, core_1.NgModule)({
|
|
17
|
-
declarations: declarationsDef,
|
|
18
|
-
providers: [],
|
|
19
|
-
imports: importsDef,
|
|
20
|
-
exports: exportsDef,
|
|
21
|
-
})
|
|
22
|
-
], SharedModule);
|
|
23
|
-
exports.SharedModule = SharedModule;
|
|
24
|
-
//# sourceMappingURL=SharedModule.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SharedModule.js","sourceRoot":"","sources":["../../src/common/SharedModule.ts"],"names":[],"mappings":";;;;AAAA,4CAA+C;AAC/C,wCAAyC;AACzC,+CAA4C;AAC5C,uDAAoD;AAEpD,MAAM,eAAe,GAAG,CAAC,yBAAW,EAAE,iCAAe,CAAC,CAAC;AACvD,MAAM,UAAU,GAAG,CAAC,yBAAW,EAAE,iCAAe,CAAC,CAAC;AAClD,MAAM,UAAU,GAAG,CAAC,qBAAY,CAAC,CAAC;AAQlC,IAAa,YAAY,GAAzB,MAAa,YAAY;;AAChB,kBAAK,GAAG,EAAE,AAAL,CAAM;AADP,YAAY;IANxB,IAAA,eAAQ,EAAC;QACR,YAAY,EAAE,eAAe;QAC7B,SAAS,EAAE,EAAE;QACb,OAAO,EAAE,UAAU;QACnB,OAAO,EAAE,UAAU;KACpB,CAAC;GACW,YAAY,CAExB;AAFY,oCAAY"}
|
package/lib/common/public_api.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
tslib_1.__exportStar(require("./SharedModule"), exports);
|
|
5
|
-
tslib_1.__exportStar(require("./NgExtension"), exports);
|
|
6
|
-
tslib_1.__exportStar(require("./ResourceUrlPipe"), exports);
|
|
7
|
-
//# sourceMappingURL=public_api.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"public_api.js","sourceRoot":"","sources":["../../src/common/public_api.ts"],"names":[],"mappings":";;;AAAA,yDAA+B;AAC/B,wDAA8B;AAC9B,4DAAkC"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import type { PiletApi } from 'piral-core';
|
|
2
|
-
import { Component, ElementRef, Input, Inject, OnChanges } from '@angular/core';
|
|
3
|
-
|
|
4
|
-
const selector = 'extension-component';
|
|
5
|
-
|
|
6
|
-
@Component({
|
|
7
|
-
selector,
|
|
8
|
-
template: '',
|
|
9
|
-
})
|
|
10
|
-
export class NgExtension implements OnChanges {
|
|
11
|
-
@Input('name') public name: string | undefined;
|
|
12
|
-
@Input('params') public params: object | undefined;
|
|
13
|
-
|
|
14
|
-
constructor(private elRef: ElementRef<HTMLElement>, @Inject('piral') private piral: PiletApi) {}
|
|
15
|
-
|
|
16
|
-
ngOnChanges() {
|
|
17
|
-
this.elRef.nativeElement.dispatchEvent(
|
|
18
|
-
new CustomEvent('extension-props-changed', {
|
|
19
|
-
detail: {
|
|
20
|
-
name: this.name,
|
|
21
|
-
params: this.params,
|
|
22
|
-
},
|
|
23
|
-
}),
|
|
24
|
-
);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
ngAfterContentInit() {
|
|
28
|
-
this.piral.renderHtmlExtension(this.elRef.nativeElement, {
|
|
29
|
-
name: this.name,
|
|
30
|
-
params: this.params,
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { PiletApi } from 'piral-core';
|
|
2
|
-
import { Inject, Pipe, PipeTransform } from '@angular/core';
|
|
3
|
-
|
|
4
|
-
@Pipe({ name: 'resourceUrl' })
|
|
5
|
-
export class ResourceUrlPipe implements PipeTransform {
|
|
6
|
-
constructor(@Inject('piral') private piral: PiletApi) {}
|
|
7
|
-
|
|
8
|
-
transform(value: string): string {
|
|
9
|
-
const { basePath = '/' } = this.piral.meta;
|
|
10
|
-
return basePath + value;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { CommonModule } from '@angular/common';
|
|
2
|
-
import { NgModule } from '@angular/core';
|
|
3
|
-
import { NgExtension } from './NgExtension';
|
|
4
|
-
import { ResourceUrlPipe } from './ResourceUrlPipe';
|
|
5
|
-
|
|
6
|
-
const declarationsDef = [NgExtension, ResourceUrlPipe];
|
|
7
|
-
const exportsDef = [NgExtension, ResourceUrlPipe];
|
|
8
|
-
const importsDef = [CommonModule];
|
|
9
|
-
|
|
10
|
-
@NgModule({
|
|
11
|
-
declarations: declarationsDef,
|
|
12
|
-
providers: [],
|
|
13
|
-
imports: importsDef,
|
|
14
|
-
exports: exportsDef,
|
|
15
|
-
})
|
|
16
|
-
export class SharedModule {
|
|
17
|
-
static props = {};
|
|
18
|
-
}
|
package/src/common/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './public_api';
|
package/src/common/package.json
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "piral-ng-common",
|
|
3
|
-
"version": "0.15.0",
|
|
4
|
-
"description": "Common module for piral-ng.",
|
|
5
|
-
"keywords": [],
|
|
6
|
-
"author": "smapiot",
|
|
7
|
-
"main": "piral-ng-common.js",
|
|
8
|
-
"homepage": "https://piral.io",
|
|
9
|
-
"license": "MIT",
|
|
10
|
-
"repository": {
|
|
11
|
-
"type": "git",
|
|
12
|
-
"url": "git+https://github.com/smapiot/piral.git"
|
|
13
|
-
},
|
|
14
|
-
"bugs": {
|
|
15
|
-
"url": "https://github.com/smapiot/piral/issues"
|
|
16
|
-
},
|
|
17
|
-
"devDependencies": {},
|
|
18
|
-
"peerDependencies": {}
|
|
19
|
-
}
|
package/src/common/public_api.ts
DELETED