@thepocman/gantt-task-react 1.0.36 → 1.0.38
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.
|
@@ -4579,7 +4579,6 @@ const Calendar = ({
|
|
|
4579
4579
|
);
|
|
4580
4580
|
if (!isUnknownDates && (i2 === startColumnIndex || date.getFullYear() !== getDate(i2 - 1).getFullYear())) {
|
|
4581
4581
|
const year = date.getFullYear();
|
|
4582
|
-
console.log("Fulll year :>> ", year);
|
|
4583
4582
|
const topValue = year.toString();
|
|
4584
4583
|
const startHalfYearIndex = i2 - date.getMonth();
|
|
4585
4584
|
const centerX = additionalLeftSpace + columnWidth * i2 + columnWidth;
|
|
@@ -5681,7 +5680,8 @@ const BarDisplay = ({
|
|
|
5681
5680
|
styles: styles2,
|
|
5682
5681
|
width,
|
|
5683
5682
|
x: x3,
|
|
5684
|
-
y: y3
|
|
5683
|
+
y: y3,
|
|
5684
|
+
imageUrl
|
|
5685
5685
|
}) => {
|
|
5686
5686
|
const processColor = useMemo(() => {
|
|
5687
5687
|
if (isCritical) {
|
|
@@ -5769,6 +5769,17 @@ const BarDisplay = ({
|
|
|
5769
5769
|
rx: barCornerRadius,
|
|
5770
5770
|
fill: processColor
|
|
5771
5771
|
}
|
|
5772
|
+
),
|
|
5773
|
+
imageUrl && /* @__PURE__ */ jsx(
|
|
5774
|
+
"image",
|
|
5775
|
+
{
|
|
5776
|
+
style: { width: 300, position: "relative" },
|
|
5777
|
+
href: imageUrl,
|
|
5778
|
+
x: x3 + 5,
|
|
5779
|
+
y: y3 + 2,
|
|
5780
|
+
width,
|
|
5781
|
+
height
|
|
5782
|
+
}
|
|
5772
5783
|
)
|
|
5773
5784
|
]
|
|
5774
5785
|
}
|
|
@@ -6052,6 +6063,7 @@ const Bar = ({
|
|
|
6052
6063
|
barDisplay = /* @__PURE__ */ jsx(
|
|
6053
6064
|
BarDisplay,
|
|
6054
6065
|
{
|
|
6066
|
+
imageUrl: task.imageUrl,
|
|
6055
6067
|
taskName: task.name,
|
|
6056
6068
|
x: x1,
|
|
6057
6069
|
y: taskYOffset,
|
|
@@ -6171,6 +6183,7 @@ const BarSmall = ({
|
|
|
6171
6183
|
/* @__PURE__ */ jsx(
|
|
6172
6184
|
BarDisplay,
|
|
6173
6185
|
{
|
|
6186
|
+
imageUrl: task.imageUrl,
|
|
6174
6187
|
taskName: task.name,
|
|
6175
6188
|
barCornerRadius,
|
|
6176
6189
|
hasChildren,
|
|
@@ -6731,7 +6744,6 @@ const TaskGanttContent = ({
|
|
|
6731
6744
|
const comparisonLevel = task.comparisonLevel ?? 1;
|
|
6732
6745
|
const { id: taskId } = task;
|
|
6733
6746
|
const isInCollapsedGroup = enableTaskGrouping && task.parent && tasksAtRow.length > 1;
|
|
6734
|
-
console.log("isInCollapsedGroup :>> ", isInCollapsedGroup);
|
|
6735
6747
|
if (selectedIdsMirror[taskId] && !addedSelectedTasks[taskId]) {
|
|
6736
6748
|
addedSelectedTasks[taskId] = true;
|
|
6737
6749
|
const rowIndex = (_a = taskToRowIndexMap.get(comparisonLevel)) == null ? void 0 : _a.get(taskId);
|
|
@@ -11892,7 +11904,7 @@ const Gantt = ({
|
|
|
11892
11904
|
);
|
|
11893
11905
|
const [visibleTasks, visibleTasksMirror] = useMemo(
|
|
11894
11906
|
() => collectVisibleTasks(childTasksMap, rootTasksMap),
|
|
11895
|
-
[childTasksMap, rootTasksMap]
|
|
11907
|
+
[childTasksMap, rootTasksMap, enableTaskGrouping]
|
|
11896
11908
|
);
|
|
11897
11909
|
const tasksMap = useMemo(() => getTasksMap(tasks), [tasks]);
|
|
11898
11910
|
const checkTaskIdExists = useCallback(
|
|
@@ -4592,7 +4592,6 @@
|
|
|
4592
4592
|
);
|
|
4593
4593
|
if (!isUnknownDates && (i === startColumnIndex || date.getFullYear() !== getDate(i - 1).getFullYear())) {
|
|
4594
4594
|
const year = date.getFullYear();
|
|
4595
|
-
console.log("Fulll year :>> ", year);
|
|
4596
4595
|
const topValue = year.toString();
|
|
4597
4596
|
const startHalfYearIndex = i - date.getMonth();
|
|
4598
4597
|
const centerX = additionalLeftSpace + columnWidth * i + columnWidth;
|
|
@@ -5694,7 +5693,8 @@
|
|
|
5694
5693
|
styles: styles2,
|
|
5695
5694
|
width,
|
|
5696
5695
|
x: x2,
|
|
5697
|
-
y
|
|
5696
|
+
y,
|
|
5697
|
+
imageUrl
|
|
5698
5698
|
}) => {
|
|
5699
5699
|
const processColor = React.useMemo(() => {
|
|
5700
5700
|
if (isCritical) {
|
|
@@ -5782,6 +5782,17 @@
|
|
|
5782
5782
|
rx: barCornerRadius,
|
|
5783
5783
|
fill: processColor
|
|
5784
5784
|
}
|
|
5785
|
+
),
|
|
5786
|
+
imageUrl && /* @__PURE__ */ jsxRuntime.jsx(
|
|
5787
|
+
"image",
|
|
5788
|
+
{
|
|
5789
|
+
style: { width: 300, position: "relative" },
|
|
5790
|
+
href: imageUrl,
|
|
5791
|
+
x: x2 + 5,
|
|
5792
|
+
y: y + 2,
|
|
5793
|
+
width,
|
|
5794
|
+
height
|
|
5795
|
+
}
|
|
5785
5796
|
)
|
|
5786
5797
|
]
|
|
5787
5798
|
}
|
|
@@ -6065,6 +6076,7 @@
|
|
|
6065
6076
|
barDisplay = /* @__PURE__ */ jsxRuntime.jsx(
|
|
6066
6077
|
BarDisplay,
|
|
6067
6078
|
{
|
|
6079
|
+
imageUrl: task.imageUrl,
|
|
6068
6080
|
taskName: task.name,
|
|
6069
6081
|
x: x1,
|
|
6070
6082
|
y: taskYOffset,
|
|
@@ -6184,6 +6196,7 @@
|
|
|
6184
6196
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6185
6197
|
BarDisplay,
|
|
6186
6198
|
{
|
|
6199
|
+
imageUrl: task.imageUrl,
|
|
6187
6200
|
taskName: task.name,
|
|
6188
6201
|
barCornerRadius,
|
|
6189
6202
|
hasChildren,
|
|
@@ -6744,7 +6757,6 @@
|
|
|
6744
6757
|
const comparisonLevel = task.comparisonLevel ?? 1;
|
|
6745
6758
|
const { id: taskId } = task;
|
|
6746
6759
|
const isInCollapsedGroup = enableTaskGrouping && task.parent && tasksAtRow.length > 1;
|
|
6747
|
-
console.log("isInCollapsedGroup :>> ", isInCollapsedGroup);
|
|
6748
6760
|
if (selectedIdsMirror[taskId] && !addedSelectedTasks[taskId]) {
|
|
6749
6761
|
addedSelectedTasks[taskId] = true;
|
|
6750
6762
|
const rowIndex = (_a = taskToRowIndexMap.get(comparisonLevel)) == null ? void 0 : _a.get(taskId);
|
|
@@ -11905,7 +11917,7 @@
|
|
|
11905
11917
|
);
|
|
11906
11918
|
const [visibleTasks, visibleTasksMirror] = React.useMemo(
|
|
11907
11919
|
() => collectVisibleTasks(childTasksMap, rootTasksMap),
|
|
11908
|
-
[childTasksMap, rootTasksMap]
|
|
11920
|
+
[childTasksMap, rootTasksMap, enableTaskGrouping]
|
|
11909
11921
|
);
|
|
11910
11922
|
const tasksMap = React.useMemo(() => getTasksMap(tasks), [tasks]);
|
|
11911
11923
|
const checkTaskIdExists = React.useCallback(
|
|
@@ -164,6 +164,7 @@ export interface Task {
|
|
|
164
164
|
status?: string;
|
|
165
165
|
phase?: string;
|
|
166
166
|
taskOwner?: string;
|
|
167
|
+
imageUrl?: string;
|
|
167
168
|
}
|
|
168
169
|
export interface EmptyTask {
|
|
169
170
|
id: string;
|
|
@@ -175,6 +176,7 @@ export interface EmptyTask {
|
|
|
175
176
|
status?: string;
|
|
176
177
|
phase?: string;
|
|
177
178
|
taskOwner?: string;
|
|
179
|
+
imageUrl?: string;
|
|
178
180
|
displayOrder?: number;
|
|
179
181
|
isDisabled?: boolean;
|
|
180
182
|
styles?: Partial<ColorStyles>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thepocman/gantt-task-react",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.38",
|
|
4
4
|
"description": "Fork of gantt-task-react with support for grouped tasks on a single row when collapsed",
|
|
5
5
|
"author": "Adrian Bueno <adrianlbueno@users.noreply.github.com>",
|
|
6
6
|
"homepage": "https://github.com/adrianlbueno/gantt-task-react#readme",
|