piral-ng 1.0.0-pre.2196 → 1.0.0
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/LICENSE +1 -1
- package/README.md +701 -42
- package/common/NgExtension.d.ts +14 -0
- package/common/ResourceUrlPipe.d.ts +10 -0
- package/common/SharedModule.d.ts +10 -0
- package/common/esm2022/NgExtension.mjs +47 -0
- package/common/esm2022/ResourceUrlPipe.mjs +23 -0
- package/common/esm2022/SharedModule.mjs +25 -0
- package/common/esm2022/piral-ng-common.mjs +5 -0
- package/common/esm2022/public_api.mjs +4 -0
- package/common/fesm2022/piral-ng-common.mjs +93 -0
- package/common/fesm2022/piral-ng-common.mjs.map +1 -0
- package/common/index.d.ts +1 -0
- package/common/package.json +35 -0
- package/common/piral-ng-common.js +3 -0
- package/common/public_api.d.ts +3 -0
- package/convert.d.ts +17 -7
- package/convert.js +17 -11
- package/esm/RoutingService.d.ts +13 -0
- package/esm/RoutingService.js +109 -0
- package/esm/RoutingService.js.map +1 -0
- package/esm/bootstrap.d.ts +6 -5
- package/esm/bootstrap.js +52 -87
- package/esm/bootstrap.js.map +1 -1
- package/esm/common/NgExtension.d.ts +11 -0
- package/esm/common/NgExtension.js +41 -0
- package/esm/common/NgExtension.js.map +1 -0
- package/esm/common/ResourceUrlPipe.d.ts +7 -0
- package/esm/common/ResourceUrlPipe.js +18 -0
- package/esm/common/ResourceUrlPipe.js.map +1 -0
- package/esm/common/SharedModule.d.ts +3 -0
- package/esm/common/SharedModule.js +21 -0
- package/esm/common/SharedModule.js.map +1 -0
- package/esm/common/public_api.d.ts +3 -0
- package/esm/common/public_api.js +4 -0
- package/esm/common/public_api.js.map +1 -0
- package/esm/converter.d.ts +10 -2
- package/esm/converter.js +35 -16
- package/esm/converter.js.map +1 -1
- package/esm/create.d.ts +2 -16
- package/esm/create.js +9 -13
- package/esm/create.js.map +1 -1
- package/esm/module.d.ts +24 -0
- package/esm/module.js +131 -0
- package/esm/module.js.map +1 -0
- package/esm/queue.d.ts +1 -1
- package/esm/queue.js +3 -3
- package/esm/queue.js.map +1 -1
- package/esm/startup.d.ts +8 -0
- package/esm/startup.js +115 -0
- package/esm/startup.js.map +1 -0
- package/esm/types.d.ts +71 -3
- package/esm/utils.d.ts +18 -0
- package/esm/utils.js +46 -0
- package/esm/utils.js.map +1 -0
- package/extend-webpack.js +107 -0
- package/lib/RoutingService.d.ts +13 -0
- package/lib/RoutingService.js +112 -0
- package/lib/RoutingService.js.map +1 -0
- package/lib/bootstrap.d.ts +6 -5
- package/lib/bootstrap.js +55 -91
- package/lib/bootstrap.js.map +1 -1
- package/lib/common/NgExtension.d.ts +11 -0
- package/lib/common/NgExtension.js +44 -0
- package/lib/common/NgExtension.js.map +1 -0
- package/lib/common/ResourceUrlPipe.d.ts +7 -0
- package/lib/common/ResourceUrlPipe.js +21 -0
- package/lib/common/ResourceUrlPipe.js.map +1 -0
- package/lib/common/SharedModule.d.ts +3 -0
- package/lib/common/SharedModule.js +24 -0
- package/lib/common/SharedModule.js.map +1 -0
- package/lib/common/public_api.d.ts +3 -0
- package/lib/common/public_api.js +7 -0
- package/lib/common/public_api.js.map +1 -0
- package/lib/converter.d.ts +10 -2
- package/lib/converter.js +36 -17
- package/lib/converter.js.map +1 -1
- package/lib/create.d.ts +2 -16
- package/lib/create.js +10 -14
- package/lib/create.js.map +1 -1
- package/lib/index.js +1 -1
- package/lib/module.d.ts +24 -0
- package/lib/module.js +139 -0
- package/lib/module.js.map +1 -0
- package/lib/queue.d.ts +1 -1
- package/lib/queue.js +3 -3
- package/lib/queue.js.map +1 -1
- package/lib/startup.d.ts +8 -0
- package/lib/startup.js +120 -0
- package/lib/startup.js.map +1 -0
- package/lib/types.d.ts +71 -3
- package/lib/utils.d.ts +18 -0
- package/lib/utils.js +55 -0
- package/lib/utils.js.map +1 -0
- package/package.json +51 -16
- package/src/RoutingService.ts +114 -0
- package/src/bootstrap.ts +57 -104
- package/src/common/NgExtension.ts +33 -0
- package/src/common/ResourceUrlPipe.ts +12 -0
- package/src/common/SharedModule.ts +18 -0
- package/src/common/index.d.ts +1 -0
- package/src/common/ng-package.json +11 -0
- package/src/common/package.json +19 -0
- package/src/common/piral-ng-common.js +3 -0
- package/src/common/public_api.ts +3 -0
- package/src/converter.ts +58 -20
- package/src/create.ts +6 -23
- package/src/module.ts +163 -0
- package/src/queue.ts +1 -1
- package/src/startup.ts +148 -0
- package/src/types.ts +73 -3
- package/src/utils.ts +69 -0
- package/convert.ts +0 -16
- package/esm/extension.d.ts +0 -1
- package/esm/extension.js +0 -41
- package/esm/extension.js.map +0 -1
- package/lib/extension.d.ts +0 -1
- package/lib/extension.js +0 -45
- package/lib/extension.js.map +0 -1
- package/src/extension.ts +0 -29
package/esm/bootstrap.js
CHANGED
|
@@ -1,92 +1,57 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
function
|
|
6
|
-
return
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}
|
|
44
|
-
export function bootstrapComponent(context, props, component, node, id) {
|
|
45
|
-
var piral = props.piral;
|
|
46
|
-
var declarations = [component, piral.NgExtension];
|
|
47
|
-
node.id = sanatize(id);
|
|
48
|
-
setComponentSelector(component, node.id);
|
|
49
|
-
var BootstrapModule = /** @class */ (function () {
|
|
50
|
-
function BootstrapModule() {
|
|
1
|
+
import { __awaiter } from "tslib";
|
|
2
|
+
import { createModuleInstance, getModuleInstance, defineModule, findModule, activateModuleInstance } from './module';
|
|
3
|
+
import { getAnnotations, hasSelector } from './utils';
|
|
4
|
+
import { startup } from './startup';
|
|
5
|
+
export function prepareBootstrap(moduleOrComponent, piral) {
|
|
6
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
7
|
+
if ('module' in moduleOrComponent && typeof moduleOrComponent.module === 'function') {
|
|
8
|
+
if (!(moduleOrComponent.state.current instanceof Promise)) {
|
|
9
|
+
moduleOrComponent.state.current = moduleOrComponent.module().then((result) => {
|
|
10
|
+
if (typeof result !== 'object' || !('default' in result)) {
|
|
11
|
+
throw new Error('The lazy loaded module does not `default` export a NgModule class.');
|
|
12
|
+
}
|
|
13
|
+
defineModule(result.default, moduleOrComponent.opts);
|
|
14
|
+
return findModule(result.default);
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
const moduleDef = yield moduleOrComponent.state.current;
|
|
18
|
+
const { components } = moduleDef;
|
|
19
|
+
const component = components.find((m) => hasSelector(m, moduleOrComponent.selector));
|
|
20
|
+
if (!component) {
|
|
21
|
+
throw new Error(`No component matching the selector "${moduleOrComponent.selector}" has been found.`);
|
|
22
|
+
}
|
|
23
|
+
return [...activateModuleInstance(moduleDef, piral), component];
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
const [annotation] = getAnnotations(moduleOrComponent);
|
|
27
|
+
const standalone = annotation === null || annotation === void 0 ? void 0 : annotation.standalone;
|
|
28
|
+
// first way is to directly use a module, which is the legacy way
|
|
29
|
+
// second way is to find a previously defined Angular module
|
|
30
|
+
if (annotation && annotation.bootstrap) {
|
|
31
|
+
// usually contains things like imports, exports, declarations, ...
|
|
32
|
+
const [component] = annotation.bootstrap;
|
|
33
|
+
annotation.exports = [component];
|
|
34
|
+
defineModule(moduleOrComponent);
|
|
35
|
+
return [...getModuleInstance(component, standalone, piral), component];
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
// usually contains things like selector, template or templateUrl, changeDetection, ...
|
|
39
|
+
const result = getModuleInstance(moduleOrComponent, standalone, piral) ||
|
|
40
|
+
createModuleInstance(moduleOrComponent, standalone, piral);
|
|
41
|
+
return [...result, moduleOrComponent];
|
|
42
|
+
}
|
|
51
43
|
}
|
|
52
|
-
|
|
53
|
-
NgModule({
|
|
54
|
-
imports: [BrowserModule],
|
|
55
|
-
providers: [
|
|
56
|
-
{
|
|
57
|
-
provide: 'piral',
|
|
58
|
-
useValue: piral,
|
|
59
|
-
},
|
|
60
|
-
],
|
|
61
|
-
declarations: declarations,
|
|
62
|
-
bootstrap: [component],
|
|
63
|
-
})
|
|
64
|
-
], BootstrapModule);
|
|
65
|
-
return BootstrapModule;
|
|
66
|
-
}());
|
|
67
|
-
return startup(context, props, BootstrapModule, node);
|
|
44
|
+
});
|
|
68
45
|
}
|
|
69
|
-
export function
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
var declarations = annotation.declarations || [];
|
|
77
|
-
var component = (annotation.bootstrap || [])[0];
|
|
78
|
-
annotation.providers = __spreadArrays(providers, [
|
|
79
|
-
{
|
|
80
|
-
provide: 'piral',
|
|
81
|
-
useValue: piral,
|
|
82
|
-
},
|
|
83
|
-
]);
|
|
84
|
-
annotation.declarations = __spreadArrays(declarations, [piral.NgExtension]);
|
|
85
|
-
if (component) {
|
|
86
|
-
setComponentSelector(component, node.id);
|
|
87
|
-
annotation.bootstrap = [component];
|
|
46
|
+
export function bootstrap(result, node, props, context) {
|
|
47
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
48
|
+
const [selectedModule, ngOptions, component] = result;
|
|
49
|
+
const ref = yield startup(selectedModule, context, ngOptions);
|
|
50
|
+
if (ref) {
|
|
51
|
+
ref.instance.attach(component, node, props);
|
|
52
|
+
return () => ref.instance.detach(component, node);
|
|
88
53
|
}
|
|
89
|
-
|
|
90
|
-
|
|
54
|
+
return () => { };
|
|
55
|
+
});
|
|
91
56
|
}
|
|
92
57
|
//# sourceMappingURL=bootstrap.js.map
|
package/esm/bootstrap.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bootstrap.js","sourceRoot":"","sources":["../src/bootstrap.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"bootstrap.js","sourceRoot":"","sources":["../src/bootstrap.ts"],"names":[],"mappings":";AAIA,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,YAAY,EAAE,UAAU,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AACrH,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,MAAM,UAAgB,gBAAgB,CACpC,iBAAyC,EACzC,KAAe;;QAEf,IAAI,QAAQ,IAAI,iBAAiB,IAAI,OAAO,iBAAiB,CAAC,MAAM,KAAK,UAAU,EAAE;YACnF,IAAI,CAAC,CAAC,iBAAiB,CAAC,KAAK,CAAC,OAAO,YAAY,OAAO,CAAC,EAAE;gBACzD,iBAAiB,CAAC,KAAK,CAAC,OAAO,GAAG,iBAAiB,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE;oBAC3E,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,CAAC,CAAC,SAAS,IAAI,MAAM,CAAC,EAAE;wBACxD,MAAM,IAAI,KAAK,CAAC,oEAAoE,CAAC,CAAC;qBACvF;oBAED,YAAY,CAAC,MAAM,CAAC,OAAO,EAAE,iBAAiB,CAAC,IAAI,CAAC,CAAC;oBACrD,OAAO,UAAU,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;gBACpC,CAAC,CAAC,CAAC;aACJ;YAED,MAAM,SAAS,GAAG,MAAM,iBAAiB,CAAC,KAAK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KAA8B,EAC9B,OAAyB;;QAEzB,MAAM,CAAC,cAAc,EAAE,SAAS,EAAE,SAAS,CAAC,GAAG,MAAM,CAAC;QACtD,MAAM,GAAG,GAAG,MAAM,OAAO,CAAC,cAAc,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC;QAE9D,IAAI,GAAG,EAAE;YACP,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,SAAS,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;YAC5C,OAAO,GAAG,EAAE,CAAC,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;SACnD;QAED,OAAO,GAAG,EAAE,GAAE,CAAC,CAAC;IAClB,CAAC;CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,18 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,21 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
package/esm/converter.d.ts
CHANGED
|
@@ -1,2 +1,10 @@
|
|
|
1
|
-
import { ForeignComponent, BaseComponentProps } from 'piral-core';
|
|
2
|
-
|
|
1
|
+
import type { ForeignComponent, BaseComponentProps } from 'piral-core';
|
|
2
|
+
import type { NgModuleDefiner } from './types';
|
|
3
|
+
export interface NgConverterOptions {
|
|
4
|
+
}
|
|
5
|
+
export interface NgConverter {
|
|
6
|
+
<TProps extends BaseComponentProps>(component: any): ForeignComponent<TProps>;
|
|
7
|
+
defineModule: NgModuleDefiner;
|
|
8
|
+
Extension: any;
|
|
9
|
+
}
|
|
10
|
+
export declare function createConverter(_?: NgConverterOptions): NgConverter;
|
package/esm/converter.js
CHANGED
|
@@ -1,20 +1,39 @@
|
|
|
1
|
+
import { __awaiter } from "tslib";
|
|
2
|
+
import { BehaviorSubject } from 'rxjs';
|
|
1
3
|
import { enqueue } from './queue';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
|
|
4
|
+
import { defineModule } from './module';
|
|
5
|
+
import { bootstrap, prepareBootstrap } from './bootstrap';
|
|
6
|
+
import { NgExtension } from '../common';
|
|
7
|
+
export function createConverter(_ = {}) {
|
|
8
|
+
const registry = new Map();
|
|
9
|
+
const convert = (component) => ({
|
|
10
|
+
mount(el, props, ctx, locals) {
|
|
11
|
+
locals.active = true;
|
|
12
|
+
if (!locals.props) {
|
|
13
|
+
locals.props = new BehaviorSubject(props);
|
|
14
|
+
}
|
|
15
|
+
if (!locals.queued) {
|
|
16
|
+
locals.queued = Promise.resolve();
|
|
17
|
+
}
|
|
18
|
+
locals.queued = locals.queued.then(() => enqueue(() => __awaiter(this, void 0, void 0, function* () {
|
|
19
|
+
if (!registry.has(component)) {
|
|
20
|
+
registry.set(component, yield prepareBootstrap(component, props.piral));
|
|
21
|
+
}
|
|
22
|
+
if (locals.active) {
|
|
23
|
+
return yield bootstrap(registry.get(component), el, locals.props, ctx);
|
|
24
|
+
}
|
|
25
|
+
})));
|
|
26
|
+
},
|
|
27
|
+
update(el, props, ctx, locals) {
|
|
28
|
+
locals.props.next(props);
|
|
29
|
+
},
|
|
30
|
+
unmount(el, locals) {
|
|
31
|
+
locals.active = false;
|
|
32
|
+
locals.queued = locals.queued.then((dispose) => dispose && enqueue(dispose));
|
|
33
|
+
},
|
|
34
|
+
});
|
|
35
|
+
convert.defineModule = defineModule;
|
|
36
|
+
convert.Extension = NgExtension;
|
|
18
37
|
return convert;
|
|
19
38
|
}
|
|
20
39
|
//# sourceMappingURL=converter.js.map
|
package/esm/converter.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"converter.js","sourceRoot":"","sources":["../src/converter.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AAE,EAAE,EAAE,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;iBACxE;YACH,CAAC,CAAA,CAAC,CACH,CAAC;QACJ,CAAC;QACD,MAAM,CAAC,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,MAAuB;YAC5C,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC3B,CAAC;QACD,OAAO,CAAC,EAAE,EAAE,MAAuB;YACjC,MAAM,CAAC,MAAM,GAAG,KAAK,CAAC;YACtB,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC;QAC/E,CAAC;KACF,CAAC,CAAC;IACH,OAAO,CAAC,YAAY,GAAG,YAAY,CAAC;IACpC,OAAO,CAAC,SAAS,GAAG,WAAW,CAAC;IAChC,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
package/esm/create.d.ts
CHANGED
|
@@ -1,24 +1,10 @@
|
|
|
1
1
|
import type { PiralPlugin } from 'piral-core';
|
|
2
2
|
import type { PiletNgApi } from './types';
|
|
3
|
+
import { NgConverterOptions } from './converter';
|
|
3
4
|
/**
|
|
4
5
|
* Available configuration options for the Angular plugin.
|
|
5
6
|
*/
|
|
6
|
-
export interface NgConfig {
|
|
7
|
-
/**
|
|
8
|
-
* Defines the name of the extension component.
|
|
9
|
-
* @default extension-component
|
|
10
|
-
*/
|
|
11
|
-
selector?: string;
|
|
12
|
-
/**
|
|
13
|
-
* Defines the name of the root element.
|
|
14
|
-
* @default slot
|
|
15
|
-
*/
|
|
16
|
-
rootName?: string;
|
|
17
|
-
/**
|
|
18
|
-
* Defines how the next ID for mounting is selected.
|
|
19
|
-
* By default a random number is used in conjunction with a `ng-` prefix.
|
|
20
|
-
*/
|
|
21
|
-
selectId?(): string;
|
|
7
|
+
export interface NgConfig extends NgConverterOptions {
|
|
22
8
|
}
|
|
23
9
|
/**
|
|
24
10
|
* Creates the Pilet API extensions for Angular.
|
package/esm/create.js
CHANGED
|
@@ -1,23 +1,19 @@
|
|
|
1
1
|
import { createConverter } from './converter';
|
|
2
|
-
import {
|
|
2
|
+
import { defineModule } from './module';
|
|
3
3
|
/**
|
|
4
4
|
* Creates the Pilet API extensions for Angular.
|
|
5
5
|
*/
|
|
6
|
-
export function createNgApi(config) {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
var convert = createConverter(selectId);
|
|
11
|
-
context.converters.ng = function (_a) {
|
|
12
|
-
var component = _a.component;
|
|
13
|
-
return convert(component);
|
|
14
|
-
};
|
|
6
|
+
export function createNgApi(config = {}) {
|
|
7
|
+
return (context) => {
|
|
8
|
+
const convert = createConverter(config);
|
|
9
|
+
context.converters.ng = ({ component }) => convert(component);
|
|
15
10
|
return {
|
|
16
|
-
NgExtension:
|
|
17
|
-
|
|
11
|
+
NgExtension: convert.Extension,
|
|
12
|
+
defineNgModule: defineModule,
|
|
13
|
+
fromNg(component) {
|
|
18
14
|
return {
|
|
19
15
|
type: 'ng',
|
|
20
|
-
component
|
|
16
|
+
component,
|
|
21
17
|
};
|
|
22
18
|
},
|
|
23
19
|
};
|
package/esm/create.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.js","sourceRoot":"","sources":["../src/create.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"create.js","sourceRoot":"","sources":["../src/create.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAsB,MAAM,aAAa,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAOxC;;GAEG;AACH,MAAM,UAAU,WAAW,CAAC,SAAmB,EAAE;IAC/C,OAAO,CAAC,OAAO,EAAE,EAAE;QACjB,MAAM,OAAO,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC;QACxC,OAAO,CAAC,UAAU,CAAC,EAAE,GAAG,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;QAE9D,OAAO;YACL,WAAW,EAAE,OAAO,CAAC,SAAS;YAC9B,cAAc,EAAE,YAAY;YAC5B,MAAM,CAAC,SAAS;gBACd,OAAO;oBACL,IAAI,EAAE,IAAI;oBACV,SAAS;iBACV,CAAC;YACJ,CAAC;SACF,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC"}
|
package/esm/module.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { PiletApi } from 'piral-core';
|
|
2
|
+
import type { NgOptions, ModuleInstanceResult } from './types';
|
|
3
|
+
interface ModuleDefinition {
|
|
4
|
+
active: any;
|
|
5
|
+
module: any;
|
|
6
|
+
components: Array<any>;
|
|
7
|
+
opts: NgOptions;
|
|
8
|
+
}
|
|
9
|
+
export declare function activateModuleInstance(moduleDef: ModuleDefinition, piral: PiletApi): ModuleInstanceResult;
|
|
10
|
+
export declare function getModuleInstance(component: any, standalone: boolean, piral: PiletApi): ModuleInstanceResult;
|
|
11
|
+
export declare function createModuleInstance(component: any, standalone: boolean, piral: PiletApi): ModuleInstanceResult;
|
|
12
|
+
export declare function findModule(module: any): ModuleDefinition;
|
|
13
|
+
export declare function defineModule(module: any, opts?: NgOptions): (selector: string) => {
|
|
14
|
+
component: {
|
|
15
|
+
selector: string;
|
|
16
|
+
module: any;
|
|
17
|
+
opts: (import("@angular/core").CompilerOptions & import("@angular/core").BootstrapOptions) | (import("@angular/core").CompilerOptions & import("@angular/core").BootstrapOptions)[];
|
|
18
|
+
state: {
|
|
19
|
+
current: any;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
type: "ng";
|
|
23
|
+
};
|
|
24
|
+
export {};
|
package/esm/module.js
ADDED
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { __decorate, __metadata } from "tslib";
|
|
2
|
+
import { BrowserModule } from '@angular/platform-browser';
|
|
3
|
+
import { CommonModule } from '@angular/common';
|
|
4
|
+
import { ComponentFactoryResolver, CUSTOM_ELEMENTS_SCHEMA, NgModule, NgZone, } from '@angular/core';
|
|
5
|
+
import { teardown } from './startup';
|
|
6
|
+
import { RoutingService } from './RoutingService';
|
|
7
|
+
import { findComponents, getAnnotations } from './utils';
|
|
8
|
+
import { SharedModule } from '../common';
|
|
9
|
+
const availableModules = [];
|
|
10
|
+
function instantiateModule(moduleDef, piral) {
|
|
11
|
+
var BootstrapModule_1;
|
|
12
|
+
const { module, components } = moduleDef;
|
|
13
|
+
const imports = [BrowserModule, SharedModule, module];
|
|
14
|
+
const props = { current: undefined };
|
|
15
|
+
const providers = [
|
|
16
|
+
RoutingService,
|
|
17
|
+
{ provide: 'Props', useFactory: () => props.current.value, deps: [] },
|
|
18
|
+
{ provide: 'piral', useFactory: () => piral, deps: [] },
|
|
19
|
+
];
|
|
20
|
+
let BootstrapModule = BootstrapModule_1 = class BootstrapModule {
|
|
21
|
+
constructor(resolver, zone, routing) {
|
|
22
|
+
this.resolver = resolver;
|
|
23
|
+
this.zone = zone;
|
|
24
|
+
this.routing = routing;
|
|
25
|
+
this.refs = [];
|
|
26
|
+
}
|
|
27
|
+
ngDoBootstrap(appRef) {
|
|
28
|
+
this.appRef = appRef;
|
|
29
|
+
}
|
|
30
|
+
attach(component, node, $props) {
|
|
31
|
+
var _a, _b, _c;
|
|
32
|
+
const factory = this.resolver.resolveComponentFactory(component);
|
|
33
|
+
props.current = $props;
|
|
34
|
+
if (factory) {
|
|
35
|
+
const ref = this.zone.run(() => this.appRef.bootstrap(factory, node));
|
|
36
|
+
const name = (_c = (_b = (_a = ref.componentType) === null || _a === void 0 ? void 0 : _a.ɵcmp) === null || _b === void 0 ? void 0 : _b.inputs) === null || _c === void 0 ? void 0 : _c.Props;
|
|
37
|
+
if (typeof name === 'string') {
|
|
38
|
+
const sub = $props.subscribe((props) => {
|
|
39
|
+
var _a;
|
|
40
|
+
ref.instance[name] = props;
|
|
41
|
+
(_a = ref.changeDetectorRef) === null || _a === void 0 ? void 0 : _a.detectChanges();
|
|
42
|
+
});
|
|
43
|
+
ref.onDestroy(() => sub.unsubscribe());
|
|
44
|
+
}
|
|
45
|
+
this.refs.push([component, node, ref]);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
detach(component, node) {
|
|
49
|
+
for (let i = this.refs.length; i--;) {
|
|
50
|
+
const [sourceComponent, sourceNode, ref] = this.refs[i];
|
|
51
|
+
if (sourceComponent === component && sourceNode === node) {
|
|
52
|
+
ref.destroy();
|
|
53
|
+
this.refs.splice(i, 1);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
if (this.refs.length === 0) {
|
|
57
|
+
teardown(BootstrapModule_1);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
BootstrapModule = BootstrapModule_1 = __decorate([
|
|
62
|
+
NgModule({
|
|
63
|
+
imports,
|
|
64
|
+
// @ts-ignore
|
|
65
|
+
entryComponents: components,
|
|
66
|
+
providers,
|
|
67
|
+
}),
|
|
68
|
+
__metadata("design:paramtypes", [ComponentFactoryResolver, NgZone, RoutingService])
|
|
69
|
+
], BootstrapModule);
|
|
70
|
+
return BootstrapModule;
|
|
71
|
+
}
|
|
72
|
+
export function activateModuleInstance(moduleDef, piral) {
|
|
73
|
+
if (!moduleDef.active) {
|
|
74
|
+
moduleDef.active = instantiateModule(moduleDef, piral);
|
|
75
|
+
}
|
|
76
|
+
return [moduleDef.active, moduleDef.opts];
|
|
77
|
+
}
|
|
78
|
+
export function getModuleInstance(component, standalone, piral) {
|
|
79
|
+
const [moduleDef] = availableModules.filter((m) => m.components.includes(component));
|
|
80
|
+
if (moduleDef) {
|
|
81
|
+
return activateModuleInstance(moduleDef, piral);
|
|
82
|
+
}
|
|
83
|
+
if (process.env.NODE_ENV === 'development') {
|
|
84
|
+
if (!standalone) {
|
|
85
|
+
console.warn('Component not found in all defined Angular modules. Make sure to define (using `defineNgModule`) a module with your component(s) referenced in the exports section of the `@NgModule` decorator.', component, piral.meta);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
return undefined;
|
|
89
|
+
}
|
|
90
|
+
export function createModuleInstance(component, standalone, piral) {
|
|
91
|
+
const declarations = standalone ? [] : [component];
|
|
92
|
+
const importsDef = standalone ? [CommonModule, component] : [CommonModule];
|
|
93
|
+
const exportsDef = [component];
|
|
94
|
+
const schemasDef = [CUSTOM_ELEMENTS_SCHEMA];
|
|
95
|
+
let Module = class Module {
|
|
96
|
+
};
|
|
97
|
+
Module = __decorate([
|
|
98
|
+
NgModule({
|
|
99
|
+
declarations,
|
|
100
|
+
imports: importsDef,
|
|
101
|
+
exports: exportsDef,
|
|
102
|
+
schemas: schemasDef,
|
|
103
|
+
})
|
|
104
|
+
], Module);
|
|
105
|
+
defineModule(Module);
|
|
106
|
+
return getModuleInstance(component, standalone, piral);
|
|
107
|
+
}
|
|
108
|
+
export function findModule(module) {
|
|
109
|
+
return availableModules.find((m) => m.module === module);
|
|
110
|
+
}
|
|
111
|
+
export function defineModule(module, opts = undefined) {
|
|
112
|
+
const [annotation] = getAnnotations(module);
|
|
113
|
+
if (annotation) {
|
|
114
|
+
availableModules.push({
|
|
115
|
+
active: undefined,
|
|
116
|
+
components: findComponents(annotation.exports),
|
|
117
|
+
module,
|
|
118
|
+
opts,
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
else if (typeof module === 'function') {
|
|
122
|
+
const state = {
|
|
123
|
+
current: undefined,
|
|
124
|
+
};
|
|
125
|
+
return (selector) => ({
|
|
126
|
+
component: { selector, module, opts, state },
|
|
127
|
+
type: 'ng',
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
//# sourceMappingURL=module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module.js","sourceRoot":"","sources":["../src/module.ts"],"names":[],"mappings":";AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;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