gantt-task-react-v 1.6.10 → 1.6.12

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>;
@@ -5175,8 +5175,8 @@ const DEFAULT_THEME = {
5175
5175
  projectProgressSelectedColor: "#0097A7",
5176
5176
  projectProgressCriticalColor: "#00838F",
5177
5177
  projectProgressSelectedCriticalColor: "#006064",
5178
- projectBackgroundColor: "#FFA726",
5179
- projectBackgroundSelectedColor: "#F57C00",
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]);
@@ -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" || 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 : ""}`,
@@ -13299,12 +13300,13 @@ const TaskItemInner = (props) => {
13299
13300
  {
13300
13301
  x1,
13301
13302
  width,
13302
- taskHeight,
13303
+ taskHeight: task.type === "project" ? taskHalfHeight : taskHeight,
13303
13304
  arrowIndent,
13304
13305
  rtl,
13305
13306
  label: task.name,
13306
13307
  taskYOffset,
13307
- viewMode
13308
+ viewMode,
13309
+ alwaysOutline: task.type === "project"
13308
13310
  }
13309
13311
  )
13310
13312
  ]
@@ -13445,6 +13447,7 @@ const TaskGanttContentInner = (props) => {
13445
13447
  waitCommitTasks,
13446
13448
  viewMode,
13447
13449
  showProgress = true,
13450
+ showProjectProgress = false,
13448
13451
  progressColor
13449
13452
  } = props;
13450
13453
  const renderedHolidays = useMemo(() => {
@@ -13615,6 +13618,7 @@ const TaskGanttContentInner = (props) => {
13615
13618
  renderCustomLabel,
13616
13619
  viewMode,
13617
13620
  showProgress,
13621
+ showProjectProgress,
13618
13622
  progressColor
13619
13623
  }
13620
13624
  )
@@ -13975,6 +13979,7 @@ const TaskGanttContentInner = (props) => {
13975
13979
  activeArrowKey,
13976
13980
  activeTaskId,
13977
13981
  showProgress,
13982
+ showProjectProgress,
13978
13983
  progressColor
13979
13984
  ]);
13980
13985
  return /* @__PURE__ */ jsxs("g", { className: "content", children: [
@@ -19783,6 +19788,7 @@ const Gantt = (props) => {
19783
19788
  todayLabel = "Today",
19784
19789
  dataDateLabel = "Data Date",
19785
19790
  showProgress = true,
19791
+ showProjectProgress = false,
19786
19792
  progressColor,
19787
19793
  scrollToTaskId,
19788
19794
  drawer: drawerProps
@@ -21298,6 +21304,7 @@ const Gantt = (props) => {
21298
21304
  visibleTasksMirror,
21299
21305
  viewMode,
21300
21306
  showProgress,
21307
+ showProjectProgress,
21301
21308
  progressColor
21302
21309
  }),
21303
21310
  [
@@ -21343,6 +21350,7 @@ const Gantt = (props) => {
21343
21350
  changeInProgress == null ? void 0 : changeInProgress.action,
21344
21351
  handleDeleteTasks,
21345
21352
  showProgress,
21353
+ showProjectProgress,
21346
21354
  progressColor
21347
21355
  ]
21348
21356
  );
@@ -5192,8 +5192,8 @@
5192
5192
  projectProgressSelectedColor: "#0097A7",
5193
5193
  projectProgressCriticalColor: "#00838F",
5194
5194
  projectProgressSelectedCriticalColor: "#006064",
5195
- projectBackgroundColor: "#FFA726",
5196
- projectBackgroundSelectedColor: "#F57C00",
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]);
@@ -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" || 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 : ""}`,
@@ -13316,12 +13317,13 @@
13316
13317
  {
13317
13318
  x1,
13318
13319
  width,
13319
- taskHeight,
13320
+ taskHeight: task.type === "project" ? taskHalfHeight : taskHeight,
13320
13321
  arrowIndent,
13321
13322
  rtl,
13322
13323
  label: task.name,
13323
13324
  taskYOffset,
13324
- viewMode
13325
+ viewMode,
13326
+ alwaysOutline: task.type === "project"
13325
13327
  }
13326
13328
  )
13327
13329
  ]
@@ -13462,6 +13464,7 @@
13462
13464
  waitCommitTasks,
13463
13465
  viewMode,
13464
13466
  showProgress = true,
13467
+ showProjectProgress = false,
13465
13468
  progressColor
13466
13469
  } = props;
13467
13470
  const renderedHolidays = React.useMemo(() => {
@@ -13632,6 +13635,7 @@
13632
13635
  renderCustomLabel,
13633
13636
  viewMode,
13634
13637
  showProgress,
13638
+ showProjectProgress,
13635
13639
  progressColor
13636
13640
  }
13637
13641
  )
@@ -13992,6 +13996,7 @@
13992
13996
  activeArrowKey,
13993
13997
  activeTaskId,
13994
13998
  showProgress,
13999
+ showProjectProgress,
13995
14000
  progressColor
13996
14001
  ]);
13997
14002
  return /* @__PURE__ */ jsxRuntime.jsxs("g", { className: "content", children: [
@@ -19800,6 +19805,7 @@
19800
19805
  todayLabel = "Today",
19801
19806
  dataDateLabel = "Data Date",
19802
19807
  showProgress = true,
19808
+ showProjectProgress = false,
19803
19809
  progressColor,
19804
19810
  scrollToTaskId,
19805
19811
  drawer: drawerProps
@@ -21315,6 +21321,7 @@
21315
21321
  visibleTasksMirror,
21316
21322
  viewMode,
21317
21323
  showProgress,
21324
+ showProjectProgress,
21318
21325
  progressColor
21319
21326
  }),
21320
21327
  [
@@ -21360,6 +21367,7 @@
21360
21367
  changeInProgress == null ? void 0 : changeInProgress.action,
21361
21368
  handleDeleteTasks,
21362
21369
  showProgress,
21370
+ showProjectProgress,
21363
21371
  progressColor
21364
21372
  ]
21365
21373
  );
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gantt-task-react-v",
3
- "version": "1.6.10",
3
+ "version": "1.6.12",
4
4
  "description": "Interactive Gantt Chart for React with TypeScript.",
5
5
  "author": "aguilanbon",
6
6
  "homepage": "https://github.com/aguilanbon/gantt-task-react-v",