@wimi/gantt 0.1.0
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 +785 -0
- package/dist/VanillaGantt.common.js +4751 -0
- package/dist/VanillaGantt.common.js.map +1 -0
- package/dist/VanillaGantt.css +1 -0
- package/dist/VanillaGantt.umd.js +4762 -0
- package/dist/VanillaGantt.umd.js.map +1 -0
- package/dist/VanillaGantt.umd.min.js +2 -0
- package/dist/VanillaGantt.umd.min.js.map +1 -0
- package/dist/demo.html +1 -0
- package/package.json +23 -0
- package/src/VanillaGantt.js +1924 -0
- package/src/index.js +1 -0
- package/src/vanilla-gantt.css +399 -0
- package/types/index.d.ts +356 -0
package/src/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default, default as VanillaGantt } from './VanillaGantt'
|
|
@@ -0,0 +1,399 @@
|
|
|
1
|
+
.vg {
|
|
2
|
+
--vg-left-width: 170px;
|
|
3
|
+
width: 100%;
|
|
4
|
+
height: 100%;
|
|
5
|
+
min-height: 0;
|
|
6
|
+
display: grid;
|
|
7
|
+
grid-template-columns: var(--vg-left-width) minmax(0, 1fr);
|
|
8
|
+
border: 1px solid #dfe8e8;
|
|
9
|
+
background: #fff;
|
|
10
|
+
color: #2d3d42;
|
|
11
|
+
overflow: hidden;
|
|
12
|
+
font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB',
|
|
13
|
+
'Microsoft YaHei', Arial, sans-serif;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.vg-left {
|
|
17
|
+
position: relative;
|
|
18
|
+
z-index: 2;
|
|
19
|
+
display: flex;
|
|
20
|
+
min-height: 0;
|
|
21
|
+
flex-direction: column;
|
|
22
|
+
border-right: 1px solid #d8e1e1;
|
|
23
|
+
background: #fff;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.vg-left-header {
|
|
27
|
+
display: grid;
|
|
28
|
+
align-items: center;
|
|
29
|
+
border-bottom: 1px solid #dbe4e4;
|
|
30
|
+
background: #eef5f5;
|
|
31
|
+
font-size: 13px;
|
|
32
|
+
font-weight: 700;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.vg-left-body {
|
|
36
|
+
flex: 1;
|
|
37
|
+
min-height: 0;
|
|
38
|
+
overflow: hidden;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.vg-left-body-inner {
|
|
42
|
+
will-change: transform;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.vg-row {
|
|
46
|
+
display: grid;
|
|
47
|
+
align-items: stretch;
|
|
48
|
+
border-bottom: 1px solid #edf1f1;
|
|
49
|
+
background: #fff;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.vg-row--group {
|
|
53
|
+
background: #fbfdfd;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.vg-table-header-cell,
|
|
57
|
+
.vg-table-cell {
|
|
58
|
+
position: relative;
|
|
59
|
+
min-width: 0;
|
|
60
|
+
display: flex;
|
|
61
|
+
align-items: center;
|
|
62
|
+
padding: 0 10px;
|
|
63
|
+
border-right: 1px solid #edf1f1;
|
|
64
|
+
overflow: hidden;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.vg-table-header-cell:last-child,
|
|
68
|
+
.vg-table-cell:last-child {
|
|
69
|
+
border-right: 0;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.vg-table-header-cell {
|
|
73
|
+
height: 100%;
|
|
74
|
+
color: #465154;
|
|
75
|
+
font-weight: 700;
|
|
76
|
+
padding-right: 14px;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.vg-table-cell {
|
|
80
|
+
color: #465154;
|
|
81
|
+
font-size: 13px;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.vg-table-header-content {
|
|
85
|
+
min-width: 0;
|
|
86
|
+
width: 100%;
|
|
87
|
+
display: flex;
|
|
88
|
+
align-items: center;
|
|
89
|
+
overflow: hidden;
|
|
90
|
+
text-overflow: ellipsis;
|
|
91
|
+
white-space: nowrap;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.vg-column-resize-handle {
|
|
95
|
+
position: absolute;
|
|
96
|
+
top: 0;
|
|
97
|
+
right: -4px;
|
|
98
|
+
z-index: 2;
|
|
99
|
+
width: 8px;
|
|
100
|
+
height: 100%;
|
|
101
|
+
cursor: col-resize;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.vg-column-resize-handle:hover {
|
|
105
|
+
background: rgba(42, 169, 184, 0.18);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.vg-row-name {
|
|
109
|
+
display: flex;
|
|
110
|
+
align-items: center;
|
|
111
|
+
justify-content: flex-start;
|
|
112
|
+
width: 100%;
|
|
113
|
+
min-height: 18px;
|
|
114
|
+
gap: 4px;
|
|
115
|
+
color: #465154;
|
|
116
|
+
font-size: 13px;
|
|
117
|
+
cursor: default;
|
|
118
|
+
overflow: hidden;
|
|
119
|
+
text-overflow: ellipsis;
|
|
120
|
+
white-space: nowrap;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.vg-row-name--toggle {
|
|
124
|
+
cursor: pointer;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.vg-row-toggle {
|
|
128
|
+
width: 18px;
|
|
129
|
+
height: 18px;
|
|
130
|
+
display: inline-flex;
|
|
131
|
+
align-items: center;
|
|
132
|
+
justify-content: center;
|
|
133
|
+
flex: 0 0 18px;
|
|
134
|
+
box-sizing: border-box;
|
|
135
|
+
padding: 0;
|
|
136
|
+
border: 0;
|
|
137
|
+
background: transparent;
|
|
138
|
+
color: #819093;
|
|
139
|
+
cursor: pointer;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.vg-row-toggle::before {
|
|
143
|
+
content: '';
|
|
144
|
+
display: block;
|
|
145
|
+
width: 0;
|
|
146
|
+
height: 0;
|
|
147
|
+
border-top: 4px solid transparent;
|
|
148
|
+
border-bottom: 4px solid transparent;
|
|
149
|
+
border-left: 5px solid currentColor;
|
|
150
|
+
transform-origin: center;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.vg-row-toggle--expanded::before {
|
|
154
|
+
transform: rotate(90deg);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.vg-row-load {
|
|
158
|
+
display: grid;
|
|
159
|
+
grid-template-columns: minmax(28px, 1fr) 34px;
|
|
160
|
+
align-items: center;
|
|
161
|
+
gap: 6px;
|
|
162
|
+
width: 100%;
|
|
163
|
+
color: #96a1a4;
|
|
164
|
+
font-size: 11px;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.vg-row-load i {
|
|
168
|
+
display: block;
|
|
169
|
+
height: 3px;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.vg-row-load b {
|
|
173
|
+
font-weight: 500;
|
|
174
|
+
text-align: right;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.vg-resize-handle {
|
|
178
|
+
position: absolute;
|
|
179
|
+
top: 0;
|
|
180
|
+
right: -4px;
|
|
181
|
+
width: 8px;
|
|
182
|
+
height: 100%;
|
|
183
|
+
cursor: col-resize;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.vg-resize-handle:hover {
|
|
187
|
+
background: rgba(42, 169, 184, 0.14);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.vg-right {
|
|
191
|
+
display: flex;
|
|
192
|
+
min-width: 0;
|
|
193
|
+
min-height: 0;
|
|
194
|
+
flex-direction: column;
|
|
195
|
+
background: #f7fbfb;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.vg-timeline-viewport {
|
|
199
|
+
flex: 0 0 auto;
|
|
200
|
+
overflow: hidden;
|
|
201
|
+
background: #fff;
|
|
202
|
+
box-shadow: 0 1px 0 #dbe4e4;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.vg-timeline-stage {
|
|
206
|
+
height: 100%;
|
|
207
|
+
will-change: transform;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.vg-scroll {
|
|
211
|
+
flex: 1;
|
|
212
|
+
min-width: 0;
|
|
213
|
+
min-height: 0;
|
|
214
|
+
overflow: auto;
|
|
215
|
+
background: #f7fbfb;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.vg-stage {
|
|
219
|
+
min-height: 100%;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.vg-svg,
|
|
223
|
+
.vg-timeline-svg {
|
|
224
|
+
display: block;
|
|
225
|
+
background: #fff;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.vg-timeline-cell {
|
|
229
|
+
width: 100%;
|
|
230
|
+
height: 100%;
|
|
231
|
+
display: flex;
|
|
232
|
+
align-items: center;
|
|
233
|
+
justify-content: center;
|
|
234
|
+
border-right: 1px solid #d5dddd;
|
|
235
|
+
background: #e5ebeb;
|
|
236
|
+
color: #474f52;
|
|
237
|
+
font-size: 12px;
|
|
238
|
+
font-weight: 600;
|
|
239
|
+
white-space: nowrap;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
.vg-timeline-cell--major {
|
|
243
|
+
background: #d4dddd;
|
|
244
|
+
font-size: 13px;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.vg-task {
|
|
248
|
+
position: relative;
|
|
249
|
+
width: 100%;
|
|
250
|
+
height: 100%;
|
|
251
|
+
padding: 5px 8px;
|
|
252
|
+
border: 1px solid rgba(29, 93, 86, 0.12);
|
|
253
|
+
background: #a7eee6;
|
|
254
|
+
color: #27413e;
|
|
255
|
+
font-size: 12px;
|
|
256
|
+
line-height: 1.25;
|
|
257
|
+
overflow: hidden;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
.vg-task-fo {
|
|
261
|
+
user-select: none;
|
|
262
|
+
transition: opacity 0.16s ease;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
.vg-task-fo--draggable {
|
|
266
|
+
cursor: grab;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
.vg-task-fo--dragging {
|
|
270
|
+
cursor: grabbing;
|
|
271
|
+
opacity: 0.86;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
.vg-task-fo--dimmed {
|
|
275
|
+
pointer-events: auto;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
.vg-link-path,
|
|
279
|
+
.vg-link-arrow {
|
|
280
|
+
pointer-events: none;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
.vg-task--planned {
|
|
284
|
+
background: #fff1b8;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
.vg-task--warning {
|
|
288
|
+
border-color: #ff5b62;
|
|
289
|
+
background: #ffe3e5;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
.vg-task--selected {
|
|
293
|
+
border: 2px solid #49c419;
|
|
294
|
+
background: #f7ed9d;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
.vg-task--blue {
|
|
298
|
+
background: #bfe8ff;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
.vg-task--load,
|
|
302
|
+
.vg-task--unload,
|
|
303
|
+
.vg-task--load-done,
|
|
304
|
+
.vg-task--load-running,
|
|
305
|
+
.vg-task--load-waiting,
|
|
306
|
+
.vg-task--unload-done,
|
|
307
|
+
.vg-task--unload-running,
|
|
308
|
+
.vg-task--unload-waiting {
|
|
309
|
+
padding: 0;
|
|
310
|
+
border: 0;
|
|
311
|
+
font-size: 0;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
.vg-task--load,
|
|
315
|
+
.vg-task--load-running {
|
|
316
|
+
background: #6eddd8;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
.vg-task--unload,
|
|
320
|
+
.vg-task--unload-running {
|
|
321
|
+
background: #45a2ff;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
.vg-task--load-done {
|
|
325
|
+
background: #d9d9d9;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
.vg-task--load-waiting {
|
|
329
|
+
background: #bfe7ff;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
.vg-task--unload-done {
|
|
333
|
+
background: #969696;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
.vg-task--unload-waiting {
|
|
337
|
+
background: #eadbff;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
.vg-task-title,
|
|
341
|
+
.vg-task-meta {
|
|
342
|
+
overflow: hidden;
|
|
343
|
+
text-overflow: ellipsis;
|
|
344
|
+
white-space: nowrap;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
.vg-task-progress {
|
|
348
|
+
position: absolute;
|
|
349
|
+
left: 8px;
|
|
350
|
+
right: 8px;
|
|
351
|
+
bottom: 4px;
|
|
352
|
+
height: 3px;
|
|
353
|
+
background: rgba(255, 255, 255, 0.6);
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
.vg-task-progress i {
|
|
357
|
+
display: block;
|
|
358
|
+
height: 100%;
|
|
359
|
+
background: #20c25f;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
.vg-task-lock {
|
|
363
|
+
position: absolute;
|
|
364
|
+
right: 5px;
|
|
365
|
+
bottom: 3px;
|
|
366
|
+
color: #615939;
|
|
367
|
+
font-size: 11px;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
.vg-mark-line-text {
|
|
371
|
+
font-size: 12px;
|
|
372
|
+
font-weight: 600;
|
|
373
|
+
pointer-events: none;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
.vg-tooltip {
|
|
377
|
+
position: fixed;
|
|
378
|
+
z-index: 10000;
|
|
379
|
+
max-width: 280px;
|
|
380
|
+
padding: 8px 10px;
|
|
381
|
+
border: 1px solid rgba(35, 65, 62, 0.16);
|
|
382
|
+
border-radius: 4px;
|
|
383
|
+
background: rgba(255, 255, 255, 0.98);
|
|
384
|
+
box-shadow: 0 8px 24px rgba(37, 55, 59, 0.16);
|
|
385
|
+
color: #2f3f42;
|
|
386
|
+
font-size: 12px;
|
|
387
|
+
line-height: 1.45;
|
|
388
|
+
pointer-events: none;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
.vg-tooltip-title {
|
|
392
|
+
font-weight: 700;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
.vg-tooltip-time,
|
|
396
|
+
.vg-tooltip-meta {
|
|
397
|
+
margin-top: 3px;
|
|
398
|
+
color: #667477;
|
|
399
|
+
}
|