gantt-task-react-v 1.6.13 → 1.6.15

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,7 +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
+ hideProjectProgress?: boolean;
49
49
  progressColor?: string;
50
50
  }
51
51
  export declare const TaskGanttContent: React.NamedExoticComponent<TaskGanttContentProps>;
@@ -33,7 +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
+ hideProjectProgress?: boolean;
37
37
  progressColor?: string;
38
38
  }
39
39
  export declare const TaskItem: React.NamedExoticComponent<TaskItemProps>;
@@ -5167,8 +5167,8 @@ const DEFAULT_THEME = {
5167
5167
  groupProgressSelectedColor: "#388E3C",
5168
5168
  groupProgressCriticalColor: "#2E7D32",
5169
5169
  groupProgressSelectedCriticalColor: "#1B5E20",
5170
- groupBackgroundColor: "#0A0A0A",
5171
- groupBackgroundSelectedColor: "#333333",
5170
+ groupBackgroundColor: "#29B6F6",
5171
+ groupBackgroundSelectedColor: "#0288D1",
5172
5172
  groupBackgroundCriticalColor: "#0277BD",
5173
5173
  groupBackgroundSelectedCriticalColor: "#01579B",
5174
5174
  projectProgressColor: "#26C6DA",
@@ -5176,9 +5176,9 @@ const DEFAULT_THEME = {
5176
5176
  projectProgressCriticalColor: "#00838F",
5177
5177
  projectProgressSelectedCriticalColor: "#006064",
5178
5178
  projectBackgroundColor: "#0A0A0A",
5179
- projectBackgroundSelectedColor: "#333333",
5180
- projectBackgroundCriticalColor: "#EF6C00",
5181
- projectBackgroundSelectedCriticalColor: "#E65100",
5179
+ projectBackgroundSelectedColor: "#1A1A1A",
5180
+ projectBackgroundCriticalColor: "#2A0000",
5181
+ projectBackgroundSelectedCriticalColor: "#3A0000",
5182
5182
  milestoneBackgroundColor: "#FF7043",
5183
5183
  milestoneBackgroundSelectedColor: "#E64A19",
5184
5184
  milestoneBackgroundCriticalColor: "#D84315",
@@ -12658,7 +12658,7 @@ const ProjectDisplay = ({
12658
12658
  },
12659
12659
  className: styles$8.projectWrapper,
12660
12660
  children: [
12661
- showProgress && /* @__PURE__ */ jsx(
12661
+ /* @__PURE__ */ jsx(
12662
12662
  "rect",
12663
12663
  {
12664
12664
  fill: barColor,
@@ -12781,7 +12781,7 @@ const Bar = (props) => {
12781
12781
  movingAction,
12782
12782
  ganttRelationEvent,
12783
12783
  showProgress = true,
12784
- showProjectProgress = false,
12784
+ hideProjectProgress = false,
12785
12785
  progressColor
12786
12786
  } = props;
12787
12787
  const isSmallWidth = useMemo(() => width < 30, [width]);
@@ -12830,7 +12830,7 @@ const Bar = (props) => {
12830
12830
  taskHeight
12831
12831
  );
12832
12832
  const renderBarDisplay = () => {
12833
- if (task.type === "project" || hasChildren) {
12833
+ if (task.type === "project") {
12834
12834
  return /* @__PURE__ */ jsx(
12835
12835
  ProjectDisplay,
12836
12836
  {
@@ -12849,7 +12849,7 @@ const Bar = (props) => {
12849
12849
  isCritical,
12850
12850
  hasChildren,
12851
12851
  startMoveFullTask,
12852
- showProgress: showProjectProgress,
12852
+ showProgress: hideProjectProgress ? false : showProgress,
12853
12853
  progressColor
12854
12854
  }
12855
12855
  );
@@ -12929,7 +12929,7 @@ const Bar = (props) => {
12929
12929
  }
12930
12930
  ),
12931
12931
  relationHandles,
12932
- (task.type !== "project" && !hasChildren || showProjectProgress) && isProgressChangeable(task) && /* @__PURE__ */ jsx(
12932
+ isProgressChangeable(task) && /* @__PURE__ */ jsx(
12933
12933
  BarProgressHandle,
12934
12934
  {
12935
12935
  className: `${styles$9.barHandle} ${isMovingProgress ? styles$9.barHandleImportantVisible : ""} ${isSmallWidth || isMovingDate || isRelationDrawMode ? styles$9.barHandleImportantHidden : ""}`,
@@ -13099,7 +13099,6 @@ const TaskItemInner = (props) => {
13099
13099
  const {
13100
13100
  movingAction,
13101
13101
  distances: { arrowIndent, relationCircleOffset, relationCircleRadius },
13102
- hasChildren,
13103
13102
  onDeleteTask,
13104
13103
  isDateChangeable,
13105
13104
  canDelete,
@@ -13301,13 +13300,13 @@ const TaskItemInner = (props) => {
13301
13300
  {
13302
13301
  x1,
13303
13302
  width,
13304
- taskHeight: task.type === "project" || hasChildren ? taskHalfHeight : taskHeight,
13303
+ taskHeight: task.type === "project" ? taskHalfHeight : taskHeight,
13305
13304
  arrowIndent,
13306
13305
  rtl,
13307
13306
  label: task.name,
13308
13307
  taskYOffset,
13309
13308
  viewMode,
13310
- alwaysOutline: task.type === "project" || hasChildren
13309
+ alwaysOutline: task.type === "project"
13311
13310
  }
13312
13311
  )
13313
13312
  ]
@@ -13448,7 +13447,7 @@ const TaskGanttContentInner = (props) => {
13448
13447
  waitCommitTasks,
13449
13448
  viewMode,
13450
13449
  showProgress = true,
13451
- showProjectProgress = false,
13450
+ hideProjectProgress = false,
13452
13451
  progressColor
13453
13452
  } = props;
13454
13453
  const renderedHolidays = useMemo(() => {
@@ -13619,7 +13618,7 @@ const TaskGanttContentInner = (props) => {
13619
13618
  renderCustomLabel,
13620
13619
  viewMode,
13621
13620
  showProgress,
13622
- showProjectProgress,
13621
+ hideProjectProgress,
13623
13622
  progressColor
13624
13623
  }
13625
13624
  )
@@ -13980,7 +13979,7 @@ const TaskGanttContentInner = (props) => {
13980
13979
  activeArrowKey,
13981
13980
  activeTaskId,
13982
13981
  showProgress,
13983
- showProjectProgress,
13982
+ hideProjectProgress,
13984
13983
  progressColor
13985
13984
  ]);
13986
13985
  return /* @__PURE__ */ jsxs("g", { className: "content", children: [
@@ -19789,7 +19788,7 @@ const Gantt = (props) => {
19789
19788
  todayLabel = "Today",
19790
19789
  dataDateLabel = "Data Date",
19791
19790
  showProgress = true,
19792
- showProjectProgress = false,
19791
+ hideProjectProgress = false,
19793
19792
  progressColor,
19794
19793
  scrollToTaskId,
19795
19794
  drawer: drawerProps
@@ -21305,7 +21304,7 @@ const Gantt = (props) => {
21305
21304
  visibleTasksMirror,
21306
21305
  viewMode,
21307
21306
  showProgress,
21308
- showProjectProgress,
21307
+ hideProjectProgress,
21309
21308
  progressColor
21310
21309
  }),
21311
21310
  [
@@ -21351,7 +21350,7 @@ const Gantt = (props) => {
21351
21350
  changeInProgress == null ? void 0 : changeInProgress.action,
21352
21351
  handleDeleteTasks,
21353
21352
  showProgress,
21354
- showProjectProgress,
21353
+ hideProjectProgress,
21355
21354
  progressColor
21356
21355
  ]
21357
21356
  );
@@ -5184,8 +5184,8 @@
5184
5184
  groupProgressSelectedColor: "#388E3C",
5185
5185
  groupProgressCriticalColor: "#2E7D32",
5186
5186
  groupProgressSelectedCriticalColor: "#1B5E20",
5187
- groupBackgroundColor: "#0A0A0A",
5188
- groupBackgroundSelectedColor: "#333333",
5187
+ groupBackgroundColor: "#29B6F6",
5188
+ groupBackgroundSelectedColor: "#0288D1",
5189
5189
  groupBackgroundCriticalColor: "#0277BD",
5190
5190
  groupBackgroundSelectedCriticalColor: "#01579B",
5191
5191
  projectProgressColor: "#26C6DA",
@@ -5193,9 +5193,9 @@
5193
5193
  projectProgressCriticalColor: "#00838F",
5194
5194
  projectProgressSelectedCriticalColor: "#006064",
5195
5195
  projectBackgroundColor: "#0A0A0A",
5196
- projectBackgroundSelectedColor: "#333333",
5197
- projectBackgroundCriticalColor: "#EF6C00",
5198
- projectBackgroundSelectedCriticalColor: "#E65100",
5196
+ projectBackgroundSelectedColor: "#1A1A1A",
5197
+ projectBackgroundCriticalColor: "#2A0000",
5198
+ projectBackgroundSelectedCriticalColor: "#3A0000",
5199
5199
  milestoneBackgroundColor: "#FF7043",
5200
5200
  milestoneBackgroundSelectedColor: "#E64A19",
5201
5201
  milestoneBackgroundCriticalColor: "#D84315",
@@ -12675,7 +12675,7 @@
12675
12675
  },
12676
12676
  className: styles$8.projectWrapper,
12677
12677
  children: [
12678
- showProgress && /* @__PURE__ */ jsxRuntime.jsx(
12678
+ /* @__PURE__ */ jsxRuntime.jsx(
12679
12679
  "rect",
12680
12680
  {
12681
12681
  fill: barColor,
@@ -12798,7 +12798,7 @@
12798
12798
  movingAction,
12799
12799
  ganttRelationEvent,
12800
12800
  showProgress = true,
12801
- showProjectProgress = false,
12801
+ hideProjectProgress = false,
12802
12802
  progressColor
12803
12803
  } = props;
12804
12804
  const isSmallWidth = React.useMemo(() => width < 30, [width]);
@@ -12847,7 +12847,7 @@
12847
12847
  taskHeight
12848
12848
  );
12849
12849
  const renderBarDisplay = () => {
12850
- if (task.type === "project" || hasChildren) {
12850
+ if (task.type === "project") {
12851
12851
  return /* @__PURE__ */ jsxRuntime.jsx(
12852
12852
  ProjectDisplay,
12853
12853
  {
@@ -12866,7 +12866,7 @@
12866
12866
  isCritical,
12867
12867
  hasChildren,
12868
12868
  startMoveFullTask,
12869
- showProgress: showProjectProgress,
12869
+ showProgress: hideProjectProgress ? false : showProgress,
12870
12870
  progressColor
12871
12871
  }
12872
12872
  );
@@ -12946,7 +12946,7 @@
12946
12946
  }
12947
12947
  ),
12948
12948
  relationHandles,
12949
- (task.type !== "project" && !hasChildren || showProjectProgress) && isProgressChangeable(task) && /* @__PURE__ */ jsxRuntime.jsx(
12949
+ isProgressChangeable(task) && /* @__PURE__ */ jsxRuntime.jsx(
12950
12950
  BarProgressHandle,
12951
12951
  {
12952
12952
  className: `${styles$9.barHandle} ${isMovingProgress ? styles$9.barHandleImportantVisible : ""} ${isSmallWidth || isMovingDate || isRelationDrawMode ? styles$9.barHandleImportantHidden : ""}`,
@@ -13116,7 +13116,6 @@
13116
13116
  const {
13117
13117
  movingAction,
13118
13118
  distances: { arrowIndent, relationCircleOffset, relationCircleRadius },
13119
- hasChildren,
13120
13119
  onDeleteTask,
13121
13120
  isDateChangeable,
13122
13121
  canDelete,
@@ -13318,13 +13317,13 @@
13318
13317
  {
13319
13318
  x1,
13320
13319
  width,
13321
- taskHeight: task.type === "project" || hasChildren ? taskHalfHeight : taskHeight,
13320
+ taskHeight: task.type === "project" ? taskHalfHeight : taskHeight,
13322
13321
  arrowIndent,
13323
13322
  rtl,
13324
13323
  label: task.name,
13325
13324
  taskYOffset,
13326
13325
  viewMode,
13327
- alwaysOutline: task.type === "project" || hasChildren
13326
+ alwaysOutline: task.type === "project"
13328
13327
  }
13329
13328
  )
13330
13329
  ]
@@ -13465,7 +13464,7 @@
13465
13464
  waitCommitTasks,
13466
13465
  viewMode,
13467
13466
  showProgress = true,
13468
- showProjectProgress = false,
13467
+ hideProjectProgress = false,
13469
13468
  progressColor
13470
13469
  } = props;
13471
13470
  const renderedHolidays = React.useMemo(() => {
@@ -13636,7 +13635,7 @@
13636
13635
  renderCustomLabel,
13637
13636
  viewMode,
13638
13637
  showProgress,
13639
- showProjectProgress,
13638
+ hideProjectProgress,
13640
13639
  progressColor
13641
13640
  }
13642
13641
  )
@@ -13997,7 +13996,7 @@
13997
13996
  activeArrowKey,
13998
13997
  activeTaskId,
13999
13998
  showProgress,
14000
- showProjectProgress,
13999
+ hideProjectProgress,
14001
14000
  progressColor
14002
14001
  ]);
14003
14002
  return /* @__PURE__ */ jsxRuntime.jsxs("g", { className: "content", children: [
@@ -19806,7 +19805,7 @@
19806
19805
  todayLabel = "Today",
19807
19806
  dataDateLabel = "Data Date",
19808
19807
  showProgress = true,
19809
- showProjectProgress = false,
19808
+ hideProjectProgress = false,
19810
19809
  progressColor,
19811
19810
  scrollToTaskId,
19812
19811
  drawer: drawerProps
@@ -21322,7 +21321,7 @@
21322
21321
  visibleTasksMirror,
21323
21322
  viewMode,
21324
21323
  showProgress,
21325
- showProjectProgress,
21324
+ hideProjectProgress,
21326
21325
  progressColor
21327
21326
  }),
21328
21327
  [
@@ -21368,7 +21367,7 @@
21368
21367
  changeInProgress == null ? void 0 : changeInProgress.action,
21369
21368
  handleDeleteTasks,
21370
21369
  showProgress,
21371
- showProjectProgress,
21370
+ hideProjectProgress,
21372
21371
  progressColor
21373
21372
  ]
21374
21373
  );
@@ -408,9 +408,9 @@ export interface GanttProps {
408
408
  */
409
409
  showProgress?: boolean;
410
410
  /**
411
- * Show/hide progress bar on project/WBS task bars. Defaults to false.
411
+ * Hide the progress bar specifically on project type task bars. Defaults to false.
412
412
  */
413
- showProjectProgress?: boolean;
413
+ hideProjectProgress?: boolean;
414
414
  /**
415
415
  * Custom color for progress bars. If not provided, theme progress colors are used.
416
416
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gantt-task-react-v",
3
- "version": "1.6.13",
3
+ "version": "1.6.15",
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",