@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
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { Component, OnInit, HostBinding } from '@angular/core';
|
|
2
|
-
import { ActivatedRoute, Router } from '@angular/router';
|
|
3
|
-
|
|
4
|
-
@Component({
|
|
5
|
-
selector: 'app2-project-detail',
|
|
6
|
-
templateUrl: './detail.component.html'
|
|
7
|
-
})
|
|
8
|
-
export class ProjectDetailComponent implements OnInit {
|
|
9
|
-
@HostBinding('class') class = 'thy-layout';
|
|
10
|
-
|
|
11
|
-
projectId: string;
|
|
12
|
-
|
|
13
|
-
constructor(private route: ActivatedRoute, router: Router) {
|
|
14
|
-
this.route.paramMap.subscribe(params => {
|
|
15
|
-
this.projectId = params.get('id');
|
|
16
|
-
router.navigateByUrl(`/app2/projects/${this.projectId}/tasks`);
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
ngOnInit() {}
|
|
21
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
<thy-content>
|
|
2
|
-
<input
|
|
3
|
-
thyInput
|
|
4
|
-
class="mt-2 mb-2"
|
|
5
|
-
[(ngModel)]="search"
|
|
6
|
-
placeholder="搜索项目"
|
|
7
|
-
[style.width.px]="300"
|
|
8
|
-
(thyEnter)="getProjects()"
|
|
9
|
-
/>
|
|
10
|
-
<thy-table
|
|
11
|
-
thyClassName="table-hover"
|
|
12
|
-
[thyModel]="projects"
|
|
13
|
-
[thyLoadingDone]="loadingDone"
|
|
14
|
-
(thyOnRowClick)="openDetail($event)"
|
|
15
|
-
thyTheme="bordered"
|
|
16
|
-
thyRowKey="id"
|
|
17
|
-
>
|
|
18
|
-
<thy-table-column thyTitle="名称" thyModelKey="name" thyClassName="same-name"></thy-table-column>
|
|
19
|
-
<thy-table-column thyTitle="描述" thyModelKey="desc"></thy-table-column>
|
|
20
|
-
<thy-table-column thyTitle="操作" thyClassName="thy-operation-links text-center">
|
|
21
|
-
<ng-template #cell let-row>
|
|
22
|
-
<a href="javascript:;">设置</a>
|
|
23
|
-
<a class="link-secondary" href="javascript:;">
|
|
24
|
-
<i class="wtf wtf-trash-o"></i>
|
|
25
|
-
</a>
|
|
26
|
-
</ng-template>
|
|
27
|
-
</thy-table-column>
|
|
28
|
-
</thy-table>
|
|
29
|
-
</thy-content>
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { Component, EventEmitter, OnInit, DoCheck, ApplicationRef, HostBinding } from '@angular/core';
|
|
2
|
-
import { GlobalEventDispatcher } from 'ngx-planet';
|
|
3
|
-
import { ProjectService } from './projects.service';
|
|
4
|
-
import { ThyDialog } from 'ngx-tethys/dialog';
|
|
5
|
-
import { ProjectDetailComponent } from './detail/detail.component';
|
|
6
|
-
import { Router } from '@angular/router';
|
|
7
|
-
import { ThyTableRowEvent } from 'ngx-tethys/table';
|
|
8
|
-
|
|
9
|
-
@Component({
|
|
10
|
-
selector: 'app-project-list',
|
|
11
|
-
templateUrl: './project-list.component.html'
|
|
12
|
-
})
|
|
13
|
-
export class ProjectListComponent implements OnInit, DoCheck {
|
|
14
|
-
@HostBinding('class') class = 'thy-layout';
|
|
15
|
-
|
|
16
|
-
constructor(
|
|
17
|
-
private router: Router,
|
|
18
|
-
private globalEventDispatcher: GlobalEventDispatcher,
|
|
19
|
-
private projectService: ProjectService,
|
|
20
|
-
private dialog: ThyDialog,
|
|
21
|
-
private applicationRef: ApplicationRef
|
|
22
|
-
) {}
|
|
23
|
-
|
|
24
|
-
click = new EventEmitter<any>();
|
|
25
|
-
|
|
26
|
-
projects: any[];
|
|
27
|
-
|
|
28
|
-
loadingDone: boolean;
|
|
29
|
-
|
|
30
|
-
search: string;
|
|
31
|
-
|
|
32
|
-
ngOnInit() {
|
|
33
|
-
this.getProjects();
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
getProjects() {
|
|
37
|
-
this.loadingDone = false;
|
|
38
|
-
setTimeout(() => {
|
|
39
|
-
this.projects = this.projectService.getProjects();
|
|
40
|
-
this.loadingDone = true;
|
|
41
|
-
}, 500);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
openDetail(event: ThyTableRowEvent) {
|
|
45
|
-
this.router.navigateByUrl(`/app2/projects/${event.row.id}`);
|
|
46
|
-
this.click.emit();
|
|
47
|
-
// this.dialog.open(ProjectDetailComponent, {
|
|
48
|
-
// hasBackdrop: true,
|
|
49
|
-
// backdropClosable: true,
|
|
50
|
-
// closeOnNavigation: true
|
|
51
|
-
// });
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
ngDoCheck() {
|
|
55
|
-
// this.applicationRef.tick();
|
|
56
|
-
// console.log(window['appRef'] === this.applicationRef);
|
|
57
|
-
}
|
|
58
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Injectable } from '@angular/core';
|
|
2
|
-
import { Resolve, Router, ActivatedRouteSnapshot } from '@angular/router';
|
|
3
|
-
import { ProjectService } from './projects.service';
|
|
4
|
-
|
|
5
|
-
@Injectable({
|
|
6
|
-
providedIn: 'root'
|
|
7
|
-
})
|
|
8
|
-
export class ProjectResolver implements Resolve<any> {
|
|
9
|
-
constructor(private projectService: ProjectService, private router: Router) {}
|
|
10
|
-
|
|
11
|
-
resolve(route: ActivatedRouteSnapshot) {
|
|
12
|
-
const projectId = route.params.id;
|
|
13
|
-
return this.projectService.fetchProject(projectId);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { Injectable } from '@angular/core';
|
|
2
|
-
import { of } from 'rxjs';
|
|
3
|
-
import { delay } from 'rxjs/operators';
|
|
4
|
-
|
|
5
|
-
@Injectable({
|
|
6
|
-
providedIn: 'root'
|
|
7
|
-
})
|
|
8
|
-
export class ProjectService {
|
|
9
|
-
constructor() {}
|
|
10
|
-
|
|
11
|
-
getProjects() {
|
|
12
|
-
return Array.from({ length: 10 }).map((item, index) => {
|
|
13
|
-
return {
|
|
14
|
-
id: index,
|
|
15
|
-
name: `Data ${index}`,
|
|
16
|
-
desc: 'This is test data'
|
|
17
|
-
};
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
fetchProject(projectId: string) {
|
|
22
|
-
return of({
|
|
23
|
-
id: projectId,
|
|
24
|
-
name: `Data ${projectId}`,
|
|
25
|
-
desc: 'This is test data'
|
|
26
|
-
}).pipe(delay(100));
|
|
27
|
-
}
|
|
28
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
<thy-header thySize="sm">
|
|
2
|
-
<ng-template #headerContent>
|
|
3
|
-
<thy-nav thyType="thirdly" thyHorizontal="left">
|
|
4
|
-
<a thyNavLink [routerLink]="['./view-1']" routerLinkActive="active">View1</a>
|
|
5
|
-
<a thyNavLink [routerLink]="['./view-2']" routerLinkActive="active">View2</a>
|
|
6
|
-
<a thyNavLink [routerLink]="['./view-3']" routerLinkActive="active">View3</a>
|
|
7
|
-
</thy-nav>
|
|
8
|
-
</ng-template>
|
|
9
|
-
</thy-header>
|
|
10
|
-
<router-outlet></router-outlet>
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Component, OnInit, HostBinding } from '@angular/core';
|
|
2
|
-
import { Router, ActivatedRoute } from '@angular/router';
|
|
3
|
-
|
|
4
|
-
@Component({
|
|
5
|
-
selector: 'app2-tasks',
|
|
6
|
-
templateUrl: './tasks.component.html'
|
|
7
|
-
})
|
|
8
|
-
export class TasksComponent implements OnInit {
|
|
9
|
-
@HostBinding('class') class = 'thy-layout';
|
|
10
|
-
|
|
11
|
-
constructor(router: Router, route: ActivatedRoute) {
|
|
12
|
-
router.navigate(['./view-1'], { relativeTo: route });
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
ngOnInit(): void {}
|
|
16
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
viewId: {{ viewId }}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { Component, OnInit, HostBinding } from '@angular/core';
|
|
2
|
-
import { ActivatedRoute } from '@angular/router';
|
|
3
|
-
|
|
4
|
-
@Component({
|
|
5
|
-
selector: 'app2-view',
|
|
6
|
-
templateUrl: './view.component.html'
|
|
7
|
-
})
|
|
8
|
-
export class ViewComponent implements OnInit {
|
|
9
|
-
@HostBinding('class') class = 'thy-layout-content';
|
|
10
|
-
|
|
11
|
-
viewId: string;
|
|
12
|
-
|
|
13
|
-
constructor(private route: ActivatedRoute) {
|
|
14
|
-
route.paramMap.subscribe(param => {
|
|
15
|
-
this.viewId = param.get('viewId');
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
ngOnInit(): void {}
|
|
20
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
<thy-layout>
|
|
2
|
-
<thy-sidebar>
|
|
3
|
-
<div class="sidebar-header">
|
|
4
|
-
<span class="title cursor-pointer same-name">App2</span>
|
|
5
|
-
</div>
|
|
6
|
-
<div class="sidebar-content">
|
|
7
|
-
<thy-menu>
|
|
8
|
-
<a thyMenuItem [routerLink]="['/app2/dashboard']" routerLinkActive="active">App2 Dashboard</a>
|
|
9
|
-
<a thyMenuItem [routerLink]="['/app2/projects']" routerLinkActive="active">App2 Projects</a>
|
|
10
|
-
</thy-menu>
|
|
11
|
-
</div>
|
|
12
|
-
</thy-sidebar>
|
|
13
|
-
<router-outlet></router-outlet>
|
|
14
|
-
</thy-layout>
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { PlanetComponentLoader } from 'ngx-planet';
|
|
2
|
-
import { Component, HostBinding, ComponentFactoryResolver, Injector, ApplicationRef, OnInit } from '@angular/core';
|
|
3
|
-
import { ProjectListComponent } from '../projects/project-list.component';
|
|
4
|
-
@Component({
|
|
5
|
-
selector: 'app2-root-actual',
|
|
6
|
-
templateUrl: './root.component.html',
|
|
7
|
-
styleUrls: ['./root.component.scss']
|
|
8
|
-
})
|
|
9
|
-
export class AppActualRootComponent {
|
|
10
|
-
@HostBinding(`class.thy-layout`) isThyLayout = true;
|
|
11
|
-
@HostBinding(`class.thy-layout--has-sidebar`) isThyHasSidebarLayout = true;
|
|
12
|
-
|
|
13
|
-
constructor() {}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
@Component({
|
|
17
|
-
selector: 'app2-root',
|
|
18
|
-
template: '<router-outlet></router-outlet>'
|
|
19
|
-
})
|
|
20
|
-
export class AppRootComponent implements OnInit {
|
|
21
|
-
@HostBinding(`class.thy-layout`) isThyLayout = true;
|
|
22
|
-
|
|
23
|
-
constructor(private planetComponentLoader: PlanetComponentLoader) {}
|
|
24
|
-
|
|
25
|
-
ngOnInit() {
|
|
26
|
-
this.planetComponentLoader.register([{ name: 'project1', component: ProjectListComponent }]);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { NgModule } from '@angular/core';
|
|
2
|
-
import { CommonModule } from '@angular/common';
|
|
3
|
-
import { RouterModule } from '@angular/router';
|
|
4
|
-
import { ThyLayoutModule } from 'ngx-tethys/layout';
|
|
5
|
-
import { ThyButtonModule } from 'ngx-tethys/button';
|
|
6
|
-
import { ThyListModule } from 'ngx-tethys/list';
|
|
7
|
-
import { ThyDialogModule } from 'ngx-tethys/dialog';
|
|
8
|
-
import { ThyMenuModule } from 'ngx-tethys/menu';
|
|
9
|
-
import { ThyCardModule } from 'ngx-tethys/card';
|
|
10
|
-
import { ThyLoadingModule } from 'ngx-tethys/loading';
|
|
11
|
-
import { ThyTableModule } from 'ngx-tethys/table';
|
|
12
|
-
import { ThyNavModule } from 'ngx-tethys/nav';
|
|
13
|
-
import { ThyInputModule } from 'ngx-tethys/input';
|
|
14
|
-
import { ThyIconModule } from 'ngx-tethys/icon';
|
|
15
|
-
|
|
16
|
-
import { DemoCommonModule } from '@demo/common';
|
|
17
|
-
import { NgxPlanetModule } from 'ngx-planet';
|
|
18
|
-
import { ThyLabelModule } from 'ngx-tethys';
|
|
19
|
-
|
|
20
|
-
@NgModule({
|
|
21
|
-
declarations: [],
|
|
22
|
-
imports: [
|
|
23
|
-
CommonModule,
|
|
24
|
-
RouterModule,
|
|
25
|
-
ThyLayoutModule,
|
|
26
|
-
ThyButtonModule,
|
|
27
|
-
ThyListModule,
|
|
28
|
-
ThyDialogModule,
|
|
29
|
-
ThyMenuModule,
|
|
30
|
-
ThyCardModule,
|
|
31
|
-
ThyLoadingModule,
|
|
32
|
-
ThyTableModule,
|
|
33
|
-
ThyNavModule,
|
|
34
|
-
ThyInputModule,
|
|
35
|
-
ThyIconModule,
|
|
36
|
-
DemoCommonModule,
|
|
37
|
-
NgxPlanetModule
|
|
38
|
-
],
|
|
39
|
-
exports: [
|
|
40
|
-
CommonModule,
|
|
41
|
-
RouterModule,
|
|
42
|
-
ThyLayoutModule,
|
|
43
|
-
ThyButtonModule,
|
|
44
|
-
ThyListModule,
|
|
45
|
-
ThyDialogModule,
|
|
46
|
-
ThyMenuModule,
|
|
47
|
-
ThyCardModule,
|
|
48
|
-
ThyLoadingModule,
|
|
49
|
-
ThyTableModule,
|
|
50
|
-
ThyNavModule,
|
|
51
|
-
ThyInputModule,
|
|
52
|
-
ThyIconModule,
|
|
53
|
-
ThyLabelModule,
|
|
54
|
-
DemoCommonModule,
|
|
55
|
-
NgxPlanetModule
|
|
56
|
-
],
|
|
57
|
-
providers: []
|
|
58
|
-
})
|
|
59
|
-
export class SharedModule {}
|
|
File without changes
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
// This file can be replaced during build by using the `fileReplacements` array.
|
|
2
|
-
// `ng build --prod` replaces `environment.ts` with `environment.prod.ts`.
|
|
3
|
-
// The list of file replacements can be found in `angular.json`.
|
|
4
|
-
|
|
5
|
-
export const environment = {
|
|
6
|
-
production: false
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
/*
|
|
10
|
-
* For easier debugging in development mode, you can import the following file
|
|
11
|
-
* to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.
|
|
12
|
-
*
|
|
13
|
-
* This import should be commented out in production mode because it will have a negative impact
|
|
14
|
-
* on performance if an error is thrown.
|
|
15
|
-
*/
|
|
16
|
-
// import 'zone.js/plugins/zone-error'; // Included with Angular CLI.
|
|
Binary file
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8">
|
|
5
|
-
<title>App1</title>
|
|
6
|
-
<base href="/">
|
|
7
|
-
|
|
8
|
-
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
9
|
-
<link rel="icon" type="image/x-icon" href="favicon.ico">
|
|
10
|
-
</head>
|
|
11
|
-
<body>
|
|
12
|
-
<app1-root></app1-root>
|
|
13
|
-
</body>
|
|
14
|
-
</html>
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { enableProdMode, NgModuleRef, Type, NgZone } from '@angular/core';
|
|
2
|
-
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
|
3
|
-
|
|
4
|
-
import { AppModule } from './app/app.module';
|
|
5
|
-
import { environment } from './environments/environment';
|
|
6
|
-
import { Router } from '@angular/router';
|
|
7
|
-
import { PlanetPortalApplication, PlanetRouterEvent, GlobalEventDispatcher, defineApplication } from 'ngx-planet';
|
|
8
|
-
|
|
9
|
-
if (environment.production) {
|
|
10
|
-
enableProdMode();
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
// 测试沙箱模拟APP2 引入低版本的 lodash
|
|
14
|
-
window['lodash'] = {
|
|
15
|
-
version: '1.0.0'
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
defineApplication('app2', {
|
|
19
|
-
template: `<app2-root></app2-root>`,
|
|
20
|
-
bootstrap: (portalApp: PlanetPortalApplication) => {
|
|
21
|
-
return platformBrowserDynamic([
|
|
22
|
-
{
|
|
23
|
-
provide: PlanetPortalApplication,
|
|
24
|
-
useValue: portalApp
|
|
25
|
-
}
|
|
26
|
-
])
|
|
27
|
-
.bootstrapModule(AppModule)
|
|
28
|
-
.then(appModule => {
|
|
29
|
-
return appModule;
|
|
30
|
-
})
|
|
31
|
-
.catch(error => {
|
|
32
|
-
console.error(error);
|
|
33
|
-
return null;
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
});
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file includes polyfills needed by Angular and is loaded before the app.
|
|
3
|
-
* You can add your own extra polyfills to this file.
|
|
4
|
-
*
|
|
5
|
-
* This file is divided into 2 sections:
|
|
6
|
-
* 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
|
|
7
|
-
* 2. Application imports. Files imported after ZoneJS that should be loaded before your main
|
|
8
|
-
* file.
|
|
9
|
-
*
|
|
10
|
-
* The current setup is for so-called "evergreen" browsers; the last versions of browsers that
|
|
11
|
-
* automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
|
|
12
|
-
* Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
|
|
13
|
-
*
|
|
14
|
-
* Learn more in https://angular.io/guide/browser-support
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
/***************************************************************************************************
|
|
18
|
-
* BROWSER POLYFILLS
|
|
19
|
-
*/
|
|
20
|
-
|
|
21
|
-
/** IE9, IE10, IE11, and Chrome <55 requires all of the following polyfills.
|
|
22
|
-
* This also includes Android Emulators with older versions of Chrome and Google Search/Googlebot
|
|
23
|
-
*/
|
|
24
|
-
|
|
25
|
-
// import 'core-js/es6/symbol';
|
|
26
|
-
// import 'core-js/es6/object';
|
|
27
|
-
// import 'core-js/es6/function';
|
|
28
|
-
// import 'core-js/es6/parse-int';
|
|
29
|
-
// import 'core-js/es6/parse-float';
|
|
30
|
-
// import 'core-js/es6/number';
|
|
31
|
-
// import 'core-js/es6/math';
|
|
32
|
-
// import 'core-js/es6/string';
|
|
33
|
-
// import 'core-js/es6/date';
|
|
34
|
-
// import 'core-js/es6/array';
|
|
35
|
-
// import 'core-js/es6/regexp';
|
|
36
|
-
// import 'core-js/es6/map';
|
|
37
|
-
// import 'core-js/es6/weak-map';
|
|
38
|
-
// import 'core-js/es6/set';
|
|
39
|
-
|
|
40
|
-
/** IE10 and IE11 requires the following for NgClass support on SVG elements */
|
|
41
|
-
// import 'classlist.js'; // Run `npm install --save classlist.js`.
|
|
42
|
-
|
|
43
|
-
/** IE10 and IE11 requires the following for the Reflect API. */
|
|
44
|
-
// import 'core-js/es6/reflect';
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* Web Animations `@angular/platform-browser/animations`
|
|
48
|
-
* Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.
|
|
49
|
-
* Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).
|
|
50
|
-
*/
|
|
51
|
-
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* By default, zone.js will patch all possible macroTask and DomEvents
|
|
55
|
-
* user can disable parts of macroTask/DomEvents patch by setting following flags
|
|
56
|
-
* because those flags need to be set before `zone.js` being loaded, and webpack
|
|
57
|
-
* will put import in the top of bundle, so user need to create a separate file
|
|
58
|
-
* in this directory (for example: zone-flags.ts), and put the following flags
|
|
59
|
-
* into that file, and then add the following code before importing zone.js.
|
|
60
|
-
* import './zone-flags.ts';
|
|
61
|
-
*
|
|
62
|
-
* The flags allowed in zone-flags.ts are listed here.
|
|
63
|
-
*
|
|
64
|
-
* The following flags will work for all browsers.
|
|
65
|
-
*
|
|
66
|
-
* (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
|
|
67
|
-
* (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
|
|
68
|
-
* (window as any).__zone_symbol__BLACK_LISTED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
|
|
69
|
-
*
|
|
70
|
-
* in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
|
|
71
|
-
* with the following flag, it will bypass `zone.js` patch for IE/Edge
|
|
72
|
-
*
|
|
73
|
-
* (window as any).__Zone_enable_cross_context_check = true;
|
|
74
|
-
*
|
|
75
|
-
*/
|
|
76
|
-
|
|
77
|
-
/***************************************************************************************************
|
|
78
|
-
* Zone JS is required by default for Angular itself.
|
|
79
|
-
*/
|
|
80
|
-
import 'zone.js'; // Included with Angular CLI.
|
|
81
|
-
|
|
82
|
-
/***************************************************************************************************
|
|
83
|
-
* APPLICATION IMPORTS
|
|
84
|
-
*/
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/* You can add global styles to this file, and also import other style files */
|
|
2
|
-
$layout-content-background: #fff;
|
|
3
|
-
$primary: #348fe4;
|
|
4
|
-
|
|
5
|
-
$btn-border-radius: 4px;
|
|
6
|
-
$btn-border-radius-lg: 4px;
|
|
7
|
-
$btn-border-radius-sm: 4px;
|
|
8
|
-
$btn-border-radius-xs: 4px;
|
|
9
|
-
|
|
10
|
-
@import 'ngx-tethys/styles/variables.scss';
|
|
11
|
-
@import 'ngx-tethys/styles/index.scss';
|
|
12
|
-
@import './app/root/root.component.scss';
|
|
13
|
-
|
|
14
|
-
.section-card {
|
|
15
|
-
display: block;
|
|
16
|
-
position: relative;
|
|
17
|
-
padding: 15px;
|
|
18
|
-
border: 2px $gray-300 dashed;
|
|
19
|
-
|
|
20
|
-
.section-card-header {
|
|
21
|
-
position: absolute;
|
|
22
|
-
padding: 0 10px;
|
|
23
|
-
background: $white;
|
|
24
|
-
top: -10px;
|
|
25
|
-
left: 5px;
|
|
26
|
-
color: $gray-600; // $gray-500;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
|
|
2
|
-
|
|
3
|
-
import 'zone.js/testing';
|
|
4
|
-
import { getTestBed } from '@angular/core/testing';
|
|
5
|
-
import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';
|
|
6
|
-
|
|
7
|
-
declare const require: any;
|
|
8
|
-
|
|
9
|
-
// First, initialize the Angular testing environment.
|
|
10
|
-
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting());
|
|
11
|
-
// Then we find all the tests.
|
|
12
|
-
const context = require.context('./', true, /\.spec\.ts$/);
|
|
13
|
-
// And load the modules.
|
|
14
|
-
context.keys().map(context);
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "../../tsconfig.json",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"outDir": "../../out-tsc/spec",
|
|
5
|
-
"types": [
|
|
6
|
-
"jasmine",
|
|
7
|
-
"node"
|
|
8
|
-
]
|
|
9
|
-
},
|
|
10
|
-
"files": [
|
|
11
|
-
"src/test.ts",
|
|
12
|
-
"src/polyfills.ts"
|
|
13
|
-
],
|
|
14
|
-
"include": [
|
|
15
|
-
"**/*.spec.ts",
|
|
16
|
-
"**/*.d.ts"
|
|
17
|
-
]
|
|
18
|
-
}
|