tg-ganttchart 0.0.1 → 0.0.3
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 +2 -0
- package/dist/demo.html +1 -0
- package/dist/tgganttchart.common.js +9529 -0
- package/dist/tgganttchart.common.js.map +1 -0
- package/dist/tgganttchart.css +1 -0
- package/dist/tgganttchart.umd.js +9540 -0
- package/dist/tgganttchart.umd.js.map +1 -0
- package/dist/tgganttchart.umd.min.js +7 -0
- package/dist/tgganttchart.umd.min.js.map +1 -0
- package/package.json +8 -4
- package/babel.config.js +0 -5
- package/src/components/GanttElastic.standalone.vue +0 -349
- package/src/components/GanttElastic.vue +0 -1643
- package/src/components/components/Calendar/Calendar.vue +0 -332
- package/src/components/components/Calendar/CalendarRow.vue +0 -85
- package/src/components/components/Chart/Chart.vue +0 -110
- package/src/components/components/Chart/DaysHighlight.vue +0 -70
- package/src/components/components/Chart/DependencyLines.vue +0 -112
- package/src/components/components/Chart/Grid.vue +0 -164
- package/src/components/components/Chart/ProgressBar.vue +0 -109
- package/src/components/components/Chart/Row/Milestone.vue +0 -117
- package/src/components/components/Chart/Row/Project.vue +0 -131
- package/src/components/components/Chart/Row/Task.mixin.js +0 -47
- package/src/components/components/Chart/Row/Task.vue +0 -107
- package/src/components/components/Chart/Text.vue +0 -105
- package/src/components/components/Expander.vue +0 -126
- package/src/components/components/Header/Header.vue +0 -266
- package/src/components/components/MainView.vue +0 -282
- package/src/components/components/TaskList/ItemColumn.vue +0 -98
- package/src/components/components/TaskList/TaskList.vue +0 -42
- package/src/components/components/TaskList/TaskListHeader.vue +0 -143
- package/src/components/components/TaskList/TaskListItem.vue +0 -39
- package/src/components/components/bundle.js +0 -28
- package/src/index.js +0 -13
- package/vue.config.js +0 -42
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tg-ganttchart",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"description": "Vue js compnonet for dynamic list in which we can provide and schema and data. It will render the table view according to the dynamic fields",
|
|
5
5
|
"main": "./dist/tgganttchart.umd.cjs",
|
|
6
6
|
"module": "./dist/tgganttchart.es.js",
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"core-js": "^3.8.3",
|
|
20
20
|
"dayjs": "^1.11.13",
|
|
21
|
+
"dotenv-webpack": "^8.1.0",
|
|
21
22
|
"resize-observer-polyfill": "^1.5.1",
|
|
22
23
|
"vue": "^2.6.10",
|
|
23
24
|
"vue-loader": "^15.11.1",
|
|
@@ -47,8 +48,8 @@
|
|
|
47
48
|
"plugin:vue/vue3-essential",
|
|
48
49
|
"eslint:recommended"
|
|
49
50
|
],
|
|
50
|
-
|
|
51
|
-
"parser": "
|
|
51
|
+
"parserOptions": {
|
|
52
|
+
"parser": "babel-eslint"
|
|
52
53
|
},
|
|
53
54
|
"rules": {}
|
|
54
55
|
},
|
|
@@ -60,5 +61,8 @@
|
|
|
60
61
|
],
|
|
61
62
|
"keywords": [],
|
|
62
63
|
"author": "",
|
|
63
|
-
"license": "ISC"
|
|
64
|
+
"license": "ISC",
|
|
65
|
+
"files": [
|
|
66
|
+
"dist/*"
|
|
67
|
+
]
|
|
64
68
|
}
|
package/babel.config.js
DELETED
|
@@ -1,349 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
|
|
3
|
-
<gantt-elastic :tasks="tasks" :options="options" :dynamicStyle="dynamicStyle">
|
|
4
|
-
<component v-if="components.header" :is="components.header" slot="header"></component>
|
|
5
|
-
<component v-if="components.footer" :is="components.footer" slot="footer"></component>
|
|
6
|
-
<gantt-header slot="header"></gantt-header>
|
|
7
|
-
</gantt-elastic>
|
|
8
|
-
</template>
|
|
9
|
-
|
|
10
|
-
<script>
|
|
11
|
-
import GanttElastic from './GanttElastic.vue';
|
|
12
|
-
import GanttHeader from './components/Header/Header.vue';
|
|
13
|
-
import dayjs from "dayjs";
|
|
14
|
-
|
|
15
|
-
function getDate(hours) {
|
|
16
|
-
const currentDate = new Date();
|
|
17
|
-
const currentYear = currentDate.getFullYear();
|
|
18
|
-
const currentMonth = currentDate.getMonth();
|
|
19
|
-
const currentDay = currentDate.getDate();
|
|
20
|
-
const timeStamp = new Date(
|
|
21
|
-
currentYear,
|
|
22
|
-
currentMonth,
|
|
23
|
-
currentDay,
|
|
24
|
-
0,
|
|
25
|
-
0,
|
|
26
|
-
0
|
|
27
|
-
).getTime();
|
|
28
|
-
return new Date(timeStamp + hours * 60 * 60 * 1000).getTime();
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export default {
|
|
32
|
-
name: 'GanttElasticStandalone',
|
|
33
|
-
components: {
|
|
34
|
-
'gantt-elastic': GanttElastic,
|
|
35
|
-
'gantt-header': GanttHeader
|
|
36
|
-
},
|
|
37
|
-
props: {
|
|
38
|
-
header: {
|
|
39
|
-
type: Object,
|
|
40
|
-
default: () => ({}),
|
|
41
|
-
},
|
|
42
|
-
footer: {
|
|
43
|
-
type: Object,
|
|
44
|
-
default: () => ({}),
|
|
45
|
-
},
|
|
46
|
-
},
|
|
47
|
-
data() {
|
|
48
|
-
return {
|
|
49
|
-
components: {
|
|
50
|
-
header: this.header,
|
|
51
|
-
footer: this.footer,
|
|
52
|
-
},
|
|
53
|
-
tasks: [
|
|
54
|
-
{
|
|
55
|
-
id: 1,
|
|
56
|
-
label: "Make some noise",
|
|
57
|
-
user:
|
|
58
|
-
'<a href="https://www.google.com/search?q=John+Doe" target="_blank" style="color:#0077c0;">John Doe</a>',
|
|
59
|
-
start: getDate(-24 * 5),
|
|
60
|
-
duration: 15 * 24 * 60 * 60 * 1000,
|
|
61
|
-
percent: 10,
|
|
62
|
-
type: "project"
|
|
63
|
-
//collapsed: true,
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
id: 2,
|
|
67
|
-
label: "With great power comes great responsibility",
|
|
68
|
-
user:
|
|
69
|
-
'<a href="https://www.google.com/search?q=Peter+Parker" target="_blank" style="color:#0077c0;">Peter Parker</a>',
|
|
70
|
-
parentId: 1,
|
|
71
|
-
start: getDate(-24 * 4),
|
|
72
|
-
duration: 4 * 24 * 60 * 60 * 1000,
|
|
73
|
-
percent: 50,
|
|
74
|
-
type: "milestone",
|
|
75
|
-
collapsed: true,
|
|
76
|
-
style: {
|
|
77
|
-
base: {
|
|
78
|
-
fill: "#1EBC61",
|
|
79
|
-
stroke: "#0EAC51"
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
id: 3,
|
|
85
|
-
label: "Courage is being scared to death, but saddling up anyway.",
|
|
86
|
-
user:
|
|
87
|
-
'<a href="https://www.google.com/search?q=John+Wayne" target="_blank" style="color:#0077c0;">John Wayne</a>',
|
|
88
|
-
parentId: 2,
|
|
89
|
-
start: getDate(-24 * 3),
|
|
90
|
-
duration: 2 * 24 * 60 * 60 * 1000,
|
|
91
|
-
percent: 100,
|
|
92
|
-
type: "task"
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
id: 4,
|
|
96
|
-
label: "Put that toy AWAY!",
|
|
97
|
-
user:
|
|
98
|
-
'<a href="https://www.google.com/search?q=Clark+Kent" target="_blank" style="color:#0077c0;">Clark Kent</a>',
|
|
99
|
-
start: getDate(-24 * 2),
|
|
100
|
-
duration: 2 * 24 * 60 * 60 * 1000,
|
|
101
|
-
percent: 50,
|
|
102
|
-
type: "task",
|
|
103
|
-
dependentOn: [3]
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
id: 5,
|
|
107
|
-
label:
|
|
108
|
-
"One billion, gajillion, fafillion... shabadylu...mil...shabady......uh, Yen.",
|
|
109
|
-
user:
|
|
110
|
-
'<a href="https://www.google.com/search?q=Austin+Powers" target="_blank" style="color:#0077c0;">Austin Powers</a>',
|
|
111
|
-
parentId: 4,
|
|
112
|
-
start: getDate(0),
|
|
113
|
-
duration: 2 * 24 * 60 * 60 * 1000,
|
|
114
|
-
percent: 10,
|
|
115
|
-
type: "milestone",
|
|
116
|
-
style: {
|
|
117
|
-
base: {
|
|
118
|
-
fill: "#0287D0",
|
|
119
|
-
stroke: "#0077C0"
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
},
|
|
123
|
-
{
|
|
124
|
-
id: 6,
|
|
125
|
-
label: "Butch Mario and the Luigi Kid",
|
|
126
|
-
user:
|
|
127
|
-
'<a href="https://www.google.com/search?q=Mario+Bros" target="_blank" style="color:#0077c0;">Mario Bros</a>',
|
|
128
|
-
parentId: 5,
|
|
129
|
-
start: getDate(24),
|
|
130
|
-
duration: 1 * 24 * 60 * 60 * 1000,
|
|
131
|
-
percent: 50,
|
|
132
|
-
type: "task",
|
|
133
|
-
collapsed: true,
|
|
134
|
-
style: {
|
|
135
|
-
base: {
|
|
136
|
-
fill: "#8E44AD",
|
|
137
|
-
stroke: "#7E349D"
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
},
|
|
141
|
-
{
|
|
142
|
-
id: 7,
|
|
143
|
-
label: "Devon, the old man wanted me, it was his dying request",
|
|
144
|
-
user:
|
|
145
|
-
'<a href="https://www.google.com/search?q=Knight+Rider" target="_blank" style="color:#0077c0;">Knight Rider</a>',
|
|
146
|
-
parentId: 2,
|
|
147
|
-
dependentOn: [6],
|
|
148
|
-
start: getDate(24 * 2),
|
|
149
|
-
duration: 4 * 60 * 60 * 1000,
|
|
150
|
-
percent: 20,
|
|
151
|
-
type: "task",
|
|
152
|
-
collapsed: true
|
|
153
|
-
},
|
|
154
|
-
{
|
|
155
|
-
id: 8,
|
|
156
|
-
label: "Hey, Baby! Anybody ever tell you I have beautiful eyes?",
|
|
157
|
-
user:
|
|
158
|
-
'<a href="https://www.google.com/search?q=Johhny+Bravo" target="_blank" style="color:#0077c0;">Johhny Bravo</a>',
|
|
159
|
-
parentId: 7,
|
|
160
|
-
dependentOn: [7],
|
|
161
|
-
start: getDate(24 * 3),
|
|
162
|
-
duration: 1 * 24 * 60 * 60 * 1000,
|
|
163
|
-
percent: 0,
|
|
164
|
-
type: "task"
|
|
165
|
-
},
|
|
166
|
-
{
|
|
167
|
-
id: 9,
|
|
168
|
-
label:
|
|
169
|
-
"This better be important, woman. You are interrupting my very delicate calculations.",
|
|
170
|
-
user:
|
|
171
|
-
'<a href="https://www.google.com/search?q=Dexter\'s+Laboratory" target="_blank" style="color:#0077c0;">Dexter\'s Laboratory</a>',
|
|
172
|
-
parentId: 8,
|
|
173
|
-
dependentOn: [8, 7],
|
|
174
|
-
start: getDate(24 * 4),
|
|
175
|
-
duration: 4 * 60 * 60 * 1000,
|
|
176
|
-
percent: 20,
|
|
177
|
-
type: "task",
|
|
178
|
-
style: {
|
|
179
|
-
base: {
|
|
180
|
-
fill: "#8E44AD",
|
|
181
|
-
stroke: "#7E349D"
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
},
|
|
185
|
-
{
|
|
186
|
-
id: 10,
|
|
187
|
-
label: "current task",
|
|
188
|
-
user:
|
|
189
|
-
'<a href="https://www.google.com/search?q=Johnattan+Owens" target="_blank" style="color:#0077c0;">Johnattan Owens</a>',
|
|
190
|
-
start: getDate(24 * 5),
|
|
191
|
-
duration: 24 * 60 * 60 * 1000,
|
|
192
|
-
percent: 0,
|
|
193
|
-
type: "task"
|
|
194
|
-
},
|
|
195
|
-
{
|
|
196
|
-
id: 11,
|
|
197
|
-
label: "test task",
|
|
198
|
-
user:
|
|
199
|
-
'<a href="https://www.google.com/search?q=Johnattan+Owens" target="_blank" style="color:#0077c0;">Johnattan Owens</a>',
|
|
200
|
-
start: getDate(24 * 6),
|
|
201
|
-
duration: 24 * 60 * 60 * 1000,
|
|
202
|
-
percent: 0,
|
|
203
|
-
type: "task"
|
|
204
|
-
},
|
|
205
|
-
{
|
|
206
|
-
id: 12,
|
|
207
|
-
label: "test task",
|
|
208
|
-
user:
|
|
209
|
-
'<a href="https://www.google.com/search?q=Johnattan+Owens" target="_blank" style="color:#0077c0;">Johnattan Owens</a>',
|
|
210
|
-
start: getDate(24 * 7),
|
|
211
|
-
duration: 24 * 60 * 60 * 1000,
|
|
212
|
-
percent: 0,
|
|
213
|
-
type: "task",
|
|
214
|
-
parentId: 11
|
|
215
|
-
},
|
|
216
|
-
{
|
|
217
|
-
id: 13,
|
|
218
|
-
label: "test task",
|
|
219
|
-
user:
|
|
220
|
-
'<a href="https://www.google.com/search?q=Johnattan+Owens" target="_blank" style="color:#0077c0;">Johnattan Owens</a>',
|
|
221
|
-
start: getDate(24 * 8),
|
|
222
|
-
duration: 24 * 60 * 60 * 1000,
|
|
223
|
-
percent: 0,
|
|
224
|
-
type: "task"
|
|
225
|
-
},
|
|
226
|
-
{
|
|
227
|
-
id: 14,
|
|
228
|
-
label: "test task",
|
|
229
|
-
user:
|
|
230
|
-
'<a href="https://www.google.com/search?q=Johnattan+Owens" target="_blank" style="color:#0077c0;">Johnattan Owens</a>',
|
|
231
|
-
start: getDate(24 * 9),
|
|
232
|
-
duration: 24 * 60 * 60 * 1000,
|
|
233
|
-
percent: 0,
|
|
234
|
-
type: "task"
|
|
235
|
-
},
|
|
236
|
-
{
|
|
237
|
-
id: 15,
|
|
238
|
-
label: "test task",
|
|
239
|
-
user:
|
|
240
|
-
'<a href="https://www.google.com/search?q=Johnattan+Owens" target="_blank" style="color:#0077c0;">Johnattan Owens</a>',
|
|
241
|
-
start: getDate(24 * 16),
|
|
242
|
-
duration: 24 * 60 * 60 * 1000,
|
|
243
|
-
percent: 0,
|
|
244
|
-
type: "task"
|
|
245
|
-
}
|
|
246
|
-
],
|
|
247
|
-
options: {
|
|
248
|
-
taskMapping: {
|
|
249
|
-
progress: "percent"
|
|
250
|
-
},
|
|
251
|
-
maxRows: 100,
|
|
252
|
-
maxHeight: 500,
|
|
253
|
-
title: {
|
|
254
|
-
label: "Your project title as html (link or whatever...)",
|
|
255
|
-
html: false
|
|
256
|
-
},
|
|
257
|
-
row: {
|
|
258
|
-
height: 24
|
|
259
|
-
},
|
|
260
|
-
calendar: {
|
|
261
|
-
hour: {
|
|
262
|
-
display: true
|
|
263
|
-
}
|
|
264
|
-
},
|
|
265
|
-
chart: {
|
|
266
|
-
progress: {
|
|
267
|
-
bar: false
|
|
268
|
-
},
|
|
269
|
-
expander: {
|
|
270
|
-
display: true
|
|
271
|
-
}
|
|
272
|
-
},
|
|
273
|
-
taskList: {
|
|
274
|
-
expander: {
|
|
275
|
-
straight: false
|
|
276
|
-
},
|
|
277
|
-
columns: [
|
|
278
|
-
{
|
|
279
|
-
id: 1,
|
|
280
|
-
label: "ID",
|
|
281
|
-
value: "id",
|
|
282
|
-
width: 10
|
|
283
|
-
},
|
|
284
|
-
{
|
|
285
|
-
id: 2,
|
|
286
|
-
label: "Description",
|
|
287
|
-
value: "label",
|
|
288
|
-
width: 200,
|
|
289
|
-
expander: true,
|
|
290
|
-
html: true,
|
|
291
|
-
events: {
|
|
292
|
-
click({ data }) {
|
|
293
|
-
alert("description clicked!\n" + data.label);
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
},
|
|
297
|
-
{
|
|
298
|
-
id: 3,
|
|
299
|
-
label: "Assigned to",
|
|
300
|
-
value: "user",
|
|
301
|
-
width: 130,
|
|
302
|
-
html: true
|
|
303
|
-
},
|
|
304
|
-
{
|
|
305
|
-
id: 3,
|
|
306
|
-
label: "Start",
|
|
307
|
-
value: task => dayjs(task.start).format("YYYY-MM-DD"),
|
|
308
|
-
width: 78
|
|
309
|
-
},
|
|
310
|
-
{
|
|
311
|
-
id: 4,
|
|
312
|
-
label: "Type",
|
|
313
|
-
value: "type",
|
|
314
|
-
width: 68
|
|
315
|
-
},
|
|
316
|
-
{
|
|
317
|
-
id: 5,
|
|
318
|
-
label: "%",
|
|
319
|
-
value: "progress",
|
|
320
|
-
width: 35,
|
|
321
|
-
style: {
|
|
322
|
-
"task-list-header-label": {
|
|
323
|
-
"text-align": "center",
|
|
324
|
-
width: "100%"
|
|
325
|
-
},
|
|
326
|
-
"task-list-item-value-container": {
|
|
327
|
-
"text-align": "center",
|
|
328
|
-
width: "100%"
|
|
329
|
-
}
|
|
330
|
-
}
|
|
331
|
-
}
|
|
332
|
-
]
|
|
333
|
-
},
|
|
334
|
-
locale: {
|
|
335
|
-
name: "en",
|
|
336
|
-
Now: "Now",
|
|
337
|
-
"X-Scale": "Zoom-X",
|
|
338
|
-
"Y-Scale": "Zoom-Y",
|
|
339
|
-
"Task list width": "Task list",
|
|
340
|
-
"Before/After": "Expand",
|
|
341
|
-
"Display task list": "Task list"
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
,
|
|
345
|
-
dynamicStyle: {},
|
|
346
|
-
};
|
|
347
|
-
},
|
|
348
|
-
};
|
|
349
|
-
</script>
|