gantt-task-react-v 1.7.6 → 1.7.8

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.
@@ -5702,9 +5702,8 @@ const TaskListTableHeadersDefaultInner = ({
5702
5702
  result[i] = {
5703
5703
  position: "sticky",
5704
5704
  left: leftOffset,
5705
- zIndex: 2,
5706
- backgroundColor: "var(--gantt-table-header-background-color, #fff)",
5707
- paddingRight: 8
5705
+ zIndex: 3,
5706
+ backgroundColor: "var(--gantt-table-header-background-color, #fff)"
5708
5707
  };
5709
5708
  leftOffset += columns[i].width;
5710
5709
  }
@@ -5715,9 +5714,8 @@ const TaskListTableHeadersDefaultInner = ({
5715
5714
  result[i] = {
5716
5715
  position: "sticky",
5717
5716
  right: rightOffset,
5718
- zIndex: 2,
5719
- backgroundColor: "var(--gantt-table-header-background-color, #fff)",
5720
- paddingLeft: 8
5717
+ zIndex: 3,
5718
+ backgroundColor: "var(--gantt-table-header-background-color, #fff)"
5721
5719
  };
5722
5720
  rightOffset += columns[i].width;
5723
5721
  }
@@ -10459,6 +10457,16 @@ const TaskListTableRowInner = forwardRef(
10459
10457
  }
10460
10458
  return isSelected ? "var(--gantt-table-selected-task-background-color)" : isEven ? "var(--gantt-table-even-background-color)" : "var(--gantt-background-color, #fff)";
10461
10459
  }, [isEven, isOverlay2, isSelected]);
