piral-ng 0.14.0-beta.3157 → 0.14.0-beta.3187

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.
Files changed (66) hide show
  1. package/README.md +163 -15
  2. package/common.d.ts +2 -0
  3. package/common.js +2 -0
  4. package/esm/NgExtension.d.ts +16 -0
  5. package/esm/NgExtension.js +60 -0
  6. package/esm/NgExtension.js.map +1 -0
  7. package/esm/ResourceUrlPipe.d.ts +3 -0
  8. package/esm/ResourceUrlPipe.js +27 -2
  9. package/esm/ResourceUrlPipe.js.map +1 -1
  10. package/esm/RoutingService.d.ts +2 -0
  11. package/esm/RoutingService.js +46 -5
  12. package/esm/RoutingService.js.map +1 -1
  13. package/esm/SharedModule.d.ts +15 -0
  14. package/esm/SharedModule.js +42 -6
  15. package/esm/SharedModule.js.map +1 -1
  16. package/esm/bootstrap.js +2 -1
  17. package/esm/bootstrap.js.map +1 -1
  18. package/esm/converter.js +1 -1
  19. package/esm/converter.js.map +1 -1
  20. package/esm/module.js +73 -12
  21. package/esm/module.js.map +1 -1
  22. package/esm/startup.js +4 -2
  23. package/esm/startup.js.map +1 -1
  24. package/esm/utils.d.ts +3 -2
  25. package/esm/utils.js +14 -13
  26. package/esm/utils.js.map +1 -1
  27. package/extend-webpack.js +67 -0
  28. package/lib/NgExtension.d.ts +16 -0
  29. package/lib/{extension.js → NgExtension.js} +32 -4
  30. package/lib/NgExtension.js.map +1 -0
  31. package/lib/ResourceUrlPipe.d.ts +3 -0
  32. package/lib/ResourceUrlPipe.js +27 -2
  33. package/lib/ResourceUrlPipe.js.map +1 -1
  34. package/lib/RoutingService.d.ts +2 -0
  35. package/lib/RoutingService.js +46 -5
  36. package/lib/RoutingService.js.map +1 -1
  37. package/lib/SharedModule.d.ts +15 -0
  38. package/lib/SharedModule.js +42 -6
  39. package/lib/SharedModule.js.map +1 -1
  40. package/lib/bootstrap.js +2 -1
  41. package/lib/bootstrap.js.map +1 -1
  42. package/lib/converter.js +2 -2
  43. package/lib/converter.js.map +1 -1
  44. package/lib/module.js +73 -12
  45. package/lib/module.js.map +1 -1
  46. package/lib/startup.js +3 -1
  47. package/lib/startup.js.map +1 -1
  48. package/lib/utils.d.ts +3 -2
  49. package/lib/utils.js +17 -15
  50. package/lib/utils.js.map +1 -1
  51. package/package.json +5 -4
  52. package/src/NgExtension.ts +61 -0
  53. package/src/ResourceUrlPipe.ts +34 -0
  54. package/src/RoutingService.ts +67 -17
  55. package/src/SharedModule.ts +52 -4
  56. package/src/bootstrap.ts +2 -1
  57. package/src/converter.ts +1 -1
  58. package/src/module.ts +92 -9
  59. package/src/startup.ts +4 -2
  60. package/src/utils.ts +19 -19
  61. package/esm/extension.d.ts +0 -10
  62. package/esm/extension.js +0 -32
  63. package/esm/extension.js.map +0 -1
  64. package/lib/extension.d.ts +0 -10
  65. package/lib/extension.js.map +0 -1
  66. package/src/extension.ts +0 -20
package/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  This is a plugin that only has a peer dependency to `piral-core`. What `piral-ng` brings to the table is a set of Pilet API extensions that can be used with `piral` or `piral-core`.
6
6
 
7
- The set includes an Angular converter for any component registration, as well as a `fromNg` shortcut and a `NgExtension` component.
7
+ The set includes an Angular converter for any component registration, as well as a `fromNg` shortcut, a `defineNgModule` function, and a `NgExtension` component.
8
8
 
9
9
  By default, these API extensions are not integrated in `piral`, so you'd need to add them to your Piral instance.
10
10
 
@@ -12,6 +12,10 @@ By default, these API extensions are not integrated in `piral`, so you'd need to
12
12
 
13
13
  The following functions are brought to the Pilet API.
14
14
 
15
+ ### `defineNgModule()`
16
+
17
+ Communicates the usage of a pre-defined Angular module to Piral. Components declared / exported in the module will be bootstrapped within this module.
18
+
15
19
  ### `fromNg()`
16
20
 
17
21
  Transforms a standard Angular component into a component that can be used in Piral, essentially wrapping it with a reference to the corresponding converter.
@@ -37,18 +41,55 @@ export function setup(piral: PiletApi) {
37
41
  }
