@visactor/vtable-gantt 1.23.2 → 1.23.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/cjs/Gantt.d.ts +10 -0
- package/cjs/Gantt.js +44 -0
- package/cjs/Gantt.js.map +1 -1
- package/cjs/event/touch.js +0 -1
- package/cjs/gantt-helper.d.ts +7 -0
- package/cjs/gantt-helper.js +74 -64
- package/cjs/gantt-helper.js.map +1 -1
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/plugins/index.js +2 -1
- package/cjs/scenegraph/task-bar.d.ts +4 -1
- package/cjs/scenegraph/task-bar.js +74 -20
- package/cjs/scenegraph/task-bar.js.map +1 -1
- package/cjs/state/gantt-table-sync.js +0 -1
- package/cjs/state/state-manager.js +1 -0
- package/cjs/ts-types/gantt-engine.d.ts +5 -0
- package/cjs/ts-types/gantt-engine.js.map +1 -1
- package/cjs/zoom-scale/ZoomScaleManager.js +1 -2
- package/cjs/zoom-scale/index.js +2 -1
- package/dist/vtable-gantt.js +285 -55
- package/dist/vtable-gantt.min.js +2 -2
- package/es/Gantt.d.ts +10 -0
- package/es/Gantt.js +43 -0
- package/es/Gantt.js.map +1 -1
- package/es/event/touch.js +1 -2
- package/es/gantt-helper.d.ts +7 -0
- package/es/gantt-helper.js +73 -61
- package/es/gantt-helper.js.map +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/es/plugins/index.js +2 -1
- package/es/scenegraph/task-bar.d.ts +4 -1
- package/es/scenegraph/task-bar.js +72 -20
- package/es/scenegraph/task-bar.js.map +1 -1
- package/es/state/gantt-table-sync.js +1 -2
- package/es/state/state-manager.js +2 -1
- package/es/ts-types/gantt-engine.d.ts +5 -0
- package/es/ts-types/gantt-engine.js.map +1 -1
- package/es/zoom-scale/ZoomScaleManager.js +1 -2
- package/es/zoom-scale/index.js +2 -1
- package/package.json +5 -5
|
@@ -69,8 +69,8 @@ class TaskBar {
|
|
|
69
69
|
clip: !0
|
|
70
70
|
}), this.group.appendChild(this.barContainer);
|
|
71
71
|
for (let i = 0; i < this._scene._gantt.itemCount; i++) if (this._scene._gantt.parsedOptions.tasksShowMode !== ts_types_1.TasksShowMode.Sub_Tasks_Inline && this._scene._gantt.parsedOptions.tasksShowMode !== ts_types_1.TasksShowMode.Sub_Tasks_Separate && this._scene._gantt.parsedOptions.tasksShowMode !== ts_types_1.TasksShowMode.Sub_Tasks_Arrange && this._scene._gantt.parsedOptions.tasksShowMode !== ts_types_1.TasksShowMode.Sub_Tasks_Compact) if (this._scene._gantt.parsedOptions.tasksShowMode !== ts_types_1.TasksShowMode.Project_Sub_Tasks_Inline) {
|
|
72
|
-
const
|
|
73
|
-
|
|
72
|
+
const {barGroupBox: barGroupBox, baselineBar: baselineBar} = this.initBar(i);
|
|
73
|
+
baselineBar && this.barContainer.appendChild(baselineBar), barGroupBox && this.barContainer.appendChild(barGroupBox);
|
|
74
74
|
} else {
|
|
75
75
|
const record = this._scene._gantt.getRecordByIndex(i), isExpanded = "expand" === record.hierarchyState;
|
|
76
76
|
if (record.type === ts_types_1.TaskType.PROJECT && (null === (_c = record.children) || void 0 === _c ? void 0 : _c.length) > 0 && !isExpanded) {
|
|
@@ -79,43 +79,93 @@ class TaskBar {
|
|
|
79
79
|
if ((null === (_a = record.children) || void 0 === _a ? void 0 : _a.length) > 0) for (let j = 0; j < (null === (_b = record.children) || void 0 === _b ? void 0 : _b.length); j++) {
|
|
80
80
|
const child_record = record.children[j];
|
|
81
81
|
if (child_record.type !== ts_types_1.TaskType.PROJECT) {
|
|
82
|
-
const
|
|
83
|
-
|
|
82
|
+
const {barGroupBox: barGroupBox, baselineBar: baselineBar} = this.initBar(i, [ ...sub_task_indexs, j ], record.children.length);
|
|
83
|
+
baselineBar && this.barContainer.appendChild(baselineBar), barGroupBox && this.barContainer.appendChild(barGroupBox);
|
|
84
84
|
} else callInitBar(child_record, [ ...sub_task_indexs, j ]);
|
|
85
85
|
}
|
|
86
86
|
};
|
|
87
87
|
callInitBar(record, sub_task_indexs);
|
|
88
88
|
} else {
|
|
89
|
-
const
|
|
90
|
-
|
|
89
|
+
const {barGroupBox: barGroupBox, baselineBar: baselineBar} = this.initBar(i);
|
|
90
|
+
baselineBar && this.barContainer.appendChild(baselineBar), barGroupBox && this.barContainer.appendChild(barGroupBox);
|
|
91
91
|
}
|
|
92
92
|
} else {
|
|
93
93
|
const record = this._scene._gantt.getRecordByIndex(i);
|
|
94
94
|
if ((null === (_a = record.children) || void 0 === _a ? void 0 : _a.length) > 0) for (let j = 0; j < (null === (_b = record.children) || void 0 === _b ? void 0 : _b.length); j++) {
|
|
95
|
-
const
|
|
96
|
-
|
|
95
|
+
const {barGroupBox: barGroupBox, baselineBar: baselineBar} = this.initBar(i, j, record.children.length);
|
|
96
|
+
baselineBar && this.barContainer.appendChild(baselineBar), barGroupBox && this.barContainer.appendChild(barGroupBox);
|
|
97
97
|
} else {
|
|
98
|
-
const
|
|
99
|
-
|
|
98
|
+
const {barGroupBox: barGroupBox, baselineBar: baselineBar} = this.initBar(i);
|
|
99
|
+
baselineBar && this.barContainer.appendChild(baselineBar), barGroupBox && this.barContainer.appendChild(barGroupBox);
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
103
|
initBar(index, childIndex, childrenLength) {
|
|
104
|
-
var _a, _b, _c, _d, _e;
|
|
104
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
105
105
|
const taskBarCustomLayout = this._scene._gantt.parsedOptions.taskBarCustomLayout, {startDate: startDate, endDate: endDate, taskDays: taskDays, progress: progress, taskRecord: taskRecord} = this._scene._gantt.getTaskInfoByTaskListIndex(index, childIndex), isMilestone = taskRecord.type === ts_types_1.TaskType.MILESTONE;
|
|
106
|
-
if (isMilestone && !startDate || !isMilestone && (taskDays <= 0 || !startDate || !endDate || startDate.getTime() > endDate.getTime())) return
|
|
106
|
+
if (isMilestone && !startDate || !isMilestone && (taskDays <= 0 || !startDate || !endDate || startDate.getTime() > endDate.getTime())) return {
|
|
107
|
+
barGroupBox: null,
|
|
108
|
+
baselineBar: null
|
|
109
|
+
};
|
|
107
110
|
const {unit: unit, step: step} = this._scene._gantt.parsedOptions.reverseSortedTimelineScales[0];
|
|
108
111
|
let taskBarSize = (0, util_1.computeCountToTimeScale)(endDate, startDate, unit, step, 1) * this._scene._gantt.parsedOptions.timelineColWidth;
|
|
109
112
|
const taskBarStyle = this._scene._gantt.getTaskBarStyle(index, childIndex), taskbarHeight = taskBarStyle.width;
|
|
110
113
|
(0, vutils_1.isValid)(taskBarStyle.minSize) && (taskBarSize = Math.max(taskBarSize, taskBarStyle.minSize));
|
|
111
114
|
const oneTaskHeigth = this._scene._gantt.parsedOptions.rowHeight, milestoneTaskBarHeight = this._scene._gantt.parsedOptions.taskBarMilestoneStyle.width, x = (0,
|
|
112
|
-
util_1.computeCountToTimeScale)(startDate, this._scene._gantt.parsedOptions.minDate, unit, step) * this._scene._gantt.parsedOptions.timelineColWidth - (isMilestone ? milestoneTaskBarHeight / 2 : 0)
|
|
115
|
+
util_1.computeCountToTimeScale)(startDate, this._scene._gantt.parsedOptions.minDate, unit, step) * this._scene._gantt.parsedOptions.timelineColWidth - (isMilestone ? milestoneTaskBarHeight / 2 : 0);
|
|
116
|
+
let y = this._scene._gantt.getRowsHeightByIndex(0, index - 1) + (this._scene._gantt.parsedOptions.tasksShowMode === ts_types_1.TasksShowMode.Sub_Tasks_Separate ? (null !== (_a = childIndex) && void 0 !== _a ? _a : 0) * oneTaskHeigth : this._scene._gantt.parsedOptions.tasksShowMode === ts_types_1.TasksShowMode.Sub_Tasks_Arrange || this._scene._gantt.parsedOptions.tasksShowMode === ts_types_1.TasksShowMode.Sub_Tasks_Compact ? taskRecord.vtable_gantt_showIndex * oneTaskHeigth : 0);
|
|
117
|
+
const baselineInfo = this._scene._gantt.getBaselineInfoByTaskListIndex(index, childIndex), hasBaseline = baselineInfo.baselineStartDate && baselineInfo.baselineEndDate && baselineInfo.baselineDays > 0, baselinePosition = this._scene._gantt.parsedOptions.baselinePosition;
|
|
118
|
+
let baselineBar = null, taskBarYOffset = 0;
|
|
119
|
+
if (hasBaseline && !isMilestone) {
|
|
120
|
+
const baselineStyle = this._scene._gantt.getBaselineStyle(index, childIndex), baselineX = (0,
|
|
121
|
+
util_1.computeCountToTimeScale)(baselineInfo.baselineStartDate, this._scene._gantt.parsedOptions.minDate, unit, step) * this._scene._gantt.parsedOptions.timelineColWidth, baselineWidth = (0,
|
|
122
|
+
util_1.computeCountToTimeScale)(baselineInfo.baselineEndDate, baselineInfo.baselineStartDate, unit, step, 1) * this._scene._gantt.parsedOptions.timelineColWidth;
|
|
123
|
+
let baselineY;
|
|
124
|
+
const taskBarPaddingTop = null !== (_b = taskBarStyle.paddingTop) && void 0 !== _b ? _b : void 0, baselinePaddingTop = null !== (_c = baselineStyle.paddingTop) && void 0 !== _c ? _c : void 0;
|
|
125
|
+
if ("overlap" === baselinePosition) baselineY = void 0 !== taskBarPaddingTop ? y + taskBarPaddingTop : y + (oneTaskHeigth - baselineStyle.width) / 2; else if ("top" === baselinePosition) {
|
|
126
|
+
const gap = 4;
|
|
127
|
+
if (void 0 !== baselinePaddingTop && void 0 !== taskBarPaddingTop) baselineY = y + baselinePaddingTop,
|
|
128
|
+
taskBarYOffset = taskBarPaddingTop; else if (void 0 !== baselinePaddingTop) baselineY = y + baselinePaddingTop,
|
|
129
|
+
taskBarYOffset = baselinePaddingTop + baselineStyle.width + gap; else if (void 0 !== taskBarPaddingTop) {
|
|
130
|
+
baselineY = y + (oneTaskHeigth - (baselineStyle.width + gap + taskbarHeight)) / 2,
|
|
131
|
+
taskBarYOffset = taskBarPaddingTop;
|
|
132
|
+
} else {
|
|
133
|
+
const startY = (oneTaskHeigth - (baselineStyle.width + gap + taskbarHeight)) / 2;
|
|
134
|
+
baselineY = y + startY, taskBarYOffset = startY + baselineStyle.width + gap;
|
|
135
|
+
}
|
|
136
|
+
} else {
|
|
137
|
+
const gap = 4;
|
|
138
|
+
if (void 0 !== taskBarPaddingTop && void 0 !== baselinePaddingTop) taskBarYOffset = taskBarPaddingTop,
|
|
139
|
+
baselineY = y + baselinePaddingTop; else if (void 0 !== taskBarPaddingTop) taskBarYOffset = taskBarPaddingTop,
|
|
140
|
+
baselineY = y + taskBarPaddingTop + taskbarHeight + gap; else if (void 0 !== baselinePaddingTop) {
|
|
141
|
+
taskBarYOffset = (oneTaskHeigth - (taskbarHeight + gap + baselineStyle.width)) / 2,
|
|
142
|
+
baselineY = y + baselinePaddingTop;
|
|
143
|
+
} else {
|
|
144
|
+
const startY = (oneTaskHeigth - (taskbarHeight + gap + baselineStyle.width)) / 2;
|
|
145
|
+
taskBarYOffset = startY, baselineY = y + startY + taskbarHeight + gap;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
baselineBar = (0, vrender_1.createRect)({
|
|
149
|
+
x: baselineX,
|
|
150
|
+
y: baselineY,
|
|
151
|
+
width: Math.max(baselineWidth, baselineStyle.minSize || 0),
|
|
152
|
+
height: baselineStyle.width,
|
|
153
|
+
fill: baselineStyle.barColor,
|
|
154
|
+
cornerRadius: baselineStyle.cornerRadius,
|
|
155
|
+
lineWidth: 2 * (null !== (_d = baselineStyle.borderLineWidth) && void 0 !== _d ? _d : baselineStyle.borderWidth),
|
|
156
|
+
stroke: baselineStyle.borderColor,
|
|
157
|
+
pickable: !1
|
|
158
|
+
}), baselineBar.name = "baseline-bar";
|
|
159
|
+
}
|
|
160
|
+
const taskBarPaddingTop = null !== (_e = taskBarStyle.paddingTop) && void 0 !== _e ? _e : void 0;
|
|
161
|
+
y += hasBaseline && !isMilestone && "overlap" !== baselinePosition ? taskBarYOffset : void 0 !== taskBarPaddingTop ? taskBarPaddingTop : (oneTaskHeigth - (isMilestone ? milestoneTaskBarHeight : taskbarHeight)) / 2 + taskBarYOffset;
|
|
162
|
+
const barGroupBox = new gantt_node_1.GanttTaskBarNode({
|
|
113
163
|
x: x,
|
|
114
164
|
y: y,
|
|
115
165
|
width: isMilestone ? milestoneTaskBarHeight : taskBarSize,
|
|
116
166
|
height: isMilestone ? milestoneTaskBarHeight : taskbarHeight,
|
|
117
167
|
cornerRadius: isMilestone ? this._scene._gantt.parsedOptions.taskBarMilestoneStyle.cornerRadius : taskBarStyle.cornerRadius,
|
|
118
|
-
lineWidth: isMilestone ? 2 * this._scene._gantt.parsedOptions.taskBarMilestoneStyle.borderLineWidth : 2 * (null !== (
|
|
168
|
+
lineWidth: isMilestone ? 2 * this._scene._gantt.parsedOptions.taskBarMilestoneStyle.borderLineWidth : 2 * (null !== (_f = taskBarStyle.borderLineWidth) && void 0 !== _f ? _f : taskBarStyle.borderWidth),
|
|
119
169
|
stroke: isMilestone ? this._scene._gantt.parsedOptions.taskBarMilestoneStyle.borderColor : taskBarStyle.borderColor,
|
|
120
170
|
angle: isMilestone ? .25 * Math.PI : 0,
|
|
121
171
|
anchor: isMilestone ? [ x + milestoneTaskBarHeight / 2, y + milestoneTaskBarHeight / 2 ] : void 0
|
|
@@ -148,8 +198,8 @@ class TaskBar {
|
|
|
148
198
|
ganttInstance: this._scene._gantt
|
|
149
199
|
});
|
|
150
200
|
} else customLayoutObj = taskBarCustomLayout;
|
|
151
|
-
customLayoutObj && (rootContainer = customLayoutObj.rootContainer, renderDefaultBar = null !== (
|
|
152
|
-
renderDefaultText = null !== (
|
|
201
|
+
customLayoutObj && (rootContainer = customLayoutObj.rootContainer, renderDefaultBar = null !== (_g = customLayoutObj.renderDefaultBar) && void 0 !== _g && _g,
|
|
202
|
+
renderDefaultText = null !== (_h = customLayoutObj.renderDefaultText) && void 0 !== _h && _h,
|
|
153
203
|
rootContainer && (rootContainer.name = "task-bar-custom-render"));
|
|
154
204
|
}
|
|
155
205
|
if (renderDefaultBar) {
|
|
@@ -198,7 +248,7 @@ class TaskBar {
|
|
|
198
248
|
barGroupBox.updateTextPosition();
|
|
199
249
|
}
|
|
200
250
|
if (renderDefaultText && "milestone" === taskRecord.type && this._scene._gantt.parsedOptions.taskBarMilestoneStyle.labelText) {
|
|
201
|
-
const milestoneStyle = this._scene._gantt.parsedOptions.taskBarMilestoneStyle, textStyle = milestoneStyle.labelTextStyle || {}, pos = this.calculateMilestoneTextPosition(milestoneStyle.textOrient || "right", milestoneStyle.width, null !== (
|
|
251
|
+
const milestoneStyle = this._scene._gantt.parsedOptions.taskBarMilestoneStyle, textStyle = milestoneStyle.labelTextStyle || {}, pos = this.calculateMilestoneTextPosition(milestoneStyle.textOrient || "right", milestoneStyle.width, null !== (_j = textStyle.padding) && void 0 !== _j ? _j : 4), textContainer = new vrender_1.Group({
|
|
202
252
|
x: x,
|
|
203
253
|
y: y,
|
|
204
254
|
width: milestoneStyle.width,
|
|
@@ -219,13 +269,17 @@ class TaskBar {
|
|
|
219
269
|
textContainer.appendChild(milestoneLabel), this.barContainer.appendChild(textContainer),
|
|
220
270
|
barGroupBox.milestoneTextLabel = milestoneLabel, barGroupBox.milestoneTextContainer = textContainer;
|
|
221
271
|
}
|
|
222
|
-
return
|
|
272
|
+
return {
|
|
273
|
+
barGroupBox: barGroupBox,
|
|
274
|
+
baselineBar: baselineBar
|
|
275
|
+
};
|
|
223
276
|
}
|
|
224
277
|
updateTaskBarNode(index, sub_task_index) {
|
|
225
278
|
const taskbarGroup = this.getTaskBarNodeByIndex(index, sub_task_index);
|
|
226
279
|
taskbarGroup && this.barContainer.removeChild(taskbarGroup);
|
|
227
|
-
const
|
|
228
|
-
|
|
280
|
+
const {barGroupBox: barGroupBox, baselineBar: baselineBar} = this.initBar(index, sub_task_index);
|
|
281
|
+
barGroupBox && (this.barContainer.insertInto(barGroupBox, index), barGroupBox.updateTextPosition()),
|
|
282
|
+
baselineBar && this.barContainer.insertBefore(baselineBar, barGroupBox);
|
|
229
283
|
}
|
|
230
284
|
initHoverBarIcons() {
|
|
231
285
|
var _a, _b;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,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EAAE,CAAC,EAAE,EAAE,EAAE;aACjB;YACD,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,+BAA+B,CAAC,SAAS;YAClF,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,+BAA+B,CAAC,SAAS;YACrF,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,+BAA+B,CAAC,QAAQ;YACnF,QAAQ,EAAE,KAAK;SAChB,CAAC,CAAC;QACH,IAAI,CAAC,sBAAsB,GAAG,IAAI,CAAC;QACnC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IAC5C,CAAC;IAED,qBAAqB,CAAC,KAAa,EAAE,cAAuB;QAC1D,IAAI,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC,UAA8B,CAAC;QACzD,IAAI,CAAC,CAAC,EAAE;YACN,OAAO,IAAI,CAAC;SACb;QACD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC,aAAa,EAAE,CAAC,EAAE,EAAE;YACxD,IACE,CAAC,CAAC,UAAU,KAAK,KAAK;gBACtB,CAAC,CAAC,IAAA,gBAAO,EAAC,cAAc,CAAC,IAAI,CAAC,IAAA,gBAAO,EAAC,cAAc,CAAC,IAAI,CAAC,CAAC,cAAc,KAAK,cAAc,CAAC,CAAC,EAC9F;gBACA,OAAO,CAAC,CAAC;aACV;YACD,CAAC,GAAG,CAAC,CAAC,KAAyB,CAAC;SACjC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAjxBD,0BAixBC","file":"task-bar.js","sourcesContent":["import { Group, createText, createRect, Image, Circle, Line, Polygon } from '@visactor/vtable/es/vrender';\nimport type { Scenegraph } from './scenegraph';\n// import { Icon } from './icon';\nimport { computeCountToTimeScale, parseStringTemplate, toBoxArray } from '../tools/util';\nimport { isValid } from '@visactor/vutils';\nimport { defaultTaskBarStyle, getTextPos } from '../gantt-helper';\nimport { GanttTaskBarNode } from './gantt-node';\nimport { TasksShowMode, TaskType } from '../ts-types';\n\nconst TASKBAR_HOVER_ICON = `<svg width=\"100\" height=\"200\" xmlns=\"http://www.w3.org/2000/svg\">\n <line x1=\"30\" y1=\"10\" x2=\"30\" y2=\"190\" stroke=\"black\" stroke-width=\"4\"/>\n <line x1=\"70\" y1=\"10\" x2=\"70\" y2=\"190\" stroke=\"black\" stroke-width=\"4\"/>\n</svg>`;\nexport const TASKBAR_HOVER_ICON_WIDTH = 10;\n\nexport class TaskBar {\n formatMilestoneText(text: string, record: any): string {\n if (!text) {\n return '';\n }\n const fieldPattern = /{([^}]+)}/g;\n const matches = text.match(fieldPattern);\n\n if (matches) {\n matches.forEach(match => {\n const fieldName = match.substring(1, match.length - 1);\n const fieldValue = record[fieldName];\n if (fieldValue !== undefined) {\n text = text.replace(match, String(fieldValue));\n }\n });\n }\n return text;\n }\n\n calculateMilestoneTextPosition(\n position: string,\n milestoneWidth: number,\n padding: number | number[] = 4\n ): {\n textX: number;\n textY: number;\n textAlignValue: CanvasTextAlign;\n textBaselineValue: CanvasTextBaseline;\n } {\n const paddingVal = typeof padding === 'number' ? padding : 4;\n let textX = 0;\n let textY = 0;\n let textAlignValue: CanvasTextAlign = 'left';\n let textBaselineValue: CanvasTextBaseline = 'middle';\n\n // 将文本位置改为以中心点为基准\n const center = milestoneWidth / 2;\n\n switch (position) {\n case 'left':\n textX = -paddingVal;\n textY = center;\n textAlignValue = 'end';\n textBaselineValue = 'middle';\n break;\n case 'right':\n textX = milestoneWidth + paddingVal;\n textY = center;\n textAlignValue = 'start';\n textBaselineValue = 'middle';\n break;\n case 'top':\n textX = center;\n textY = -paddingVal;\n textAlignValue = 'center';\n textBaselineValue = 'bottom';\n break;\n case 'bottom':\n textX = center;\n textY = milestoneWidth + paddingVal;\n textAlignValue = 'center';\n textBaselineValue = 'top';\n break;\n default:\n textX = milestoneWidth + paddingVal;\n textY = center;\n textAlignValue = 'start';\n textBaselineValue = 'middle';\n }\n\n return {\n textX,\n textY,\n textAlignValue,\n textBaselineValue\n };\n }\n group: Group;\n barContainer: Group;\n hoverBarGroup: Group;\n creatingDependencyLine: Line;\n hoverBarLeftIcon: Image;\n hoverBarRightIcon: Image;\n hoverBarProgressHandle: Group;\n _scene: Scenegraph;\n width: number;\n height: number;\n selectedBorders: Group[] = [];\n constructor(scene: Scenegraph) {\n this._scene = scene;\n // const height = Math.min(scene._gantt.tableNoFrameHeight, scene._gantt.drawHeight);\n this.width = scene._gantt.tableNoFrameWidth;\n this.height = scene._gantt.gridHeight;\n this.group = new Group({\n x: 0,\n y: scene._gantt.getAllHeaderRowsHeight(),\n width: this.width,\n height: this.height,\n pickable: false,\n clip: true\n });\n this.group.name = 'task-bar-container';\n scene.ganttGroup.addChild(this.group);\n this.initBars();\n this.initHoverBarIcons();\n }\n\n initBars() {\n this.barContainer = new Group({\n x: 0,\n y: 0,\n width: this._scene._gantt.getAllDateColsWidth(),\n height: this._scene._gantt.getAllTaskBarsHeight(),\n pickable: false,\n clip: true\n });\n this.group.appendChild(this.barContainer);\n\n for (let i = 0; i < this._scene._gantt.itemCount; i++) {\n if (\n this._scene._gantt.parsedOptions.tasksShowMode === TasksShowMode.Sub_Tasks_Inline ||\n this._scene._gantt.parsedOptions.tasksShowMode === TasksShowMode.Sub_Tasks_Separate ||\n this._scene._gantt.parsedOptions.tasksShowMode === TasksShowMode.Sub_Tasks_Arrange ||\n this._scene._gantt.parsedOptions.tasksShowMode === TasksShowMode.Sub_Tasks_Compact\n ) {\n const record = this._scene._gantt.getRecordByIndex(i);\n if (record.children?.length > 0) {\n for (let j = 0; j < record.children?.length; j++) {\n const barGroup = this.initBar(i, j, record.children.length);\n if (barGroup) {\n this.barContainer.appendChild(barGroup);\n }\n }\n } else {\n const barGroup = this.initBar(i);\n if (barGroup) {\n this.barContainer.appendChild(barGroup);\n }\n }\n continue;\n } else if (this._scene._gantt.parsedOptions.tasksShowMode === TasksShowMode.Project_Sub_Tasks_Inline) {\n const record = this._scene._gantt.getRecordByIndex(i);\n const isExpanded = record.hierarchyState === 'expand';\n // For project type records, we want to show all children in one line when collapsed\n if (record.type === TaskType.PROJECT && record.children?.length > 0 && !isExpanded) {\n const recordIndex = this._scene._gantt.getRecordIndexByTaskShowIndex(i);\n const sub_task_indexs: number[] = Array.isArray(recordIndex) ? [...recordIndex] : [recordIndex];\n\n const callInitBar = (record: any, sub_task_indexs: number[]) => {\n if (record.children?.length > 0) {\n for (let j = 0; j < record.children?.length; j++) {\n const child_record = record.children[j];\n if (child_record.type !== TaskType.PROJECT) {\n const barGroup = this.initBar(i, [...sub_task_indexs, j], record.children.length);\n if (barGroup) {\n this.barContainer.appendChild(barGroup);\n }\n } else {\n //如果是project类型的子任务,需要递归调用 只将类型不是project的子任务添加到barContainer中\n callInitBar(child_record, [...sub_task_indexs, j]);\n }\n }\n }\n };\n callInitBar(record, sub_task_indexs);\n } else {\n // For non-project tasks, use the default Tasks_Separate mode\n const barGroup = this.initBar(i);\n if (barGroup) {\n this.barContainer.appendChild(barGroup);\n }\n }\n continue;\n } else {\n const barGroup = this.initBar(i);\n if (barGroup) {\n this.barContainer.appendChild(barGroup);\n }\n }\n }\n }\n\n /**\n * @param index 任务显示的index,从0开始\n * @param childIndex 子任务的index, 当taskShowMode是sub_tasks_*模式时,会传入sub_task_index。如果是tasks_separate模式,sub_task_index传入undefined。\n * 如果模式Project_Sub_Tasks_Inline时,传入的sub_task_index是一个数组,数组的第一个元素是父任务的index,第二个元素是子任务的index,依次类推算是各层子任务的path。\n */\n initBar(index: number, childIndex?: number | number[], childrenLength?: number) {\n const taskBarCustomLayout = this._scene._gantt.parsedOptions.taskBarCustomLayout;\n const { startDate, endDate, taskDays, progress, taskRecord } = this._scene._gantt.getTaskInfoByTaskListIndex(\n index,\n childIndex\n );\n const isMilestone = taskRecord.type === TaskType.MILESTONE;\n if (\n (isMilestone && !startDate) ||\n (!isMilestone && (taskDays <= 0 || !startDate || !endDate || startDate.getTime() > endDate.getTime()))\n ) {\n return null;\n }\n const { unit, step } = this._scene._gantt.parsedOptions.reverseSortedTimelineScales[0];\n let taskBarSize =\n computeCountToTimeScale(endDate, startDate, unit, step, 1) * this._scene._gantt.parsedOptions.timelineColWidth;\n\n const taskBarStyle = this._scene._gantt.getTaskBarStyle(index, childIndex);\n const taskbarHeight = taskBarStyle.width;\n if (isValid(taskBarStyle.minSize)) {\n taskBarSize = Math.max(taskBarSize, taskBarStyle.minSize);\n }\n // const minDate = createDateAtMidnight(this._scene._gantt.parsedOptions.minDate);\n\n // const subTaskShowRowCount =\n // this._scene._gantt.parsedOptions.tasksShowMode === TasksShowMode.Sub_Tasks_Separate\n // ? childrenLength || 1\n // : this._scene._gantt.parsedOptions.tasksShowMode === TasksShowMode.Sub_Tasks_Arrange\n // ? computeRowsCountByRecordDate(this._scene._gantt, this._scene._gantt.records[index])\n // : this._scene._gantt.parsedOptions.tasksShowMode === TasksShowMode.Sub_Tasks_Compact\n // ? computeRowsCountByRecordDateForCompact(this._scene._gantt, this._scene._gantt.records[index])\n // : 1;\n const oneTaskHeigth = this._scene._gantt.parsedOptions.rowHeight; // this._scene._gantt.getRowHeightByIndex(index) / subTaskShowRowCount;\n const milestoneTaskBarHeight = this._scene._gantt.parsedOptions.taskBarMilestoneStyle.width;\n const x =\n computeCountToTimeScale(startDate, this._scene._gantt.parsedOptions.minDate, unit, step) *\n this._scene._gantt.parsedOptions.timelineColWidth -\n (isMilestone ? milestoneTaskBarHeight / 2 : 0);\n const y =\n this._scene._gantt.getRowsHeightByIndex(0, index - 1) +\n (this._scene._gantt.parsedOptions.tasksShowMode === TasksShowMode.Sub_Tasks_Separate\n ? ((childIndex as number) ?? 0) * oneTaskHeigth\n : this._scene._gantt.parsedOptions.tasksShowMode === TasksShowMode.Sub_Tasks_Arrange ||\n this._scene._gantt.parsedOptions.tasksShowMode === TasksShowMode.Sub_Tasks_Compact\n ? taskRecord.vtable_gantt_showIndex * oneTaskHeigth\n : 0) +\n (oneTaskHeigth - (isMilestone ? milestoneTaskBarHeight : taskbarHeight)) / 2;\n const barGroupBox = new GanttTaskBarNode({\n x,\n y,\n width: isMilestone ? milestoneTaskBarHeight : taskBarSize,\n // height: this._scene._gantt.parsedOptions.rowHeight,\n height: isMilestone ? milestoneTaskBarHeight : taskbarHeight,\n cornerRadius: isMilestone\n ? this._scene._gantt.parsedOptions.taskBarMilestoneStyle.cornerRadius\n : taskBarStyle.cornerRadius,\n lineWidth: isMilestone\n ? this._scene._gantt.parsedOptions.taskBarMilestoneStyle.borderLineWidth * 2\n : (taskBarStyle.borderLineWidth ?? taskBarStyle.borderWidth) * 2,\n stroke: isMilestone\n ? this._scene._gantt.parsedOptions.taskBarMilestoneStyle.borderColor\n : taskBarStyle.borderColor,\n angle: isMilestone ? (45 / 180) * Math.PI : 0,\n anchor: isMilestone ? [x + milestoneTaskBarHeight / 2, y + milestoneTaskBarHeight / 2] : undefined\n // clip: true\n });\n barGroupBox.name = 'task-bar';\n //如果TaskShowMode是tasks_separate模式 这里的task_index其实是table中的bodyIndex;如果TaskShowMode是sub_tasks_***模式 task_index也是对应父节点任务条在table中的bodyIndex(但不会渲染父节点,只是渲染子节点)\n barGroupBox.task_index = index;\n //如果TaskShowMode是tasks_separate模式,不会赋值sub_task_index;如果TaskShowMode是sub_tasks_***模式 这里的sub_task_index是父节点下子元素的index\n barGroupBox.sub_task_index = childIndex as any;\n barGroupBox.record = taskRecord;\n\n const barGroup = new Group({\n x: 0,\n y: 0,\n width: barGroupBox.attribute.width,\n height: barGroupBox.attribute.height,\n cornerRadius: isMilestone\n ? this._scene._gantt.parsedOptions.taskBarMilestoneStyle.cornerRadius\n : taskBarStyle.cornerRadius,\n clip: this._scene._gantt.parsedOptions.taskBarClip\n });\n barGroup.name = 'task-bar-group';\n barGroupBox.appendChild(barGroup);\n barGroupBox.clipGroupBox = barGroup;\n let rootContainer;\n let renderDefaultBar = true;\n let renderDefaultText = true;\n\n if (taskBarCustomLayout) {\n let customLayoutObj;\n if (typeof taskBarCustomLayout === 'function') {\n const arg = {\n width: taskBarSize,\n height: taskbarHeight,\n index,\n startDate,\n endDate,\n taskDays,\n progress,\n taskRecord,\n ganttInstance: this._scene._gantt\n };\n customLayoutObj = taskBarCustomLayout(arg);\n } else {\n customLayoutObj = taskBarCustomLayout;\n }\n if (customLayoutObj) {\n // if (customLayoutObj.rootContainer) {\n // customLayoutObj.rootContainer = decodeReactDom(customLayoutObj.rootContainer);\n // }\n rootContainer = customLayoutObj.rootContainer;\n renderDefaultBar = customLayoutObj.renderDefaultBar ?? false;\n renderDefaultText = customLayoutObj.renderDefaultText ?? false;\n rootContainer && (rootContainer.name = 'task-bar-custom-render');\n }\n }\n\n if (renderDefaultBar) {\n // 创建整个任务条rect\n const rect = createRect({\n x: 0,\n y: 0, //this._scene._gantt.parsedOptions.rowHeight - taskbarHeight) / 2,\n width: barGroupBox.attribute.width,\n height: barGroupBox.attribute.height,\n fill: isMilestone ? this._scene._gantt.parsedOptions.taskBarMilestoneStyle.fillColor : taskBarStyle.barColor,\n pickable: false\n });\n rect.name = 'task-bar-rect';\n barGroup.appendChild(rect);\n barGroupBox.barRect = rect;\n if (taskRecord.type !== TaskType.MILESTONE) {\n // 创建已完成部分任务条rect\n const progress_rect = createRect({\n x: 0,\n y: 0, //(this._scene._gantt.parsedOptions.rowHeight - taskbarHeight) / 2,\n width: (taskBarSize * progress) / 100,\n height: taskbarHeight,\n fill: taskBarStyle.completedBarColor,\n pickable: false\n });\n progress_rect.name = 'task-bar-progress-rect';\n barGroup.appendChild(progress_rect);\n barGroupBox.progressRect = progress_rect;\n }\n }\n\n rootContainer && barGroup.appendChild(rootContainer);\n if (renderDefaultText && taskRecord.type !== TaskType.MILESTONE) {\n const { textAlign, textBaseline, fontSize, fontFamily, textOverflow, color, padding } =\n this._scene._gantt.parsedOptions.taskBarLabelStyle;\n const position = getTextPos(toBoxArray(padding), textAlign, textBaseline, taskBarSize, taskbarHeight);\n //创建label 文字\n const label = createText({\n // visible: false,\n // pickable: false,\n x: position.x, //extAlign === 'center' ? taskBarSize / 2 : textAlign === 'left' ? 10 : taskBarSize - 10,\n y: position.y, //fontSize / 2,\n fontSize: fontSize, // 10\n fill: color,\n fontFamily: fontFamily,\n text: parseStringTemplate(this._scene._gantt.parsedOptions.taskBarLabelText as string, taskRecord),\n maxLineWidth: taskBarSize - TASKBAR_HOVER_ICON_WIDTH,\n textBaseline,\n textAlign,\n ellipsis:\n textOverflow === 'clip'\n ? ''\n : textOverflow === 'ellipsis'\n ? '...'\n : isValid(textOverflow)\n ? textOverflow\n : undefined,\n poptip: {\n position: 'bottom'\n // dx: (taskBarSize - TASKBAR_HOVER_ICON_WIDTH) / 4\n }\n // dx: 12 + 4,\n // dy: this._scene._gantt.barLabelStyle.fontSize / 2\n } as any);\n\n barGroup.appendChild(label);\n barGroupBox.textLabel = label;\n\n barGroupBox.labelStyle = this._scene._gantt.parsedOptions.taskBarLabelStyle;\n\n barGroupBox.updateTextPosition();\n }\n if (\n renderDefaultText &&\n taskRecord.type === 'milestone' &&\n this._scene._gantt.parsedOptions.taskBarMilestoneStyle.labelText\n ) {\n const milestoneStyle = this._scene._gantt.parsedOptions.taskBarMilestoneStyle;\n const textStyle = milestoneStyle.labelTextStyle || {};\n const pos = this.calculateMilestoneTextPosition(\n milestoneStyle.textOrient || 'right',\n milestoneStyle.width,\n textStyle.padding ?? 4\n );\n\n const textContainer = new Group({\n x,\n y,\n width: milestoneStyle.width,\n height: milestoneStyle.width,\n angle: 0,\n pickable: false\n });\n\n const milestoneLabel = createText({\n x: pos.textX,\n y: pos.textY,\n fontSize: textStyle.fontSize || 16,\n fontFamily: textStyle.fontFamily || 'Arial',\n fill: textStyle.color || '#ff0000',\n textBaseline: (textStyle.textBaseline || pos.textBaselineValue) as any,\n textAlign: textStyle.textAlign || pos.textAlignValue,\n text: this.formatMilestoneText(milestoneStyle.labelText, taskRecord),\n pickable: false\n });\n\n textContainer.appendChild(milestoneLabel);\n this.barContainer.appendChild(textContainer);\n\n barGroupBox.milestoneTextLabel = milestoneLabel;\n barGroupBox.milestoneTextContainer = textContainer;\n }\n return barGroupBox;\n }\n updateTaskBarNode(index: number, sub_task_index?: number) {\n const taskbarGroup = this.getTaskBarNodeByIndex(index, sub_task_index);\n if (taskbarGroup) {\n this.barContainer.removeChild(taskbarGroup);\n }\n const barGroup = this.initBar(index, sub_task_index);\n if (barGroup) {\n this.barContainer.insertInto(barGroup, index); //TODO\n barGroup.updateTextPosition();\n }\n }\n initHoverBarIcons() {\n const hoverBarGroup = new Group({\n x: 0,\n y: 0,\n width: 100,\n height: 100,\n clip: false, // 关闭裁剪以允许进度手柄显示在任务条外部\n pickable: false,\n cornerRadius:\n this._scene._gantt.parsedOptions.taskBarHoverStyle.cornerRadius ?? defaultTaskBarStyle.cornerRadius ?? 0,\n fill: this._scene._gantt.parsedOptions.taskBarHoverStyle.barOverlayColor,\n visibleAll: false\n });\n this.hoverBarGroup = hoverBarGroup;\n hoverBarGroup.name = 'task-bar-hover-shadow';\n // this.barContainer.appendChild(hoverBarGroup);\n // 创建左侧的icon\n if (this._scene._gantt.parsedOptions.taskBarResizable) {\n const icon = new Image({\n x: 0,\n y: 0, //this._scene._gantt.parsedOptions.rowHeight - taskbarHeight) / 2,\n width: TASKBAR_HOVER_ICON_WIDTH,\n height: 20,\n image: TASKBAR_HOVER_ICON,\n pickable: true,\n cursor: 'col-resize'\n });\n icon.name = 'task-bar-hover-shadow-left-icon';\n this.hoverBarLeftIcon = icon;\n hoverBarGroup.appendChild(icon);\n\n // 创建右侧的icon\n const rightIcon = new Image({\n x: 0,\n y: 0, //this._scene._gantt.parsedOptions.rowHeight - taskbarHeight) / 2,\n width: TASKBAR_HOVER_ICON_WIDTH,\n height: 20,\n image: TASKBAR_HOVER_ICON,\n pickable: true,\n cursor: 'col-resize'\n });\n rightIcon.name = 'task-bar-hover-shadow-right-icon';\n this.hoverBarRightIcon = rightIcon;\n hoverBarGroup.appendChild(rightIcon);\n }\n\n // 创建进度手柄\n const progressHandle = new Group({\n x: 0,\n y: 0,\n width: 12,\n height: 12,\n pickable: true,\n cursor: 'ew-resize',\n visible: false\n });\n\n // 创建三角形手柄\n const triangleHandle = new Polygon({\n points: [\n { x: 6, y: 0 }, // 顶部中心点\n { x: 0, y: 6 }, // 左下角\n { x: 12, y: 6 } // 右下角\n ],\n fill: '#0064ff',\n stroke: '#ffffff',\n lineWidth: 1,\n pickable: false\n });\n progressHandle.appendChild(triangleHandle);\n\n progressHandle.name = 'task-bar-progress-handle';\n this.hoverBarProgressHandle = progressHandle;\n hoverBarGroup.appendChild(progressHandle);\n }\n\n setX(x: number) {\n this.barContainer.setAttribute('x', x);\n }\n setY(y: number) {\n this.barContainer.setAttribute('y', y);\n }\n /** 重新创建任务条节点 */\n refresh() {\n this.width = this._scene._gantt.tableNoFrameWidth;\n this.height = this._scene._gantt.gridHeight;\n this.group.setAttributes({\n height: this.height,\n width: this.width,\n y: this._scene._gantt.getAllHeaderRowsHeight()\n });\n const x = this.barContainer.attribute.x;\n const y = this.barContainer.attribute.y;\n this.barContainer.removeAllChild();\n this.group.removeChild(this.barContainer);\n this.initBars();\n this.setX(x);\n this.setY(y);\n }\n resize() {\n this.width = this._scene._gantt.tableNoFrameWidth;\n this.height = this._scene._gantt.gridHeight;\n this.group.setAttribute('width', this.width);\n this.group.setAttribute('height', this.height);\n }\n\n showHoverBar(x: number, y: number, width: number, height: number, target?: GanttTaskBarNode) {\n const { startDate, endDate, taskRecord } = this._scene._gantt.getTaskInfoByTaskListIndex(\n target.task_index,\n target.sub_task_index\n );\n if (target && target.name === 'task-bar') {\n // this.hoverBarGroup.releatedTaskBar = target;\n target.appendChild(this.hoverBarGroup);\n }\n this.hoverBarGroup.setAttribute('x', 0);\n this.hoverBarGroup.setAttribute('y', 0);\n this.hoverBarGroup.setAttribute('width', width);\n this.hoverBarGroup.setAttribute('height', height);\n this.hoverBarGroup.setAttribute('visibleAll', true);\n const taskBarStyle = this._scene._gantt.getTaskBarStyle(target.task_index, target.sub_task_index);\n if (taskRecord.type === TaskType.MILESTONE) {\n this.hoverBarGroup.setAttribute('cornerRadius', target.attribute.cornerRadius);\n } else {\n const cornerRadius =\n this._scene._gantt.parsedOptions.taskBarHoverStyle.cornerRadius ?? taskBarStyle.cornerRadius ?? 0;\n this.hoverBarGroup.setAttribute('cornerRadius', cornerRadius);\n }\n this.hoverBarLeftIcon?.setAttribute('visible', false);\n this.hoverBarRightIcon?.setAttribute('visible', false);\n this.hoverBarProgressHandle?.setAttribute('visibleAll', false);\n\n let leftResizable = true;\n let rightResizable = true;\n let progressAdjustable = true;\n\n const progressField = this._scene._gantt.parsedOptions.progressField;\n const hasProgressField =\n progressField && taskRecord[progressField] !== undefined && taskRecord[progressField] !== null;\n\n if (!hasProgressField) {\n progressAdjustable = false;\n } else if (typeof this._scene._gantt.parsedOptions.taskBarProgressAdjustable === 'function') {\n const arg = {\n index: target.task_index,\n startDate,\n endDate,\n taskRecord,\n ganttInstance: this._scene._gantt\n };\n progressAdjustable = this._scene._gantt.parsedOptions.taskBarProgressAdjustable(arg);\n } else {\n progressAdjustable = this._scene._gantt.parsedOptions.taskBarProgressAdjustable;\n }\n\n if (taskRecord.type === TaskType.MILESTONE) {\n leftResizable = false;\n rightResizable = false;\n progressAdjustable = false;\n } else if (typeof this._scene._gantt.parsedOptions.taskBarResizable === 'function') {\n const arg = {\n index: target.task_index,\n startDate,\n endDate,\n taskRecord,\n ganttInstance: this._scene._gantt\n };\n const resizableResult = this._scene._gantt.parsedOptions.taskBarResizable(arg);\n if (Array.isArray(resizableResult)) {\n [leftResizable, rightResizable] = resizableResult;\n } else {\n leftResizable = resizableResult;\n rightResizable = resizableResult;\n }\n } else if (Array.isArray(this._scene._gantt.parsedOptions.taskBarResizable)) {\n [leftResizable, rightResizable] = this._scene._gantt.parsedOptions.taskBarResizable;\n } else {\n leftResizable = this._scene._gantt.parsedOptions.taskBarResizable;\n rightResizable = this._scene._gantt.parsedOptions.taskBarResizable;\n }\n if (leftResizable) {\n this.hoverBarLeftIcon.setAttribute('visible', true);\n }\n if (rightResizable) {\n this.hoverBarRightIcon.setAttribute('visible', true);\n }\n if (progressAdjustable) {\n this.hoverBarProgressHandle.setAttribute('visibleAll', true);\n }\n if (this.hoverBarLeftIcon) {\n this.hoverBarLeftIcon.setAttribute('x', 0);\n this.hoverBarLeftIcon.setAttribute('y', Math.ceil(height / 10));\n this.hoverBarLeftIcon.setAttribute('width', TASKBAR_HOVER_ICON_WIDTH);\n this.hoverBarLeftIcon.setAttribute('height', height - 2 * Math.ceil(height / 10));\n this.hoverBarRightIcon.setAttribute('x', width - TASKBAR_HOVER_ICON_WIDTH);\n this.hoverBarRightIcon.setAttribute('y', Math.ceil(height / 10));\n this.hoverBarRightIcon.setAttribute('width', TASKBAR_HOVER_ICON_WIDTH);\n this.hoverBarRightIcon.setAttribute('height', height - 2 * Math.ceil(height / 10));\n }\n if (this.hoverBarProgressHandle) {\n const { progress } = this._scene._gantt.getTaskInfoByTaskListIndex(target.task_index, target.sub_task_index);\n const progressX = (width * progress) / 100 - 6;\n this.hoverBarProgressHandle.setAttribute('x', progressX);\n this.hoverBarProgressHandle.setAttribute('y', height - 3); // 让三角形有一半在进度条内\n }\n }\n hideHoverBar() {\n this.hoverBarGroup.setAttribute('visibleAll', false);\n }\n\n createSelectedBorder(\n x: number,\n y: number,\n width: number,\n height: number,\n attachedToTaskBarNode: GanttTaskBarNode,\n showLinkPoint: boolean = false\n ) {\n const record = attachedToTaskBarNode.record;\n const selectedBorder = new Group({\n x,\n y,\n width,\n height,\n // lineWidth: this._scene._gantt.parsedOptions.taskBarSelectedStyle.borderLineWidth,\n pickable: false,\n // cornerRadius: attachedToTaskBarNode.attribute.cornerRadius,\n // fill: false,\n // stroke: this._scene._gantt.parsedOptions.taskBarSelectedStyle.borderColor,\n // shadowColor: this._scene._gantt.parsedOptions.taskBarSelectedStyle.shadowColor,\n // shadowOffsetX: this._scene._gantt.parsedOptions.taskBarSelectedStyle.shadowOffsetX,\n // shadowOffsetY: this._scene._gantt.parsedOptions.taskBarSelectedStyle.shadowOffsetY,\n // shadowBlur: this._scene._gantt.parsedOptions.taskBarSelectedStyle.shadowBlur,\n attachedToTaskBarNode: attachedToTaskBarNode,\n zIndex: 10000\n // angle: attachedToTaskBarNode.attribute.angle,\n // anchor: attachedToTaskBarNode.attribute.anchor\n } as any);\n selectedBorder.name = 'task-bar-select-border';\n this.barContainer.appendChild(selectedBorder);\n this.selectedBorders.push(selectedBorder);\n\n const selectRectBorder = new Group({\n x: 0,\n y: 0,\n width,\n height,\n lineWidth: this._scene._gantt.parsedOptions.taskBarSelectedStyle.borderLineWidth,\n pickable: false,\n cornerRadius: attachedToTaskBarNode.attribute.cornerRadius,\n fill: false,\n stroke: this._scene._gantt.parsedOptions.taskBarSelectedStyle.borderColor,\n shadowColor: this._scene._gantt.parsedOptions.taskBarSelectedStyle.shadowColor,\n shadowOffsetX: this._scene._gantt.parsedOptions.taskBarSelectedStyle.shadowOffsetX,\n shadowOffsetY: this._scene._gantt.parsedOptions.taskBarSelectedStyle.shadowOffsetY,\n shadowBlur: this._scene._gantt.parsedOptions.taskBarSelectedStyle.shadowBlur,\n // attachedToTaskBarNode: attachedToTaskBarNode,\n angle: attachedToTaskBarNode.attribute.angle,\n anchor: [width / 2, height / 2]\n });\n // selectRectBorder.name = 'task-bar-select-border';\n selectedBorder.appendChild(selectRectBorder);\n\n if (showLinkPoint) {\n const isMilestone = record.type === TaskType.MILESTONE;\n const linePointPadding = isMilestone ? 15 : 10;\n const linkPointContainer = new Group({\n x: -linePointPadding,\n y: 0,\n width: 10,\n height: height,\n pickable: true\n });\n const linkPoint = new Circle({\n x: 5,\n y: height / 2,\n radius: this._scene._gantt.parsedOptions.dependencyLinkLineCreatePointStyle.radius,\n fill: this._scene._gantt.parsedOptions.dependencyLinkLineCreatePointStyle.fillColor,\n stroke: this._scene._gantt.parsedOptions.dependencyLinkLineCreatePointStyle.strokeColor,\n lineWidth: this._scene._gantt.parsedOptions.dependencyLinkLineCreatePointStyle.strokeWidth,\n pickable: false\n });\n linkPointContainer.appendChild(linkPoint);\n linkPointContainer.name = 'task-bar-link-point-left';\n selectedBorder.appendChild(linkPointContainer);\n\n const linkPointContainer1 = new Group({\n x: width + (linePointPadding - 10),\n y: 0,\n width: 10,\n height: height,\n pickable: true\n });\n const linkPoint1 = new Circle({\n x: 5,\n y: height / 2,\n radius: this._scene._gantt.parsedOptions.dependencyLinkLineCreatePointStyle.radius,\n fill: this._scene._gantt.parsedOptions.dependencyLinkLineCreatePointStyle.fillColor,\n stroke: this._scene._gantt.parsedOptions.dependencyLinkLineCreatePointStyle.strokeColor,\n lineWidth: this._scene._gantt.parsedOptions.dependencyLinkLineCreatePointStyle.strokeWidth,\n pickable: false,\n pickStrokeBuffer: 10\n });\n linkPointContainer1.appendChild(linkPoint1);\n linkPointContainer1.name = 'task-bar-link-point-right';\n selectedBorder.appendChild(linkPointContainer1);\n }\n }\n removeSelectedBorder() {\n this.selectedBorders.forEach(border => {\n border.delete();\n });\n this.selectedBorders = [];\n }\n removeSecondSelectedBorder() {\n if (this.selectedBorders.length === 2) {\n const secondBorder = this.selectedBorders.pop();\n secondBorder.delete();\n }\n }\n updateCreatingDependencyLine(x1: number, y1: number, x2: number, y2: number) {\n if (this.creatingDependencyLine) {\n this.creatingDependencyLine.delete();\n this.creatingDependencyLine = undefined;\n }\n const line = new Line({\n points: [\n { x: x1, y: y1 },\n { x: x2, y: y2 }\n ],\n stroke: this._scene._gantt.parsedOptions.dependencyLinkLineCreatingStyle.lineColor,\n lineWidth: this._scene._gantt.parsedOptions.dependencyLinkLineCreatingStyle.lineWidth,\n lineDash: this._scene._gantt.parsedOptions.dependencyLinkLineCreatingStyle.lineDash,\n pickable: false\n });\n this.creatingDependencyLine = line;\n this.selectedBorders[0].appendChild(line);\n }\n\n getTaskBarNodeByIndex(index: number, sub_task_index?: number): GanttTaskBarNode {\n let c = this.barContainer.firstChild as GanttTaskBarNode;\n if (!c) {\n return null;\n }\n for (let i = 0; i < this.barContainer.childrenCount; i++) {\n if (\n c.task_index === index &&\n (!isValid(sub_task_index) || (isValid(sub_task_index) && c.sub_task_index === sub_task_index))\n ) {\n return c;\n }\n c = c._next as GanttTaskBarNode;\n }\n return null;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/scenegraph/task-bar.ts"],"names":[],"mappings":";;;AAAA,yDAA0G;AAG1G,wCAAyF;AACzF,6CAA2C;AAC3C,kDAAkE;AAClE,6CAAgD;AAChD,0CAAsD;AAEtD,MAAM,kBAAkB,GAAG;;;OAGpB,CAAC;AACK,QAAA,wBAAwB,GAAG,EAAE,CAAC;AAE3C,MAAa,OAAO;IAClB,mBAAmB,CAAC,IAAY,EAAE,MAAW;QAC3C,IAAI,CAAC,IAAI,EAAE;YACT,OAAO,EAAE,CAAC;SACX;QACD,MAAM,YAAY,GAAG,YAAY,CAAC;QAClC,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;QAEzC,IAAI,OAAO,EAAE;YACX,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;gBACtB,MAAM,SAAS,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;gBACvD,MAAM,UAAU,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC;gBACrC,IAAI,UAAU,KAAK,SAAS,EAAE;oBAC5B,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC;iBAChD;YACH,CAAC,CAAC,CAAC;SACJ;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,8BAA8B,CAC5B,QAAgB,EAChB,cAAsB,EACtB,UAA6B,CAAC;QAO9B,MAAM,UAAU,GAAG,OAAO,OAAO,KAAK,QAAQ,CAAC,CA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AAM,EAAE;gBACN,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE;gBAChB,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE;aACjB;YACD,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,+BAA+B,CAAC,SAAS;YAClF,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,+BAA+B,CAAC,SAAS;YACrF,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,+BAA+B,CAAC,QAAQ;YACnF,QAAQ,EAAE,KAAK;SAChB,CAAC,CAAC;QACH,IAAI,CAAC,sBAAsB,GAAG,IAAI,CAAC;QACnC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IAC5C,CAAC;IAED,qBAAqB,CAAC,KAAa,EAAE,cAAuB;QAC1D,IAAI,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC,UAA8B,CAAC;QACzD,IAAI,CAAC,CAAC,EAAE;YACN,OAAO,IAAI,CAAC;SACb;QACD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC,aAAa,EAAE,CAAC,EAAE,EAAE;YACxD,IACE,CAAC,CAAC,UAAU,KAAK,KAAK;gBACtB,CAAC,CAAC,IAAA,gBAAO,EAAC,cAAc,CAAC,IAAI,CAAC,IAAA,gBAAO,EAAC,cAAc,CAAC,IAAI,CAAC,CAAC,cAAc,KAAK,cAAc,CAAC,CAAC,EAC9F;gBACA,OAAO,CAAC,CAAC;aACV;YACD,CAAC,GAAG,CAAC,CAAC,KAAyB,CAAC;SACjC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AA12BD,0BA02BC","file":"task-bar.js","sourcesContent":["import { Group, createText, createRect, Image, Circle, Line, Polygon } from '@visactor/vtable/es/vrender';\nimport type { Scenegraph } from './scenegraph';\n// import { Icon } from './icon';\nimport { computeCountToTimeScale, parseStringTemplate, toBoxArray } from '../tools/util';\nimport { isValid } from '@visactor/vutils';\nimport { defaultTaskBarStyle, getTextPos } from '../gantt-helper';\nimport { GanttTaskBarNode } from './gantt-node';\nimport { TasksShowMode, TaskType } from '../ts-types';\n\nconst TASKBAR_HOVER_ICON = `<svg width=\"100\" height=\"200\" xmlns=\"http://www.w3.org/2000/svg\">\n <line x1=\"30\" y1=\"10\" x2=\"30\" y2=\"190\" stroke=\"black\" stroke-width=\"4\"/>\n <line x1=\"70\" y1=\"10\" x2=\"70\" y2=\"190\" stroke=\"black\" stroke-width=\"4\"/>\n</svg>`;\nexport const TASKBAR_HOVER_ICON_WIDTH = 10;\n\nexport class TaskBar {\n formatMilestoneText(text: string, record: any): string {\n if (!text) {\n return '';\n }\n const fieldPattern = /{([^}]+)}/g;\n const matches = text.match(fieldPattern);\n\n if (matches) {\n matches.forEach(match => {\n const fieldName = match.substring(1, match.length - 1);\n const fieldValue = record[fieldName];\n if (fieldValue !== undefined) {\n text = text.replace(match, String(fieldValue));\n }\n });\n }\n return text;\n }\n\n calculateMilestoneTextPosition(\n position: string,\n milestoneWidth: number,\n padding: number | number[] = 4\n ): {\n textX: number;\n textY: number;\n textAlignValue: CanvasTextAlign;\n textBaselineValue: CanvasTextBaseline;\n } {\n const paddingVal = typeof padding === 'number' ? padding : 4;\n let textX = 0;\n let textY = 0;\n let textAlignValue: CanvasTextAlign = 'left';\n let textBaselineValue: CanvasTextBaseline = 'middle';\n\n // 将文本位置改为以中心点为基准\n const center = milestoneWidth / 2;\n\n switch (position) {\n case 'left':\n textX = -paddingVal;\n textY = center;\n textAlignValue = 'end';\n textBaselineValue = 'middle';\n break;\n case 'right':\n textX = milestoneWidth + paddingVal;\n textY = center;\n textAlignValue = 'start';\n textBaselineValue = 'middle';\n break;\n case 'top':\n textX = center;\n textY = -paddingVal;\n textAlignValue = 'center';\n textBaselineValue = 'bottom';\n break;\n case 'bottom':\n textX = center;\n textY = milestoneWidth + paddingVal;\n textAlignValue = 'center';\n textBaselineValue = 'top';\n break;\n default:\n textX = milestoneWidth + paddingVal;\n textY = center;\n textAlignValue = 'start';\n textBaselineValue = 'middle';\n }\n\n return {\n textX,\n textY,\n textAlignValue,\n textBaselineValue\n };\n }\n group: Group;\n barContainer: Group;\n hoverBarGroup: Group;\n creatingDependencyLine: Line;\n hoverBarLeftIcon: Image;\n hoverBarRightIcon: Image;\n hoverBarProgressHandle: Group;\n _scene: Scenegraph;\n width: number;\n height: number;\n selectedBorders: Group[] = [];\n constructor(scene: Scenegraph) {\n this._scene = scene;\n // const height = Math.min(scene._gantt.tableNoFrameHeight, scene._gantt.drawHeight);\n this.width = scene._gantt.tableNoFrameWidth;\n this.height = scene._gantt.gridHeight;\n this.group = new Group({\n x: 0,\n y: scene._gantt.getAllHeaderRowsHeight(),\n width: this.width,\n height: this.height,\n pickable: false,\n clip: true\n });\n this.group.name = 'task-bar-container';\n scene.ganttGroup.addChild(this.group);\n this.initBars();\n this.initHoverBarIcons();\n }\n\n initBars() {\n this.barContainer = new Group({\n x: 0,\n y: 0,\n width: this._scene._gantt.getAllDateColsWidth(),\n height: this._scene._gantt.getAllTaskBarsHeight(),\n pickable: false,\n clip: true\n });\n this.group.appendChild(this.barContainer);\n\n for (let i = 0; i < this._scene._gantt.itemCount; i++) {\n if (\n this._scene._gantt.parsedOptions.tasksShowMode === TasksShowMode.Sub_Tasks_Inline ||\n this._scene._gantt.parsedOptions.tasksShowMode === TasksShowMode.Sub_Tasks_Separate ||\n this._scene._gantt.parsedOptions.tasksShowMode === TasksShowMode.Sub_Tasks_Arrange ||\n this._scene._gantt.parsedOptions.tasksShowMode === TasksShowMode.Sub_Tasks_Compact\n ) {\n const record = this._scene._gantt.getRecordByIndex(i);\n if (record.children?.length > 0) {\n for (let j = 0; j < record.children?.length; j++) {\n const { barGroupBox, baselineBar } = this.initBar(i, j, record.children.length);\n if (baselineBar) {\n this.barContainer.appendChild(baselineBar);\n }\n if (barGroupBox) {\n this.barContainer.appendChild(barGroupBox);\n }\n }\n } else {\n const { barGroupBox, baselineBar } = this.initBar(i);\n if (baselineBar) {\n this.barContainer.appendChild(baselineBar);\n }\n if (barGroupBox) {\n this.barContainer.appendChild(barGroupBox);\n }\n }\n continue;\n } else if (this._scene._gantt.parsedOptions.tasksShowMode === TasksShowMode.Project_Sub_Tasks_Inline) {\n const record = this._scene._gantt.getRecordByIndex(i);\n const isExpanded = record.hierarchyState === 'expand';\n // For project type records, we want to show all children in one line when collapsed\n if (record.type === TaskType.PROJECT && record.children?.length > 0 && !isExpanded) {\n const recordIndex = this._scene._gantt.getRecordIndexByTaskShowIndex(i);\n const sub_task_indexs: number[] = Array.isArray(recordIndex) ? [...recordIndex] : [recordIndex];\n\n const callInitBar = (record: any, sub_task_indexs: number[]) => {\n if (record.children?.length > 0) {\n for (let j = 0; j < record.children?.length; j++) {\n const child_record = record.children[j];\n if (child_record.type !== TaskType.PROJECT) {\n const { barGroupBox, baselineBar } = this.initBar(i, [...sub_task_indexs, j], record.children.length);\n if (baselineBar) {\n this.barContainer.appendChild(baselineBar);\n }\n if (barGroupBox) {\n this.barContainer.appendChild(barGroupBox);\n }\n } else {\n //如果是project类型的子任务,需要递归调用 只将类型不是project的子任务添加到barContainer中\n callInitBar(child_record, [...sub_task_indexs, j]);\n }\n }\n }\n };\n callInitBar(record, sub_task_indexs);\n } else {\n // For non-project tasks, use the default Tasks_Separate mode\n const { barGroupBox, baselineBar } = this.initBar(i);\n if (baselineBar) {\n this.barContainer.appendChild(baselineBar);\n }\n if (barGroupBox) {\n this.barContainer.appendChild(barGroupBox);\n }\n }\n continue;\n } else {\n const { barGroupBox, baselineBar } = this.initBar(i);\n if (baselineBar) {\n this.barContainer.appendChild(baselineBar);\n }\n if (barGroupBox) {\n this.barContainer.appendChild(barGroupBox);\n }\n }\n }\n }\n\n /**\n * @param index 任务显示的index,从0开始\n * @param childIndex 子任务的index, 当taskShowMode是sub_tasks_*模式时,会传入sub_task_index。如果是tasks_separate模式,sub_task_index传入undefined。\n * 如果模式Project_Sub_Tasks_Inline时,传入的sub_task_index是一个数组,数组的第一个元素是父任务的index,第二个元素是子任务的index,依次类推算是各层子任务的path。\n */\n initBar(index: number, childIndex?: number | number[], childrenLength?: number) {\n const taskBarCustomLayout = this._scene._gantt.parsedOptions.taskBarCustomLayout;\n const { startDate, endDate, taskDays, progress, taskRecord } = this._scene._gantt.getTaskInfoByTaskListIndex(\n index,\n childIndex\n );\n const isMilestone = taskRecord.type === TaskType.MILESTONE;\n if (\n (isMilestone && !startDate) ||\n (!isMilestone && (taskDays <= 0 || !startDate || !endDate || startDate.getTime() > endDate.getTime()))\n ) {\n return { barGroupBox: null, baselineBar: null };\n }\n const { unit, step } = this._scene._gantt.parsedOptions.reverseSortedTimelineScales[0];\n let taskBarSize =\n computeCountToTimeScale(endDate, startDate, unit, step, 1) * this._scene._gantt.parsedOptions.timelineColWidth;\n\n const taskBarStyle = this._scene._gantt.getTaskBarStyle(index, childIndex);\n const taskbarHeight = taskBarStyle.width;\n if (isValid(taskBarStyle.minSize)) {\n taskBarSize = Math.max(taskBarSize, taskBarStyle.minSize);\n }\n\n const oneTaskHeigth = this._scene._gantt.parsedOptions.rowHeight;\n const milestoneTaskBarHeight = this._scene._gantt.parsedOptions.taskBarMilestoneStyle.width;\n const x =\n computeCountToTimeScale(startDate, this._scene._gantt.parsedOptions.minDate, unit, step) *\n this._scene._gantt.parsedOptions.timelineColWidth -\n (isMilestone ? milestoneTaskBarHeight / 2 : 0);\n let y =\n this._scene._gantt.getRowsHeightByIndex(0, index - 1) +\n (this._scene._gantt.parsedOptions.tasksShowMode === TasksShowMode.Sub_Tasks_Separate\n ? ((childIndex as number) ?? 0) * oneTaskHeigth\n : this._scene._gantt.parsedOptions.tasksShowMode === TasksShowMode.Sub_Tasks_Arrange ||\n this._scene._gantt.parsedOptions.tasksShowMode === TasksShowMode.Sub_Tasks_Compact\n ? taskRecord.vtable_gantt_showIndex * oneTaskHeigth\n : 0);\n\n const baselineInfo = this._scene._gantt.getBaselineInfoByTaskListIndex(index, childIndex);\n const hasBaseline = baselineInfo.baselineStartDate && baselineInfo.baselineEndDate && baselineInfo.baselineDays > 0;\n const baselinePosition = this._scene._gantt.parsedOptions.baselinePosition;\n\n let baselineBar: any = null;\n let taskBarYOffset = 0;\n\n if (hasBaseline && !isMilestone) {\n const baselineStyle = this._scene._gantt.getBaselineStyle(index, childIndex);\n const baselineX =\n computeCountToTimeScale(baselineInfo.baselineStartDate, this._scene._gantt.parsedOptions.minDate, unit, step) *\n this._scene._gantt.parsedOptions.timelineColWidth;\n const baselineWidth =\n computeCountToTimeScale(baselineInfo.baselineEndDate, baselineInfo.baselineStartDate, unit, step, 1) *\n this._scene._gantt.parsedOptions.timelineColWidth;\n\n let baselineY: number;\n const taskBarPaddingTop = taskBarStyle.paddingTop ?? undefined;\n const baselinePaddingTop = baselineStyle.paddingTop ?? undefined;\n\n if (baselinePosition === 'overlap') {\n if (taskBarPaddingTop !== undefined) {\n baselineY = y + taskBarPaddingTop;\n } else {\n baselineY = y + (oneTaskHeigth - baselineStyle.width) / 2;\n }\n } else if (baselinePosition === 'top') {\n const gap = 4;\n if (baselinePaddingTop !== undefined && taskBarPaddingTop !== undefined) {\n baselineY = y + baselinePaddingTop;\n taskBarYOffset = taskBarPaddingTop;\n } else if (baselinePaddingTop !== undefined) {\n baselineY = y + baselinePaddingTop;\n taskBarYOffset = baselinePaddingTop + baselineStyle.width + gap;\n } else if (taskBarPaddingTop !== undefined) {\n const totalHeight = baselineStyle.width + gap + taskbarHeight;\n const startY = (oneTaskHeigth - totalHeight) / 2;\n baselineY = y + startY;\n taskBarYOffset = taskBarPaddingTop;\n } else {\n const totalHeight = baselineStyle.width + gap + taskbarHeight;\n const startY = (oneTaskHeigth - totalHeight) / 2;\n baselineY = y + startY;\n taskBarYOffset = startY + baselineStyle.width + gap;\n }\n } else {\n const gap = 4;\n if (taskBarPaddingTop !== undefined && baselinePaddingTop !== undefined) {\n taskBarYOffset = taskBarPaddingTop;\n baselineY = y + baselinePaddingTop;\n } else if (taskBarPaddingTop !== undefined) {\n taskBarYOffset = taskBarPaddingTop;\n baselineY = y + taskBarPaddingTop + taskbarHeight + gap;\n } else if (baselinePaddingTop !== undefined) {\n const totalHeight = taskbarHeight + gap + baselineStyle.width;\n const startY = (oneTaskHeigth - totalHeight) / 2;\n taskBarYOffset = startY;\n baselineY = y + baselinePaddingTop;\n } else {\n const totalHeight = taskbarHeight + gap + baselineStyle.width;\n const startY = (oneTaskHeigth - totalHeight) / 2;\n taskBarYOffset = startY;\n baselineY = y + startY + taskbarHeight + gap;\n }\n }\n\n baselineBar = createRect({\n x: baselineX,\n y: baselineY,\n width: Math.max(baselineWidth, baselineStyle.minSize || 0),\n height: baselineStyle.width,\n fill: baselineStyle.barColor,\n cornerRadius: baselineStyle.cornerRadius,\n lineWidth: (baselineStyle.borderLineWidth ?? baselineStyle.borderWidth) * 2,\n stroke: baselineStyle.borderColor,\n pickable: false\n });\n baselineBar.name = 'baseline-bar';\n }\n\n const taskBarPaddingTop = taskBarStyle.paddingTop ?? undefined;\n if (hasBaseline && !isMilestone && baselinePosition !== 'overlap') {\n y = y + taskBarYOffset;\n } else if (taskBarPaddingTop !== undefined) {\n y = y + taskBarPaddingTop;\n } else {\n y += (oneTaskHeigth - (isMilestone ? milestoneTaskBarHeight : taskbarHeight)) / 2 + taskBarYOffset;\n }\n\n const barGroupBox = new GanttTaskBarNode({\n x,\n y,\n width: isMilestone ? milestoneTaskBarHeight : taskBarSize,\n height: isMilestone ? milestoneTaskBarHeight : taskbarHeight,\n cornerRadius: isMilestone\n ? this._scene._gantt.parsedOptions.taskBarMilestoneStyle.cornerRadius\n : taskBarStyle.cornerRadius,\n lineWidth: isMilestone\n ? this._scene._gantt.parsedOptions.taskBarMilestoneStyle.borderLineWidth * 2\n : (taskBarStyle.borderLineWidth ?? taskBarStyle.borderWidth) * 2,\n stroke: isMilestone\n ? this._scene._gantt.parsedOptions.taskBarMilestoneStyle.borderColor\n : taskBarStyle.borderColor,\n angle: isMilestone ? (45 / 180) * Math.PI : 0,\n anchor: isMilestone ? [x + milestoneTaskBarHeight / 2, y + milestoneTaskBarHeight / 2] : undefined\n });\n barGroupBox.name = 'task-bar';\n barGroupBox.task_index = index;\n barGroupBox.sub_task_index = childIndex as any;\n barGroupBox.record = taskRecord;\n\n const barGroup = new Group({\n x: 0,\n y: 0,\n width: barGroupBox.attribute.width,\n height: barGroupBox.attribute.height,\n cornerRadius: isMilestone\n ? this._scene._gantt.parsedOptions.taskBarMilestoneStyle.cornerRadius\n : taskBarStyle.cornerRadius,\n clip: this._scene._gantt.parsedOptions.taskBarClip\n });\n barGroup.name = 'task-bar-group';\n barGroupBox.appendChild(barGroup);\n barGroupBox.clipGroupBox = barGroup;\n let rootContainer;\n let renderDefaultBar = true;\n let renderDefaultText = true;\n\n if (taskBarCustomLayout) {\n let customLayoutObj;\n if (typeof taskBarCustomLayout === 'function') {\n const arg = {\n width: taskBarSize,\n height: taskbarHeight,\n index,\n startDate,\n endDate,\n taskDays,\n progress,\n taskRecord,\n ganttInstance: this._scene._gantt\n };\n customLayoutObj = taskBarCustomLayout(arg);\n } else {\n customLayoutObj = taskBarCustomLayout;\n }\n if (customLayoutObj) {\n rootContainer = customLayoutObj.rootContainer;\n renderDefaultBar = customLayoutObj.renderDefaultBar ?? false;\n renderDefaultText = customLayoutObj.renderDefaultText ?? false;\n rootContainer && (rootContainer.name = 'task-bar-custom-render');\n }\n }\n\n if (renderDefaultBar) {\n const rect = createRect({\n x: 0,\n y: 0,\n width: barGroupBox.attribute.width,\n height: barGroupBox.attribute.height,\n fill: isMilestone ? this._scene._gantt.parsedOptions.taskBarMilestoneStyle.fillColor : taskBarStyle.barColor,\n pickable: false\n });\n rect.name = 'task-bar-rect';\n barGroup.appendChild(rect);\n barGroupBox.barRect = rect;\n if (taskRecord.type !== TaskType.MILESTONE) {\n const progress_rect = createRect({\n x: 0,\n y: 0,\n width: (taskBarSize * progress) / 100,\n height: taskbarHeight,\n fill: taskBarStyle.completedBarColor,\n pickable: false\n });\n progress_rect.name = 'task-bar-progress-rect';\n barGroup.appendChild(progress_rect);\n barGroupBox.progressRect = progress_rect;\n }\n }\n\n rootContainer && barGroup.appendChild(rootContainer);\n if (renderDefaultText && taskRecord.type !== TaskType.MILESTONE) {\n const { textAlign, textBaseline, fontSize, fontFamily, textOverflow, color, padding } =\n this._scene._gantt.parsedOptions.taskBarLabelStyle;\n const position = getTextPos(toBoxArray(padding), textAlign, textBaseline, taskBarSize, taskbarHeight);\n //创建label 文字\n const label = createText({\n // visible: false,\n // pickable: false,\n x: position.x, //extAlign === 'center' ? taskBarSize / 2 : textAlign === 'left' ? 10 : taskBarSize - 10,\n y: position.y, //fontSize / 2,\n fontSize: fontSize, // 10\n fill: color,\n fontFamily: fontFamily,\n text: parseStringTemplate(this._scene._gantt.parsedOptions.taskBarLabelText as string, taskRecord),\n maxLineWidth: taskBarSize - TASKBAR_HOVER_ICON_WIDTH,\n textBaseline,\n textAlign,\n ellipsis:\n textOverflow === 'clip'\n ? ''\n : textOverflow === 'ellipsis'\n ? '...'\n : isValid(textOverflow)\n ? textOverflow\n : undefined,\n poptip: {\n position: 'bottom'\n // dx: (taskBarSize - TASKBAR_HOVER_ICON_WIDTH) / 4\n }\n // dx: 12 + 4,\n // dy: this._scene._gantt.barLabelStyle.fontSize / 2\n } as any);\n\n barGroup.appendChild(label);\n barGroupBox.textLabel = label;\n\n barGroupBox.labelStyle = this._scene._gantt.parsedOptions.taskBarLabelStyle;\n\n barGroupBox.updateTextPosition();\n }\n if (\n renderDefaultText &&\n taskRecord.type === 'milestone' &&\n this._scene._gantt.parsedOptions.taskBarMilestoneStyle.labelText\n ) {\n const milestoneStyle = this._scene._gantt.parsedOptions.taskBarMilestoneStyle;\n const textStyle = milestoneStyle.labelTextStyle || {};\n const pos = this.calculateMilestoneTextPosition(\n milestoneStyle.textOrient || 'right',\n milestoneStyle.width,\n textStyle.padding ?? 4\n );\n\n const textContainer = new Group({\n x,\n y,\n width: milestoneStyle.width,\n height: milestoneStyle.width,\n angle: 0,\n pickable: false\n });\n\n const milestoneLabel = createText({\n x: pos.textX,\n y: pos.textY,\n fontSize: textStyle.fontSize || 16,\n fontFamily: textStyle.fontFamily || 'Arial',\n fill: textStyle.color || '#ff0000',\n textBaseline: (textStyle.textBaseline || pos.textBaselineValue) as any,\n textAlign: textStyle.textAlign || pos.textAlignValue,\n text: this.formatMilestoneText(milestoneStyle.labelText, taskRecord),\n pickable: false\n });\n\n textContainer.appendChild(milestoneLabel);\n this.barContainer.appendChild(textContainer);\n\n barGroupBox.milestoneTextLabel = milestoneLabel;\n barGroupBox.milestoneTextContainer = textContainer;\n }\n return { barGroupBox, baselineBar };\n }\n updateTaskBarNode(index: number, sub_task_index?: number) {\n const taskbarGroup = this.getTaskBarNodeByIndex(index, sub_task_index);\n if (taskbarGroup) {\n this.barContainer.removeChild(taskbarGroup);\n }\n const { barGroupBox, baselineBar } = this.initBar(index, sub_task_index);\n if (barGroupBox) {\n this.barContainer.insertInto(barGroupBox, index); //TODO\n barGroupBox.updateTextPosition();\n }\n if (baselineBar) {\n this.barContainer.insertBefore(baselineBar, barGroupBox);\n }\n }\n initHoverBarIcons() {\n const hoverBarGroup = new Group({\n x: 0,\n y: 0,\n width: 100,\n height: 100,\n clip: false, // 关闭裁剪以允许进度手柄显示在任务条外部\n pickable: false,\n cornerRadius:\n this._scene._gantt.parsedOptions.taskBarHoverStyle.cornerRadius ?? defaultTaskBarStyle.cornerRadius ?? 0,\n fill: this._scene._gantt.parsedOptions.taskBarHoverStyle.barOverlayColor,\n visibleAll: false\n });\n this.hoverBarGroup = hoverBarGroup;\n hoverBarGroup.name = 'task-bar-hover-shadow';\n // this.barContainer.appendChild(hoverBarGroup);\n // 创建左侧的icon\n if (this._scene._gantt.parsedOptions.taskBarResizable) {\n const icon = new Image({\n x: 0,\n y: 0, //this._scene._gantt.parsedOptions.rowHeight - taskbarHeight) / 2,\n width: TASKBAR_HOVER_ICON_WIDTH,\n height: 20,\n image: TASKBAR_HOVER_ICON,\n pickable: true,\n cursor: 'col-resize'\n });\n icon.name = 'task-bar-hover-shadow-left-icon';\n this.hoverBarLeftIcon = icon;\n hoverBarGroup.appendChild(icon);\n\n // 创建右侧的icon\n const rightIcon = new Image({\n x: 0,\n y: 0, //this._scene._gantt.parsedOptions.rowHeight - taskbarHeight) / 2,\n width: TASKBAR_HOVER_ICON_WIDTH,\n height: 20,\n image: TASKBAR_HOVER_ICON,\n pickable: true,\n cursor: 'col-resize'\n });\n rightIcon.name = 'task-bar-hover-shadow-right-icon';\n this.hoverBarRightIcon = rightIcon;\n hoverBarGroup.appendChild(rightIcon);\n }\n\n // 创建进度手柄\n const progressHandle = new Group({\n x: 0,\n y: 0,\n width: 12,\n height: 12,\n pickable: true,\n cursor: 'ew-resize',\n visible: false\n });\n\n // 创建三角形手柄\n const triangleHandle = new Polygon({\n points: [\n { x: 6, y: 0 }, // 顶部中心点\n { x: 0, y: 6 }, // 左下角\n { x: 12, y: 6 } // 右下角\n ],\n fill: '#0064ff',\n stroke: '#ffffff',\n lineWidth: 1,\n pickable: false\n });\n progressHandle.appendChild(triangleHandle);\n\n progressHandle.name = 'task-bar-progress-handle';\n this.hoverBarProgressHandle = progressHandle;\n hoverBarGroup.appendChild(progressHandle);\n }\n\n setX(x: number) {\n this.barContainer.setAttribute('x', x);\n }\n setY(y: number) {\n this.barContainer.setAttribute('y', y);\n }\n /** 重新创建任务条节点 */\n refresh() {\n this.width = this._scene._gantt.tableNoFrameWidth;\n this.height = this._scene._gantt.gridHeight;\n this.group.setAttributes({\n height: this.height,\n width: this.width,\n y: this._scene._gantt.getAllHeaderRowsHeight()\n });\n const x = this.barContainer.attribute.x;\n const y = this.barContainer.attribute.y;\n this.barContainer.removeAllChild();\n this.group.removeChild(this.barContainer);\n this.initBars();\n this.setX(x);\n this.setY(y);\n }\n resize() {\n this.width = this._scene._gantt.tableNoFrameWidth;\n this.height = this._scene._gantt.gridHeight;\n this.group.setAttribute('width', this.width);\n this.group.setAttribute('height', this.height);\n }\n\n showHoverBar(x: number, y: number, width: number, height: number, target?: GanttTaskBarNode) {\n const { startDate, endDate, taskRecord } = this._scene._gantt.getTaskInfoByTaskListIndex(\n target.task_index,\n target.sub_task_index\n );\n if (target && target.name === 'task-bar') {\n // this.hoverBarGroup.releatedTaskBar = target;\n target.appendChild(this.hoverBarGroup);\n }\n this.hoverBarGroup.setAttribute('x', 0);\n this.hoverBarGroup.setAttribute('y', 0);\n this.hoverBarGroup.setAttribute('width', width);\n this.hoverBarGroup.setAttribute('height', height);\n this.hoverBarGroup.setAttribute('visibleAll', true);\n const taskBarStyle = this._scene._gantt.getTaskBarStyle(target.task_index, target.sub_task_index);\n if (taskRecord.type === TaskType.MILESTONE) {\n this.hoverBarGroup.setAttribute('cornerRadius', target.attribute.cornerRadius);\n } else {\n const cornerRadius =\n this._scene._gantt.parsedOptions.taskBarHoverStyle.cornerRadius ?? taskBarStyle.cornerRadius ?? 0;\n this.hoverBarGroup.setAttribute('cornerRadius', cornerRadius);\n }\n this.hoverBarLeftIcon?.setAttribute('visible', false);\n this.hoverBarRightIcon?.setAttribute('visible', false);\n this.hoverBarProgressHandle?.setAttribute('visibleAll', false);\n\n let leftResizable = true;\n let rightResizable = true;\n let progressAdjustable = true;\n\n const progressField = this._scene._gantt.parsedOptions.progressField;\n const hasProgressField =\n progressField && taskRecord[progressField] !== undefined && taskRecord[progressField] !== null;\n\n if (!hasProgressField) {\n progressAdjustable = false;\n } else if (typeof this._scene._gantt.parsedOptions.taskBarProgressAdjustable === 'function') {\n const arg = {\n index: target.task_index,\n startDate,\n endDate,\n taskRecord,\n ganttInstance: this._scene._gantt\n };\n progressAdjustable = this._scene._gantt.parsedOptions.taskBarProgressAdjustable(arg);\n } else {\n progressAdjustable = this._scene._gantt.parsedOptions.taskBarProgressAdjustable;\n }\n\n if (taskRecord.type === TaskType.MILESTONE) {\n leftResizable = false;\n rightResizable = false;\n progressAdjustable = false;\n } else if (typeof this._scene._gantt.parsedOptions.taskBarResizable === 'function') {\n const arg = {\n index: target.task_index,\n startDate,\n endDate,\n taskRecord,\n ganttInstance: this._scene._gantt\n };\n const resizableResult = this._scene._gantt.parsedOptions.taskBarResizable(arg);\n if (Array.isArray(resizableResult)) {\n [leftResizable, rightResizable] = resizableResult;\n } else {\n leftResizable = resizableResult;\n rightResizable = resizableResult;\n }\n } else if (Array.isArray(this._scene._gantt.parsedOptions.taskBarResizable)) {\n [leftResizable, rightResizable] = this._scene._gantt.parsedOptions.taskBarResizable;\n } else {\n leftResizable = this._scene._gantt.parsedOptions.taskBarResizable;\n rightResizable = this._scene._gantt.parsedOptions.taskBarResizable;\n }\n if (leftResizable) {\n this.hoverBarLeftIcon.setAttribute('visible', true);\n }\n if (rightResizable) {\n this.hoverBarRightIcon.setAttribute('visible', true);\n }\n if (progressAdjustable) {\n this.hoverBarProgressHandle.setAttribute('visibleAll', true);\n }\n if (this.hoverBarLeftIcon) {\n this.hoverBarLeftIcon.setAttribute('x', 0);\n this.hoverBarLeftIcon.setAttribute('y', Math.ceil(height / 10));\n this.hoverBarLeftIcon.setAttribute('width', TASKBAR_HOVER_ICON_WIDTH);\n this.hoverBarLeftIcon.setAttribute('height', height - 2 * Math.ceil(height / 10));\n this.hoverBarRightIcon.setAttribute('x', width - TASKBAR_HOVER_ICON_WIDTH);\n this.hoverBarRightIcon.setAttribute('y', Math.ceil(height / 10));\n this.hoverBarRightIcon.setAttribute('width', TASKBAR_HOVER_ICON_WIDTH);\n this.hoverBarRightIcon.setAttribute('height', height - 2 * Math.ceil(height / 10));\n }\n if (this.hoverBarProgressHandle) {\n const { progress } = this._scene._gantt.getTaskInfoByTaskListIndex(target.task_index, target.sub_task_index);\n const progressX = (width * progress) / 100 - 6;\n this.hoverBarProgressHandle.setAttribute('x', progressX);\n this.hoverBarProgressHandle.setAttribute('y', height - 3); // 让三角形有一半在进度条内\n }\n }\n hideHoverBar() {\n this.hoverBarGroup.setAttribute('visibleAll', false);\n }\n\n createSelectedBorder(\n x: number,\n y: number,\n width: number,\n height: number,\n attachedToTaskBarNode: GanttTaskBarNode,\n showLinkPoint: boolean = false\n ) {\n const record = attachedToTaskBarNode.record;\n const selectedBorder = new Group({\n x,\n y,\n width,\n height,\n // lineWidth: this._scene._gantt.parsedOptions.taskBarSelectedStyle.borderLineWidth,\n pickable: false,\n // cornerRadius: attachedToTaskBarNode.attribute.cornerRadius,\n // fill: false,\n // stroke: this._scene._gantt.parsedOptions.taskBarSelectedStyle.borderColor,\n // shadowColor: this._scene._gantt.parsedOptions.taskBarSelectedStyle.shadowColor,\n // shadowOffsetX: this._scene._gantt.parsedOptions.taskBarSelectedStyle.shadowOffsetX,\n // shadowOffsetY: this._scene._gantt.parsedOptions.taskBarSelectedStyle.shadowOffsetY,\n // shadowBlur: this._scene._gantt.parsedOptions.taskBarSelectedStyle.shadowBlur,\n attachedToTaskBarNode: attachedToTaskBarNode,\n zIndex: 10000\n // angle: attachedToTaskBarNode.attribute.angle,\n // anchor: attachedToTaskBarNode.attribute.anchor\n } as any);\n selectedBorder.name = 'task-bar-select-border';\n this.barContainer.appendChild(selectedBorder);\n this.selectedBorders.push(selectedBorder);\n\n const selectRectBorder = new Group({\n x: 0,\n y: 0,\n width,\n height,\n lineWidth: this._scene._gantt.parsedOptions.taskBarSelectedStyle.borderLineWidth,\n pickable: false,\n cornerRadius: attachedToTaskBarNode.attribute.cornerRadius,\n fill: false,\n stroke: this._scene._gantt.parsedOptions.taskBarSelectedStyle.borderColor,\n shadowColor: this._scene._gantt.parsedOptions.taskBarSelectedStyle.shadowColor,\n shadowOffsetX: this._scene._gantt.parsedOptions.taskBarSelectedStyle.shadowOffsetX,\n shadowOffsetY: this._scene._gantt.parsedOptions.taskBarSelectedStyle.shadowOffsetY,\n shadowBlur: this._scene._gantt.parsedOptions.taskBarSelectedStyle.shadowBlur,\n // attachedToTaskBarNode: attachedToTaskBarNode,\n angle: attachedToTaskBarNode.attribute.angle,\n anchor: [width / 2, height / 2]\n });\n // selectRectBorder.name = 'task-bar-select-border';\n selectedBorder.appendChild(selectRectBorder);\n\n if (showLinkPoint) {\n const isMilestone = record.type === TaskType.MILESTONE;\n const linePointPadding = isMilestone ? 15 : 10;\n const linkPointContainer = new Group({\n x: -linePointPadding,\n y: 0,\n width: 10,\n height: height,\n pickable: true\n });\n const linkPoint = new Circle({\n x: 5,\n y: height / 2,\n radius: this._scene._gantt.parsedOptions.dependencyLinkLineCreatePointStyle.radius,\n fill: this._scene._gantt.parsedOptions.dependencyLinkLineCreatePointStyle.fillColor,\n stroke: this._scene._gantt.parsedOptions.dependencyLinkLineCreatePointStyle.strokeColor,\n lineWidth: this._scene._gantt.parsedOptions.dependencyLinkLineCreatePointStyle.strokeWidth,\n pickable: false\n });\n linkPointContainer.appendChild(linkPoint);\n linkPointContainer.name = 'task-bar-link-point-left';\n selectedBorder.appendChild(linkPointContainer);\n\n const linkPointContainer1 = new Group({\n x: width + (linePointPadding - 10),\n y: 0,\n width: 10,\n height: height,\n pickable: true\n });\n const linkPoint1 = new Circle({\n x: 5,\n y: height / 2,\n radius: this._scene._gantt.parsedOptions.dependencyLinkLineCreatePointStyle.radius,\n fill: this._scene._gantt.parsedOptions.dependencyLinkLineCreatePointStyle.fillColor,\n stroke: this._scene._gantt.parsedOptions.dependencyLinkLineCreatePointStyle.strokeColor,\n lineWidth: this._scene._gantt.parsedOptions.dependencyLinkLineCreatePointStyle.strokeWidth,\n pickable: false,\n pickStrokeBuffer: 10\n });\n linkPointContainer1.appendChild(linkPoint1);\n linkPointContainer1.name = 'task-bar-link-point-right';\n selectedBorder.appendChild(linkPointContainer1);\n }\n }\n removeSelectedBorder() {\n this.selectedBorders.forEach(border => {\n border.delete();\n });\n this.selectedBorders = [];\n }\n removeSecondSelectedBorder() {\n if (this.selectedBorders.length === 2) {\n const secondBorder = this.selectedBorders.pop();\n secondBorder.delete();\n }\n }\n updateCreatingDependencyLine(x1: number, y1: number, x2: number, y2: number) {\n if (this.creatingDependencyLine) {\n this.creatingDependencyLine.delete();\n this.creatingDependencyLine = undefined;\n }\n const line = new Line({\n points: [\n { x: x1, y: y1 },\n { x: x2, y: y2 }\n ],\n stroke: this._scene._gantt.parsedOptions.dependencyLinkLineCreatingStyle.lineColor,\n lineWidth: this._scene._gantt.parsedOptions.dependencyLinkLineCreatingStyle.lineWidth,\n lineDash: this._scene._gantt.parsedOptions.dependencyLinkLineCreatingStyle.lineDash,\n pickable: false\n });\n this.creatingDependencyLine = line;\n this.selectedBorders[0].appendChild(line);\n }\n\n getTaskBarNodeByIndex(index: number, sub_task_index?: number): GanttTaskBarNode {\n let c = this.barContainer.firstChild as GanttTaskBarNode;\n if (!c) {\n return null;\n }\n for (let i = 0; i < this.barContainer.childrenCount; i++) {\n if (\n c.task_index === index &&\n (!isValid(sub_task_index) || (isValid(sub_task_index) && c.sub_task_index === sub_task_index))\n ) {\n return c;\n }\n c = c._next as GanttTaskBarNode;\n }\n return null;\n }\n}\n"]}
|
|
@@ -89,7 +89,6 @@ function _syncTableSize(gantt) {
|
|
|
89
89
|
gantt._updateSize(), (0, gantt_helper_1.updateSplitLineAndResizeLine)(gantt), gantt.zoomScaleManager && gantt.zoomScaleManager.handleTableWidthChange());
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
//# sourceMappingURL=gantt-table-sync.js.map
|
|
93
92
|
exports.syncScrollStateToTable = syncScrollStateToTable, exports.syncScrollStateFromTable = syncScrollStateFromTable,
|
|
94
93
|
exports.syncEditCellFromTable = syncEditCellFromTable, exports.syncTreeChangeFromTable = syncTreeChangeFromTable,
|
|
95
94
|
exports.syncSortFromTable = syncSortFromTable, exports.syncDragOrderFromTable = syncDragOrderFromTable,
|
|
@@ -52,6 +52,10 @@ export interface GanttConstructorOptions {
|
|
|
52
52
|
startDateField?: string;
|
|
53
53
|
endDateField?: string;
|
|
54
54
|
progressField?: string;
|
|
55
|
+
baselineStartDateField?: string;
|
|
56
|
+
baselineEndDateField?: string;
|
|
57
|
+
baselineStyle?: ITaskBarStyle | ((args: TaskBarInteractionArgumentType) => ITaskBarStyle);
|
|
58
|
+
baselinePosition?: 'top' | 'bottom' | 'overlap';
|
|
55
59
|
labelText?: ITaskBarLabelText;
|
|
56
60
|
labelTextStyle?: ITaskBarLabelTextStyle;
|
|
57
61
|
barStyle?: ITaskBarStyle | ((args: TaskBarInteractionArgumentType) => ITaskBarStyle);
|
|
@@ -153,6 +157,7 @@ export interface ITaskBarStyle {
|
|
|
153
157
|
borderLineWidth?: number;
|
|
154
158
|
borderColor?: string;
|
|
155
159
|
minSize?: number;
|
|
160
|
+
paddingTop?: number;
|
|
156
161
|
}
|
|
157
162
|
export interface IMilestoneStyle {
|
|
158
163
|
borderColor?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/ts-types/gantt-engine.ts"],"names":[],"mappings":";;;AAqcA,IAAY,cAKX;AALD,WAAY,cAAc;IACxB,mDAAiC,CAAA;IACjC,iDAA+B,CAAA;IAC/B,qDAAmC,CAAA;IACnC,mDAAiC,CAAA;AACnC,CAAC,EALW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAKzB;AACD,IAAY,aAaX;AAbD,WAAY,aAAa;IAEvB,kDAAiC,CAAA;IAEjC,sDAAqC,CAAA;IAErC,0DAAyC,CAAA;IAEzC,wDAAuC,CAAA;IAEvC,wDAAuC,CAAA;IAEvC,sEAAqD,CAAA;AACvD,CAAC,EAbW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAaxB;AAID,IAAY,QAIX;AAJD,WAAY,QAAQ;IAClB,yBAAa,CAAA;IACb,+BAAmB,CAAA;IACnB,mCAAuB,CAAA;AACzB,CAAC,EAJW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAInB","file":"gantt-engine.js","sourcesContent":["import type { ColumnsDefine, TYPES, ListTableConstructorOptions } from '@visactor/vtable';\nimport type { Group } from '@visactor/vtable/es/vrender';\nimport type { Gantt } from '../Gantt';\nexport type LayoutObjectId = number | string;\nimport type { IGanttPlugin } from '../plugins/interface';\nimport type { IZoomScale } from './zoom-scale';\nexport interface ITimelineDateInfo {\n days: number;\n endDate: Date;\n startDate: Date;\n title: string;\n /** 当期日期属于该日期刻度的第几位。如季度日期中第四季度 返回4。 */\n dateIndex: number;\n unit: 'year' | 'month' | 'quarter' | 'week' | 'day' | 'hour' | 'minute' | 'second';\n step: number;\n}\n\nexport interface ITimelineHeaderStyle {\n padding?: number | number[];\n fontSize?: number;\n fontWeight?: string;\n color?: string;\n strokeColor?: string;\n // backgroundColor?: string;\n textAlign?: 'center' | 'end' | 'left' | 'right' | 'start'; // 设置单元格内文字的水平对齐方式\n textOverflow?: string;\n textBaseline?: 'alphabetic' | 'bottom' | 'middle' | 'top'; // 设置单元格内文字的垂直对齐方式\n textStick?: boolean;\n}\nexport interface IGrid {\n backgroundColor?: string;\n /** 需要按数据行设置不同背景色 */\n horizontalBackgroundColor?: string[] | ((args: GridHorizontalLineStyleArgumentType) => string);\n /** 需要按日期列设置不同背景色 */\n verticalBackgroundColor?: string[] | ((args: GridVerticalLineStyleArgumentType) => string);\n /** 周末背景色 */\n weekendBackgroundColor?: string;\n\n verticalLine?: ILineStyle | ((args: GridVerticalLineStyleArgumentType) => ILineStyle);\n horizontalLine?: ILineStyle | ((args: GridHorizontalLineStyleArgumentType) => ILineStyle);\n /** 竖线依赖的日期刻度。默认为timelineHeader中scales中的最小时间粒度 */\n verticalLineDependenceOnTimeScale?: 'day' | 'week' | 'month' | 'quarter' | 'year' | 'hour' | 'minute' | 'second';\n}\n//#region gantt\nexport interface GanttConstructorOptions {\n /**\n * 数据集合\n */\n records?: any[];\n\n /** 左侧任务信息表格相关配置 */\n taskListTable?: {\n /** 左侧任务列表信息占用的宽度。如果设置为'auto'表示将所有列完全展示 */\n tableWidth?: 'auto' | number;\n /** 左侧任务列表 最小宽度 */\n minTableWidth?: number;\n /** 左侧任务列表 最大宽度 */\n maxTableWidth?: number;\n } & Omit<\n //ListTable表格可配置的属性\n ListTableConstructorOptions,\n | 'container'\n | 'records'\n | 'defaultHeaderRowHeight'\n | 'defaultRowHeight'\n | 'overscrollBehavior'\n | 'rowSeriesNumber'\n | 'scrollStyle'\n | 'pixelRatio'\n | 'title'\n >;\n /** 时间刻度 */\n timelineHeader: {\n backgroundColor?: string;\n colWidth?: number;\n /** 垂直间隔线样式 */\n verticalLine?: ILineStyle;\n /** 水平间隔线样式 */\n horizontalLine?: ILineStyle;\n /**\n * ZoomScale 多级别缩放配置(优先级高于 timelineHeader.scales)\n * 当启用时,会根据缩放级别自动切换不同的 scales 组合\n */\n zoomScale?: IZoomScale;\n scales: ITimelineScale[];\n };\n\n /** 任务条相关配置及样式 */\n taskBar?: {\n /** 任务开始日期对应的数据字段名 默认按'startDate' */\n startDateField?: string;\n /** 任务结束日期对应的数据字段名 默认按'endDate' */\n endDateField?: string;\n /** 任务进度对应的数据字段名 */\n progressField?: string;\n /** 任务条展示文字。可以配置固定文本 或者 字符串模版`${fieldName}` */\n labelText?: ITaskBarLabelText;\n /** 任务条文字样式 */\n labelTextStyle?: ITaskBarLabelTextStyle;\n /** 任务条样式 */\n barStyle?: ITaskBarStyle | ((args: TaskBarInteractionArgumentType) => ITaskBarStyle);\n milestoneStyle?: IMilestoneStyle;\n projectStyle?: ITaskBarStyle | ((args: TaskBarInteractionArgumentType) => ITaskBarStyle);\n /** 自定义布局渲染 */\n customLayout?: ITaskBarCustomLayout;\n /** 任务条是否可调整大小 */\n resizable?:\n | boolean\n | [boolean, boolean]\n | ((interactionArgs: TaskBarInteractionArgumentType) => boolean | [boolean, boolean]);\n /** 任务条是否可移动 */\n moveable?: boolean | ((interactionArgs: TaskBarInteractionArgumentType) => boolean);\n /** 任务进度是否可调整 */\n progressAdjustable?: boolean | ((interactionArgs: TaskBarInteractionArgumentType) => boolean);\n /** 任务条拖拽超出当前日期范围时自动扩展日期范围 */\n moveToExtendDateRange?: boolean;\n /** 任务条是否可以被拖拽来改变顺序 */\n dragOrder?: boolean;\n /** 任务条hover时的样式 */\n hoverBarStyle?: ITaskBarHoverStyle;\n /** 任务条选择时的样式 TODO */\n selectedBarStyle?: ITaskBarSelectedStyle;\n /** 任务条是否可选择,默认为true */\n selectable?: boolean;\n /** 任务条是否裁剪溢出部分 */\n clip?: boolean;\n /** 任务条右键菜单 */\n menu?: {\n /** 右键菜单。代替原来的option.contextmenu */\n contextMenuItems?:\n | TYPES.MenuListItem[]\n | ((\n record: string,\n index: number,\n /** 当期日期属于该日期刻度的第几位。如季度日期中第四季度 返回4。 */\n dateIndex: number,\n startDate: Date,\n endDate: Date\n ) => TYPES.MenuListItem[]);\n };\n /** 数据没有排期时,可通过创建任务条排期。默认为true */\n scheduleCreatable?: boolean | ((interactionArgs: TaskBarInteractionArgumentType) => boolean);\n /** 针对没有分配日期的任务,可以显示出创建按钮 */\n scheduleCreation?: {\n buttonStyle?: ILineStyle & {\n cornerRadius?: number;\n backgroundColor?: string;\n };\n /** 任务条创建按钮的自定义渲染 */\n customLayout?: ITaskCreationCustomLayout;\n /** 任务条创建按钮的最大宽度 */\n maxWidth?: number;\n /** 任务条创建按钮的最小宽度 */\n minWidth?: number;\n };\n };\n /** 数据条目可唯一标识的字段名,默认为'id' */\n taskKeyField?: string;\n /** 任务之间的依赖关系 */\n dependency?: {\n links: ITaskLink[];\n linkLineStyle?: ILineStyle;\n linkCreatable?: boolean;\n linkSelectable?: boolean;\n linkDeletable?: boolean;\n linkSelectedLineStyle?: ITaskLinkSelectedStyle;\n /** 创建关联线的操作点 */\n linkCreatePointStyle?: IPointStyle;\n /** 创建关联线的操作点响应状态效果 */\n linkCreatingPointStyle?: IPointStyle;\n /** 创建关联线的操作线样式 */\n linkCreatingLineStyle?: ILineStyle;\n /** 依赖关系线拐点与任务条的距离 默认20 */\n distanceToTaskBar?: number;\n };\n /** 网格线配置 */\n grid?: IGrid;\n\n /** 整个外边框及横纵分割线配置。 */\n frame?: {\n outerFrameStyle: IFrameStyle;\n verticalSplitLine?: ILineStyle;\n horizontalSplitLine?: ILineStyle;\n verticalSplitLineMoveable?: boolean;\n //列调整宽度的直线\n verticalSplitLineHighlight?: ILineStyle;\n };\n\n /** 标记线配置 如果配置为true 会自动给今天做标记 */\n markLine?: boolean | IMarkLine | IMarkLine[];\n\n /** 指定整个甘特图的最小日期 */\n minDate?: string;\n /** 指定整个甘特图的最大日期 不设置的话用默认规则*/\n maxDate?: string;\n\n /** 顶部表头部分默认行高。如果想按表头层级依次配置,请配置到timelineHeader.scale中 */\n headerRowHeight?: number;\n\n /** 数据默认行高 */\n rowHeight?: number;\n\n /** 行号配置 */\n rowSeriesNumber?: IRowSeriesNumber;\n\n /**\n * 'auto':和浏览器滚动行为一致 表格滚动到顶部/底部时 触发浏览器默认行为;\n * 设置为 'none' 时, 表格滚动到顶部/底部时, 不再触发父容器滚动\n * */\n overscrollBehavior?: 'auto' | 'none';\n\n scrollStyle?: IScrollStyle;\n\n pixelRatio?: number;\n dateFormat?:\n | 'yyyy-mm-dd'\n | 'dd-mm-yyyy'\n | 'mm/dd/yyyy'\n | 'yyyy/mm/dd'\n | 'dd/mm/yyyy'\n | 'yyyy.mm.dd'\n | 'dd.mm.yyyy'\n | 'mm.dd.yyyy';\n\n /** 表格绘制范围外的canvas上填充的颜色 */\n underlayBackgroundColor?: string;\n groupBy?: true | string | string[];\n /** 展示嵌套结构数据时的模式,默认为full。*/\n tasksShowMode?: TasksShowMode;\n /**\n * 当使用Project_Sub_Tasks_Inline模式时,控制是否启用项目子任务的展开/收起功能\n * 默认值为true\n * 当设置为true(默认值)时,项目节点可以展开/收起其子任务\n * 当设置为false时,项目节点将始终以内联方式显示其子任务,没有展开/收起功能\n */\n projectSubTasksExpandable?: boolean;\n eventOptions?: IEventOptions;\n keyboardOptions?: IKeyboardOptions;\n markLineCreateOptions?: IMarkLineCreateOptions;\n plugins?: IGanttPlugin[];\n}\n/**\n * IBarLabelText\n * 可以配置固定文本 或者 ${fieldName} 或者自定义函数\n */\nexport type ITaskBarLabelText = string; //| string[] | ((args: any) => string | string[]);\nexport interface ITimelineScale {\n rowHeight?: number;\n unit: 'day' | 'week' | 'month' | 'quarter' | 'year' | 'hour' | 'minute' | 'second';\n step: number;\n startOfWeek?: 'sunday' | 'monday';\n customLayout?: IDateCustomLayout;\n style?: ITimelineHeaderStyle;\n format?: (date: DateFormatArgumentType) => string;\n visible?: boolean;\n}\nexport interface ITaskBarLabelTextStyle {\n fontFamily?: string;\n fontSize?: number;\n color?: string;\n /** 当文字显示在任务条外侧时的颜色,默认为黑色 */\n outsideColor?: string;\n textAlign?: 'center' | 'end' | 'left' | 'right' | 'start'; // 设置单元格内文字的水平对齐方式\n textOverflow?: string;\n textBaseline?: 'alphabetic' | 'bottom' | 'middle' | 'top'; // 设置单元格内文字的垂直对齐方式\n padding?: number | number[];\n /** 相对于任务条文字方位位置,可选值:'left', 'top', 'right', 'bottom',分别代表左、上、右、下四个方向 */\n orient?: 'left' | 'top' | 'right' | 'bottom';\n /** 只有当文本在 taskbar 中容纳不下时,会根据该方位将文本显示在任务条旁边。当配置 orient 时,该配置无效 */\n orientHandleWithOverflow?: 'left' | 'top' | 'right' | 'bottom';\n}\nexport interface ITaskBarStyle {\n /** 任务条的颜色 */\n barColor?: string;\n /** 已完成部分任务条的颜色 */\n completedBarColor?: string;\n /** 任务条的宽度 */\n width?: number;\n /** 任务条的圆角 */\n cornerRadius?: number;\n /**@deprecated 请配置borderLineWidth */\n borderWidth?: number;\n\n /** 任务条的边框宽度 */\n borderLineWidth?: number;\n /** 边框颜色 */\n borderColor?: string;\n\n /** 任务条的最小尺寸 */\n minSize?: number;\n}\nexport interface IMilestoneStyle {\n /** 里程碑边框颜色 */\n borderColor?: string;\n /** 里程碑边框宽度 */\n borderLineWidth?: number;\n /** 里程碑填充颜色 */\n fillColor?: string;\n /** 里程碑正方形圆角 */\n cornerRadius?: number;\n /** 里程碑默认是个正方形,这个width配置正方形的边长 */\n width?: number;\n /** 里程碑展示文字。可以配置固定文本 或者 字符串模版`${fieldName}` */\n labelText?: ITaskBarLabelText;\n /** 里程碑文字样式 */\n labelTextStyle?: ITaskBarLabelTextStyle;\n // /** 里程碑图标 */\n // icon?: string;\n /** 文字相对于里程碑的位置 */\n textOrient?: 'left' | 'top' | 'right' | 'bottom';\n}\nexport type ILineStyle = {\n lineColor?: string;\n lineWidth?: number;\n lineDash?: number[];\n};\nexport type IPointStyle = {\n strokeColor?: string;\n strokeWidth?: number;\n fillColor?: string;\n radius?: number;\n};\nexport interface IMarkLine {\n date: string;\n content?: string;\n contentStyle?: {\n color?: string;\n fontSize?: number;\n fontWeight?: string;\n lineHeight?: number;\n backgroundColor?: string;\n cornerRadius?: number | number[];\n };\n style?: ILineStyle;\n /** 标记线显示在日期列下的位置 默认为'left' */\n position?: 'left' | 'right' | 'middle' | 'date';\n /** 自动将日期范围内 包括改标记线 */\n scrollToMarkLine?: boolean;\n}\nexport type ITableColumnsDefine = ColumnsDefine;\nexport type IFrameStyle = {\n borderColor?: string;\n borderLineWidth?: number | number[];\n borderLineDash?: number[];\n cornerRadius?: number;\n};\n\nexport type ITableStyle = TYPES.ThemeStyle;\nexport type IRowSeriesNumber = TYPES.IRowSeriesNumber;\nexport type IScrollStyle = TYPES.ScrollStyle;\nexport type IEventOptions = TYPES.TableEventOptions;\n\nexport interface IKeyboardOptions {\n /** 当按下del按键是否删除连线 默认为false */\n deleteLinkOnDel?: boolean;\n /** 当按下back按键是否删除连线 默认为false */\n deleteLinkOnBack?: boolean;\n}\nexport type DateFormatArgumentType = {\n /** 当期日期属于该日期刻度的第几位。如季度日期中第四季度 返回4。 */\n dateIndex: number;\n startDate: Date;\n endDate: Date;\n};\nexport type TaskBarInteractionArgumentType = {\n taskRecord: any;\n index: number;\n subIndex?: number;\n startDate: Date;\n endDate: Date;\n ganttInstance: Gantt;\n};\n\nexport type TaskBarCustomLayoutArgumentType = {\n width: number;\n height: number;\n index: number;\n startDate: Date;\n endDate: Date;\n taskDays: number;\n progress: number;\n taskRecord: any;\n ganttInstance: Gantt;\n};\nexport type ITaskBarCustomLayoutObj = {\n rootContainer?: Group;\n renderDefaultBar?: boolean; // 默认false\n renderDefaultResizeIcon?: boolean; // 默认false\n renderDefaultText?: boolean; // 默认false\n};\nexport type ITaskBarCustomLayout = (args: TaskBarCustomLayoutArgumentType) => ITaskBarCustomLayoutObj; //CustomLayout\n\nexport type DateCustomLayoutArgumentType = {\n width: number;\n height: number;\n index: number;\n /** 当期日期属于该日期刻度的第几位。如季度日期中第四季度 返回4。 */\n dateIndex: number;\n title: string;\n startDate: Date;\n endDate: Date;\n days: number;\n ganttInstance: Gantt;\n};\nexport type IDateCustomLayoutObj = {\n rootContainer: Group;\n renderDefaultText?: boolean; // 默认false\n};\nexport type IDateCustomLayout = (args: DateCustomLayoutArgumentType) => IDateCustomLayoutObj;\n\nexport type GridVerticalLineStyleArgumentType = {\n /** 竖线是第几条线*/\n index: number;\n /** 当期日期属于该日期刻度的第几位。如季度日期中第四季度 返回4。 */\n dateIndex: number;\n /** 如果是竖线,date代表分割线指向的具体时间点 */\n date?: Date;\n ganttInstance: Gantt;\n};\n\nexport type GridHorizontalLineStyleArgumentType = {\n /** 横线是第几条线 也代表了左侧表格的body行号 */\n index: number;\n ganttInstance: Gantt;\n};\n\nexport type TaskCreationCustomLayoutArgumentType = {\n width: number;\n height: number;\n // index: number;\n ganttInstance: Gantt;\n};\nexport type ITaskCreationCustomLayoutObj = {\n rootContainer: Group;\n};\nexport type ITaskCreationCustomLayout = (args: TaskCreationCustomLayoutArgumentType) => ITaskCreationCustomLayoutObj;\n\nexport type ITaskLink = {\n /** 依赖的类型 */\n type: DependencyType;\n /** 依赖线的起始任务唯一标识。如果是tree树形结构的数据 设置数组的话 查找性能会更高 */\n linkedFromTaskKey?: string | number | (string | number)[];\n /** 依赖的终止目标任务唯一标识。如果是tree树形结构的数据 设置数组的话 查找性能会更高 */\n linkedToTaskKey?: string | number | (string | number)[];\n /** 依赖线的样式 */\n linkLineStyle?: ILineStyle;\n};\n\nexport type ITaskLinkSelectedStyle = ILineStyle & {\n shadowBlur?: number; //阴影宽度\n shadowOffset?: number; //偏移\n shadowColor?: string; //阴影颜色\n};\nexport enum DependencyType {\n FinishToStart = 'finish_to_start',\n StartToStart = 'start_to_start',\n FinishToFinish = 'finish_to_finish',\n StartToFinish = 'start_to_finish'\n}\nexport enum TasksShowMode {\n /** 每一个任务节点用单独一行来展示,父任务占用一行,子任务分别占用一行。这是默认的显示效果 */\n Tasks_Separate = 'tasks_separate',\n /** 省去父任务节点不展示,并把所有子任务的节点都放到同一行来展示。 */\n Sub_Tasks_Inline = 'sub_tasks_inline',\n /** 省去父任务节点不展示,且所有子任务的节点分别用一行展示。*/\n Sub_Tasks_Separate = 'sub_tasks_separate',\n /** 省去父任务节点不展示,且所有子任务会维持records中的数据顺序布局,并保证节点不重叠展示 */\n Sub_Tasks_Arrange = 'sub_tasks_arrange',\n /** 省去父任务节点不展示,且所有子任务会按照日期早晚的属性来布局,并保证节点不重叠的紧凑型展示 */\n Sub_Tasks_Compact = 'sub_tasks_compact',\n /** 数据标记为project的节点,会把所有子任务的节点都放到和主任务的同一行来展示。其他节点则保持默认的显示效果即Tasks_Separate */\n Project_Sub_Tasks_Inline = 'project_sub_tasks_inline'\n}\n/**\n * 任务类型枚举,用于区分不同类型的任务\n */\nexport enum TaskType {\n TASK = 'task', // record没有指明type的 会默认使用TASK\n PROJECT = 'project',\n MILESTONE = 'milestone'\n}\nexport type ITaskBarSelectedStyle = {\n shadowBlur?: number; //阴影宽度\n shadowOffsetX?: number; //x方向偏移\n shadowOffsetY?: number; //Y方向偏移\n shadowColor?: string; //阴影颜色\n borderColor?: string; //边框颜色\n borderLineWidth?: number;\n};\nexport type ITaskBarHoverStyle = {\n /** 任务条的圆角 */\n cornerRadius?: number;\n barOverlayColor?: string;\n};\n//#endregion\n\nexport type IMarkLineCreateOptions = {\n markLineCreatable: boolean;\n markLineCreationHoverToolTip?: {\n position?: 'top' | 'bottom';\n tipContent?: string;\n style?: {\n contentStyle?: any;\n panelStyle?: any;\n };\n };\n markLineCreationStyle?: {\n fill?: string;\n size?: number;\n iconSize?: number;\n svg?: string;\n };\n};\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/ts-types/gantt-engine.ts"],"names":[],"mappings":";;;AA+cA,IAAY,cAKX;AALD,WAAY,cAAc;IACxB,mDAAiC,CAAA;IACjC,iDAA+B,CAAA;IAC/B,qDAAmC,CAAA;IACnC,mDAAiC,CAAA;AACnC,CAAC,EALW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAKzB;AACD,IAAY,aAaX;AAbD,WAAY,aAAa;IAEvB,kDAAiC,CAAA;IAEjC,sDAAqC,CAAA;IAErC,0DAAyC,CAAA;IAEzC,wDAAuC,CAAA;IAEvC,wDAAuC,CAAA;IAEvC,sEAAqD,CAAA;AACvD,CAAC,EAbW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAaxB;AAID,IAAY,QAIX;AAJD,WAAY,QAAQ;IAClB,yBAAa,CAAA;IACb,+BAAmB,CAAA;IACnB,mCAAuB,CAAA;AACzB,CAAC,EAJW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAInB","file":"gantt-engine.js","sourcesContent":["import type { ColumnsDefine, TYPES, ListTableConstructorOptions } from '@visactor/vtable';\nimport type { Group } from '@visactor/vtable/es/vrender';\nimport type { Gantt } from '../Gantt';\nexport type LayoutObjectId = number | string;\nimport type { IGanttPlugin } from '../plugins/interface';\nimport type { IZoomScale } from './zoom-scale';\nexport interface ITimelineDateInfo {\n days: number;\n endDate: Date;\n startDate: Date;\n title: string;\n /** 当期日期属于该日期刻度的第几位。如季度日期中第四季度 返回4。 */\n dateIndex: number;\n unit: 'year' | 'month' | 'quarter' | 'week' | 'day' | 'hour' | 'minute' | 'second';\n step: number;\n}\n\nexport interface ITimelineHeaderStyle {\n padding?: number | number[];\n fontSize?: number;\n fontWeight?: string;\n color?: string;\n strokeColor?: string;\n // backgroundColor?: string;\n textAlign?: 'center' | 'end' | 'left' | 'right' | 'start'; // 设置单元格内文字的水平对齐方式\n textOverflow?: string;\n textBaseline?: 'alphabetic' | 'bottom' | 'middle' | 'top'; // 设置单元格内文字的垂直对齐方式\n textStick?: boolean;\n}\nexport interface IGrid {\n backgroundColor?: string;\n /** 需要按数据行设置不同背景色 */\n horizontalBackgroundColor?: string[] | ((args: GridHorizontalLineStyleArgumentType) => string);\n /** 需要按日期列设置不同背景色 */\n verticalBackgroundColor?: string[] | ((args: GridVerticalLineStyleArgumentType) => string);\n /** 周末背景色 */\n weekendBackgroundColor?: string;\n\n verticalLine?: ILineStyle | ((args: GridVerticalLineStyleArgumentType) => ILineStyle);\n horizontalLine?: ILineStyle | ((args: GridHorizontalLineStyleArgumentType) => ILineStyle);\n /** 竖线依赖的日期刻度。默认为timelineHeader中scales中的最小时间粒度 */\n verticalLineDependenceOnTimeScale?: 'day' | 'week' | 'month' | 'quarter' | 'year' | 'hour' | 'minute' | 'second';\n}\n//#region gantt\nexport interface GanttConstructorOptions {\n /**\n * 数据集合\n */\n records?: any[];\n\n /** 左侧任务信息表格相关配置 */\n taskListTable?: {\n /** 左侧任务列表信息占用的宽度。如果设置为'auto'表示将所有列完全展示 */\n tableWidth?: 'auto' | number;\n /** 左侧任务列表 最小宽度 */\n minTableWidth?: number;\n /** 左侧任务列表 最大宽度 */\n maxTableWidth?: number;\n } & Omit<\n //ListTable表格可配置的属性\n ListTableConstructorOptions,\n | 'container'\n | 'records'\n | 'defaultHeaderRowHeight'\n | 'defaultRowHeight'\n | 'overscrollBehavior'\n | 'rowSeriesNumber'\n | 'scrollStyle'\n | 'pixelRatio'\n | 'title'\n >;\n /** 时间刻度 */\n timelineHeader: {\n backgroundColor?: string;\n colWidth?: number;\n /** 垂直间隔线样式 */\n verticalLine?: ILineStyle;\n /** 水平间隔线样式 */\n horizontalLine?: ILineStyle;\n /**\n * ZoomScale 多级别缩放配置(优先级高于 timelineHeader.scales)\n * 当启用时,会根据缩放级别自动切换不同的 scales 组合\n */\n zoomScale?: IZoomScale;\n scales: ITimelineScale[];\n };\n\n /** 任务条相关配置及样式 */\n taskBar?: {\n /** 任务开始日期对应的数据字段名 默认按'startDate' */\n startDateField?: string;\n /** 任务结束日期对应的数据字段名 默认按'endDate' */\n endDateField?: string;\n /** 任务进度对应的数据字段名 */\n progressField?: string;\n /** 基线开始日期对应的数据字段名 默认按'baselineStartDate' */\n baselineStartDateField?: string;\n /** 基线结束日期对应的数据字段名 默认按'baselineEndDate' */\n baselineEndDateField?: string;\n /** 基线样式 */\n baselineStyle?: ITaskBarStyle | ((args: TaskBarInteractionArgumentType) => ITaskBarStyle);\n /** 基线相对于任务条的位置:'top'|'bottom'|'overlap',默认'bottom' */\n baselinePosition?: 'top' | 'bottom' | 'overlap';\n /** 任务条展示文字。可以配置固定文本 或者 字符串模版`${fieldName}` */\n labelText?: ITaskBarLabelText;\n /** 任务条文字样式 */\n labelTextStyle?: ITaskBarLabelTextStyle;\n /** 任务条样式 */\n barStyle?: ITaskBarStyle | ((args: TaskBarInteractionArgumentType) => ITaskBarStyle);\n milestoneStyle?: IMilestoneStyle;\n projectStyle?: ITaskBarStyle | ((args: TaskBarInteractionArgumentType) => ITaskBarStyle);\n /** 自定义布局渲染 */\n customLayout?: ITaskBarCustomLayout;\n /** 任务条是否可调整大小 */\n resizable?:\n | boolean\n | [boolean, boolean]\n | ((interactionArgs: TaskBarInteractionArgumentType) => boolean | [boolean, boolean]);\n /** 任务条是否可移动 */\n moveable?: boolean | ((interactionArgs: TaskBarInteractionArgumentType) => boolean);\n /** 任务进度是否可调整 */\n progressAdjustable?: boolean | ((interactionArgs: TaskBarInteractionArgumentType) => boolean);\n /** 任务条拖拽超出当前日期范围时自动扩展日期范围 */\n moveToExtendDateRange?: boolean;\n /** 任务条是否可以被拖拽来改变顺序 */\n dragOrder?: boolean;\n /** 任务条hover时的样式 */\n hoverBarStyle?: ITaskBarHoverStyle;\n /** 任务条选择时的样式 TODO */\n selectedBarStyle?: ITaskBarSelectedStyle;\n /** 任务条是否可选择,默认为true */\n selectable?: boolean;\n /** 任务条是否裁剪溢出部分 */\n clip?: boolean;\n /** 任务条右键菜单 */\n menu?: {\n /** 右键菜单。代替原来的option.contextmenu */\n contextMenuItems?:\n | TYPES.MenuListItem[]\n | ((\n record: string,\n index: number,\n /** 当期日期属于该日期刻度的第几位。如季度日期中第四季度 返回4。 */\n dateIndex: number,\n startDate: Date,\n endDate: Date\n ) => TYPES.MenuListItem[]);\n };\n /** 数据没有排期时,可通过创建任务条排期。默认为true */\n scheduleCreatable?: boolean | ((interactionArgs: TaskBarInteractionArgumentType) => boolean);\n /** 针对没有分配日期的任务,可以显示出创建按钮 */\n scheduleCreation?: {\n buttonStyle?: ILineStyle & {\n cornerRadius?: number;\n backgroundColor?: string;\n };\n /** 任务条创建按钮的自定义渲染 */\n customLayout?: ITaskCreationCustomLayout;\n /** 任务条创建按钮的最大宽度 */\n maxWidth?: number;\n /** 任务条创建按钮的最小宽度 */\n minWidth?: number;\n };\n };\n /** 数据条目可唯一标识的字段名,默认为'id' */\n taskKeyField?: string;\n /** 任务之间的依赖关系 */\n dependency?: {\n links: ITaskLink[];\n linkLineStyle?: ILineStyle;\n linkCreatable?: boolean;\n linkSelectable?: boolean;\n linkDeletable?: boolean;\n linkSelectedLineStyle?: ITaskLinkSelectedStyle;\n /** 创建关联线的操作点 */\n linkCreatePointStyle?: IPointStyle;\n /** 创建关联线的操作点响应状态效果 */\n linkCreatingPointStyle?: IPointStyle;\n /** 创建关联线的操作线样式 */\n linkCreatingLineStyle?: ILineStyle;\n /** 依赖关系线拐点与任务条的距离 默认20 */\n distanceToTaskBar?: number;\n };\n /** 网格线配置 */\n grid?: IGrid;\n\n /** 整个外边框及横纵分割线配置。 */\n frame?: {\n outerFrameStyle: IFrameStyle;\n verticalSplitLine?: ILineStyle;\n horizontalSplitLine?: ILineStyle;\n verticalSplitLineMoveable?: boolean;\n //列调整宽度的直线\n verticalSplitLineHighlight?: ILineStyle;\n };\n\n /** 标记线配置 如果配置为true 会自动给今天做标记 */\n markLine?: boolean | IMarkLine | IMarkLine[];\n\n /** 指定整个甘特图的最小日期 */\n minDate?: string;\n /** 指定整个甘特图的最大日期 不设置的话用默认规则*/\n maxDate?: string;\n\n /** 顶部表头部分默认行高。如果想按表头层级依次配置,请配置到timelineHeader.scale中 */\n headerRowHeight?: number;\n\n /** 数据默认行高 */\n rowHeight?: number;\n\n /** 行号配置 */\n rowSeriesNumber?: IRowSeriesNumber;\n\n /**\n * 'auto':和浏览器滚动行为一致 表格滚动到顶部/底部时 触发浏览器默认行为;\n * 设置为 'none' 时, 表格滚动到顶部/底部时, 不再触发父容器滚动\n * */\n overscrollBehavior?: 'auto' | 'none';\n\n scrollStyle?: IScrollStyle;\n\n pixelRatio?: number;\n dateFormat?:\n | 'yyyy-mm-dd'\n | 'dd-mm-yyyy'\n | 'mm/dd/yyyy'\n | 'yyyy/mm/dd'\n | 'dd/mm/yyyy'\n | 'yyyy.mm.dd'\n | 'dd.mm.yyyy'\n | 'mm.dd.yyyy';\n\n /** 表格绘制范围外的canvas上填充的颜色 */\n underlayBackgroundColor?: string;\n groupBy?: true | string | string[];\n /** 展示嵌套结构数据时的模式,默认为full。*/\n tasksShowMode?: TasksShowMode;\n /**\n * 当使用Project_Sub_Tasks_Inline模式时,控制是否启用项目子任务的展开/收起功能\n * 默认值为true\n * 当设置为true(默认值)时,项目节点可以展开/收起其子任务\n * 当设置为false时,项目节点将始终以内联方式显示其子任务,没有展开/收起功能\n */\n projectSubTasksExpandable?: boolean;\n eventOptions?: IEventOptions;\n keyboardOptions?: IKeyboardOptions;\n markLineCreateOptions?: IMarkLineCreateOptions;\n plugins?: IGanttPlugin[];\n}\n/**\n * IBarLabelText\n * 可以配置固定文本 或者 ${fieldName} 或者自定义函数\n */\nexport type ITaskBarLabelText = string; //| string[] | ((args: any) => string | string[]);\nexport interface ITimelineScale {\n rowHeight?: number;\n unit: 'day' | 'week' | 'month' | 'quarter' | 'year' | 'hour' | 'minute' | 'second';\n step: number;\n startOfWeek?: 'sunday' | 'monday';\n customLayout?: IDateCustomLayout;\n style?: ITimelineHeaderStyle;\n format?: (date: DateFormatArgumentType) => string;\n visible?: boolean;\n}\nexport interface ITaskBarLabelTextStyle {\n fontFamily?: string;\n fontSize?: number;\n color?: string;\n /** 当文字显示在任务条外侧时的颜色,默认为黑色 */\n outsideColor?: string;\n textAlign?: 'center' | 'end' | 'left' | 'right' | 'start'; // 设置单元格内文字的水平对齐方式\n textOverflow?: string;\n textBaseline?: 'alphabetic' | 'bottom' | 'middle' | 'top'; // 设置单元格内文字的垂直对齐方式\n padding?: number | number[];\n /** 相对于任务条文字方位位置,可选值:'left', 'top', 'right', 'bottom',分别代表左、上、右、下四个方向 */\n orient?: 'left' | 'top' | 'right' | 'bottom';\n /** 只有当文本在 taskbar 中容纳不下时,会根据该方位将文本显示在任务条旁边。当配置 orient 时,该配置无效 */\n orientHandleWithOverflow?: 'left' | 'top' | 'right' | 'bottom';\n}\nexport interface ITaskBarStyle {\n /** 任务条的颜色 */\n barColor?: string;\n /** 已完成部分任务条的颜色 */\n completedBarColor?: string;\n /** 任务条的宽度 */\n width?: number;\n /** 任务条的圆角 */\n cornerRadius?: number;\n /**@deprecated 请配置borderLineWidth */\n borderWidth?: number;\n\n /** 任务条的边框宽度 */\n borderLineWidth?: number;\n /** 边框颜色 */\n borderColor?: string;\n\n /** 任务条的最小尺寸 */\n minSize?: number;\n /** 任务条距离行顶部的距离 */\n paddingTop?: number;\n}\nexport interface IMilestoneStyle {\n /** 里程碑边框颜色 */\n borderColor?: string;\n /** 里程碑边框宽度 */\n borderLineWidth?: number;\n /** 里程碑填充颜色 */\n fillColor?: string;\n /** 里程碑正方形圆角 */\n cornerRadius?: number;\n /** 里程碑默认是个正方形,这个width配置正方形的边长 */\n width?: number;\n /** 里程碑展示文字。可以配置固定文本 或者 字符串模版`${fieldName}` */\n labelText?: ITaskBarLabelText;\n /** 里程碑文字样式 */\n labelTextStyle?: ITaskBarLabelTextStyle;\n // /** 里程碑图标 */\n // icon?: string;\n /** 文字相对于里程碑的位置 */\n textOrient?: 'left' | 'top' | 'right' | 'bottom';\n}\nexport type ILineStyle = {\n lineColor?: string;\n lineWidth?: number;\n lineDash?: number[];\n};\nexport type IPointStyle = {\n strokeColor?: string;\n strokeWidth?: number;\n fillColor?: string;\n radius?: number;\n};\nexport interface IMarkLine {\n date: string;\n content?: string;\n contentStyle?: {\n color?: string;\n fontSize?: number;\n fontWeight?: string;\n lineHeight?: number;\n backgroundColor?: string;\n cornerRadius?: number | number[];\n };\n style?: ILineStyle;\n /** 标记线显示在日期列下的位置 默认为'left' */\n position?: 'left' | 'right' | 'middle' | 'date';\n /** 自动将日期范围内 包括改标记线 */\n scrollToMarkLine?: boolean;\n}\nexport type ITableColumnsDefine = ColumnsDefine;\nexport type IFrameStyle = {\n borderColor?: string;\n borderLineWidth?: number | number[];\n borderLineDash?: number[];\n cornerRadius?: number;\n};\n\nexport type ITableStyle = TYPES.ThemeStyle;\nexport type IRowSeriesNumber = TYPES.IRowSeriesNumber;\nexport type IScrollStyle = TYPES.ScrollStyle;\nexport type IEventOptions = TYPES.TableEventOptions;\n\nexport interface IKeyboardOptions {\n /** 当按下del按键是否删除连线 默认为false */\n deleteLinkOnDel?: boolean;\n /** 当按下back按键是否删除连线 默认为false */\n deleteLinkOnBack?: boolean;\n}\nexport type DateFormatArgumentType = {\n /** 当期日期属于该日期刻度的第几位。如季度日期中第四季度 返回4。 */\n dateIndex: number;\n startDate: Date;\n endDate: Date;\n};\nexport type TaskBarInteractionArgumentType = {\n taskRecord: any;\n index: number;\n subIndex?: number;\n startDate: Date;\n endDate: Date;\n ganttInstance: Gantt;\n};\n\nexport type TaskBarCustomLayoutArgumentType = {\n width: number;\n height: number;\n index: number;\n startDate: Date;\n endDate: Date;\n taskDays: number;\n progress: number;\n taskRecord: any;\n ganttInstance: Gantt;\n};\nexport type ITaskBarCustomLayoutObj = {\n rootContainer?: Group;\n renderDefaultBar?: boolean; // 默认false\n renderDefaultResizeIcon?: boolean; // 默认false\n renderDefaultText?: boolean; // 默认false\n};\nexport type ITaskBarCustomLayout = (args: TaskBarCustomLayoutArgumentType) => ITaskBarCustomLayoutObj; //CustomLayout\n\nexport type DateCustomLayoutArgumentType = {\n width: number;\n height: number;\n index: number;\n /** 当期日期属于该日期刻度的第几位。如季度日期中第四季度 返回4。 */\n dateIndex: number;\n title: string;\n startDate: Date;\n endDate: Date;\n days: number;\n ganttInstance: Gantt;\n};\nexport type IDateCustomLayoutObj = {\n rootContainer: Group;\n renderDefaultText?: boolean; // 默认false\n};\nexport type IDateCustomLayout = (args: DateCustomLayoutArgumentType) => IDateCustomLayoutObj;\n\nexport type GridVerticalLineStyleArgumentType = {\n /** 竖线是第几条线*/\n index: number;\n /** 当期日期属于该日期刻度的第几位。如季度日期中第四季度 返回4。 */\n dateIndex: number;\n /** 如果是竖线,date代表分割线指向的具体时间点 */\n date?: Date;\n ganttInstance: Gantt;\n};\n\nexport type GridHorizontalLineStyleArgumentType = {\n /** 横线是第几条线 也代表了左侧表格的body行号 */\n index: number;\n ganttInstance: Gantt;\n};\n\nexport type TaskCreationCustomLayoutArgumentType = {\n width: number;\n height: number;\n // index: number;\n ganttInstance: Gantt;\n};\nexport type ITaskCreationCustomLayoutObj = {\n rootContainer: Group;\n};\nexport type ITaskCreationCustomLayout = (args: TaskCreationCustomLayoutArgumentType) => ITaskCreationCustomLayoutObj;\n\nexport type ITaskLink = {\n /** 依赖的类型 */\n type: DependencyType;\n /** 依赖线的起始任务唯一标识。如果是tree树形结构的数据 设置数组的话 查找性能会更高 */\n linkedFromTaskKey?: string | number | (string | number)[];\n /** 依赖的终止目标任务唯一标识。如果是tree树形结构的数据 设置数组的话 查找性能会更高 */\n linkedToTaskKey?: string | number | (string | number)[];\n /** 依赖线的样式 */\n linkLineStyle?: ILineStyle;\n};\n\nexport type ITaskLinkSelectedStyle = ILineStyle & {\n shadowBlur?: number; //阴影宽度\n shadowOffset?: number; //偏移\n shadowColor?: string; //阴影颜色\n};\nexport enum DependencyType {\n FinishToStart = 'finish_to_start',\n StartToStart = 'start_to_start',\n FinishToFinish = 'finish_to_finish',\n StartToFinish = 'start_to_finish'\n}\nexport enum TasksShowMode {\n /** 每一个任务节点用单独一行来展示,父任务占用一行,子任务分别占用一行。这是默认的显示效果 */\n Tasks_Separate = 'tasks_separate',\n /** 省去父任务节点不展示,并把所有子任务的节点都放到同一行来展示。 */\n Sub_Tasks_Inline = 'sub_tasks_inline',\n /** 省去父任务节点不展示,且所有子任务的节点分别用一行展示。*/\n Sub_Tasks_Separate = 'sub_tasks_separate',\n /** 省去父任务节点不展示,且所有子任务会维持records中的数据顺序布局,并保证节点不重叠展示 */\n Sub_Tasks_Arrange = 'sub_tasks_arrange',\n /** 省去父任务节点不展示,且所有子任务会按照日期早晚的属性来布局,并保证节点不重叠的紧凑型展示 */\n Sub_Tasks_Compact = 'sub_tasks_compact',\n /** 数据标记为project的节点,会把所有子任务的节点都放到和主任务的同一行来展示。其他节点则保持默认的显示效果即Tasks_Separate */\n Project_Sub_Tasks_Inline = 'project_sub_tasks_inline'\n}\n/**\n * 任务类型枚举,用于区分不同类型的任务\n */\nexport enum TaskType {\n TASK = 'task', // record没有指明type的 会默认使用TASK\n PROJECT = 'project',\n MILESTONE = 'milestone'\n}\nexport type ITaskBarSelectedStyle = {\n shadowBlur?: number; //阴影宽度\n shadowOffsetX?: number; //x方向偏移\n shadowOffsetY?: number; //Y方向偏移\n shadowColor?: string; //阴影颜色\n borderColor?: string; //边框颜色\n borderLineWidth?: number;\n};\nexport type ITaskBarHoverStyle = {\n /** 任务条的圆角 */\n cornerRadius?: number;\n barOverlayColor?: string;\n};\n//#endregion\n\nexport type IMarkLineCreateOptions = {\n markLineCreatable: boolean;\n markLineCreationHoverToolTip?: {\n position?: 'top' | 'bottom';\n tipContent?: string;\n style?: {\n contentStyle?: any;\n panelStyle?: any;\n };\n };\n markLineCreationStyle?: {\n fill?: string;\n size?: number;\n iconSize?: number;\n svg?: string;\n };\n};\n"]}
|