@worktile/gantt 12.0.1 → 12.1.1
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/README.md +13 -116
- package/bundles/worktile-gantt.umd.js +3369 -0
- package/bundles/worktile-gantt.umd.js.map +1 -0
- package/class/date-point.d.ts +15 -0
- package/{packages/gantt/src/class/event.ts → class/event.d.ts} +6 -12
- package/class/group.d.ts +22 -0
- package/{packages/gantt/src/class/index.ts → class/index.d.ts} +0 -0
- package/class/item.d.ts +70 -0
- package/class/view-type.d.ts +7 -0
- package/components/bar/bar-drag.d.ts +37 -0
- package/components/bar/bar.component.d.ts +26 -0
- package/components/calendar/calendar.component.d.ts +28 -0
- package/components/drag-backdrop/drag-backdrop.component.d.ts +9 -0
- package/components/icon/icon.component.d.ts +13 -0
- package/components/icon/icons.d.ts +8 -0
- package/components/links/links.component.d.ts +47 -0
- package/components/main/gantt-main.component.d.ts +21 -0
- package/components/range/range.component.d.ts +13 -0
- package/components/table/gantt-table.component.d.ts +37 -0
- package/esm2015/class/date-point.js +10 -0
- package/esm2015/class/event.js +13 -0
- package/esm2015/class/group.js +17 -0
- package/esm2015/class/index.js +6 -0
- package/esm2015/class/item.js +78 -0
- package/esm2015/class/view-type.js +9 -0
- package/esm2015/components/bar/bar-drag.js +269 -0
- package/esm2015/components/bar/bar.component.js +98 -0
- package/esm2015/components/calendar/calendar.component.js +86 -0
- package/esm2015/components/drag-backdrop/drag-backdrop.component.js +21 -0
- package/esm2015/components/icon/icon.component.js +38 -0
- package/esm2015/components/icon/icons.js +87 -0
- package/esm2015/components/links/links.component.js +213 -0
- package/esm2015/components/main/gantt-main.component.js +53 -0
- package/esm2015/components/range/range.component.js +37 -0
- package/esm2015/components/table/gantt-table.component.js +149 -0
- package/esm2015/gantt-abstract.js +3 -0
- package/esm2015/gantt-dom.service.js +103 -0
- package/esm2015/gantt-drag-container.js +60 -0
- package/esm2015/gantt-item-upper.js +58 -0
- package/esm2015/gantt-print.service.js +94 -0
- package/esm2015/gantt-upper.js +280 -0
- package/esm2015/gantt.component.js +135 -0
- package/esm2015/gantt.config.js +13 -0
- package/esm2015/gantt.module.js +85 -0
- package/esm2015/gantt.pipe.js +43 -0
- package/esm2015/gantt.styles.js +15 -0
- package/esm2015/public-api.js +19 -0
- package/esm2015/root.component.js +123 -0
- package/esm2015/table/gantt-column.component.js +37 -0
- package/esm2015/table/gantt-table.component.js +20 -0
- package/esm2015/utils/date.js +160 -0
- package/esm2015/utils/helpers.js +55 -0
- package/esm2015/views/day.js +54 -0
- package/esm2015/views/factory.js +23 -0
- package/esm2015/views/month.js +48 -0
- package/esm2015/views/quarter.js +51 -0
- package/esm2015/views/view.js +123 -0
- package/esm2015/views/week.js +49 -0
- package/esm2015/views/year.js +50 -0
- package/esm2015/worktile-gantt.js +5 -0
- package/fesm2015/worktile-gantt.js +2697 -0
- package/fesm2015/worktile-gantt.js.map +1 -0
- package/{packages/gantt/src/gantt-abstract.ts → gantt-abstract.d.ts} +1 -3
- package/gantt-dom.service.d.ts +32 -0
- package/gantt-drag-container.d.ts +24 -0
- package/gantt-item-upper.d.ts +20 -0
- package/gantt-print.service.d.ts +13 -0
- package/gantt-upper.d.ts +69 -0
- package/gantt.component.d.ts +30 -0
- package/gantt.config.d.ts +23 -0
- package/gantt.module.d.ts +21 -0
- package/gantt.pipe.d.ts +18 -0
- package/gantt.styles.d.ts +15 -0
- package/main.bundle.scss +645 -0
- package/package.json +16 -113
- package/{packages/gantt/src/public-api.ts → public-api.d.ts} +1 -4
- package/root.component.d.ts +28 -0
- package/table/gantt-column.component.d.ts +15 -0
- package/table/gantt-table.component.d.ts +10 -0
- package/utils/date.d.ts +59 -0
- package/utils/helpers.d.ts +12 -0
- package/views/day.d.ts +14 -0
- package/views/factory.d.ts +8 -0
- package/views/month.d.ts +12 -0
- package/views/quarter.d.ts +12 -0
- package/views/view.d.ts +58 -0
- package/views/week.d.ts +12 -0
- package/views/year.d.ts +12 -0
- package/worktile-gantt.d.ts +5 -0
- package/.all-contributorsrc +0 -53
- package/.angulardoc.json +0 -4
- package/.circleci/config.yml +0 -17
- package/.coveralls.yml +0 -1
- package/.docgenirc.js +0 -64
- package/.editorconfig +0 -22
- package/.prettierrc +0 -24
- package/.travis.yml +0 -23
- package/CHANGELOG.md +0 -564
- package/Dockerfile +0 -4
- package/LICENSE +0 -21
- package/angular.json +0 -136
- package/docs/guides/basic/components.md +0 -54
- package/docs/guides/basic/event.md +0 -70
- package/docs/guides/basic/index.md +0 -4
- package/docs/guides/basic/style.md +0 -68
- package/docs/guides/basic/type.md +0 -70
- package/docs/guides/basic/usage.md +0 -189
- package/docs/guides/index.md +0 -5
- package/docs/guides/intro/getting-started.md +0 -79
- package/docs/guides/intro/index.md +0 -51
- package/docs/index.md +0 -0
- package/example/browserslist +0 -12
- package/example/src/app/app-routing.module.ts +0 -26
- package/example/src/app/app.component.html +0 -2
- package/example/src/app/app.component.ts +0 -11
- package/example/src/app/app.module.ts +0 -57
- package/example/src/app/components/components.component.html +0 -6
- package/example/src/app/components/components.component.ts +0 -33
- package/example/src/app/configuration/parameters/api/zh-cn.js +0 -350
- package/example/src/app/configuration/parameters/doc/zh-cn.md +0 -5
- package/example/src/app/gantt/gantt.component.html +0 -51
- package/example/src/app/gantt/gantt.component.ts +0 -119
- package/example/src/app/gantt-advanced/component/flat.component.html +0 -30
- package/example/src/app/gantt-advanced/component/flat.component.ts +0 -72
- package/example/src/app/gantt-advanced/component/flat.scss +0 -31
- package/example/src/app/gantt-advanced/gantt-advanced.component.html +0 -32
- package/example/src/app/gantt-advanced/gantt-advanced.component.ts +0 -34
- package/example/src/app/gantt-advanced/mocks.ts +0 -158
- package/example/src/app/gantt-groups/gantt-groups.component.html +0 -42
- package/example/src/app/gantt-groups/gantt-groups.component.ts +0 -62
- package/example/src/app/gantt-range/gantt-range.component.html +0 -66
- package/example/src/app/gantt-range/gantt-range.component.ts +0 -67
- package/example/src/app/gantt-range/mocks.ts +0 -150
- package/example/src/app/helper.ts +0 -38
- package/example/src/assets/.gitkeep +0 -0
- package/example/src/environments/environment.prod.ts +0 -3
- package/example/src/environments/environment.ts +0 -16
- package/example/src/favicon.ico +0 -0
- package/example/src/index.html +0 -13
- package/example/src/main.ts +0 -12
- package/example/src/polyfills.ts +0 -63
- package/example/src/styles.scss +0 -56
- package/example/tsconfig.app.json +0 -18
- package/nginx.conf +0 -17
- package/packages/gantt/README.md +0 -24
- package/packages/gantt/karma.conf.js +0 -46
- package/packages/gantt/ng-package.json +0 -7
- package/packages/gantt/ng-package.prod.json +0 -7
- package/packages/gantt/package.json +0 -16
- package/packages/gantt/src/class/date-point.ts +0 -14
- package/packages/gantt/src/class/group.ts +0 -36
- package/packages/gantt/src/class/item.ts +0 -129
- package/packages/gantt/src/class/test/group.spec.ts +0 -21
- package/packages/gantt/src/class/test/item.spec.ts +0 -102
- package/packages/gantt/src/class/view-type.ts +0 -7
- package/packages/gantt/src/components/bar/bar-drag.ts +0 -298
- package/packages/gantt/src/components/bar/bar.component.html +0 -17
- package/packages/gantt/src/components/bar/bar.component.scss +0 -169
- package/packages/gantt/src/components/bar/bar.component.ts +0 -109
- package/packages/gantt/src/components/bar/test/bar.component.spec.ts +0 -54
- package/packages/gantt/src/components/bar/test/bar.drag.spec.ts +0 -196
- package/packages/gantt/src/components/calendar/calendar.component.html +0 -52
- package/packages/gantt/src/components/calendar/calendar.component.scss +0 -77
- package/packages/gantt/src/components/calendar/calendar.component.ts +0 -100
- package/packages/gantt/src/components/drag-backdrop/drag-backdrop.component.html +0 -6
- package/packages/gantt/src/components/drag-backdrop/drag-backdrop.component.scss +0 -48
- package/packages/gantt/src/components/drag-backdrop/drag-backdrop.component.ts +0 -13
- package/packages/gantt/src/components/icon/icon.component.scss +0 -13
- package/packages/gantt/src/components/icon/icon.component.ts +0 -28
- package/packages/gantt/src/components/icon/icons.ts +0 -86
- package/packages/gantt/src/components/links/links.component.html +0 -19
- package/packages/gantt/src/components/links/links.component.scss +0 -27
- package/packages/gantt/src/components/links/links.component.ts +0 -263
- package/packages/gantt/src/components/main/gantt-main.component.html +0 -35
- package/packages/gantt/src/components/main/gantt-main.component.ts +0 -35
- package/packages/gantt/src/components/range/range.component.html +0 -8
- package/packages/gantt/src/components/range/range.component.scss +0 -35
- package/packages/gantt/src/components/range/range.component.ts +0 -27
- package/packages/gantt/src/components/range/test/range.component.spec.ts +0 -80
- package/packages/gantt/src/components/table/gantt-table.component.html +0 -105
- package/packages/gantt/src/components/table/gantt-table.component.scss +0 -144
- package/packages/gantt/src/components/table/gantt-table.component.ts +0 -166
- package/packages/gantt/src/components/table/test/table.spec.ts +0 -129
- package/packages/gantt/src/gantt-dom.service.ts +0 -134
- package/packages/gantt/src/gantt-drag-container.ts +0 -73
- package/packages/gantt/src/gantt-item-upper.ts +0 -50
- package/packages/gantt/src/gantt-print.service.ts +0 -104
- package/packages/gantt/src/gantt-upper.ts +0 -289
- package/packages/gantt/src/gantt.component.html +0 -18
- package/packages/gantt/src/gantt.component.scss +0 -77
- package/packages/gantt/src/gantt.component.ts +0 -134
- package/packages/gantt/src/gantt.module.ts +0 -47
- package/packages/gantt/src/gantt.pipe.ts +0 -31
- package/packages/gantt/src/gantt.styles.ts +0 -28
- package/packages/gantt/src/root.component.html +0 -12
- package/packages/gantt/src/root.component.ts +0 -121
- package/packages/gantt/src/styles/index.scss +0 -9
- package/packages/gantt/src/styles/variables.scss +0 -46
- package/packages/gantt/src/table/gantt-column.component.ts +0 -25
- package/packages/gantt/src/table/gantt-table.component.ts +0 -14
- package/packages/gantt/src/table/test/table.spec.ts +0 -56
- package/packages/gantt/src/test/gantt.component.spec.ts +0 -404
- package/packages/gantt/src/test/mocks/data.ts +0 -303
- package/packages/gantt/src/test.ts +0 -21
- package/packages/gantt/src/utils/date.ts +0 -276
- package/packages/gantt/src/utils/helpers.ts +0 -66
- package/packages/gantt/src/utils/test/date.spec.ts +0 -105
- package/packages/gantt/src/utils/test/helpers.spec.ts +0 -73
- package/packages/gantt/src/utils/testing.ts +0 -64
- package/packages/gantt/src/views/day.ts +0 -74
- package/packages/gantt/src/views/factory.ts +0 -25
- package/packages/gantt/src/views/month.ts +0 -66
- package/packages/gantt/src/views/quarter.ts +0 -68
- package/packages/gantt/src/views/test/day.spec.ts +0 -45
- package/packages/gantt/src/views/test/factory.spec.ts +0 -41
- package/packages/gantt/src/views/test/mock.ts +0 -14
- package/packages/gantt/src/views/test/month.spec.ts +0 -45
- package/packages/gantt/src/views/test/quarter.spec.ts +0 -45
- package/packages/gantt/src/views/test/view.spec.ts +0 -144
- package/packages/gantt/src/views/test/week.spec.ts +0 -45
- package/packages/gantt/src/views/test/year.spec.ts +0 -45
- package/packages/gantt/src/views/view.ts +0 -186
- package/packages/gantt/src/views/week.ts +0 -66
- package/packages/gantt/src/views/year.ts +0 -62
- package/packages/gantt/tsconfig.lib.json +0 -20
- package/packages/gantt/tsconfig.lib.prod.json +0 -9
- package/packages/gantt/tsconfig.schematics.json +0 -25
- package/packages/gantt/tsconfig.spec.json +0 -17
- package/packages/gantt/tslint.json +0 -18
- package/scss-bundle.config.json +0 -7
- package/tsconfig.json +0 -26
- package/tslint.json +0 -51
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: 介绍
|
|
3
|
-
path: 'intro'
|
|
4
|
-
order: 1
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# 一句话介绍
|
|
8
|
-
|
|
9
|
-
`ngx-gantt` 是一款基于 Angular 框架的甘特图组件,支持多种视图展示并支持多种高级的特性,能快速的帮助开发者搭建自己的甘特图应用。
|
|
10
|
-
|
|
11
|
-
# 特性
|
|
12
|
-
|
|
13
|
-
- 5 种视图(日、周、月、季、年)
|
|
14
|
-
- 任务分组展示
|
|
15
|
-
- 树形结构数据展示并支持异步加载
|
|
16
|
-
- 任务前后置依赖关联及展示
|
|
17
|
-
- 任务拖拽更改时间
|
|
18
|
-
- 表格自定义
|
|
19
|
-
- 滚动加载数据
|
|
20
|
-
- 导出为图片
|
|
21
|
-
- 可定制化开发
|
|
22
|
-
|
|
23
|
-
# 动机
|
|
24
|
-
|
|
25
|
-
2020 年,[PingCode](https://pingcode.com) 准备做一款项目集管理的产品 Plan,Plan 这款产品包含多项目路线图管理,进度管理,资源跟踪以及里程碑管理,其中涉及到路线图,里程碑等功能都需要基于甘特图来实现,随后我们开始调研 Github 中开源的一些甘特图的组件,最终都因为不能满足我们的需求而 pass,其中主要的原因有以下几点:
|
|
26
|
-
|
|
27
|
-
- 不能很好的支持 Angular
|
|
28
|
-
- 有一些功能强大的库依旧依赖 JQuery
|
|
29
|
-
- 不支持多层级展示
|
|
30
|
-
- 默认支持的视图不满足我们的场景
|
|
31
|
-
- 不够灵活
|
|
32
|
-
|
|
33
|
-
基于上述原因,我们决定自己造轮子,做一款基于 Angular 的甘特图组件。
|
|
34
|
-
|
|
35
|
-
## 当前版本
|
|
36
|
-
|
|
37
|
-
[](https://www.npmjs.com/package/@worktile/gantt)
|
|
38
|
-
|
|
39
|
-
## 支持 Angular 版本
|
|
40
|
-
|
|
41
|
-
`ngx-gantt` 与 `@angular/core` 保持相同的主版本号,目前支持 Angular ^12.0.0 版本。
|
|
42
|
-
|
|
43
|
-
## 依赖第三方库
|
|
44
|
-
|
|
45
|
-
- Components Dev Kit (Angular CDK)
|
|
46
|
-
- date-fns
|
|
47
|
-
- html2canvas
|
|
48
|
-
|
|
49
|
-
# 参与贡献
|
|
50
|
-
|
|
51
|
-
Gantt 目前还处于开发中,欢迎一起参与贡献 https://github.com/worktile/ngx-gantt 。
|
package/docs/index.md
DELETED
|
File without changes
|
package/example/browserslist
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
|
|
2
|
-
# For additional information regarding the format and rule options, please see:
|
|
3
|
-
# https://github.com/browserslist/browserslist#queries
|
|
4
|
-
|
|
5
|
-
# You can see what browsers were selected by your queries by running:
|
|
6
|
-
# npx browserslist
|
|
7
|
-
|
|
8
|
-
> 0.5%
|
|
9
|
-
last 2 versions
|
|
10
|
-
Firefox ESR
|
|
11
|
-
not dead
|
|
12
|
-
not IE 9-11 # For IE 9-11 support, remove 'not'.
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { NgModule } from '@angular/core';
|
|
2
|
-
import { Routes, RouterModule } from '@angular/router';
|
|
3
|
-
import { AppGanttExampleComponent } from './gantt/gantt.component';
|
|
4
|
-
import { AppGanttAdvancedExampleComponent } from './gantt-advanced/gantt-advanced.component';
|
|
5
|
-
import { AppGanttRangeExampleComponent } from './gantt-range/gantt-range.component';
|
|
6
|
-
import { AppExampleComponentsComponent } from './components/components.component';
|
|
7
|
-
import { AppGanttGroupsExampleComponent } from './gantt-groups/gantt-groups.component';
|
|
8
|
-
|
|
9
|
-
const routes: Routes = [
|
|
10
|
-
{
|
|
11
|
-
path: 'components',
|
|
12
|
-
component: AppExampleComponentsComponent,
|
|
13
|
-
children: [
|
|
14
|
-
{ path: '', redirectTo: 'basic', pathMatch: 'full' },
|
|
15
|
-
{ path: 'basic', component: AppGanttExampleComponent },
|
|
16
|
-
{ path: 'groups', component: AppGanttGroupsExampleComponent },
|
|
17
|
-
{ path: 'advanced', component: AppGanttAdvancedExampleComponent }
|
|
18
|
-
]
|
|
19
|
-
}
|
|
20
|
-
];
|
|
21
|
-
|
|
22
|
-
@NgModule({
|
|
23
|
-
imports: [RouterModule.forRoot(routes)],
|
|
24
|
-
exports: [RouterModule]
|
|
25
|
-
})
|
|
26
|
-
export class AppRoutingModule {}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Component, HostBinding } from '@angular/core';
|
|
2
|
-
|
|
3
|
-
@Component({
|
|
4
|
-
selector: 'example-root',
|
|
5
|
-
templateUrl: `./app.component.html`,
|
|
6
|
-
styles: [],
|
|
7
|
-
})
|
|
8
|
-
export class AppComponent {
|
|
9
|
-
@HostBinding(`class.dg-main`) isRoot = true;
|
|
10
|
-
title = 'example';
|
|
11
|
-
}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { ThyLayoutModule } from 'ngx-tethys/layout';
|
|
2
|
-
import { setPrintErrorWhenIconNotFound } from 'ngx-tethys/icon';
|
|
3
|
-
import { ThyNavModule } from 'ngx-tethys/nav';
|
|
4
|
-
import { ThyButtonModule } from 'ngx-tethys/button';
|
|
5
|
-
import { ThyCheckboxModule } from 'ngx-tethys/checkbox';
|
|
6
|
-
import { ThyNotifyModule } from 'ngx-tethys/notify';
|
|
7
|
-
import { NgModule } from '@angular/core';
|
|
8
|
-
import { RouterModule } from '@angular/router';
|
|
9
|
-
import { NgxGanttModule } from 'ngx-gantt';
|
|
10
|
-
import { AppComponent } from './app.component';
|
|
11
|
-
import { AppGanttExampleComponent } from './gantt/gantt.component';
|
|
12
|
-
import { AppRoutingModule } from './app-routing.module';
|
|
13
|
-
import { CommonModule } from '@angular/common';
|
|
14
|
-
import { AppGanttAdvancedExampleComponent } from './gantt-advanced/gantt-advanced.component';
|
|
15
|
-
import { AppGanttRangeExampleComponent } from './gantt-range/gantt-range.component';
|
|
16
|
-
import { DOCGENI_SITE_PROVIDERS } from './content/index';
|
|
17
|
-
import { DocgeniTemplateModule } from '@docgeni/template';
|
|
18
|
-
import { BrowserModule } from '@angular/platform-browser';
|
|
19
|
-
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
|
20
|
-
import { AppGanttFlatComponent } from './gantt-advanced/component/flat.component';
|
|
21
|
-
import { EXAMPLE_MODULES } from './content/example-modules';
|
|
22
|
-
import { AppExampleComponentsComponent } from './components/components.component';
|
|
23
|
-
import { AppGanttGroupsExampleComponent } from './gantt-groups/gantt-groups.component';
|
|
24
|
-
|
|
25
|
-
@NgModule({
|
|
26
|
-
declarations: [
|
|
27
|
-
AppComponent,
|
|
28
|
-
AppExampleComponentsComponent,
|
|
29
|
-
AppGanttExampleComponent,
|
|
30
|
-
AppGanttAdvancedExampleComponent,
|
|
31
|
-
AppGanttGroupsExampleComponent,
|
|
32
|
-
AppGanttRangeExampleComponent,
|
|
33
|
-
AppGanttFlatComponent
|
|
34
|
-
],
|
|
35
|
-
imports: [
|
|
36
|
-
BrowserModule,
|
|
37
|
-
BrowserAnimationsModule,
|
|
38
|
-
CommonModule,
|
|
39
|
-
DocgeniTemplateModule,
|
|
40
|
-
NgxGanttModule,
|
|
41
|
-
AppRoutingModule,
|
|
42
|
-
RouterModule.forRoot([]),
|
|
43
|
-
ThyButtonModule,
|
|
44
|
-
ThyNavModule,
|
|
45
|
-
ThyLayoutModule,
|
|
46
|
-
ThyCheckboxModule,
|
|
47
|
-
ThyNotifyModule,
|
|
48
|
-
...EXAMPLE_MODULES
|
|
49
|
-
],
|
|
50
|
-
providers: [...DOCGENI_SITE_PROVIDERS],
|
|
51
|
-
bootstrap: [AppComponent]
|
|
52
|
-
})
|
|
53
|
-
export class AppModule {
|
|
54
|
-
constructor() {
|
|
55
|
-
setPrintErrorWhenIconNotFound(false);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { Component, OnInit } from '@angular/core';
|
|
2
|
-
import { DocItem } from '@docgeni/template';
|
|
3
|
-
|
|
4
|
-
@Component({
|
|
5
|
-
selector: 'app-example-components',
|
|
6
|
-
templateUrl: './components.component.html'
|
|
7
|
-
})
|
|
8
|
-
export class AppExampleComponentsComponent implements OnInit {
|
|
9
|
-
menus: DocItem[] = [
|
|
10
|
-
{
|
|
11
|
-
id: 'basic',
|
|
12
|
-
title: '基本使用',
|
|
13
|
-
subtitle: 'Basic',
|
|
14
|
-
path: 'basic'
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
id: 'groups',
|
|
18
|
-
title: '分组展示',
|
|
19
|
-
subtitle: 'Groups',
|
|
20
|
-
path: 'groups'
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
id: 'advanced',
|
|
24
|
-
title: '高级使用',
|
|
25
|
-
subtitle: 'Advanced',
|
|
26
|
-
path: 'advanced'
|
|
27
|
-
}
|
|
28
|
-
];
|
|
29
|
-
|
|
30
|
-
constructor() {}
|
|
31
|
-
|
|
32
|
-
ngOnInit() {}
|
|
33
|
-
}
|
|
@@ -1,350 +0,0 @@
|
|
|
1
|
-
module.exports = [
|
|
2
|
-
{
|
|
3
|
-
type: 'component',
|
|
4
|
-
name: 'ngx-gantt',
|
|
5
|
-
description: '',
|
|
6
|
-
properties: [
|
|
7
|
-
{
|
|
8
|
-
name: 'items',
|
|
9
|
-
description: `设置数据项,如果单独设置items则会以列表形式展示,如果需要分组展示,则需要设置属性groupId对应分组数据`,
|
|
10
|
-
type: 'GanttItem[]'
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
name: 'groups',
|
|
14
|
-
description: `设置分组数据`,
|
|
15
|
-
type: 'GanttGroup[]'
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
name: 'viewType',
|
|
19
|
-
description: `设置视图类型`,
|
|
20
|
-
type: `day | month | quarter`,
|
|
21
|
-
default: 'month'
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
name: 'start',
|
|
25
|
-
description: `设置甘特图开始时间,格式为10位时间戳`,
|
|
26
|
-
type: 'number'
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
name: 'end',
|
|
30
|
-
description: `设置甘特图结束时间,格式为10位时间戳`,
|
|
31
|
-
type: 'number'
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
name: 'draggable',
|
|
35
|
-
description: `设置是否可拖拽`,
|
|
36
|
-
type: 'boolean',
|
|
37
|
-
default: 'false'
|
|
38
|
-
},
|
|
39
|
-
|
|
40
|
-
{
|
|
41
|
-
name: 'linkable',
|
|
42
|
-
description: `设置是否可连接关联关系`,
|
|
43
|
-
type: 'boolean',
|
|
44
|
-
default: 'false'
|
|
45
|
-
},
|
|
46
|
-
|
|
47
|
-
{
|
|
48
|
-
name: 'maxLevel',
|
|
49
|
-
description: `设置最大展示层级`,
|
|
50
|
-
type: 'number',
|
|
51
|
-
default: 2
|
|
52
|
-
},
|
|
53
|
-
|
|
54
|
-
{
|
|
55
|
-
name: 'async',
|
|
56
|
-
description: `设置是否开始异步`,
|
|
57
|
-
type: 'boolean',
|
|
58
|
-
default: 'false'
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
name: 'childrenResolve',
|
|
62
|
-
description: `设置异步数据源返回函数,返回值为 Observable 数据流`,
|
|
63
|
-
type: 'Function'
|
|
64
|
-
},
|
|
65
|
-
|
|
66
|
-
{
|
|
67
|
-
name: 'styles',
|
|
68
|
-
description: `配置内置的样式选项`,
|
|
69
|
-
type: 'GanttStyles'
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
name: 'viewOptions',
|
|
73
|
-
description: `配置视图选项`,
|
|
74
|
-
type: 'GanttViewOptions'
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
name: 'disabledLoadOnScroll',
|
|
78
|
-
description: `设置是否禁用滚动加载`,
|
|
79
|
-
type: 'boolean',
|
|
80
|
-
default: false
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
name: 'loadOnScroll',
|
|
84
|
-
description: `滚动加载事件`,
|
|
85
|
-
type: 'EventEmitter<GanttLoadOnScrollEvent>'
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
name: 'dragStarted',
|
|
89
|
-
description: `拖拽开始后事件`,
|
|
90
|
-
type: 'EventEmitter<GanttDragEvent>'
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
name: 'dragEnded',
|
|
94
|
-
description: `拖拽结束后事件`,
|
|
95
|
-
type: 'EventEmitter<GanttDragEvent>'
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
name: 'linkDragStarted',
|
|
99
|
-
description: `关联关系拖拽开始后事件`,
|
|
100
|
-
type: 'EventEmitter<GanttLinkDragEvent>'
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
name: 'linkDragEnded',
|
|
104
|
-
description: `关联关系拖拽结束后事件`,
|
|
105
|
-
type: 'EventEmitter<GanttLinkDragEvent>'
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
name: 'barClick',
|
|
109
|
-
description: `右侧时间条点击事件`,
|
|
110
|
-
type: 'EventEmitter<GanttBarClickEvent>'
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
name: 'lineClick',
|
|
114
|
-
description: `关联关系线点击时间`,
|
|
115
|
-
type: 'EventEmitter<GanttLinkDragEvent>'
|
|
116
|
-
},
|
|
117
|
-
{
|
|
118
|
-
name: '#group',
|
|
119
|
-
description: `设置分组显示模板`,
|
|
120
|
-
type: 'TemplateRef<any>'
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
name: '#bar',
|
|
124
|
-
description: `设置时间条显示模板`,
|
|
125
|
-
type: 'TemplateRef<any>'
|
|
126
|
-
},
|
|
127
|
-
{
|
|
128
|
-
name: '#groupHeader',
|
|
129
|
-
description: `设置分组头部显示模板`,
|
|
130
|
-
type: 'TemplateRef<any>'
|
|
131
|
-
},
|
|
132
|
-
{
|
|
133
|
-
name: '#tableEmpty',
|
|
134
|
-
description: `设置空表格模板`,
|
|
135
|
-
type: 'TemplateRef<any>'
|
|
136
|
-
}
|
|
137
|
-
]
|
|
138
|
-
},
|
|
139
|
-
{
|
|
140
|
-
type: 'component',
|
|
141
|
-
name: 'ngx-gantt-table',
|
|
142
|
-
description: '甘特图左侧表格',
|
|
143
|
-
properties: [
|
|
144
|
-
{
|
|
145
|
-
name: 'columnChanges',
|
|
146
|
-
description: `列宽变化事件集`,
|
|
147
|
-
type: 'EventEmitter<GanttTableEvent>'
|
|
148
|
-
}
|
|
149
|
-
]
|
|
150
|
-
},
|
|
151
|
-
{
|
|
152
|
-
type: 'component',
|
|
153
|
-
name: 'ngx-gantt-column',
|
|
154
|
-
description: '甘特图左侧列',
|
|
155
|
-
properties: [
|
|
156
|
-
{
|
|
157
|
-
name: 'name',
|
|
158
|
-
description: `设置列名称`,
|
|
159
|
-
type: 'string'
|
|
160
|
-
},
|
|
161
|
-
{
|
|
162
|
-
name: 'width',
|
|
163
|
-
description: `设置列宽`,
|
|
164
|
-
type: 'string | number'
|
|
165
|
-
},
|
|
166
|
-
{
|
|
167
|
-
name: '#header',
|
|
168
|
-
description: `设置每列头部模板`,
|
|
169
|
-
type: 'TemplateRef<any>'
|
|
170
|
-
},
|
|
171
|
-
{
|
|
172
|
-
name: '#cell',
|
|
173
|
-
description: `设置每列内容模板`,
|
|
174
|
-
type: 'TemplateRef<any>'
|
|
175
|
-
}
|
|
176
|
-
]
|
|
177
|
-
},
|
|
178
|
-
{
|
|
179
|
-
type: 'component',
|
|
180
|
-
name: 'ngx-gantt-bar',
|
|
181
|
-
description: '数据项条形图展示组件',
|
|
182
|
-
properties: [
|
|
183
|
-
{
|
|
184
|
-
name: 'template',
|
|
185
|
-
description: `设置时间条显示模板`,
|
|
186
|
-
type: 'TemplateRef<any>'
|
|
187
|
-
},
|
|
188
|
-
{
|
|
189
|
-
name: 'item',
|
|
190
|
-
description: `设置时间条显示数据`,
|
|
191
|
-
type: 'GanttItemInternal'
|
|
192
|
-
},
|
|
193
|
-
{
|
|
194
|
-
name: 'barClick',
|
|
195
|
-
description: `数据项条形图点击事件`,
|
|
196
|
-
type: 'EventEmitter<GanttBarClickEvent>'
|
|
197
|
-
}
|
|
198
|
-
]
|
|
199
|
-
},
|
|
200
|
-
{
|
|
201
|
-
type: 'component',
|
|
202
|
-
name: 'ngx-gantt-range',
|
|
203
|
-
description: '数据项区间展示组件',
|
|
204
|
-
properties: [
|
|
205
|
-
{
|
|
206
|
-
name: 'template',
|
|
207
|
-
description: `设置区间展示模板`,
|
|
208
|
-
type: 'TemplateRef<any>'
|
|
209
|
-
},
|
|
210
|
-
{
|
|
211
|
-
name: 'item',
|
|
212
|
-
description: `设置区间展示数据`,
|
|
213
|
-
type: 'GanttItemInternal'
|
|
214
|
-
}
|
|
215
|
-
]
|
|
216
|
-
},
|
|
217
|
-
{
|
|
218
|
-
type: 'component',
|
|
219
|
-
name: 'ngx-gantt-root',
|
|
220
|
-
description: '甘特图根组件',
|
|
221
|
-
properties: [
|
|
222
|
-
{
|
|
223
|
-
name: 'sideWidth',
|
|
224
|
-
description: `设置甘特图左侧内容宽度`,
|
|
225
|
-
type: 'number'
|
|
226
|
-
},
|
|
227
|
-
{
|
|
228
|
-
name: 'sideTemplate',
|
|
229
|
-
description: `设置甘特图左侧内容模板`,
|
|
230
|
-
type: 'TemplateRef<any>'
|
|
231
|
-
},
|
|
232
|
-
{
|
|
233
|
-
name: 'mainTemplate',
|
|
234
|
-
description: `设置甘特图右侧主要内容模板`,
|
|
235
|
-
type: 'TemplateRef<any>'
|
|
236
|
-
}
|
|
237
|
-
]
|
|
238
|
-
}
|
|
239
|
-
// {
|
|
240
|
-
// type: 'class',
|
|
241
|
-
// name: 'GanttItem',
|
|
242
|
-
// description: '数据项格式定义',
|
|
243
|
-
// properties: [
|
|
244
|
-
// {
|
|
245
|
-
// name: 'id',
|
|
246
|
-
// description: `唯一标识`,
|
|
247
|
-
// type: 'string'
|
|
248
|
-
// },
|
|
249
|
-
// {
|
|
250
|
-
// name: 'title',
|
|
251
|
-
// description: `名称`,
|
|
252
|
-
// type: 'string'
|
|
253
|
-
// },
|
|
254
|
-
// {
|
|
255
|
-
// name: 'start',
|
|
256
|
-
// description: `开始时间`,
|
|
257
|
-
// type: 'number'
|
|
258
|
-
// },
|
|
259
|
-
// {
|
|
260
|
-
// name: 'end',
|
|
261
|
-
// description: `截止时间`,
|
|
262
|
-
// type: 'number'
|
|
263
|
-
// },
|
|
264
|
-
// {
|
|
265
|
-
// name: 'group_id',
|
|
266
|
-
// description: `对应分组的Id`,
|
|
267
|
-
// type: 'string'
|
|
268
|
-
// },
|
|
269
|
-
// {
|
|
270
|
-
// name: 'links',
|
|
271
|
-
// description: `关联数据项Ids`,
|
|
272
|
-
// type: 'string[]'
|
|
273
|
-
// },
|
|
274
|
-
// {
|
|
275
|
-
// name: 'color',
|
|
276
|
-
// description: `设置颜色`,
|
|
277
|
-
// type: 'string'
|
|
278
|
-
// },
|
|
279
|
-
// {
|
|
280
|
-
// name: 'draggable',
|
|
281
|
-
// description: `设置是否可拖拽`,
|
|
282
|
-
// type: 'boolean'
|
|
283
|
-
// },
|
|
284
|
-
// {
|
|
285
|
-
// name: 'linkable',
|
|
286
|
-
// description: `设置是否可关联/被关联`,
|
|
287
|
-
// type: 'boolean'
|
|
288
|
-
// },
|
|
289
|
-
// {
|
|
290
|
-
// name: 'expand',
|
|
291
|
-
// description: `设置是否展开`,
|
|
292
|
-
// type: 'boolean',
|
|
293
|
-
// default: 'false'
|
|
294
|
-
// },
|
|
295
|
-
// {
|
|
296
|
-
// name: 'children',
|
|
297
|
-
// description: `设置子数据`,
|
|
298
|
-
// type: 'GanttItem[]',
|
|
299
|
-
// default: ''
|
|
300
|
-
// },
|
|
301
|
-
// {
|
|
302
|
-
// name: 'origin',
|
|
303
|
-
// description: `设置原始数据`,
|
|
304
|
-
// type: 'T',
|
|
305
|
-
// default: ''
|
|
306
|
-
// },
|
|
307
|
-
// {
|
|
308
|
-
// name: 'type',
|
|
309
|
-
// description: `数据展示方式(区间展示和普通展示)`,
|
|
310
|
-
// type: 'GanttItemType',
|
|
311
|
-
// default: ''
|
|
312
|
-
// },
|
|
313
|
-
// {
|
|
314
|
-
// name: 'progress',
|
|
315
|
-
// description: `进度`,
|
|
316
|
-
// type: 'number',
|
|
317
|
-
// default: ''
|
|
318
|
-
// }
|
|
319
|
-
// ]
|
|
320
|
-
// },
|
|
321
|
-
// {
|
|
322
|
-
// type: 'class',
|
|
323
|
-
// name: 'GanttGroup',
|
|
324
|
-
// description: '分组数据格式定义',
|
|
325
|
-
// properties: [
|
|
326
|
-
// {
|
|
327
|
-
// name: 'id',
|
|
328
|
-
// description: `唯一标识`,
|
|
329
|
-
// type: 'string'
|
|
330
|
-
// },
|
|
331
|
-
// {
|
|
332
|
-
// name: 'title',
|
|
333
|
-
// description: `名称`,
|
|
334
|
-
// type: 'string'
|
|
335
|
-
// },
|
|
336
|
-
// {
|
|
337
|
-
// name: 'expand',
|
|
338
|
-
// description: `设置是否展开`,
|
|
339
|
-
// type: 'boolean',
|
|
340
|
-
// default: 'true'
|
|
341
|
-
// },
|
|
342
|
-
// {
|
|
343
|
-
// name: 'origin',
|
|
344
|
-
// description: `设置原始数据`,
|
|
345
|
-
// type: 'T',
|
|
346
|
-
// default: ''
|
|
347
|
-
// }
|
|
348
|
-
// ]
|
|
349
|
-
// }
|
|
350
|
-
];
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
<thy-layout>
|
|
2
|
-
<thy-header>
|
|
3
|
-
<ng-template #headerContent>
|
|
4
|
-
<thy-button-group thySize="sm" thyType="outline-default">
|
|
5
|
-
<button thyButton *ngFor="let view of views" [class.active]="view.value === viewType" (click)="viewType = view.value">
|
|
6
|
-
{{ view.name }}
|
|
7
|
-
</button>
|
|
8
|
-
</thy-button-group>
|
|
9
|
-
|
|
10
|
-
<thy-button thyType="primary" thySize="sm" (click)="print('gantt-example')"> ↓ 导出为图片 </thy-button>
|
|
11
|
-
</ng-template>
|
|
12
|
-
<ng-template #headerOperation>
|
|
13
|
-
<a href="https://github.com/worktile/ngx-gantt/blob/master/example/src/app/gantt" target="_blank">查看源码</a>
|
|
14
|
-
</ng-template>
|
|
15
|
-
</thy-header>
|
|
16
|
-
<thy-content>
|
|
17
|
-
<ngx-gantt
|
|
18
|
-
#gantt
|
|
19
|
-
[items]="items"
|
|
20
|
-
[viewType]="viewType"
|
|
21
|
-
[async]="true"
|
|
22
|
-
[childrenResolve]="childrenResolve"
|
|
23
|
-
[draggable]="true"
|
|
24
|
-
[linkable]="true"
|
|
25
|
-
(barClick)="barClick($event)"
|
|
26
|
-
(lineClick)="lineClick($event)"
|
|
27
|
-
(dragEnded)="dragEnded($event)"
|
|
28
|
-
(linkDragEnded)="linkDragEnded($event)"
|
|
29
|
-
>
|
|
30
|
-
<ngx-gantt-table>
|
|
31
|
-
<ngx-gantt-column name="标题" width="180px">
|
|
32
|
-
<ng-template #cell let-item="item"> {{ item.title }} </ng-template>
|
|
33
|
-
</ngx-gantt-column>
|
|
34
|
-
<ngx-gantt-column name="开始时间" width="140px">
|
|
35
|
-
<ng-template #cell let-item="item">
|
|
36
|
-
{{ item.start * 1000 | date: 'yyyy-MM-dd' }}
|
|
37
|
-
</ng-template>
|
|
38
|
-
</ngx-gantt-column>
|
|
39
|
-
<ngx-gantt-column name="截止时间" width="140px">
|
|
40
|
-
<ng-template #cell let-item="item">
|
|
41
|
-
{{ item.end * 1000 | date: 'yyyy-MM-dd' }}
|
|
42
|
-
</ng-template>
|
|
43
|
-
</ngx-gantt-column>
|
|
44
|
-
</ngx-gantt-table>
|
|
45
|
-
|
|
46
|
-
<ng-template #bar let-item="item">
|
|
47
|
-
<span style="color: #fff"> {{ item.title }} </span>
|
|
48
|
-
</ng-template>
|
|
49
|
-
</ngx-gantt>
|
|
50
|
-
</thy-content>
|
|
51
|
-
</thy-layout>
|