38
42
  ```
39
43
 
44
+ We recommend that you still put these components into modules as you would normally do. In order for Piral to use that module you need to define it first. This also allows you to use special Piral declarations such as the `NgExtension` or the `ResourceUrlPipe`. All these declarations come with the `SharedModule` available via import from `piral-ng/common`.
45
+
46
+ Example (app) module:
47
+
48
+ ```ts
49
+ import { NgModule } from '@angular/core';
50
+ import { SharedModule } from 'piral-ng/common';
51
+ import { AngularPage } from './AngularPage';
52
+
53
+ @NgModule({
54
+ imports: [SharedModule],
55
+ declarations: [AngularPage],
56
+ exports: [AngularPage]
57
+ })
58
+ export class AppModule {}
59
+ ```
60
+
61
+ Now the example above changes:
62
+
63
+ ```ts
64
+ import { PiletApi } from '<name-of-piral-instance>';
65
+ import { AppModule } from './AppModule';
66
+ import { AngularPage } from './AngularPage';
67
+
68
+ export function setup(piral: PiletApi) {
69
+ // this "teaches" Piral about the given module
70
+ piral.defineNgModule(AppModule);
71
+
72
+ // since we export the AngularPage from the defined module
73
+ // Piral will use the AppModule for bootstrapping the Ng app
74
+ piral.registerPage('/sample', piral.fromNg(AngularPage));
75
+ }
76
+ ```
77
+
40
78
  Angular Options:
41
79
 
42
- You can optionally provide Options to `fromNg`, which are identical to those given to `bootstrapModule` during the Angular boot process. See https://angular.io/api/core/PlatformRef#bootstrapModule for possible values.
80
+ You can optionally provide Options to `defineNgModule`, which are identical to those given to `bootstrapModule` during the Angular boot process. See https://angular.io/api/core/PlatformRef#bootstrapModule for possible values.
43
81
 
44
82
  This is mainly used to allow an Angular Pilet to run without `zone.js` as described [here](https://angular.io/guide/zone#noopzone).
45
83
 
46
84
  ```ts
47
85
  import { PiletApi } from '<name-of-piral-instance>';
86
+ import { AppModule } from './AppModule';
48
87
  import { AngularPage } from './AngularPage';
49
88
 
50
89
  export function setup(piral: PiletApi) {
51
- piral.registerPage('/sample', piral.fromNg(AngularPage, { ngZone: 'noop' }));
90
+ piral.defineNgModule(AppModule, { ngZone: 'noop' });
91
+
92
+ piral.registerPage('/sample', piral.fromNg(AngularPage));
52
93
  }
53
94
  ```
54
95
 
@@ -64,6 +105,14 @@ For specifying `params` you may use data binding. Example:
64
105
  <extension-component name="foo" [params]="{ foo: 2, bar: 'hello' }"></extension-component>
65
106
  ```
66
107
 
108
+ The `ResourceUrlPipe` is there to get the correct paths for images that are just copied to the output directory. The pipe can be used in HTML like this:
109
+
110
+ ```html
111
+ <img width="250" [src]="'images/coffee.jpg' | resourceUrl" alt="Coffee" />
112
+ ```
113
+
114
+ In the example the relative path `images/coffee.jpg` will be expanded to a full URL rooted at the pilet's origin.
115
+
67
116
  Alternatively, if `piral-ng` has not been added to the Piral instance you can install and use the package also from a pilet directly.
68
117
 
69
118
  ```ts
@@ -75,7 +124,21 @@ export function setup(piral: PiletApi) {
75
124
  piral.registerPage('/sample', fromNg(AngularPage));
76
125
  }
77
126
  ```
78
- :::
127
+
128
+ Also, here you can make use of the `defineNgModule` function:
129
+
130
+ ```ts
131
+ import { PiletApi } from '<name-of-piral-instance>';
132
+ import { fromNg, defineNgModule } from 'piral-ng/convert';
133
+ import { AngularPage } from './AngularPage';
134
+ import { AngularModule } from './AngularModule';
135
+
136
+ export function setup(piral: PiletApi) {
137
+ defineNgModule(AngularModule);
138
+
139
+ piral.registerPage('/sample', fromNg(AngularPage));
140
+ }
141
+ ```
79
142
 
80
143
  For components, such as the `AngularPage` a `template` should be specified.
81
144
 
@@ -111,7 +174,7 @@ In many Angular projects you still find `templateUrl`, which would be transforme
111
174
 
112
175
  The same issue applies to `styleUrls`, which should be replaced by `styles`.
113
176
 
114
- If you still need to use `templateUrl` then take a look below at the Webpack config file.
177
+ If you still need to use `templateUrl` (or `styleUrls`) then take a look below at the Webpack config file.
115
178
  :::
116
179
 
117
180
  If you don't want to inline the `template` then just `require` the contents, e.g.,
@@ -175,6 +238,8 @@ module.exports = (config) => {
175
238
  };
