@worktile/planet 12.1.1 → 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.
Files changed (328) hide show
  1. package/application/planet-application-loader.d.ts +70 -0
  2. package/application/planet-application-loader.d.ts.map +1 -0
  3. package/application/planet-application-loader.ngfactory.d.ts.map +1 -0
  4. package/application/planet-application-ref.d.ts +36 -0
  5. package/application/planet-application-ref.d.ts.map +1 -0
  6. package/application/planet-application.service.d.ts +19 -0
  7. package/application/planet-application.service.d.ts.map +1 -0
  8. package/application/planet-application.service.ngfactory.d.ts.map +1 -0
  9. package/{packages/planet/src/application/portal-application.ts → application/portal-application.d.ts} +5 -18
  10. package/application/portal-application.d.ts.map +1 -0
  11. package/assets-loader.d.ts +33 -0
  12. package/assets-loader.d.ts.map +1 -0
  13. package/assets-loader.ngfactory.d.ts.map +1 -0
  14. package/bundles/worktile-planet.umd.js +2564 -0
  15. package/bundles/worktile-planet.umd.js.map +1 -0
  16. package/component/planet-component-loader.d.ts +28 -0
  17. package/component/planet-component-loader.d.ts.map +1 -0
  18. package/component/planet-component-loader.ngfactory.d.ts.map +1 -0
  19. package/component/planet-component-ref.d.ts +8 -0
  20. package/component/planet-component-ref.d.ts.map +1 -0
  21. package/{packages/planet/src/component/plant-component.config.ts → component/plant-component.config.d.ts} +4 -4
  22. package/component/plant-component.config.d.ts.map +1 -0
  23. package/debug.d.ts +22 -0
  24. package/debug.d.ts.map +1 -0
  25. package/empty/empty.component.d.ts +3 -0
  26. package/empty/empty.component.d.ts.map +1 -0
  27. package/empty/empty.component.ngfactory.d.ts.map +1 -0
  28. package/esm2015/application/planet-application-loader.js +457 -0
  29. package/esm2015/application/planet-application-ref.js +97 -0
  30. package/esm2015/application/planet-application.service.js +87 -0
  31. package/esm2015/application/portal-application.js +16 -0
  32. package/esm2015/assets-loader.js +217 -0
  33. package/esm2015/component/planet-component-loader.js +155 -0
  34. package/esm2015/component/planet-component-ref.js +3 -0
  35. package/esm2015/component/plant-component.config.js +7 -0
  36. package/esm2015/debug.js +33 -0
  37. package/esm2015/empty/empty.component.js +10 -0
  38. package/esm2015/global-event-dispatcher.js +71 -0
  39. package/esm2015/global-planet.js +54 -0
  40. package/esm2015/helpers.js +119 -0
  41. package/esm2015/module.js +27 -0
  42. package/esm2015/planet.class.js +9 -0
  43. package/esm2015/planet.js +91 -0
  44. package/esm2015/public-api.js +18 -0
  45. package/esm2015/sandbox/constants.js +7 -0
  46. package/esm2015/sandbox/exec.js +15 -0
  47. package/esm2015/sandbox/index.js +20 -0
  48. package/esm2015/sandbox/proxy/patches/document.js +12 -0
  49. package/esm2015/sandbox/proxy/patches/eventListener.js +41 -0
  50. package/esm2015/sandbox/proxy/patches/index.js +11 -0
  51. package/esm2015/sandbox/proxy/patches/storage.js +40 -0
  52. package/esm2015/sandbox/proxy/patches/timer.js +43 -0
  53. package/esm2015/sandbox/proxy/proxies/common.js +132 -0
  54. package/esm2015/sandbox/proxy/proxies/document.js +126 -0
  55. package/esm2015/sandbox/proxy/proxies/window.js +155 -0
  56. package/esm2015/sandbox/proxy/proxy-sandbox.js +49 -0
  57. package/esm2015/sandbox/proxy/types.js +2 -0
  58. package/esm2015/sandbox/sandbox.js +7 -0
  59. package/esm2015/sandbox/snapshot/snapshot-sandbox.js +12 -0
  60. package/esm2015/sandbox/types.js +2 -0
  61. package/esm2015/worktile-planet.js +6 -0
  62. package/fesm2015/worktile-planet.js +2048 -0
  63. package/fesm2015/worktile-planet.js.map +1 -0
  64. package/global-event-dispatcher.d.ts +20 -0
  65. package/global-event-dispatcher.d.ts.map +1 -0
  66. package/global-event-dispatcher.ngfactory.d.ts.map +1 -0
  67. package/global-planet.d.ts +23 -0
  68. package/global-planet.d.ts.map +1 -0
  69. package/helpers.d.ts +39 -0
  70. package/helpers.d.ts.map +1 -0
  71. package/module.d.ts +6 -0
  72. package/module.d.ts.map +1 -0
  73. package/module.ngfactory.d.ts.map +1 -0
  74. package/package.json +16 -121
  75. package/{packages/planet/src/planet.class.ts → planet.class.d.ts} +5 -26
  76. package/planet.class.d.ts.map +1 -0
  77. package/planet.d.ts +25 -0
  78. package/planet.d.ts.map +1 -0
  79. package/planet.ngfactory.d.ts.map +1 -0
  80. package/{packages/planet/src/public-api.ts → public-api.d.ts} +1 -4
  81. package/public-api.d.ts.map +1 -0
  82. package/sandbox/constants.d.ts +7 -0
  83. package/sandbox/constants.d.ts.map +1 -0
  84. package/sandbox/exec.d.ts +3 -0
  85. package/sandbox/exec.d.ts.map +1 -0
  86. package/sandbox/index.d.ts +7 -0
  87. package/sandbox/index.d.ts.map +1 -0
  88. package/sandbox/proxy/patches/document.d.ts +3 -0
  89. package/sandbox/proxy/patches/document.d.ts.map +1 -0
  90. package/sandbox/proxy/patches/eventListener.d.ts +3 -0
  91. package/sandbox/proxy/patches/eventListener.d.ts.map +1 -0
  92. package/sandbox/proxy/patches/index.d.ts +3 -0
  93. package/sandbox/proxy/patches/index.d.ts.map +1 -0
  94. package/sandbox/proxy/patches/storage.d.ts +15 -0
  95. package/sandbox/proxy/patches/storage.d.ts.map +1 -0
  96. package/sandbox/proxy/patches/timer.d.ts +3 -0
  97. package/sandbox/proxy/patches/timer.d.ts.map +1 -0
  98. package/sandbox/proxy/proxies/common.d.ts +13 -0
  99. package/sandbox/proxy/proxies/common.d.ts.map +1 -0
  100. package/sandbox/proxy/proxies/document.d.ts +14 -0
  101. package/sandbox/proxy/proxies/document.d.ts.map +1 -0
  102. package/sandbox/proxy/proxies/window.d.ts +13 -0
  103. package/sandbox/proxy/proxies/window.d.ts.map +1 -0
  104. package/sandbox/proxy/proxy-sandbox.d.ts +16 -0
  105. package/sandbox/proxy/proxy-sandbox.d.ts.map +1 -0
  106. package/{packages/planet/src/sandbox/proxy/types.ts → sandbox/proxy/types.d.ts} +2 -8
  107. package/sandbox/proxy/types.d.ts.map +1 -0
  108. package/sandbox/sandbox.d.ts +12 -0
  109. package/sandbox/sandbox.d.ts.map +1 -0
  110. package/sandbox/snapshot/snapshot-sandbox.d.ts +9 -0
  111. package/sandbox/snapshot/snapshot-sandbox.d.ts.map +1 -0
  112. package/sandbox/types.d.ts +2 -0
  113. package/sandbox/types.d.ts.map +1 -0
  114. package/worktile-planet.d.ts +6 -0
  115. package/worktile-planet.d.ts.map +1 -0
  116. package/worktile-planet.metadata.json +1 -0
  117. package/.all-contributorsrc +0 -84
  118. package/.circleci/config.yml +0 -17
  119. package/.coveralls.yml +0 -1
  120. package/.docgeni/public/assets/favicon.ico +0 -0
  121. package/.docgeni/public/index.html +0 -13
  122. package/.docgenirc.js +0 -35
  123. package/.dockerignore +0 -1
  124. package/.editorconfig +0 -22
  125. package/.github/FUNDING.yml +0 -12
  126. package/.github/ISSUE_TEMPLATE/bug_report.md +0 -38
  127. package/.github/ISSUE_TEMPLATE/feature_request.md +0 -20
  128. package/.prettierignore +0 -7
  129. package/.prettierrc +0 -28
  130. package/.travis.yml +0 -26
  131. package/.wpmrc.js +0 -11
  132. package/CHANGELOG.md +0 -391
  133. package/CODE_OF_CONDUCT.md +0 -76
  134. package/Dockerfile +0 -11
  135. package/LICENSE +0 -21
  136. package/README.md +0 -348
  137. package/README.zh-CN.md +0 -307
  138. package/SECURITY.md +0 -21
  139. package/angular.json +0 -373
  140. package/commitlint.config.js +0 -6
  141. package/docs/api/defineApplication.md +0 -46
  142. package/docs/api/globalEventDispatcher.md +0 -51
  143. package/docs/api/index.md +0 -5
  144. package/docs/api/planet.md +0 -117
  145. package/docs/guides/getting-started.md +0 -174
  146. package/docs/guides/index.md +0 -5
  147. package/docs/guides/intro.md +0 -216
  148. package/examples/app1/browserslist +0 -11
  149. package/examples/app1/extra-webpack.config.js +0 -33
  150. package/examples/app1/karma.conf.js +0 -31
  151. package/examples/app1/postcss.config.js +0 -1
  152. package/examples/app1/src/app/app.module.ts +0 -44
  153. package/examples/app1/src/app/app.routing.ts +0 -49
  154. package/examples/app1/src/app/counter.service.ts +0 -16
  155. package/examples/app1/src/app/dashboard/dashboard.component.html +0 -51
  156. package/examples/app1/src/app/dashboard/dashboard.component.ts +0 -70
  157. package/examples/app1/src/app/detail/detail.component.html +0 -8
  158. package/examples/app1/src/app/detail/detail.component.ts +0 -18
  159. package/examples/app1/src/app/overlay.ts +0 -26
  160. package/examples/app1/src/app/projects/dialog/projects-dialog.component.html +0 -10
  161. package/examples/app1/src/app/projects/dialog/projects-dialog.component.ts +0 -41
  162. package/examples/app1/src/app/projects/projects.component.ts +0 -33
  163. package/examples/app1/src/app/root/root.component.css +0 -3
  164. package/examples/app1/src/app/root/root.component.html +0 -16
  165. package/examples/app1/src/app/root/root.component.ts +0 -35
  166. package/examples/app1/src/app/services/initialized-data.resolver.ts +0 -15
  167. package/examples/app1/src/app/shared.module.ts +0 -57
  168. package/examples/app1/src/app/user/detail/user-detail.component.html +0 -5
  169. package/examples/app1/src/app/user/detail/user-detail.component.ts +0 -20
  170. package/examples/app1/src/app/user/user-list.component.html +0 -7
  171. package/examples/app1/src/app/user/user-list.component.ts +0 -20
  172. package/examples/app1/src/app/user/user.module.ts +0 -31
  173. package/examples/app1/src/assets/.gitkeep +0 -0
  174. package/examples/app1/src/assets/github.png +0 -0
  175. package/examples/app1/src/assets/main.css +0 -3
  176. package/examples/app1/src/environments/environment.prod.ts +0 -3
  177. package/examples/app1/src/environments/environment.ts +0 -16
  178. package/examples/app1/src/favicon.ico +0 -0
  179. package/examples/app1/src/index.html +0 -14
  180. package/examples/app1/src/main.ts +0 -35
  181. package/examples/app1/src/polyfills.ts +0 -84
  182. package/examples/app1/src/styles.scss +0 -35
  183. package/examples/app1/src/test.ts +0 -14
  184. package/examples/app1/temp.js +0 -221
  185. package/examples/app1/tsconfig.app.json +0 -10
  186. package/examples/app1/tsconfig.spec.json +0 -18
  187. package/examples/app1/tslint.json +0 -17
  188. package/examples/app1/webpack.config.js +0 -127
  189. package/examples/app2/browserslist +0 -11
  190. package/examples/app2/extra-webpack.config.js +0 -32
  191. package/examples/app2/karma.conf.js +0 -31
  192. package/examples/app2/src/app/app.module.ts +0 -90
  193. package/examples/app2/src/app/dashboard/dashboard.component.html +0 -21
  194. package/examples/app2/src/app/dashboard/dashboard.component.ts +0 -27
  195. package/examples/app2/src/app/overlay.ts +0 -26
  196. package/examples/app2/src/app/projects/detail/detail.component.html +0 -16
  197. package/examples/app2/src/app/projects/detail/detail.component.ts +0 -21
  198. package/examples/app2/src/app/projects/project-list.component.html +0 -29
  199. package/examples/app2/src/app/projects/project-list.component.ts +0 -58
  200. package/examples/app2/src/app/projects/project.resolver.ts +0 -15
  201. package/examples/app2/src/app/projects/projects.service.ts +0 -28
  202. package/examples/app2/src/app/projects/tasks/tasks.component.html +0 -10
  203. package/examples/app2/src/app/projects/tasks/tasks.component.ts +0 -16
  204. package/examples/app2/src/app/projects/view/view.component.html +0 -1
  205. package/examples/app2/src/app/projects/view/view.component.ts +0 -20
  206. package/examples/app2/src/app/root/root.component.html +0 -14
  207. package/examples/app2/src/app/root/root.component.scss +0 -12
  208. package/examples/app2/src/app/root/root.component.ts +0 -28
  209. package/examples/app2/src/app/shared.module.ts +0 -59
  210. package/examples/app2/src/assets/.gitkeep +0 -0
  211. package/examples/app2/src/environments/environment.prod.ts +0 -3
  212. package/examples/app2/src/environments/environment.ts +0 -16
  213. package/examples/app2/src/favicon.ico +0 -0
  214. package/examples/app2/src/index.html +0 -14
  215. package/examples/app2/src/main.ts +0 -36
  216. package/examples/app2/src/polyfills.ts +0 -84
  217. package/examples/app2/src/styles.scss +0 -28
  218. package/examples/app2/src/test.ts +0 -14
  219. package/examples/app2/tsconfig.app.json +0 -10
  220. package/examples/app2/tsconfig.spec.json +0 -18
  221. package/examples/app2/tslint.json +0 -7
  222. package/examples/app2/webpack.config.js +0 -92
  223. package/examples/common/app-root-context.ts +0 -10
  224. package/examples/common/cache.ts +0 -82
  225. package/examples/common/index.ts +0 -13
  226. package/examples/common/module.ts +0 -10
  227. package/examples/common/overlay-container.service.ts +0 -28
  228. package/examples/common/section-card/section-card.component.html +0 -5
  229. package/examples/common/section-card/section-card.component.scss +0 -15
  230. package/examples/common/section-card/section-card.component.ts +0 -11
  231. package/examples/common/utils.ts +0 -0
  232. package/examples/portal/src/app/a-detail/a-detail.component.html +0 -8
  233. package/examples/portal/src/app/a-detail/a-detail.component.ts +0 -18
  234. package/examples/portal/src/app/about/about.component.html +0 -27
  235. package/examples/portal/src/app/about/about.component.scss +0 -0
  236. package/examples/portal/src/app/about/about.component.spec.ts +0 -26
  237. package/examples/portal/src/app/about/about.component.ts +0 -26
  238. package/examples/portal/src/app/app-routing.module.ts +0 -57
  239. package/examples/portal/src/app/app.component.html +0 -73
  240. package/examples/portal/src/app/app.component.scss +0 -58
  241. package/examples/portal/src/app/app.component.spec.ts +0 -33
  242. package/examples/portal/src/app/app.component.ts +0 -111
  243. package/examples/portal/src/app/app.module.ts +0 -64
  244. package/examples/portal/src/app/custom-settings.service.ts +0 -44
  245. package/examples/portal/src/app/overlay.ts +0 -26
  246. package/examples/portal/src/app/settings/settings.component.html +0 -31
  247. package/examples/portal/src/app/settings/settings.component.scss +0 -3
  248. package/examples/portal/src/app/settings/settings.component.ts +0 -43
  249. package/examples/portal/src/assets/.gitkeep +0 -0
  250. package/examples/portal/src/assets/apps.json +0 -29
  251. package/examples/portal/src/assets/icons/sprite.defs.svg +0 -1
  252. package/examples/portal/src/assets/images/logo.svg +0 -16
  253. package/examples/portal/src/assets/ngx-planet-micro-front-end.gif +0 -0
  254. package/examples/portal/src/browserslist +0 -11
  255. package/examples/portal/src/environments/environment.prod.ts +0 -3
  256. package/examples/portal/src/environments/environment.ts +0 -16
  257. package/examples/portal/src/extra-webpack.config.js +0 -32
  258. package/examples/portal/src/favicon.ico +0 -0
  259. package/examples/portal/src/index.html +0 -14
  260. package/examples/portal/src/karma.conf.js +0 -31
  261. package/examples/portal/src/main.ts +0 -18
  262. package/examples/portal/src/polyfills.ts +0 -84
  263. package/examples/portal/src/reboot.scss +0 -14
  264. package/examples/portal/src/styles.scss +0 -14
  265. package/examples/portal/src/test.ts +0 -14
  266. package/examples/portal/src/tsconfig.app.json +0 -10
  267. package/examples/portal/src/tsconfig.spec.json +0 -9
  268. package/examples/portal/src/tslint.json +0 -7
  269. package/extra-webpack.config.js +0 -5
  270. package/nginx.conf +0 -17
  271. package/packages/planet/karma.conf.js +0 -37
  272. package/packages/planet/ng-package.json +0 -7
  273. package/packages/planet/package.json +0 -10
  274. package/packages/planet/src/application/planet-application-loader.spec.ts +0 -1102
  275. package/packages/planet/src/application/planet-application-loader.ts +0 -549
  276. package/packages/planet/src/application/planet-application-ref.spec.ts +0 -233
  277. package/packages/planet/src/application/planet-application-ref.ts +0 -131
  278. package/packages/planet/src/application/planet-application.service.spec.ts +0 -145
  279. package/packages/planet/src/application/planet-application.service.ts +0 -88
  280. package/packages/planet/src/application/portal-application.spec.ts +0 -53
  281. package/packages/planet/src/assets-loader.spec.ts +0 -689
  282. package/packages/planet/src/assets-loader.ts +0 -247
  283. package/packages/planet/src/component/planet-component-loader.spec.ts +0 -187
  284. package/packages/planet/src/component/planet-component-loader.ts +0 -173
  285. package/packages/planet/src/component/planet-component-ref.ts +0 -8
  286. package/packages/planet/src/debug.spec.ts +0 -58
  287. package/packages/planet/src/debug.ts +0 -66
  288. package/packages/planet/src/empty/empty.component.spec.ts +0 -34
  289. package/packages/planet/src/empty/empty.component.ts +0 -7
  290. package/packages/planet/src/global-event-dispatcher.spec.ts +0 -81
  291. package/packages/planet/src/global-event-dispatcher.ts +0 -82
  292. package/packages/planet/src/global-planet.spec.ts +0 -39
  293. package/packages/planet/src/global-planet.ts +0 -73
  294. package/packages/planet/src/helpers.spec.ts +0 -242
  295. package/packages/planet/src/helpers.ts +0 -125
  296. package/packages/planet/src/module.spec.ts +0 -79
  297. package/packages/planet/src/module.ts +0 -25
  298. package/packages/planet/src/planet.spec.ts +0 -226
  299. package/packages/planet/src/planet.ts +0 -113
  300. package/packages/planet/src/sandbox/constants.ts +0 -6
  301. package/packages/planet/src/sandbox/exec.ts +0 -22
  302. package/packages/planet/src/sandbox/index.ts +0 -24
  303. package/packages/planet/src/sandbox/proxy/patches/document.ts +0 -13
  304. package/packages/planet/src/sandbox/proxy/patches/eventListener.ts +0 -49
  305. package/packages/planet/src/sandbox/proxy/patches/index.ts +0 -13
  306. package/packages/planet/src/sandbox/proxy/patches/storage.ts +0 -53
  307. package/packages/planet/src/sandbox/proxy/patches/timer.ts +0 -50
  308. package/packages/planet/src/sandbox/proxy/proxies/common.ts +0 -137
  309. package/packages/planet/src/sandbox/proxy/proxies/document.ts +0 -140
  310. package/packages/planet/src/sandbox/proxy/proxies/window.ts +0 -176
  311. package/packages/planet/src/sandbox/proxy/proxy-sandbox.ts +0 -59
  312. package/packages/planet/src/sandbox/sandbox.ts +0 -20
  313. package/packages/planet/src/sandbox/snapshot/snapshot-sandbox.ts +0 -12
  314. package/packages/planet/src/sandbox/types.ts +0 -1
  315. package/packages/planet/src/test.ts +0 -16
  316. package/packages/planet/src/testing/app1.module.ts +0 -34
  317. package/packages/planet/src/testing/app2.module.ts +0 -24
  318. package/packages/planet/src/testing/applications.ts +0 -58
  319. package/packages/planet/src/testing/index.ts +0 -2
  320. package/packages/planet/src/testing/utils.ts +0 -31
  321. package/packages/planet/tsconfig.lib.json +0 -27
  322. package/packages/planet/tsconfig.lib.prod.json +0 -9
  323. package/packages/planet/tsconfig.spec.json +0 -17
  324. package/packages/planet/tslint.json +0 -7
  325. package/postcss.config.js +0 -3
  326. package/proxy.conf.js +0 -15
  327. package/tsconfig.json +0 -23
  328. 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,12 +0,0 @@
1
- .header {
2
- margin: 10px 20px;
3
- }
4
-
5
- .same-name {
6
- color: green;
7
- :not([planet]) {
8
- .aa {
9
- color: #aaa;
10
- }
11
- }
12
- }
@@ -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,3 +0,0 @@
1
- export const environment = {
2
- production: true
3
- };
@@ -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,10 +0,0 @@
1
- {
2
- "extends": "../../tsconfig.json",
3
- "compilerOptions": {
4
- "outDir": "../../out-tsc/app",
5
- "types": []
6
- },
7
- "files": ["src/main.ts"],
8
- "include": ["src/**/*.d.ts"],
9
- "exclude": ["test.ts", "**/*.spec.ts"]
10
- }
@@ -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
- }
@@ -1,7 +0,0 @@
1
- {
2
- "extends": "../../tslint.json",
3
- "rules": {
4
- "directive-selector": [true, "attribute", "app", "camelCase"],
5
- "component-selector": [true, "element", "app2", "kebab-case"]
6
- }
7
- }