gantt-task-react-v 1.0.8 → 1.0.10
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.
- package/dist/gantt-task-react.es.js +37 -22
- package/dist/gantt-task-react.umd.js +37 -22
- package/dist/style.css +12 -12
- package/package.json +1 -1
|
@@ -13155,12 +13155,12 @@ const TaskGanttContentInner = (props) => {
|
|
|
13155
13155
|
] });
|
|
13156
13156
|
};
|
|
13157
13157
|
const TaskGanttContent = memo(TaskGanttContentInner);
|
|
13158
|
-
const ganttVerticalContainer = "
|
|
13159
|
-
const horizontalContainer = "
|
|
13160
|
-
const ganttHeader = "
|
|
13161
|
-
const ganttBodyScroll = "
|
|
13162
|
-
const wrapper = "
|
|
13163
|
-
const calendarDragging = "
|
|
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";
|
|
13164
13164
|
const styles$2 = {
|
|
13165
13165
|
ganttVerticalContainer,
|
|
13166
13166
|
horizontalContainer,
|
|
@@ -13185,19 +13185,31 @@ const TaskGanttInner = (props) => {
|
|
|
13185
13185
|
horizontalContainerRef,
|
|
13186
13186
|
onVerticalScrollbarScrollX,
|
|
13187
13187
|
verticalGanttContainerRef,
|
|
13188
|
-
verticalScrollbarRef
|
|
13188
|
+
verticalScrollbarRef,
|
|
13189
|
+
ganttHeight
|
|
13189
13190
|
} = props;
|
|
13190
13191
|
const contentRef = React__default.useRef(null);
|
|
13191
13192
|
const moveStateVertRef = useRef(null);
|
|
13192
13193
|
const moveStateHorRef = useRef(null);
|
|
13193
13194
|
const moveStateScrollRef = useRef(null);
|
|
13194
|
-
const containerStyle = useMemo(
|
|
13195
|
-
|
|
13196
|
-
|
|
13195
|
+
const containerStyle = useMemo(() => {
|
|
13196
|
+
const minRowsHeight = minimumRowDisplayed * rowHeight;
|
|
13197
|
+
const resolved = typeof ganttHeight === "number" ? ganttHeight : void 0;
|
|
13198
|
+
const visible = Math.max(
|
|
13199
|
+
minRowsHeight,
|
|
13200
|
+
Math.min(ganttFullHeight, resolved ?? ganttFullHeight)
|
|
13201
|
+
);
|
|
13202
|
+
return {
|
|
13203
|
+
height: visible,
|
|
13197
13204
|
width: fullSvgWidth
|
|
13198
|
-
}
|
|
13199
|
-
|
|
13200
|
-
|
|
13205
|
+
};
|
|
13206
|
+
}, [
|
|
13207
|
+
ganttFullHeight,
|
|
13208
|
+
minimumRowDisplayed,
|
|
13209
|
+
rowHeight,
|
|
13210
|
+
fullSvgWidth,
|
|
13211
|
+
ganttHeight
|
|
13212
|
+
]);
|
|
13201
13213
|
const gridStyle = useMemo(
|
|
13202
13214
|
() => ({
|
|
13203
13215
|
height: Math.max(ganttFullHeight, minimumRowDisplayed * rowHeight),
|
|
@@ -13281,15 +13293,18 @@ const TaskGanttInner = (props) => {
|
|
|
13281
13293
|
moveStateHorRef.current = null;
|
|
13282
13294
|
contentContainer.classList.remove(styles$2.calendarDragging);
|
|
13283
13295
|
};
|
|
13284
|
-
|
|
13285
|
-
|
|
13286
|
-
|
|
13287
|
-
contentContainer.addEventListener("
|
|
13296
|
+
const moveListener = (evt) => onScrollMove(evt);
|
|
13297
|
+
const startListener = (evt) => onScrollStart(evt);
|
|
13298
|
+
const endListener = (evt) => onScrollEnd(evt);
|
|
13299
|
+
contentContainer.addEventListener("mousemove", moveListener);
|
|
13300
|
+
contentContainer.addEventListener("mousedown", startListener);
|
|
13301
|
+
contentContainer.addEventListener("mouseup", endListener);
|
|
13302
|
+
contentContainer.addEventListener("mouseout", endListener);
|
|
13288
13303
|
return () => {
|
|
13289
|
-
contentContainer.removeEventListener("mousemove",
|
|
13290
|
-
contentContainer.removeEventListener("mousedown",
|
|
13291
|
-
contentContainer.removeEventListener("mouseup",
|
|
13292
|
-
contentContainer.removeEventListener("mouseout",
|
|
13304
|
+
contentContainer.removeEventListener("mousemove", moveListener);
|
|
13305
|
+
contentContainer.removeEventListener("mousedown", startListener);
|
|
13306
|
+
contentContainer.removeEventListener("mouseup", endListener);
|
|
13307
|
+
contentContainer.removeEventListener("mouseout", endListener);
|
|
13293
13308
|
};
|
|
13294
13309
|
}, [verticalScrollbarRef, horizontalContainerRef, verticalGanttContainerRef]);
|
|
13295
13310
|
return /* @__PURE__ */ jsxs(
|
|
@@ -19888,7 +19903,7 @@ const Gantt = (props) => {
|
|
|
19888
19903
|
return /* @__PURE__ */ jsx(GanttThemeProvider, { theme, children: (cssVars) => /* @__PURE__ */ jsx(GanttLocaleProvider, { locale, children: /* @__PURE__ */ jsxs(
|
|
19889
19904
|
"div",
|
|
19890
19905
|
{
|
|
19891
|
-
style: cssVars,
|
|
19906
|
+
style: typeof clientHeight === "string" ? { ...cssVars, height: clientHeight } : cssVars,
|
|
19892
19907
|
className: `${styles$2.wrapper} gantt`,
|
|
19893
19908
|
onKeyDown: handleKeyDown,
|
|
19894
19909
|
tabIndex: 0,
|
|
@@ -13172,12 +13172,12 @@
|
|
|
13172
13172
|
] });
|
|
13173
13173
|
};
|
|
13174
13174
|
const TaskGanttContent = React.memo(TaskGanttContentInner);
|
|
13175
|
-
const ganttVerticalContainer = "
|
|
13176
|
-
const horizontalContainer = "
|
|
13177
|
-
const ganttHeader = "
|
|
13178
|
-
const ganttBodyScroll = "
|
|
13179
|
-
const wrapper = "
|
|
13180
|
-
const calendarDragging = "
|
|
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";
|
|
13181
13181
|
const styles$2 = {
|
|
13182
13182
|
ganttVerticalContainer,
|
|
13183
13183
|
horizontalContainer,
|
|
@@ -13202,19 +13202,31 @@
|
|
|
13202
13202
|
horizontalContainerRef,
|
|
13203
13203
|
onVerticalScrollbarScrollX,
|
|
13204
13204
|
verticalGanttContainerRef,
|
|
13205
|
-
verticalScrollbarRef
|
|
13205
|
+
verticalScrollbarRef,
|
|
13206
|
+
ganttHeight
|
|
13206
13207
|
} = props;
|
|
13207
13208
|
const contentRef = React.useRef(null);
|
|
13208
13209
|
const moveStateVertRef = React.useRef(null);
|
|
13209
13210
|
const moveStateHorRef = React.useRef(null);
|
|
13210
13211
|
const moveStateScrollRef = React.useRef(null);
|
|
13211
|
-
const containerStyle = React.useMemo(
|
|
13212
|
-
|
|
13213
|
-
|
|
13212
|
+
const containerStyle = React.useMemo(() => {
|
|
13213
|
+
const minRowsHeight = minimumRowDisplayed * rowHeight;
|
|
13214
|
+
const resolved = typeof ganttHeight === "number" ? ganttHeight : void 0;
|
|
13215
|
+
const visible = Math.max(
|
|
13216
|
+
minRowsHeight,
|
|
13217
|
+
Math.min(ganttFullHeight, resolved ?? ganttFullHeight)
|
|
13218
|
+
);
|
|
13219
|
+
return {
|
|
13220
|
+
height: visible,
|
|
13214
13221
|
width: fullSvgWidth
|
|
13215
|
-
}
|
|
13216
|
-
|
|
13217
|
-
|
|
13222
|
+
};
|
|
13223
|
+
}, [
|
|
13224
|
+
ganttFullHeight,
|
|
13225
|
+
minimumRowDisplayed,
|
|
13226
|
+
rowHeight,
|
|
13227
|
+
fullSvgWidth,
|
|
13228
|
+
ganttHeight
|
|
13229
|
+
]);
|
|
13218
13230
|
const gridStyle = React.useMemo(
|
|
13219
13231
|
() => ({
|
|
13220
13232
|
height: Math.max(ganttFullHeight, minimumRowDisplayed * rowHeight),
|
|
@@ -13298,15 +13310,18 @@
|
|
|
13298
13310
|
moveStateHorRef.current = null;
|
|
13299
13311
|
contentContainer.classList.remove(styles$2.calendarDragging);
|
|
13300
13312
|
};
|
|
13301
|
-
|
|
13302
|
-
|
|
13303
|
-
|
|
13304
|
-
contentContainer.addEventListener("
|
|
13313
|
+
const moveListener = (evt) => onScrollMove(evt);
|
|
13314
|
+
const startListener = (evt) => onScrollStart(evt);
|
|
13315
|
+
const endListener = (evt) => onScrollEnd(evt);
|
|
13316
|
+
contentContainer.addEventListener("mousemove", moveListener);
|
|
13317
|
+
contentContainer.addEventListener("mousedown", startListener);
|
|
13318
|
+
contentContainer.addEventListener("mouseup", endListener);
|
|
13319
|
+
contentContainer.addEventListener("mouseout", endListener);
|
|
13305
13320
|
return () => {
|
|
13306
|
-
contentContainer.removeEventListener("mousemove",
|
|
13307
|
-
contentContainer.removeEventListener("mousedown",
|
|
13308
|
-
contentContainer.removeEventListener("mouseup",
|
|
13309
|
-
contentContainer.removeEventListener("mouseout",
|
|
13321
|
+
contentContainer.removeEventListener("mousemove", moveListener);
|
|
13322
|
+
contentContainer.removeEventListener("mousedown", startListener);
|
|
13323
|
+
contentContainer.removeEventListener("mouseup", endListener);
|
|
13324
|
+
contentContainer.removeEventListener("mouseout", endListener);
|
|
13310
13325
|
};
|
|
13311
13326
|
}, [verticalScrollbarRef, horizontalContainerRef, verticalGanttContainerRef]);
|
|
13312
13327
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -19905,7 +19920,7 @@
|
|
|
19905
19920
|
return /* @__PURE__ */ jsxRuntime.jsx(GanttThemeProvider, { theme, children: (cssVars) => /* @__PURE__ */ jsxRuntime.jsx(GanttLocaleProvider, { locale, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
19906
19921
|
"div",
|
|
19907
19922
|
{
|
|
19908
|
-
style: cssVars,
|
|
19923
|
+
style: typeof clientHeight === "string" ? { ...cssVars, height: clientHeight } : cssVars,
|
|
19909
19924
|
className: `${styles$2.wrapper} gantt`,
|
|
19910
19925
|
onKeyDown: handleKeyDown,
|
|
19911
19926
|
tabIndex: 0,
|
package/dist/style.css
CHANGED
|
@@ -568,11 +568,11 @@
|
|
|
568
568
|
user-select: none;
|
|
569
569
|
stroke-width: 0;
|
|
570
570
|
}
|
|
571
|
-
.
|
|
571
|
+
._ganttVerticalContainer_1hrwo_1 {
|
|
572
572
|
display: flex;
|
|
573
573
|
flex-direction: column;
|
|
574
|
-
overflow-x:
|
|
575
|
-
overflow-y:
|
|
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
|
-
.
|
|
584
|
+
._ganttVerticalContainer_1hrwo_1::-webkit-scrollbar {
|
|
585
585
|
width: 1rem;
|
|
586
586
|
height: 1rem;
|
|
587
587
|
}
|
|
588
588
|
|
|
589
|
-
.
|
|
589
|
+
._ganttVerticalContainer_1hrwo_1::-webkit-scrollbar-corner {
|
|
590
590
|
background: transparent;
|
|
591
591
|
}
|
|
592
592
|
|
|
593
|
-
.
|
|
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
|
-
.
|
|
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
|
-
.
|
|
608
|
+
._horizontalContainer_1hrwo_75 {
|
|
609
609
|
margin: 0;
|
|
610
610
|
padding: 0;
|
|
611
611
|
overflow: hidden;
|
|
612
612
|
}
|
|
613
613
|
|
|
614
|
-
.
|
|
614
|
+
._ganttHeader_1hrwo_87 {
|
|
615
615
|
flex: 0 0 auto;
|
|
616
616
|
z-index: 3;
|
|
617
617
|
}
|
|
618
618
|
|
|
619
|
-
.
|
|
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
|
-
.
|
|
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
|
-
.
|
|
636
|
+
._calendarDragging_1hrwo_131 {
|
|
637
637
|
cursor: grabbing;
|
|
638
638
|
}
|
|
639
639
|
/*noinspection CssUnresolvedCustomProperty*/
|
package/package.json
CHANGED