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
|
@@ -10929,12 +10929,12 @@
|
|
|
10929
10929
|
distances: { columnWidth },
|
|
10930
10930
|
ganttFullHeight,
|
|
10931
10931
|
isUnknownDates,
|
|
10932
|
+
rtl,
|
|
10932
10933
|
startDate,
|
|
10933
10934
|
viewMode,
|
|
10934
10935
|
showTodayLine = true,
|
|
10935
10936
|
showDataDateLine = false,
|
|
10936
10937
|
dataDate = null,
|
|
10937
|
-
dataDateX,
|
|
10938
10938
|
todayColor = null,
|
|
10939
10939
|
dataDateColor = null,
|
|
10940
10940
|
todayLabel = "Today",
|
|
@@ -10962,147 +10962,141 @@
|
|
|
10962
10962
|
return 1 + percent * 0.5;
|
|
10963
10963
|
}
|
|
10964
10964
|
case ViewMode.Year: {
|
|
10965
|
-
const
|
|
10966
|
-
(today.getTime() - new Date(today.getFullYear(), 0, 0).getTime()) / (1e3 * 60 * 60 * 24)
|
|
10967
|
-
);
|
|
10968
|
-
const totalDaysInYear = new Date(today.getFullYear(), 11, 31).getDate() === 31 ? 366 : 365;
|
|
10969
|
-
const percent = todayOfYear / totalDaysInYear;
|
|
10965
|
+
const percent = today.getMonth() / 12;
|
|
10970
10966
|
return 1 + percent * 0.5;
|
|
10971
10967
|
}
|
|
10972
10968
|
default:
|
|
10973
10969
|
return 1;
|
|
10974
10970
|
}
|
|
10975
10971
|
};
|
|
10976
|
-
const
|
|
10977
|
-
|
|
10972
|
+
const tickX = todayIndex * columnWidth * extraMultiplier();
|
|
10973
|
+
const x = rtl ? tickX + columnWidth : tickX;
|
|
10974
|
+
const color = todayColor || "var(--gantt-calendar-today-color)";
|
|
10975
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
10978
10976
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10979
|
-
"
|
|
10977
|
+
"rect",
|
|
10980
10978
|
{
|
|
10981
|
-
|
|
10982
|
-
|
|
10983
|
-
|
|
10984
|
-
|
|
10985
|
-
|
|
10986
|
-
stroke: todayColor || void 0
|
|
10979
|
+
x: additionalLeftSpace + x,
|
|
10980
|
+
y: 0,
|
|
10981
|
+
width: 2,
|
|
10982
|
+
height: ganttFullHeight,
|
|
10983
|
+
fill: color
|
|
10987
10984
|
}
|
|
10988
10985
|
),
|
|
10989
10986
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10990
|
-
"
|
|
10987
|
+
"circle",
|
|
10991
10988
|
{
|
|
10992
|
-
className: styles$c.
|
|
10993
|
-
|
|
10994
|
-
|
|
10989
|
+
className: styles$c.ganttTodayCircle,
|
|
10990
|
+
cx: x + 1,
|
|
10991
|
+
cy: 6,
|
|
10992
|
+
r: 6,
|
|
10993
|
+
fill: color
|
|
10995
10994
|
}
|
|
10996
10995
|
),
|
|
10997
10996
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10998
10997
|
"text",
|
|
10999
10998
|
{
|
|
11000
|
-
x,
|
|
11001
|
-
y:
|
|
11002
|
-
|
|
11003
|
-
|
|
11004
|
-
|
|
10999
|
+
x: additionalLeftSpace + x + 8,
|
|
11000
|
+
y: 10,
|
|
11001
|
+
fill: color,
|
|
11002
|
+
fontSize: 12,
|
|
11003
|
+
fontWeight: 600,
|
|
11005
11004
|
children: todayLabel
|
|
11006
11005
|
}
|
|
11007
11006
|
)
|
|
11008
|
-
] }
|
|
11007
|
+
] });
|
|
11009
11008
|
}, [
|
|
11010
|
-
isUnknownDates,
|
|
11011
|
-
showTodayLine,
|
|
11012
|
-
startDate,
|
|
11013
|
-
viewMode,
|
|
11014
11009
|
additionalLeftSpace,
|
|
11015
11010
|
columnWidth,
|
|
11016
11011
|
ganttFullHeight,
|
|
11012
|
+
isUnknownDates,
|
|
11013
|
+
rtl,
|
|
11014
|
+
startDate,
|
|
11015
|
+
viewMode,
|
|
11016
|
+
showTodayLine,
|
|
11017
11017
|
todayColor,
|
|
11018
11018
|
todayLabel
|
|
11019
11019
|
]);
|
|
11020
11020
|
const dataDateElement = React.useMemo(() => {
|
|
11021
|
-
if (
|
|
11021
|
+
if (!showDataDateLine || !dataDate) {
|
|
11022
11022
|
return null;
|
|
11023
11023
|
}
|
|
11024
|
-
|
|
11025
|
-
|
|
11026
|
-
|
|
11027
|
-
|
|
11028
|
-
|
|
11029
|
-
|
|
11030
|
-
switch (viewMode) {
|
|
11031
|
-
case ViewMode.Week: {
|
|
11032
|
-
const percent = dataDate.getDay() / 7;
|
|
11033
|
-
return 1 + percent * 0.2;
|
|
11034
|
-
}
|
|
11035
|
-
case ViewMode.Month: {
|
|
11036
|
-
const dayInMonth = dataDate.getDate();
|
|
11037
|
-
const maxDaysInMonth = getDaysInMonth(
|
|
11038
|
-
dataDate.getMonth(),
|
|
11039
|
-
dataDate.getFullYear()
|
|
11040
|
-
);
|
|
11041
|
-
const percent = dayInMonth / maxDaysInMonth;
|
|
11042
|
-
return 1 + percent * 0.5;
|
|
11043
|
-
}
|
|
11044
|
-
case ViewMode.Year: {
|
|
11045
|
-
const dataDateOfYear = Math.floor(
|
|
11046
|
-
(dataDate.getTime() - new Date(dataDate.getFullYear(), 0, 0).getTime()) / (1e3 * 60 * 60 * 24)
|
|
11047
|
-
);
|
|
11048
|
-
const totalDaysInYear = new Date(dataDate.getFullYear(), 11, 31).getDate() === 31 ? 366 : 365;
|
|
11049
|
-
const percent = dataDateOfYear / totalDaysInYear;
|
|
11050
|
-
return 1 + percent * 0.5;
|
|
11051
|
-
}
|
|
11052
|
-
default:
|
|
11053
|
-
return 1;
|
|
11024
|
+
const dataIndex = getDatesDiff(dataDate, startDate, viewMode);
|
|
11025
|
+
const extraMultiplier = () => {
|
|
11026
|
+
switch (viewMode) {
|
|
11027
|
+
case ViewMode.Week: {
|
|
11028
|
+
const percent = dataDate.getDay() / 7;
|
|
11029
|
+
return 1 + percent * 0.2;
|
|
11054
11030
|
}
|
|
11055
|
-
|
|
11056
|
-
|
|
11057
|
-
|
|
11058
|
-
|
|
11031
|
+
case ViewMode.Month: {
|
|
11032
|
+
const dayInMonth = dataDate.getDate();
|
|
11033
|
+
const maxDaysInMonth = getDaysInMonth(
|
|
11034
|
+
dataDate.getMonth(),
|
|
11035
|
+
dataDate.getFullYear()
|
|
11036
|
+
);
|
|
11037
|
+
const percent = dayInMonth / maxDaysInMonth;
|
|
11038
|
+
return 1 + percent * 0.5;
|
|
11039
|
+
}
|
|
11040
|
+
case ViewMode.Year: {
|
|
11041
|
+
const percent = dataDate.getMonth() / 12;
|
|
11042
|
+
return 1 + percent * 0.5;
|
|
11043
|
+
}
|
|
11044
|
+
default:
|
|
11045
|
+
return 1;
|
|
11046
|
+
}
|
|
11047
|
+
};
|
|
11048
|
+
const tickX = dataIndex * columnWidth * extraMultiplier();
|
|
11049
|
+
const x = rtl ? tickX + columnWidth : tickX;
|
|
11050
|
+
const color = dataDateColor || "var(--gantt-calendar-today-color)";
|
|
11051
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
11059
11052
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11060
|
-
"
|
|
11053
|
+
"rect",
|
|
11061
11054
|
{
|
|
11062
|
-
|
|
11063
|
-
|
|
11064
|
-
|
|
11065
|
-
|
|
11066
|
-
|
|
11067
|
-
|
|
11055
|
+
x: additionalLeftSpace + x,
|
|
11056
|
+
y: 0,
|
|
11057
|
+
width: 2,
|
|
11058
|
+
height: ganttFullHeight,
|
|
11059
|
+
fill: color,
|
|
11060
|
+
opacity: 0.9
|
|
11068
11061
|
}
|
|
11069
11062
|
),
|
|
11070
11063
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11071
|
-
"
|
|
11064
|
+
"circle",
|
|
11072
11065
|
{
|
|
11073
|
-
className: styles$c.
|
|
11074
|
-
|
|
11075
|
-
|
|
11066
|
+
className: styles$c.ganttTodayCircle,
|
|
11067
|
+
cx: x + 1,
|
|
11068
|
+
cy: 6,
|
|
11069
|
+
r: 6,
|
|
11070
|
+
fill: color
|
|
11076
11071
|
}
|
|
11077
11072
|
),
|
|
11078
11073
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11079
11074
|
"text",
|
|
11080
11075
|
{
|
|
11081
|
-
x,
|
|
11082
|
-
y:
|
|
11083
|
-
|
|
11084
|
-
|
|
11085
|
-
|
|
11086
|
-
children: dataDateLabel
|
|
11076
|
+
x: additionalLeftSpace + x + 8,
|
|
11077
|
+
y: 10,
|
|
11078
|
+
fill: color,
|
|
11079
|
+
fontSize: 12,
|
|
11080
|
+
fontWeight: 600,
|
|
11081
|
+
children: dataDateLabel || "Data Date"
|
|
11087
11082
|
}
|
|
11088
11083
|
)
|
|
11089
|
-
] }
|
|
11084
|
+
] });
|
|
11090
11085
|
}, [
|
|
11091
|
-
isUnknownDates,
|
|
11092
|
-
showDataDateLine,
|
|
11093
|
-
dataDate,
|
|
11094
|
-
dataDateX,
|
|
11095
|
-
startDate,
|
|
11096
|
-
viewMode,
|
|
11097
11086
|
additionalLeftSpace,
|
|
11098
11087
|
columnWidth,
|
|
11099
11088
|
ganttFullHeight,
|
|
11089
|
+
rtl,
|
|
11090
|
+
startDate,
|
|
11091
|
+
viewMode,
|
|
11092
|
+
showDataDateLine,
|
|
11093
|
+
dataDate,
|
|
11100
11094
|
dataDateColor,
|
|
11101
11095
|
dataDateLabel
|
|
11102
11096
|
]);
|
|
11103
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
11104
|
-
|
|
11105
|
-
|
|
11097
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("g", { className: "today", children: [
|
|
11098
|
+
dataDateElement,
|
|
11099
|
+
todayElement
|
|
11106
11100
|
] });
|
|
11107
11101
|
};
|
|
11108
11102
|
const GanttToday = React.memo(GanttTodayInner);
|
|
@@ -12006,9 +12000,9 @@
|
|
|
12006
12000
|
const BarDisplay = ({
|
|
12007
12001
|
taskId,
|
|
12008
12002
|
barCornerRadius,
|
|
12009
|
-
|
|
12010
|
-
|
|
12011
|
-
|
|
12003
|
+
isCritical,
|
|
12004
|
+
isSelected,
|
|
12005
|
+
hasChildren,
|
|
12012
12006
|
height,
|
|
12013
12007
|
progressWidth,
|
|
12014
12008
|
progressX,
|
|
@@ -12017,11 +12011,60 @@
|
|
|
12017
12011
|
x,
|
|
12018
12012
|
y,
|
|
12019
12013
|
customStyle,
|
|
12020
|
-
|
|
12021
|
-
|
|
12022
|
-
showProgressBar = true,
|
|
12023
|
-
progressBarColor
|
|
12014
|
+
showProgress = true,
|
|
12015
|
+
progressColor
|
|
12024
12016
|
}) => {
|
|
12017
|
+
const processColor = React.useMemo(() => {
|
|
12018
|
+
if (progressColor) {
|
|
12019
|
+
return progressColor;
|
|
12020
|
+
}
|
|
12021
|
+
if (isCritical) {
|
|
12022
|
+
if (hasChildren) {
|
|
12023
|
+
if (isSelected) {
|
|
12024
|
+
return "var(--gantt-group-progress-selected-critical-color)";
|
|
12025
|
+
}
|
|
12026
|
+
return "var(--gantt-group-progress-critical-color)";
|
|
12027
|
+
}
|
|
12028
|
+
if (isSelected) {
|
|
12029
|
+
return "var(--gantt-bar-progress-selected-critical-color)";
|
|
12030
|
+
}
|
|
12031
|
+
return "var(--gantt-bar-progress-critical-color)";
|
|
12032
|
+
}
|
|
12033
|
+
if (hasChildren) {
|
|
12034
|
+
if (isSelected) {
|
|
12035
|
+
return "var(--gantt-group-progress-selected-color)";
|
|
12036
|
+
}
|
|
12037
|
+
return "var(--gantt-group-progress-color)";
|
|
12038
|
+
}
|
|
12039
|
+
if (isSelected) {
|
|
12040
|
+
return "var(--gantt-bar-progress-selected-color)";
|
|
12041
|
+
}
|
|
12042
|
+
return "var(--gantt-bar-progress-color)";
|
|
12043
|
+
}, [isSelected, isCritical, hasChildren, progressColor]);
|
|
12044
|
+
const barColor = React.useMemo(() => {
|
|
12045
|
+
if (isCritical) {
|
|
12046
|
+
if (hasChildren) {
|
|
12047
|
+
if (isSelected) {
|
|
12048
|
+
return "var(--gantt-group-background-selected-critical-color)";
|
|
12049
|
+
}
|
|
12050
|
+
return "var(--gantt-group-background-critical-color)";
|
|
12051
|
+
}
|
|
12052
|
+
if (isSelected) {
|
|
12053
|
+
return "var(--gantt-bar-background-selected-critical-color)";
|
|
12054
|
+
}
|
|
12055
|
+
return "var(--gantt-bar-background-critical-color)";
|
|
12056
|
+
}
|
|
12057
|
+
if (hasChildren) {
|
|
12058
|
+
if (isSelected) {
|
|
12059
|
+
return "var(--gantt-group-background-selected-color)";
|
|
12060
|
+
}
|
|
12061
|
+
return "var(--gantt-group-background-color)";
|
|
12062
|
+
}
|
|
12063
|
+
if (isSelected) {
|
|
12064
|
+
return "var(--gantt-bar-background-selected-color)";
|
|
12065
|
+
}
|
|
12066
|
+
return "var(--gantt-bar-background-color)";
|
|
12067
|
+
}, [isSelected, isCritical, hasChildren]);
|
|
12025
12068
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
12026
12069
|
"g",
|
|
12027
12070
|
{
|
|
@@ -12039,40 +12082,7 @@
|
|
|
12039
12082
|
}
|
|
12040
12083
|
},
|
|
12041
12084
|
children: [
|
|
12042
|
-
|
|
12043
|
-
var _a, _b;
|
|
12044
|
-
const localSplit = Math.max(0, Math.min(width, dataDateX - x));
|
|
12045
|
-
const leftFill = ((_a = splitbarColors == null ? void 0 : splitbarColors.task) == null ? void 0 : _a.onTime) || "var(--gantt-bar-background-color)";
|
|
12046
|
-
const rightFill = ((_b = splitbarColors == null ? void 0 : splitbarColors.task) == null ? void 0 : _b.delayed) || "var(--gantt-bar-background-color)";
|
|
12047
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
12048
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12049
|
-
"rect",
|
|
12050
|
-
{
|
|
12051
|
-
x,
|
|
12052
|
-
width: localSplit,
|
|
12053
|
-
y,
|
|
12054
|
-
height,
|
|
12055
|
-
ry: barCornerRadius,
|
|
12056
|
-
rx: barCornerRadius,
|
|
12057
|
-
fill: leftFill,
|
|
12058
|
-
className: styles$8.barBackground
|
|
12059
|
-
}
|
|
12060
|
-
),
|
|
12061
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12062
|
-
"rect",
|
|
12063
|
-
{
|
|
12064
|
-
x: x + localSplit,
|
|
12065
|
-
width: Math.max(0, width - localSplit),
|
|
12066
|
-
y,
|
|
12067
|
-
height,
|
|
12068
|
-
ry: barCornerRadius,
|
|
12069
|
-
rx: barCornerRadius,
|
|
12070
|
-
fill: rightFill,
|
|
12071
|
-
className: styles$8.barBackground
|
|
12072
|
-
}
|
|
12073
|
-
)
|
|
12074
|
-
] });
|
|
12075
|
-
})() : /* @__PURE__ */ jsxRuntime.jsx(
|
|
12085
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12076
12086
|
"rect",
|
|
12077
12087
|
{
|
|
12078
12088
|
x,
|
|
@@ -12081,11 +12091,11 @@
|
|
|
12081
12091
|
height,
|
|
12082
12092
|
ry: barCornerRadius,
|
|
12083
12093
|
rx: barCornerRadius,
|
|
12084
|
-
fill:
|
|
12094
|
+
fill: barColor,
|
|
12085
12095
|
className: styles$8.barBackground
|
|
12086
12096
|
}
|
|
12087
12097
|
),
|
|
12088
|
-
|
|
12098
|
+
showProgress && /* @__PURE__ */ jsxRuntime.jsx(
|
|
12089
12099
|
"rect",
|
|
12090
12100
|
{
|
|
12091
12101
|
x: progressX,
|
|
@@ -12094,7 +12104,7 @@
|
|
|
12094
12104
|
height,
|
|
12095
12105
|
ry: barCornerRadius,
|
|
12096
12106
|
rx: barCornerRadius,
|
|
12097
|
-
fill:
|
|
12107
|
+
fill: processColor
|
|
12098
12108
|
}
|
|
12099
12109
|
)
|
|
12100
12110
|
]
|
|
@@ -12149,8 +12159,8 @@
|
|
|
12149
12159
|
taskName: taskName2,
|
|
12150
12160
|
taskHalfHeight,
|
|
12151
12161
|
taskHeight,
|
|
12152
|
-
|
|
12153
|
-
|
|
12162
|
+
isSelected,
|
|
12163
|
+
isCritical,
|
|
12154
12164
|
progressWidth,
|
|
12155
12165
|
progressX,
|
|
12156
12166
|
taskYOffset,
|
|
@@ -12159,11 +12169,36 @@
|
|
|
12159
12169
|
x2,
|
|
12160
12170
|
startMoveFullTask,
|
|
12161
12171
|
customStyle,
|
|
12162
|
-
|
|
12163
|
-
|
|
12164
|
-
showProgressBar = true,
|
|
12165
|
-
progressBarColor
|
|
12172
|
+
showProgress = true,
|
|
12173
|
+
progressColor
|
|
12166
12174
|
}) => {
|
|
12175
|
+
const barColor = React.useMemo(() => {
|
|
12176
|
+
if (isCritical) {
|
|
12177
|
+
if (isSelected) {
|
|
12178
|
+
return "var(--gantt-project-background-selected-critical-color)";
|
|
12179
|
+
}
|
|
12180
|
+
return "var(--gantt-project-background-critical-color)";
|
|
12181
|
+
}
|
|
12182
|
+
if (isSelected) {
|
|
12183
|
+
return "var(--gantt-project-background-selected-color)";
|
|
12184
|
+
}
|
|
12185
|
+
return "var(--gantt-project-background-color)";
|
|
12186
|
+
}, [isSelected, isCritical]);
|
|
12187
|
+
const processColor = React.useMemo(() => {
|
|
12188
|
+
if (progressColor) {
|
|
12189
|
+
return progressColor;
|
|
12190
|
+
}
|
|
12191
|
+
if (isCritical) {
|
|
12192
|
+
if (isSelected) {
|
|
12193
|
+
return "var(--gantt-project-progress-selected-critical-color)";
|
|
12194
|
+
}
|
|
12195
|
+
return "var(--gantt-project-progress-critical-color)";
|
|
12196
|
+
}
|
|
12197
|
+
if (isSelected) {
|
|
12198
|
+
return "var(--gantt-project-progress-selected-color)";
|
|
12199
|
+
}
|
|
12200
|
+
return "var(--gantt-project-progress-color)";
|
|
12201
|
+
}, [isSelected, isCritical, progressColor]);
|
|
12167
12202
|
const projectLeftTriangle = [
|
|
12168
12203
|
x1,
|
|
12169
12204
|
taskYOffset + taskHeight / 2 - 1,
|
|
@@ -12197,53 +12232,20 @@
|
|
|
12197
12232
|
},
|
|
12198
12233
|
className: styles$7.projectWrapper,
|
|
12199
12234
|
children: [
|
|
12200
|
-
|
|
12201
|
-
var _a, _b;
|
|
12202
|
-
const localSplit = Math.max(0, Math.min(width, dataDateX - x1));
|
|
12203
|
-
const leftFill = ((_a = splitbarColors == null ? void 0 : splitbarColors.project) == null ? void 0 : _a.onTime) || "var(--gantt-project-background-color)";
|
|
12204
|
-
const rightFill = ((_b = splitbarColors == null ? void 0 : splitbarColors.project) == null ? void 0 : _b.delayed) || "var(--gantt-project-background-color)";
|
|
12205
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
12206
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12207
|
-
"rect",
|
|
12208
|
-
{
|
|
12209
|
-
x: x1,
|
|
12210
|
-
width: localSplit,
|
|
12211
|
-
y: taskYOffset,
|
|
12212
|
-
height: taskHeight,
|
|
12213
|
-
rx: barCornerRadius,
|
|
12214
|
-
ry: barCornerRadius,
|
|
12215
|
-
className: styles$7.projectBackground,
|
|
12216
|
-
fill: leftFill
|
|
12217
|
-
}
|
|
12218
|
-
),
|
|
12219
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12220
|
-
"rect",
|
|
12221
|
-
{
|
|
12222
|
-
x: x1 + localSplit,
|
|
12223
|
-
width: Math.max(0, width - localSplit),
|
|
12224
|
-
y: taskYOffset,
|
|
12225
|
-
height: taskHeight,
|
|
12226
|
-
rx: barCornerRadius,
|
|
12227
|
-
ry: barCornerRadius,
|
|
12228
|
-
className: styles$7.projectBackground,
|
|
12229
|
-
fill: rightFill
|
|
12230
|
-
}
|
|
12231
|
-
)
|
|
12232
|
-
] });
|
|
12233
|
-
})() : /* @__PURE__ */ jsxRuntime.jsx(
|
|
12235
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12234
12236
|
"rect",
|
|
12235
12237
|
{
|
|
12238
|
+
fill: barColor,
|
|
12236
12239
|
x: x1,
|
|
12237
12240
|
width,
|
|
12238
12241
|
y: taskYOffset,
|
|
12239
12242
|
height: taskHeight,
|
|
12240
12243
|
rx: barCornerRadius,
|
|
12241
12244
|
ry: barCornerRadius,
|
|
12242
|
-
className: styles$7.projectBackground
|
|
12243
|
-
fill: "unset"
|
|
12245
|
+
className: styles$7.projectBackground
|
|
12244
12246
|
}
|
|
12245
12247
|
),
|
|
12246
|
-
|
|
12248
|
+
showProgress && /* @__PURE__ */ jsxRuntime.jsx(
|
|
12247
12249
|
"rect",
|
|
12248
12250
|
{
|
|
12249
12251
|
x: progressX,
|
|
@@ -12252,13 +12254,13 @@
|
|
|
12252
12254
|
height: taskHeight,
|
|
12253
12255
|
ry: barCornerRadius,
|
|
12254
12256
|
rx: barCornerRadius,
|
|
12255
|
-
fill:
|
|
12257
|
+
fill: processColor
|
|
12256
12258
|
}
|
|
12257
12259
|
),
|
|
12258
12260
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12259
12261
|
"rect",
|
|
12260
12262
|
{
|
|
12261
|
-
fill:
|
|
12263
|
+
fill: barColor,
|
|
12262
12264
|
x: x1,
|
|
12263
12265
|
width,
|
|
12264
12266
|
y: taskYOffset,
|
|
@@ -12273,7 +12275,7 @@
|
|
|
12273
12275
|
{
|
|
12274
12276
|
className: styles$7.projectTop,
|
|
12275
12277
|
points: projectLeftTriangle,
|
|
12276
|
-
fill:
|
|
12278
|
+
fill: barColor
|
|
12277
12279
|
}
|
|
12278
12280
|
),
|
|
12279
12281
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -12281,7 +12283,7 @@
|
|
|
12281
12283
|
{
|
|
12282
12284
|
className: styles$7.projectTop,
|
|
12283
12285
|
points: projectRightTriangle,
|
|
12284
|
-
fill:
|
|
12286
|
+
fill: barColor
|
|
12285
12287
|
}
|
|
12286
12288
|
)
|
|
12287
12289
|
]
|
|
@@ -12352,10 +12354,8 @@
|
|
|
12352
12354
|
x2,
|
|
12353
12355
|
movingAction,
|
|
12354
12356
|
ganttRelationEvent,
|
|
12355
|
-
|
|
12356
|
-
|
|
12357
|
-
showProgressBar,
|
|
12358
|
-
progressBarColor
|
|
12357
|
+
showProgress = true,
|
|
12358
|
+
progressColor
|
|
12359
12359
|
} = props;
|
|
12360
12360
|
React.useMemo(() => width < 30, [width]);
|
|
12361
12361
|
const handleHeight = React.useMemo(() => taskHeight - 2, [taskHeight]);
|
|
@@ -12417,10 +12417,8 @@
|
|
|
12417
12417
|
isCritical,
|
|
12418
12418
|
hasChildren,
|
|
12419
12419
|
startMoveFullTask,
|
|
12420
|
-
|
|
12421
|
-
|
|
12422
|
-
showProgressBar,
|
|
12423
|
-
progressBarColor
|
|
12420
|
+
showProgress,
|
|
12421
|
+
progressColor
|
|
12424
12422
|
}
|
|
12425
12423
|
);
|
|
12426
12424
|
} else {
|
|
@@ -12440,10 +12438,8 @@
|
|
|
12440
12438
|
isCritical,
|
|
12441
12439
|
hasChildren,
|
|
12442
12440
|
startMoveFullTask,
|
|
12443
|
-
|
|
12444
|
-
|
|
12445
|
-
showProgressBar,
|
|
12446
|
-
progressBarColor
|
|
12441
|
+
showProgress,
|
|
12442
|
+
progressColor
|
|
12447
12443
|
}
|
|
12448
12444
|
);
|
|
12449
12445
|
}
|
|
@@ -13002,10 +12998,8 @@
|
|
|
13002
12998
|
taskBarMovingAction,
|
|
13003
12999
|
waitCommitTasks,
|
|
13004
13000
|
viewMode,
|
|
13005
|
-
|
|
13006
|
-
|
|
13007
|
-
showProgressBar,
|
|
13008
|
-
progressBarColor
|
|
13001
|
+
showProgress = true,
|
|
13002
|
+
progressColor
|
|
13009
13003
|
} = props;
|
|
13010
13004
|
const renderedHolidays = React.useMemo(() => {
|
|
13011
13005
|
const { columnWidth } = distances;
|
|
@@ -13092,11 +13086,6 @@
|
|
|
13092
13086
|
x2: taskX2,
|
|
13093
13087
|
comparisonDates
|
|
13094
13088
|
} = getTaskCoordinates2(task);
|
|
13095
|
-
const containerXAbs = Math.max(
|
|
13096
|
-
containerX + (additionalLeftSpace || 0),
|
|
13097
|
-
0
|
|
13098
|
-
);
|
|
13099
|
-
const dataDateXLocal = typeof dataDateX === "number" ? dataDateX - containerXAbs : void 0;
|
|
13100
13089
|
tasksRes.push(
|
|
13101
13090
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13102
13091
|
"svg",
|
|
@@ -13141,10 +13130,8 @@
|
|
|
13141
13130
|
onDeleteTask,
|
|
13142
13131
|
renderCustomLabel,
|
|
13143
13132
|
viewMode,
|
|
13144
|
-
|
|
13145
|
-
|
|
13146
|
-
showProgressBar,
|
|
13147
|
-
progressBarColor
|
|
13133
|
+
showProgress,
|
|
13134
|
+
progressColor
|
|
13148
13135
|
}
|
|
13149
13136
|
)
|
|
13150
13137
|
},
|
|
@@ -13354,10 +13341,6 @@
|
|
|
13354
13341
|
isDateChangeable,
|
|
13355
13342
|
isRelationChangeable,
|
|
13356
13343
|
visibleTasksMirror,
|
|
13357
|
-
dataDateX,
|
|
13358
|
-
splitbarColors,
|
|
13359
|
-
showProgressBar,
|
|
13360
|
-
progressBarColor,
|
|
13361
13344
|
onArrowDoubleClick
|
|
13362
13345
|
]);
|
|
13363
13346
|
return /* @__PURE__ */ jsxRuntime.jsxs("g", { className: "content", children: [
|
|
@@ -18803,9 +18786,8 @@
|
|
|
18803
18786
|
dataDateColor,
|
|
18804
18787
|
todayLabel = "Today",
|
|
18805
18788
|
dataDateLabel = "Data Date",
|
|
18806
|
-
|
|
18807
|
-
|
|
18808
|
-
progressBarColor
|
|
18789
|
+
showProgress = true,
|
|
18790
|
+
progressColor
|
|
18809
18791
|
} = props;
|
|
18810
18792
|
const ganttSVGRef = React.useRef(null);
|
|
18811
18793
|
const wrapperRef = React.useRef(null);
|
|
@@ -19934,29 +19916,6 @@
|
|
|
19934
19916
|
() => svgWidth + additionalLeftSpace + additionalRightSpace,
|
|
19935
19917
|
[additionalLeftSpace, additionalRightSpace, svgWidth]
|
|
19936
19918
|
);
|
|
19937
|
-
const dataDateX = React.useMemo(() => {
|
|
19938
|
-
if (!dataDate)
|
|
19939
|
-
return void 0;
|
|
19940
|
-
try {
|
|
19941
|
-
const roundedDataDate = roundStartDate(dataDate);
|
|
19942
|
-
const x = taskXCoordinate(
|
|
19943
|
-
roundedDataDate,
|
|
19944
|
-
startDate,
|
|
19945
|
-
viewMode,
|
|
19946
|
-
distances.columnWidth
|
|
19947
|
-
);
|
|
19948
|
-
return additionalLeftSpace + x;
|
|
19949
|
-
} catch {
|
|
19950
|
-
return void 0;
|
|
19951
|
-
}
|
|
19952
|
-
}, [
|
|
19953
|
-
dataDate,
|
|
19954
|
-
startDate,
|
|
19955
|
-
viewMode,
|
|
19956
|
-
distances,
|
|
19957
|
-
additionalLeftSpace,
|
|
19958
|
-
roundStartDate
|
|
19959
|
-
]);
|
|
19960
19919
|
const gridProps = React.useMemo(
|
|
19961
19920
|
() => ({
|
|
19962
19921
|
additionalLeftSpace,
|
|
@@ -19969,7 +19928,6 @@
|
|
|
19969
19928
|
showTodayLine,
|
|
19970
19929
|
showDataDateLine,
|
|
19971
19930
|
dataDate,
|
|
19972
|
-
dataDateX,
|
|
19973
19931
|
todayColor,
|
|
19974
19932
|
dataDateColor,
|
|
19975
19933
|
todayLabel,
|
|
@@ -19986,7 +19944,6 @@
|
|
|
19986
19944
|
showTodayLine,
|
|
19987
19945
|
showDataDateLine,
|
|
19988
19946
|
dataDate,
|
|
19989
|
-
dataDateX,
|
|
19990
19947
|
todayColor,
|
|
19991
19948
|
dataDateColor,
|
|
19992
19949
|
todayLabel,
|
|
@@ -20026,11 +19983,6 @@
|
|
|
20026
19983
|
const renderTaskBarProps = React.useMemo(
|
|
20027
19984
|
() => ({
|
|
20028
19985
|
...taskBar,
|
|
20029
|
-
splitbarColors,
|
|
20030
|
-
dataDate,
|
|
20031
|
-
dataDateX,
|
|
20032
|
-
showProgressBar,
|
|
20033
|
-
progressBarColor,
|
|
20034
19986
|
taskBarMovingAction: (task) => {
|
|
20035
19987
|
var _a2;
|
|
20036
19988
|
return task.id === ((_a2 = changeInProgress == null ? void 0 : changeInProgress.changedTask) == null ? void 0 : _a2.id) ? changeInProgress.action : null;
|
|
@@ -20066,16 +20018,13 @@
|
|
|
20066
20018
|
taskHeight,
|
|
20067
20019
|
taskYOffset,
|
|
20068
20020
|
visibleTasksMirror,
|
|
20069
|
-
viewMode
|
|
20021
|
+
viewMode,
|
|
20022
|
+
showProgress,
|
|
20023
|
+
progressColor
|
|
20070
20024
|
}),
|
|
20071
20025
|
[
|
|
20072
20026
|
viewMode,
|
|
20073
20027
|
taskBar,
|
|
20074
|
-
splitbarColors,
|
|
20075
|
-
dataDate,
|
|
20076
|
-
dataDateX,
|
|
20077
|
-
showProgressBar,
|
|
20078
|
-
progressBarColor,
|
|
20079
20028
|
authorizedRelations,
|
|
20080
20029
|
additionalLeftSpace,
|
|
20081
20030
|
additionalRightSpace,
|
|
@@ -20108,7 +20057,9 @@
|
|
|
20108
20057
|
visibleTasksMirror,
|
|
20109
20058
|
(_b = changeInProgress == null ? void 0 : changeInProgress.changedTask) == null ? void 0 : _b.id,
|
|
20110
20059
|
changeInProgress == null ? void 0 : changeInProgress.action,
|
|
20111
|
-
handleDeleteTasks
|
|
20060
|
+
handleDeleteTasks,
|
|
20061
|
+
showProgress,
|
|
20062
|
+
progressColor
|
|
20112
20063
|
]
|
|
20113
20064
|
);
|
|
20114
20065
|
const renderTaskListProps = React.useMemo(
|