gantt-task-react-v 1.0.6 → 1.0.9

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.
@@ -5,6 +5,7 @@ import { CalendarProps } from "../calendar/calendar";
5
5
  import { TaskGanttContentProps } from "./task-gantt-content";
6
6
  import { GanttTaskBarActions } from "../../types";
7
7
  export interface TaskGanttProps extends GanttTaskBarActions {
8
+ ganttHeight?: number;
8
9
  barProps: TaskGanttContentProps;
9
10
  calendarProps: Omit<CalendarProps, "scrollRef">;
10
11
  fullRowHeight: number;
@@ -14,6 +14,7 @@ export type TaskListProps = {
14
14
  distances: Distances;
15
15
  fullRowHeight: number;
16
16
  ganttFullHeight: number;
17
+ ganttHeight?: number;
17
18
  getTaskCurrentState: (task: Task) => Task;
18
19
  handleAddTask: (task: Task | null) => void;
19
20
  handleDeleteTasks: (task: RenderTask[]) => void;
@@ -10720,7 +10720,8 @@ const TaskListInner = ({
10720
10720
  tasks,
10721
10721
  onResizeColumn,
10722
10722
  canReorderTasks,
10723
- tableBottom
10723
+ tableBottom,
10724
+ ganttHeight
10724
10725
  }) => {
10725
10726
  const [
10726
10727
  columns,
@@ -10829,7 +10830,7 @@ const TaskListInner = ({
10829
10830
  className: styles$d.horizontalContainer,
10830
10831
  style: {
10831
10832
  height: Math.min(
10832
- ganttFullHeight,
10833
+ ganttHeight || ganttFullHeight,
10833
10834
  distances.minimumRowDisplayed * distances.rowHeight
10834
10835
  ),
10835
10836
  width: taskListWidth
@@ -13154,12 +13155,12 @@ const TaskGanttContentInner = (props) => {
13154
13155
  ] });
13155
13156
  };
13156
13157
  const TaskGanttContent = memo(TaskGanttContentInner);
13157
- const ganttVerticalContainer = "_ganttVerticalContainer_1044x_1";
13158
- const horizontalContainer = "_horizontalContainer_1044x_75";
13159
- const ganttHeader = "_ganttHeader_1044x_87";
13160
- const ganttBodyScroll = "_ganttBodyScroll_1044x_97";
13161
- const wrapper = "_wrapper_1044x_109";
13162
- const calendarDragging = "_calendarDragging_1044x_131";
13158
+ const ganttVerticalContainer = "_ganttVerticalContainer_1hrwo_1";
13159
+ const horizontalContainer = "_horizontalContainer_1hrwo_75";
13160
+ const ganttHeader = "_ganttHeader_1hrwo_87";
13161
+ const ganttBodyScroll = "_ganttBodyScroll_1hrwo_97";
13162
+ const wrapper = "_wrapper_1hrwo_109";
13163
+ const calendarDragging = "_calendarDragging_1hrwo_131";
13163
13164
  const styles$2 = {
13164
13165
  ganttVerticalContainer,
13165
13166
  horizontalContainer,
@@ -19833,6 +19834,7 @@ const Gantt = (props) => {
19833
19834
  distances,
19834
19835
  fullRowHeight,
19835
19836
  ganttFullHeight,
19837
+ ganttHeight,
19836
19838
  getTaskCurrentState,
19837
19839
  handleAddTask,
19838
19840
  handleDeleteTasks,
@@ -19862,6 +19864,7 @@ const Gantt = (props) => {
19862
19864
  distances,
19863
19865
  fullRowHeight,
19864
19866
  ganttFullHeight,
19867
+ ganttHeight,
19865
19868
  getTaskCurrentState,
19866
19869
  handleAddTask,
19867
19870
  handleDeleteTasks,
@@ -19885,7 +19888,7 @@ const Gantt = (props) => {
19885
19888
  return /* @__PURE__ */ jsx(GanttThemeProvider, { theme, children: (cssVars) => /* @__PURE__ */ jsx(GanttLocaleProvider, { locale, children: /* @__PURE__ */ jsxs(
19886
19889
  "div",
19887
19890
  {
19888
- style: cssVars,
19891
+ style: typeof clientHeight === "string" ? { ...cssVars, height: clientHeight } : cssVars,
19889
19892
  className: `${styles$2.wrapper} gantt`,
19890
19893
  onKeyDown: handleKeyDown,
19891
19894
  tabIndex: 0,
@@ -19902,6 +19905,7 @@ const Gantt = (props) => {
19902
19905
  fullRowHeight,
19903
19906
  fullSvgWidth,
19904
19907
  ganttFullHeight,
19908
+ ganttHeight,
19905
19909
  ganttSVGRef,
19906
19910
  ganttTodayProps: gridProps,
19907
19911
  horizontalContainerRef,
@@ -10737,7 +10737,8 @@
10737
10737
  tasks,
10738
10738
  onResizeColumn,
10739
10739
  canReorderTasks,
10740
- tableBottom
10740
+ tableBottom,
10741
+ ganttHeight
10741
10742
  }) => {
10742
10743
  const [
10743
10744
  columns,
@@ -10846,7 +10847,7 @@
10846
10847
  className: styles$d.horizontalContainer,
10847
10848
  style: {
10848
10849
  height: Math.min(
10849
- ganttFullHeight,
10850
+ ganttHeight || ganttFullHeight,
10850
10851
  distances.minimumRowDisplayed * distances.rowHeight
10851
10852
  ),
10852
10853
  width: taskListWidth
@@ -13171,12 +13172,12 @@
13171
13172
  ] });
13172
13173
  };
13173
13174
  const TaskGanttContent = React.memo(TaskGanttContentInner);
13174
- const ganttVerticalContainer = "_ganttVerticalContainer_1044x_1";
13175
- const horizontalContainer = "_horizontalContainer_1044x_75";
13176
- const ganttHeader = "_ganttHeader_1044x_87";
13177
- const ganttBodyScroll = "_ganttBodyScroll_1044x_97";
13178
- const wrapper = "_wrapper_1044x_109";
13179
- const calendarDragging = "_calendarDragging_1044x_131";
13175
+ const ganttVerticalContainer = "_ganttVerticalContainer_1hrwo_1";
13176
+ const horizontalContainer = "_horizontalContainer_1hrwo_75";
13177
+ const ganttHeader = "_ganttHeader_1hrwo_87";
13178
+ const ganttBodyScroll = "_ganttBodyScroll_1hrwo_97";
13179
+ const wrapper = "_wrapper_1hrwo_109";
13180
+ const calendarDragging = "_calendarDragging_1hrwo_131";
13180
13181
  const styles$2 = {
13181
13182
  ganttVerticalContainer,
13182
13183
  horizontalContainer,
@@ -19850,6 +19851,7 @@
19850
19851
  distances,
19851
19852
  fullRowHeight,
19852
19853
  ganttFullHeight,
19854
+ ganttHeight,
19853
19855
  getTaskCurrentState,
19854
19856
  handleAddTask,
19855
19857
  handleDeleteTasks,
@@ -19879,6 +19881,7 @@
19879
19881
  distances,
19880
19882
  fullRowHeight,
19881
19883
  ganttFullHeight,
19884
+ ganttHeight,
19882
19885
  getTaskCurrentState,
19883
19886
  handleAddTask,
19884
19887
  handleDeleteTasks,
@@ -19902,7 +19905,7 @@
19902
19905
  return /* @__PURE__ */ jsxRuntime.jsx(GanttThemeProvider, { theme, children: (cssVars) => /* @__PURE__ */ jsxRuntime.jsx(GanttLocaleProvider, { locale, children: /* @__PURE__ */ jsxRuntime.jsxs(
19903
19906
  "div",
19904
19907
  {
19905
- style: cssVars,
19908
+ style: typeof clientHeight === "string" ? { ...cssVars, height: clientHeight } : cssVars,
19906
19909
  className: `${styles$2.wrapper} gantt`,
19907
19910
  onKeyDown: handleKeyDown,
19908
19911
  tabIndex: 0,
@@ -19919,6 +19922,7 @@
19919
19922
  fullRowHeight,
19920
19923
  fullSvgWidth,
19921
19924
  ganttFullHeight,
19925
+ ganttHeight,
19922
19926
  ganttSVGRef,
19923
19927
  ganttTodayProps: gridProps,
19924
19928
  horizontalContainerRef,
package/dist/style.css CHANGED
@@ -568,11 +568,11 @@
568
568
  user-select: none;
569
569
  stroke-width: 0;
570
570
  }
571
- ._ganttVerticalContainer_1044x_1 {
571
+ ._ganttVerticalContainer_1hrwo_1 {
572
572
  display: flex;
573
573
  flex-direction: column;
574
- overflow-x: hidden;
575
- overflow-y: hidden;
574
+ overflow-x: scroll;
575
+ overflow-y: scroll;
576
576
  font-size: 0;
577
577
  margin: 0;
578
578
  padding: 0;
@@ -581,16 +581,16 @@
581
581
  flex-grow: 1;
582
582
  }
583
583
 
584
- ._ganttVerticalContainer_1044x_1::-webkit-scrollbar {
584
+ ._ganttVerticalContainer_1hrwo_1::-webkit-scrollbar {
585
585
  width: 1rem;
586
586
  height: 1rem;
587
587
  }
588
588
 
589
- ._ganttVerticalContainer_1044x_1::-webkit-scrollbar-corner {
589
+ ._ganttVerticalContainer_1hrwo_1::-webkit-scrollbar-corner {
590
590
  background: transparent;
591
591
  }
592
592
 
593
- ._ganttVerticalContainer_1044x_1::-webkit-scrollbar-thumb {
593
+ ._ganttVerticalContainer_1hrwo_1::-webkit-scrollbar-thumb {
594
594
  border: 4px solid transparent;
595
595
  /*noinspection CssUnresolvedCustomProperty*/
596
596
  background: var(--gantt-scrollbar-thumb-color);
@@ -598,31 +598,31 @@
598
598
  background-clip: padding-box;
599
599
  }
600
600
 
601
- ._ganttVerticalContainer_1044x_1::-webkit-scrollbar-thumb:hover {
601
+ ._ganttVerticalContainer_1hrwo_1::-webkit-scrollbar-thumb:hover {
602
602
  border: 2px solid transparent;
603
603
  /*noinspection CssUnresolvedCustomProperty*/
604
604
  background: var(--gantt-scrollbar-thumb-color);
605
605
  background-clip: padding-box;
606
606
  }
607
607
 
608
- ._horizontalContainer_1044x_75 {
608
+ ._horizontalContainer_1hrwo_75 {
609
609
  margin: 0;
610
610
  padding: 0;
611
611
  overflow: hidden;
612
612
  }
613
613
 
614
- ._ganttHeader_1044x_87 {
614
+ ._ganttHeader_1hrwo_87 {
615
615
  flex: 0 0 auto;
616
616
  z-index: 3;
617
617
  }
618
618
 
619
- ._ganttBodyScroll_1044x_97 {
619
+ ._ganttBodyScroll_1hrwo_97 {
620
620
  flex: 1 1 auto;
621
621
  overflow-y: auto;
622
622
  overflow-x: hidden;
623
623
  }
624
624
 
625
- ._wrapper_1044x_109 {
625
+ ._wrapper_1hrwo_109 {
626
626
  display: flex;
627
627
  padding: 0;
628
628
  margin: 0;
@@ -633,7 +633,7 @@
633
633
  border-bottom: 1px solid var(--gantt-divider-color);
634
634
  }
635
635
 
636
- ._calendarDragging_1044x_131 {
636
+ ._calendarDragging_1hrwo_131 {
637
637
  cursor: grabbing;
638
638
  }
639
639
  /*noinspection CssUnresolvedCustomProperty*/
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gantt-task-react-v",
3
- "version": "1.0.6",
3
+ "version": "1.0.9",
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",