piral-ng 0.14.22-beta.4103 → 0.14.23-beta.4124
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 +19 -0
- package/convert.js +4 -10
- package/package.json +26 -4
package/README.md
CHANGED
|
@@ -319,6 +319,25 @@ export class SampleTileComponent {
|
|
|
319
319
|
}
|
|
320
320
|
```
|
|
321
321
|
|
|
322
|
+
## Dynamic Props
|
|
323
|
+
|
|
324
|
+
For `Props` there is also the possibility to use `@Input` for making them reactive, i.e., notify the Angular component when they changed.
|
|
325
|
+
|
|
326
|
+
```ts
|
|
327
|
+
@Component({
|
|
328
|
+
template: `
|
|
329
|
+
<div class="tile">
|
|
330
|
+
<p>{{ props.rows }} rows and {{ props.columns }} columns</p>
|
|
331
|
+
</div>
|
|
332
|
+
`,
|
|
333
|
+
})
|
|
334
|
+
export class SampleTileComponent {
|
|
335
|
+
@Input('Props') public props: TileComponentProps<any>;
|
|
336
|
+
|
|
337
|
+
constructor() {}
|
|
338
|
+
}
|
|
339
|
+
```
|
|
340
|
+
|
|
322
341
|
## Converting an Angular Application to a Pilet
|
|
323
342
|
|
|
324
343
|
Depending on the kind of Angular application this may be rather straight forward or very difficult. Since we cannot discuss all possible edge cases we will assume the standard scenario. If you need more help then don't hesitate to contact us.
|
package/convert.js
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.defineNgModule = exports.NgExtension = exports.fromNg = exports.createNgConverter = void 0;
|
|
4
|
-
var converter_1 = require("./esm/converter");
|
|
5
|
-
function createNgConverter() {
|
|
1
|
+
import { createConverter } from './esm/converter';
|
|
2
|
+
export function createNgConverter() {
|
|
6
3
|
var params = [];
|
|
7
4
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
8
5
|
params[_i] = arguments[_i];
|
|
9
6
|
}
|
|
10
|
-
var convert =
|
|
7
|
+
var convert = createConverter.apply(void 0, params);
|
|
11
8
|
var Extension = convert.Extension;
|
|
12
9
|
var defineModule = convert.defineModule;
|
|
13
10
|
var from = function (component) { return ({
|
|
@@ -16,8 +13,5 @@ function createNgConverter() {
|
|
|
16
13
|
}); };
|
|
17
14
|
return { from: from, Extension: Extension, defineModule: defineModule };
|
|
18
15
|
}
|
|
19
|
-
exports.createNgConverter = createNgConverter;
|
|
20
16
|
var _a = createNgConverter(), fromNg = _a.from, NgExtension = _a.Extension, defineNgModule = _a.defineModule;
|
|
21
|
-
|
|
22
|
-
exports.NgExtension = NgExtension;
|
|
23
|
-
exports.defineNgModule = defineNgModule;
|
|
17
|
+
export { fromNg, NgExtension, defineNgModule };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "piral-ng",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.23-beta.4124",
|
|
4
4
|
"description": "Plugin for integrating Angular components in Piral.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"piral",
|
|
@@ -19,6 +19,28 @@
|
|
|
19
19
|
"module": "esm/index.js",
|
|
20
20
|
"main": "lib/index.js",
|
|
21
21
|
"typings": "lib/index.d.ts",
|
|
22
|
+
"exports": {
|
|
23
|
+
".": {
|
|
24
|
+
"import": "./esm/index.js",
|
|
25
|
+
"require": "./lib/index.js"
|
|
26
|
+
},
|
|
27
|
+
"./common": {
|
|
28
|
+
"import": "./common.js"
|
|
29
|
+
},
|
|
30
|
+
"./convert": {
|
|
31
|
+
"import": "./convert.js"
|
|
32
|
+
},
|
|
33
|
+
"./extend-webpack": {
|
|
34
|
+
"require": "./extend-webpack.js"
|
|
35
|
+
},
|
|
36
|
+
"./esm/": {
|
|
37
|
+
"import": "./esm/"
|
|
38
|
+
},
|
|
39
|
+
"./lib/": {
|
|
40
|
+
"require": "./lib/"
|
|
41
|
+
},
|
|
42
|
+
"./package.json": "./package.json"
|
|
43
|
+
},
|
|
22
44
|
"sideEffects": false,
|
|
23
45
|
"files": [
|
|
24
46
|
"esm",
|
|
@@ -39,7 +61,7 @@
|
|
|
39
61
|
},
|
|
40
62
|
"scripts": {
|
|
41
63
|
"build": "yarn build:commonjs && yarn build:esnext && yarn build:convert",
|
|
42
|
-
"build:convert": "tsc convert.ts --skipLibCheck --declaration",
|
|
64
|
+
"build:convert": "tsc convert.ts --skipLibCheck --declaration --module esnext",
|
|
43
65
|
"build:commonjs": "tsc --project tsconfig.json --outDir lib --module commonjs",
|
|
44
66
|
"build:esnext": "tsc --project tsconfig.json --outDir esm --module esnext",
|
|
45
67
|
"typedoc": "typedoc --json ../../../docs/types/piral-ng.json src --exclude \"src/**/*.test.*\"",
|
|
@@ -52,7 +74,7 @@
|
|
|
52
74
|
"@angular/platform-browser": "^8.0.0",
|
|
53
75
|
"@angular/platform-browser-dynamic": "^8.0.0",
|
|
54
76
|
"@angular/router": "^8.0.0",
|
|
55
|
-
"piral-core": "0.14.
|
|
77
|
+
"piral-core": "0.14.23-beta.4124",
|
|
56
78
|
"rxjs": "^7.3.0"
|
|
57
79
|
},
|
|
58
80
|
"peerDependencies": {
|
|
@@ -66,5 +88,5 @@
|
|
|
66
88
|
"rxjs": "^5.0.0 || ^6.0.0 || ^7.0.0",
|
|
67
89
|
"zone.js": "~0.9.0 || ~0.10.0 || ~0.11.0"
|
|
68
90
|
},
|
|
69
|
-
"gitHead": "
|
|
91
|
+
"gitHead": "cc9d2e72edff0faffad79f84d28a114e195461a0"
|
|
70
92
|
}
|