@ganttloom/gantt-core 0.2.1 → 0.4.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 +96 -5
- package/dist/index.cjs +608 -117
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +77 -1
- package/dist/index.d.ts +77 -1
- package/dist/index.js +608 -117
- package/dist/index.js.map +1 -1
- package/dist/styles.css +163 -5
- package/package.json +2 -1
package/dist/styles.css
CHANGED
|
@@ -30,6 +30,8 @@
|
|
|
30
30
|
font-family: var(--gantt-font-family, sans-serif);
|
|
31
31
|
font-size: var(--gantt-font-size, 12px);
|
|
32
32
|
border: 1px solid var(--gantt-grid-color);
|
|
33
|
+
border-radius: 8px;
|
|
34
|
+
box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
|
|
33
35
|
box-sizing: border-box;
|
|
34
36
|
overflow: hidden;
|
|
35
37
|
}
|
|
@@ -53,7 +55,9 @@
|
|
|
53
55
|
}
|
|
54
56
|
}
|
|
55
57
|
|
|
56
|
-
.gantt-root[data-gantt-theme="dark"]
|
|
58
|
+
.gantt-root[data-gantt-theme="dark"],
|
|
59
|
+
[data-theme="dark"] .gantt-root:not([data-gantt-theme="light"]),
|
|
60
|
+
.dark .gantt-root:not([data-gantt-theme="light"]) {
|
|
57
61
|
--gantt-background-color: #181c24;
|
|
58
62
|
--gantt-text-color: #e5e7eb;
|
|
59
63
|
--gantt-grid-color: #2d3341;
|
|
@@ -80,26 +84,104 @@
|
|
|
80
84
|
background: var(--gantt-background-color, #ffffff);
|
|
81
85
|
}
|
|
82
86
|
|
|
87
|
+
.gantt-root[data-gantt-header-position="bottom"] .gantt-grid-panel,
|
|
88
|
+
.gantt-root[data-gantt-header-position="bottom"] .gantt-timeline-scroll {
|
|
89
|
+
display: flex;
|
|
90
|
+
flex-direction: column;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.gantt-time-header-cell {
|
|
94
|
+
position: absolute;
|
|
95
|
+
top: 0;
|
|
96
|
+
height: 100%;
|
|
97
|
+
display: flex;
|
|
98
|
+
align-items: center;
|
|
99
|
+
justify-content: center;
|
|
100
|
+
font-size: var(--gantt-font-size, 12px);
|
|
101
|
+
color: var(--gantt-text-muted-color, #6b7280);
|
|
102
|
+
border-right: 1px solid var(--gantt-grid-color, #e5e7eb);
|
|
103
|
+
box-sizing: border-box;
|
|
104
|
+
white-space: nowrap;
|
|
105
|
+
overflow: hidden;
|
|
106
|
+
text-overflow: clip;
|
|
107
|
+
}
|
|
108
|
+
|
|
83
109
|
.gantt-grid-header-row {
|
|
84
110
|
display: flex;
|
|
85
111
|
align-items: center;
|
|
86
112
|
position: sticky;
|
|
87
113
|
top: 0;
|
|
88
|
-
background: var(--gantt-
|
|
114
|
+
background: var(--gantt-grid-color, #e5e7eb);
|
|
89
115
|
border-bottom: 1px solid var(--gantt-grid-color, #e5e7eb);
|
|
116
|
+
box-shadow: 0 2px 4px -1px rgb(0 0 0 / 0.05);
|
|
90
117
|
font-weight: 600;
|
|
91
118
|
z-index: 2;
|
|
92
119
|
}
|
|
93
120
|
|
|
94
|
-
.gantt-grid-header-
|
|
121
|
+
.gantt-root[data-gantt-header-position="bottom"] .gantt-grid-header-row,
|
|
122
|
+
.gantt-root[data-gantt-header-position="bottom"] .gantt-timeline-header {
|
|
123
|
+
order: 2;
|
|
124
|
+
top: auto;
|
|
125
|
+
bottom: 0;
|
|
126
|
+
border-bottom: none;
|
|
127
|
+
border-top: 1px solid var(--gantt-grid-color, #e5e7eb);
|
|
128
|
+
box-shadow: 0 -2px 4px -1px rgb(0 0 0 / 0.05);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.gantt-root[data-gantt-header-position="bottom"] .gantt-grid-body,
|
|
132
|
+
.gantt-root[data-gantt-header-position="bottom"] .gantt-svg {
|
|
133
|
+
order: 1;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.gantt-root[data-gantt-header-position="none"] .gantt-grid-header-row,
|
|
137
|
+
.gantt-root[data-gantt-header-position="none"] .gantt-timeline-header {
|
|
138
|
+
display: none;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.gantt-grid-header-cell {
|
|
142
|
+
padding: 0 12px;
|
|
143
|
+
white-space: nowrap;
|
|
144
|
+
flex: 0 0 auto;
|
|
145
|
+
display: flex;
|
|
146
|
+
align-items: center;
|
|
147
|
+
justify-content: center;
|
|
148
|
+
text-align: center;
|
|
149
|
+
min-width: 0;
|
|
150
|
+
}
|
|
151
|
+
|
|
95
152
|
.gantt-grid-cell {
|
|
96
153
|
padding: 0 8px;
|
|
97
154
|
white-space: nowrap;
|
|
155
|
+
flex: 0 0 auto;
|
|
156
|
+
display: flex;
|
|
157
|
+
align-items: center;
|
|
158
|
+
min-width: 0;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.gantt-cell-text {
|
|
162
|
+
display: -webkit-box;
|
|
163
|
+
-webkit-line-clamp: 2;
|
|
164
|
+
-webkit-box-orient: vertical;
|
|
98
165
|
overflow: hidden;
|
|
99
166
|
text-overflow: ellipsis;
|
|
167
|
+
white-space: normal;
|
|
168
|
+
overflow-wrap: break-word;
|
|
169
|
+
min-width: 0;
|
|
100
170
|
flex: 1 1 auto;
|
|
101
|
-
|
|
102
|
-
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.gantt-grid-header-cell-sortable {
|
|
174
|
+
cursor: pointer;
|
|
175
|
+
user-select: none;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.gantt-sort-indicator {
|
|
179
|
+
font-size: 0.85em;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.gantt-col-resize-handle:hover {
|
|
183
|
+
background-color: var(--gantt-bar-color, #3b82f6);
|
|
184
|
+
opacity: 0.5;
|
|
103
185
|
}
|
|
104
186
|
|
|
105
187
|
.gantt-grid-body {
|
|
@@ -116,6 +198,7 @@
|
|
|
116
198
|
|
|
117
199
|
.gantt-grid-row:hover {
|
|
118
200
|
background: color-mix(in srgb, var(--gantt-grid-color, #e5e7eb) 40%, transparent);
|
|
201
|
+
transition: background-color 0.15s ease;
|
|
119
202
|
}
|
|
120
203
|
|
|
121
204
|
.gantt-indent {
|
|
@@ -143,6 +226,32 @@
|
|
|
143
226
|
box-sizing: border-box;
|
|
144
227
|
}
|
|
145
228
|
|
|
229
|
+
.gantt-add-child {
|
|
230
|
+
background: none;
|
|
231
|
+
border: none;
|
|
232
|
+
color: var(--gantt-linkColor, #94a3b8);
|
|
233
|
+
cursor: pointer;
|
|
234
|
+
padding: 0 4px;
|
|
235
|
+
margin-left: 4px;
|
|
236
|
+
font-size: 14px;
|
|
237
|
+
line-height: 1;
|
|
238
|
+
display: inline-flex;
|
|
239
|
+
align-items: center;
|
|
240
|
+
justify-content: center;
|
|
241
|
+
border-radius: 4px;
|
|
242
|
+
opacity: 0;
|
|
243
|
+
transition: opacity 0.15s, background-color 0.15s, color 0.15s;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
.gantt-add-child:hover {
|
|
247
|
+
background-color: var(--gantt-grid-color);
|
|
248
|
+
color: var(--gantt-text-color);
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.gantt-grid-row:hover .gantt-add-child {
|
|
252
|
+
opacity: 1;
|
|
253
|
+
}
|
|
254
|
+
|
|
146
255
|
.gantt-timeline-scroll {
|
|
147
256
|
flex: 1 1 auto;
|
|
148
257
|
overflow: auto;
|
|
@@ -153,6 +262,20 @@
|
|
|
153
262
|
display: block;
|
|
154
263
|
}
|
|
155
264
|
|
|
265
|
+
.gantt-timeline-header {
|
|
266
|
+
position: sticky;
|
|
267
|
+
top: 0;
|
|
268
|
+
z-index: 2;
|
|
269
|
+
background: var(--gantt-background-color, #ffffff);
|
|
270
|
+
border-bottom: 1px solid var(--gantt-grid-color, #e5e7eb);
|
|
271
|
+
box-shadow: 0 2px 4px -1px rgb(0 0 0 / 0.05);
|
|
272
|
+
box-sizing: border-box;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
.gantt-header-svg {
|
|
276
|
+
display: block;
|
|
277
|
+
}
|
|
278
|
+
|
|
156
279
|
.gantt-bar rect {
|
|
157
280
|
transition: fill 0.15s ease;
|
|
158
281
|
}
|
|
@@ -165,3 +288,38 @@
|
|
|
165
288
|
.gantt-temp-link {
|
|
166
289
|
pointer-events: none;
|
|
167
290
|
}
|
|
291
|
+
|
|
292
|
+
.gantt-tooltip {
|
|
293
|
+
position: fixed;
|
|
294
|
+
z-index: 1000;
|
|
295
|
+
pointer-events: none;
|
|
296
|
+
max-width: 280px;
|
|
297
|
+
padding: 8px 10px;
|
|
298
|
+
border-radius: 6px;
|
|
299
|
+
font-size: 12px;
|
|
300
|
+
line-height: 1.4;
|
|
301
|
+
font-family: var(--gantt-font-family, sans-serif);
|
|
302
|
+
background: rgba(17, 24, 39, 0.92);
|
|
303
|
+
color: #f9fafb;
|
|
304
|
+
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
.gantt-tooltip-title {
|
|
308
|
+
font-weight: 600;
|
|
309
|
+
margin-bottom: 2px;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
.gantt-tooltip-row {
|
|
313
|
+
opacity: 0.9;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
.gantt-tooltip-notes {
|
|
317
|
+
margin-top: 4px;
|
|
318
|
+
padding-top: 4px;
|
|
319
|
+
border-top: 1px solid rgba(255, 255, 255, 0.15);
|
|
320
|
+
opacity: 0.85;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
.gantt-readonly .gantt-add-child {
|
|
324
|
+
display: none !important;
|
|
325
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ganttloom/gantt-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.3",
|
|
4
4
|
"description": "Framework-agnostic, fully customizable Gantt chart engine: grouping, drag-drop, dependency linking, expand/collapse, theming.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -41,6 +41,7 @@
|
|
|
41
41
|
"access": "public"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
+
"jsdom": "^25.0.1",
|
|
44
45
|
"tsup": "^8.3.5",
|
|
45
46
|
"typescript": "^5.7.2",
|
|
46
47
|
"vitest": "^2.1.8",
|