gantt-lib 0.121.1 → 0.121.2
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/index.js +7 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -12137,6 +12137,7 @@ var TASK_ROW_OVERSCAN = 8;
|
|
|
12137
12137
|
var PLAN_FACT_COLUMN_OVERSCAN = 24;
|
|
12138
12138
|
var PLAN_FACT_COLUMN_WINDOW_STEP = 14;
|
|
12139
12139
|
var DEFAULT_INITIAL_VIEWPORT_HEIGHT = 768;
|
|
12140
|
+
var DEFAULT_PLAN_FACT_COLUMN_WINDOW = PLAN_FACT_COLUMN_OVERSCAN + PLAN_FACT_COLUMN_WINDOW_STEP;
|
|
12140
12141
|
function getInitialScrollViewportHeight(containerHeight, headerHeight) {
|
|
12141
12142
|
if (containerHeight === void 0) {
|
|
12142
12143
|
return 0;
|
|
@@ -12349,7 +12350,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
12349
12350
|
viewportHeight: getInitialScrollViewportHeight(containerHeight, headerHeight + 1)
|
|
12350
12351
|
}));
|
|
12351
12352
|
const [forceFullRenderForPrint, setForceFullRenderForPrint] = (0, import_react18.useState)(false);
|
|
12352
|
-
const [planFactDateWindow, setPlanFactDateWindow] = (0, import_react18.useState)(
|
|
12353
|
+
const [planFactDateWindow, setPlanFactDateWindow] = (0, import_react18.useState)({ start: 0, end: 0 });
|
|
12353
12354
|
const [selectedChip, setSelectedChip] = (0, import_react18.useState)(null);
|
|
12354
12355
|
const [activeTimelineTooltip, setActiveTimelineTooltip] = (0, import_react18.useState)(null);
|
|
12355
12356
|
const [internalCollapsedParentIds, setInternalCollapsedParentIds] = (0, import_react18.useState)(/* @__PURE__ */ new Set());
|
|
@@ -12500,7 +12501,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
12500
12501
|
);
|
|
12501
12502
|
setPlanFactDateWindow((previous) => {
|
|
12502
12503
|
if (!isPlanFactMode || dateRange.length === 0 || nextViewportWidth <= 0) {
|
|
12503
|
-
return previous
|
|
12504
|
+
return previous;
|
|
12504
12505
|
}
|
|
12505
12506
|
const firstVisibleColumn = Math.max(0, Math.floor(nextChartScrollLeft / dayWidth));
|
|
12506
12507
|
const visibleColumnCount = Math.max(1, Math.ceil(nextViewportWidth / dayWidth));
|
|
@@ -12790,12 +12791,13 @@ function TaskGanttChartInner(props, ref) {
|
|
|
12790
12791
|
if (forceFullRenderForPrint) {
|
|
12791
12792
|
return void 0;
|
|
12792
12793
|
}
|
|
12793
|
-
if (!isPlanFactMode || dateRange.length === 0
|
|
12794
|
+
if (!isPlanFactMode || dateRange.length === 0) {
|
|
12794
12795
|
return void 0;
|
|
12795
12796
|
}
|
|
12797
|
+
const window2 = planFactDateWindow;
|
|
12796
12798
|
return Array.from(
|
|
12797
|
-
{ length:
|
|
12798
|
-
(_, index) =>
|
|
12799
|
+
{ length: window2.end - window2.start + 1 },
|
|
12800
|
+
(_, index) => window2.start + index
|
|
12799
12801
|
);
|
|
12800
12802
|
}, [dateRange.length, forceFullRenderForPrint, isPlanFactMode, planFactDateWindow]);
|
|
12801
12803
|
const renderedChartTasks = (0, import_react18.useMemo)(
|