@worktile/gantt 12.0.1 → 12.0.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 (230) hide show
  1. package/README.md +13 -116
  2. package/bundles/worktile-gantt.umd.js +3303 -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 +36 -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 +264 -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 +146 -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 +59 -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 +254 -0
  42. package/esm2015/gantt.component.js +131 -0
  43. package/esm2015/gantt.module.js +74 -0
  44. package/esm2015/gantt.pipe.js +43 -0
  45. package/esm2015/gantt.styles.js +15 -0
  46. package/esm2015/public-api.js +18 -0
  47. package/esm2015/root.component.js +123 -0
  48. package/esm2015/table/gantt-column.component.js +37 -0
  49. package/esm2015/table/gantt-table.component.js +20 -0
  50. package/esm2015/utils/date.js +160 -0
  51. package/esm2015/utils/helpers.js +55 -0
  52. package/esm2015/views/day.js +54 -0
  53. package/esm2015/views/factory.js +23 -0
  54. package/esm2015/views/month.js +48 -0
  55. package/esm2015/views/quarter.js +51 -0
  56. package/esm2015/views/view.js +121 -0
  57. package/esm2015/views/week.js +49 -0
  58. package/esm2015/views/year.js +50 -0
  59. package/esm2015/worktile-gantt.js +5 -0
  60. package/fesm2015/worktile-gantt.js +2637 -0
  61. package/fesm2015/worktile-gantt.js.map +1 -0
  62. package/{packages/gantt/src/gantt-abstract.ts → gantt-abstract.d.ts} +1 -3
  63. package/gantt-dom.service.d.ts +32 -0
  64. package/gantt-drag-container.d.ts +23 -0
  65. package/gantt-item-upper.d.ts +20 -0
  66. package/gantt-print.service.d.ts +13 -0
  67. package/gantt-upper.d.ts +64 -0
  68. package/gantt.component.d.ts +29 -0
  69. package/gantt.module.d.ts +21 -0
  70. package/gantt.pipe.d.ts +18 -0
  71. package/gantt.styles.d.ts +15 -0
  72. package/main.bundle.scss +645 -0
  73. package/package.json +16 -113
  74. package/{packages/gantt/src/public-api.ts → public-api.d.ts} +0 -4
  75. package/root.component.d.ts +28 -0
  76. package/table/gantt-column.component.d.ts +15 -0
  77. package/table/gantt-table.component.d.ts +10 -0
  78. package/utils/date.d.ts +59 -0
  79. package/utils/helpers.d.ts +12 -0
  80. package/views/day.d.ts +14 -0
  81. package/views/factory.d.ts +8 -0
  82. package/views/month.d.ts +12 -0
  83. package/views/quarter.d.ts +12 -0
  84. package/views/view.d.ts +56 -0
  85. package/views/week.d.ts +12 -0
  86. package/views/year.d.ts +12 -0
  87. package/worktile-gantt.d.ts +5 -0
  88. package/.all-contributorsrc +0 -53
  89. package/.angulardoc.json +0 -4
  90. package/.circleci/config.yml +0 -17
  91. package/.coveralls.yml +0 -1
  92. package/.docgenirc.js +0 -64
  93. package/.editorconfig +0 -22
  94. package/.prettierrc +0 -24
  95. package/.travis.yml +0 -23
  96. package/CHANGELOG.md +0 -564
  97. package/Dockerfile +0 -4
  98. package/LICENSE +0 -21
  99. package/angular.json +0 -136
  100. package/docs/guides/basic/components.md +0 -54
  101. package/docs/guides/basic/event.md +0 -70
  102. package/docs/guides/basic/index.md +0 -4
  103. package/docs/guides/basic/style.md +0 -68
  104. package/docs/guides/basic/type.md +0 -70
  105. package/docs/guides/basic/usage.md +0 -189
  106. package/docs/guides/index.md +0 -5
  107. package/docs/guides/intro/getting-started.md +0 -79
  108. package/docs/guides/intro/index.md +0 -51
  109. package/docs/index.md +0 -0
  110. package/example/browserslist +0 -12
  111. package/example/src/app/app-routing.module.ts +0 -26
  112. package/example/src/app/app.component.html +0 -2
  113. package/example/src/app/app.component.ts +0 -11
  114. package/example/src/app/app.module.ts +0 -57
  115. package/example/src/app/components/components.component.html +0 -6
  116. package/example/src/app/components/components.component.ts +0 -33
  117. package/example/src/app/configuration/parameters/api/zh-cn.js +0 -350
  118. package/example/src/app/configuration/parameters/doc/zh-cn.md +0 -5
  119. package/example/src/app/gantt/gantt.component.html +0 -51
  120. package/example/src/app/gantt/gantt.component.ts +0 -119
  121. package/example/src/app/gantt-advanced/component/flat.component.html +0 -30
  122. package/example/src/app/gantt-advanced/component/flat.component.ts +0 -72
  123. package/example/src/app/gantt-advanced/component/flat.scss +0 -31
  124. package/example/src/app/gantt-advanced/gantt-advanced.component.html +0 -32
  125. package/example/src/app/gantt-advanced/gantt-advanced.component.ts +0 -34
  126. package/example/src/app/gantt-advanced/mocks.ts +0 -158
  127. package/example/src/app/gantt-groups/gantt-groups.component.html +0 -42
  128. package/example/src/app/gantt-groups/gantt-groups.component.ts +0 -62
  129. package/example/src/app/gantt-range/gantt-range.component.html +0 -66
  130. package/example/src/app/gantt-range/gantt-range.component.ts +0 -67
  131. package/example/src/app/gantt-range/mocks.ts +0 -150
  132. package/example/src/app/helper.ts +0 -38
  133. package/example/src/assets/.gitkeep +0 -0
  134. package/example/src/environments/environment.prod.ts +0 -3
  135. package/example/src/environments/environment.ts +0 -16
  136. package/example/src/favicon.ico +0 -0
  137. package/example/src/index.html +0 -13
  138. package/example/src/main.ts +0 -12
  139. package/example/src/polyfills.ts +0 -63
  140. package/example/src/styles.scss +0 -56
  141. package/example/tsconfig.app.json +0 -18
  142. package/nginx.conf +0 -17
  143. package/packages/gantt/README.md +0 -24
  144. package/packages/gantt/karma.conf.js +0 -46
  145. package/packages/gantt/ng-package.json +0 -7
  146. package/packages/gantt/ng-package.prod.json +0 -7
  147. package/packages/gantt/package.json +0 -16
  148. package/packages/gantt/src/class/date-point.ts +0 -14
  149. package/packages/gantt/src/class/group.ts +0 -36
  150. package/packages/gantt/src/class/item.ts +0 -129
  151. package/packages/gantt/src/class/test/group.spec.ts +0 -21
  152. package/packages/gantt/src/class/test/item.spec.ts +0 -102
  153. package/packages/gantt/src/class/view-type.ts +0 -7
  154. package/packages/gantt/src/components/bar/bar-drag.ts +0 -298
  155. package/packages/gantt/src/components/bar/bar.component.html +0 -17
  156. package/packages/gantt/src/components/bar/bar.component.scss +0 -169
  157. package/packages/gantt/src/components/bar/bar.component.ts +0 -109
  158. package/packages/gantt/src/components/bar/test/bar.component.spec.ts +0 -54
  159. package/packages/gantt/src/components/bar/test/bar.drag.spec.ts +0 -196
  160. package/packages/gantt/src/components/calendar/calendar.component.html +0 -52
  161. package/packages/gantt/src/components/calendar/calendar.component.scss +0 -77
  162. package/packages/gantt/src/components/calendar/calendar.component.ts +0 -100
  163. package/packages/gantt/src/components/drag-backdrop/drag-backdrop.component.html +0 -6
  164. package/packages/gantt/src/components/drag-backdrop/drag-backdrop.component.scss +0 -48
  165. package/packages/gantt/src/components/drag-backdrop/drag-backdrop.component.ts +0 -13
  166. package/packages/gantt/src/components/icon/icon.component.scss +0 -13
  167. package/packages/gantt/src/components/icon/icon.component.ts +0 -28
  168. package/packages/gantt/src/components/icon/icons.ts +0 -86
  169. package/packages/gantt/src/components/links/links.component.html +0 -19
  170. package/packages/gantt/src/components/links/links.component.scss +0 -27
  171. package/packages/gantt/src/components/links/links.component.ts +0 -263
  172. package/packages/gantt/src/components/main/gantt-main.component.html +0 -35
  173. package/packages/gantt/src/components/main/gantt-main.component.ts +0 -35
  174. package/packages/gantt/src/components/range/range.component.html +0 -8
  175. package/packages/gantt/src/components/range/range.component.scss +0 -35
  176. package/packages/gantt/src/components/range/range.component.ts +0 -27
  177. package/packages/gantt/src/components/range/test/range.component.spec.ts +0 -80
  178. package/packages/gantt/src/components/table/gantt-table.component.html +0 -105
  179. package/packages/gantt/src/components/table/gantt-table.component.scss +0 -144
  180. package/packages/gantt/src/components/table/gantt-table.component.ts +0 -166
  181. package/packages/gantt/src/components/table/test/table.spec.ts +0 -129
  182. package/packages/gantt/src/gantt-dom.service.ts +0 -134
  183. package/packages/gantt/src/gantt-drag-container.ts +0 -73
  184. package/packages/gantt/src/gantt-item-upper.ts +0 -50
  185. package/packages/gantt/src/gantt-print.service.ts +0 -104
  186. package/packages/gantt/src/gantt-upper.ts +0 -289
  187. package/packages/gantt/src/gantt.component.html +0 -18
  188. package/packages/gantt/src/gantt.component.scss +0 -77
  189. package/packages/gantt/src/gantt.component.ts +0 -134
  190. package/packages/gantt/src/gantt.module.ts +0 -47
  191. package/packages/gantt/src/gantt.pipe.ts +0 -31
  192. package/packages/gantt/src/gantt.styles.ts +0 -28
  193. package/packages/gantt/src/root.component.html +0 -12
  194. package/packages/gantt/src/root.component.ts +0 -121
  195. package/packages/gantt/src/styles/index.scss +0 -9
  196. package/packages/gantt/src/styles/variables.scss +0 -46
  197. package/packages/gantt/src/table/gantt-column.component.ts +0 -25
  198. package/packages/gantt/src/table/gantt-table.component.ts +0 -14
  199. package/packages/gantt/src/table/test/table.spec.ts +0 -56
  200. package/packages/gantt/src/test/gantt.component.spec.ts +0 -404
  201. package/packages/gantt/src/test/mocks/data.ts +0 -303
  202. package/packages/gantt/src/test.ts +0 -21
  203. package/packages/gantt/src/utils/date.ts +0 -276
  204. package/packages/gantt/src/utils/helpers.ts +0 -66
  205. package/packages/gantt/src/utils/test/date.spec.ts +0 -105
  206. package/packages/gantt/src/utils/test/helpers.spec.ts +0 -73
  207. package/packages/gantt/src/utils/testing.ts +0 -64
  208. package/packages/gantt/src/views/day.ts +0 -74
  209. package/packages/gantt/src/views/factory.ts +0 -25
  210. package/packages/gantt/src/views/month.ts +0 -66
  211. package/packages/gantt/src/views/quarter.ts +0 -68
  212. package/packages/gantt/src/views/test/day.spec.ts +0 -45
  213. package/packages/gantt/src/views/test/factory.spec.ts +0 -41
  214. package/packages/gantt/src/views/test/mock.ts +0 -14
  215. package/packages/gantt/src/views/test/month.spec.ts +0 -45
  216. package/packages/gantt/src/views/test/quarter.spec.ts +0 -45
  217. package/packages/gantt/src/views/test/view.spec.ts +0 -144
  218. package/packages/gantt/src/views/test/week.spec.ts +0 -45
  219. package/packages/gantt/src/views/test/year.spec.ts +0 -45
  220. package/packages/gantt/src/views/view.ts +0 -186
  221. package/packages/gantt/src/views/week.ts +0 -66
  222. package/packages/gantt/src/views/year.ts +0 -62
  223. package/packages/gantt/tsconfig.lib.json +0 -20
  224. package/packages/gantt/tsconfig.lib.prod.json +0 -9
  225. package/packages/gantt/tsconfig.schematics.json +0 -25
  226. package/packages/gantt/tsconfig.spec.json +0 -17
  227. package/packages/gantt/tslint.json +0 -18
  228. package/scss-bundle.config.json +0 -7
  229. package/tsconfig.json +0 -26
  230. package/tslint.json +0 -51