10460
+ const pinnedBgColor = useMemo(() => {
10461
+ if (isOverlay2) {
10462
+ return "var(--gantt-table-drag-task-background-color)";
10463
+ }
10464
+ if (isSelected) {
10465
+ const base = isEven ? "var(--gantt-table-even-background-color, #f5f5f5)" : "var(--gantt-background-color, #fff)";
10466
+ return `linear-gradient(var(--gantt-table-selected-task-background-color), var(--gantt-table-selected-task-background-color)), linear-gradient(${base}, ${base})`;
10467
+ }
10468
+ return isEven ? "var(--gantt-table-even-background-color)" : "var(--gantt-background-color, #fff)";
10469
+ }, [isEven, isOverlay2, isSelected]);
10462
10470
  const rowClassName = useMemo(() => {
10463
10471
  const classNames = [styles$h.taskListTableRow];
10464
10472
  if (moveOverPosition === "after") {
@@ -10477,39 +10485,29 @@ const TaskListTableRowInner = forwardRef(
10477
10485
  }, [isCut2, moveOverPosition, isOverlay2, isDragging]);
10478
10486
  const pinnedStyles = useMemo(() => {
10479
10487
  const result = {};
10480
- const pinnedBg = backgroundColor || "var(--gantt-background-color, #fff)";
10488
+ const pinnedBase = {
10489
+ position: "relative",
10490
+ zIndex: 3,
10491
+ background: pinnedBgColor
10492
+ };
10481
10493
  for (let i = 0; i < columns.length; i++) {
10482
10494
  if (columns[i].pinned === "left") {
10483
10495
  result[i] = {
10484
- position: "relative",
10485
- transform: "translateX(var(--pinned-translate-left, 0px))",
10486
- zIndex: 2,
10487
- backgroundColor: pinnedBg,
10488
- // box-shadow + clip-path create a bulletproof opaque cover that
10489
- // extends 10px past the cell's right edge, hiding any content
10490
- // that scrolls underneath. clip-path trims the shadow to
10491
- // exactly the cell bounds plus the 10px overhang.
10492
- boxShadow: `0 0 0 9999px ${pinnedBg}`,
10493
- clipPath: "inset(0px -10px 0px 0px)",
10494
- paddingRight: 10
10496
+ ...pinnedBase,
10497
+ transform: "translateX(var(--pinned-translate-left, 0px))"
10495
10498
  };
10496
10499
  }
10497
10500
  }
10498
10501
  for (let i = columns.length - 1; i >= 0; i--) {
10499
10502
  if (columns[i].pinned === "right") {
10500
10503
  result[i] = {
10501
- position: "relative",
10502
- transform: "translateX(var(--pinned-translate-right, 0px))",
10503
- zIndex: 2,
10504
- backgroundColor: pinnedBg,
10505
- boxShadow: `0 0 0 9999px ${pinnedBg}`,
10506
- clipPath: "inset(0px 0px 0px -10px)",
10507
- paddingLeft: 10
10504
+ ...pinnedBase,
10505
+ transform: "translateX(var(--pinned-translate-right, 0px))"
10508
10506
  };
10509
10507
  }
10510
10508
  }
10511
10509
  return result;
10512
- }, [columns, backgroundColor]);
10510
+ }, [columns, pinnedBgColor]);
10513
10511
  return /* @__PURE__ */ jsxs(
10514
10512
  "div",
10515
10513
  {
@@ -11346,7 +11344,7 @@ const TaskListInner = ({
11346
11344
  distances.minimumRowDisplayed * distances.rowHeight
11347
11345
  ),
11348
11346
  backgroundSize: `100% ${fullRowHeight * 2}px`,
11349
- backgroundImage: `linear-gradient(to bottom, transparent ${fullRowHeight}px, #f5f5f5 ${fullRowHeight}px)`
11347
+ backgroundImage: `linear-gradient(to bottom, transparent ${fullRowHeight}px, var(--gantt-table-even-background-color, #f5f5f5) ${fullRowHeight}px)`
11350
11348
  },
11351
11349
  children: /* @__PURE__ */ jsx(
11352
11350
  RenderTaskListTable,
@@ -14461,7 +14459,7 @@ const TaskGanttInner = (props) => {
14461
14459
  backgroundPositionX: additionalLeftSpace || void 0,
14462
14460
  backgroundImage: [
14463
14461
  `linear-gradient(to right, #ebeff2 1px, transparent 2px)`,
14464
- `linear-gradient(to bottom, transparent ${fullRowHeight}px, #f5f5f5 ${fullRowHeight}px)`
14462
+ `linear-gradient(to bottom, transparent ${fullRowHeight}px, var(--gantt-table-even-background-color, #f5f5f5) ${fullRowHeight}px)`
14465
14463
  ].join(", ")
14466
14464
  }),
14467
14465
  [
@@ -5719,9 +5719,8 @@
5719
5719
  result[i] = {
5720
5720
  position: "sticky",
5721
5721
  left: leftOffset,
5722
- zIndex: 2,
5723
- backgroundColor: "var(--gantt-table-header-background-color, #fff)",
5724
- paddingRight: 8
5722
+ zIndex: 3,
5723
+ backgroundColor: "var(--gantt-table-header-background-color, #fff)"
5725
5724
  };
5726
5725
  leftOffset += columns[i].width;
5727
5726
  }
@@ -5732,9 +5731,8 @@
5732
5731
  result[i] = {
5733
5732
  position: "sticky",
5734
5733
  right: rightOffset,
5735
- zIndex: 2,
5736
- backgroundColor: "var(--gantt-table-header-background-color, #fff)",
5737
- paddingLeft: 8
5734
+ zIndex: 3,
5735
+ backgroundColor: "var(--gantt-table-header-background-color, #fff)"
5738
5736
  };
5739
5737
  rightOffset += columns[i].width;
5740
5738
  }
@@ -10476,6 +10474,16 @@
10476
10474
  }
10477
10475
  return isSelected ? "var(--gantt-table-selected-task-background-color)" : isEven ? "var(--gantt-table-even-background-color)" : "var(--gantt-background-color, #fff)";
10478
10476
  }, [isEven, isOverlay2, isSelected]);
