@thepocman/gantt-task-react 1.0.37 → 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.
@@ -14,6 +14,7 @@ type BarDisplayProps = {
14
14
  width: number;
15
15
  x: number;
16
16
  y: number;
17
+ imageUrl: string;
17
18
  };
18
19
  export declare const BarDisplay: React.FC<BarDisplayProps>;
19
20
  export {};
@@ -5680,7 +5680,8 @@ const BarDisplay = ({
5680
5680
  styles: styles2,
5681
5681
  width,
5682
5682
  x: x3,
5683
- y: y3
5683
+ y: y3,
5684
+ imageUrl
5684
5685
  }) => {
5685
5686
  const processColor = useMemo(() => {
5686
5687
  if (isCritical) {
@@ -5768,6 +5769,17 @@ const BarDisplay = ({
5768
5769
  rx: barCornerRadius,
5769
5770
  fill: processColor
5770
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
+ }
5771
5783
  )
5772
5784
  ]
5773
5785
  }
@@ -6051,6 +6063,7 @@ const Bar = ({
6051
6063
  barDisplay = /* @__PURE__ */ jsx(
6052
6064
  BarDisplay,
6053
6065
  {
6066
+ imageUrl: task.imageUrl,
6054
6067
  taskName: task.name,
6055
6068
  x: x1,
6056
6069
  y: taskYOffset,
@@ -6170,6 +6183,7 @@ const BarSmall = ({
6170
6183
  /* @__PURE__ */ jsx(
6171
6184
  BarDisplay,
6172
6185
  {
6186
+ imageUrl: task.imageUrl,
6173
6187
  taskName: task.name,
6174
6188
  barCornerRadius,
6175
6189
  hasChildren,
@@ -11890,7 +11904,7 @@ const Gantt = ({
11890
11904
  );
11891
11905
  const [visibleTasks, visibleTasksMirror] = useMemo(
11892
11906
  () => collectVisibleTasks(childTasksMap, rootTasksMap),
11893
- [childTasksMap, rootTasksMap]
11907
+ [childTasksMap, rootTasksMap, enableTaskGrouping]
11894
11908
  );
11895
11909
  const tasksMap = useMemo(() => getTasksMap(tasks), [tasks]);
11896
11910
  const checkTaskIdExists = useCallback(
@@ -5693,7 +5693,8 @@
5693
5693
  styles: styles2,
5694
5694
  width,
5695
5695
  x: x2,
5696
- y
5696
+ y,
5697
+ imageUrl
5697
5698
  }) => {
5698
5699
  const processColor = React.useMemo(() => {
5699
5700
  if (isCritical) {
@@ -5781,6 +5782,17 @@
5781
5782
  rx: barCornerRadius,
5782
5783
  fill: processColor
5783
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
+ }
5784
5796
  )
5785
5797
  ]
5786
5798
  }
@@ -6064,6 +6076,7 @@
6064
6076
  barDisplay = /* @__PURE__ */ jsxRuntime.jsx(
6065
6077
  BarDisplay,
6066
6078
  {
6079
+ imageUrl: task.imageUrl,
6067
6080
  taskName: task.name,
6068
6081
  x: x1,
6069
6082
  y: taskYOffset,
@@ -6183,6 +6196,7 @@
6183
6196
  /* @__PURE__ */ jsxRuntime.jsx(
6184
6197
  BarDisplay,
6185
6198
  {
6199
+ imageUrl: task.imageUrl,
6186
6200
  taskName: task.name,
6187
6201
  barCornerRadius,
6188
6202
  hasChildren,
@@ -11903,7 +11917,7 @@
11903
11917
  );
11904
11918
  const [visibleTasks, visibleTasksMirror] = React.useMemo(
11905
11919
  () => collectVisibleTasks(childTasksMap, rootTasksMap),
11906
- [childTasksMap, rootTasksMap]
11920
+ [childTasksMap, rootTasksMap, enableTaskGrouping]
11907
11921
  );
11908
11922
  const tasksMap = React.useMemo(() => getTasksMap(tasks), [tasks]);
11909
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.37",
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",