gantt-task-react-v 1.0.49 → 1.0.50
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/dist/components/gantt/task-gantt-content.d.ts +2 -20
- package/dist/components/gantt-today/index.d.ts +0 -1
- package/dist/components/task-item/bar/bar-display.d.ts +2 -17
- package/dist/components/task-item/project/project-display.d.ts +2 -17
- package/dist/components/task-item/task-item.d.ts +2 -17
- package/dist/gantt-task-react.es.js +202 -251
- package/dist/gantt-task-react.umd.js +202 -251
- package/dist/types/public-types.d.ts +4 -22
- package/package.json +1 -1
|
@@ -10912,12 +10912,12 @@ const GanttTodayInner = ({
|
|
|
10912
10912
|
distances: { columnWidth },
|
|
10913
10913
|
ganttFullHeight,
|
|
10914
10914
|
isUnknownDates,
|
|
10915
|
+
rtl,
|
|
10915
10916
|
startDate,
|
|
10916
10917
|
viewMode,
|
|
10917
10918
|
showTodayLine = true,
|
|
10918
10919
|
showDataDateLine = false,
|
|
10919
10920
|
dataDate = null,
|
|
10920
|
-
dataDateX,
|
|
10921
10921
|
todayColor = null,
|
|
10922
10922
|
dataDateColor = null,
|
|
10923
10923
|
todayLabel = "Today",
|
|
@@ -10945,147 +10945,141 @@ const GanttTodayInner = ({
|
|
|
10945
10945
|
return 1 + percent * 0.5;
|
|
10946
10946
|
}
|
|
10947
10947
|
case ViewMode.Year: {
|
|
10948
|
-
const
|
|
10949
|
-
(today.getTime() - new Date(today.getFullYear(), 0, 0).getTime()) / (1e3 * 60 * 60 * 24)
|
|
10950
|
-
);
|
|
10951
|
-
const totalDaysInYear = new Date(today.getFullYear(), 11, 31).getDate() === 31 ? 366 : 365;
|
|
10952
|
-
const percent = todayOfYear / totalDaysInYear;
|
|
10948
|
+
const percent = today.getMonth() / 12;
|
|
10953
10949
|
return 1 + percent * 0.5;
|
|
10954
10950
|
}
|
|
10955
10951
|
default:
|
|
10956
10952
|
return 1;
|
|
10957
10953
|
}
|
|
10958
10954
|
};
|
|
10959
|
-
const
|
|
10960
|
-
|
|
10955
|
+
const tickX = todayIndex * columnWidth * extraMultiplier();
|
|
10956
|
+
const x = rtl ? tickX + columnWidth : tickX;
|
|
10957
|
+
const color = todayColor || "var(--gantt-calendar-today-color)";
|
|
10958
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
10961
10959
|
/* @__PURE__ */ jsx(
|
|
10962
|
-
"
|
|
10960
|
+
"rect",
|
|
10963
10961
|
{
|
|
10964
|
-
|
|
10965
|
-
|
|
10966
|
-
|
|
10967
|
-
|
|
10968
|
-
|
|
10969
|
-
stroke: todayColor || void 0
|
|
10962
|
+
x: additionalLeftSpace + x,
|
|
10963
|
+
y: 0,
|
|
10964
|
+
width: 2,
|
|
10965
|
+
height: ganttFullHeight,
|
|
10966
|
+
fill: color
|
|
10970
10967
|
}
|
|
10971
10968
|
),
|
|
10972
10969
|
/* @__PURE__ */ jsx(
|
|
10973
|
-
"
|
|
10970
|
+
"circle",
|
|
10974
10971
|
{
|
|
10975
|
-
className: styles$c.
|
|
10976
|
-
|
|
10977
|
-
|
|
10972
|
+
className: styles$c.ganttTodayCircle,
|
|
10973
|
+
cx: x + 1,
|
|
10974
|
+
cy: 6,
|
|
10975
|
+
r: 6,
|
|
10976
|
+
fill: color
|
|
10978
10977
|
}
|
|
10979
10978
|
),
|
|
10980
10979
|
/* @__PURE__ */ jsx(
|
|
10981
10980
|
"text",
|
|
10982
10981
|
{
|
|
10983
|
-
x,
|
|
10984
|
-
y:
|
|
10985
|
-
|
|
10986
|
-
|
|
10987
|
-
|
|
10982
|
+
x: additionalLeftSpace + x + 8,
|
|
10983
|
+
y: 10,
|
|
10984
|
+
fill: color,
|
|
10985
|
+
fontSize: 12,
|
|
10986
|
+
fontWeight: 600,
|
|
10988
10987
|
children: todayLabel
|
|
10989
10988
|
}
|
|
10990
10989
|
)
|
|
10991
|
-
] }
|
|
10990
|
+
] });
|
|
10992
10991
|
}, [
|
|
10993
|
-
isUnknownDates,
|
|
10994
|
-
showTodayLine,
|
|
10995
|
-
startDate,
|
|
10996
|
-
viewMode,
|
|
10997
10992
|
additionalLeftSpace,
|
|
10998
10993
|
columnWidth,
|
|
10999
10994
|
ganttFullHeight,
|
|
10995
|
+
isUnknownDates,
|
|
10996
|
+
rtl,
|
|
10997
|
+
startDate,
|
|
10998
|
+
viewMode,
|
|
10999
|
+
showTodayLine,
|
|
11000
11000
|
todayColor,
|
|
11001
11001
|
todayLabel
|
|
11002
11002
|
]);
|
|
11003
11003
|
const dataDateElement = useMemo(() => {
|
|
11004
|
-
if (
|
|
11004
|
+
if (!showDataDateLine || !dataDate) {
|
|
11005
11005
|
return null;
|
|
11006
11006
|
}
|
|
11007
|
-
|
|
11008
|
-
|
|
11009
|
-
|
|
11010
|
-
|
|
11011
|
-
|
|
11012
|
-
|
|
11013
|
-
switch (viewMode) {
|
|
11014
|
-
case ViewMode.Week: {
|
|
11015
|
-
const percent = dataDate.getDay() / 7;
|
|
11016
|
-
return 1 + percent * 0.2;
|
|
11017
|
-
}
|
|
11018
|
-
case ViewMode.Month: {
|
|
11019
|
-
const dayInMonth = dataDate.getDate();
|
|
11020
|
-
const maxDaysInMonth = getDaysInMonth(
|
|
11021
|
-
dataDate.getMonth(),
|
|
11022
|
-
dataDate.getFullYear()
|
|
11023
|
-
);
|
|
11024
|
-
const percent = dayInMonth / maxDaysInMonth;
|
|
11025
|
-
return 1 + percent * 0.5;
|
|
11026
|
-
}
|
|
11027
|
-
case ViewMode.Year: {
|
|
11028
|
-
const dataDateOfYear = Math.floor(
|
|
11029
|
-
(dataDate.getTime() - new Date(dataDate.getFullYear(), 0, 0).getTime()) / (1e3 * 60 * 60 * 24)
|
|
11030
|
-
);
|
|
11031
|
-
const totalDaysInYear = new Date(dataDate.getFullYear(), 11, 31).getDate() === 31 ? 366 : 365;
|
|
11032
|
-
const percent = dataDateOfYear / totalDaysInYear;
|
|
11033
|
-
return 1 + percent * 0.5;
|
|
11034
|
-
}
|
|
11035
|
-
default:
|
|
11036
|
-
return 1;
|
|
11007
|
+
const dataIndex = getDatesDiff(dataDate, startDate, viewMode);
|
|
11008
|
+
const extraMultiplier = () => {
|
|
11009
|
+
switch (viewMode) {
|
|
11010
|
+
case ViewMode.Week: {
|
|
11011
|
+
const percent = dataDate.getDay() / 7;
|
|
11012
|
+
return 1 + percent * 0.2;
|
|
11037
11013
|
}
|
|
11038
|
-
|
|
11039
|
-
|
|
11040
|
-
|
|
11041
|
-
|
|
11014
|
+
case ViewMode.Month: {
|
|
11015
|
+
const dayInMonth = dataDate.getDate();
|
|
11016
|
+
const maxDaysInMonth = getDaysInMonth(
|
|
11017
|
+
dataDate.getMonth(),
|
|
11018
|
+
dataDate.getFullYear()
|
|
11019
|
+
);
|
|
11020
|
+
const percent = dayInMonth / maxDaysInMonth;
|
|
11021
|
+
return 1 + percent * 0.5;
|
|
11022
|
+
}
|
|
11023
|
+
case ViewMode.Year: {
|
|
11024
|
+
const percent = dataDate.getMonth() / 12;
|
|
11025
|
+
return 1 + percent * 0.5;
|
|
11026
|
+
}
|
|
11027
|
+
default:
|
|
11028
|
+
return 1;
|
|
11029
|
+
}
|
|
11030
|
+
};
|
|
11031
|
+
const tickX = dataIndex * columnWidth * extraMultiplier();
|
|
11032
|
+
const x = rtl ? tickX + columnWidth : tickX;
|
|
11033
|
+
const color = dataDateColor || "var(--gantt-calendar-today-color)";
|
|
11034
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
11042
11035
|
/* @__PURE__ */ jsx(
|
|
11043
|
-
"
|
|
11036
|
+
"rect",
|
|
11044
11037
|
{
|
|
11045
|
-
|
|
11046
|
-
|
|
11047
|
-
|
|
11048
|
-
|
|
11049
|
-
|
|
11050
|
-
|
|
11038
|
+
x: additionalLeftSpace + x,
|
|
11039
|
+
y: 0,
|
|
11040
|
+
width: 2,
|
|
11041
|
+
height: ganttFullHeight,
|
|
11042
|
+
fill: color,
|
|
11043
|
+
opacity: 0.9
|
|
11051
11044
|
}
|
|
11052
11045
|
),
|
|
11053
11046
|
/* @__PURE__ */ jsx(
|
|
11054
|
-
"
|
|
11047
|
+
"circle",
|
|
11055
11048
|
{
|
|
11056
|
-
className: styles$c.
|
|
11057
|
-
|
|
11058
|
-
|
|
11049
|
+
className: styles$c.ganttTodayCircle,
|
|
11050
|
+
cx: x + 1,
|
|
11051
|
+
cy: 6,
|
|
11052
|
+
r: 6,
|
|
11053
|
+
fill: color
|
|
11059
11054
|
}
|
|
11060
11055
|
),
|
|
11061
11056
|
/* @__PURE__ */ jsx(
|
|
11062
11057
|
"text",
|
|
11063
11058
|
{
|
|
11064
|
-
x,
|
|
11065
|
-
y:
|
|
11066
|
-
|
|
11067
|
-
|
|
11068
|
-
|
|
11069
|
-
children: dataDateLabel
|
|
11059
|
+
x: additionalLeftSpace + x + 8,
|
|
11060
|
+
y: 10,
|
|
11061
|
+
fill: color,
|
|
11062
|
+
fontSize: 12,
|
|
11063
|
+
fontWeight: 600,
|
|
11064
|
+
children: dataDateLabel || "Data Date"
|
|
11070
11065
|
}
|
|
11071
11066
|
)
|
|
11072
|
-
] }
|
|
11067
|
+
] });
|
|
11073
11068
|
}, [
|
|
11074
|
-
isUnknownDates,
|
|
11075
|
-
showDataDateLine,
|
|
11076
|
-
dataDate,
|
|
11077
|
-
dataDateX,
|
|
11078
|
-
startDate,
|
|
11079
|
-
viewMode,
|
|
11080
11069
|
additionalLeftSpace,
|
|
11081
11070
|
columnWidth,
|
|
11082
11071
|
ganttFullHeight,
|
|
11072
|
+
rtl,
|
|
11073
|
+
startDate,
|
|
11074
|
+
viewMode,
|
|
11075
|
+
showDataDateLine,
|
|
11076
|
+
dataDate,
|
|
11083
11077
|
dataDateColor,
|
|
11084
11078
|
dataDateLabel
|
|
11085
11079
|
]);
|
|
11086
|
-
return /* @__PURE__ */ jsxs(
|
|
11087
|
-
|
|
11088
|
-
|
|
11080
|
+
return /* @__PURE__ */ jsxs("g", { className: "today", children: [
|
|
11081
|
+
dataDateElement,
|
|
11082
|
+
todayElement
|
|
11089
11083
|
] });
|
|
11090
11084
|
};
|
|
11091
11085
|
const GanttToday = memo(GanttTodayInner);
|
|
@@ -11989,9 +11983,9 @@ const styles$8 = {
|
|
|
11989
11983
|
const BarDisplay = ({
|
|
11990
11984
|
taskId,
|
|
11991
11985
|
barCornerRadius,
|
|
11992
|
-
|
|
11993
|
-
|
|
11994
|
-
|
|
11986
|
+
isCritical,
|
|
11987
|
+
isSelected,
|
|
11988
|
+
hasChildren,
|
|
11995
11989
|
height,
|
|
11996
11990
|
progressWidth,
|
|
11997
11991
|
progressX,
|
|
@@ -12000,11 +11994,60 @@ const BarDisplay = ({
|
|
|
12000
11994
|
x,
|
|
12001
11995
|
y,
|
|
12002
11996
|
customStyle,
|
|
12003
|
-
|
|
12004
|
-
|
|
12005
|
-
showProgressBar = true,
|
|
12006
|
-
progressBarColor
|
|
11997
|
+
showProgress = true,
|
|
11998
|
+
progressColor
|
|
12007
11999
|
}) => {
|
|
12000
|
+
const processColor = useMemo(() => {
|
|
12001
|
+
if (progressColor) {
|
|
12002
|
+
return progressColor;
|
|
12003
|
+
}
|
|
12004
|
+
if (isCritical) {
|
|
12005
|
+
if (hasChildren) {
|
|
12006
|
+
if (isSelected) {
|
|
12007
|
+
return "var(--gantt-group-progress-selected-critical-color)";
|
|
12008
|
+
}
|
|
12009
|
+
return "var(--gantt-group-progress-critical-color)";
|
|
12010
|
+
}
|
|
12011
|
+
if (isSelected) {
|
|
12012
|
+
return "var(--gantt-bar-progress-selected-critical-color)";
|
|
12013
|
+
}
|
|
12014
|
+
return "var(--gantt-bar-progress-critical-color)";
|
|
12015
|
+
}
|
|
12016
|
+
if (hasChildren) {
|
|
12017
|
+
if (isSelected) {
|
|
12018
|
+
return "var(--gantt-group-progress-selected-color)";
|
|
12019
|
+
}
|
|
12020
|
+
return "var(--gantt-group-progress-color)";
|
|
12021
|
+
}
|
|
12022
|
+
if (isSelected) {
|
|
12023
|
+
return "var(--gantt-bar-progress-selected-color)";
|
|
12024
|
+
}
|
|
12025
|
+
return "var(--gantt-bar-progress-color)";
|
|
12026
|
+
}, [isSelected, isCritical, hasChildren, progressColor]);
|
|
12027
|
+
const barColor = useMemo(() => {
|
|
12028
|
+
if (isCritical) {
|
|
12029
|
+
if (hasChildren) {
|
|
12030
|
+
if (isSelected) {
|
|
12031
|
+
return "var(--gantt-group-background-selected-critical-color)";
|
|
12032
|
+
}
|
|
12033
|
+
return "var(--gantt-group-background-critical-color)";
|
|
12034
|
+
}
|
|
12035
|
+
if (isSelected) {
|
|
12036
|
+
return "var(--gantt-bar-background-selected-critical-color)";
|
|
12037
|
+
}
|
|
12038
|
+
return "var(--gantt-bar-background-critical-color)";
|
|
12039
|
+
}
|
|
12040
|
+
if (hasChildren) {
|
|
12041
|
+
if (isSelected) {
|
|
12042
|
+
return "var(--gantt-group-background-selected-color)";
|
|
12043
|
+
}
|
|
12044
|
+
return "var(--gantt-group-background-color)";
|
|
12045
|
+
}
|
|
12046
|
+
if (isSelected) {
|
|
12047
|
+
return "var(--gantt-bar-background-selected-color)";
|
|
12048
|
+
}
|
|
12049
|
+
return "var(--gantt-bar-background-color)";
|
|
12050
|
+
}, [isSelected, isCritical, hasChildren]);
|
|
12008
12051
|
return /* @__PURE__ */ jsxs(
|
|
12009
12052
|
"g",
|
|
12010
12053
|
{
|
|
@@ -12022,40 +12065,7 @@ const BarDisplay = ({
|
|
|
12022
12065
|
}
|
|
12023
12066
|
},
|
|
12024
12067
|
children: [
|
|
12025
|
-
|
|
12026
|
-
var _a, _b;
|
|
12027
|
-
const localSplit = Math.max(0, Math.min(width, dataDateX - x));
|
|
12028
|
-
const leftFill = ((_a = splitbarColors == null ? void 0 : splitbarColors.task) == null ? void 0 : _a.onTime) || "var(--gantt-bar-background-color)";
|
|
12029
|
-
const rightFill = ((_b = splitbarColors == null ? void 0 : splitbarColors.task) == null ? void 0 : _b.delayed) || "var(--gantt-bar-background-color)";
|
|
12030
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
12031
|
-
/* @__PURE__ */ jsx(
|
|
12032
|
-
"rect",
|
|
12033
|
-
{
|
|
12034
|
-
x,
|
|
12035
|
-
width: localSplit,
|
|
12036
|
-
y,
|
|
12037
|
-
height,
|
|
12038
|
-
ry: barCornerRadius,
|
|
12039
|
-
rx: barCornerRadius,
|
|
12040
|
-
fill: leftFill,
|
|
12041
|
-
className: styles$8.barBackground
|
|
12042
|
-
}
|
|
12043
|
-
),
|
|
12044
|
-
/* @__PURE__ */ jsx(
|
|
12045
|
-
"rect",
|
|
12046
|
-
{
|
|
12047
|
-
x: x + localSplit,
|
|
12048
|
-
width: Math.max(0, width - localSplit),
|
|
12049
|
-
y,
|
|
12050
|
-
height,
|
|
12051
|
-
ry: barCornerRadius,
|
|
12052
|
-
rx: barCornerRadius,
|
|
12053
|
-
fill: rightFill,
|
|
12054
|
-
className: styles$8.barBackground
|
|
12055
|
-
}
|
|
12056
|
-
)
|
|
12057
|
-
] });
|
|
12058
|
-
})() : /* @__PURE__ */ jsx(
|
|
12068
|
+
/* @__PURE__ */ jsx(
|
|
12059
12069
|
"rect",
|
|
12060
12070
|
{
|
|
12061
12071
|
x,
|
|
@@ -12064,11 +12074,11 @@ const BarDisplay = ({
|
|
|
12064
12074
|
height,
|
|
12065
12075
|
ry: barCornerRadius,
|
|
12066
12076
|
rx: barCornerRadius,
|
|
12067
|
-
fill:
|
|
12077
|
+
fill: barColor,
|
|
12068
12078
|
className: styles$8.barBackground
|
|
12069
12079
|
}
|
|
12070
12080
|
),
|
|
12071
|
-
|
|
12081
|
+
showProgress && /* @__PURE__ */ jsx(
|
|
12072
12082
|
"rect",
|
|
12073
12083
|
{
|
|
12074
12084
|
x: progressX,
|
|
@@ -12077,7 +12087,7 @@ const BarDisplay = ({
|
|
|
12077
12087
|
height,
|
|
12078
12088
|
ry: barCornerRadius,
|
|
12079
12089
|
rx: barCornerRadius,
|
|
12080
|
-
fill:
|
|
12090
|
+
fill: processColor
|
|
12081
12091
|
}
|
|
12082
12092
|
)
|
|
12083
12093
|
]
|
|
@@ -12132,8 +12142,8 @@ const ProjectDisplay = ({
|
|
|
12132
12142
|
taskName: taskName2,
|
|
12133
12143
|
taskHalfHeight,
|
|
12134
12144
|
taskHeight,
|
|
12135
|
-
|
|
12136
|
-
|
|
12145
|
+
isSelected,
|
|
12146
|
+
isCritical,
|
|
12137
12147
|
progressWidth,
|
|
12138
12148
|
progressX,
|
|
12139
12149
|
taskYOffset,
|
|
@@ -12142,11 +12152,36 @@ const ProjectDisplay = ({
|
|
|
12142
12152
|
x2,
|
|
12143
12153
|
startMoveFullTask,
|
|
12144
12154
|
customStyle,
|
|
12145
|
-
|
|
12146
|
-
|
|
12147
|
-
showProgressBar = true,
|
|
12148
|
-
progressBarColor
|
|
12155
|
+
showProgress = true,
|
|
12156
|
+
progressColor
|
|
12149
12157
|
}) => {
|
|
12158
|
+
const barColor = useMemo(() => {
|
|
12159
|
+
if (isCritical) {
|
|
12160
|
+
if (isSelected) {
|
|
12161
|
+
return "var(--gantt-project-background-selected-critical-color)";
|
|
12162
|
+
}
|
|
12163
|
+
return "var(--gantt-project-background-critical-color)";
|
|
12164
|
+
}
|
|
12165
|
+
if (isSelected) {
|
|
12166
|
+
return "var(--gantt-project-background-selected-color)";
|
|
12167
|
+
}
|
|
12168
|
+
return "var(--gantt-project-background-color)";
|
|
12169
|
+
}, [isSelected, isCritical]);
|
|
12170
|
+
const processColor = useMemo(() => {
|
|
12171
|
+
if (progressColor) {
|
|
12172
|
+
return progressColor;
|
|
12173
|
+
}
|
|
12174
|
+
if (isCritical) {
|
|
12175
|
+
if (isSelected) {
|
|
12176
|
+
return "var(--gantt-project-progress-selected-critical-color)";
|
|
12177
|
+
}
|
|
12178
|
+
return "var(--gantt-project-progress-critical-color)";
|
|
12179
|
+
}
|
|
12180
|
+
if (isSelected) {
|
|
12181
|
+
return "var(--gantt-project-progress-selected-color)";
|
|
12182
|
+
}
|
|
12183
|
+
return "var(--gantt-project-progress-color)";
|
|
12184
|
+
}, [isSelected, isCritical, progressColor]);
|
|
12150
12185
|
const projectLeftTriangle = [
|
|
12151
12186
|
x1,
|
|
12152
12187
|
taskYOffset + taskHeight / 2 - 1,
|
|
@@ -12180,53 +12215,20 @@ const ProjectDisplay = ({
|
|
|
12180
12215
|
},
|
|
12181
12216
|
className: styles$7.projectWrapper,
|
|
12182
12217
|
children: [
|
|
12183
|
-
|
|
12184
|
-
var _a, _b;
|
|
12185
|
-
const localSplit = Math.max(0, Math.min(width, dataDateX - x1));
|
|
12186
|
-
const leftFill = ((_a = splitbarColors == null ? void 0 : splitbarColors.project) == null ? void 0 : _a.onTime) || "var(--gantt-project-background-color)";
|
|
12187
|
-
const rightFill = ((_b = splitbarColors == null ? void 0 : splitbarColors.project) == null ? void 0 : _b.delayed) || "var(--gantt-project-background-color)";
|
|
12188
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
12189
|
-
/* @__PURE__ */ jsx(
|
|
12190
|
-
"rect",
|
|
12191
|
-
{
|
|
12192
|
-
x: x1,
|
|
12193
|
-
width: localSplit,
|
|
12194
|
-
y: taskYOffset,
|
|
12195
|
-
height: taskHeight,
|
|
12196
|
-
rx: barCornerRadius,
|
|
12197
|
-
ry: barCornerRadius,
|
|
12198
|
-
className: styles$7.projectBackground,
|
|
12199
|
-
fill: leftFill
|
|
12200
|
-
}
|
|
12201
|
-
),
|
|
12202
|
-
/* @__PURE__ */ jsx(
|
|
12203
|
-
"rect",
|
|
12204
|
-
{
|
|
12205
|
-
x: x1 + localSplit,
|
|
12206
|
-
width: Math.max(0, width - localSplit),
|
|
12207
|
-
y: taskYOffset,
|
|
12208
|
-
height: taskHeight,
|
|
12209
|
-
rx: barCornerRadius,
|
|
12210
|
-
ry: barCornerRadius,
|
|
12211
|
-
className: styles$7.projectBackground,
|
|
12212
|
-
fill: rightFill
|
|
12213
|
-
}
|
|
12214
|
-
)
|
|
12215
|
-
] });
|
|
12216
|
-
})() : /* @__PURE__ */ jsx(
|
|
12218
|
+
/* @__PURE__ */ jsx(
|
|
12217
12219
|
"rect",
|
|
12218
12220
|
{
|
|
12221
|
+
fill: barColor,
|
|
12219
12222
|
x: x1,
|
|
12220
12223
|
width,
|
|
12221
12224
|
y: taskYOffset,
|
|
12222
12225
|
height: taskHeight,
|
|
12223
12226
|
rx: barCornerRadius,
|
|
12224
12227
|
ry: barCornerRadius,
|
|
12225
|
-
className: styles$7.projectBackground
|
|
12226
|
-
fill: "unset"
|
|
12228
|
+
className: styles$7.projectBackground
|
|
12227
12229
|
}
|
|
12228
12230
|
),
|
|
12229
|
-
|
|
12231
|
+
showProgress && /* @__PURE__ */ jsx(
|
|
12230
12232
|
"rect",
|
|
12231
12233
|
{
|
|
12232
12234
|
x: progressX,
|
|
@@ -12235,13 +12237,13 @@ const ProjectDisplay = ({
|
|
|
12235
12237
|
height: taskHeight,
|
|
12236
12238
|
ry: barCornerRadius,
|
|
12237
12239
|
rx: barCornerRadius,
|
|
12238
|
-
fill:
|
|
12240
|
+
fill: processColor
|
|
12239
12241
|
}
|
|
12240
12242
|
),
|
|
12241
12243
|
/* @__PURE__ */ jsx(
|
|
12242
12244
|
"rect",
|
|
12243
12245
|
{
|
|
12244
|
-
fill:
|
|
12246
|
+
fill: barColor,
|
|
12245
12247
|
x: x1,
|
|
12246
12248
|
width,
|
|
12247
12249
|
y: taskYOffset,
|
|
@@ -12256,7 +12258,7 @@ const ProjectDisplay = ({
|
|
|
12256
12258
|
{
|
|
12257
12259
|
className: styles$7.projectTop,
|
|
12258
12260
|
points: projectLeftTriangle,
|
|
12259
|
-
fill:
|
|
12261
|
+
fill: barColor
|
|
12260
12262
|
}
|
|
12261
12263
|
),
|
|
12262
12264
|
/* @__PURE__ */ jsx(
|
|
@@ -12264,7 +12266,7 @@ const ProjectDisplay = ({
|
|
|
12264
12266
|
{
|
|
12265
12267
|
className: styles$7.projectTop,
|
|
12266
12268
|
points: projectRightTriangle,
|
|
12267
|
-
fill:
|
|
12269
|
+
fill: barColor
|
|
12268
12270
|
}
|
|
12269
12271
|
)
|
|
12270
12272
|
]
|
|
@@ -12335,10 +12337,8 @@ const Bar = (props) => {
|
|
|
12335
12337
|
x2,
|
|
12336
12338
|
movingAction,
|
|
12337
12339
|
ganttRelationEvent,
|
|
12338
|
-
|
|
12339
|
-
|
|
12340
|
-
showProgressBar,
|
|
12341
|
-
progressBarColor
|
|
12340
|
+
showProgress = true,
|
|
12341
|
+
progressColor
|
|
12342
12342
|
} = props;
|
|
12343
12343
|
useMemo(() => width < 30, [width]);
|
|
12344
12344
|
const handleHeight = useMemo(() => taskHeight - 2, [taskHeight]);
|
|
@@ -12400,10 +12400,8 @@ const Bar = (props) => {
|
|
|
12400
12400
|
isCritical,
|
|
12401
12401
|
hasChildren,
|
|
12402
12402
|
startMoveFullTask,
|
|
12403
|
-
|
|
12404
|
-
|
|
12405
|
-
showProgressBar,
|
|
12406
|
-
progressBarColor
|
|
12403
|
+
showProgress,
|
|
12404
|
+
progressColor
|
|
12407
12405
|
}
|
|
12408
12406
|
);
|
|
12409
12407
|
} else {
|
|
@@ -12423,10 +12421,8 @@ const Bar = (props) => {
|
|
|
12423
12421
|
isCritical,
|
|
12424
12422
|
hasChildren,
|
|
12425
12423
|
startMoveFullTask,
|
|
12426
|
-
|
|
12427
|
-
|
|
12428
|
-
showProgressBar,
|
|
12429
|
-
progressBarColor
|
|
12424
|
+
showProgress,
|
|
12425
|
+
progressColor
|
|
12430
12426
|
}
|
|
12431
12427
|
);
|
|
12432
12428
|
}
|
|
@@ -12985,10 +12981,8 @@ const TaskGanttContentInner = (props) => {
|
|
|
12985
12981
|
taskBarMovingAction,
|
|
12986
12982
|
waitCommitTasks,
|
|
12987
12983
|
viewMode,
|
|
12988
|
-
|
|
12989
|
-
|
|
12990
|
-
showProgressBar,
|
|
12991
|
-
progressBarColor
|
|
12984
|
+
showProgress = true,
|
|
12985
|
+
progressColor
|
|
12992
12986
|
} = props;
|
|
12993
12987
|
const renderedHolidays = useMemo(() => {
|
|
12994
12988
|
const { columnWidth } = distances;
|
|
@@ -13075,11 +13069,6 @@ const TaskGanttContentInner = (props) => {
|
|
|
13075
13069
|
x2: taskX2,
|
|
13076
13070
|
comparisonDates
|
|
13077
13071
|
} = getTaskCoordinates2(task);
|
|
13078
|
-
const containerXAbs = Math.max(
|
|
13079
|
-
containerX + (additionalLeftSpace || 0),
|
|
13080
|
-
0
|
|
13081
|
-
);
|
|
13082
|
-
const dataDateXLocal = typeof dataDateX === "number" ? dataDateX - containerXAbs : void 0;
|
|
13083
13072
|
tasksRes.push(
|
|
13084
13073
|
/* @__PURE__ */ jsx(
|
|
13085
13074
|
"svg",
|
|
@@ -13124,10 +13113,8 @@ const TaskGanttContentInner = (props) => {
|
|
|
13124
13113
|
onDeleteTask,
|
|
13125
13114
|
renderCustomLabel,
|
|
13126
13115
|
viewMode,
|
|
13127
|
-
|
|
13128
|
-
|
|
13129
|
-
showProgressBar,
|
|
13130
|
-
progressBarColor
|
|
13116
|
+
showProgress,
|
|
13117
|
+
progressColor
|
|
13131
13118
|
}
|
|
13132
13119
|
)
|
|
13133
13120
|
},
|
|
@@ -13337,10 +13324,6 @@ const TaskGanttContentInner = (props) => {
|
|
|
13337
13324
|
isDateChangeable,
|
|
13338
13325
|
isRelationChangeable,
|
|
13339
13326
|
visibleTasksMirror,
|
|
13340
|
-
dataDateX,
|
|
13341
|
-
splitbarColors,
|
|
13342
|
-
showProgressBar,
|
|
13343
|
-
progressBarColor,
|
|
13344
13327
|
onArrowDoubleClick
|
|
13345
13328
|
]);
|
|
13346
13329
|
return /* @__PURE__ */ jsxs("g", { className: "content", children: [
|
|
@@ -18786,9 +18769,8 @@ const Gantt = (props) => {
|
|
|
18786
18769
|
dataDateColor,
|
|
18787
18770
|
todayLabel = "Today",
|
|
18788
18771
|
dataDateLabel = "Data Date",
|
|
18789
|
-
|
|
18790
|
-
|
|
18791
|
-
progressBarColor
|
|
18772
|
+
showProgress = true,
|
|
18773
|
+
progressColor
|
|
18792
18774
|
} = props;
|
|
18793
18775
|
const ganttSVGRef = useRef(null);
|
|
18794
18776
|
const wrapperRef = useRef(null);
|
|
@@ -19917,29 +19899,6 @@ const Gantt = (props) => {
|
|
|
19917
19899
|
() => svgWidth + additionalLeftSpace + additionalRightSpace,
|
|
19918
19900
|
[additionalLeftSpace, additionalRightSpace, svgWidth]
|
|
19919
19901
|
);
|
|
19920
|
-
const dataDateX = useMemo(() => {
|
|
19921
|
-
if (!dataDate)
|
|
19922
|
-
return void 0;
|
|
19923
|
-
try {
|
|
19924
|
-
const roundedDataDate = roundStartDate(dataDate);
|
|
19925
|
-
const x = taskXCoordinate(
|
|
19926
|
-
roundedDataDate,
|
|
19927
|
-
startDate,
|
|
19928
|
-
viewMode,
|
|
19929
|
-
distances.columnWidth
|
|
19930
|
-
);
|
|
19931
|
-
return additionalLeftSpace + x;
|
|
19932
|
-
} catch {
|
|
19933
|
-
return void 0;
|
|
19934
|
-
}
|
|
19935
|
-
}, [
|
|
19936
|
-
dataDate,
|
|
19937
|
-
startDate,
|
|
19938
|
-
viewMode,
|
|
19939
|
-
distances,
|
|
19940
|
-
additionalLeftSpace,
|
|
19941
|
-
roundStartDate
|
|
19942
|
-
]);
|
|
19943
19902
|
const gridProps = useMemo(
|
|
19944
19903
|
() => ({
|
|
19945
19904
|
additionalLeftSpace,
|
|
@@ -19952,7 +19911,6 @@ const Gantt = (props) => {
|
|
|
19952
19911
|
showTodayLine,
|
|
19953
19912
|
showDataDateLine,
|
|
19954
19913
|
dataDate,
|
|
19955
|
-
dataDateX,
|
|
19956
19914
|
todayColor,
|
|
19957
19915
|
dataDateColor,
|
|
19958
19916
|
todayLabel,
|
|
@@ -19969,7 +19927,6 @@ const Gantt = (props) => {
|
|
|
19969
19927
|
showTodayLine,
|
|
19970
19928
|
showDataDateLine,
|
|
19971
19929
|
dataDate,
|
|
19972
|
-
dataDateX,
|
|
19973
19930
|
todayColor,
|
|
19974
19931
|
dataDateColor,
|
|
19975
19932
|
todayLabel,
|
|
@@ -20009,11 +19966,6 @@ const Gantt = (props) => {
|
|
|
20009
19966
|
const renderTaskBarProps = useMemo(
|
|
20010
19967
|
() => ({
|
|
20011
19968
|
...taskBar,
|
|
20012
|
-
splitbarColors,
|
|
20013
|
-
dataDate,
|
|
20014
|
-
dataDateX,
|
|
20015
|
-
showProgressBar,
|
|
20016
|
-
progressBarColor,
|
|
20017
19969
|
taskBarMovingAction: (task) => {
|
|
20018
19970
|
var _a2;
|
|
20019
19971
|
return task.id === ((_a2 = changeInProgress == null ? void 0 : changeInProgress.changedTask) == null ? void 0 : _a2.id) ? changeInProgress.action : null;
|
|
@@ -20049,16 +20001,13 @@ const Gantt = (props) => {
|
|
|
20049
20001
|
taskHeight,
|
|
20050
20002
|
taskYOffset,
|
|
20051
20003
|
visibleTasksMirror,
|
|
20052
|
-
viewMode
|
|
20004
|
+
viewMode,
|
|
20005
|
+
showProgress,
|
|
20006
|
+
progressColor
|
|
20053
20007
|
}),
|
|
20054
20008
|
[
|
|
20055
20009
|
viewMode,
|
|
20056
20010
|
taskBar,
|
|
20057
|
-
splitbarColors,
|
|
20058
|
-
dataDate,
|
|
20059
|
-
dataDateX,
|
|
20060
|
-
showProgressBar,
|
|
20061
|
-
progressBarColor,
|
|
20062
20011
|
authorizedRelations,
|
|
20063
20012
|
additionalLeftSpace,
|
|
20064
20013
|
additionalRightSpace,
|
|
@@ -20091,7 +20040,9 @@ const Gantt = (props) => {
|
|
|
20091
20040
|
visibleTasksMirror,
|
|
20092
20041
|
(_b = changeInProgress == null ? void 0 : changeInProgress.changedTask) == null ? void 0 : _b.id,
|
|
20093
20042
|
changeInProgress == null ? void 0 : changeInProgress.action,
|
|
20094
|
-
handleDeleteTasks
|
|
20043
|
+
handleDeleteTasks,
|
|
20044
|
+
showProgress,
|
|
20045
|
+
progressColor
|
|
20095
20046
|
]
|
|
20096
20047
|
);
|
|
20097
20048
|
const renderTaskListProps = useMemo(
|