176
239
  ```
177
240
 
241
+ :::
242
+
178
243
  ::: summary: For Piral instance developers
179
244
 
180
245
  The provided library only brings API extensions for pilets to a Piral instance. The Piral instance still needs to be configured properly to support Angular 2+.
@@ -255,6 +320,79 @@ export class SampleTileComponent {
255
320
  }
256
321
  ```
257
322
 
323
+ ## Converting an Angular Application to a Pilet
324
+
325
+ 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.
326
+
327
+ First, you'll need to get rid of the Angular CLI. In most cases adding a Webpack configuration should be sufficient. The Webpack configuration can be similar to the one presented above. In many cases you can use the convenience `extend-webpack` module.
328
+
329
+ This is how your *webpack.config.js* can look like:
330
+
331
+ ```js
332
+ const extendWebpack = require('piral-ng/extend-webpack');
333
+
334
+ module.exports = extendWebpack({
335
+ ngOptions: {
336
+ jitMode: false,
337
+ },
338
+ });
339
+ ```
340
+
341
+ The available options are:
342
+
343
+ - `ngOptions` (providing input to the `AngularWebpackPlugin` class)
344
+ - `patterns` (providing input to the Webpack `copy-webpack-plugin`)
345
+ - `compilerOptions` (providing input to the `angularCompilerOptions` section of the *tsconfig.json*)
346
+
347
+ For AoT (i.e. `jitMode: false`) to work correctly the `compilationMode: 'partial'` has to be set. If you use the `piral-ng/extend-webpack` helper as shown above this will be configured correctly for you.
348
+
349
+ If you have set up the build process then you need to make sure that your application has an entry point (*index.ts*). That entry point has to be a valid pilet entry module. It may look as follows:
350
+
351
+ ```ts
352
+ import { PiletApi } from '<your-app-shell>';
353
+
354
+ export function setup(api: PiletApi) {
355
+
356
+ }
357
+ ```
358
+
359
+ You can remove your *main.ts* (or similar) containing
360
+
361
+ ```ts
362
+ platformBrowserDynamic()
363
+ .bootstrapModule(AppModule)
364
+ .catch(err => console.error(err));
365
+ ```
366
+
367
+ as the bootstrapping is done by Piral. Instead, you now need to define your `AppModule` in the pilet:
368
+
369
+ ```ts
370
+ import { PiletApi } from '<your-app-shell>';
371
+ import { AppModule } from './app/AppModule.ts';
372
+
373
+ export function setup(api: PiletApi) {
374
+ api.defineNgModule(AppModule);
375
+ }
376
+ ```
377
+
378
+ Now you can register the exported components from the `AppModule` in the various parts. Example:
379
+
380
+ ```ts
381
+ import { PiletApi } from '<your-app-shell>';
382
+ import { AppModule } from './app/AppModule.ts';
383
+ import { AppComponent } from './app/AppComponent.ts';
384
+
385
+ export function setup(api: PiletApi) {
386
+ api.defineNgModule(AppModule);
387
+
388
+ api.registerPage('/foo/*', api.fromNg(AppComponent));
389
+ }
390
+ ```
391
+
392
+ In the given example we register a single page, however, with all subpages resolving to the same page. Within the page we may use the Angular Router to determine what content to show.
393
+
394
+ The content may remain pretty much unchanged. Routing should be done either via the Angular Router (internal) or via the React Router (across components) automatically. The thing you'll need to pay attention to is the usage of resources. Since the resource will be available available to the location of the pilet (e.g., if the pilet's main bundle is located at `https://yourcdn.com/your-pilet/1.0.0/index.js` then resources need to be relative to `https://yourcdn.com/your-pilet/1.0.0/`).
395
+
258
396
  ## Angular Versions
259
397
 
260
398
  This plugin works with all versions of Angular (right now 2 - 12). Support for Angular.js (also known as Angular 1) is given via `piral-ngjs`.
@@ -270,6 +408,7 @@ The basic dependencies look as follows:
270
408
  "@angular/common": "^2",
271
409
  "@angular/compiler": "^2",
272
410
  "@angular/core": "^2",
411
+ "@angular/router": "^2",
273
412
  "@angular/platform-browser": "^2",
274
413
  "@angular/platform-browser-dynamic": "^2",
275
414
  "core-js": "^3.15.2",
@@ -293,6 +432,7 @@ The basic dependencies look as follows:
293
432
  "@angular/common": "^4",
294
433
  "@angular/compiler": "^4",
295
434
  "@angular/core": "^4",
435
+ "@angular/router": "^4",
296
436
  "@angular/platform-browser": "^4",
297
437
  "@angular/platform-browser-dynamic": "^4",
298
438
  "core-js": "^3.15.2",
@@ -309,11 +449,12 @@ The basic dependencies look as follows:
309
449
 
