gantt-task-react-v 1.6.11 → 1.6.13
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.
|
@@ -45,6 +45,7 @@ export interface TaskGanttContentProps extends GanttTaskBarActions {
|
|
|
45
45
|
taskBarMovingAction: (task: RenderTask) => TaskBarMoveAction | null;
|
|
46
46
|
viewMode: ViewMode;
|
|
47
47
|
showProgress?: boolean;
|
|
48
|
+
showProjectProgress?: boolean;
|
|
48
49
|
progressColor?: string;
|
|
49
50
|
}
|
|
50
51
|
export declare const TaskGanttContent: React.NamedExoticComponent<TaskGanttContentProps>;
|
|
@@ -33,6 +33,7 @@ export interface TaskItemProps extends Omit<GanttTaskBarActions, "taskBarMovingA
|
|
|
33
33
|
renderCustomLabel?: RenderCustomLabel;
|
|
34
34
|
viewMode: ViewMode;
|
|
35
35
|
showProgress?: boolean;
|
|
36
|
+
showProjectProgress?: boolean;
|
|
36
37
|
progressColor?: string;
|
|
37
38
|
}
|
|
38
39
|
export declare const TaskItem: React.NamedExoticComponent<TaskItemProps>;
|
|
@@ -5167,16 +5167,16 @@ const DEFAULT_THEME = {
|
|
|
5167
5167
|
groupProgressSelectedColor: "#388E3C",
|
|
5168
5168
|
groupProgressCriticalColor: "#2E7D32",
|
|
5169
5169
|
groupProgressSelectedCriticalColor: "#1B5E20",
|
|
5170
|
-
groupBackgroundColor: "#
|
|
5171
|
-
groupBackgroundSelectedColor: "#
|
|
5170
|
+
groupBackgroundColor: "#0A0A0A",
|
|
5171
|
+
groupBackgroundSelectedColor: "#333333",
|
|
5172
5172
|
groupBackgroundCriticalColor: "#0277BD",
|
|
5173
5173
|
groupBackgroundSelectedCriticalColor: "#01579B",
|
|
5174
5174
|
projectProgressColor: "#26C6DA",
|
|
5175
5175
|
projectProgressSelectedColor: "#0097A7",
|
|
5176
5176
|
projectProgressCriticalColor: "#00838F",
|
|
5177
5177
|
projectProgressSelectedCriticalColor: "#006064",
|
|
5178
|
-
projectBackgroundColor: "#
|
|
5179
|
-
projectBackgroundSelectedColor: "#
|
|
5178
|
+
projectBackgroundColor: "#0A0A0A",
|
|
5179
|
+
projectBackgroundSelectedColor: "#333333",
|
|
5180
5180
|
projectBackgroundCriticalColor: "#EF6C00",
|
|
5181
5181
|
projectBackgroundSelectedCriticalColor: "#E65100",
|
|
5182
5182
|
milestoneBackgroundColor: "#FF7043",
|
|
@@ -12658,7 +12658,7 @@ const ProjectDisplay = ({
|
|
|
12658
12658
|
},
|
|
12659
12659
|
className: styles$8.projectWrapper,
|
|
12660
12660
|
children: [
|
|
12661
|
-
/* @__PURE__ */ jsx(
|
|
12661
|
+
showProgress && /* @__PURE__ */ jsx(
|
|
12662
12662
|
"rect",
|
|
12663
12663
|
{
|
|
12664
12664
|
fill: barColor,
|
|
@@ -12781,6 +12781,7 @@ const Bar = (props) => {
|
|
|
12781
12781
|
movingAction,
|
|
12782
12782
|
ganttRelationEvent,
|
|
12783
12783
|
showProgress = true,
|
|
12784
|
+
showProjectProgress = false,
|
|
12784
12785
|
progressColor
|
|
12785
12786
|
} = props;
|
|
12786
12787
|
const isSmallWidth = useMemo(() => width < 30, [width]);
|
|
@@ -12829,7 +12830,7 @@ const Bar = (props) => {
|
|
|
12829
12830
|
taskHeight
|
|
12830
12831
|
);
|
|
12831
12832
|
const renderBarDisplay = () => {
|
|
12832
|
-
if (task.type === "project") {
|
|
12833
|
+
if (task.type === "project" || hasChildren) {
|
|
12833
12834
|
return /* @__PURE__ */ jsx(
|
|
12834
12835
|
ProjectDisplay,
|
|
12835
12836
|
{
|
|
@@ -12848,7 +12849,7 @@ const Bar = (props) => {
|
|
|
12848
12849
|
isCritical,
|
|
12849
12850
|
hasChildren,
|
|
12850
12851
|
startMoveFullTask,
|
|
12851
|
-
showProgress,
|
|
12852
|
+
showProgress: showProjectProgress,
|
|
12852
12853
|
progressColor
|
|
12853
12854
|
}
|
|
12854
12855
|
);
|
|
@@ -12928,7 +12929,7 @@ const Bar = (props) => {
|
|
|
12928
12929
|
}
|
|
12929
12930
|
),
|
|
12930
12931
|
relationHandles,
|
|
12931
|
-
isProgressChangeable(task) && /* @__PURE__ */ jsx(
|
|
12932
|
+
(task.type !== "project" && !hasChildren || showProjectProgress) && isProgressChangeable(task) && /* @__PURE__ */ jsx(
|
|
12932
12933
|
BarProgressHandle,
|
|
12933
12934
|
{
|
|
12934
12935
|
className: `${styles$9.barHandle} ${isMovingProgress ? styles$9.barHandleImportantVisible : ""} ${isSmallWidth || isMovingDate || isRelationDrawMode ? styles$9.barHandleImportantHidden : ""}`,
|
|
@@ -13098,6 +13099,7 @@ const TaskItemInner = (props) => {
|
|
|
13098
13099
|
const {
|
|
13099
13100
|
movingAction,
|
|
13100
13101
|
distances: { arrowIndent, relationCircleOffset, relationCircleRadius },
|
|
13102
|
+
hasChildren,
|
|
13101
13103
|
onDeleteTask,
|
|
13102
13104
|
isDateChangeable,
|
|
13103
13105
|
canDelete,
|
|
@@ -13299,13 +13301,13 @@ const TaskItemInner = (props) => {
|
|
|
13299
13301
|
{
|
|
13300
13302
|
x1,
|
|
13301
13303
|
width,
|
|
13302
|
-
taskHeight: task.type === "project" ? taskHalfHeight : taskHeight,
|
|
13304
|
+
taskHeight: task.type === "project" || hasChildren ? taskHalfHeight : taskHeight,
|
|
13303
13305
|
arrowIndent,
|
|
13304
13306
|
rtl,
|
|
13305
13307
|
label: task.name,
|
|
13306
13308
|
taskYOffset,
|
|
13307
13309
|
viewMode,
|
|
13308
|
-
alwaysOutline: task.type === "project"
|
|
13310
|
+
alwaysOutline: task.type === "project" || hasChildren
|
|
13309
13311
|
}
|
|
13310
13312
|
)
|
|
13311
13313
|
]
|
|
@@ -13446,6 +13448,7 @@ const TaskGanttContentInner = (props) => {
|
|
|
13446
13448
|
waitCommitTasks,
|
|
13447
13449
|
viewMode,
|
|
13448
13450
|
showProgress = true,
|
|
13451
|
+
showProjectProgress = false,
|
|
13449
13452
|
progressColor
|
|
13450
13453
|
} = props;
|
|
13451
13454
|
const renderedHolidays = useMemo(() => {
|
|
@@ -13616,6 +13619,7 @@ const TaskGanttContentInner = (props) => {
|
|
|
13616
13619
|
renderCustomLabel,
|
|
13617
13620
|
viewMode,
|
|
13618
13621
|
showProgress,
|
|
13622
|
+
showProjectProgress,
|
|
13619
13623
|
progressColor
|
|
13620
13624
|
}
|
|
13621
13625
|
)
|
|
@@ -13976,6 +13980,7 @@ const TaskGanttContentInner = (props) => {
|
|
|
13976
13980
|
activeArrowKey,
|
|
13977
13981
|
activeTaskId,
|
|
13978
13982
|
showProgress,
|
|
13983
|
+
showProjectProgress,
|
|
13979
13984
|
progressColor
|
|
13980
13985
|
]);
|
|
13981
13986
|
return /* @__PURE__ */ jsxs("g", { className: "content", children: [
|
|
@@ -19784,6 +19789,7 @@ const Gantt = (props) => {
|
|
|
19784
19789
|
todayLabel = "Today",
|
|
19785
19790
|
dataDateLabel = "Data Date",
|
|
19786
19791
|
showProgress = true,
|
|
19792
|
+
showProjectProgress = false,
|
|
19787
19793
|
progressColor,
|
|
19788
19794
|
scrollToTaskId,
|
|
19789
19795
|
drawer: drawerProps
|
|
@@ -21299,6 +21305,7 @@ const Gantt = (props) => {
|
|
|
21299
21305
|
visibleTasksMirror,
|
|
21300
21306
|
viewMode,
|
|
21301
21307
|
showProgress,
|
|
21308
|
+
showProjectProgress,
|
|
21302
21309
|
progressColor
|
|
21303
21310
|
}),
|
|
21304
21311
|
[
|
|
@@ -21344,6 +21351,7 @@ const Gantt = (props) => {
|
|
|
21344
21351
|
changeInProgress == null ? void 0 : changeInProgress.action,
|
|
21345
21352
|
handleDeleteTasks,
|
|
21346
21353
|
showProgress,
|
|
21354
|
+
showProjectProgress,
|
|
21347
21355
|
progressColor
|
|
21348
21356
|
]
|
|
21349
21357
|
);
|
|
@@ -5184,16 +5184,16 @@
|
|
|
5184
5184
|
groupProgressSelectedColor: "#388E3C",
|
|
5185
5185
|
groupProgressCriticalColor: "#2E7D32",
|
|
5186
5186
|
groupProgressSelectedCriticalColor: "#1B5E20",
|
|
5187
|
-
groupBackgroundColor: "#
|
|
5188
|
-
groupBackgroundSelectedColor: "#
|
|
5187
|
+
groupBackgroundColor: "#0A0A0A",
|
|
5188
|
+
groupBackgroundSelectedColor: "#333333",
|
|
5189
5189
|
groupBackgroundCriticalColor: "#0277BD",
|
|
5190
5190
|
groupBackgroundSelectedCriticalColor: "#01579B",
|
|
5191
5191
|
projectProgressColor: "#26C6DA",
|
|
5192
5192
|
projectProgressSelectedColor: "#0097A7",
|
|
5193
5193
|
projectProgressCriticalColor: "#00838F",
|
|
5194
5194
|
projectProgressSelectedCriticalColor: "#006064",
|
|
5195
|
-
projectBackgroundColor: "#
|
|
5196
|
-
projectBackgroundSelectedColor: "#
|
|
5195
|
+
projectBackgroundColor: "#0A0A0A",
|
|
5196
|
+
projectBackgroundSelectedColor: "#333333",
|
|
5197
5197
|
projectBackgroundCriticalColor: "#EF6C00",
|
|
5198
5198
|
projectBackgroundSelectedCriticalColor: "#E65100",
|
|
5199
5199
|
milestoneBackgroundColor: "#FF7043",
|
|
@@ -12675,7 +12675,7 @@
|
|
|
12675
12675
|
},
|
|
12676
12676
|
className: styles$8.projectWrapper,
|
|
12677
12677
|
children: [
|
|
12678
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12678
|
+
showProgress && /* @__PURE__ */ jsxRuntime.jsx(
|
|
12679
12679
|
"rect",
|
|
12680
12680
|
{
|
|
12681
12681
|
fill: barColor,
|
|
@@ -12798,6 +12798,7 @@
|
|
|
12798
12798
|
movingAction,
|
|
12799
12799
|
ganttRelationEvent,
|
|
12800
12800
|
showProgress = true,
|
|
12801
|
+
showProjectProgress = false,
|
|
12801
12802
|
progressColor
|
|
12802
12803
|
} = props;
|
|
12803
12804
|
const isSmallWidth = React.useMemo(() => width < 30, [width]);
|
|
@@ -12846,7 +12847,7 @@
|
|
|
12846
12847
|
taskHeight
|
|
12847
12848
|
);
|
|
12848
12849
|
const renderBarDisplay = () => {
|
|
12849
|
-
if (task.type === "project") {
|
|
12850
|
+
if (task.type === "project" || hasChildren) {
|
|
12850
12851
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
12851
12852
|
ProjectDisplay,
|
|
12852
12853
|
{
|
|
@@ -12865,7 +12866,7 @@
|
|
|
12865
12866
|
isCritical,
|
|
12866
12867
|
hasChildren,
|
|
12867
12868
|
startMoveFullTask,
|
|
12868
|
-
showProgress,
|
|
12869
|
+
showProgress: showProjectProgress,
|
|
12869
12870
|
progressColor
|
|
12870
12871
|
}
|
|
12871
12872
|
);
|
|
@@ -12945,7 +12946,7 @@
|
|
|
12945
12946
|
}
|
|
12946
12947
|
),
|
|
12947
12948
|
relationHandles,
|
|
12948
|
-
isProgressChangeable(task) && /* @__PURE__ */ jsxRuntime.jsx(
|
|
12949
|
+
(task.type !== "project" && !hasChildren || showProjectProgress) && isProgressChangeable(task) && /* @__PURE__ */ jsxRuntime.jsx(
|
|
12949
12950
|
BarProgressHandle,
|
|
12950
12951
|
{
|
|
12951
12952
|
className: `${styles$9.barHandle} ${isMovingProgress ? styles$9.barHandleImportantVisible : ""} ${isSmallWidth || isMovingDate || isRelationDrawMode ? styles$9.barHandleImportantHidden : ""}`,
|
|
@@ -13115,6 +13116,7 @@
|
|
|
13115
13116
|
const {
|
|
13116
13117
|
movingAction,
|
|
13117
13118
|
distances: { arrowIndent, relationCircleOffset, relationCircleRadius },
|
|
13119
|
+
hasChildren,
|
|
13118
13120
|
onDeleteTask,
|
|
13119
13121
|
isDateChangeable,
|
|
13120
13122
|
canDelete,
|
|
@@ -13316,13 +13318,13 @@
|
|
|
13316
13318
|
{
|
|
13317
13319
|
x1,
|
|
13318
13320
|
width,
|
|
13319
|
-
taskHeight: task.type === "project" ? taskHalfHeight : taskHeight,
|
|
13321
|
+
taskHeight: task.type === "project" || hasChildren ? taskHalfHeight : taskHeight,
|
|
13320
13322
|
arrowIndent,
|
|
13321
13323
|
rtl,
|
|
13322
13324
|
label: task.name,
|
|
13323
13325
|
taskYOffset,
|
|
13324
13326
|
viewMode,
|
|
13325
|
-
alwaysOutline: task.type === "project"
|
|
13327
|
+
alwaysOutline: task.type === "project" || hasChildren
|
|
13326
13328
|
}
|
|
13327
13329
|
)
|
|
13328
13330
|
]
|
|
@@ -13463,6 +13465,7 @@
|
|
|
13463
13465
|
waitCommitTasks,
|
|
13464
13466
|
viewMode,
|
|
13465
13467
|
showProgress = true,
|
|
13468
|
+
showProjectProgress = false,
|
|
13466
13469
|
progressColor
|
|
13467
13470
|
} = props;
|
|
13468
13471
|
const renderedHolidays = React.useMemo(() => {
|
|
@@ -13633,6 +13636,7 @@
|
|
|
13633
13636
|
renderCustomLabel,
|
|
13634
13637
|
viewMode,
|
|
13635
13638
|
showProgress,
|
|
13639
|
+
showProjectProgress,
|
|
13636
13640
|
progressColor
|
|
13637
13641
|
}
|
|
13638
13642
|
)
|
|
@@ -13993,6 +13997,7 @@
|
|
|
13993
13997
|
activeArrowKey,
|
|
13994
13998
|
activeTaskId,
|
|
13995
13999
|
showProgress,
|
|
14000
|
+
showProjectProgress,
|
|
13996
14001
|
progressColor
|
|
13997
14002
|
]);
|
|
13998
14003
|
return /* @__PURE__ */ jsxRuntime.jsxs("g", { className: "content", children: [
|
|
@@ -19801,6 +19806,7 @@
|
|
|
19801
19806
|
todayLabel = "Today",
|
|
19802
19807
|
dataDateLabel = "Data Date",
|
|
19803
19808
|
showProgress = true,
|
|
19809
|
+
showProjectProgress = false,
|
|
19804
19810
|
progressColor,
|
|
19805
19811
|
scrollToTaskId,
|
|
19806
19812
|
drawer: drawerProps
|
|
@@ -21316,6 +21322,7 @@
|
|
|
21316
21322
|
visibleTasksMirror,
|
|
21317
21323
|
viewMode,
|
|
21318
21324
|
showProgress,
|
|
21325
|
+
showProjectProgress,
|
|
21319
21326
|
progressColor
|
|
21320
21327
|
}),
|
|
21321
21328
|
[
|
|
@@ -21361,6 +21368,7 @@
|
|
|
21361
21368
|
changeInProgress == null ? void 0 : changeInProgress.action,
|
|
21362
21369
|
handleDeleteTasks,
|
|
21363
21370
|
showProgress,
|
|
21371
|
+
showProjectProgress,
|
|
21364
21372
|
progressColor
|
|
21365
21373
|
]
|
|
21366
21374
|
);
|
|
@@ -407,6 +407,10 @@ export interface GanttProps {
|
|
|
407
407
|
* Show/hide progress bar on task bars. Defaults to true.
|
|
408
408
|
*/
|
|
409
409
|
showProgress?: boolean;
|
|
410
|
+
/**
|
|
411
|
+
* Show/hide progress bar on project/WBS task bars. Defaults to false.
|
|
412
|
+
*/
|
|
413
|
+
showProjectProgress?: boolean;
|
|
410
414
|
/**
|
|
411
415
|
* Custom color for progress bars. If not provided, theme progress colors are used.
|
|
412
416
|
*/
|
package/package.json
CHANGED