@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.
Files changed (232) hide show
  1. package/README.md +13 -116
  2. package/bundles/worktile-gantt.umd.js +3369 -0
  3. package/bundles/worktile-gantt.umd.js.map +1 -0
  4. package/class/date-point.d.ts +15 -0
  5. package/{packages/gantt/src/class/event.ts → class/event.d.ts} +6 -12
  6. package/class/group.d.ts +22 -0
  7. package/{packages/gantt/src/class/index.ts → class/index.d.ts} +0 -0
  8. package/class/item.d.ts +70 -0
  9. package/class/view-type.d.ts +7 -0
  10. package/components/bar/bar-drag.d.ts +37 -0
  11. package/components/bar/bar.component.d.ts +26 -0
  12. package/components/calendar/calendar.component.d.ts +28 -0
  13. package/components/drag-backdrop/drag-backdrop.component.d.ts +9 -0
  14. package/components/icon/icon.component.d.ts +13 -0
  15. package/components/icon/icons.d.ts +8 -0
  16. package/components/links/links.component.d.ts +47 -0
  17. package/components/main/gantt-main.component.d.ts +21 -0
  18. package/components/range/range.component.d.ts +13 -0
  19. package/components/table/gantt-table.component.d.ts +37 -0
  20. package/esm2015/class/date-point.js +10 -0
  21. package/esm2015/class/event.js +13 -0
  22. package/esm2015/class/group.js +17 -0
  23. package/esm2015/class/index.js +6 -0
  24. package/esm2015/class/item.js +78 -0
  25. package/esm2015/class/view-type.js +9 -0
  26. package/esm2015/components/bar/bar-drag.js +269 -0
  27. package/esm2015/components/bar/bar.component.js +98 -0
  28. package/esm2015/components/calendar/calendar.component.js +86 -0
  29. package/esm2015/components/drag-backdrop/drag-backdrop.component.js +21 -0
  30. package/esm2015/components/icon/icon.component.js +38 -0
  31. package/esm2015/components/icon/icons.js +87 -0
  32. package/esm2015/components/links/links.component.js +213 -0
  33. package/esm2015/components/main/gantt-main.component.js +53 -0
  34. package/esm2015/components/range/range.component.js +37 -0
  35. package/esm2015/components/table/gantt-table.component.js +149 -0
  36. package/esm2015/gantt-abstract.js +3 -0
  37. package/esm2015/gantt-dom.service.js +103 -0
  38. package/esm2015/gantt-drag-container.js +60 -0
  39. package/esm2015/gantt-item-upper.js +58 -0
  40. package/esm2015/gantt-print.service.js +94 -0
  41. package/esm2015/gantt-upper.js +280 -0
  42. package/esm2015/gantt.component.js +135 -0
  43. package/esm2015/gantt.config.js +13 -0
  44. package/esm2015/gantt.module.js +85 -0
  45. package/esm2015/gantt.pipe.js +43 -0
  46. package/esm2015/gantt.styles.js +15 -0
  47. package/esm2015/public-api.js +19 -0
  48. package/esm2015/root.component.js +123 -0
  49. package/esm2015/table/gantt-column.component.js +37 -0
  50. package/esm2015/table/gantt-table.component.js +20 -0
  51. package/esm2015/utils/date.js +160 -0
  52. package/esm2015/utils/helpers.js +55 -0
  53. package/esm2015/views/day.js +54 -0
  54. package/esm2015/views/factory.js +23 -0
  55. package/esm2015/views/month.js +48 -0
  56. package/esm2015/views/quarter.js +51 -0
  57. package/esm2015/views/view.js +123 -0
  58. package/esm2015/views/week.js +49 -0
  59. package/esm2015/views/year.js +50 -0
  60. package/esm2015/worktile-gantt.js +5 -0
  61. package/fesm2015/worktile-gantt.js +2697 -0
  62. package/fesm2015/worktile-gantt.js.map +1 -0
  63. package/{packages/gantt/src/gantt-abstract.ts → gantt-abstract.d.ts} +1 -3
  64. package/gantt-dom.service.d.ts +32 -0
  65. package/gantt-drag-container.d.ts +24 -0
  66. package/gantt-item-upper.d.ts +20 -0
  67. package/gantt-print.service.d.ts +13 -0
  68. package/gantt-upper.d.ts +69 -0
  69. package/gantt.component.d.ts +30 -0
  70. package/gantt.config.d.ts +23 -0
  71. package/gantt.module.d.ts +21 -0
  72. package/gantt.pipe.d.ts +18 -0
  73. package/gantt.styles.d.ts +15 -0
  74. package/main.bundle.scss +645 -0
  75. package/package.json +16 -113
  76. package/{packages/gantt/src/public-api.ts → public-api.d.ts} +1 -4
  77. package/root.component.d.ts +28 -0
  78. package/table/gantt-column.component.d.ts +15 -0
  79. package/table/gantt-table.component.d.ts +10 -0
  80. package/utils/date.d.ts +59 -0
  81. package/utils/helpers.d.ts +12 -0
  82. package/views/day.d.ts +14 -0
  83. package/views/factory.d.ts +8 -0
  84. package/views/month.d.ts +12 -0
  85. package/views/quarter.d.ts +12 -0
  86. package/views/view.d.ts +58 -0
  87. package/views/week.d.ts +12 -0
  88. package/views/year.d.ts +12 -0
  89. package/worktile-gantt.d.ts +5 -0
  90. package/.all-contributorsrc +0 -53
  91. package/.angulardoc.json +0 -4
  92. package/.circleci/config.yml +0 -17
  93. package/.coveralls.yml +0 -1
  94. package/.docgenirc.js +0 -64
  95. package/.editorconfig +0 -22
  96. package/.prettierrc +0 -24
  97. package/.travis.yml +0 -23
  98. package/CHANGELOG.md +0 -564
  99. package/Dockerfile +0 -4
  100. package/LICENSE +0 -21
  101. package/angular.json +0 -136
  102. package/docs/guides/basic/components.md +0 -54
  103. package/docs/guides/basic/event.md +0 -70
  104. package/docs/guides/basic/index.md +0 -4
  105. package/docs/guides/basic/style.md +0 -68
  106. package/docs/guides/basic/type.md +0 -70
  107. package/docs/guides/basic/usage.md +0 -189
  108. package/docs/guides/index.md +0 -5
  109. package/docs/guides/intro/getting-started.md +0 -79
  110. package/docs/guides/intro/index.md +0 -51
  111. package/docs/index.md +0 -0
  112. package/example/browserslist +0 -12
  113. package/example/src/app/app-routing.module.ts +0 -26
  114. package/example/src/app/app.component.html +0 -2
  115. package/example/src/app/app.component.ts +0 -11
  116. package/example/src/app/app.module.ts +0 -57
  117. package/example/src/app/components/components.component.html +0 -6
  118. package/example/src/app/components/components.component.ts +0 -33
  119. package/example/src/app/configuration/parameters/api/zh-cn.js +0 -350
  120. package/example/src/app/configuration/parameters/doc/zh-cn.md +0 -5
  121. package/example/src/app/gantt/gantt.component.html +0 -51
  122. package/example/src/app/gantt/gantt.component.ts +0 -119
  123. package/example/src/app/gantt-advanced/component/flat.component.html +0 -30
  124. package/example/src/app/gantt-advanced/component/flat.component.ts +0 -72
  125. package/example/src/app/gantt-advanced/component/flat.scss +0 -31
  126. package/example/src/app/gantt-advanced/gantt-advanced.component.html +0 -32
  127. package/example/src/app/gantt-advanced/gantt-advanced.component.ts +0 -34
  128. package/example/src/app/gantt-advanced/mocks.ts +0 -158
  129. package/example/src/app/gantt-groups/gantt-groups.component.html +0 -42
  130. package/example/src/app/gantt-groups/gantt-groups.component.ts +0 -62
  131. package/example/src/app/gantt-range/gantt-range.component.html +0 -66
  132. package/example/src/app/gantt-range/gantt-range.component.ts +0 -67
  133. package/example/src/app/gantt-range/mocks.ts +0 -150
  134. package/example/src/app/helper.ts +0 -38
  135. package/example/src/assets/.gitkeep +0 -0
  136. package/example/src/environments/environment.prod.ts +0 -3
  137. package/example/src/environments/environment.ts +0 -16
  138. package/example/src/favicon.ico +0 -0
  139. package/example/src/index.html +0 -13
  140. package/example/src/main.ts +0 -12
  141. package/example/src/polyfills.ts +0 -63
  142. package/example/src/styles.scss +0 -56
  143. package/example/tsconfig.app.json +0 -18
  144. package/nginx.conf +0 -17
  145. package/packages/gantt/README.md +0 -24
  146. package/packages/gantt/karma.conf.js +0 -46
  147. package/packages/gantt/ng-package.json +0 -7
  148. package/packages/gantt/ng-package.prod.json +0 -7
  149. package/packages/gantt/package.json +0 -16
  150. package/packages/gantt/src/class/date-point.ts +0 -14
  151. package/packages/gantt/src/class/group.ts +0 -36
  152. package/packages/gantt/src/class/item.ts +0 -129
  153. package/packages/gantt/src/class/test/group.spec.ts +0 -21
  154. package/packages/gantt/src/class/test/item.spec.ts +0 -102
  155. package/packages/gantt/src/class/view-type.ts +0 -7
  156. package/packages/gantt/src/components/bar/bar-drag.ts +0 -298
  157. package/packages/gantt/src/components/bar/bar.component.html +0 -17
  158. package/packages/gantt/src/components/bar/bar.component.scss +0 -169
  159. package/packages/gantt/src/components/bar/bar.component.ts +0 -109
  160. package/packages/gantt/src/components/bar/test/bar.component.spec.ts +0 -54
  161. package/packages/gantt/src/components/bar/test/bar.drag.spec.ts +0 -196
  162. package/packages/gantt/src/components/calendar/calendar.component.html +0 -52
  163. package/packages/gantt/src/components/calendar/calendar.component.scss +0 -77
  164. package/packages/gantt/src/components/calendar/calendar.component.ts +0 -100
  165. package/packages/gantt/src/components/drag-backdrop/drag-backdrop.component.html +0 -6
  166. package/packages/gantt/src/components/drag-backdrop/drag-backdrop.component.scss +0 -48
  167. package/packages/gantt/src/components/drag-backdrop/drag-backdrop.component.ts +0 -13
  168. package/packages/gantt/src/components/icon/icon.component.scss +0 -13
  169. package/packages/gantt/src/components/icon/icon.component.ts +0 -28
  170. package/packages/gantt/src/components/icon/icons.ts +0 -86
  171. package/packages/gantt/src/components/links/links.component.html +0 -19
  172. package/packages/gantt/src/components/links/links.component.scss +0 -27
  173. package/packages/gantt/src/components/links/links.component.ts +0 -263
  174. package/packages/gantt/src/components/main/gantt-main.component.html +0 -35
  175. package/packages/gantt/src/components/main/gantt-main.component.ts +0 -35
  176. package/packages/gantt/src/components/range/range.component.html +0 -8
  177. package/packages/gantt/src/components/range/range.component.scss +0 -35
  178. package/packages/gantt/src/components/range/range.component.ts +0 -27
  179. package/packages/gantt/src/components/range/test/range.component.spec.ts +0 -80
  180. package/packages/gantt/src/components/table/gantt-table.component.html +0 -105
  181. package/packages/gantt/src/components/table/gantt-table.component.scss +0 -144
  182. package/packages/gantt/src/components/table/gantt-table.component.ts +0 -166
  183. package/packages/gantt/src/components/table/test/table.spec.ts +0 -129
  184. package/packages/gantt/src/gantt-dom.service.ts +0 -134
  185. package/packages/gantt/src/gantt-drag-container.ts +0 -73
  186. package/packages/gantt/src/gantt-item-upper.ts +0 -50
  187. package/packages/gantt/src/gantt-print.service.ts +0 -104
  188. package/packages/gantt/src/gantt-upper.ts +0 -289
  189. package/packages/gantt/src/gantt.component.html +0 -18
  190. package/packages/gantt/src/gantt.component.scss +0 -77
  191. package/packages/gantt/src/gantt.component.ts +0 -134
  192. package/packages/gantt/src/gantt.module.ts +0 -47
  193. package/packages/gantt/src/gantt.pipe.ts +0 -31
  194. package/packages/gantt/src/gantt.styles.ts +0 -28
  195. package/packages/gantt/src/root.component.html +0 -12
  196. package/packages/gantt/src/root.component.ts +0 -121
  197. package/packages/gantt/src/styles/index.scss +0 -9
  198. package/packages/gantt/src/styles/variables.scss +0 -46
  199. package/packages/gantt/src/table/gantt-column.component.ts +0 -25
  200. package/packages/gantt/src/table/gantt-table.component.ts +0 -14
  201. package/packages/gantt/src/table/test/table.spec.ts +0 -56
  202. package/packages/gantt/src/test/gantt.component.spec.ts +0 -404
  203. package/packages/gantt/src/test/mocks/data.ts +0 -303
  204. package/packages/gantt/src/test.ts +0 -21
  205. package/packages/gantt/src/utils/date.ts +0 -276
  206. package/packages/gantt/src/utils/helpers.ts +0 -66
  207. package/packages/gantt/src/utils/test/date.spec.ts +0 -105
  208. package/packages/gantt/src/utils/test/helpers.spec.ts +0 -73
  209. package/packages/gantt/src/utils/testing.ts +0 -64
  210. package/packages/gantt/src/views/day.ts +0 -74
  211. package/packages/gantt/src/views/factory.ts +0 -25
  212. package/packages/gantt/src/views/month.ts +0 -66
  213. package/packages/gantt/src/views/quarter.ts +0 -68
  214. package/packages/gantt/src/views/test/day.spec.ts +0 -45
  215. package/packages/gantt/src/views/test/factory.spec.ts +0 -41
  216. package/packages/gantt/src/views/test/mock.ts +0 -14
  217. package/packages/gantt/src/views/test/month.spec.ts +0 -45
  218. package/packages/gantt/src/views/test/quarter.spec.ts +0 -45
  219. package/packages/gantt/src/views/test/view.spec.ts +0 -144
  220. package/packages/gantt/src/views/test/week.spec.ts +0 -45
  221. package/packages/gantt/src/views/test/year.spec.ts +0 -45
  222. package/packages/gantt/src/views/view.ts +0 -186
  223. package/packages/gantt/src/views/week.ts +0 -66
  224. package/packages/gantt/src/views/year.ts +0 -62
  225. package/packages/gantt/tsconfig.lib.json +0 -20
  226. package/packages/gantt/tsconfig.lib.prod.json +0 -9
  227. package/packages/gantt/tsconfig.schematics.json +0 -25
  228. package/packages/gantt/tsconfig.spec.json +0 -17
  229. package/packages/gantt/tslint.json +0 -18
  230. package/scss-bundle.config.json +0 -7
  231. package/tsconfig.json +0 -26
  232. package/tslint.json +0 -51
