@worktile/planet 11.0.0 → 12.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/application/planet-application-loader.d.ts.map +1 -1
- package/application/planet-application-loader.ngfactory.d.ts.map +1 -0
- package/application/planet-application-ref.d.ts +13 -10
- package/application/planet-application-ref.d.ts.map +1 -1
- package/application/planet-application.service.d.ts +1 -1
- package/application/planet-application.service.d.ts.map +1 -1
- package/application/planet-application.service.ngfactory.d.ts.map +1 -0
- package/application/portal-application.d.ts +6 -6
- package/application/portal-application.d.ts.map +1 -1
- package/assets-loader.d.ts +11 -2
- package/assets-loader.d.ts.map +1 -1
- package/assets-loader.ngfactory.d.ts.map +1 -0
- package/bundles/worktile-planet.umd.js +851 -58
- package/bundles/worktile-planet.umd.js.map +1 -1
- package/component/planet-component-loader.d.ts.map +1 -1
- package/component/planet-component-loader.ngfactory.d.ts.map +1 -0
- package/empty/empty.component.ngfactory.d.ts.map +1 -0
- package/esm2015/application/planet-application-loader.js +15 -10
- package/esm2015/application/planet-application-ref.js +29 -18
- package/esm2015/application/planet-application.service.js +1 -1
- package/esm2015/application/portal-application.js +1 -1
- package/esm2015/assets-loader.js +60 -8
- package/esm2015/component/planet-component-loader.js +3 -5
- package/esm2015/debug.js +2 -2
- package/esm2015/global-planet.js +6 -3
- package/esm2015/helpers.js +6 -3
- package/esm2015/planet.class.js +1 -1
- package/esm2015/planet.js +4 -3
- package/esm2015/sandbox/constants.js +7 -0
- package/esm2015/sandbox/exec.js +15 -0
- package/esm2015/sandbox/index.js +20 -0
- package/esm2015/sandbox/proxy/patches/document.js +12 -0
- package/esm2015/sandbox/proxy/patches/eventListener.js +41 -0
- package/esm2015/sandbox/proxy/patches/index.js +11 -0
- package/esm2015/sandbox/proxy/patches/storage.js +40 -0
- package/esm2015/sandbox/proxy/patches/timer.js +43 -0
- package/esm2015/sandbox/proxy/proxies/common.js +132 -0
- package/esm2015/sandbox/proxy/proxies/document.js +126 -0
- package/esm2015/sandbox/proxy/proxies/window.js +155 -0
- package/esm2015/sandbox/proxy/proxy-sandbox.js +49 -0
- package/esm2015/sandbox/proxy/types.js +2 -0
- package/esm2015/sandbox/sandbox.js +7 -0
- package/esm2015/sandbox/snapshot/snapshot-sandbox.js +12 -0
- package/esm2015/sandbox/types.js +2 -0
- package/fesm2015/worktile-planet.js +763 -45
- package/fesm2015/worktile-planet.js.map +1 -1
- package/global-event-dispatcher.ngfactory.d.ts.map +1 -0
- package/global-planet.d.ts +3 -3
- package/global-planet.d.ts.map +1 -1
- package/helpers.d.ts +3 -2
- package/helpers.d.ts.map +1 -1
- package/module.ngfactory.d.ts.map +1 -0
- package/package.json +5 -5
- package/planet.class.d.ts +1 -0
- package/planet.class.d.ts.map +1 -1
- package/planet.d.ts +1 -1
- package/planet.d.ts.map +1 -1
- package/planet.ngfactory.d.ts.map +1 -0
- package/sandbox/constants.d.ts +7 -0
- package/sandbox/constants.d.ts.map +1 -0
- package/sandbox/exec.d.ts +3 -0
- package/sandbox/exec.d.ts.map +1 -0
- package/sandbox/index.d.ts +7 -0
- package/sandbox/index.d.ts.map +1 -0
- package/sandbox/proxy/patches/document.d.ts +3 -0
- package/sandbox/proxy/patches/document.d.ts.map +1 -0
- package/sandbox/proxy/patches/eventListener.d.ts +3 -0
- package/sandbox/proxy/patches/eventListener.d.ts.map +1 -0
- package/sandbox/proxy/patches/index.d.ts +3 -0
- package/sandbox/proxy/patches/index.d.ts.map +1 -0
- package/sandbox/proxy/patches/storage.d.ts +15 -0
- package/sandbox/proxy/patches/storage.d.ts.map +1 -0
- package/sandbox/proxy/patches/timer.d.ts +3 -0
- package/sandbox/proxy/patches/timer.d.ts.map +1 -0
- package/sandbox/proxy/proxies/common.d.ts +13 -0
- package/sandbox/proxy/proxies/common.d.ts.map +1 -0
- package/sandbox/proxy/proxies/document.d.ts +14 -0
- package/sandbox/proxy/proxies/document.d.ts.map +1 -0
- package/sandbox/proxy/proxies/window.d.ts +13 -0
- package/sandbox/proxy/proxies/window.d.ts.map +1 -0
- package/sandbox/proxy/proxy-sandbox.d.ts +16 -0
- package/sandbox/proxy/proxy-sandbox.d.ts.map +1 -0
- package/sandbox/proxy/types.d.ts +14 -0
- package/sandbox/proxy/types.d.ts.map +1 -0
- package/sandbox/sandbox.d.ts +12 -0
- package/sandbox/sandbox.d.ts.map +1 -0
- package/sandbox/snapshot/snapshot-sandbox.d.ts +9 -0
- package/sandbox/snapshot/snapshot-sandbox.d.ts.map +1 -0
- package/sandbox/types.d.ts +2 -0
- package/sandbox/types.d.ts.map +1 -0
- package/worktile-planet.metadata.json +1 -1
- package/bundles/worktile-planet.umd.min.js +0 -16
- package/bundles/worktile-planet.umd.min.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"global-event-dispatcher.ngfactory.d.ts","sourceRoot":"","sources":["../../packages/planet/src/global-event-dispatcher.ngfactory.ts"],"names":[],"mappings":""}
|
package/global-planet.d.ts
CHANGED
|
@@ -7,12 +7,12 @@ export interface GlobalPlanet {
|
|
|
7
7
|
[key: string]: PlanetApplicationRef;
|
|
8
8
|
};
|
|
9
9
|
portalApplication?: PlanetPortalApplication;
|
|
10
|
-
applicationLoader
|
|
11
|
-
applicationService
|
|
10
|
+
applicationLoader: PlanetApplicationLoader;
|
|
11
|
+
applicationService: PlanetApplicationService;
|
|
12
12
|
}
|
|
13
13
|
export declare const globalPlanet: GlobalPlanet;
|
|
14
14
|
export declare function defineApplication(name: string, options: BootstrapAppModule | BootstrapOptions): void;
|
|
15
|
-
export declare function getPlanetApplicationRef(appName: string): PlanetApplicationRef;
|
|
15
|
+
export declare function getPlanetApplicationRef(appName: string): PlanetApplicationRef | null;
|
|
16
16
|
export declare function setPortalApplicationData<T>(data: T): void;
|
|
17
17
|
export declare function getPortalApplicationData<TData>(): TData;
|
|
18
18
|
export declare function setApplicationLoader(loader: PlanetApplicationLoader): void;
|
package/global-planet.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"global-planet.d.ts","sourceRoot":"","sources":["../../packages/planet/src/global-planet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAClH,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAC3E,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAClF,OAAO,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAC;AAKpF,MAAM,WAAW,YAAY;IACzB,IAAI,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,oBAAoB,CAAA;KAAE,CAAC;IAC9C,iBAAiB,CAAC,EAAE,uBAAuB,CAAC;IAC5C,iBAAiB,
|
|
1
|
+
{"version":3,"file":"global-planet.d.ts","sourceRoot":"","sources":["../../packages/planet/src/global-planet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAClH,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAC3E,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAClF,OAAO,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAC;AAKpF,MAAM,WAAW,YAAY;IACzB,IAAI,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,oBAAoB,CAAA;KAAE,CAAC;IAC9C,iBAAiB,CAAC,EAAE,uBAAuB,CAAC;IAC5C,iBAAiB,EAAE,uBAAuB,CAAC;IAC3C,kBAAkB,EAAE,wBAAwB,CAAC;CAChD;AAED,eAAO,MAAM,YAAY,EAAE,YAEzB,CAAC;AAEH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,kBAAkB,GAAG,gBAAgB,QAY7F;AAED,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,MAAM,GAAG,oBAAoB,GAAG,IAAI,CAMpF;AAED,wBAAgB,wBAAwB,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,QAIlD;AAED,wBAAgB,wBAAwB,CAAC,KAAK,KAAK,KAAK,CAEvD;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,uBAAuB,QAEnE;AAED,wBAAgB,oBAAoB,4BAEnC;AAED,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,wBAAwB,QAEtE;AAED,wBAAgB,qBAAqB,6BAEpC;AAED,wBAAgB,iBAAiB,SAKhC"}
|
package/helpers.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { PlanetApplication } from './planet.class';
|
|
2
2
|
export declare function hashCode(str: string): number;
|
|
3
|
-
export declare function getHTMLElement(selector: string | HTMLElement): HTMLElement;
|
|
3
|
+
export declare function getHTMLElement(selector: string | HTMLElement): HTMLElement | null;
|
|
4
4
|
export declare function getTagNameByTemplate(template: string): string;
|
|
5
5
|
export declare function createElementByTemplate(template: string): HTMLElement;
|
|
6
6
|
export declare function coerceArray<T>(value: T | T[]): T[];
|
|
7
7
|
export declare function isEmpty(value: any): boolean;
|
|
8
|
-
export declare function isFunction(value: any):
|
|
8
|
+
export declare function isFunction(value: any): value is Function;
|
|
9
|
+
export declare function isObject(val: any): boolean;
|
|
9
10
|
/**
|
|
10
11
|
* Get file name from path
|
|
11
12
|
* 1. "main.js" => "main.js"
|
package/helpers.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../packages/planet/src/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAInD,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAY5C;AAED,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,WAAW,GAAG,WAAW,
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../packages/planet/src/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAInD,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAY5C;AAED,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,WAAW,GAAG,WAAW,GAAG,IAAI,CAMjF;AAED,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAG7D;AAED,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,MAAM,eAUvD;AAED,wBAAgB,WAAW,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,EAAE,CAElD;AAED,wBAAgB,OAAO,CAAC,KAAK,EAAE,GAAG,GAAG,OAAO,CAM3C;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,QAAQ,CAGxD;AAED,wBAAgB,QAAQ,CAAC,GAAG,EAAE,GAAG,WAEhC;AACD;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,UAO/C;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,gBAAgB,EAAE,MAAM,EAAE,cAAc,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,UAOxG;AAED;;;;GAIG;AACH,wBAAgB,4BAA4B,CAAC,GAAG,EAAE,iBAAiB,EAAE,cAAc,CAAC,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE;;;EAwB9G"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module.ngfactory.d.ts","sourceRoot":"","sources":["../../packages/planet/src/module.ngfactory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,eAAe,CAAC;AACpC,OAAO,KAAK,EAAE,MAAM,UAAU,CAAC;AAG/B,eAAO,MAAM,wBAAwB,EAAC,EAAE,CAAC,eAAe,CAAC,EAAE,CAAC,eAAe,CAAiB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@worktile/planet",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "12.1.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"peerDependencies": {
|
|
6
|
-
"@angular/common": "^
|
|
7
|
-
"@angular/core": "^
|
|
8
|
-
"@angular/cdk": "^
|
|
6
|
+
"@angular/common": "^12.0.0",
|
|
7
|
+
"@angular/core": "^12.0.0",
|
|
8
|
+
"@angular/cdk": "^12.0.0"
|
|
9
9
|
},
|
|
10
10
|
"main": "bundles/worktile-planet.umd.js",
|
|
11
11
|
"module": "fesm2015/worktile-planet.js",
|
|
@@ -16,6 +16,6 @@
|
|
|
16
16
|
"metadata": "worktile-planet.metadata.json",
|
|
17
17
|
"sideEffects": false,
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"tslib": "^2.
|
|
19
|
+
"tslib": "^2.1.0"
|
|
20
20
|
}
|
|
21
21
|
}
|
package/planet.class.d.ts
CHANGED
package/planet.class.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"planet.class.d.ts","sourceRoot":"","sources":["../../packages/planet/src/planet.class.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,MAAM,WAAW,aAAa;IAC1B,UAAU,CAAC,EAAE,WAAW,CAAC;IACzB,YAAY,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACrC,YAAY,CAAC,EAAE,KAAK,CAAC;CACxB;AAED,MAAM,WAAW,iBAAiB,CAAC,MAAM,GAAG,GAAG;IAC3C,IAAI,EAAE,MAAM,CAAC;IAEb,UAAU,EAAE,MAAM,GAAG,WAAW,CAAC;IAGjC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,gBAAgB,EAAE,MAAM,GAAG,MAAM,CAAC;IAElC,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAE9B,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,UAAU,CAAC,EAAE,WAAW,CAAC;IAEzB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAE5B,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAElB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IAEnB,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,oBAAY,WAAW;IACnB,OAAO,YAAY;IACnB,OAAO,YAAY;CACtB;AAED,MAAM,WAAW,iBAAiB;IAC9B,GAAG,EAAE,MAAM,CAAC;CACf;AAED,QAAA,MAAM,mBAAmB,wCAA+D,CAAC;AAEzF,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
|
|
1
|
+
{"version":3,"file":"planet.class.d.ts","sourceRoot":"","sources":["../../packages/planet/src/planet.class.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,MAAM,WAAW,aAAa;IAC1B,UAAU,CAAC,EAAE,WAAW,CAAC;IACzB,YAAY,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACrC,YAAY,CAAC,EAAE,KAAK,CAAC;CACxB;AAED,MAAM,WAAW,iBAAiB,CAAC,MAAM,GAAG,GAAG;IAC3C,IAAI,EAAE,MAAM,CAAC;IAEb,UAAU,EAAE,MAAM,GAAG,WAAW,CAAC;IAGjC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,gBAAgB,EAAE,MAAM,GAAG,MAAM,CAAC;IAElC,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAE9B,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,UAAU,CAAC,EAAE,WAAW,CAAC;IAEzB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAE5B,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAElB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IAEnB,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,oBAAY,WAAW;IACnB,OAAO,YAAY;IACnB,OAAO,YAAY;CACtB;AAED,MAAM,WAAW,iBAAiB;IAC9B,GAAG,EAAE,MAAM,CAAC;CACf;AAED,QAAA,MAAM,mBAAmB,wCAA+D,CAAC;AAEzF,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
|
package/planet.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export declare class Planet {
|
|
|
11
11
|
get loadingDone(): boolean;
|
|
12
12
|
get appStatusChange(): Observable<AppStatusChangeEvent>;
|
|
13
13
|
get appsLoadingStart(): Observable<AppsLoadingStartEvent>;
|
|
14
|
-
private subscription
|
|
14
|
+
private subscription?;
|
|
15
15
|
constructor(injector: Injector, router: Router, planetApplications: PlanetApplication[]);
|
|
16
16
|
setOptions(options: Partial<PlanetOptions>): void;
|
|
17
17
|
setPortalAppData<T>(data: T): void;
|
package/planet.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"planet.d.ts","sourceRoot":"","sources":["../../packages/planet/src/planet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgC,QAAQ,EAAE,MAAM,eAAe,CAAC;AACvE,OAAO,EAA8B,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAuB,MAAM,gBAAgB,CAAC;AAEvF,OAAO,EAEH,qBAAqB,EACrB,oBAAoB,EACvB,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAE,UAAU,EAAgB,MAAM,MAAM,CAAC;AAWhD,qBAGa,MAAM;IAwBX,OAAO,CAAC,QAAQ;IAChB,OAAO,CAAC,MAAM;IAxBlB,OAAO,KAAK,uBAAuB,GAElC;IAED,OAAO,KAAK,wBAAwB,GAEnC;IAED,IAAW,WAAW,YAErB;IAED,IAAW,eAAe,IAAI,UAAU,CAAC,oBAAoB,CAAC,CAE7D;IAED,IAAW,gBAAgB,IAAI,UAAU,CAAC,qBAAqB,CAAC,CAE/D;IAED,OAAO,CAAC,YAAY,CAAe;
|
|
1
|
+
{"version":3,"file":"planet.d.ts","sourceRoot":"","sources":["../../packages/planet/src/planet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgC,QAAQ,EAAE,MAAM,eAAe,CAAC;AACvE,OAAO,EAA8B,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAuB,MAAM,gBAAgB,CAAC;AAEvF,OAAO,EAEH,qBAAqB,EACrB,oBAAoB,EACvB,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAE,UAAU,EAAgB,MAAM,MAAM,CAAC;AAWhD,qBAGa,MAAM;IAwBX,OAAO,CAAC,QAAQ;IAChB,OAAO,CAAC,MAAM;IAxBlB,OAAO,KAAK,uBAAuB,GAElC;IAED,OAAO,KAAK,wBAAwB,GAEnC;IAED,IAAW,WAAW,YAErB;IAED,IAAW,eAAe,IAAI,UAAU,CAAC,oBAAoB,CAAC,CAE7D;IAED,IAAW,gBAAgB,IAAI,UAAU,CAAC,qBAAqB,CAAC,CAE/D;IAED,OAAO,CAAC,YAAY,CAAC,CAAe;gBAGxB,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,MAAM,EACmB,kBAAkB,EAAE,iBAAiB,EAAE;IAcpF,UAAU,CAAC,OAAO,EAAE,OAAO,CAAC,aAAa,CAAC;IAO1C,gBAAgB,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC;IAI3B,WAAW,CAAC,MAAM,EAAE,GAAG,EAAE,iBAAiB,CAAC,MAAM,CAAC;IAIlD,YAAY,CAAC,MAAM,EAAE,IAAI,EAAE,iBAAiB,CAAC,MAAM,CAAC,EAAE;IAItD,aAAa,CAAC,IAAI,EAAE,MAAM;IAI1B,OAAO;IAIP,KAAK;IAmBL,IAAI;CAGP"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"planet.ngfactory.d.ts","sourceRoot":"","sources":["../../packages/planet/src/planet.ngfactory.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const PLANET_SANDBOX_WINDOW_WHITELIST: any;
|
|
2
|
+
export declare const PLANET_SANDBOX_DOCUMENT_WHITELIST: any;
|
|
3
|
+
export declare const SANDBOX_INSTANCE: unique symbol;
|
|
4
|
+
export declare const RAW_NODE: unique symbol;
|
|
5
|
+
export declare const WINDOW_BIND_FN: unique symbol;
|
|
6
|
+
export declare const DOCUMENT_BIND_FN: unique symbol;
|
|
7
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../packages/planet/src/sandbox/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,+BAA+B,KAAkD,CAAC;AAC/F,eAAO,MAAM,iCAAiC,KAAoD,CAAC;AACnG,eAAO,MAAM,gBAAgB,eAAwC,CAAC;AACtE,eAAO,MAAM,QAAQ,eAAgC,CAAC;AACtD,eAAO,MAAM,cAAc,eAAsC,CAAC;AAClE,eAAO,MAAM,gBAAgB,eAAwC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exec.d.ts","sourceRoot":"","sources":["../../../packages/planet/src/sandbox/exec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAEjC,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,OAAO,QAmB1F"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SandboxOptions } from './sandbox';
|
|
2
|
+
import { ProxySandbox } from './proxy/proxy-sandbox';
|
|
3
|
+
import { SnapshotSandbox } from './snapshot/snapshot-sandbox';
|
|
4
|
+
export { Sandbox } from './sandbox';
|
|
5
|
+
export declare function createSandbox(app: string, options?: SandboxOptions): ProxySandbox | SnapshotSandbox;
|
|
6
|
+
export declare function getSandboxInstance(): any;
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../packages/planet/src/sandbox/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAG9D,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAMpC,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,kCAQlE;AAED,wBAAgB,kBAAkB,QAEjC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"document.d.ts","sourceRoot":"","sources":["../../../../../packages/planet/src/sandbox/proxy/patches/document.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAE/C,wBAAgB,aAAa,IAAI,mBAAmB,CASnD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eventListener.d.ts","sourceRoot":"","sources":["../../../../../packages/planet/src/sandbox/proxy/patches/eventListener.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAGrE,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,oBAAoB,GAAG,mBAAmB,CA6CrF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/planet/src/sandbox/proxy/patches/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAgB,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAQnF,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,oBAAoB,GAAG,mBAAmB,EAAE,CAI5F"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ProxySandboxInstance, SandboxPatchHandler } from '../types';
|
|
2
|
+
export declare class RewriteStorage {
|
|
3
|
+
prefix: string;
|
|
4
|
+
rawStorage: Storage;
|
|
5
|
+
constructor(app: string, rawStorage: Storage);
|
|
6
|
+
get length(): number;
|
|
7
|
+
private getKeys;
|
|
8
|
+
key(n: number): string;
|
|
9
|
+
getItem(key: string): string;
|
|
10
|
+
setItem(key: string, value: string): void;
|
|
11
|
+
removeItem(key: string): void;
|
|
12
|
+
clear(): void;
|
|
13
|
+
}
|
|
14
|
+
export declare function storagePatch(sandbox: ProxySandboxInstance): SandboxPatchHandler;
|
|
15
|
+
//# sourceMappingURL=storage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../../../../packages/planet/src/sandbox/proxy/patches/storage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAIrE,qBAAa,cAAc;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,OAAO,CAAC;gBAER,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO;IAK5C,IAAI,MAAM,WAET;IAED,OAAO,CAAC,OAAO;IAIf,GAAG,CAAC,CAAC,EAAE,MAAM;IAKb,OAAO,CAAC,GAAG,EAAE,MAAM;IAInB,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;IAIlC,UAAU,CAAC,GAAG,EAAE,MAAM;IAItB,KAAK;CAKR;AAED,wBAAgB,YAAY,CAAC,OAAO,EAAE,oBAAoB,GAAG,mBAAmB,CAO/E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"timer.d.ts","sourceRoot":"","sources":["../../../../../packages/planet/src/sandbox/proxy/patches/timer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAO/C,wBAAgB,UAAU,IAAI,mBAAmB,CA0ChD"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare function hasOwnProp(obj: any, key: PropertyKey): boolean;
|
|
2
|
+
export declare function isValueDescriptor(desc?: PropertyDescriptor): boolean;
|
|
3
|
+
export declare function isAccessorDescriptor(desc?: PropertyDescriptor): boolean;
|
|
4
|
+
export declare function isNonWriteableValue(desc?: PropertyDescriptor): boolean;
|
|
5
|
+
export declare function isInvalidSetAccessor(desc?: PropertyDescriptor): boolean;
|
|
6
|
+
export declare function isInvalidGetAccessor(desc?: PropertyDescriptor): boolean;
|
|
7
|
+
export declare function bind(fn: any, context: any): {
|
|
8
|
+
(): any;
|
|
9
|
+
$native: any;
|
|
10
|
+
prototype: any;
|
|
11
|
+
};
|
|
12
|
+
export declare function createFakeObject(target: Record<PropertyKey, any>, writableKeys?: PropertyKey[]): any;
|
|
13
|
+
//# sourceMappingURL=common.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../../packages/planet/src/sandbox/proxy/proxies/common.ts"],"names":[],"mappings":"AAIA,wBAAgB,UAAU,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,WAAW,GAAG,OAAO,CAE9D;AAED,wBAAgB,iBAAiB,CAAC,IAAI,CAAC,EAAE,kBAAkB,WAK1D;AAED,wBAAgB,oBAAoB,CAAC,IAAI,CAAC,EAAE,kBAAkB,WAK7D;AAED,wBAAgB,mBAAmB,CAAC,IAAI,CAAC,EAAE,kBAAkB,WAE5D;AAED,wBAAgB,oBAAoB,CAAC,IAAI,CAAC,EAAE,kBAAkB,WAM7D;AAED,wBAAgB,oBAAoB,CAAC,IAAI,CAAC,EAAE,kBAAkB,WAM7D;AAsBD,wBAAgB,IAAI,CAAC,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG;;;;EA4BzC;AAED,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,CAAC,WAAW,EAAE,GAAG,CAAC,EAAE,YAAY,CAAC,EAAE,WAAW,EAAE,OA4C9F"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare class ProxyDocument {
|
|
2
|
+
constructor();
|
|
3
|
+
private createGetter;
|
|
4
|
+
private createSetter;
|
|
5
|
+
private createDefineProperty;
|
|
6
|
+
create(): {
|
|
7
|
+
document: any;
|
|
8
|
+
Document: {
|
|
9
|
+
(): Document;
|
|
10
|
+
prototype: any;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=document.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"document.d.ts","sourceRoot":"","sources":["../../../../../packages/planet/src/sandbox/proxy/proxies/document.ts"],"names":[],"mappings":"AAcA,qBAAa,aAAa;;IAGtB,OAAO,CAAC,YAAY;IAqCpB,OAAO,CAAC,YAAY;IAiBpB,OAAO,CAAC,oBAAoB;IAQ5B,MAAM;;;;;;;CA4DT"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ProxySandboxInstance } from '../types';
|
|
2
|
+
export declare class ProxyWindow {
|
|
3
|
+
private sandbox;
|
|
4
|
+
constructor(sandbox: ProxySandboxInstance);
|
|
5
|
+
private definedVariables;
|
|
6
|
+
private createGetter;
|
|
7
|
+
private createSetter;
|
|
8
|
+
private createDefineProperty;
|
|
9
|
+
private createDeleteProperty;
|
|
10
|
+
private createHas;
|
|
11
|
+
create(): any;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=window.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"window.d.ts","sourceRoot":"","sources":["../../../../../packages/planet/src/sandbox/proxy/proxies/window.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAqChD,qBAAa,WAAW;IACR,OAAO,CAAC,OAAO;gBAAP,OAAO,EAAE,oBAAoB;IAEjD,OAAO,CAAC,gBAAgB,CAAa;IAErC,OAAO,CAAC,YAAY;IAyCpB,OAAO,CAAC,YAAY;IA8BpB,OAAO,CAAC,oBAAoB;IAc5B,OAAO,CAAC,oBAAoB;IAY5B,OAAO,CAAC,SAAS;IAMjB,MAAM;CAoBT"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Global } from '../types';
|
|
2
|
+
import { Sandbox, SandboxOptions } from '../sandbox';
|
|
3
|
+
export declare class ProxySandbox extends Sandbox {
|
|
4
|
+
app: string;
|
|
5
|
+
options: SandboxOptions;
|
|
6
|
+
running: boolean;
|
|
7
|
+
global: Global;
|
|
8
|
+
rewriteVariables: PropertyKey[];
|
|
9
|
+
private patchHandlers;
|
|
10
|
+
constructor(app: string, options: SandboxOptions);
|
|
11
|
+
start(): void;
|
|
12
|
+
destroy(): void;
|
|
13
|
+
private getPatchRewriteVariables;
|
|
14
|
+
private execPatchHandlers;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=proxy-sandbox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"proxy-sandbox.d.ts","sourceRoot":"","sources":["../../../../packages/planet/src/sandbox/proxy/proxy-sandbox.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAErD,qBAAa,YAAa,SAAQ,OAAO;IASlB,GAAG,EAAE,MAAM;IAAS,OAAO,EAAE,cAAc;IARvD,OAAO,UAAS;IAEhB,MAAM,EAAG,MAAM,CAAC;IAEhB,gBAAgB,EAAG,WAAW,EAAE,CAAC;IAExC,OAAO,CAAC,aAAa,CAA6B;gBAE/B,GAAG,EAAE,MAAM,EAAS,OAAO,EAAE,cAAc;IAM9D,KAAK;IAQL,OAAO;IASP,OAAO,CAAC,wBAAwB;IAMhC,OAAO,CAAC,iBAAiB;CAc5B"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Global } from '../types';
|
|
2
|
+
export interface ProxySandboxInstance {
|
|
3
|
+
app: string;
|
|
4
|
+
running: boolean;
|
|
5
|
+
global: Global;
|
|
6
|
+
rewriteVariables: PropertyKey[];
|
|
7
|
+
}
|
|
8
|
+
export interface SandboxPatchHandler {
|
|
9
|
+
rewrite?: Record<PropertyKey, any>;
|
|
10
|
+
init?: () => void;
|
|
11
|
+
destroy?: () => void;
|
|
12
|
+
}
|
|
13
|
+
export declare type SandboxPatch = (sandbox?: ProxySandboxInstance) => SandboxPatchHandler;
|
|
14
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../packages/planet/src/sandbox/proxy/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAGlC,MAAM,WAAW,oBAAoB;IACjC,GAAG,EAAE,MAAM,CAAC;IAEZ,OAAO,EAAE,OAAO,CAAC;IAEjB,MAAM,EAAE,MAAM,CAAC;IAEf,gBAAgB,EAAE,WAAW,EAAE,CAAC;CACnC;AAED,MAAM,WAAW,mBAAmB;IAChC,OAAO,CAAC,EAAE,MAAM,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC;IACnC,IAAI,CAAC,EAAE,MAAM,IAAI,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB;AAED,oBAAY,YAAY,GAAG,CAAC,OAAO,CAAC,EAAE,oBAAoB,KAAK,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Global } from './types';
|
|
2
|
+
export interface SandboxOptions {
|
|
3
|
+
strictGlobal?: boolean;
|
|
4
|
+
}
|
|
5
|
+
export declare abstract class Sandbox {
|
|
6
|
+
options: SandboxOptions;
|
|
7
|
+
global: Global;
|
|
8
|
+
abstract start(): void;
|
|
9
|
+
abstract destroy(): void;
|
|
10
|
+
execScript(code: string, url?: string): void;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=sandbox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sandbox.d.ts","sourceRoot":"","sources":["../../../packages/planet/src/sandbox/sandbox.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAEjC,MAAM,WAAW,cAAc;IAC3B,YAAY,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,8BAAsB,OAAO;IACzB,OAAO,EAAG,cAAc,CAAC;IAEzB,MAAM,EAAG,MAAM,CAAC;IAEhB,QAAQ,CAAC,KAAK,IAAI,IAAI;IAEtB,QAAQ,CAAC,OAAO,IAAI,IAAI;IAExB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,SAAK;CAGpC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Sandbox, SandboxOptions } from '../sandbox';
|
|
2
|
+
export declare class SnapshotSandbox extends Sandbox {
|
|
3
|
+
app: string;
|
|
4
|
+
options: SandboxOptions;
|
|
5
|
+
constructor(app: string, options: SandboxOptions);
|
|
6
|
+
start(): void;
|
|
7
|
+
destroy(): void;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=snapshot-sandbox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"snapshot-sandbox.d.ts","sourceRoot":"","sources":["../../../../packages/planet/src/sandbox/snapshot/snapshot-sandbox.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAErD,qBAAa,eAAgB,SAAQ,OAAO;IACrB,GAAG,EAAE,MAAM;IAAS,OAAO,EAAE,cAAc;gBAA3C,GAAG,EAAE,MAAM,EAAS,OAAO,EAAE,cAAc;IAK9D,KAAK;IAEL,OAAO;CACV"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../packages/planet/src/sandbox/types.ts"],"names":[],"mappings":"AAAA,oBAAY,MAAM,GAAG,MAAM,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"__symbolic":"module","version":4,"metadata":{"Planet":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":20,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":49,"character":9},"arguments":[{"__symbolic":"reference","name":"PLANET_APPLICATIONS"}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":49,"character":38}}]],"parameters":[{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":47,"character":26},{"__symbolic":"reference","module":"@angular/router","name":"Router","line":48,"character":24},{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"reference","name":"PlanetApplication"}]}]}],"setOptions":[{"__symbolic":"method"}],"setPortalAppData":[{"__symbolic":"method"}],"registerApp":[{"__symbolic":"method"}],"registerApps":[{"__symbolic":"method"}],"unregisterApp":[{"__symbolic":"method"}],"getApps":[{"__symbolic":"method"}],"start":[{"__symbolic":"method"}],"stop":[{"__symbolic":"method"}]},"statics":{"ɵprov":{}}},"GlobalDispatcherEvent":{"__symbolic":"interface"},"GlobalEventDispatcher":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":11,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"addGlobalEventListener":[{"__symbolic":"method"}],"removeGlobalEventListener":[{"__symbolic":"method"}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"NgZone","line":35,"character":32}]}],"dispatch":[{"__symbolic":"method"}],"register":[{"__symbolic":"method"}],"getSubscriptionCount":[{"__symbolic":"method"}]},"statics":{"ɵprov":{}}},"PlanetPortalApplication":{"__symbolic":"class","arity":1,"members":{"navigateByUrl":[{"__symbolic":"method"}],"run":[{"__symbolic":"method"}],"tick":[{"__symbolic":"method"}]}},"PlanetOptions":{"__symbolic":"interface"},"PlanetApplication":{"__symbolic":"interface"},"SwitchModes":{"default":"default","coexist":"coexist"},"PlanetRouterEvent":{"__symbolic":"interface"},"PLANET_APPLICATIONS":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":54,"character":32},"arguments":["PLANET_APPLICATIONS"]},"NgxPlanetModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":5,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"EmptyComponent"}],"entryComponents":[{"__symbolic":"reference","name":"EmptyComponent"}],"imports":[{"__symbolic":"reference","module":"@angular/common/http","name":"HttpClientModule","line":8,"character":14}],"providers":[],"exports":[{"__symbolic":"reference","module":"@angular/common/http","name":"HttpClientModule","line":10,"character":14},{"__symbolic":"reference","name":"EmptyComponent"}]}]}],"members":{},"statics":{"forRoot":{"__symbolic":"function","parameters":["apps"],"value":{"ngModule":{"__symbolic":"reference","name":"NgxPlanetModule"},"providers":[{"provide":{"__symbolic":"reference","name":"PLANET_APPLICATIONS"},"useValue":{"__symbolic":"reference","name":"apps"}}]}}}},"PlanetApplicationRef":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"any"}]}],"syncPortalRouteWhenNavigationEnd":[{"__symbolic":"method"}],"bootstrap":[{"__symbolic":"method"}],"getRouter":[{"__symbolic":"method"}],"getCurrentRouterStateUrl":[{"__symbolic":"method"}],"navigateByUrl":[{"__symbolic":"method"}],"getComponentFactory":[{"__symbolic":"method"}],"registerComponentFactory":[{"__symbolic":"method"}],"destroy":[{"__symbolic":"method"}]}},"ɵa":{"__symbolic":"binop","operator":"=","left":{"__symbolic":"error","message":"Reference to a local symbol","line":6,"character":14,"context":{"name":"window"},"module":"./global-planet"},"right":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"error","message":"Reference to a local symbol","line":6,"character":14,"context":{"name":"window"},"module":"./global-planet"},"right":{"apps":{}}}},"defineApplication":{"__symbolic":"function"},"getPortalApplicationData":{"__symbolic":"function","parameters":[],"value":{"__symbolic":"select","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"ɵa"},"member":"portalApplication"},"member":"data"}},"getPlanetApplicationRef":{"__symbolic":"function"},"PlanetApplicationService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":9,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/common/http","name":"HttpClient","line":17,"character":30},{"__symbolic":"reference","name":"AssetsLoader"}]}],"register":[{"__symbolic":"method"}],"registerByUrl":[{"__symbolic":"method"}],"unregister":[{"__symbolic":"method"}],"getAppsByMatchedUrl":[{"__symbolic":"method"}],"getAppByName":[{"__symbolic":"method"}],"getAppsToPreload":[{"__symbolic":"method"}],"getApps":[{"__symbolic":"method"}]},"statics":{"ɵprov":{}}},"ApplicationStatus":{"assetsLoading":1,"assetsLoaded":2,"bootstrapping":3,"bootstrapped":4,"active":5,"loadError":10},"AppsLoadingStartEvent":{"__symbolic":"interface"},"AppStatusChangeEvent":{"__symbolic":"interface"},"PlanetApplicationLoader":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":34,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"AssetsLoader"},{"__symbolic":"reference","name":"PlanetApplicationService"},{"__symbolic":"reference","module":"@angular/core","name":"NgZone","line":69,"character":24},{"__symbolic":"reference","module":"@angular/router","name":"Router","line":70,"character":16},{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":71,"character":18},{"__symbolic":"reference","module":"@angular/core","name":"ApplicationRef","line":72,"character":24}]}],"setAppStatus":[{"__symbolic":"method"}],"getAppStatusChange$":[{"__symbolic":"method"}],"switchModeIsCoexist":[{"__symbolic":"method"}],"errorHandler":[{"__symbolic":"method"}],"setLoadingDone":[{"__symbolic":"method"}],"getAppNames":[{"__symbolic":"method"}],"setupRouteChange":[{"__symbolic":"method"}],"startLoadAppAssets":[{"__symbolic":"method"}],"hideApp":[{"__symbolic":"method"}],"showApp":[{"__symbolic":"method"}],"destroyApp":[{"__symbolic":"method"}],"bootstrapApp":[{"__symbolic":"method"}],"getUnloadApps":[{"__symbolic":"method"}],"unloadApps":[{"__symbolic":"method"}],"preloadApps":[{"__symbolic":"method"}],"ensurePreloadApps":[{"__symbolic":"method"}],"setOptions":[{"__symbolic":"method"}],"reroute":[{"__symbolic":"method"}],"preloadInternal":[{"__symbolic":"method"}],"preload":[{"__symbolic":"method"}]},"statics":{"ɵprov":{}}},"AssetsLoadResult":{"__symbolic":"interface"},"AssetsLoader":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":14,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/common/http","name":"HttpClient","line":20,"character":30}]}],"loadScript":[{"__symbolic":"method"}],"loadStyle":[{"__symbolic":"method"}],"loadScripts":[{"__symbolic":"method"}],"loadStyles":[{"__symbolic":"method"}],"loadScriptsAndStyles":[{"__symbolic":"method"}],"loadAppAssets":[{"__symbolic":"method"}],"loadManifest":[{"__symbolic":"method"}]},"statics":{"ɵprov":{}}},"PlanetComponent":{"__symbolic":"interface"},"PlanetComponentLoader":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":18,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":36,"character":9},"arguments":[{"__symbolic":"reference","module":"@angular/common","name":"DOCUMENT","line":36,"character":16}]}]],"parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ApplicationRef","line":33,"character":32},{"__symbolic":"reference","name":"NgModuleRef","module":"@angular/core","arguments":[{"__symbolic":"reference","name":"any"}]},{"__symbolic":"reference","module":"@angular/core","name":"NgZone","line":35,"character":24},{"__symbolic":"reference","name":"any"}]}],"getPlantAppRef":[{"__symbolic":"method"}],"createInjector":[{"__symbolic":"method"}],"getContainerElement":[{"__symbolic":"method"}],"createWrapperElement":[{"__symbolic":"method"}],"attachComponent":[{"__symbolic":"method"}],"registerComponentFactory":[{"__symbolic":"method"}],"register":[{"__symbolic":"method"}],"load":[{"__symbolic":"method"}]},"statics":{"ɵprov":{}}},"PlanetComponentRef":{"__symbolic":"class","arity":1,"members":{}},"PlantComponentConfig":{"__symbolic":"class","arity":1,"members":{}},"EmptyComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":2,"character":1},"arguments":[{"selector":"empty-component","template":""}]}],"members":{}}},"origins":{"Planet":"./planet","GlobalDispatcherEvent":"./global-event-dispatcher","GlobalEventDispatcher":"./global-event-dispatcher","PlanetPortalApplication":"./application/portal-application","PlanetOptions":"./planet.class","PlanetApplication":"./planet.class","SwitchModes":"./planet.class","PlanetRouterEvent":"./planet.class","PLANET_APPLICATIONS":"./planet.class","NgxPlanetModule":"./module","PlanetApplicationRef":"./application/planet-application-ref","ɵa":"./global-planet","defineApplication":"./global-planet","getPortalApplicationData":"./global-planet","getPlanetApplicationRef":"./global-planet","PlanetApplicationService":"./application/planet-application.service","ApplicationStatus":"./application/planet-application-loader","AppsLoadingStartEvent":"./application/planet-application-loader","AppStatusChangeEvent":"./application/planet-application-loader","PlanetApplicationLoader":"./application/planet-application-loader","AssetsLoadResult":"./assets-loader","AssetsLoader":"./assets-loader","PlanetComponent":"./component/planet-component-loader","PlanetComponentLoader":"./component/planet-component-loader","PlanetComponentRef":"./component/planet-component-ref","PlantComponentConfig":"./component/plant-component.config","EmptyComponent":"./empty/empty.component"},"importAs":"@worktile/planet"}
|
|
1
|
+
{"__symbolic":"module","version":4,"metadata":{"Planet":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":20,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":49,"character":9},"arguments":[{"__symbolic":"reference","name":"PLANET_APPLICATIONS"}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":49,"character":38}}]],"parameters":[{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":47,"character":26},{"__symbolic":"reference","module":"@angular/router","name":"Router","line":48,"character":24},{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"reference","name":"PlanetApplication"}]}]}],"setOptions":[{"__symbolic":"method"}],"setPortalAppData":[{"__symbolic":"method"}],"registerApp":[{"__symbolic":"method"}],"registerApps":[{"__symbolic":"method"}],"unregisterApp":[{"__symbolic":"method"}],"getApps":[{"__symbolic":"method"}],"start":[{"__symbolic":"method"}],"stop":[{"__symbolic":"method"}]},"statics":{"ɵprov":{}}},"GlobalDispatcherEvent":{"__symbolic":"interface"},"GlobalEventDispatcher":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":11,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"addGlobalEventListener":[{"__symbolic":"method"}],"removeGlobalEventListener":[{"__symbolic":"method"}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"NgZone","line":35,"character":32}]}],"dispatch":[{"__symbolic":"method"}],"register":[{"__symbolic":"method"}],"getSubscriptionCount":[{"__symbolic":"method"}]},"statics":{"ɵprov":{}}},"PlanetPortalApplication":{"__symbolic":"class","arity":1,"members":{"navigateByUrl":[{"__symbolic":"method"}],"run":[{"__symbolic":"method"}],"tick":[{"__symbolic":"method"}]}},"PlanetOptions":{"__symbolic":"interface"},"PlanetApplication":{"__symbolic":"interface"},"SwitchModes":{"default":"default","coexist":"coexist"},"PlanetRouterEvent":{"__symbolic":"interface"},"PLANET_APPLICATIONS":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":56,"character":32},"arguments":["PLANET_APPLICATIONS"]},"NgxPlanetModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":5,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"EmptyComponent"}],"entryComponents":[{"__symbolic":"reference","name":"EmptyComponent"}],"imports":[{"__symbolic":"reference","module":"@angular/common/http","name":"HttpClientModule","line":8,"character":14}],"providers":[],"exports":[{"__symbolic":"reference","module":"@angular/common/http","name":"HttpClientModule","line":10,"character":14},{"__symbolic":"reference","name":"EmptyComponent"}]}]}],"members":{},"statics":{"forRoot":{"__symbolic":"function","parameters":["apps"],"value":{"ngModule":{"__symbolic":"reference","name":"NgxPlanetModule"},"providers":[{"provide":{"__symbolic":"reference","name":"PLANET_APPLICATIONS"},"useValue":{"__symbolic":"reference","name":"apps"}}]}}}},"PlanetApplicationRef":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"any"}]}],"syncPortalRouteWhenNavigationEnd":[{"__symbolic":"method"}],"bootstrap":[{"__symbolic":"method"}],"getRouter":[{"__symbolic":"method"}],"getCurrentRouterStateUrl":[{"__symbolic":"method"}],"navigateByUrl":[{"__symbolic":"method"}],"getComponentFactory":[{"__symbolic":"method"}],"registerComponentFactory":[{"__symbolic":"method"}],"destroy":[{"__symbolic":"method"}]}},"ɵa":{"__symbolic":"binop","operator":"=","left":{"__symbolic":"error","message":"Reference to a local symbol","line":6,"character":14,"context":{"name":"window"},"module":"./global-planet"},"right":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"error","message":"Reference to a local symbol","line":6,"character":14,"context":{"name":"window"},"module":"./global-planet"},"right":{"apps":{}}}},"defineApplication":{"__symbolic":"function"},"getPortalApplicationData":{"__symbolic":"function","parameters":[],"value":{"__symbolic":"select","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"ɵa"},"member":"portalApplication"},"member":"data"}},"getPlanetApplicationRef":{"__symbolic":"function"},"PlanetApplicationService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":9,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/common/http","name":"HttpClient","line":17,"character":30},{"__symbolic":"reference","name":"AssetsLoader"}]}],"register":[{"__symbolic":"method"}],"registerByUrl":[{"__symbolic":"method"}],"unregister":[{"__symbolic":"method"}],"getAppsByMatchedUrl":[{"__symbolic":"method"}],"getAppByName":[{"__symbolic":"method"}],"getAppsToPreload":[{"__symbolic":"method"}],"getApps":[{"__symbolic":"method"}]},"statics":{"ɵprov":{}}},"ApplicationStatus":{"assetsLoading":1,"assetsLoaded":2,"bootstrapping":3,"bootstrapped":4,"active":5,"loadError":10},"AppsLoadingStartEvent":{"__symbolic":"interface"},"AppStatusChangeEvent":{"__symbolic":"interface"},"PlanetApplicationLoader":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":34,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"AssetsLoader"},{"__symbolic":"reference","name":"PlanetApplicationService"},{"__symbolic":"reference","module":"@angular/core","name":"NgZone","line":69,"character":24},{"__symbolic":"reference","module":"@angular/router","name":"Router","line":70,"character":16},{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":71,"character":18},{"__symbolic":"reference","module":"@angular/core","name":"ApplicationRef","line":72,"character":24}]}],"setAppStatus":[{"__symbolic":"method"}],"getAppStatusChange$":[{"__symbolic":"method"}],"switchModeIsCoexist":[{"__symbolic":"method"}],"errorHandler":[{"__symbolic":"method"}],"setLoadingDone":[{"__symbolic":"method"}],"getAppNames":[{"__symbolic":"method"}],"setupRouteChange":[{"__symbolic":"method"}],"startLoadAppAssets":[{"__symbolic":"method"}],"hideApp":[{"__symbolic":"method"}],"showApp":[{"__symbolic":"method"}],"destroyApp":[{"__symbolic":"method"}],"bootstrapApp":[{"__symbolic":"method"}],"getUnloadApps":[{"__symbolic":"method"}],"unloadApps":[{"__symbolic":"method"}],"preloadApps":[{"__symbolic":"method"}],"ensurePreloadApps":[{"__symbolic":"method"}],"setOptions":[{"__symbolic":"method"}],"reroute":[{"__symbolic":"method"}],"preloadInternal":[{"__symbolic":"method"}],"preload":[{"__symbolic":"method"}]},"statics":{"ɵprov":{}}},"AssetsLoadResult":{"__symbolic":"interface"},"AssetsLoader":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":15,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/common/http","name":"HttpClient","line":21,"character":30}]}],"loadScript":[{"__symbolic":"method"}],"loadScriptWithSandbox":[{"__symbolic":"method"}],"loadStyle":[{"__symbolic":"method"}],"loadScripts":[{"__symbolic":"method"}],"loadStyles":[{"__symbolic":"method"}],"loadScriptsAndStyles":[{"__symbolic":"method"}],"loadAppAssets":[{"__symbolic":"method"}],"loadManifest":[{"__symbolic":"method"}]},"statics":{"ɵprov":{}}},"PlanetComponent":{"__symbolic":"interface"},"PlanetComponentLoader":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":18,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":36,"character":9},"arguments":[{"__symbolic":"reference","module":"@angular/common","name":"DOCUMENT","line":36,"character":16}]}]],"parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ApplicationRef","line":33,"character":32},{"__symbolic":"reference","name":"NgModuleRef","module":"@angular/core","arguments":[{"__symbolic":"reference","name":"any"}]},{"__symbolic":"reference","module":"@angular/core","name":"NgZone","line":35,"character":24},{"__symbolic":"reference","name":"any"}]}],"getPlantAppRef":[{"__symbolic":"method"}],"createInjector":[{"__symbolic":"method"}],"getContainerElement":[{"__symbolic":"method"}],"createWrapperElement":[{"__symbolic":"method"}],"attachComponent":[{"__symbolic":"method"}],"registerComponentFactory":[{"__symbolic":"method"}],"register":[{"__symbolic":"method"}],"load":[{"__symbolic":"method"}]},"statics":{"ɵprov":{}}},"PlanetComponentRef":{"__symbolic":"class","arity":1,"members":{}},"PlantComponentConfig":{"__symbolic":"class","arity":1,"members":{}},"EmptyComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":2,"character":1},"arguments":[{"selector":"empty-component","template":""}]}],"members":{}}},"origins":{"Planet":"./planet","GlobalDispatcherEvent":"./global-event-dispatcher","GlobalEventDispatcher":"./global-event-dispatcher","PlanetPortalApplication":"./application/portal-application","PlanetOptions":"./planet.class","PlanetApplication":"./planet.class","SwitchModes":"./planet.class","PlanetRouterEvent":"./planet.class","PLANET_APPLICATIONS":"./planet.class","NgxPlanetModule":"./module","PlanetApplicationRef":"./application/planet-application-ref","ɵa":"./global-planet","defineApplication":"./global-planet","getPortalApplicationData":"./global-planet","getPlanetApplicationRef":"./global-planet","PlanetApplicationService":"./application/planet-application.service","ApplicationStatus":"./application/planet-application-loader","AppsLoadingStartEvent":"./application/planet-application-loader","AppStatusChangeEvent":"./application/planet-application-loader","PlanetApplicationLoader":"./application/planet-application-loader","AssetsLoadResult":"./assets-loader","AssetsLoader":"./assets-loader","PlanetComponent":"./component/planet-component-loader","PlanetComponentLoader":"./component/planet-component-loader","PlanetComponentRef":"./component/planet-component-ref","PlantComponentConfig":"./component/plant-component.config","EmptyComponent":"./empty/empty.component"},"importAs":"@worktile/planet"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/router"),require("@angular/common/http"),require("rxjs/operators"),require("rxjs"),require("@angular/cdk/portal"),require("@angular/common")):"function"==typeof define&&define.amd?define("@worktile/planet",["exports","@angular/core","@angular/router","@angular/common/http","rxjs/operators","rxjs","@angular/cdk/portal","@angular/common"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).worktile=t.worktile||{},t.worktile.planet={}),t.ng.core,t.ng.router,t.ng.common.http,t.rxjs.operators,t.rxjs,t.ng.cdk.portal,t.ng.common)}(this,(function(t,e,n,o,r,a,i,p){"use strict";function s(t){if(t&&t.__esModule)return t;var e=Object.create(null);return t&&Object.keys(t).forEach((function(n){if("default"!==n){var o=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,o.get?o:{enumerable:!0,get:function(){return t[n]}})}})),e.default=t,Object.freeze(e)}var u,c=s(e),l=s(n),d=s(o),f=s(p);t.SwitchModes=void 0,(u=t.SwitchModes||(t.SwitchModes={})).default="default",u.coexist="coexist";var h=new e.InjectionToken("PLANET_APPLICATIONS");function g(t){var e=0;if(0===t.length)return e;for(var n=0;n<t.length;n++)e=(e<<5)-e+t.charCodeAt(n),e|=0;return e}function y(t){return t instanceof HTMLElement?t:document.querySelector(t)}function m(t){if(!t)return null;var e=document.createRange().createContextualFragment(t).firstChild;if(1===e.nodeType)return e;throw new Error("invalid template '"+t+"'")}function v(t){return Array.isArray(t)?t:[t]}function A(t){return!t||0===t.length}function b(t){return!!t&&"function"===typeof t}function S(t,e){var n,o,r=(o=(n=t).lastIndexOf("/"))>=0?n.slice(o+1):n;return e[r]?t.replace(r,e[r]):t}function w(t,e){var n=t.scripts||[],o=t.styles||[];return e&&(n=n.map((function(t){return S(t,e)})),o=o.map((function(t){return S(t,e)}))),t.resourcePathPrefix&&(n=n.map((function(e){return""+t.resourcePathPrefix+e})),o=o.map((function(e){return""+t.resourcePathPrefix+e}))),{scripts:n,styles:o}}
|
|
2
|
-
/*! *****************************************************************************
|
|
3
|
-
Copyright (c) Microsoft Corporation.
|
|
4
|
-
|
|
5
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
6
|
-
purpose with or without fee is hereby granted.
|
|
7
|
-
|
|
8
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
9
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
10
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
11
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
12
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
13
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
14
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
15
|
-
***************************************************************************** */Object.create;function C(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var o,r,a=n.call(t),i=[];try{for(;(void 0===e||e-- >0)&&!(o=a.next()).done;)i.push(o.value)}catch(t){r={error:t}}finally{try{o&&!o.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return i}function j(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(C(arguments[e]));return t}Object.create;var L=function(){function t(t){this.http=t,this.loadedSources=[]}return t.prototype.loadScript=function(t){var e=this,n=g(t);return this.loadedSources.includes(n)?a.of({src:t,hashCode:n,loaded:!0,status:"Loaded"}):new a.Observable((function(o){var r=document.createElement("script");r.type="text/javascript",r.src=t,r.async=!0,r.readyState?r.onreadystatechange=function(){"loaded"!==r.readyState&&"complete"!==r.readyState||(r.onreadystatechange=null,o.next({src:t,hashCode:n,loaded:!0,status:"Loaded"}),o.complete(),e.loadedSources.push(n))}:r.onload=function(){o.next({src:t,hashCode:n,loaded:!0,status:"Loaded"}),o.complete(),e.loadedSources.push(n)},r.onerror=function(e){o.error({src:t,hashCode:n,loaded:!1,status:"Error",error:e}),o.complete()},document.body.appendChild(r)}))},t.prototype.loadStyle=function(t){var e=this,n=g(t);return this.loadedSources.includes(n)?a.of({src:t,hashCode:n,loaded:!0,status:"Loaded"}):new a.Observable((function(o){var r=document.getElementsByTagName("head")[0],a=document.createElement("link");a.rel="stylesheet",a.type="text/css",a.href=t,a.media="all",a.onload=function(){o.next({src:t,hashCode:n,loaded:!0,status:"Loaded"}),o.complete(),e.loadedSources.push(n)},a.onerror=function(e){o.error({src:t,hashCode:n,loaded:!0,status:"Loaded",error:e}),o.complete()},r.appendChild(a)}))},t.prototype.loadScripts=function(t,e){var n=this;if(void 0===e&&(e=!1),A(t))return a.of(null);var o=t.map((function(t){return n.loadScript(t)}));return e?a.concat.apply(void 0,j(o)).pipe(r.map((function(t){return a.of([t])})),r.concatAll()):a.forkJoin(o).pipe()},t.prototype.loadStyles=function(t){var e=this;return A(t)?a.of(null):a.forkJoin(t.map((function(t){return e.loadStyle(t)})))},t.prototype.loadScriptsAndStyles=function(t,e,n){return void 0===t&&(t=[]),void 0===e&&(e=[]),void 0===n&&(n=!1),a.forkJoin([this.loadScripts(t,n),this.loadStyles(e)])},t.prototype.loadAppAssets=function(t){var e=this;if(t.manifest)return this.loadManifest(t.manifest+"?t="+(new Date).getTime()).pipe(r.switchMap((function(n){var o=w(t,n),r=o.scripts,a=o.styles;return e.loadScriptsAndStyles(r,a,t.loadSerial)})));var n=w(t),o=n.scripts,a=n.styles;return this.loadScriptsAndStyles(o,a,t.loadSerial)},t.prototype.loadManifest=function(t){return this.http.get(t).pipe(r.map((function(t){return t})))},t}();L.ɵprov=c.ɵɵdefineInjectable({factory:function(){return new L(c.ɵɵinject(d.HttpClient))},token:L,providedIn:"root"}),L.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],L.ctorParameters=function(){return[{type:o.HttpClient}]};var P=function(){function t(t,e){var n,o;this.name=t,e&&(this.template=e.template,this.innerSelector=this.template?(n=this.template,(o=m(n))?o.nodeName:null):null,this.appModuleBootstrap=e.bootstrap)}return Object.defineProperty(t.prototype,"selector",{get:function(){return this.innerSelector},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"bootstrapped",{get:function(){return!!this.appModuleRef},enumerable:!1,configurable:!0}),t.prototype.syncPortalRouteWhenNavigationEnd=function(){var t=this,o=this.appModuleRef.injector.get(n.Router),a=this.appModuleRef.injector.get(e.NgZone);o&&o.events.subscribe((function(e){e instanceof n.NavigationEnd&&a.onStable.asObservable().pipe(r.take(1)).subscribe((function(){t.portalApp.router.navigateByUrl(e.url)}))}))},t.prototype.bootstrap=function(t){var e=this;if(!this.appModuleBootstrap)throw new Error("app("+this.name+") is not defined");return this.portalApp=t,a.from(this.appModuleBootstrap(t).then((function(t){return e.appModuleRef=t,e.appModuleRef.instance.appName=e.name,e.syncPortalRouteWhenNavigationEnd(),e})))},t.prototype.getRouter=function(){return this.appModuleRef.injector.get(n.Router)},t.prototype.getCurrentRouterStateUrl=function(){return this.getRouter().routerState.snapshot.url},t.prototype.navigateByUrl=function(t){var n=this.appModuleRef.injector.get(e.NgZone),o=this.getRouter();n.run((function(){o.navigateByUrl(t)}))},t.prototype.getComponentFactory=function(){return this.componentFactory},t.prototype.registerComponentFactory=function(t){this.componentFactory=t},t.prototype.destroy=function(){if(this.appModuleRef){var t=this.appModuleRef.injector.get(n.Router);t&&t.dispose(),this.appModuleRef.destroy(),delete this.appModuleRef}},t}(),E=window.planet=window.planet||{apps:{}};function R(t){return E&&E.apps&&E.apps[t]?E.apps[t]:null}function M(){return E.applicationLoader}function O(){return E.applicationService}var I=function(){function t(t,e){if(this.http=t,this.assetsLoader=e,this.apps=[],this.appsMap={},O())throw new Error("PlanetApplicationService has been injected in the portal, repeated injection is not allowed")}return t.prototype.register=function(t){var e=this;v(t).forEach((function(t){if(e.appsMap[t.name])throw new Error(t.name+" has be registered.");e.apps.push(t),e.appsMap[t.name]=t}))},t.prototype.registerByUrl=function(t){var e=this,n=this.http.get(""+t).pipe(r.map((function(t){t&&Array.isArray(t),e.register(t)})),r.shareReplay());return n.subscribe(),n},t.prototype.unregister=function(t){this.appsMap[t]&&(delete this.appsMap[t],this.apps=this.apps.filter((function(e){return e.name!==t})))},t.prototype.getAppsByMatchedUrl=function(t){return this.getApps().filter((function(e){return e.routerPathPrefix instanceof RegExp?e.routerPathPrefix.test(t):t.startsWith(e.routerPathPrefix)}))},t.prototype.getAppByName=function(t){return this.appsMap[t]},t.prototype.getAppsToPreload=function(t){return this.getApps().filter((function(e){return t?e.preload&&!t.includes(e.name):e.preload}))},t.prototype.getApps=function(){return this.apps},t}();I.ɵprov=c.ɵɵdefineInjectable({factory:function(){return new I(c.ɵɵinject(d.HttpClient),c.ɵɵinject(L))},token:I,providedIn:"root"}),I.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],I.ctorParameters=function(){return[{type:o.HttpClient},{type:L}]};var x,N=function(){function t(){}return t.prototype.navigateByUrl=function(t,e){var n=this;return this.ngZone.run((function(){return n.router.navigateByUrl(t,e)}))},t.prototype.run=function(t){return this.ngZone.run((function(){return t()}))},t.prototype.tick=function(){this.applicationRef.tick()},t}(),k="PLANET_GLOBAL_EVENT_DISPATCHER",T=function(){function t(t){var e=this;this.ngZone=t,this.subject$=new a.Subject,this.hasAddGlobalEventListener=!1,this.subscriptionCount=0,this.globalEventListener=function(t){e.subject$.next(t.detail)}}return t.prototype.addGlobalEventListener=function(){this.hasAddGlobalEventListener=!0,window.addEventListener(k,this.globalEventListener)},t.prototype.removeGlobalEventListener=function(){this.hasAddGlobalEventListener=!1,window.removeEventListener(k,this.globalEventListener)},t.prototype.dispatch=function(t,e){window.dispatchEvent(new CustomEvent(k,{detail:{name:t,payload:e}}))},t.prototype.register=function(t){var e=this;return new a.Observable((function(n){e.hasAddGlobalEventListener||e.addGlobalEventListener(),e.subscriptionCount++;var o=e.subject$.pipe(r.filter((function(e){return e.name===t})),r.map((function(t){return t.payload}))).subscribe((function(t){e.ngZone.run((function(){n.next(t)}))}));return function(){e.subscriptionCount--,o.unsubscribe(),e.subscriptionCount||e.removeGlobalEventListener()}}))},t.prototype.getSubscriptionCount=function(){return this.subscriptionCount},t}();T.ɵprov=c.ɵɵdefineInjectable({factory:function(){return new T(c.ɵɵinject(c.NgZone))},token:T,providedIn:"root"}),T.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],T.ctorParameters=function(){return[{type:e.NgZone}]};var Z={};function U(t){if(t&&!b(t))throw new Error("debug factory type is invalid, must be function");x=t}var D,B,$=(D="planet:"+"app-loader",function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(x){var o=Z[D];o||(o=x(D),Z[D]=o),o(t,e)}});t.ApplicationStatus=void 0,(B=t.ApplicationStatus||(t.ApplicationStatus={}))[B.assetsLoading=1]="assetsLoading",B[B.assetsLoaded=2]="assetsLoaded",B[B.bootstrapping=3]="bootstrapping",B[B.bootstrapped=4]="bootstrapped",B[B.active=5]="active",B[B.loadError=10]="loadError";var _=function(){function e(e,n,o,r,i,p){if(this.assetsLoader=e,this.planetApplicationService=n,this.ngZone=o,this.firstLoad=!0,this.inProgressAppAssetsLoads=new Map,this.appsStatus=new Map,this.portalApp=new N,this.routeChange$=new a.Subject,this.appStatusChange$=new a.Subject,this.appsLoadingStart$=new a.Subject,this.loadingDone=!1,M())throw new Error("PlanetApplicationLoader has been injected in the portal, repeated injection is not allowed");this.options={switchMode:t.SwitchModes.default,errorHandler:function(t){console.error(t)}},this.portalApp.ngZone=o,this.portalApp.applicationRef=p,this.portalApp.router=r,this.portalApp.injector=i,this.portalApp.globalEventDispatcher=i.get(T),E.portalApplication=this.portalApp,this.setupRouteChange()}return Object.defineProperty(e.prototype,"appStatusChange",{get:function(){return this.appStatusChange$.asObservable()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"appsLoadingStart",{get:function(){return this.appsLoadingStart$.asObservable()},enumerable:!1,configurable:!0}),e.prototype.setAppStatus=function(e,n){var o=this;this.ngZone.run((function(){var r=o.appsStatus.get(e);$("app("+e.name+") status change: "+(r?t.ApplicationStatus[r]:"empty")+" => "+t.ApplicationStatus[n]),o.appsStatus.set(e,n),o.appStatusChange$.next({app:e,status:n})}))},e.prototype.getAppStatusChange$=function(e,n){return void 0===n&&(n=t.ApplicationStatus.bootstrapped),this.appStatusChange.pipe(r.filter((function(t){return t.app===e&&t.status===n})),r.map((function(){return e})))},e.prototype.switchModeIsCoexist=function(e){return e&&e.switchMode?e.switchMode===t.SwitchModes.coexist:this.options.switchMode===t.SwitchModes.coexist},e.prototype.errorHandler=function(t){var e=this;this.ngZone.run((function(){e.options.errorHandler(t)}))},e.prototype.setLoadingDone=function(){var t=this;this.ngZone.run((function(){t.loadingDone=!0}))},e.prototype.getAppNames=function(t){return 0===t.length?"[]":t.map((function(t){return t.name}))},e.prototype.setupRouteChange=function(){var e=this;this.routeChange$.pipe(r.distinctUntilChanged((function(t,e){return(t&&t.url)===(e&&e.url)})),r.switchMap((function(n){return a.of(n).pipe(r.map((function(){$("route change, url is: "+n.url),e.startRouteChangeEvent=n;var t=e.planetApplicationService.getAppsByMatchedUrl(n.url);$("should load apps: "+e.getAppNames(t));var o=e.getUnloadApps(t);return e.appsLoadingStart$.next({shouldLoadApps:t,shouldUnloadApps:o}),e.unloadApps(o,n),$("unload apps: "+e.getAppNames(o)),t})),r.switchMap((function(n){var o=!1,r=n.map((function(n){var r=e.appsStatus.get(n);return r&&r!==t.ApplicationStatus.assetsLoading&&r!==t.ApplicationStatus.loadError?a.of(n):($("app("+n.name+") status is "+t.ApplicationStatus[r]+", start load assets"),o=!0,e.ngZone.runOutsideAngular((function(){return e.startLoadAppAssets(n)})))}));return o&&(e.loadingDone=!1),r.length>0?a.forkJoin(r):a.of([])})),r.map((function(o){var i=o.map((function(o){return a.of(o).pipe(r.switchMap((function(o){var i,p=e.appsStatus.get(o);return p===t.ApplicationStatus.bootstrapped?($("[routeChange] app("+o.name+") status is bootstrapped, show app and active"),e.showApp(o),(i=R(o.name)).navigateByUrl(n.url),e.setAppStatus(o,t.ApplicationStatus.active),e.setLoadingDone(),a.of(o)):p===t.ApplicationStatus.assetsLoaded?($("[routeChange] app("+o.name+") status is assetsLoaded, start bootstrapping"),e.bootstrapApp(o).pipe(r.map((function(){return $("app("+o.name+") bootstrapped success, active it"),e.setAppStatus(o,t.ApplicationStatus.active),e.setLoadingDone(),o})))):p===t.ApplicationStatus.active?($("[routeChange] app("+o.name+") is active, do nothings"),((i=R(o.name)).getCurrentRouterStateUrl?i.getCurrentRouterStateUrl():"")!==n.url&&i.navigateByUrl(n.url),a.of(o)):($("[routeChange] app("+o.name+") status is "+t.ApplicationStatus[p]),e.getAppStatusChange$(o).pipe(r.take(1),r.map((function(){return $("app("+o.name+") status is bootstrapped by subscribe status change, active it"),e.setAppStatus(o,t.ApplicationStatus.active),e.showApp(o),o}))))})))}));i.length>0?($("start load and active apps: "+e.getAppNames(o)),setTimeout((function(){e.startRouteChangeEvent===n&&e.ngZone.runOutsideAngular((function(){a.forkJoin(i).subscribe((function(){e.setLoadingDone(),e.ensurePreloadApps(o)}))}))}))):($("no apps need to be loaded, ensure preload apps"),e.ensurePreloadApps(o),e.setLoadingDone())})),r.catchError((function(t){return $("apps loader error: "+t),e.errorHandler(t),[]})))}))).subscribe()},e.prototype.startLoadAppAssets=function(e){var n=this;if(this.inProgressAppAssetsLoads.get(e.name))return this.inProgressAppAssetsLoads.get(e.name);var o=this.assetsLoader.loadAppAssets(e).pipe(r.tap((function(){n.inProgressAppAssetsLoads.delete(e.name),n.setAppStatus(e,t.ApplicationStatus.assetsLoaded)})),r.map((function(){return e})),r.catchError((function(o){throw n.inProgressAppAssetsLoads.delete(e.name),n.setAppStatus(e,t.ApplicationStatus.loadError),o})),r.share());return this.inProgressAppAssetsLoads.set(e.name,o),this.setAppStatus(e,t.ApplicationStatus.assetsLoading),o},e.prototype.hideApp=function(t){var e=R(t.name),n=document.querySelector(e.selector||t.selector);n&&n.setAttribute("style","display:none;")},e.prototype.showApp=function(t){var e=R(t.name),n=document.querySelector(e.selector||t.selector);n&&n.setAttribute("style","")},e.prototype.destroyApp=function(t){var e=R(t.name);e&&e.destroy();var n=y(t.hostParent),o=n.querySelector(e&&e.selector||t.selector);o&&n.removeChild(o)},e.prototype.bootstrapApp=function(e,n){var o,i,p=this;void 0===n&&(n="display"),$("app("+e.name+") start bootstrapping"),this.setAppStatus(e,t.ApplicationStatus.bootstrapping);var s=R(e.name);if(s&&s.bootstrap){var u,c=y(e.hostParent);c&&((u=c.querySelector(s.selector||e.selector))||((u=s.template?m(s.template):document.createElement(e.selector)).setAttribute("style","display:none;"),e.hostClass&&(o=u.classList).add.apply(o,j(v(e.hostClass))),e.stylePrefix&&(i=u.classList).add.apply(i,j(v(e.stylePrefix))),c.appendChild(u)));var l=s.bootstrap(this.portalApp);return l.then&&(l=a.from(l)),l.pipe(r.tap((function(){$("app("+e.name+") bootstrapped success for "+n),p.setAppStatus(e,t.ApplicationStatus.bootstrapped),"display"===n&&u&&u.removeAttribute("style")})),r.map((function(){return s})))}throw new Error("["+e.name+"] not found, make sure that the app has the correct name defined use defineApplication("+e.name+") and runtimeChunk and vendorChunk are set to true, details see https://github.com/worktile/ngx-planet#throw-error-cannot-read-property-call-of-undefined-at-__webpack_require__-bootstrap79")},e.prototype.getUnloadApps=function(e){var n=[];return this.appsStatus.forEach((function(o,r){o!==t.ApplicationStatus.active||e.find((function(t){return t.name===r.name}))||n.push(r)})),n},e.prototype.unloadApps=function(e,n){var o=this,r=[],a=[];e.forEach((function(e){o.switchModeIsCoexist(e)?($("hide app("+e.name+") for coexist mode"),r.push(e),o.hideApp(e),o.setAppStatus(e,t.ApplicationStatus.bootstrapped)):(a.push(e),o.hideApp(e),o.setAppStatus(e,t.ApplicationStatus.assetsLoaded))})),(r.length>0||a.length>0)&&setTimeout((function(){r.forEach((function(t){var e=R(t.name);e&&e.navigateByUrl(n.url)})),a.forEach((function(t){$("destroy app("+t.name+")"),o.destroyApp(t)}))}))},e.prototype.preloadApps=function(t){var e=this;setTimeout((function(){var n=e.planetApplicationService.getAppsToPreload(t?t.map((function(t){return t.name})):null);$("start preload apps: "+e.getAppNames(n));var o=n.map((function(t){return e.preloadInternal(t)}));a.forkJoin(o).subscribe({error:function(t){return e.errorHandler(t)}})}))},e.prototype.ensurePreloadApps=function(t){this.firstLoad&&(this.preloadApps(t),this.firstLoad=!1)},e.prototype.setOptions=function(t){this.options=Object.assign(Object.assign({},this.options),t)},e.prototype.reroute=function(t){this.routeChange$.next(t)},e.prototype.preloadInternal=function(e,n){var o=this,i=this.appsStatus.get(e);if(i&&i!==t.ApplicationStatus.loadError){if([t.ApplicationStatus.assetsLoading,t.ApplicationStatus.assetsLoaded,t.ApplicationStatus.bootstrapping].includes(i))return $("preload app("+e.name+"), status is "+t.ApplicationStatus[i]+", return until bootstrapped"),this.getAppStatusChange$(e).pipe(r.take(1),r.map((function(){return R(e.name)})));var p=R(e.name);if(!p)throw new Error(e.name+"'s status is "+t.ApplicationStatus[i]+", planetApplicationRef is null.");return a.of(p)}return $("preload app("+e.name+"), status is empty, start to load assets"),this.startLoadAppAssets(e).pipe(r.switchMap((function(){return $("preload app("+e.name+"), assets loaded, start bootstrap app, immediate: "+!!n),n?o.bootstrapApp(e,"hidden"):o.ngZone.runOutsideAngular((function(){return o.bootstrapApp(e,"hidden")}))})),r.map((function(){return R(e.name)})))},e.prototype.preload=function(t,e){return this.preloadInternal(t,e)},e}();_.ɵprov=c.ɵɵdefineInjectable({factory:function(){return new _(c.ɵɵinject(L),c.ɵɵinject(I),c.ɵɵinject(c.NgZone),c.ɵɵinject(l.Router),c.ɵɵinject(c.INJECTOR),c.ɵɵinject(c.ApplicationRef))},token:_,providedIn:"root"}),_.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],_.ctorParameters=function(){return[{type:L},{type:I},{type:e.NgZone},{type:n.Router},{type:e.Injector},{type:e.ApplicationRef}]};var q=function(){function t(t,e,n){var o,r;this.injector=t,this.router=e,this.planetApplicationLoader||(o=this.injector.get(_),E.applicationLoader=o),this.planetApplicationService||(r=this.injector.get(I),E.applicationService=r),n&&this.registerApps(n)}return Object.defineProperty(t.prototype,"planetApplicationLoader",{get:function(){return M()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"planetApplicationService",{get:function(){return O()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"loadingDone",{get:function(){return this.planetApplicationLoader.loadingDone},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"appStatusChange",{get:function(){return this.planetApplicationLoader.appStatusChange},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"appsLoadingStart",{get:function(){return this.planetApplicationLoader.appsLoadingStart},enumerable:!1,configurable:!0}),t.prototype.setOptions=function(t){this.planetApplicationLoader.setOptions(t),t.debugFactory&&U(t.debugFactory)},t.prototype.setPortalAppData=function(t){!function(t){E.portalApplication.data=t}(t)},t.prototype.registerApp=function(t){this.planetApplicationService.register(t)},t.prototype.registerApps=function(t){this.planetApplicationService.register(t)},t.prototype.unregisterApp=function(t){this.planetApplicationService.unregister(t)},t.prototype.getApps=function(){return this.planetApplicationService.getApps()},t.prototype.start=function(){var t=this;this.subscription=this.router.events.pipe(r.filter((function(t){return t instanceof n.NavigationEnd})),r.map((function(t){return t.urlAfterRedirects||t.url})),r.startWith(location.pathname),r.distinctUntilChanged()).subscribe((function(e){t.planetApplicationLoader.reroute({url:e})}))},t.prototype.stop=function(){this.subscription.unsubscribe()},t}();q.ɵprov=c.ɵɵdefineInjectable({factory:function(){return new q(c.ɵɵinject(c.INJECTOR),c.ɵɵinject(l.Router),c.ɵɵinject(h,8))},token:q,providedIn:"root"}),q.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],q.ctorParameters=function(){return[{type:e.Injector},{type:n.Router},{type:Array,decorators:[{type:e.Inject,args:[h]},{type:e.Optional}]}]};var F=function(){};F.decorators=[{type:e.Component,args:[{selector:"empty-component",template:""}]}];var H=function(){function t(){}return t.forRoot=function(e){return{ngModule:t,providers:[{provide:h,useValue:e}]}},t}();H.decorators=[{type:e.NgModule,args:[{declarations:[F],entryComponents:[F],imports:[o.HttpClientModule],providers:[],exports:[o.HttpClientModule,F]}]}];var G=function(){},W=function(){function t(t,e,n,o){this.applicationRef=t,this.ngModuleRef=e,this.ngZone=n,this.document=o,this.domPortalOutletCache=new WeakMap}return Object.defineProperty(t.prototype,"applicationLoader",{get:function(){return M()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"applicationService",{get:function(){return O()},enumerable:!1,configurable:!0}),t.prototype.getPlantAppRef=function(t){if(E.apps[t]&&E.apps[t].appModuleRef)return a.of(E.apps[t]);var e=this.applicationService.getAppByName(t);return this.applicationLoader.preload(e,!0).pipe(r.map((function(){return E.apps[t]})))},t.prototype.createInjector=function(t,e){var n=new WeakMap([[G,e]]),o=t.injector;return new i.PortalInjector(o,n)},t.prototype.getContainerElement=function(t){if(t.container)return t.container.nativeElement?t.container.nativeElement:t.container;throw new Error("config 'container' cannot be null")},t.prototype.createWrapperElement=function(t){var e=this.getContainerElement(t),n=this.document.createElement("div"),o=this.applicationService.getAppByName(this.ngModuleRef.instance.appName);return n.classList.add("planet-component-wrapper"),n.setAttribute("planet-inline",""),t.wrapperClass&&n.classList.add(t.wrapperClass),o&&o.stylePrefix&&n.classList.add(o.stylePrefix),e.appendChild(n),n},t.prototype.attachComponent=function(t,e,n){var o=this,r=new G,a=e.componentFactoryResolver,p=this.applicationRef,s=this.createInjector(e,r),u=this.createWrapperElement(n),c=this.domPortalOutletCache.get(u);c?c.detach():(c=new i.DomPortalOutlet(u,a,p,s),this.domPortalOutletCache.set(u,c));var l=new i.ComponentPortal(t.component,null),d=c.attachComponentPortal(l);return n.initialState&&Object.assign(d.instance,n.initialState),r.componentInstance=d.instance,r.componentRef=d,r.wrapperElement=u,r.dispose=function(){o.domPortalOutletCache.delete(u),c.dispose()},r},t.prototype.registerComponentFactory=function(t){var e=this,n=this.ngModuleRef.instance.appName;this.getPlantAppRef(n).subscribe((function(o){o.registerComponentFactory((function(r,a){var i=v(t).find((function(t){return t.name===r}));if(i)return e.ngZone.run((function(){return e.attachComponent(i,o.appModuleRef,a)}));throw Error("unregistered component "+r+" in app "+n)}))}))},t.prototype.register=function(t){var e=this;setTimeout((function(){e.registerComponentFactory(t)}))},t.prototype.load=function(t,e,n){var o=this,i=this.getPlantAppRef(t).pipe(r.delayWhen((function(t){return t.getComponentFactory()?a.of():a.timer(20)})),r.map((function(o){var r=o.getComponentFactory();if(r)return r(e,n);throw new Error(t+"'s component("+e+") is not registered")})),r.finalize((function(){o.applicationRef.tick()})),r.shareReplay());return i.subscribe(),i},t}();W.ɵprov=c.ɵɵdefineInjectable({factory:function(){return new W(c.ɵɵinject(c.ApplicationRef),c.ɵɵinject(c.NgModuleRef),c.ɵɵinject(c.NgZone),c.ɵɵinject(f.DOCUMENT))},token:W,providedIn:"root"}),W.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],W.ctorParameters=function(){return[{type:e.ApplicationRef},{type:e.NgModuleRef},{type:e.NgZone},{type:void 0,decorators:[{type:e.Inject,args:[p.DOCUMENT]}]}]};var J=function(){this.initialState=null};t.AssetsLoader=L,t.EmptyComponent=F,t.GlobalEventDispatcher=T,t.NgxPlanetModule=H,t.PLANET_APPLICATIONS=h,t.Planet=q,t.PlanetApplicationLoader=_,t.PlanetApplicationRef=P,t.PlanetApplicationService=I,t.PlanetComponentLoader=W,t.PlanetComponentRef=G,t.PlanetPortalApplication=N,t.PlantComponentConfig=J,t.defineApplication=function(t,e){if(E.apps[t])throw new Error(t+" application has exist.");b(e)&&(e={template:"",bootstrap:e});var n=new P(t,e);E.apps[t]=n},t.getPlanetApplicationRef=R,t.getPortalApplicationData=function(){return E.portalApplication.data},t.ɵa=E,Object.defineProperty(t,"__esModule",{value:!0})}));
|
|
16
|
-
//# sourceMappingURL=worktile-planet.umd.min.js.map
|