@worktile/planet 12.1.1 → 14.0.0-next.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/CHANGELOG.md +26 -0
- package/application/planet-application-loader.d.ts +73 -0
- package/application/planet-application-loader.d.ts.map +1 -0
- package/application/planet-application-ref.d.ts +36 -0
- package/application/planet-application-ref.d.ts.map +1 -0
- package/application/planet-application.service.d.ts +22 -0
- package/application/planet-application.service.d.ts.map +1 -0
- package/{packages/planet/src/application/portal-application.ts → application/portal-application.d.ts} +5 -18
- package/application/portal-application.d.ts.map +1 -0
- package/assets-loader.d.ts +36 -0
- package/assets-loader.d.ts.map +1 -0
- package/component/planet-component-loader.d.ts +31 -0
- package/component/planet-component-loader.d.ts.map +1 -0
- package/component/planet-component-ref.d.ts +8 -0
- package/component/planet-component-ref.d.ts.map +1 -0
- package/{packages/planet/src/component/plant-component.config.ts → component/plant-component.config.d.ts} +4 -4
- package/component/plant-component.config.d.ts.map +1 -0
- package/debug.d.ts +22 -0
- package/debug.d.ts.map +1 -0
- package/empty/empty.component.d.ts +6 -0
- package/empty/empty.component.d.ts.map +1 -0
- package/esm2020/application/planet-application-loader.mjs +454 -0
- package/esm2020/application/planet-application-ref.mjs +94 -0
- package/esm2020/application/planet-application.service.mjs +85 -0
- package/esm2020/application/portal-application.mjs +16 -0
- package/esm2020/assets-loader.mjs +216 -0
- package/esm2020/component/planet-component-loader.mjs +153 -0
- package/esm2020/component/planet-component-ref.mjs +3 -0
- package/esm2020/component/plant-component.config.mjs +7 -0
- package/esm2020/debug.mjs +33 -0
- package/esm2020/empty/empty.component.mjs +15 -0
- package/esm2020/global-event-dispatcher.mjs +70 -0
- package/esm2020/global-planet.mjs +53 -0
- package/esm2020/helpers.mjs +119 -0
- package/esm2020/module.mjs +31 -0
- package/esm2020/planet.class.mjs +9 -0
- package/esm2020/planet.mjs +91 -0
- package/esm2020/public-api.mjs +18 -0
- package/esm2020/sandbox/constants.mjs +7 -0
- package/esm2020/sandbox/exec.mjs +15 -0
- package/esm2020/sandbox/index.mjs +20 -0
- package/esm2020/sandbox/proxy/patches/document.mjs +12 -0
- package/esm2020/sandbox/proxy/patches/eventListener.mjs +41 -0
- package/esm2020/sandbox/proxy/patches/index.mjs +11 -0
- package/esm2020/sandbox/proxy/patches/storage.mjs +40 -0
- package/esm2020/sandbox/proxy/patches/timer.mjs +43 -0
- package/esm2020/sandbox/proxy/proxies/common.mjs +132 -0
- package/esm2020/sandbox/proxy/proxies/document.mjs +126 -0
- package/esm2020/sandbox/proxy/proxies/window.mjs +158 -0
- package/esm2020/sandbox/proxy/proxy-sandbox.mjs +49 -0
- package/esm2020/sandbox/proxy/types.mjs +2 -0
- package/esm2020/sandbox/sandbox.mjs +7 -0
- package/esm2020/sandbox/snapshot/snapshot-sandbox.mjs +12 -0
- package/esm2020/sandbox/types.mjs +2 -0
- package/esm2020/worktile-planet.mjs +5 -0
- package/fesm2015/worktile-planet.mjs +2049 -0
- package/fesm2015/worktile-planet.mjs.map +1 -0
- package/fesm2020/worktile-planet.mjs +2046 -0
- package/fesm2020/worktile-planet.mjs.map +1 -0
- package/global-event-dispatcher.d.ts +23 -0
- package/global-event-dispatcher.d.ts.map +1 -0
- package/global-planet.d.ts +23 -0
- package/global-planet.d.ts.map +1 -0
- package/helpers.d.ts +39 -0
- package/helpers.d.ts.map +1 -0
- package/index.d.ts +6 -0
- package/module.d.ts +12 -0
- package/module.d.ts.map +1 -0
- package/package.json +27 -120
- package/{packages/planet/src/planet.class.ts → planet.class.d.ts} +5 -26
- package/planet.class.d.ts.map +1 -0
- package/planet.d.ts +28 -0
- package/planet.d.ts.map +1 -0
- package/{packages/planet/src/public-api.ts → public-api.d.ts} +1 -4
- package/public-api.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/{packages/planet/src/sandbox/proxy/types.ts → sandbox/proxy/types.d.ts} +2 -8
- 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.d.ts.map +1 -0
- package/.all-contributorsrc +0 -84
- package/.circleci/config.yml +0 -17
- package/.coveralls.yml +0 -1
- package/.docgeni/public/assets/favicon.ico +0 -0
- package/.docgeni/public/index.html +0 -13
- package/.docgenirc.js +0 -35
- package/.dockerignore +0 -1
- package/.editorconfig +0 -22
- package/.github/FUNDING.yml +0 -12
- package/.github/ISSUE_TEMPLATE/bug_report.md +0 -38
- package/.github/ISSUE_TEMPLATE/feature_request.md +0 -20
- package/.prettierignore +0 -7
- package/.prettierrc +0 -28
- package/.travis.yml +0 -26
- package/.wpmrc.js +0 -11
- package/CODE_OF_CONDUCT.md +0 -76
- package/Dockerfile +0 -11
- package/README.zh-CN.md +0 -307
- package/SECURITY.md +0 -21
- package/angular.json +0 -373
- package/commitlint.config.js +0 -6
- package/docs/api/defineApplication.md +0 -46
- package/docs/api/globalEventDispatcher.md +0 -51
- package/docs/api/index.md +0 -5
- package/docs/api/planet.md +0 -117
- package/docs/guides/getting-started.md +0 -174
- package/docs/guides/index.md +0 -5
- package/docs/guides/intro.md +0 -216
- package/examples/app1/browserslist +0 -11
- package/examples/app1/extra-webpack.config.js +0 -33
- package/examples/app1/karma.conf.js +0 -31
- package/examples/app1/postcss.config.js +0 -1
- package/examples/app1/src/app/app.module.ts +0 -44
- package/examples/app1/src/app/app.routing.ts +0 -49
- package/examples/app1/src/app/counter.service.ts +0 -16
- package/examples/app1/src/app/dashboard/dashboard.component.html +0 -51
- package/examples/app1/src/app/dashboard/dashboard.component.ts +0 -70
- package/examples/app1/src/app/detail/detail.component.html +0 -8
- package/examples/app1/src/app/detail/detail.component.ts +0 -18
- package/examples/app1/src/app/overlay.ts +0 -26
- package/examples/app1/src/app/projects/dialog/projects-dialog.component.html +0 -10
- package/examples/app1/src/app/projects/dialog/projects-dialog.component.ts +0 -41
- package/examples/app1/src/app/projects/projects.component.ts +0 -33
- package/examples/app1/src/app/root/root.component.css +0 -3
- package/examples/app1/src/app/root/root.component.html +0 -16
- package/examples/app1/src/app/root/root.component.ts +0 -35
- package/examples/app1/src/app/services/initialized-data.resolver.ts +0 -15
- package/examples/app1/src/app/shared.module.ts +0 -57
- package/examples/app1/src/app/user/detail/user-detail.component.html +0 -5
- package/examples/app1/src/app/user/detail/user-detail.component.ts +0 -20
- package/examples/app1/src/app/user/user-list.component.html +0 -7
- package/examples/app1/src/app/user/user-list.component.ts +0 -20
- package/examples/app1/src/app/user/user.module.ts +0 -31
- package/examples/app1/src/assets/.gitkeep +0 -0
- package/examples/app1/src/assets/github.png +0 -0
- package/examples/app1/src/assets/main.css +0 -3
- package/examples/app1/src/environments/environment.prod.ts +0 -3
- package/examples/app1/src/environments/environment.ts +0 -16
- package/examples/app1/src/favicon.ico +0 -0
- package/examples/app1/src/index.html +0 -14
- package/examples/app1/src/main.ts +0 -35
- package/examples/app1/src/polyfills.ts +0 -84
- package/examples/app1/src/styles.scss +0 -35
- package/examples/app1/src/test.ts +0 -14
- package/examples/app1/temp.js +0 -221
- package/examples/app1/tsconfig.app.json +0 -10
- package/examples/app1/tsconfig.spec.json +0 -18
- package/examples/app1/tslint.json +0 -17
- package/examples/app1/webpack.config.js +0 -127
- package/examples/app2/browserslist +0 -11
- package/examples/app2/extra-webpack.config.js +0 -32
- package/examples/app2/karma.conf.js +0 -31
- package/examples/app2/src/app/app.module.ts +0 -90
- package/examples/app2/src/app/dashboard/dashboard.component.html +0 -21
- package/examples/app2/src/app/dashboard/dashboard.component.ts +0 -27
- package/examples/app2/src/app/overlay.ts +0 -26
- package/examples/app2/src/app/projects/detail/detail.component.html +0 -16
- package/examples/app2/src/app/projects/detail/detail.component.ts +0 -21
- package/examples/app2/src/app/projects/project-list.component.html +0 -29
- package/examples/app2/src/app/projects/project-list.component.ts +0 -58
- package/examples/app2/src/app/projects/project.resolver.ts +0 -15
- package/examples/app2/src/app/projects/projects.service.ts +0 -28
- package/examples/app2/src/app/projects/tasks/tasks.component.html +0 -10
- package/examples/app2/src/app/projects/tasks/tasks.component.ts +0 -16
- package/examples/app2/src/app/projects/view/view.component.html +0 -1
- package/examples/app2/src/app/projects/view/view.component.ts +0 -20
- package/examples/app2/src/app/root/root.component.html +0 -14
- package/examples/app2/src/app/root/root.component.scss +0 -12
- package/examples/app2/src/app/root/root.component.ts +0 -28
- package/examples/app2/src/app/shared.module.ts +0 -59
- package/examples/app2/src/assets/.gitkeep +0 -0
- package/examples/app2/src/environments/environment.prod.ts +0 -3
- package/examples/app2/src/environments/environment.ts +0 -16
- package/examples/app2/src/favicon.ico +0 -0
- package/examples/app2/src/index.html +0 -14
- package/examples/app2/src/main.ts +0 -36
- package/examples/app2/src/polyfills.ts +0 -84
- package/examples/app2/src/styles.scss +0 -28
- package/examples/app2/src/test.ts +0 -14
- package/examples/app2/tsconfig.app.json +0 -10
- package/examples/app2/tsconfig.spec.json +0 -18
- package/examples/app2/tslint.json +0 -7
- package/examples/app2/webpack.config.js +0 -92
- package/examples/common/app-root-context.ts +0 -10
- package/examples/common/cache.ts +0 -82
- package/examples/common/index.ts +0 -13
- package/examples/common/module.ts +0 -10
- package/examples/common/overlay-container.service.ts +0 -28
- package/examples/common/section-card/section-card.component.html +0 -5
- package/examples/common/section-card/section-card.component.scss +0 -15
- package/examples/common/section-card/section-card.component.ts +0 -11
- package/examples/common/utils.ts +0 -0
- package/examples/portal/src/app/a-detail/a-detail.component.html +0 -8
- package/examples/portal/src/app/a-detail/a-detail.component.ts +0 -18
- package/examples/portal/src/app/about/about.component.html +0 -27
- package/examples/portal/src/app/about/about.component.scss +0 -0
- package/examples/portal/src/app/about/about.component.spec.ts +0 -26
- package/examples/portal/src/app/about/about.component.ts +0 -26
- package/examples/portal/src/app/app-routing.module.ts +0 -57
- package/examples/portal/src/app/app.component.html +0 -73
- package/examples/portal/src/app/app.component.scss +0 -58
- package/examples/portal/src/app/app.component.spec.ts +0 -33
- package/examples/portal/src/app/app.component.ts +0 -111
- package/examples/portal/src/app/app.module.ts +0 -64
- package/examples/portal/src/app/custom-settings.service.ts +0 -44
- package/examples/portal/src/app/overlay.ts +0 -26
- package/examples/portal/src/app/settings/settings.component.html +0 -31
- package/examples/portal/src/app/settings/settings.component.scss +0 -3
- package/examples/portal/src/app/settings/settings.component.ts +0 -43
- package/examples/portal/src/assets/.gitkeep +0 -0
- package/examples/portal/src/assets/apps.json +0 -29
- package/examples/portal/src/assets/icons/sprite.defs.svg +0 -1
- package/examples/portal/src/assets/images/logo.svg +0 -16
- package/examples/portal/src/assets/ngx-planet-micro-front-end.gif +0 -0
- package/examples/portal/src/browserslist +0 -11
- package/examples/portal/src/environments/environment.prod.ts +0 -3
- package/examples/portal/src/environments/environment.ts +0 -16
- package/examples/portal/src/extra-webpack.config.js +0 -32
- package/examples/portal/src/favicon.ico +0 -0
- package/examples/portal/src/index.html +0 -14
- package/examples/portal/src/karma.conf.js +0 -31
- package/examples/portal/src/main.ts +0 -18
- package/examples/portal/src/polyfills.ts +0 -84
- package/examples/portal/src/reboot.scss +0 -14
- package/examples/portal/src/styles.scss +0 -14
- package/examples/portal/src/test.ts +0 -14
- package/examples/portal/src/tsconfig.app.json +0 -10
- package/examples/portal/src/tsconfig.spec.json +0 -9
- package/examples/portal/src/tslint.json +0 -7
- package/extra-webpack.config.js +0 -5
- package/nginx.conf +0 -17
- package/packages/planet/karma.conf.js +0 -37
- package/packages/planet/ng-package.json +0 -7
- package/packages/planet/package.json +0 -10
- package/packages/planet/src/application/planet-application-loader.spec.ts +0 -1102
- package/packages/planet/src/application/planet-application-loader.ts +0 -549
- package/packages/planet/src/application/planet-application-ref.spec.ts +0 -233
- package/packages/planet/src/application/planet-application-ref.ts +0 -131
- package/packages/planet/src/application/planet-application.service.spec.ts +0 -145
- package/packages/planet/src/application/planet-application.service.ts +0 -88
- package/packages/planet/src/application/portal-application.spec.ts +0 -53
- package/packages/planet/src/assets-loader.spec.ts +0 -689
- package/packages/planet/src/assets-loader.ts +0 -247
- package/packages/planet/src/component/planet-component-loader.spec.ts +0 -187
- package/packages/planet/src/component/planet-component-loader.ts +0 -173
- package/packages/planet/src/component/planet-component-ref.ts +0 -8
- package/packages/planet/src/debug.spec.ts +0 -58
- package/packages/planet/src/debug.ts +0 -66
- package/packages/planet/src/empty/empty.component.spec.ts +0 -34
- package/packages/planet/src/empty/empty.component.ts +0 -7
- package/packages/planet/src/global-event-dispatcher.spec.ts +0 -81
- package/packages/planet/src/global-event-dispatcher.ts +0 -82
- package/packages/planet/src/global-planet.spec.ts +0 -39
- package/packages/planet/src/global-planet.ts +0 -73
- package/packages/planet/src/helpers.spec.ts +0 -242
- package/packages/planet/src/helpers.ts +0 -125
- package/packages/planet/src/module.spec.ts +0 -79
- package/packages/planet/src/module.ts +0 -25
- package/packages/planet/src/planet.spec.ts +0 -226
- package/packages/planet/src/planet.ts +0 -113
- package/packages/planet/src/sandbox/constants.ts +0 -6
- package/packages/planet/src/sandbox/exec.ts +0 -22
- package/packages/planet/src/sandbox/index.ts +0 -24
- package/packages/planet/src/sandbox/proxy/patches/document.ts +0 -13
- package/packages/planet/src/sandbox/proxy/patches/eventListener.ts +0 -49
- package/packages/planet/src/sandbox/proxy/patches/index.ts +0 -13
- package/packages/planet/src/sandbox/proxy/patches/storage.ts +0 -53
- package/packages/planet/src/sandbox/proxy/patches/timer.ts +0 -50
- package/packages/planet/src/sandbox/proxy/proxies/common.ts +0 -137
- package/packages/planet/src/sandbox/proxy/proxies/document.ts +0 -140
- package/packages/planet/src/sandbox/proxy/proxies/window.ts +0 -176
- package/packages/planet/src/sandbox/proxy/proxy-sandbox.ts +0 -59
- package/packages/planet/src/sandbox/sandbox.ts +0 -20
- package/packages/planet/src/sandbox/snapshot/snapshot-sandbox.ts +0 -12
- package/packages/planet/src/sandbox/types.ts +0 -1
- package/packages/planet/src/test.ts +0 -16
- package/packages/planet/src/testing/app1.module.ts +0 -34
- package/packages/planet/src/testing/app2.module.ts +0 -24
- package/packages/planet/src/testing/applications.ts +0 -58
- package/packages/planet/src/testing/index.ts +0 -2
- package/packages/planet/src/testing/utils.ts +0 -31
- package/packages/planet/tsconfig.lib.json +0 -27
- package/packages/planet/tsconfig.lib.prod.json +0 -9
- package/packages/planet/tsconfig.spec.json +0 -17
- package/packages/planet/tslint.json +0 -7
- package/postcss.config.js +0 -3
- package/proxy.conf.js +0 -15
- package/tsconfig.json +0 -23
- package/tslint.json +0 -80
package/angular.json
DELETED
|
@@ -1,373 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
|
|
3
|
-
"version": 1,
|
|
4
|
-
"newProjectRoot": "projects",
|
|
5
|
-
"projects": {
|
|
6
|
-
"planet": {
|
|
7
|
-
"root": "packages/planet",
|
|
8
|
-
"sourceRoot": "packages/planet/src",
|
|
9
|
-
"projectType": "library",
|
|
10
|
-
"prefix": "lib",
|
|
11
|
-
"architect": {
|
|
12
|
-
"build": {
|
|
13
|
-
"builder": "@angular-devkit/build-angular:ng-packagr",
|
|
14
|
-
"options": {
|
|
15
|
-
"tsConfig": "packages/planet/tsconfig.lib.json",
|
|
16
|
-
"project": "packages/planet/ng-package.json"
|
|
17
|
-
},
|
|
18
|
-
"configurations": {
|
|
19
|
-
"production": {
|
|
20
|
-
"tsConfig": "packages/planet/tsconfig.lib.prod.json"
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
"test": {
|
|
25
|
-
"builder": "@angular-devkit/build-angular:karma",
|
|
26
|
-
"options": {
|
|
27
|
-
"main": "packages/planet/src/test.ts",
|
|
28
|
-
"tsConfig": "packages/planet/tsconfig.spec.json",
|
|
29
|
-
"karmaConfig": "packages/planet/karma.conf.js",
|
|
30
|
-
"codeCoverage": true,
|
|
31
|
-
"codeCoverageExclude": ["packages/planet/src/testing/**/*", "packages/planet/src/sandbox/**/*"]
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
"lint": {
|
|
35
|
-
"builder": "@angular-devkit/build-angular:tslint",
|
|
36
|
-
"options": {
|
|
37
|
-
"tsConfig": ["packages/planet/tsconfig.lib.json", "packages/planet/tsconfig.spec.json"],
|
|
38
|
-
"exclude": ["**/node_modules/**"]
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
"portal": {
|
|
44
|
-
"root": "examples/portal/src",
|
|
45
|
-
"sourceRoot": "examples/portal/src",
|
|
46
|
-
"projectType": "application",
|
|
47
|
-
"prefix": "app",
|
|
48
|
-
"schematics": {
|
|
49
|
-
"@schematics/angular:component": {
|
|
50
|
-
"style": "scss"
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
"architect": {
|
|
54
|
-
"build": {
|
|
55
|
-
"builder": "@angular-builders/custom-webpack:browser",
|
|
56
|
-
"options": {
|
|
57
|
-
"customWebpackConfig": {
|
|
58
|
-
"path": "examples/portal/src/extra-webpack.config.js",
|
|
59
|
-
"mergeStrategies": {
|
|
60
|
-
"externals": "replace",
|
|
61
|
-
"module.rules": "append"
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
"baseHref": "/",
|
|
65
|
-
"outputPath": "dist/portal",
|
|
66
|
-
"index": "examples/portal/src/index.html",
|
|
67
|
-
"main": "examples/portal/src/main.ts",
|
|
68
|
-
"polyfills": "examples/portal/src/polyfills.ts",
|
|
69
|
-
"tsConfig": "examples/portal/src/tsconfig.app.json",
|
|
70
|
-
"assets": ["examples/portal/src/favicon.ico", "examples/portal/src/assets"],
|
|
71
|
-
"styles": ["examples/portal/src/styles.scss", "examples/portal/src/reboot.scss"],
|
|
72
|
-
"extractCss": true,
|
|
73
|
-
"scripts": [],
|
|
74
|
-
"aot": true,
|
|
75
|
-
"optimization": false
|
|
76
|
-
},
|
|
77
|
-
"configurations": {
|
|
78
|
-
"production": {
|
|
79
|
-
"fileReplacements": [
|
|
80
|
-
{
|
|
81
|
-
"replace": "examples/portal/src/environments/environment.ts",
|
|
82
|
-
"with": "examples/portal/src/environments/environment.prod.ts"
|
|
83
|
-
}
|
|
84
|
-
],
|
|
85
|
-
"optimization": true,
|
|
86
|
-
"outputHashing": "all",
|
|
87
|
-
"sourceMap": false,
|
|
88
|
-
"extractCss": true,
|
|
89
|
-
"namedChunks": false,
|
|
90
|
-
"aot": true,
|
|
91
|
-
"extractLicenses": true,
|
|
92
|
-
"vendorChunk": false,
|
|
93
|
-
"buildOptimizer": true,
|
|
94
|
-
"budgets": [
|
|
95
|
-
{
|
|
96
|
-
"type": "initial",
|
|
97
|
-
"maximumWarning": "2mb",
|
|
98
|
-
"maximumError": "5mb"
|
|
99
|
-
}
|
|
100
|
-
]
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
},
|
|
104
|
-
"serve": {
|
|
105
|
-
"builder": "@angular-builders/custom-webpack:dev-server",
|
|
106
|
-
"options": {
|
|
107
|
-
"browserTarget": "portal:build",
|
|
108
|
-
"proxyConfig": "proxy.conf.js",
|
|
109
|
-
"port": 3000
|
|
110
|
-
},
|
|
111
|
-
"configurations": {
|
|
112
|
-
"production": {
|
|
113
|
-
"browserTarget": "portal:build:production"
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
},
|
|
117
|
-
"extract-i18n": {
|
|
118
|
-
"builder": "@angular-devkit/build-angular:extract-i18n",
|
|
119
|
-
"options": {
|
|
120
|
-
"browserTarget": "portal:build"
|
|
121
|
-
}
|
|
122
|
-
},
|
|
123
|
-
"test": {
|
|
124
|
-
"builder": "@angular-devkit/build-angular:karma",
|
|
125
|
-
"options": {
|
|
126
|
-
"main": "examples/portal/src/test.ts",
|
|
127
|
-
"polyfills": "examples/portal/src/polyfills.ts",
|
|
128
|
-
"tsConfig": "examples/portal/src/tsconfig.spec.json",
|
|
129
|
-
"karmaConfig": "examples/portal/src/karma.conf.js",
|
|
130
|
-
"styles": ["examples/portal/src/styles.scss"],
|
|
131
|
-
"scripts": [],
|
|
132
|
-
"assets": ["examples/portal/src/favicon.ico", "examples/portal/src/assets"]
|
|
133
|
-
}
|
|
134
|
-
},
|
|
135
|
-
"lint": {
|
|
136
|
-
"builder": "@angular-devkit/build-angular:tslint",
|
|
137
|
-
"options": {
|
|
138
|
-
"tsConfig": ["examples/portal/src/tsconfig.app.json", "examples/portal/src/tsconfig.spec.json"],
|
|
139
|
-
"exclude": ["**/node_modules/**"]
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
},
|
|
144
|
-
"app1": {
|
|
145
|
-
"root": "examples/app1/",
|
|
146
|
-
"sourceRoot": "examples/app1/src",
|
|
147
|
-
"projectType": "application",
|
|
148
|
-
"prefix": "app1",
|
|
149
|
-
"schematics": {},
|
|
150
|
-
"architect": {
|
|
151
|
-
"build": {
|
|
152
|
-
"builder": "@angular-builders/custom-webpack:browser",
|
|
153
|
-
"options": {
|
|
154
|
-
"customWebpackConfig": {
|
|
155
|
-
"path": "./examples/app1/extra-webpack.config.js",
|
|
156
|
-
"mergeStrategies": {
|
|
157
|
-
"module.rules": "append"
|
|
158
|
-
},
|
|
159
|
-
"replaceDuplicatePlugins": true
|
|
160
|
-
},
|
|
161
|
-
"outputPath": "dist/app1",
|
|
162
|
-
"index": "examples/app1/src/index.html",
|
|
163
|
-
"main": "examples/app1/src/main.ts",
|
|
164
|
-
"tsConfig": "examples/app1/tsconfig.app.json",
|
|
165
|
-
"assets": ["examples/app1/src/favicon.ico", "examples/app1/src/assets"],
|
|
166
|
-
"styles": ["examples/app1/src/styles.scss"],
|
|
167
|
-
"scripts": [],
|
|
168
|
-
"vendorChunk": false,
|
|
169
|
-
"optimization": false
|
|
170
|
-
},
|
|
171
|
-
"configurations": {
|
|
172
|
-
"production": {
|
|
173
|
-
"budgets": [
|
|
174
|
-
{
|
|
175
|
-
"type": "initial",
|
|
176
|
-
"maximumWarning": "500kb",
|
|
177
|
-
"maximumError": "1mb"
|
|
178
|
-
},
|
|
179
|
-
{
|
|
180
|
-
"type": "anyComponentStyle",
|
|
181
|
-
"maximumWarning": "2kb",
|
|
182
|
-
"maximumError": "4kb"
|
|
183
|
-
}
|
|
184
|
-
],
|
|
185
|
-
"fileReplacements": [
|
|
186
|
-
{
|
|
187
|
-
"replace": "examples/app1/src/environments/environment.ts",
|
|
188
|
-
"with": "examples/app1/src/environments/environment.prod.ts"
|
|
189
|
-
}
|
|
190
|
-
],
|
|
191
|
-
"outputHashing": "all"
|
|
192
|
-
},
|
|
193
|
-
"development": {
|
|
194
|
-
"buildOptimizer": false,
|
|
195
|
-
"optimization": false,
|
|
196
|
-
"vendorChunk": false,
|
|
197
|
-
"extractLicenses": false,
|
|
198
|
-
"sourceMap": true,
|
|
199
|
-
"namedChunks": true
|
|
200
|
-
}
|
|
201
|
-
},
|
|
202
|
-
"defaultConfiguration": "development"
|
|
203
|
-
},
|
|
204
|
-
"serve": {
|
|
205
|
-
"builder": "@angular-builders/custom-webpack:dev-server",
|
|
206
|
-
"options": {
|
|
207
|
-
"port": 3001
|
|
208
|
-
},
|
|
209
|
-
"configurations": {
|
|
210
|
-
"production": {
|
|
211
|
-
"browserTarget": "app1:build:production"
|
|
212
|
-
},
|
|
213
|
-
"development": {
|
|
214
|
-
"browserTarget": "app1:build:development"
|
|
215
|
-
}
|
|
216
|
-
},
|
|
217
|
-
"defaultConfiguration": "development"
|
|
218
|
-
},
|
|
219
|
-
"extract-i18n": {
|
|
220
|
-
"builder": "@angular-devkit/build-angular:extract-i18n",
|
|
221
|
-
"options": {
|
|
222
|
-
"browserTarget": "app1:build"
|
|
223
|
-
}
|
|
224
|
-
},
|
|
225
|
-
"test": {
|
|
226
|
-
"builder": "@angular-devkit/build-angular:karma",
|
|
227
|
-
"options": {
|
|
228
|
-
"main": "examples/app1/src/test.ts",
|
|
229
|
-
"polyfills": "examples/app1/src/polyfills.ts",
|
|
230
|
-
"tsConfig": "examples/app1/tsconfig.spec.json",
|
|
231
|
-
"karmaConfig": "examples/app1/karma.conf.js",
|
|
232
|
-
"styles": ["examples/app1/src/styles.css"],
|
|
233
|
-
"scripts": [],
|
|
234
|
-
"assets": ["examples/app1/src/favicon.ico", "examples/app1/src/assets"]
|
|
235
|
-
}
|
|
236
|
-
},
|
|
237
|
-
"lint": {
|
|
238
|
-
"builder": "@angular-devkit/build-angular:tslint",
|
|
239
|
-
"options": {
|
|
240
|
-
"tsConfig": ["examples/app1/tsconfig.app.json", "examples/app1/tsconfig.spec.json"],
|
|
241
|
-
"exclude": ["**/node_modules/**"]
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
},
|
|
246
|
-
"app2": {
|
|
247
|
-
"root": "examples/app2/",
|
|
248
|
-
"sourceRoot": "examples/app2/src",
|
|
249
|
-
"projectType": "application",
|
|
250
|
-
"prefix": "app2",
|
|
251
|
-
"schematics": {},
|
|
252
|
-
"architect": {
|
|
253
|
-
"build": {
|
|
254
|
-
"builder": "@angular-builders/custom-webpack:browser",
|
|
255
|
-
"options": {
|
|
256
|
-
"customWebpackConfig": {
|
|
257
|
-
"path": "./examples/app2/extra-webpack.config.js",
|
|
258
|
-
"mergeStrategies": {
|
|
259
|
-
"module.rules": "append"
|
|
260
|
-
},
|
|
261
|
-
"replaceDuplicatePlugins": true
|
|
262
|
-
},
|
|
263
|
-
"outputPath": "dist/app2",
|
|
264
|
-
"index": "examples/app2/src/index.html",
|
|
265
|
-
"main": "examples/app2/src/main.ts",
|
|
266
|
-
"tsConfig": "examples/app2/tsconfig.app.json",
|
|
267
|
-
"assets": ["examples/app2/src/favicon.ico", "examples/app2/src/assets"],
|
|
268
|
-
"styles": ["examples/app2/src/styles.scss"],
|
|
269
|
-
"scripts": [],
|
|
270
|
-
"vendorChunk": false,
|
|
271
|
-
"aot": true,
|
|
272
|
-
"extractCss": true,
|
|
273
|
-
"optimization": false
|
|
274
|
-
},
|
|
275
|
-
"configurations": {
|
|
276
|
-
"production": {
|
|
277
|
-
"fileReplacements": [
|
|
278
|
-
{
|
|
279
|
-
"replace": "examples/app2/src/environments/environment.ts",
|
|
280
|
-
"with": "examples/app2/src/environments/environment.prod.ts"
|
|
281
|
-
}
|
|
282
|
-
],
|
|
283
|
-
"optimization": true,
|
|
284
|
-
"outputHashing": "all",
|
|
285
|
-
"sourceMap": false,
|
|
286
|
-
"extractCss": true,
|
|
287
|
-
"namedChunks": false,
|
|
288
|
-
"aot": true,
|
|
289
|
-
"extractLicenses": true,
|
|
290
|
-
"vendorChunk": false,
|
|
291
|
-
"buildOptimizer": true,
|
|
292
|
-
"budgets": [
|
|
293
|
-
{
|
|
294
|
-
"type": "initial",
|
|
295
|
-
"maximumWarning": "2mb",
|
|
296
|
-
"maximumError": "5mb"
|
|
297
|
-
}
|
|
298
|
-
]
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
},
|
|
302
|
-
"serve": {
|
|
303
|
-
"builder": "@angular-builders/custom-webpack:dev-server",
|
|
304
|
-
"options": {
|
|
305
|
-
"browserTarget": "app2:build",
|
|
306
|
-
"port": 3002,
|
|
307
|
-
"vendorChunk": false
|
|
308
|
-
},
|
|
309
|
-
"configurations": {
|
|
310
|
-
"production": {
|
|
311
|
-
"browserTarget": "app2:build:production"
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
},
|
|
315
|
-
"extract-i18n": {
|
|
316
|
-
"builder": "@angular-devkit/build-angular:extract-i18n",
|
|
317
|
-
"options": {
|
|
318
|
-
"browserTarget": "app2:build"
|
|
319
|
-
}
|
|
320
|
-
},
|
|
321
|
-
"test": {
|
|
322
|
-
"builder": "@angular-devkit/build-angular:karma",
|
|
323
|
-
"options": {
|
|
324
|
-
"main": "examples/app2/src/test.ts",
|
|
325
|
-
"polyfills": "examples/app2/src/polyfills.ts",
|
|
326
|
-
"tsConfig": "examples/app2/tsconfig.spec.json",
|
|
327
|
-
"karmaConfig": "examples/app2/karma.conf.js",
|
|
328
|
-
"styles": ["examples/app2/src/styles.css"],
|
|
329
|
-
"scripts": [],
|
|
330
|
-
"assets": ["examples/app2/src/favicon.ico", "examples/app2/src/assets"]
|
|
331
|
-
}
|
|
332
|
-
},
|
|
333
|
-
"lint": {
|
|
334
|
-
"builder": "@angular-devkit/build-angular:tslint",
|
|
335
|
-
"options": {
|
|
336
|
-
"tsConfig": ["examples/app2/tsconfig.app.json", "examples/app2/tsconfig.spec.json"],
|
|
337
|
-
"exclude": ["**/node_modules/**"]
|
|
338
|
-
}
|
|
339
|
-
}
|
|
340
|
-
}
|
|
341
|
-
},
|
|
342
|
-
"app1-e2e": {
|
|
343
|
-
"root": "examples/app1-e2e/",
|
|
344
|
-
"projectType": "application",
|
|
345
|
-
"prefix": "",
|
|
346
|
-
"architect": {
|
|
347
|
-
"e2e": {
|
|
348
|
-
"builder": "@angular-devkit/build-angular:protractor",
|
|
349
|
-
"options": {
|
|
350
|
-
"protractorConfig": "examples/app1-e2e/protractor.conf.js",
|
|
351
|
-
"devServerTarget": "app1:serve"
|
|
352
|
-
},
|
|
353
|
-
"configurations": {
|
|
354
|
-
"production": {
|
|
355
|
-
"devServerTarget": "app1:serve:production"
|
|
356
|
-
}
|
|
357
|
-
}
|
|
358
|
-
},
|
|
359
|
-
"lint": {
|
|
360
|
-
"builder": "@angular-devkit/build-angular:tslint",
|
|
361
|
-
"options": {
|
|
362
|
-
"tsConfig": "examples/app1-e2e/tsconfig.e2e.json",
|
|
363
|
-
"exclude": ["**/node_modules/**"]
|
|
364
|
-
}
|
|
365
|
-
}
|
|
366
|
-
}
|
|
367
|
-
}
|
|
368
|
-
},
|
|
369
|
-
"defaultProject": "portal",
|
|
370
|
-
"cli": {
|
|
371
|
-
"analytics": false
|
|
372
|
-
}
|
|
373
|
-
}
|
package/commitlint.config.js
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: defineApplication
|
|
3
|
-
path: defineApplication
|
|
4
|
-
order: 20
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## defineApplication(name, options)
|
|
8
|
-
### 参数
|
|
9
|
-
- name:string - 必填,子应用名称
|
|
10
|
-
- options:BootstrapAppModule | BootstrapOptions - 必填,子应用启动方法
|
|
11
|
-
|
|
12
|
-
### 类型
|
|
13
|
-
#### BootstrapAppModule
|
|
14
|
-
- (portalApp?: PlanetPortalApplication) => Promise<NgModuleRef<any>>;
|
|
15
|
-
|
|
16
|
-
#### BootstrapOptions
|
|
17
|
-
- template: string
|
|
18
|
-
<br>必填,根节点模板
|
|
19
|
-
- bootstrap: BootstrapAppModule;
|
|
20
|
-
<br>必填,启动方法
|
|
21
|
-
### 示例
|
|
22
|
-
```ts
|
|
23
|
-
defineApplication('app1', {
|
|
24
|
-
template: `<app1-root class="app1-root"></app1-root>`,
|
|
25
|
-
bootstrap: (portalApp: PlanetPortalApplication) => {
|
|
26
|
-
return platformBrowserDynamic([
|
|
27
|
-
{
|
|
28
|
-
provide: PlanetPortalApplication,
|
|
29
|
-
useValue: portalApp
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
provide: AppRootContext,
|
|
33
|
-
useValue: portalApp.data.appRootContext
|
|
34
|
-
}
|
|
35
|
-
])
|
|
36
|
-
.bootstrapModule(AppModule)
|
|
37
|
-
.then(appModule => {
|
|
38
|
-
return appModule;
|
|
39
|
-
})
|
|
40
|
-
.catch(error => {
|
|
41
|
-
console.error(error);
|
|
42
|
-
return null;
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
```
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: GlobalEventDispatcher
|
|
3
|
-
path: globalEventDispatcher
|
|
4
|
-
order: 30
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## register(components)
|
|
8
|
-
注册组件,注册后的组件可在其他子应用中渲染
|
|
9
|
-
### 参数
|
|
10
|
-
- components - PlanetComponent | PlanetComponent[] - 必填,注册的组件列表
|
|
11
|
-
|
|
12
|
-
### 类型
|
|
13
|
-
#### PlanetComponent
|
|
14
|
-
- name: string
|
|
15
|
-
<br>必填,组件名称
|
|
16
|
-
- component: ComponentType<T>;
|
|
17
|
-
<br>必填,组件
|
|
18
|
-
|
|
19
|
-
### 示例
|
|
20
|
-
|
|
21
|
-
```ts
|
|
22
|
-
import { GlobalEventDispatcher } from "@worktile/planet";
|
|
23
|
-
|
|
24
|
-
// app1 root module
|
|
25
|
-
constructor(private globalEventDispatcher: GlobalEventDispatcher) {
|
|
26
|
-
this.globalEventDispatcher.register('open-a-detail').subscribe(event => {
|
|
27
|
-
// dialog.open(App1DetailComponent);
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
## dispatch((name, payload))
|
|
33
|
-
渲染其他应用中注册过的组件
|
|
34
|
-
### 参数
|
|
35
|
-
- name - string - 必填,注册的组件列表
|
|
36
|
-
- payload - 可选,传入组件的参数
|
|
37
|
-
|
|
38
|
-
### 示例
|
|
39
|
-
|
|
40
|
-
```ts
|
|
41
|
-
import { GlobalEventDispatcher } from "@worktile/planet";
|
|
42
|
-
|
|
43
|
-
// in other apps
|
|
44
|
-
export class OneComponent {
|
|
45
|
-
constructor(private globalEventDispatcher: GlobalEventDispatcher) {}
|
|
46
|
-
|
|
47
|
-
openDetail() {
|
|
48
|
-
this.globalEventDispatcher.dispatch('open-a-detail', payload);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
```
|
package/docs/api/index.md
DELETED
package/docs/api/planet.md
DELETED
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Planet
|
|
3
|
-
path: planet
|
|
4
|
-
order: 10
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## setOptions(options)
|
|
8
|
-
### 参数
|
|
9
|
-
- options - `Partial<PlanetOptions>` - 必填
|
|
10
|
-
|
|
11
|
-
### 类型
|
|
12
|
-
#### PlanetOptions
|
|
13
|
-
- errorHandler: (error: Error) => void;
|
|
14
|
-
<br>必填,
|
|
15
|
-
- switchMode?: SwitchModes;
|
|
16
|
-
<br>可选,子应用的名称,子应用之间必须确保唯一
|
|
17
|
-
|
|
18
|
-
#### 示例
|
|
19
|
-
``` ts
|
|
20
|
-
constructor(
|
|
21
|
-
private planet: Planet
|
|
22
|
-
) { }
|
|
23
|
-
|
|
24
|
-
ngOnInit() {
|
|
25
|
-
this.planet.setOptions({
|
|
26
|
-
switchMode: SwitchModes.coexist,
|
|
27
|
-
errorHandler: error => {
|
|
28
|
-
console.error(`Failed to load resource, error:`, error);
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
## registerApps(apps)
|
|
35
|
-
注册子应用的基础配置信息。当浏览器 url 发生变化时,会自动检查每一个子应用注册的 activeRule 规则,符合规则的应用将会被自动激活。
|
|
36
|
-
### 参数
|
|
37
|
-
- apps - `PlanetApplication<TExtra>[]` - 必填,子应用的注册信息
|
|
38
|
-
|
|
39
|
-
### 类型
|
|
40
|
-
#### PlanetApplication
|
|
41
|
-
- name: string
|
|
42
|
-
<br>必填,子应用的名称
|
|
43
|
-
- hostParent: string | HTMLElement;
|
|
44
|
-
<br>必填,应用渲染的容器元素, 指定子应用显示在哪个元素内部
|
|
45
|
-
- routerPathPrefix: string | RegExp;
|
|
46
|
-
<br>必填,子应用路由路径前缀,根据这个匹配应用
|
|
47
|
-
- hostClass?: string | string[];
|
|
48
|
-
<br>可选,宿主元素的 Class,也就是在子应用启动组件上追加的样式
|
|
49
|
-
- preload?: boolean;
|
|
50
|
-
<br>可选,是否启用预加载,启动后刷新页面等当前页面的应用渲染完毕后预加载子应用
|
|
51
|
-
- switchMode?: SwitchModes;
|
|
52
|
-
<br>可选,切换子应用的模式,默认切换会销毁,设置 coexist 后只会隐藏
|
|
53
|
-
- resourcePathPrefix?: string;
|
|
54
|
-
<br>可选,脚本和样式文件路径前缀,多个脚本可以避免重复写同样的前缀
|
|
55
|
-
- stylePrefix?: string;
|
|
56
|
-
<br>可选,样式前缀
|
|
57
|
-
- styles?: string[];
|
|
58
|
-
<br>可选,样式静态资源文件访问地址
|
|
59
|
-
- scripts?: string[];
|
|
60
|
-
<br>可选,JS 静态资源文件访问地址
|
|
61
|
-
- loadSerial?: boolean;
|
|
62
|
-
<br>可选,是否串行加载脚本静态资源
|
|
63
|
-
- themeStylesPath?: string;
|
|
64
|
-
<br>可选,皮肤样式的路径
|
|
65
|
-
- manifest?: string;
|
|
66
|
-
<br>可选,manifest.json 文件路径地址,当设置了路径后会先加载这个文件,然后根据 scripts 和 styles 文件名去找到匹配的文件,因为生产环境的静态资文件是 hash 之后的命名,需要动态获取
|
|
67
|
-
- extra: TExtra;
|
|
68
|
-
<br>可选,附加数据,主要应用于业务,比如图标,子应用的颜色,显示名等个性化配置
|
|
69
|
-
|
|
70
|
-
### 示例
|
|
71
|
-
|
|
72
|
-
``` ts
|
|
73
|
-
constructor(
|
|
74
|
-
private planet: Planet,
|
|
75
|
-
) { }
|
|
76
|
-
|
|
77
|
-
ngOnInit() {
|
|
78
|
-
this.planet.registerApps([
|
|
79
|
-
{
|
|
80
|
-
name: 'app1',
|
|
81
|
-
hostParent: '#app-host-container',
|
|
82
|
-
routerPathPrefix: '/app1',
|
|
83
|
-
selector: 'app1-root',
|
|
84
|
-
scripts: ['/static/app1/main.js'],
|
|
85
|
-
styles: ['/static/app1/styles.css']
|
|
86
|
-
},
|
|
87
|
-
// ...
|
|
88
|
-
]);
|
|
89
|
-
}
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
## registerApp(app)
|
|
93
|
-
注册子应用的基础配置信息。
|
|
94
|
-
### 参数
|
|
95
|
-
- app - `PlanetApplication<TExtra>` - 必填,子应用的注册信息
|
|
96
|
-
|
|
97
|
-
## unregisterApp(name)
|
|
98
|
-
取消注册子应用。
|
|
99
|
-
### 参数
|
|
100
|
-
- name - string - 必填,子应用名称
|
|
101
|
-
|
|
102
|
-
## getApps()
|
|
103
|
-
获取所有注册的子应用列表。
|
|
104
|
-
|
|
105
|
-
## start()
|
|
106
|
-
启动微前端框架
|
|
107
|
-
|
|
108
|
-
### 示例
|
|
109
|
-
``` ts
|
|
110
|
-
constructor(
|
|
111
|
-
private planet: Planet
|
|
112
|
-
) {}
|
|
113
|
-
|
|
114
|
-
ngOnInit() {
|
|
115
|
-
this.planet.start();
|
|
116
|
-
}
|
|
117
|
-
```
|