10477
+ const pinnedBgColor = React.useMemo(() => {
10478
+ if (isOverlay2) {
10479
+ return "var(--gantt-table-drag-task-background-color)";
10480
+ }
10481
+ if (isSelected) {
10482
+ const base = isEven ? "var(--gantt-table-even-background-color, #f5f5f5)" : "var(--gantt-background-color, #fff)";
10483
+ return `linear-gradient(var(--gantt-table-selected-task-background-color), var(--gantt-table-selected-task-background-color)), linear-gradient(${base}, ${base})`;
10484
+ }
10485
+ return isEven ? "var(--gantt-table-even-background-color)" : "var(--gantt-background-color, #fff)";
10486
+ }, [isEven, isOverlay2, isSelected]);
10479
10487
  const rowClassName = React.useMemo(() => {
10480
10488
  const classNames = [styles$h.taskListTableRow];
10481
10489
  if (moveOverPosition === "after") {
@@ -10494,39 +10502,29 @@
10494
10502
  }, [isCut2, moveOverPosition, isOverlay2, isDragging]);
10495
10503
  const pinnedStyles = React.useMemo(() => {
10496
10504
  const result = {};
10497
- const pinnedBg = backgroundColor || "var(--gantt-background-color, #fff)";
10505
+ const pinnedBase = {
10506
+ position: "relative",
10507
+ zIndex: 3,
10508
+ background: pinnedBgColor
10509
+ };
10498
10510
  for (let i = 0; i < columns.length; i++) {
10499
10511
  if (columns[i].pinned === "left") {
10500
10512
  result[i] = {
10501
- position: "relative",
10502
- transform: "translateX(var(--pinned-translate-left, 0px))",
10503
- zIndex: 2,
10504
- backgroundColor: pinnedBg,
10505
- // box-shadow + clip-path create a bulletproof opaque cover that
10506
- // extends 10px past the cell's right edge, hiding any content
10507
- // that scrolls underneath. clip-path trims the shadow to
10508
- // exactly the cell bounds plus the 10px overhang.
10509
- boxShadow: `0 0 0 9999px ${pinnedBg}`,
10510
- clipPath: "inset(0px -10px 0px 0px)",
10511
- paddingRight: 10
10513
+ ...pinnedBase,
10514
+ transform: "translateX(var(--pinned-translate-left, 0px))"
10512
10515
  };
10513
10516
  }
10514
10517
  }
10515
10518
  for (let i = columns.length - 1; i >= 0; i--) {
10516
10519
  if (columns[i].pinned === "right") {
10517
10520
  result[i] = {
10518
- position: "relative",
10519
- transform: "translateX(var(--pinned-translate-right, 0px))",
10520
- zIndex: 2,
10521
- backgroundColor: pinnedBg,
10522
- boxShadow: `0 0 0 9999px ${pinnedBg}`,
10523
- clipPath: "inset(0px 0px 0px -10px)",
10524
- paddingLeft: 10
10521
+ ...pinnedBase,
10522
+ transform: "translateX(var(--pinned-translate-right, 0px))"
10525
10523
  };
10526
10524
  }
10527
10525
  }
10528
10526
  return result;
10529
- }, [columns, backgroundColor]);
10527
+ }, [columns, pinnedBgColor]);
10530
10528
  return /* @__PURE__ */ jsxRuntime.jsxs(
10531
10529
  "div",
10532
10530
  {
@@ -11363,7 +11361,7 @@
11363
11361
  distances.minimumRowDisplayed * distances.rowHeight
11364
11362
  ),
11365
11363
  backgroundSize: `100% ${fullRowHeight * 2}px`,
11366
- backgroundImage: `linear-gradient(to bottom, transparent ${fullRowHeight}px, #f5f5f5 ${fullRowHeight}px)`
11364
+ backgroundImage: `linear-gradient(to bottom, transparent ${fullRowHeight}px, var(--gantt-table-even-background-color, #f5f5f5) ${fullRowHeight}px)`
11367
11365
  },
11368
11366
  children: /* @__PURE__ */ jsxRuntime.jsx(
11369
11367
  RenderTaskListTable,
@@ -14478,7 +14476,7 @@
14478
14476
  backgroundPositionX: additionalLeftSpace || void 0,
14479
14477
  backgroundImage: [
14480
14478
  `linear-gradient(to right, #ebeff2 1px, transparent 2px)`,
14481
- `linear-gradient(to bottom, transparent ${fullRowHeight}px, #f5f5f5 ${fullRowHeight}px)`
14479
+ `linear-gradient(to bottom, transparent ${fullRowHeight}px, var(--gantt-table-even-background-color, #f5f5f5) ${fullRowHeight}px)`
14482
14480
  ].join(", ")
14483
14481
  }),
14484
14482
  [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gantt-task-react-v",
3
- "version": "1.7.6",
3
+ "version": "1.7.8",
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",