@@ -1,67 +0,0 @@
1
- import { Component, OnInit, HostBinding } from '@angular/core';
2
- import { mockItems } from './mocks';
3
- import {
4
- GanttBarClickEvent,
5
- GanttViewType,
6
- GanttDragEvent,
7
- GanttLoadOnScrollEvent,
8
- GanttLineClickEvent,
9
- GanttLinkDragEvent,
10
- GanttItem,
11
- GanttViewOptions,
12
- GanttDate,
13
- GanttPrintService
14
- } from 'ngx-gantt';
15
- import { of } from 'rxjs';
16
- import { delay } from 'rxjs/operators';
17
- @Component({
18
- selector: 'app-gantt-range-example',
19
- templateUrl: './gantt-range.component.html',
20
- providers: [GanttPrintService]
21
- })
22
- export class AppGanttRangeExampleComponent implements OnInit {
23
- items = mockItems;
24
-
25
- options = {
26
- viewType: GanttViewType.month,
27
- draggable: true,
28
- async: true,
29
- childrenResolve: this.getChildren.bind(this)
30
- };
31
-
32
- viewOptions: GanttViewOptions = {
33
- start: new GanttDate(new Date('2020-3-1')),
34
- end: new GanttDate(new Date('2020-6-30'))
35
- };
36
-
37
- @HostBinding('class.gantt-demo') class = true;
38
-
39
- constructor(private printService: GanttPrintService) {}
40
-
41
- ngOnInit(): void {}
42
-
43
- barClick(event: GanttBarClickEvent) {
44
- console.log(event);
45
- }
46
-
47
- dragEnded(event: GanttDragEvent) {
48
- this.items = [...this.items];
49
- }
50
-
51
- loadOnScroll(event: GanttLoadOnScrollEvent) {}
52
-
53
- getChildren(item: GanttItem) {
54
- return of([
55
- {
56
- id: new Date().getTime(),
57
- title: new Date().getTime(),
58
- start: Math.floor(new Date().getTime() / 1000),
59
- draggable: true,
60
- linkable: false
61
- }
62
- ]).pipe(delay(1000));
63
- }
64
- print(name: string) {
65
- this.printService.print(name);
66
- }
67
- }
@@ -1,150 +0,0 @@
1
- export const mockItems = [
2
- {
3
- id: 'item-0101',
4
- title: 'VERSION 0101',
5
- start: 1590035675,
6
- group_id: '00001',
7
- color: '#FF0000',
8
- type: 'range',
9
- progress: 0.5,
10
- children: [
11
- {
12
- id: 'item-child-0101',
13
- title: 'VERSION Children 0101',
14
- start: 1590035675,
15
- group_id: '00001',
16
- color: '#FF0000',
17
- linkable: false,
18
- progress: 0.5,
19
- barStyle: { border: `1px solid #FF0000` }
20
- }
21
- ]
22
- },
23
- {
24
- id: 'item-0102',
25
- title: 'VERSION 0102',
26
- start: 1590935675,
27
- end: 1591318400,
28
- color: '#9ACD32',
29
- group_id: '00001',
30
- expandable: true
31
- },
32
- {
33
- id: 'item-0103',
34
- title: 'VERSION 0103',
35
- end: 1592018400,
36
- group_id: '00001'
37
- },
38
- {
39
- id: 'item-0104',
40
- title: 'VERSION 0104',
41
- group_id: '00001',
42
- links: ['item-0301']
43
- },
44
- {
45
- id: 'item-0201',
46
- title: 'VERSION 0201',
47
- group_id: '00002'
48
- },
49
- {
50
- id: 'item-0202',
51
- title: 'VERSION 0202',
52
- start: 1591035675,
53
- end: 1593018400,
54
- group_id: '00002',
55
- links: ['item-0203'],
56
- color: 'rgb(52, 143, 228, 0.5)',
57
- barStyle: {
58
- border: '1px solid rgb(52, 143, 228)'
59
- }
60
- },
61
- {
62
- id: 'item-0203',
63
- title: 'VERSION 0203',
64
- start: 1590235675,
65
- end: 1591718400,
66
- group_id: '00002',
67
- links: ['item-0204'],
68
- progress: 0.6,
69
- barStyle: { border: `1px solid rgb(52, 143, 228)` }
70
- },
71
- {
72
- id: 'item-0204',
73
- title: 'VERSION 0204',
74
- start: 1591035675,
75
- end: 1592418400,
76
- group_id: '00002',
77
- links: ['item-0301', 'item-0402']
78
- },
79
-
80
- {
81
- id: 'item-0301',
82
- title: 'VERSION 0301',
83
- start: 1596035675,
84
- end: 1599018400,
85
- group_id: '00003'
86
- },
87
- {
88
- id: 'item-0302',
89
- title: 'VERSION 0302',
90
- start: 1592035675,
91
- end: 1598018400,
92
- group_id: '00003'
93
- },
94
- {
95
- id: 'item-0303',
96
- title: 'VERSION 0303',
97
- start: 1590135675,
98
- end: 1594018400,
99
- group_id: '00003'
100
- },
101
- {
102
- id: 'item-0401',
103
- title: 'VERSION 0401',
104
- start: 1589035675,
105
- end: 1594018400,
106
- group_id: '00004'
107
- },
108
- {
109
- id: 'item-0402',
110
- title: 'VERSION 0402',
111
- start: 1596035675,
112
- end: 1599918400,
113
- group_id: '00004'
114
- },
115
- {
116
- id: 'item-0403',
117
- title: 'VERSION 0403',
118
- start: 1593035675,
119
- end: 1599018400,
120
- group_id: '00004'
121
- },
122
- {
123
- id: 'item-0404',
124
- title: 'VERSION 0404',
125
- start: 1591035675,
126
- end: 1592918400,
127
- group_id: '00004'
128
- },
129
- {
130
- id: 'item-0501',
131
- title: 'VERSION 0501',
132
- start: 1599935675,
133
- end: 1602018400,
134
- group_id: '00005'
135
- },
136
- {
137
- id: 'item-0502',
138
- title: 'VERSION 0502',
139
- start: 1591035675,
140
- end: 1594018400,
141
- group_id: '00005'
142
- },
143
- {
144
- id: 'item-0503',
145
- title: 'VERSION 0503',
146
- start: 1595035675,
147
- end: 1599018400,
148
- group_id: '00005'
149
- }
150
- ];
@@ -1,38 +0,0 @@
1
- import { addDays, getUnixTime } from 'date-fns';
2
- import { GanttGroup, GanttItem } from 'ngx-gantt';
3
-
4
- export function random(min: number, max: number) {
5
- return Math.floor(Math.random() * (max - min)) + min;
6
- }
7
-
8
- export function randomItems(length: number, parent?: GanttItem, group?: string) {
9
- const items = [];
10
- for (let i = 0; i < length; i++) {
11
- const start = addDays(new Date(), random(-200, 200));
12
- const end = addDays(start, random(0, 100));
13
- items.push({
14
- id: `${parent?.id || group || ''}00000${i}`,
15
- title: `${parent?.title || 'Task'}-${i}`,
16
- start: getUnixTime(start),
17
- end: getUnixTime(end),
18
- group_id: group
19
- });
20
- }
21
- return items;
22
- }
23
-
24
- export function randomGroupsAndItems(length: number) {
25
- const groups: GanttGroup[] = [];
26
- let items: GanttItem[] = [];
27
- for (let i = 0; i < length; i++) {
28
- groups.push({
29
- id: `00000${i}`,
30
- title: `Group-${i}`
31
- });
32
- items = [...items, ...randomItems(6, undefined, groups[i].id)];
33
- }
34
- return {
35
- groups,
36
- items
37
- };
38
- }
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,13 +0,0 @@
1
- <!doctype html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="utf-8">
5
- <title>NgxGantt - Gantt Component for Angular</title>
6
- <base href="/">
7
- <meta name="viewport" content="width=device-width, initial-scale=1">
8
- <link rel="icon" type="image/x-icon" href="favicon.ico">
9
- </head>
10
- <body>
11
- <example-root></example-root>
12
- </body>
13
- </html>
@@ -1,12 +0,0 @@
1
- import { enableProdMode } 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
-
7
- if (environment.production) {
8
- enableProdMode();
9
- }
10
-
11
- platformBrowserDynamic().bootstrapModule(AppModule)
12
- .catch(err => console.error(err));
@@ -1,63 +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
- /** IE10 and IE11 requires the following for NgClass support on SVG elements */
22
- // import 'classlist.js'; // Run `npm install --save classlist.js`.
23
-
24
- /**
25
- * Web Animations `@angular/platform-browser/animations`
26
- * Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.
27
- * Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).
28
- */
29
- // import 'web-animations-js'; // Run `npm install --save web-animations-js`.
30
-
31
- /**
32
- * By default, zone.js will patch all possible macroTask and DomEvents
33
- * user can disable parts of macroTask/DomEvents patch by setting following flags
34
- * because those flags need to be set before `zone.js` being loaded, and webpack
35
- * will put import in the top of bundle, so user need to create a separate file
36
- * in this directory (for example: zone-flags.ts), and put the following flags
37
- * into that file, and then add the following code before importing zone.js.
38
- * import './zone-flags.ts';
39
- *
40
- * The flags allowed in zone-flags.ts are listed here.
41
- *
42
- * The following flags will work for all browsers.
43
- *
44
- * (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
45
- * (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
46
- * (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
47
- *
48
- * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
49
- * with the following flag, it will bypass `zone.js` patch for IE/Edge
50
- *
51
- * (window as any).__Zone_enable_cross_context_check = true;
52
- *
53
- */
54
-
55
- /***************************************************************************************************
56
- * Zone JS is required by default for Angular itself.
57
- */
58
- import 'zone.js'; // Included with Angular CLI.
59
-
60
-
61
- /***************************************************************************************************
62
- * APPLICATION IMPORTS
63
- */
@@ -1,56 +0,0 @@
1
- /* You can add global styles to this file, and also import other style files */
2
-
3
- // docgeni
4
-
5
- $primary:#348fe4;
6
-
7
- @import '../../packages/gantt/src/styles/index.scss';
8
- @import '~@docgeni/template/styles/index.scss';
9
- @import "~ngx-tethys/styles/main.bundle.scss";
10
-
11
- .gantt-demo {
12
- height: 100%;
13
- display: flex;
14
- flex-direction: column;
15
- background: #eee;
16
- padding: 20px;
17
-
18
- .gantt-demo-header {
19
- height: 50px;
20
- background: #fff;
21
- padding: 0px 20px;
22
- margin-bottom: 15px;
23
- display: flex;
24
- align-items: center;
25
-
26
- .header-section {
27
- margin-right: 20px;
28
-
29
- &-title {
30
- font-weight: bold;
31
- }
32
- }
33
- }
34
-
35
- .gantt-demo-content {
36
- flex: 1;
37
- height: 1px;
38
- }
39
- }
40
-
41
- .gantt-example-content {
42
- margin-left: 300px;
43
- }
44
-
45
- .gantt-example-component {
46
- display: block;
47
- margin: 20px;
48
- border: 1px solid #eee;
49
- height: calc(100vh - 95px);
50
-
51
- .thy-layout-header {
52
- .layout-header-title {
53
- display: none;
54
- }
55
- }
56
- }
@@ -1,18 +0,0 @@
1
- {
2
- "extends": "../tsconfig.json",
3
- "compilerOptions": {
4
- "outDir": "../../out-tsc/app",
5
- "types": []
6
- },
7
- "files": [
8
- "src/main.ts",
9
- "src/polyfills.ts"
10
- ],
11
- "include": [
12
- "src/**/*.d.ts"
13
- ],
14
- "exclude": [
15
- "src/test.ts",
16
- "src/**/*.spec.ts"
17
- ]
18
- }
package/nginx.conf DELETED
@@ -1,17 +0,0 @@
1
- server {
2
- listen 8080;
3
-
4
- location / {
5
-
6
- if ($request_filename ~ .*\.(htm|html)$) {
7
- add_header Cache-Control no-cache;
8
- }
9
- try_files $uri $uri/ /index.html;
10
- port_in_redirect off;
11
- proxy_redirect off;
12
- proxy_set_header Host $host;
13
- proxy_set_header X-Real-IP $remote_addr;
14
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
15
- proxy_set_header X-Forwarded-Proto http;
16
- }
17
- }
@@ -1,24 +0,0 @@
1
- # Gantt
2
-
3
- This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 8.2.14.
4
-
5
- ## Code scaffolding
6
-
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.
9
-
10
- ## Build
11
-
12
- Run `ng build gantt` to build the project. The build artifacts will be stored in the `dist/` directory.
13
-
14
- ## Publishing
15
-
16
- After building your library with `ng build gantt`, go to the dist folder `cd dist/gantt` and run `npm publish`.
17
-
18
- ## Running unit tests
19
-
20
- Run `ng test gantt` to execute the unit tests via [Karma](https://karma-runner.github.io).
21
-
22
- ## Further help
23
-
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).
@@ -1,46 +0,0 @@
1
- // Karma configuration file, see link for more information
2
- // https://karma-runner.github.io/1.0/config/configuration-file.html
3
-
4
- module.exports = function (config) {
5
- config.set({
6
- basePath: '',
7
- frameworks: ['jasmine', '@angular-devkit/build-angular'],
8
- plugins: [
9
- require('karma-jasmine'),
10
- require('karma-chrome-launcher'),
11
- require('karma-jasmine-html-reporter'),
12
- require('karma-coverage'),
13
- require('@angular-devkit/build-angular/plugins/karma')
14
- ],
15
- client: {
16
- jasmine: {
17
- // you can add configuration options for Jasmine here
18
- // the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
19
- // for example, you can disable the random execution with `random: false`
20
- // or set a specific seed with `seed: 4321`
21
- random: false
22
- },
23
- clearContext: false // leave Jasmine Spec Runner output visible in browser
24
- },
25
- coverageReporter: {
26
- dir: require('path').join(__dirname, '../../coverage/gantt'),
27
- subdir: '.',
28
- fixWebpackSourcePaths: true,
29
- reporters: [{ type: 'html' }, { type: 'lcovonly' }, { type: 'text-summary' }]
30
- },
31
- reporters: ['progress', 'kjhtml'],
32
- port: 9876,
33
- colors: true,
34
- logLevel: config.LOG_INFO,
35
- autoWatch: true,
36
- browsers: ['Chrome'],
37
- singleRun: false,
38
- restartOnFileChange: true,
39
- customLaunchers: {
40
- ChromeHeadlessCI: {
41
- base: 'ChromeHeadless',
42
- flags: ['--no-sandbox']
43
- }
44
- }
45
- });
46
- };
@@ -1,7 +0,0 @@
1
- {
2
- "$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
3
- "dest": "../../dist/gantt",
4
- "lib": {
5
- "entryFile": "src/public-api.ts"
6
- }
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
3
- "dest": "../../dist/gantt",
4
- "lib": {
5
- "entryFile": "src/public-api.ts"
6
- }
7
- }
@@ -1,16 +0,0 @@
1
- {
2
- "name": "@worktile/gantt",
3
- "version": "12.0.1",
4
- "schematics": "./schematics/collection.json",
5
- "scripts": {
6
- "build": "../../node_modules/.bin/tsc -p tsconfig.schematics.json",
7
- "copy:schemas": "cp --parents schematics/*/schema.json ../../dist/gantt/",
8
- "copy:files": "cp --parents -p schematics/*/files/** ../../dist/gantt/",
9
- "copy:collection": "cp schematics/collection.json ../../dist/gantt/schematics/collection.json",
10
- "postbuild": "npm run copy:schemas && npm run copy:files && npm run copy:collection"
11
- },
12
- "peerDependencies": {
13
- "@angular/common": "^12.0.0",
14
- "@angular/core": "^12.0.0"
15
- }
16
- }
@@ -1,14 +0,0 @@
1
- import { GanttDate } from '../utils/date';
2
-
3
- export class GanttDatePoint {
4
- constructor(
5
- public start: GanttDate,
6
- public text: string,
7
- public x: number,
8
- public y: number,
9
- public additions?: {
10
- isWeekend: boolean;
11
- isToday: boolean;
12
- }
13
- ) {}
14
- }
@@ -1,36 +0,0 @@
1
- import { GanttItemInternal } from './item';
2
-
3
- export interface GanttGroup<T = unknown> {
4
- id: string;
5
- title: string;
6
- expanded?: boolean;
7
- origin?: T;
8
- class?: string;
9
- }
10
-
11
- export class GanttGroupInternal {
12
- id: string;
13
- title: string;
14
- origin: GanttGroup;
15
- items: GanttItemInternal[];
16
- mergedItems: GanttItemInternal[][];
17
- expanded?: boolean;
18
- refs?: {
19
- height?: number;
20
- } = {};
21
- class?: string;
22
- constructor(group: GanttGroup) {
23
- this.id = group.id;
24
- this.origin = group;
25
- this.title = group.title;
26
- this.expanded = group.expanded === undefined ? true : group.expanded;
27
- this.items = [];
28
- this.mergedItems = [[]];
29
- this.class = group.class || '';
30
- }
31
-
32
- setExpand(expanded: boolean) {
33
- this.expanded = expanded;
34
- this.origin.expanded = expanded;
35
- }
36
- }