310
450
  ```json
311
451
  {
312
- "@angular/common": "^4",
313
- "@angular/compiler": "^4",
314
- "@angular/core": "^4",
315
- "@angular/platform-browser": "^4",
316
- "@angular/platform-browser-dynamic": "^4",
452
+ "@angular/common": "^5",
453
+ "@angular/compiler": "^5",
454
+ "@angular/core": "^5",
455
+ "@angular/router": "^5",
456
+ "@angular/platform-browser": "^5",
457
+ "@angular/platform-browser-dynamic": "^5",
317
458
  "core-js": "^3.15.2",
318
459
  "rxjs": "^5.0.0",
319
460
  "zone.js": "~0.9"
@@ -331,6 +472,7 @@ The basic dependencies look as follows:
331
472
  "@angular/common": "^6",
332
473
  "@angular/compiler": "^6",
333
474
  "@angular/core": "^6",
475
+ "@angular/router": "^6",
334
476
  "@angular/platform-browser": "^6",
335
477
  "@angular/platform-browser-dynamic": "^6",
336
478
  "core-js": "^3.15.2",
@@ -347,11 +489,12 @@ The basic dependencies look as follows:
347
489
 
348
490
  ```json
349
491
  {
350
- "@angular/common": "^6",
351
- "@angular/compiler": "^6",
352
- "@angular/core": "^6",
353
- "@angular/platform-browser": "^6",
354
- "@angular/platform-browser-dynamic": "^6",
492
+ "@angular/common": "^7",
493
+ "@angular/compiler": "^7",
494
+ "@angular/core": "^7",
495
+ "@angular/router": "^7",
496
+ "@angular/platform-browser": "^7",
497
+ "@angular/platform-browser-dynamic": "^7",
355
498
  "core-js": "^3.15.2",
356
499
  "rxjs": "^6.0.0",
357
500
  "zone.js": "~0.9"
@@ -369,6 +512,7 @@ The basic dependencies look as follows:
369
512
  "@angular/common": "^8",
370
513
  "@angular/compiler": "^8",
371
514
  "@angular/core": "^8",
515
+ "@angular/router": "^8",
372
516
  "@angular/platform-browser": "^8",
373
517
  "@angular/platform-browser-dynamic": "^8",
374
518
  "core-js": "^3.15.2",
@@ -388,6 +532,7 @@ The basic dependencies look as follows:
388
532
  "@angular/common": "^9",
389
533
  "@angular/compiler": "^9",
390
534
  "@angular/core": "^9",
535
+ "@angular/router": "^9",
391
536
  "@angular/platform-browser": "^9",
392
537
  "@angular/platform-browser-dynamic": "^9",
393
538
  "core-js": "^3.15.2",
@@ -407,6 +552,7 @@ The basic dependencies look as follows:
407
552
  "@angular/common": "^10",
408
553
  "@angular/compiler": "^10",
409
554
  "@angular/core": "^10",
555
+ "@angular/router": "^10",
410
556
  "@angular/platform-browser": "^10",
411
557
  "@angular/platform-browser-dynamic": "^10",
412
558
  "core-js": "^3.15.2",
@@ -426,6 +572,7 @@ The basic dependencies look as follows:
426
572
  "@angular/common": "^11",
427
573
  "@angular/compiler": "^11",
428
574
  "@angular/core": "^11",
575
+ "@angular/router": "^11",
429
576
  "@angular/platform-browser": "^11",
430
577
  "@angular/platform-browser-dynamic": "^11",
431
578
  "core-js": "^3.15.2",
@@ -445,6 +592,7 @@ The basic dependencies look as follows:
445
592
  "@angular/common": "^12",
446
593
  "@angular/compiler": "^12",
447
594
  "@angular/core": "^12",
595
+ "@angular/router": "^12",
448
596
  "@angular/platform-browser": "^12",
449
597
  "@angular/platform-browser-dynamic": "^12",
450
598
  "core-js": "^3.15.2",
package/common.d.ts CHANGED
@@ -1 +1,3 @@
1
1
  export * from './esm/SharedModule';
2
+ export * from './esm/NgExtension';
3
+ export * from './esm/ResourceUrlPipe';
package/common.js CHANGED
@@ -1 +1,3 @@
1
1
  export * from './esm/SharedModule';
2
+ export * from './esm/NgExtension';
3
+ export * from './esm/ResourceUrlPipe';
@@ -0,0 +1,16 @@
1
+ import type { PiletApi } from 'piral-core';
2
+ import * as ngCore from '@angular/core';
3
+ import { ElementRef } from '@angular/core';
4
+ export declare class NgExtension {
5
+ private elRef;
6
+ private piral;
7
+ name: string | undefined;
8
+ params: object | undefined;
9
+ constructor(elRef: ElementRef<HTMLElement>, piral: PiletApi);
10
+ ngAfterContentInit(): void;
11
+ static ɵfac: ngCore.ɵɵFactoryDeclaration<NgExtension, never>;
12
+ static ɵcmp: ngCore.ɵɵComponentDeclaration<NgExtension, 'extension-component', never, {
13
+ name: 'name';
14
+ params: 'params';
15
+ }, {}, never, never>;
16
+ }
@@ -0,0 +1,60 @@
1
+ var NgExtension_1;
2
+ import { __decorate, __metadata, __param } from "tslib";
3
+ import * as ngCore from '@angular/core';
4
+ import { Component, ElementRef, Input, Inject } from '@angular/core';
5
+ const ngc = ngCore;
6
+ const selector = 'extension-component';
7
+ let NgExtension = NgExtension_1 = class NgExtension {
8
+ constructor(elRef, piral) {
9
+ this.elRef = elRef;
10
+ this.piral = piral;
11
+ }
12
+ ngAfterContentInit() {
13
+ this.piral.renderHtmlExtension(this.elRef.nativeElement, {
14
+ name: this.name,
15
+ params: this.params,
16
+ });
17
+ }
18
+ };
19
+ // @ts-ignore
20
+ NgExtension.ɵfac = 'ɵɵdirectiveInject' in ngc
21
+ ? (t) => new (t || NgExtension_1)(ngc.ɵɵdirectiveInject(ElementRef), ngc.ɵɵdirectiveInject('piral'))
22
+ : undefined;
23
+ // @ts-ignore
24
+ NgExtension.ɵcmp = 'ɵɵdefineComponent' in ngc
25
+ ? ngc.ɵɵdefineComponent({
26
+ type: NgExtension_1,
27
+ selectors: [selector],
28
+ inputs: { name: 'name', params: 'params' },
29
+ decls: 0,
30
+ vars: 0,
31
+ template: () => { },
32
+ encapsulation: 2,
33
+ })
34
+ : undefined;
35
+ __decorate([
36
+ Input('name'),
37
+ __metadata("design:type", String)
38
+ ], NgExtension.prototype, "name", void 0);
39
+ __decorate([
40
+ Input('params'),
41
+ __metadata("design:type", Object)
42
+ ], NgExtension.prototype, "params", void 0);
43
+ NgExtension = NgExtension_1 = __decorate([
44
+ Component({
45
+ selector,
46
+ template: '',
47
+ }),
48
+ __param(1, Inject('piral')),
49
+ __metadata("design:paramtypes", [ElementRef, Object])
50
+ ], NgExtension);
51
+ export { NgExtension };
52
+ if ('ɵsetClassMetadata' in ngc) {
53
+ ngc.ɵsetClassMetadata(NgExtension, [
54
+ {
55
+ type: Component,
56
+ args: [{ selector, template: '' }],
57
+ },
58
+ ]);
59
+ }
60
+ //# sourceMappingURL=NgExtension.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NgExtension.js","sourceRoot":"","sources":["../src/NgExtension.ts"],"names":[],"mappings":";;AACA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAErE,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E,EAAE;KACb,CAAC;IAKqD,WAAA,MAAM,CAAC,OAAO,CAAC,CAAA;qCAAzC,UAAU;GAJ1B,WAAW,CAwCvB;SAxCY,WAAW;AA0CxB,IAAI,mBAAmB,IAAI,GAAG,EAAE;IAC9B,GAAG,CAAC,iBAAiB,CAAC,WAAW,EAAE;QACjC;YACE,IAAI,EAAE,SAAS;YACf,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC;SACnC;KACF,CAAC,CAAC;CACJ"}
@@ -1,7 +1,10 @@
1
1
  import type { PiletApi } from 'piral-core';
2
+ import * as ngCore from '@angular/core';
2
3
  import { PipeTransform } from '@angular/core';
3
4
  export declare class ResourceUrlPipe implements PipeTransform {
4
5
  private piral;
5
6
  constructor(piral: PiletApi);
6
7
  transform(value: string): string;
8
+ static ɵfac: ngCore.ɵɵFactoryDeclaration<ResourceUrlPipe, never>;
9
+ static ɵpipe: ngCore.ɵɵPipeDeclaration<ResourceUrlPipe, 'resourceUrl'>;
7
10
  }
@@ -1,6 +1,9 @@
1
+ var ResourceUrlPipe_1;
1
2
  import { __decorate, __metadata, __param } from "tslib";
3
+ import * as ngCore from '@angular/core';
2
4
  import { Inject, Pipe } from '@angular/core';
3
- let ResourceUrlPipe = class ResourceUrlPipe {
5
+ const ngc = ngCore;
6
+ let ResourceUrlPipe = ResourceUrlPipe_1 = class ResourceUrlPipe {
4
7
  constructor(piral) {
5
8
  this.piral = piral;
6
9
  }
@@ -9,10 +12,32 @@ let ResourceUrlPipe = class ResourceUrlPipe {
9
12
  return basePath + value;
10
13
  }
11
14
  };
12
- ResourceUrlPipe = __decorate([
15
+ // @ts-ignore
16
+ ResourceUrlPipe.ɵfac = 'ɵɵdirectiveInject' in ngc ? (t) => new (t || ResourceUrlPipe_1)(ngc.ɵɵdirectiveInject('piral', 16)) : undefined;
17
+ // @ts-ignore
18
+ ResourceUrlPipe.ɵpipe = 'ɵɵdefinePipe' in ngc ? ngc.ɵɵdefinePipe({ name: 'resourceUrl', type: ResourceUrlPipe_1, pure: true }) : undefined;
19
+ ResourceUrlPipe = ResourceUrlPipe_1 = __decorate([
13
20
  Pipe({ name: 'resourceUrl' }),
14
21
  __param(0, Inject('piral')),
15
22
  __metadata("design:paramtypes", [Object])
16
23
  ], ResourceUrlPipe);
17
24
  export { ResourceUrlPipe };
25
+ if ('ɵsetClassMetadata' in ngc) {
26
+ ngc.ɵsetClassMetadata(ResourceUrlPipe, [
27
+ {
28
+ type: Pipe,
29
+ args: [{ name: 'resourceUrl' }],
30
+ },
31
+ ], () => [
32
+ {
33
+ type: undefined,
34
+ decorators: [
35
+ {
36
+ type: Inject,
37
+ args: ['piral'],
38
+ },
39
+ ],
40
+ },
41
+ ]);
42
+ }
18
43
  //# sourceMappingURL=ResourceUrlPipe.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ResourceUrlPipe.js","sourceRoot":"","sources":["../src/ResourceUrlPipe.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAiB,MAAM,eAAe,CAAC;AAG5D,IAAa,eAAe,GAA5B,MAAa,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
+ {"version":3,"file":"ResourceUrlPipe.js","sourceRoot":"","sources":["../src/ResourceUrlPipe.ts"],"names":[],"mappings":";;AACA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,MAA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C,OAAO,CAAC;iBAChB;aACF;SACF;KACF,CACF,CAAC;CACH"}
@@ -10,4 +10,6 @@ export declare class RoutingService implements OnDestroy {
10
10
  private invalidRoutes;
11
11
  constructor(context: ComponentContext, router: Router, zone: NgZone);
12
12
  ngOnDestroy(): void;
13
+ static ɵfac: (t: any) => any;
14
+ static ɵprov: any;
13
15
  }
@@ -1,8 +1,11 @@
1
+ var RoutingService_1;
1
2
  import { __decorate, __metadata, __param } from "tslib";
3
+ import * as ngCore from '@angular/core';
2
4
  import { Inject, Injectable, NgZone, Optional } from '@angular/core';
3
5
  import { NavigationError, Router } from '@angular/router';
4
6
  import { filter } from 'rxjs/operators';
5
- let RoutingService = class RoutingService {
7
+ const ngc = ngCore;
8
+ let RoutingService = RoutingService_1 = class RoutingService {
6
9
  constructor(context, router, zone) {
7
10
  this.context = context;
8
11
  this.router = router;
@@ -22,9 +25,7 @@ let RoutingService = class RoutingService {
22
25
  this.zone.run(() => this.router.navigateByUrl(path));
23
26
  }
24
27
  });
25
- this.subscription = this.router.events
26
- .pipe(filter((e) => e instanceof NavigationError))
27
- .subscribe((e) => {
28
+ this.subscription = this.router.events.pipe(filter((e) => e instanceof NavigationError)).subscribe((e) => {
28
29
  const path = e.url;
29
30
  if (!this.invalidRoutes.includes(path)) {
30
31
  this.invalidRoutes.push(path);
@@ -39,7 +40,13 @@ let RoutingService = class RoutingService {
39
40
  (_b = this.subscription) === null || _b === void 0 ? void 0 : _b.unsubscribe();
40
41
  }
41
42
  };
42
- RoutingService = __decorate([
43
+ RoutingService.ɵfac = 'ɵɵinject' in ngc
44
+ ? (t) => new (t || RoutingService_1)(ngc.ɵɵinject('Context'), ngc.ɵɵinject(Router, 8), ngc.ɵɵinject(NgZone, 8))
45
+ : undefined;
46
+ RoutingService.ɵprov = 'ɵɵngDeclareInjectable' in ngc
47
+ ? ngc.ɵɵdefineInjectable({ token: RoutingService_1, factory: RoutingService_1.ɵfac })
48
+ : undefined;
49
+ RoutingService = RoutingService_1 = __decorate([
43
50
  Injectable(),
44
51
  __param(0, Inject('Context')),
45
52
  __param(1, Optional()),
@@ -48,4 +55,38 @@ RoutingService = __decorate([
48
55
  NgZone])
49
56
  ], RoutingService);
50
57
  export { RoutingService };
58
+ if ('ɵsetClassMetadata' in ngc) {
59
+ ngc.ɵsetClassMetadata(RoutingService, [
60
+ {
61
+ type: Injectable,
62
+ args: [{ name: 'resourceUrl' }],
63
+ },
64
+ ], () => [
65
+ {
66
+ type: undefined,
67
+ decorators: [
68
+ {
69
+ type: Inject,
70
+ args: ['Context'],
71
+ },
72
+ ],
73
+ },
74
+ {
75
+ type: Router,
76
+ decorators: [
77
+ {
78
+ type: Optional,
79
+ },
80
+ ],
81
+ },
82
+ {
83
+ type: NgZone,
84
+ decorators: [
85
+ {
86
+ type: Optional,
87
+ },
88
+ ],
89
+ },
90
+ ]);
91
+ }
51
92
  //# sourceMappingURL=RoutingService.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"RoutingService.js","sourceRoot":"","sources":["../src/RoutingService.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAa,QAAQ,EAAE,MAAM,eAAe,CAAC;AAChF,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAGxC,IAAa,cAAc,GAA3B,MAAa,cAAc;IAKzB,YAC4B,OAAyB,EAC/B,MAAc,EACd,IAAY;QAFN,YAAO,GAAP,OAAO,CAAkB;QAC/B,WAAM,GAAN,MAAM,CAAQ;QACd,SAAI,GAAJ,IAAI,CAAQ;QAL1B,kBAAa,GAAG,EAAE,CAAC;QAOzB,IAAI,IAAI,CAAC,MAAM,EAAE;YACf,IAAI,CAAC,MAAM,CAAC,YAAY,GAAG,CAAC,KAAY,EAAE,EAAE;gBACxC,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,yBAAyB,CAAC,E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CAAC,CAAC,SAAS,CAAC;AApDL,cAAc;IAD1B,UAAU,EAAE;IAOR,WAAA,MAAM,CAAC,SAAS,CAAC,CAAA;IACjB,WAAA,QAAQ,EAAE,CAAA;IACV,WAAA,QAAQ,EAAE,CAAA;6CADiB,MAAM;QACR,MAAM;GARvB,cAAc,CAqD1B;SArDY,cAAc;AAuD3B,IAAI,mBAAmB,IAAI,GAAG,EAAE;IAC9B,GAAG,CAAC,iBAAiB,CACnB,cAAc,EACd;QACE;YACE,IAAI,EAAE,UAAU;YAChB,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC;SAChC;KACF,EACD,GAAG,EAAE,CAAC;QACJ;YACE,IAAI,EAAE,SAAS;YACf,UAAU,EAAE;gBACV;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,CAAC,SAAS,CAAC;iBAClB;aACF;SACF;QACD;YACE,IAAI,EAAE,MAAM;YACZ,UAAU,EAAE;gBACV;oBACE,IAAI,EAAE,QAAQ;iBACf;aACF;SACF;QACD;YACE,IAAI,EAAE,MAAM;YACZ,UAAU,EAAE;gBACV;oBACE,IAAI,EAAE,QAAQ;iBACf;aACF;SACF;KACF,CACF,CAAC;CACH"}
@@ -1,3 +1,18 @@
1
+ import * as ngCore from '@angular/core';
2
+ import { CommonModule } from '@angular/common';
3
+ import { NgExtension } from './NgExtension';
4
+ import { ResourceUrlPipe } from './ResourceUrlPipe';
1
5
  export declare class SharedModule {
2
6
  static props: {};
7
+ static ɵfac: ngCore.ɵɵFactoryDeclaration<SharedModule, never>;
8
+ static ɵmod: ngCore.ɵɵNgModuleDeclaration<SharedModule, [
9
+ typeof NgExtension,
10
+ typeof ResourceUrlPipe
11
+ ], [
12
+ typeof CommonModule
13
+ ], [
14
+ typeof NgExtension,
15
+ typeof ResourceUrlPipe
16
+ ]>;
17
+ static ɵinj: ngCore.ɵɵInjectorDeclaration<SharedModule>;
3
18
  }
@@ -1,18 +1,54 @@
1
+ var SharedModule_1;
1
2
  import { __decorate } from "tslib";
3
+ import * as ngCore from '@angular/core';
2
4
  import { CommonModule } from '@angular/common';
3
5
  import { NgModule } from '@angular/core';
4
- import { NgExtension } from './extension';
6
+ import { NgExtension } from './NgExtension';
5
7
  import { ResourceUrlPipe } from './ResourceUrlPipe';
6
- let SharedModule = class SharedModule {
8
+ const ngc = ngCore;
9
+ const declarationsDef = [NgExtension, ResourceUrlPipe];
10
+ const exportsDef = [NgExtension, ResourceUrlPipe];
11
+ const importsDef = [CommonModule];
12
+ let SharedModule = SharedModule_1 = class SharedModule {
7
13
  };
8
14
  SharedModule.props = {};
9
- SharedModule = __decorate([
15
+ // @ts-ignore
16
+ SharedModule.ɵfac = 'ɵɵinject' in ngc ? (t) => new (t || SharedModule_1)() : undefined;
17
+ // @ts-ignore
18
+ SharedModule.ɵmod = 'ɵɵdefineNgModule' in ngc
19
+ ? ngc.ɵɵdefineNgModule({
20
+ type: SharedModule_1,
21
+ })
22
+ : undefined;
23
+ // @ts-ignore
24
+ SharedModule.ɵinj = 'ɵɵdefineInjector' in ngc
25
+ ? ngc.ɵɵdefineInjector({
26
+ providers: [],
27
+ imports: [importsDef],
28
+ })
29
+ : undefined;
30
+ SharedModule = SharedModule_1 = __decorate([
10
31
  NgModule({
11
- declarations: [NgExtension, ResourceUrlPipe],
32
+ declarations: declarationsDef,
12
33
  providers: [],
13
- imports: [CommonModule],
14
- exports: [NgExtension, ResourceUrlPipe],
34
+ imports: importsDef,
35
+ exports: exportsDef,
15
36
  })
16
37
  ], SharedModule);
17
38
  export { SharedModule };
39
+ if ('ɵsetClassMetadata' in ngc) {
40
+ ngc.ɵsetClassMetadata(SharedModule, [
41
+ {
42
+ type: NgModule,
43
+ args: [
44
+ {
45
+ declarations: declarationsDef,
46
+ providers: [],
47
+ imports: importsDef,
48
+ exports: exportsDef,
49
+ },
50
+ ],
51
+ },
52
+ ]);
53
+ }
18
54
  //# sourceMappingURL=SharedModule.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SharedModule.js","sourceRoot":"","sources":["../src/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,aAAa,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAQpD,IAAa,YAAY,GAAzB,MAAa,YAAY;CAExB,CAAA;AADQ,kBAAK,GAAG,EAAE,CAAC;AADP,YAAY;IANxB,QAAQ,CAAC;QACR,YAAY,EAAE,CAAC,WAAW,EAAE,eAAe,CAAC;QAC5C,SAAS,EAAE,EAAE;QACb,OAAO,EAAE,CAAC,YAAY,CAAC;QACvB,OAAO,EAAE,CAAC,WAAW,EAAE,eAAe,CAAC;KACxC,CAAC;GACW,YAAY,CAExB;SAFY,YAAY"}
1
+ {"version":3,"file":"SharedModule.js","sourceRoot":"","sources":["../src/SharedModule.ts"],"names":[],"mappings":";;AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,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,GAAG,GAAG,MAAa,CAAC;AAC1B,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,oBAAzB,MAAa,YAAY;CA4BxB,CAAA;AA3BQ,kBAAK,GAAG,EAAE,CAAC;AAElB,aAAa;AACN,iBAAI,GACT,UAAU,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,IAAI,cAAY,CAAC,EAAE,CAAC,CAAC,CAAC,SAAU,CAAA;AAExE,aAAa;AACN,iBAAI,GAMT,kBAAkB,IAAI,GAAG;IACvB,CAAC,CAAC,GAAG,CAAC,gBAAgB,CAAC;QACnB,IAAI,EAAE,cAAY;KACnB,CAAC;IACJ,CAAC,CAAC,SAAU,CAAA;AAEhB,aAAa;AACN,iBAAI,GACT,kBAAkB,IAAI,GAAG;IACvB,CAAC,CAAC,GAAG,CAAC,gBAAgB,CAAC;QACnB,SAAS,EAAE,EAAE;QACb,OAAO,EAAE,CAAC,UAAU,CAAC;KACtB,CAAC;IACJ,CAAC,CAAC,SAAU,CAAA;AA3BL,YAAY;IANxB,QAAQ,CAAC;QACR,YAAY,EAAE,eAAe;QAC7B,SAAS,EAAE,EAAE;QACb,OAAO,EAAE,UAAU;QACnB,OAAO,EAAE,UAAU;KACpB,CAAC;GACW,YAAY,CA4BxB;SA5BY,YAAY;AA8BzB,IAAI,mBAAmB,IAAI,GAAG,EAAE;IAC9B,GAAG,CAAC,iBAAiB,CAAC,YAAY,EAAE;QAClC;YACE,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE;gBACJ;oBACE,YAAY,EAAE,eAAe;oBAC7B,SAAS,EAAE,EAAE;oBACb,OAAO,EAAE,UAAU;oBACnB,OAAO,EAAE,UAAU;iBACpB;aACF;SACF;KACF,CAAC,CAAC;CACJ"}
package/esm/bootstrap.js CHANGED
@@ -13,7 +13,8 @@ export function prepareBootstrap(moduleOrComponent) {
13
13
  }
14
14
  else {
15
15
  // usually contains things like selector, template or templateUrl, changeDetection, ...
16
- return [...(getModuleInstance(moduleOrComponent) || createModuleInstance(moduleOrComponent)), moduleOrComponent];
16
+ const result = getModuleInstance(moduleOrComponent) || createModuleInstance(moduleOrComponent);
17
+ return [...result, moduleOrComponent];
17
18
  }
18
19
  }
19
20
  export function bootstrap(result, node, props, context) {