package/README.md CHANGED
@@ -1,127 +1,24 @@
1
- # ngx-gantt
1
+ # Gantt
2
2
 
3
- [![CircleCI](https://circleci.com/gh/worktile/ngx-gantt.svg?style=shield)](https://circleci.com/gh/worktile/ngx-gantt)
4
- [![Coverage Status][coveralls-image]][coveralls-url]
5
- [![npm (scoped)](https://img.shields.io/npm/v/@worktile/gantt?style=flat)](https://www.npmjs.com/package/@worktile/gantt)
6
- [![npm](https://img.shields.io/npm/dm/@worktile/gantt)](https://www.npmjs.com/package/@worktile/gantt)
7
- ![npm bundle size (scoped)](https://img.shields.io/bundlephobia/min/@worktile/gantt)
8
- [![All Contributors](https://img.shields.io/badge/all_contributors-3-orange.svg?style=flat-square)](#contributors-)
3
+ This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 8.2.14.
9
4
 
10
- [coveralls-image]: https://coveralls.io/repos/github/worktile/ngx-gantt/badge.svg?branch=master
11
- [coveralls-url]: https://coveralls.io/github/worktile/ngx-gantt
5
+ ## Code scaffolding
12
6
 
13
- A modern and powerful gantt component for Angular
7
+ Run `ng generate component component-name --project gantt` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project gantt`.
8
+ > Note: Don't forget to add `--project gantt` or else it will be added to the default project in your `angular.json` file.
14
9
 
15
- ## Installation
10
+ ## Build
16
11
 
17
- ```bash
18
- $ npm i @worktile/gantt --save
19
- # or
20
- $ yarn add @worktile/gantt
21
- ```
12
+ Run `ng build gantt` to build the project. The build artifacts will be stored in the `dist/` directory.
22
13
 
23
- ## Demo
14
+ ## Publishing
24
15
 
25
- [Try out our live demo](http://gantt.ngnice.com/)
16
+ After building your library with `ng build gantt`, go to the dist folder `cd dist/gantt` and run `npm publish`.
26
17
 
27
- ## Usage
18
+ ## Running unit tests
28
19
 
29
- ### 1. Import the NgxGanttModule to use into your app.module.ts
20
+ Run `ng test gantt` to execute the unit tests via [Karma](https://karma-runner.github.io).
30
21
 
31
- ```ts
32
- import { NgModule } from '@angular/core';
33
- import { NgxGanttModule } from '@worktile/gantt';
22
+ ## Further help
34
23
 
35
- @NgModule({
36
- ...
37
- imports: [ NgxGanttModule, ... ]
38
- ...
39
- })
40
- export class AppModule {
41
-
42
- }
43
- ```
44
-
45
- ### 2. Import style file in angular.json or import style in your style.scss
46
-
47
- ```json
48
- {
49
- "styles": ["node_modules/@worktile/gantt/main.bundle.scss"]
50
- }
51
- ```
52
-
53
- ```scss
54
- @import '~@worktile/gantt/main.bundle.scss';
55
- ```
56
-
57
- ### 3. Using component
58
-
59
- component.html
60
-
61
- ```html
62
- <ngx-gantt #gantt [items]="items">
63
- <ngx-gantt-table>
64
- <ngx-gantt-column name="Title" width="300px">
65
- <ng-template #cell let-item="item"> {{ item.title }} </ng-template>
66
- </ngx-gantt-column>
67
- </ngx-gantt-table>
68
- </ngx-gantt>
69
- ```
70
-
71
- component.ts
72
-
73
- ```javascript
74
- @Component({
75
- selector: 'app-gantt-example',
76
- templateUrl: './gantt.component.html'
77
- })
78
- export class AppGanttExampleComponent {
79
- items: GanttItem[] = [
80
- { id: '000000', title: 'Task 0', start: 1627729997, end: 1628421197 },
81
- { id: '000001', title: 'Task 1', start: 1617361997, end: 1625483597 }
82
- ];
83
-
84
- constructor() {}
85
- }
86
- ```
87
-
88
- See [Getting Started](http://gantt.ngnice.com/guides/getting-started) for more details.
89
-
90
- ## Development
91
-
92
- ```bash
93
- $ git clone git@github.com:worktile/ngx-gantt.git
94
- $ cd ngx-gantt
95
- $ npm install
96
- $ npm run start
97
- ```
98
-
99
- ## Roadmap
100
-
101
- - [ ] virtual scrolling
102
-
103
- ## Contributors ✨
104
-
105
- Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
106
-
107
- <!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
108
- <!-- prettier-ignore-start -->
109
- <!-- markdownlint-disable -->
110
- <table>
111
- <tr>
112
- <td align="center"><a href="https://github.com/walkerkay"><img src="https://avatars.githubusercontent.com/u/15701592?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Walker</b></sub></a><br /><a href="#question-walkerkay" title="Answering Questions">💬</a> <a href="https://github.com/walkerkay/ngx-gantt/commits?author=walkerkay" title="Code">💻</a> <a href="#design-walkerkay" title="Design">🎨</a> <a href="https://github.com/walkerkay/ngx-gantt/commits?author=walkerkay" title="Documentation">📖</a> <a href="#infra-walkerkay" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="#maintenance-walkerkay" title="Maintenance">🚧</a> <a href="#projectManagement-walkerkay" title="Project Management">📆</a> <a href="https://github.com/walkerkay/ngx-gantt/pulls?q=is%3Apr+reviewed-by%3Awalkerkay" title="Reviewed Pull Requests">👀</a></td>
113
- <td align="center"><a href="https://github.com/HandsomeButterball"><img src="https://avatars.githubusercontent.com/u/17664721?v=4?s=100" width="100px;" alt=""/><br /><sub><b>zhangwen</b></sub></a><br /><a href="https://github.com/walkerkay/ngx-gantt/commits?author=HandsomeButterball" title="Code">💻</a></td>
114
- <td align="center"><a href="https://github.com/mengshuicmq"><img src="https://avatars.githubusercontent.com/u/13193164?v=4?s=100" width="100px;" alt=""/><br /><sub><b>cmq</b></sub></a><br /><a href="https://github.com/walkerkay/ngx-gantt/commits?author=mengshuicmq" title="Code">💻</a></td>
115
- </tr>
116
- </table>
117
-
118
- <!-- markdownlint-restore -->
119
- <!-- prettier-ignore-end -->
120
-
121
- <!-- ALL-CONTRIBUTORS-LIST:END -->
122
-
123
- This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
124
-
125
- ## LICENSE
126
-
127
- [MIT License](https://github.com/worktile/ngx-gantt/blob/master/LICENSE)
24
+ To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).