gantt-task-react-v 1.0.13 → 1.0.14
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,17 +10828,10 @@ const TaskListInner = ({
|
|
|
10830
10828
|
ref: taskListContainerRef,
|
|
10831
10829
|
className: styles$d.horizontalContainer,
|
|
10832
10830
|
style: {
|
|
10833
|
-
|
|
10834
|
-
|
|
10835
|
-
|
|
10836
|
-
|
|
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
|
-
})(),
|
|
10831
|
+
height: Math.min(
|
|
10832
|
+
ganttFullHeight,
|
|
10833
|
+
distances.minimumRowDisplayed * distances.rowHeight
|
|
10834
|
+
),
|
|
10844
10835
|
width: taskListWidth
|
|
10845
10836
|
},
|
|
10846
10837
|
children: /* @__PURE__ */ jsx(
|
|
@@ -13163,12 +13154,12 @@ const TaskGanttContentInner = (props) => {
|
|
|
13163
13154
|
] });
|
|
13164
13155
|
};
|
|
13165
13156
|
const TaskGanttContent = memo(TaskGanttContentInner);
|
|
13166
|
-
const ganttVerticalContainer = "
|
|
13167
|
-
const horizontalContainer = "
|
|
13168
|
-
const ganttHeader = "
|
|
13169
|
-
const ganttBodyScroll = "
|
|
13170
|
-
const wrapper = "
|
|
13171
|
-
const calendarDragging = "
|
|
13157
|
+
const ganttVerticalContainer = "_ganttVerticalContainer_7rmhe_1";
|
|
13158
|
+
const horizontalContainer = "_horizontalContainer_7rmhe_79";
|
|
13159
|
+
const ganttHeader = "_ganttHeader_7rmhe_95";
|
|
13160
|
+
const ganttBodyScroll = "_ganttBodyScroll_7rmhe_105";
|
|
13161
|
+
const wrapper = "_wrapper_7rmhe_121";
|
|
13162
|
+
const calendarDragging = "_calendarDragging_7rmhe_147";
|
|
13172
13163
|
const styles$2 = {
|
|
13173
13164
|
ganttVerticalContainer,
|
|
13174
13165
|
horizontalContainer,
|
|
@@ -13193,32 +13184,19 @@ const TaskGanttInner = (props) => {
|
|
|
13193
13184
|
horizontalContainerRef,
|
|
13194
13185
|
onVerticalScrollbarScrollX,
|
|
13195
13186
|
verticalGanttContainerRef,
|
|
13196
|
-
verticalScrollbarRef
|
|
13197
|
-
ganttHeight
|
|
13187
|
+
verticalScrollbarRef
|
|
13198
13188
|
} = props;
|
|
13199
13189
|
const contentRef = React__default.useRef(null);
|
|
13200
13190
|
const moveStateVertRef = useRef(null);
|
|
13201
13191
|
const moveStateHorRef = useRef(null);
|
|
13202
13192
|
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,
|
|
13193
|
+
const containerStyle = useMemo(
|
|
13194
|
+
() => ({
|
|
13195
|
+
height: "100%",
|
|
13212
13196
|
width: fullSvgWidth
|
|
13213
|
-
}
|
|
13214
|
-
|
|
13215
|
-
|
|
13216
|
-
minimumRowDisplayed,
|
|
13217
|
-
rowHeight,
|
|
13218
|
-
fullSvgWidth,
|
|
13219
|
-
ganttHeight,
|
|
13220
|
-
props.useCssHeight
|
|
13221
|
-
]);
|
|
13197
|
+
}),
|
|
13198
|
+
[fullSvgWidth]
|
|
13199
|
+
);
|
|
13222
13200
|
const gridStyle = useMemo(
|
|
13223
13201
|
() => ({
|
|
13224
13202
|
height: Math.max(ganttFullHeight, minimumRowDisplayed * rowHeight),
|
|
@@ -13302,18 +13280,15 @@ const TaskGanttInner = (props) => {
|
|
|
13302
13280
|
moveStateHorRef.current = null;
|
|
13303
13281
|
contentContainer.classList.remove(styles$2.calendarDragging);
|
|
13304
13282
|
};
|
|
13305
|
-
|
|
13306
|
-
|
|
13307
|
-
|
|
13308
|
-
contentContainer.addEventListener("
|
|
13309
|
-
contentContainer.addEventListener("mousedown", startListener);
|
|
13310
|
-
contentContainer.addEventListener("mouseup", endListener);
|
|
13311
|
-
contentContainer.addEventListener("mouseout", endListener);
|
|
13283
|
+
contentContainer.addEventListener("mousemove", onScrollMove);
|
|
13284
|
+
contentContainer.addEventListener("mousedown", onScrollStart);
|
|
13285
|
+
contentContainer.addEventListener("mouseup", onScrollEnd);
|
|
13286
|
+
contentContainer.addEventListener("mouseout", onScrollEnd);
|
|
13312
13287
|
return () => {
|
|
13313
|
-
contentContainer.removeEventListener("mousemove",
|
|
13314
|
-
contentContainer.removeEventListener("mousedown",
|
|
13315
|
-
contentContainer.removeEventListener("mouseup",
|
|
13316
|
-
contentContainer.removeEventListener("mouseout",
|
|
13288
|
+
contentContainer.removeEventListener("mousemove", onScrollMove);
|
|
13289
|
+
contentContainer.removeEventListener("mousedown", onScrollStart);
|
|
13290
|
+
contentContainer.removeEventListener("mouseup", onScrollEnd);
|
|
13291
|
+
contentContainer.removeEventListener("mouseout", onScrollEnd);
|
|
13317
13292
|
};
|
|
13318
13293
|
}, [verticalScrollbarRef, horizontalContainerRef, verticalGanttContainerRef]);
|
|
13319
13294
|
return /* @__PURE__ */ jsxs(
|
|
@@ -18746,7 +18721,6 @@ const Gantt = (props) => {
|
|
|
18746
18721
|
);
|
|
18747
18722
|
return chosen;
|
|
18748
18723
|
}, [distances, ganttFullHeight, clientHeight, measuredHeight]);
|
|
18749
|
-
const isCssHeight = typeof clientHeight === "string";
|
|
18750
18724
|
const [taskToRowIndexMap, rowIndexToTaskMap, mapGlobalRowIndexToTask] = useMemo(
|
|
18751
18725
|
() => getMapTaskToRowIndex(visibleTasks, comparisonLevels),
|
|
18752
18726
|
[visibleTasks, comparisonLevels]
|
|
@@ -18940,30 +18914,14 @@ const Gantt = (props) => {
|
|
|
18940
18914
|
return () => {
|
|
18941
18915
|
};
|
|
18942
18916
|
}
|
|
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));
|
|
18917
|
+
setMeasuredHeight(node.getBoundingClientRect().height);
|
|
18961
18918
|
const ResizeObserverCtor = window.ResizeObserver;
|
|
18962
18919
|
let ro;
|
|
18963
18920
|
if (typeof ResizeObserverCtor === "function") {
|
|
18964
18921
|
const ctor = ResizeObserverCtor;
|
|
18965
18922
|
ro = new ctor(() => {
|
|
18966
|
-
|
|
18923
|
+
const rect = node.getBoundingClientRect();
|
|
18924
|
+
setMeasuredHeight(rect.height);
|
|
18967
18925
|
});
|
|
18968
18926
|
ro.observe(node);
|
|
18969
18927
|
}
|
|
@@ -19875,8 +19833,6 @@ const Gantt = (props) => {
|
|
|
19875
19833
|
distances,
|
|
19876
19834
|
fullRowHeight,
|
|
19877
19835
|
ganttFullHeight,
|
|
19878
|
-
ganttHeight,
|
|
19879
|
-
useCssHeight: isCssHeight,
|
|
19880
19836
|
getTaskCurrentState,
|
|
19881
19837
|
handleAddTask,
|
|
19882
19838
|
handleDeleteTasks,
|
|
@@ -19906,8 +19862,6 @@ const Gantt = (props) => {
|
|
|
19906
19862
|
distances,
|
|
19907
19863
|
fullRowHeight,
|
|
19908
19864
|
ganttFullHeight,
|
|
19909
|
-
ganttHeight,
|
|
19910
|
-
isCssHeight,
|
|
19911
19865
|
getTaskCurrentState,
|
|
19912
19866
|
handleAddTask,
|
|
19913
19867
|
handleDeleteTasks,
|
|
@@ -19931,7 +19885,7 @@ const Gantt = (props) => {
|
|
|
19931
19885
|
return /* @__PURE__ */ jsx(GanttThemeProvider, { theme, children: (cssVars) => /* @__PURE__ */ jsx(GanttLocaleProvider, { locale, children: /* @__PURE__ */ jsxs(
|
|
19932
19886
|
"div",
|
|
19933
19887
|
{
|
|
19934
|
-
style:
|
|
19888
|
+
style: cssVars,
|
|
19935
19889
|
className: `${styles$2.wrapper} gantt`,
|
|
19936
19890
|
onKeyDown: handleKeyDown,
|
|
19937
19891
|
tabIndex: 0,
|
|
@@ -19948,8 +19902,6 @@ const Gantt = (props) => {
|
|
|
19948
19902
|
fullRowHeight,
|
|
19949
19903
|
fullSvgWidth,
|
|
19950
19904
|
ganttFullHeight,
|
|
19951
|
-
ganttHeight,
|
|
19952
|
-
useCssHeight: typeof clientHeight === "string",
|
|
19953
19905
|
ganttSVGRef,
|
|
19954
19906
|
ganttTodayProps: gridProps,
|
|
19955
19907
|
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,17 +10845,10 @@
|
|
|
10847
10845
|
ref: taskListContainerRef,
|
|
10848
10846
|
className: styles$d.horizontalContainer,
|
|
10849
10847
|
style: {
|
|
10850
|
-
|
|
10851
|
-
|
|
10852
|
-
|
|
10853
|
-
|
|
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
|
-
})(),
|
|
10848
|
+
height: Math.min(
|
|
10849
|
+
ganttFullHeight,
|
|
10850
|
+
distances.minimumRowDisplayed * distances.rowHeight
|
|
10851
|
+
),
|
|
10861
10852
|
width: taskListWidth
|
|
10862
10853
|
},
|
|
10863
10854
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -13180,12 +13171,12 @@
|
|
|
13180
13171
|
] });
|
|
13181
13172
|
};
|
|
13182
13173
|
const TaskGanttContent = React.memo(TaskGanttContentInner);
|
|
13183
|
-
const ganttVerticalContainer = "
|
|
13184
|
-
const horizontalContainer = "
|
|
13185
|
-
const ganttHeader = "
|
|
13186
|
-
const ganttBodyScroll = "
|
|
13187
|
-
const wrapper = "
|
|
13188
|
-
const calendarDragging = "
|
|
13174
|
+
const ganttVerticalContainer = "_ganttVerticalContainer_7rmhe_1";
|
|
13175
|
+
const horizontalContainer = "_horizontalContainer_7rmhe_79";
|
|
13176
|
+
const ganttHeader = "_ganttHeader_7rmhe_95";
|
|
13177
|
+
const ganttBodyScroll = "_ganttBodyScroll_7rmhe_105";
|
|
13178
|
+
const wrapper = "_wrapper_7rmhe_121";
|
|
13179
|
+
const calendarDragging = "_calendarDragging_7rmhe_147";
|
|
13189
13180
|
const styles$2 = {
|
|
13190
13181
|
ganttVerticalContainer,
|
|
13191
13182
|
horizontalContainer,
|
|
@@ -13210,32 +13201,19 @@
|
|
|
13210
13201
|
horizontalContainerRef,
|
|
13211
13202
|
onVerticalScrollbarScrollX,
|
|
13212
13203
|
verticalGanttContainerRef,
|
|
13213
|
-
verticalScrollbarRef
|
|
13214
|
-
ganttHeight
|
|
13204
|
+
verticalScrollbarRef
|
|
13215
13205
|
} = props;
|
|
13216
13206
|
const contentRef = React.useRef(null);
|
|
13217
13207
|
const moveStateVertRef = React.useRef(null);
|
|
13218
13208
|
const moveStateHorRef = React.useRef(null);
|
|
13219
13209
|
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,
|
|
13210
|
+
const containerStyle = React.useMemo(
|
|
13211
|
+
() => ({
|
|
13212
|
+
height: "100%",
|
|
13229
13213
|
width: fullSvgWidth
|
|
13230
|
-
}
|
|
13231
|
-
|
|
13232
|
-
|
|
13233
|
-
minimumRowDisplayed,
|
|
13234
|
-
rowHeight,
|
|
13235
|
-
fullSvgWidth,
|
|
13236
|
-
ganttHeight,
|
|
13237
|
-
props.useCssHeight
|
|
13238
|
-
]);
|
|
13214
|
+
}),
|
|
13215
|
+
[fullSvgWidth]
|
|
13216
|
+
);
|
|
13239
13217
|
const gridStyle = React.useMemo(
|
|
13240
13218
|
() => ({
|
|
13241
13219
|
height: Math.max(ganttFullHeight, minimumRowDisplayed * rowHeight),
|
|
@@ -13319,18 +13297,15 @@
|
|
|
13319
13297
|
moveStateHorRef.current = null;
|
|
13320
13298
|
contentContainer.classList.remove(styles$2.calendarDragging);
|
|
13321
13299
|
};
|
|
13322
|
-
|
|
13323
|
-
|
|
13324
|
-
|
|
13325
|
-
contentContainer.addEventListener("
|
|
13326
|
-
contentContainer.addEventListener("mousedown", startListener);
|
|
13327
|
-
contentContainer.addEventListener("mouseup", endListener);
|
|
13328
|
-
contentContainer.addEventListener("mouseout", endListener);
|
|
13300
|
+
contentContainer.addEventListener("mousemove", onScrollMove);
|
|
13301
|
+
contentContainer.addEventListener("mousedown", onScrollStart);
|
|
13302
|
+
contentContainer.addEventListener("mouseup", onScrollEnd);
|
|
13303
|
+
contentContainer.addEventListener("mouseout", onScrollEnd);
|
|
13329
13304
|
return () => {
|
|
13330
|
-
contentContainer.removeEventListener("mousemove",
|
|
13331
|
-
contentContainer.removeEventListener("mousedown",
|
|
13332
|
-
contentContainer.removeEventListener("mouseup",
|
|
13333
|
-
contentContainer.removeEventListener("mouseout",
|
|
13305
|
+
contentContainer.removeEventListener("mousemove", onScrollMove);
|
|
13306
|
+
contentContainer.removeEventListener("mousedown", onScrollStart);
|
|
13307
|
+
contentContainer.removeEventListener("mouseup", onScrollEnd);
|
|
13308
|
+
contentContainer.removeEventListener("mouseout", onScrollEnd);
|
|
13334
13309
|
};
|
|
13335
13310
|
}, [verticalScrollbarRef, horizontalContainerRef, verticalGanttContainerRef]);
|
|
13336
13311
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -18763,7 +18738,6 @@
|
|
|
18763
18738
|
);
|
|
18764
18739
|
return chosen;
|
|
18765
18740
|
}, [distances, ganttFullHeight, clientHeight, measuredHeight]);
|
|
18766
|
-
const isCssHeight = typeof clientHeight === "string";
|
|
18767
18741
|
const [taskToRowIndexMap, rowIndexToTaskMap, mapGlobalRowIndexToTask] = React.useMemo(
|
|
18768
18742
|
() => getMapTaskToRowIndex(visibleTasks, comparisonLevels),
|
|
18769
18743
|
[visibleTasks, comparisonLevels]
|
|
@@ -18957,30 +18931,14 @@
|
|
|
18957
18931
|
return () => {
|
|
18958
18932
|
};
|
|
18959
18933
|
}
|
|
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));
|
|
18934
|
+
setMeasuredHeight(node.getBoundingClientRect().height);
|
|
18978
18935
|
const ResizeObserverCtor = window.ResizeObserver;
|
|
18979
18936
|
let ro;
|
|
18980
18937
|
if (typeof ResizeObserverCtor === "function") {
|
|
18981
18938
|
const ctor = ResizeObserverCtor;
|
|
18982
18939
|
ro = new ctor(() => {
|
|
18983
|
-
|
|
18940
|
+
const rect = node.getBoundingClientRect();
|
|
18941
|
+
setMeasuredHeight(rect.height);
|
|
18984
18942
|
});
|
|
18985
18943
|
ro.observe(node);
|
|
18986
18944
|
}
|
|
@@ -19892,8 +19850,6 @@
|
|
|
19892
19850
|
distances,
|
|
19893
19851
|
fullRowHeight,
|
|
19894
19852
|
ganttFullHeight,
|
|
19895
|
-
ganttHeight,
|
|
19896
|
-
useCssHeight: isCssHeight,
|
|
19897
19853
|
getTaskCurrentState,
|
|
19898
19854
|
handleAddTask,
|
|
19899
19855
|
handleDeleteTasks,
|
|
@@ -19923,8 +19879,6 @@
|
|
|
19923
19879
|
distances,
|
|
19924
19880
|
fullRowHeight,
|
|
19925
19881
|
ganttFullHeight,
|
|
19926
|
-
ganttHeight,
|
|
19927
|
-
isCssHeight,
|
|
19928
19882
|
getTaskCurrentState,
|
|
19929
19883
|
handleAddTask,
|
|
19930
19884
|
handleDeleteTasks,
|
|
@@ -19948,7 +19902,7 @@
|
|
|
19948
19902
|
return /* @__PURE__ */ jsxRuntime.jsx(GanttThemeProvider, { theme, children: (cssVars) => /* @__PURE__ */ jsxRuntime.jsx(GanttLocaleProvider, { locale, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
19949
19903
|
"div",
|
|
19950
19904
|
{
|
|
19951
|
-
style:
|
|
19905
|
+
style: cssVars,
|
|
19952
19906
|
className: `${styles$2.wrapper} gantt`,
|
|
19953
19907
|
onKeyDown: handleKeyDown,
|
|
19954
19908
|
tabIndex: 0,
|
|
@@ -19965,8 +19919,6 @@
|
|
|
19965
19919
|
fullRowHeight,
|
|
19966
19920
|
fullSvgWidth,
|
|
19967
19921
|
ganttFullHeight,
|
|
19968
|
-
ganttHeight,
|
|
19969
|
-
useCssHeight: typeof clientHeight === "string",
|
|
19970
19922
|
ganttSVGRef,
|
|
19971
19923
|
ganttTodayProps: gridProps,
|
|
19972
19924
|
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.14",
|
|
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",
|