gantt-task-react-v 1.0.13 → 1.0.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.
|
@@ -5,8 +5,6 @@ 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;
|
|
9
|
-
useCssHeight?: boolean;
|
|
10
8
|
barProps: TaskGanttContentProps;
|
|
11
9
|
calendarProps: Omit<CalendarProps, "scrollRef">;
|
|
12
10
|
fullRowHeight: number;
|
|
@@ -14,8 +14,6 @@ export type TaskListProps = {
|
|
|
14
14
|
distances: Distances;
|
|
15
15
|
fullRowHeight: number;
|
|
16
16
|
ganttFullHeight: number;
|
|
17
|
-
ganttHeight?: number;
|
|
18
|
-
useCssHeight?: boolean;
|
|
19
17
|
getTaskCurrentState: (task: Task) => Task;
|
|
20
18
|
handleAddTask: (task: Task | null) => void;
|
|
21
19
|
handleDeleteTasks: (task: RenderTask[]) => void;
|
|
@@ -10657,14 +10657,14 @@ const TaskListTableDefaultInner = ({
|
|
|
10657
10657
|
);
|
|
10658
10658
|
};
|
|
10659
10659
|
const TaskListTable = memo(TaskListTableDefaultInner);
|
|
10660
|
-
const taskListRoot = "
|
|
10661
|
-
const taskListHorizontalScroll = "
|
|
10662
|
-
const taskListResizer = "
|
|
10663
|
-
const horizontalContainer$1 = "
|
|
10664
|
-
const tableWrapper = "
|
|
10665
|
-
const scrollToTop = "
|
|
10666
|
-
const scrollToBottom = "
|
|
10667
|
-
const hidden = "
|
|
10660
|
+
const taskListRoot = "_taskListRoot_3vx1x_1";
|
|
10661
|
+
const taskListHorizontalScroll = "_taskListHorizontalScroll_3vx1x_19";
|
|
10662
|
+
const taskListResizer = "_taskListResizer_3vx1x_81";
|
|
10663
|
+
const horizontalContainer$1 = "_horizontalContainer_3vx1x_145";
|
|
10664
|
+
const tableWrapper = "_tableWrapper_3vx1x_161";
|
|
10665
|
+
const scrollToTop = "_scrollToTop_3vx1x_175";
|
|
10666
|
+
const scrollToBottom = "_scrollToBottom_3vx1x_191";
|
|
10667
|
+
const hidden = "_hidden_3vx1x_207";
|
|
10668
10668
|
const styles$d = {
|
|
10669
10669
|
taskListRoot,
|
|
10670
10670
|
taskListHorizontalScroll,
|
|
@@ -10720,9 +10720,7 @@ const TaskListInner = ({
|
|
|
10720
10720
|
tasks,
|
|
10721
10721
|
onResizeColumn,
|
|
10722
10722
|
canReorderTasks,
|
|
10723
|
-
tableBottom
|
|
10724
|
-
ganttHeight,
|
|
10725
|
-
useCssHeight
|
|
10723
|
+
tableBottom
|
|
10726
10724
|
}) => {
|
|
10727
10725
|
const [
|
|
10728
10726
|
columns,
|
|
@@ -10830,29 +10828,15 @@ const TaskListInner = ({
|
|
|
10830
10828
|
ref: taskListContainerRef,
|
|
10831
10829
|
className: styles$d.horizontalContainer,
|
|
10832
10830
|
style: {
|
|
10833
|
-
// If consumer asked for CSS height (e.g. "100%"), let the
|
|
10834
|
-
// container fill its parent. Otherwise compute pixel height.
|
|
10835
|
-
height: ganttHeight == null && ganttHeight !== 0 && (typeof ganttHeight === "undefined" || useCssHeight) ? "100%" : (() => {
|
|
10836
|
-
const minRowsHeight = distances.minimumRowDisplayed * distances.rowHeight;
|
|
10837
|
-
const resolved = typeof ganttHeight === "number" ? ganttHeight : void 0;
|
|
10838
|
-
const visible = Math.max(
|
|
10839
|
-
minRowsHeight,
|
|
10840
|
-
Math.min(ganttFullHeight, resolved ?? ganttFullHeight)
|
|
10841
|
-
);
|
|
10842
|
-
return visible;
|
|
10843
|
-
})(),
|
|
10844
10831
|
width: taskListWidth
|
|
10845
10832
|
},
|
|
10846
10833
|
children: /* @__PURE__ */ jsx(
|
|
10847
10834
|
"div",
|
|
10848
10835
|
{
|
|
10849
10836
|
style: {
|
|
10850
|
-
height: Math.max(
|
|
10851
|
-
ganttFullHeight,
|
|
10852
|
-
distances.minimumRowDisplayed * distances.rowHeight
|
|
10853
|
-
),
|
|
10854
10837
|
backgroundSize: `100% ${fullRowHeight * 2}px`,
|
|
10855
|
-
backgroundImage: `linear-gradient(to bottom, transparent ${fullRowHeight}px, #f5f5f5 ${fullRowHeight}px)
|
|
10838
|
+
backgroundImage: `linear-gradient(to bottom, transparent ${fullRowHeight}px, #f5f5f5 ${fullRowHeight}px)`,
|
|
10839
|
+
height: "100%"
|
|
10856
10840
|
},
|
|
10857
10841
|
children: /* @__PURE__ */ jsx(
|
|
10858
10842
|
RenderTaskListTable,
|
|
@@ -13163,12 +13147,12 @@ const TaskGanttContentInner = (props) => {
|
|
|
13163
13147
|
] });
|
|
13164
13148
|
};
|
|
13165
13149
|
const TaskGanttContent = memo(TaskGanttContentInner);
|
|
13166
|
-
const ganttVerticalContainer = "
|
|
13167
|
-
const horizontalContainer = "
|
|
13168
|
-
const ganttHeader = "
|
|
13169
|
-
const ganttBodyScroll = "
|
|
13170
|
-
const wrapper = "
|
|
13171
|
-
const calendarDragging = "
|
|
13150
|
+
const ganttVerticalContainer = "_ganttVerticalContainer_7rmhe_1";
|
|
13151
|
+
const horizontalContainer = "_horizontalContainer_7rmhe_79";
|
|
13152
|
+
const ganttHeader = "_ganttHeader_7rmhe_95";
|
|
13153
|
+
const ganttBodyScroll = "_ganttBodyScroll_7rmhe_105";
|
|
13154
|
+
const wrapper = "_wrapper_7rmhe_121";
|
|
13155
|
+
const calendarDragging = "_calendarDragging_7rmhe_147";
|
|
13172
13156
|
const styles$2 = {
|
|
13173
13157
|
ganttVerticalContainer,
|
|
13174
13158
|
horizontalContainer,
|
|
@@ -13193,32 +13177,19 @@ const TaskGanttInner = (props) => {
|
|
|
13193
13177
|
horizontalContainerRef,
|
|
13194
13178
|
onVerticalScrollbarScrollX,
|
|
13195
13179
|
verticalGanttContainerRef,
|
|
13196
|
-
verticalScrollbarRef
|
|
13197
|
-
ganttHeight
|
|
13180
|
+
verticalScrollbarRef
|
|
13198
13181
|
} = props;
|
|
13199
13182
|
const contentRef = React__default.useRef(null);
|
|
13200
13183
|
const moveStateVertRef = useRef(null);
|
|
13201
13184
|
const moveStateHorRef = useRef(null);
|
|
13202
13185
|
const moveStateScrollRef = useRef(null);
|
|
13203
|
-
const containerStyle = useMemo(
|
|
13204
|
-
|
|
13205
|
-
|
|
13206
|
-
const visible = Math.max(
|
|
13207
|
-
minRowsHeight,
|
|
13208
|
-
Math.min(ganttFullHeight, resolved ?? ganttFullHeight)
|
|
13209
|
-
);
|
|
13210
|
-
return {
|
|
13211
|
-
height: props.useCssHeight ? "100%" : visible,
|
|
13186
|
+
const containerStyle = useMemo(
|
|
13187
|
+
() => ({
|
|
13188
|
+
height: "100%",
|
|
13212
13189
|
width: fullSvgWidth
|
|
13213
|
-
}
|
|
13214
|
-
|
|
13215
|
-
|
|
13216
|
-
minimumRowDisplayed,
|
|
13217
|
-
rowHeight,
|
|
13218
|
-
fullSvgWidth,
|
|
13219
|
-
ganttHeight,
|
|
13220
|
-
props.useCssHeight
|
|
13221
|
-
]);
|
|
13190
|
+
}),
|
|
13191
|
+
[fullSvgWidth]
|
|
13192
|
+
);
|
|
13222
13193
|
const gridStyle = useMemo(
|
|
13223
13194
|
() => ({
|
|
13224
13195
|
height: Math.max(ganttFullHeight, minimumRowDisplayed * rowHeight),
|
|
@@ -13302,18 +13273,15 @@ const TaskGanttInner = (props) => {
|
|
|
13302
13273
|
moveStateHorRef.current = null;
|
|
13303
13274
|
contentContainer.classList.remove(styles$2.calendarDragging);
|
|
13304
13275
|
};
|
|
13305
|
-
|
|
13306
|
-
|
|
13307
|
-
|
|
13308
|
-
contentContainer.addEventListener("
|
|
13309
|
-
contentContainer.addEventListener("mousedown", startListener);
|
|
13310
|
-
contentContainer.addEventListener("mouseup", endListener);
|
|
13311
|
-
contentContainer.addEventListener("mouseout", endListener);
|
|
13276
|
+
contentContainer.addEventListener("mousemove", onScrollMove);
|
|
13277
|
+
contentContainer.addEventListener("mousedown", onScrollStart);
|
|
13278
|
+
contentContainer.addEventListener("mouseup", onScrollEnd);
|
|
13279
|
+
contentContainer.addEventListener("mouseout", onScrollEnd);
|
|
13312
13280
|
return () => {
|
|
13313
|
-
contentContainer.removeEventListener("mousemove",
|
|
13314
|
-
contentContainer.removeEventListener("mousedown",
|
|
13315
|
-
contentContainer.removeEventListener("mouseup",
|
|
13316
|
-
contentContainer.removeEventListener("mouseout",
|
|
13281
|
+
contentContainer.removeEventListener("mousemove", onScrollMove);
|
|
13282
|
+
contentContainer.removeEventListener("mousedown", onScrollStart);
|
|
13283
|
+
contentContainer.removeEventListener("mouseup", onScrollEnd);
|
|
13284
|
+
contentContainer.removeEventListener("mouseout", onScrollEnd);
|
|
13317
13285
|
};
|
|
13318
13286
|
}, [verticalScrollbarRef, horizontalContainerRef, verticalGanttContainerRef]);
|
|
13319
13287
|
return /* @__PURE__ */ jsxs(
|
|
@@ -18746,7 +18714,6 @@ const Gantt = (props) => {
|
|
|
18746
18714
|
);
|
|
18747
18715
|
return chosen;
|
|
18748
18716
|
}, [distances, ganttFullHeight, clientHeight, measuredHeight]);
|
|
18749
|
-
const isCssHeight = typeof clientHeight === "string";
|
|
18750
18717
|
const [taskToRowIndexMap, rowIndexToTaskMap, mapGlobalRowIndexToTask] = useMemo(
|
|
18751
18718
|
() => getMapTaskToRowIndex(visibleTasks, comparisonLevels),
|
|
18752
18719
|
[visibleTasks, comparisonLevels]
|
|
@@ -18940,30 +18907,14 @@ const Gantt = (props) => {
|
|
|
18940
18907
|
return () => {
|
|
18941
18908
|
};
|
|
18942
18909
|
}
|
|
18943
|
-
|
|
18944
|
-
const rect = el.getBoundingClientRect();
|
|
18945
|
-
let height = rect.height;
|
|
18946
|
-
try {
|
|
18947
|
-
let p = el.parentElement;
|
|
18948
|
-
while (p) {
|
|
18949
|
-
const pRect = p.getBoundingClientRect();
|
|
18950
|
-
if (pRect.height > height + 1) {
|
|
18951
|
-
height = pRect.height;
|
|
18952
|
-
break;
|
|
18953
|
-
}
|
|
18954
|
-
p = p.parentElement;
|
|
18955
|
-
}
|
|
18956
|
-
} catch (e) {
|
|
18957
|
-
}
|
|
18958
|
-
return height;
|
|
18959
|
-
};
|
|
18960
|
-
setMeasuredHeight(measureWithAncestorFallback(node));
|
|
18910
|
+
setMeasuredHeight(node.getBoundingClientRect().height);
|
|
18961
18911
|
const ResizeObserverCtor = window.ResizeObserver;
|
|
18962
18912
|
let ro;
|
|
18963
18913
|
if (typeof ResizeObserverCtor === "function") {
|
|
18964
18914
|
const ctor = ResizeObserverCtor;
|
|
18965
18915
|
ro = new ctor(() => {
|
|
18966
|
-
|
|
18916
|
+
const rect = node.getBoundingClientRect();
|
|
18917
|
+
setMeasuredHeight(rect.height);
|
|
18967
18918
|
});
|
|
18968
18919
|
ro.observe(node);
|
|
18969
18920
|
}
|
|
@@ -19875,8 +19826,6 @@ const Gantt = (props) => {
|
|
|
19875
19826
|
distances,
|
|
19876
19827
|
fullRowHeight,
|
|
19877
19828
|
ganttFullHeight,
|
|
19878
|
-
ganttHeight,
|
|
19879
|
-
useCssHeight: isCssHeight,
|
|
19880
19829
|
getTaskCurrentState,
|
|
19881
19830
|
handleAddTask,
|
|
19882
19831
|
handleDeleteTasks,
|
|
@@ -19906,8 +19855,6 @@ const Gantt = (props) => {
|
|
|
19906
19855
|
distances,
|
|
19907
19856
|
fullRowHeight,
|
|
19908
19857
|
ganttFullHeight,
|
|
19909
|
-
ganttHeight,
|
|
19910
|
-
isCssHeight,
|
|
19911
19858
|
getTaskCurrentState,
|
|
19912
19859
|
handleAddTask,
|
|
19913
19860
|
handleDeleteTasks,
|
|
@@ -19931,7 +19878,7 @@ const Gantt = (props) => {
|
|
|
19931
19878
|
return /* @__PURE__ */ jsx(GanttThemeProvider, { theme, children: (cssVars) => /* @__PURE__ */ jsx(GanttLocaleProvider, { locale, children: /* @__PURE__ */ jsxs(
|
|
19932
19879
|
"div",
|
|
19933
19880
|
{
|
|
19934
|
-
style:
|
|
19881
|
+
style: cssVars,
|
|
19935
19882
|
className: `${styles$2.wrapper} gantt`,
|
|
19936
19883
|
onKeyDown: handleKeyDown,
|
|
19937
19884
|
tabIndex: 0,
|
|
@@ -19948,8 +19895,6 @@ const Gantt = (props) => {
|
|
|
19948
19895
|
fullRowHeight,
|
|
19949
19896
|
fullSvgWidth,
|
|
19950
19897
|
ganttFullHeight,
|
|
19951
|
-
ganttHeight,
|
|
19952
|
-
useCssHeight: typeof clientHeight === "string",
|
|
19953
19898
|
ganttSVGRef,
|
|
19954
19899
|
ganttTodayProps: gridProps,
|
|
19955
19900
|
horizontalContainerRef,
|
|
@@ -10674,14 +10674,14 @@
|
|
|
10674
10674
|
);
|
|
10675
10675
|
};
|
|
10676
10676
|
const TaskListTable = React.memo(TaskListTableDefaultInner);
|
|
10677
|
-
const taskListRoot = "
|
|
10678
|
-
const taskListHorizontalScroll = "
|
|
10679
|
-
const taskListResizer = "
|
|
10680
|
-
const horizontalContainer$1 = "
|
|
10681
|
-
const tableWrapper = "
|
|
10682
|
-
const scrollToTop = "
|
|
10683
|
-
const scrollToBottom = "
|
|
10684
|
-
const hidden = "
|
|
10677
|
+
const taskListRoot = "_taskListRoot_3vx1x_1";
|
|
10678
|
+
const taskListHorizontalScroll = "_taskListHorizontalScroll_3vx1x_19";
|
|
10679
|
+
const taskListResizer = "_taskListResizer_3vx1x_81";
|
|
10680
|
+
const horizontalContainer$1 = "_horizontalContainer_3vx1x_145";
|
|
10681
|
+
const tableWrapper = "_tableWrapper_3vx1x_161";
|
|
10682
|
+
const scrollToTop = "_scrollToTop_3vx1x_175";
|
|
10683
|
+
const scrollToBottom = "_scrollToBottom_3vx1x_191";
|
|
10684
|
+
const hidden = "_hidden_3vx1x_207";
|
|
10685
10685
|
const styles$d = {
|
|
10686
10686
|
taskListRoot,
|
|
10687
10687
|
taskListHorizontalScroll,
|
|
@@ -10737,9 +10737,7 @@
|
|
|
10737
10737
|
tasks,
|
|
10738
10738
|
onResizeColumn,
|
|
10739
10739
|
canReorderTasks,
|
|
10740
|
-
tableBottom
|
|
10741
|
-
ganttHeight,
|
|
10742
|
-
useCssHeight
|
|
10740
|
+
tableBottom
|
|
10743
10741
|
}) => {
|
|
10744
10742
|
const [
|
|
10745
10743
|
columns,
|
|
@@ -10847,29 +10845,15 @@
|
|
|
10847
10845
|
ref: taskListContainerRef,
|
|
10848
10846
|
className: styles$d.horizontalContainer,
|
|
10849
10847
|
style: {
|
|
10850
|
-
// If consumer asked for CSS height (e.g. "100%"), let the
|
|
10851
|
-
// container fill its parent. Otherwise compute pixel height.
|
|
10852
|
-
height: ganttHeight == null && ganttHeight !== 0 && (typeof ganttHeight === "undefined" || useCssHeight) ? "100%" : (() => {
|
|
10853
|
-
const minRowsHeight = distances.minimumRowDisplayed * distances.rowHeight;
|
|
10854
|
-
const resolved = typeof ganttHeight === "number" ? ganttHeight : void 0;
|
|
10855
|
-
const visible = Math.max(
|
|
10856
|
-
minRowsHeight,
|
|
10857
|
-
Math.min(ganttFullHeight, resolved ?? ganttFullHeight)
|
|
10858
|
-
);
|
|
10859
|
-
return visible;
|
|
10860
|
-
})(),
|
|
10861
10848
|
width: taskListWidth
|
|
10862
10849
|
},
|
|
10863
10850
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
10864
10851
|
"div",
|
|
10865
10852
|
{
|
|
10866
10853
|
style: {
|
|
10867
|
-
height: Math.max(
|
|
10868
|
-
ganttFullHeight,
|
|
10869
|
-
distances.minimumRowDisplayed * distances.rowHeight
|
|
10870
|
-
),
|
|
10871
10854
|
backgroundSize: `100% ${fullRowHeight * 2}px`,
|
|
10872
|
-
backgroundImage: `linear-gradient(to bottom, transparent ${fullRowHeight}px, #f5f5f5 ${fullRowHeight}px)
|
|
10855
|
+
backgroundImage: `linear-gradient(to bottom, transparent ${fullRowHeight}px, #f5f5f5 ${fullRowHeight}px)`,
|
|
10856
|
+
height: "100%"
|
|
10873
10857
|
},
|
|
10874
10858
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
10875
10859
|
RenderTaskListTable,
|
|
@@ -13180,12 +13164,12 @@
|
|
|
13180
13164
|
] });
|
|
13181
13165
|
};
|
|
13182
13166
|
const TaskGanttContent = React.memo(TaskGanttContentInner);
|
|
13183
|
-
const ganttVerticalContainer = "
|
|
13184
|
-
const horizontalContainer = "
|
|
13185
|
-
const ganttHeader = "
|
|
13186
|
-
const ganttBodyScroll = "
|
|
13187
|
-
const wrapper = "
|
|
13188
|
-
const calendarDragging = "
|
|
13167
|
+
const ganttVerticalContainer = "_ganttVerticalContainer_7rmhe_1";
|
|
13168
|
+
const horizontalContainer = "_horizontalContainer_7rmhe_79";
|
|
13169
|
+
const ganttHeader = "_ganttHeader_7rmhe_95";
|
|
13170
|
+
const ganttBodyScroll = "_ganttBodyScroll_7rmhe_105";
|
|
13171
|
+
const wrapper = "_wrapper_7rmhe_121";
|
|
13172
|
+
const calendarDragging = "_calendarDragging_7rmhe_147";
|
|
13189
13173
|
const styles$2 = {
|
|
13190
13174
|
ganttVerticalContainer,
|
|
13191
13175
|
horizontalContainer,
|
|
@@ -13210,32 +13194,19 @@
|
|
|
13210
13194
|
horizontalContainerRef,
|
|
13211
13195
|
onVerticalScrollbarScrollX,
|
|
13212
13196
|
verticalGanttContainerRef,
|
|
13213
|
-
verticalScrollbarRef
|
|
13214
|
-
ganttHeight
|
|
13197
|
+
verticalScrollbarRef
|
|
13215
13198
|
} = props;
|
|
13216
13199
|
const contentRef = React.useRef(null);
|
|
13217
13200
|
const moveStateVertRef = React.useRef(null);
|
|
13218
13201
|
const moveStateHorRef = React.useRef(null);
|
|
13219
13202
|
const moveStateScrollRef = React.useRef(null);
|
|
13220
|
-
const containerStyle = React.useMemo(
|
|
13221
|
-
|
|
13222
|
-
|
|
13223
|
-
const visible = Math.max(
|
|
13224
|
-
minRowsHeight,
|
|
13225
|
-
Math.min(ganttFullHeight, resolved ?? ganttFullHeight)
|
|
13226
|
-
);
|
|
13227
|
-
return {
|
|
13228
|
-
height: props.useCssHeight ? "100%" : visible,
|
|
13203
|
+
const containerStyle = React.useMemo(
|
|
13204
|
+
() => ({
|
|
13205
|
+
height: "100%",
|
|
13229
13206
|
width: fullSvgWidth
|
|
13230
|
-
}
|
|
13231
|
-
|
|
13232
|
-
|
|
13233
|
-
minimumRowDisplayed,
|
|
13234
|
-
rowHeight,
|
|
13235
|
-
fullSvgWidth,
|
|
13236
|
-
ganttHeight,
|
|
13237
|
-
props.useCssHeight
|
|
13238
|
-
]);
|
|
13207
|
+
}),
|
|
13208
|
+
[fullSvgWidth]
|
|
13209
|
+
);
|
|
13239
13210
|
const gridStyle = React.useMemo(
|
|
13240
13211
|
() => ({
|
|
13241
13212
|
height: Math.max(ganttFullHeight, minimumRowDisplayed * rowHeight),
|
|
@@ -13319,18 +13290,15 @@
|
|
|
13319
13290
|
moveStateHorRef.current = null;
|
|
13320
13291
|
contentContainer.classList.remove(styles$2.calendarDragging);
|
|
13321
13292
|
};
|
|
13322
|
-
|
|
13323
|
-
|
|
13324
|
-
|
|
13325
|
-
contentContainer.addEventListener("
|
|
13326
|
-
contentContainer.addEventListener("mousedown", startListener);
|
|
13327
|
-
contentContainer.addEventListener("mouseup", endListener);
|
|
13328
|
-
contentContainer.addEventListener("mouseout", endListener);
|
|
13293
|
+
contentContainer.addEventListener("mousemove", onScrollMove);
|
|
13294
|
+
contentContainer.addEventListener("mousedown", onScrollStart);
|
|
13295
|
+
contentContainer.addEventListener("mouseup", onScrollEnd);
|
|
13296
|
+
contentContainer.addEventListener("mouseout", onScrollEnd);
|
|
13329
13297
|
return () => {
|
|
13330
|
-
contentContainer.removeEventListener("mousemove",
|
|
13331
|
-
contentContainer.removeEventListener("mousedown",
|
|
13332
|
-
contentContainer.removeEventListener("mouseup",
|
|
13333
|
-
contentContainer.removeEventListener("mouseout",
|
|
13298
|
+
contentContainer.removeEventListener("mousemove", onScrollMove);
|
|
13299
|
+
contentContainer.removeEventListener("mousedown", onScrollStart);
|
|
13300
|
+
contentContainer.removeEventListener("mouseup", onScrollEnd);
|
|
13301
|
+
contentContainer.removeEventListener("mouseout", onScrollEnd);
|
|
13334
13302
|
};
|
|
13335
13303
|
}, [verticalScrollbarRef, horizontalContainerRef, verticalGanttContainerRef]);
|
|
13336
13304
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -18763,7 +18731,6 @@
|
|
|
18763
18731
|
);
|
|
18764
18732
|
return chosen;
|
|
18765
18733
|
}, [distances, ganttFullHeight, clientHeight, measuredHeight]);
|
|
18766
|
-
const isCssHeight = typeof clientHeight === "string";
|
|
18767
18734
|
const [taskToRowIndexMap, rowIndexToTaskMap, mapGlobalRowIndexToTask] = React.useMemo(
|
|
18768
18735
|
() => getMapTaskToRowIndex(visibleTasks, comparisonLevels),
|
|
18769
18736
|
[visibleTasks, comparisonLevels]
|
|
@@ -18957,30 +18924,14 @@
|
|
|
18957
18924
|
return () => {
|
|
18958
18925
|
};
|
|
18959
18926
|
}
|
|
18960
|
-
|
|
18961
|
-
const rect = el.getBoundingClientRect();
|
|
18962
|
-
let height = rect.height;
|
|
18963
|
-
try {
|
|
18964
|
-
let p = el.parentElement;
|
|
18965
|
-
while (p) {
|
|
18966
|
-
const pRect = p.getBoundingClientRect();
|
|
18967
|
-
if (pRect.height > height + 1) {
|
|
18968
|
-
height = pRect.height;
|
|
18969
|
-
break;
|
|
18970
|
-
}
|
|
18971
|
-
p = p.parentElement;
|
|
18972
|
-
}
|
|
18973
|
-
} catch (e) {
|
|
18974
|
-
}
|
|
18975
|
-
return height;
|
|
18976
|
-
};
|
|
18977
|
-
setMeasuredHeight(measureWithAncestorFallback(node));
|
|
18927
|
+
setMeasuredHeight(node.getBoundingClientRect().height);
|
|
18978
18928
|
const ResizeObserverCtor = window.ResizeObserver;
|
|
18979
18929
|
let ro;
|
|
18980
18930
|
if (typeof ResizeObserverCtor === "function") {
|
|
18981
18931
|
const ctor = ResizeObserverCtor;
|
|
18982
18932
|
ro = new ctor(() => {
|
|
18983
|
-
|
|
18933
|
+
const rect = node.getBoundingClientRect();
|
|
18934
|
+
setMeasuredHeight(rect.height);
|
|
18984
18935
|
});
|
|
18985
18936
|
ro.observe(node);
|
|
18986
18937
|
}
|
|
@@ -19892,8 +19843,6 @@
|
|
|
19892
19843
|
distances,
|
|
19893
19844
|
fullRowHeight,
|
|
19894
19845
|
ganttFullHeight,
|
|
19895
|
-
ganttHeight,
|
|
19896
|
-
useCssHeight: isCssHeight,
|
|
19897
19846
|
getTaskCurrentState,
|
|
19898
19847
|
handleAddTask,
|
|
19899
19848
|
handleDeleteTasks,
|
|
@@ -19923,8 +19872,6 @@
|
|
|
19923
19872
|
distances,
|
|
19924
19873
|
fullRowHeight,
|
|
19925
19874
|
ganttFullHeight,
|
|
19926
|
-
ganttHeight,
|
|
19927
|
-
isCssHeight,
|
|
19928
19875
|
getTaskCurrentState,
|
|
19929
19876
|
handleAddTask,
|
|
19930
19877
|
handleDeleteTasks,
|
|
@@ -19948,7 +19895,7 @@
|
|
|
19948
19895
|
return /* @__PURE__ */ jsxRuntime.jsx(GanttThemeProvider, { theme, children: (cssVars) => /* @__PURE__ */ jsxRuntime.jsx(GanttLocaleProvider, { locale, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
19949
19896
|
"div",
|
|
19950
19897
|
{
|
|
19951
|
-
style:
|
|
19898
|
+
style: cssVars,
|
|
19952
19899
|
className: `${styles$2.wrapper} gantt`,
|
|
19953
19900
|
onKeyDown: handleKeyDown,
|
|
19954
19901
|
tabIndex: 0,
|
|
@@ -19965,8 +19912,6 @@
|
|
|
19965
19912
|
fullRowHeight,
|
|
19966
19913
|
fullSvgWidth,
|
|
19967
19914
|
ganttFullHeight,
|
|
19968
|
-
ganttHeight,
|
|
19969
|
-
useCssHeight: typeof clientHeight === "string",
|
|
19970
19915
|
ganttSVGRef,
|
|
19971
19916
|
ganttTodayProps: gridProps,
|
|
19972
19917
|
horizontalContainerRef,
|
package/dist/style.css
CHANGED
|
@@ -282,26 +282,32 @@
|
|
|
282
282
|
border-bottom: 1px solid var(--gantt-divider-color);
|
|
283
283
|
table-layout: fixed;
|
|
284
284
|
}
|
|
285
|
-
.
|
|
285
|
+
._taskListRoot_3vx1x_1 {
|
|
286
286
|
position: relative;
|
|
287
287
|
/*noinspection CssUnresolvedCustomProperty*/
|
|
288
288
|
border-left: 1px solid var(--gantt-table-divider-color, var(--gantt-divider-color));
|
|
289
|
+
height: 100%;
|
|
290
|
+
display: flex;
|
|
291
|
+
flex-direction: column;
|
|
289
292
|
}
|
|
290
293
|
|
|
291
|
-
.
|
|
294
|
+
._taskListHorizontalScroll_3vx1x_19 {
|
|
292
295
|
overflow-x: scroll;
|
|
296
|
+
flex: 1 1 auto;
|
|
297
|
+
display: flex;
|
|
298
|
+
flex-direction: column;
|
|
293
299
|
}
|
|
294
300
|
|
|
295
|
-
.
|
|
301
|
+
._taskListHorizontalScroll_3vx1x_19::-webkit-scrollbar {
|
|
296
302
|
width: 1rem;
|
|
297
303
|
height: 1rem;
|
|
298
304
|
}
|
|
299
305
|
|
|
300
|
-
.
|
|
306
|
+
._taskListHorizontalScroll_3vx1x_19::-webkit-scrollbar-corner {
|
|
301
307
|
background: transparent;
|
|
302
308
|
}
|
|
303
309
|
|
|
304
|
-
.
|
|
310
|
+
._taskListHorizontalScroll_3vx1x_19::-webkit-scrollbar-thumb {
|
|
305
311
|
border: 4px solid transparent;
|
|
306
312
|
/*noinspection CssUnresolvedCustomProperty*/
|
|
307
313
|
background: var(--gantt-scrollbar-thumb-color);
|
|
@@ -309,14 +315,14 @@
|
|
|
309
315
|
background-clip: padding-box;
|
|
310
316
|
}
|
|
311
317
|
|
|
312
|
-
.
|
|
318
|
+
._taskListHorizontalScroll_3vx1x_19::-webkit-scrollbar-thumb:hover {
|
|
313
319
|
border: 2px solid transparent;
|
|
314
320
|
/*noinspection CssUnresolvedCustomProperty*/
|
|
315
321
|
background: var(--gantt-scrollbar-thumb-color);
|
|
316
322
|
background-clip: padding-box;
|
|
317
323
|
}
|
|
318
324
|
|
|
319
|
-
.
|
|
325
|
+
._taskListResizer_3vx1x_81 {
|
|
320
326
|
position: absolute;
|
|
321
327
|
top: 0;
|
|
322
328
|
right: -3px;
|
|
@@ -328,16 +334,16 @@
|
|
|
328
334
|
}
|
|
329
335
|
|
|
330
336
|
/*noinspection CssUnresolvedCustomProperty*/
|
|
331
|
-
.
|
|
337
|
+
._taskListResizer_3vx1x_81:hover {
|
|
332
338
|
background-color: var(--gantt-table-hover-action-color);
|
|
333
339
|
filter: var(--gantt-hover-filter);
|
|
334
340
|
}
|
|
335
341
|
|
|
336
|
-
.
|
|
342
|
+
._taskListResizer_3vx1x_81:hover::before {
|
|
337
343
|
display: none;
|
|
338
344
|
}
|
|
339
345
|
|
|
340
|
-
.
|
|
346
|
+
._taskListResizer_3vx1x_81::before {
|
|
341
347
|
content: "";
|
|
342
348
|
position: absolute;
|
|
343
349
|
top: 0;
|
|
@@ -348,17 +354,22 @@
|
|
|
348
354
|
background-color: var(--gantt-table-resize-color, var(--gantt-divider-color));
|
|
349
355
|
}
|
|
350
356
|
|
|
351
|
-
.
|
|
357
|
+
._horizontalContainer_3vx1x_145 {
|
|
352
358
|
margin: 0;
|
|
353
359
|
padding: 0;
|
|
354
360
|
overflow: hidden;
|
|
361
|
+
height: 100%;
|
|
362
|
+
min-height: 0;
|
|
355
363
|
}
|
|
356
364
|
|
|
357
|
-
.
|
|
365
|
+
._tableWrapper_3vx1x_161 {
|
|
358
366
|
position: relative;
|
|
367
|
+
flex: 1 1 auto;
|
|
368
|
+
display: flex;
|
|
369
|
+
flex-direction: column;
|
|
359
370
|
}
|
|
360
371
|
|
|
361
|
-
.
|
|
372
|
+
._scrollToTop_3vx1x_175 {
|
|
362
373
|
position: absolute;
|
|
363
374
|
top: 0;
|
|
364
375
|
left: 0;
|
|
@@ -366,7 +377,7 @@
|
|
|
366
377
|
height: 20px;
|
|
367
378
|
}
|
|
368
379
|
|
|
369
|
-
.
|
|
380
|
+
._scrollToBottom_3vx1x_191 {
|
|
370
381
|
position: absolute;
|
|
371
382
|
bottom: 0;
|
|
372
383
|
left: 0;
|
|
@@ -374,7 +385,7 @@
|
|
|
374
385
|
height: 20px;
|
|
375
386
|
}
|
|
376
387
|
|
|
377
|
-
.
|
|
388
|
+
._hidden_3vx1x_207 {
|
|
378
389
|
display: none;
|
|
379
390
|
}
|
|
380
391
|
._ganttToday_1oyhk_1 {
|
|
@@ -568,29 +579,31 @@
|
|
|
568
579
|
user-select: none;
|
|
569
580
|
stroke-width: 0;
|
|
570
581
|
}
|
|
571
|
-
.
|
|
582
|
+
._ganttVerticalContainer_7rmhe_1 {
|
|
572
583
|
display: flex;
|
|
573
584
|
flex-direction: column;
|
|
574
|
-
overflow-x:
|
|
575
|
-
overflow-y:
|
|
585
|
+
overflow-x: hidden;
|
|
586
|
+
overflow-y: hidden;
|
|
576
587
|
font-size: 0;
|
|
577
588
|
margin: 0;
|
|
578
589
|
padding: 0;
|
|
579
590
|
/*noinspection CssUnresolvedCustomProperty*/
|
|
580
591
|
border-right: 1px solid var(--gantt-calendar-divider-color, var(--gantt-divider-color));
|
|
581
592
|
flex-grow: 1;
|
|
593
|
+
height: 100%;
|
|
594
|
+
min-height: 0;
|
|
582
595
|
}
|
|
583
596
|
|
|
584
|
-
.
|
|
597
|
+
._ganttVerticalContainer_7rmhe_1::-webkit-scrollbar {
|
|
585
598
|
width: 1rem;
|
|
586
599
|
height: 1rem;
|
|
587
600
|
}
|
|
588
601
|
|
|
589
|
-
.
|
|
602
|
+
._ganttVerticalContainer_7rmhe_1::-webkit-scrollbar-corner {
|
|
590
603
|
background: transparent;
|
|
591
604
|
}
|
|
592
605
|
|
|
593
|
-
.
|
|
606
|
+
._ganttVerticalContainer_7rmhe_1::-webkit-scrollbar-thumb {
|
|
594
607
|
border: 4px solid transparent;
|
|
595
608
|
/*noinspection CssUnresolvedCustomProperty*/
|
|
596
609
|
background: var(--gantt-scrollbar-thumb-color);
|
|
@@ -598,31 +611,35 @@
|
|
|
598
611
|
background-clip: padding-box;
|
|
599
612
|
}
|
|
600
613
|
|
|
601
|
-
.
|
|
614
|
+
._ganttVerticalContainer_7rmhe_1::-webkit-scrollbar-thumb:hover {
|
|
602
615
|
border: 2px solid transparent;
|
|
603
616
|
/*noinspection CssUnresolvedCustomProperty*/
|
|
604
617
|
background: var(--gantt-scrollbar-thumb-color);
|
|
605
618
|
background-clip: padding-box;
|
|
606
619
|
}
|
|
607
620
|
|
|
608
|
-
.
|
|
621
|
+
._horizontalContainer_7rmhe_79 {
|
|
609
622
|
margin: 0;
|
|
610
623
|
padding: 0;
|
|
611
624
|
overflow: hidden;
|
|
625
|
+
height: 100%;
|
|
626
|
+
min-height: 0;
|
|
612
627
|
}
|
|
613
628
|
|
|
614
|
-
.
|
|
629
|
+
._ganttHeader_7rmhe_95 {
|
|
615
630
|
flex: 0 0 auto;
|
|
616
631
|
z-index: 3;
|
|
617
632
|
}
|
|
618
633
|
|
|
619
|
-
.
|
|
634
|
+
._ganttBodyScroll_7rmhe_105 {
|
|
620
635
|
flex: 1 1 auto;
|
|
621
636
|
overflow-y: auto;
|
|
622
637
|
overflow-x: hidden;
|
|
638
|
+
min-height: 0;
|
|
639
|
+
height: 100%;
|
|
623
640
|
}
|
|
624
641
|
|
|
625
|
-
.
|
|
642
|
+
._wrapper_7rmhe_121 {
|
|
626
643
|
display: flex;
|
|
627
644
|
padding: 0;
|
|
628
645
|
margin: 0;
|
|
@@ -631,9 +648,11 @@
|
|
|
631
648
|
position: relative;
|
|
632
649
|
/*noinspection CssUnresolvedCustomProperty*/
|
|
633
650
|
border-bottom: 1px solid var(--gantt-divider-color);
|
|
651
|
+
height: 100%;
|
|
652
|
+
min-height: 0;
|
|
634
653
|
}
|
|
635
654
|
|
|
636
|
-
.
|
|
655
|
+
._calendarDragging_7rmhe_147 {
|
|
637
656
|
cursor: grabbing;
|
|
638
657
|
}
|
|
639
658
|
/*noinspection CssUnresolvedCustomProperty*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gantt-task-react-v",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.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",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
],
|
|
24
24
|
"scripts": {
|
|
25
25
|
"storybook": "start-storybook -p 6006",
|
|
26
|
-
|
|
26
|
+
"build": "vite build && node -e \"require('child_process').execSync('tsc', {stdio:'inherit'})\"",
|
|
27
27
|
"start": "vite --host",
|
|
28
28
|
"prepare": "npm run build",
|
|
29
29
|
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
|