apexgantt 3.4.0 → 3.5.0
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/.github/workflows/publish.yml +7 -2
- package/apexgantt.es.min.js +24 -17
- package/apexgantt.min.js +2 -2
- package/index.d.ts +1 -0
- package/package.json +5 -1
|
@@ -5,6 +5,10 @@ on:
|
|
|
5
5
|
branches:
|
|
6
6
|
- main
|
|
7
7
|
|
|
8
|
+
permissions:
|
|
9
|
+
id-token: write
|
|
10
|
+
contents: read
|
|
11
|
+
|
|
8
12
|
jobs:
|
|
9
13
|
publish:
|
|
10
14
|
runs-on: ubuntu-latest
|
|
@@ -13,8 +17,9 @@ jobs:
|
|
|
13
17
|
- uses: actions/setup-node@v4
|
|
14
18
|
with:
|
|
15
19
|
node-version: "20"
|
|
16
|
-
registry-url: "https://registry.npmjs.org"
|
|
20
|
+
registry-url: "https://registry.npmjs.org"
|
|
21
|
+
|
|
17
22
|
- run: npm install
|
|
18
|
-
- run: npm publish
|
|
23
|
+
- run: npm publish --provenance
|
|
19
24
|
env:
|
|
20
25
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
package/apexgantt.es.min.js
CHANGED
|
@@ -14079,7 +14079,13 @@ function getTaskTextByColumn(task, columnKey, inputDateFormat) {
|
|
|
14079
14079
|
return taskColumnValue;
|
|
14080
14080
|
}
|
|
14081
14081
|
function getTaskRowElement(context, taskId) {
|
|
14082
|
-
|
|
14082
|
+
const chartInstanceId = context.getInstanceId();
|
|
14083
|
+
const selector = `.tasks-container .tasks-data-row[data-taskid="${taskId}"][data-chart-instance="${chartInstanceId}"]`;
|
|
14084
|
+
const element = context.querySelector(selector);
|
|
14085
|
+
if (!element) {
|
|
14086
|
+
console.warn(`[${chartInstanceId}] Task row element not found for task: ${taskId}`);
|
|
14087
|
+
}
|
|
14088
|
+
return element;
|
|
14083
14089
|
}
|
|
14084
14090
|
function getRowBackgroundColor(index, rowBackgroundColors) {
|
|
14085
14091
|
if (!(rowBackgroundColors == null ? void 0 : rowBackgroundColors.length))
|
|
@@ -17182,7 +17188,7 @@ class ApexGantt extends BaseChart {
|
|
|
17182
17188
|
}
|
|
17183
17189
|
}
|
|
17184
17190
|
disableHeaderMousewheelScroll() {
|
|
17185
|
-
const timelineHeader = this.
|
|
17191
|
+
const timelineHeader = this.chartContext.querySelector(".timeline-header");
|
|
17186
17192
|
if (!timelineHeader) {
|
|
17187
17193
|
return;
|
|
17188
17194
|
}
|
|
@@ -17267,16 +17273,16 @@ class ApexGantt extends BaseChart {
|
|
|
17267
17273
|
this.chartContext.addEventListener("splitview-resize", this.splitBarResizeHandler);
|
|
17268
17274
|
}
|
|
17269
17275
|
positionHorizontalScrollbar() {
|
|
17270
|
-
const horizontalScroll = this.
|
|
17271
|
-
const ganttContainer = this.
|
|
17272
|
-
const tasksContainer = this.
|
|
17276
|
+
const horizontalScroll = this.chartContext.querySelector(".timeline-horizontal-scroll");
|
|
17277
|
+
const ganttContainer = this.chartContext.querySelector(".gantt-container");
|
|
17278
|
+
const tasksContainer = this.chartContext.querySelector(".tasks-container");
|
|
17273
17279
|
if (!horizontalScroll || !ganttContainer) {
|
|
17274
17280
|
console.warn("Missing elements for scrollbar positioning");
|
|
17275
17281
|
return;
|
|
17276
17282
|
}
|
|
17277
17283
|
void ganttContainer.offsetHeight;
|
|
17278
17284
|
const tasksWidth = tasksContainer ? tasksContainer.offsetWidth : 0;
|
|
17279
|
-
const splitBar = this.
|
|
17285
|
+
const splitBar = this.chartContext.querySelector(".split-bar-container");
|
|
17280
17286
|
const splitBarWidth = splitBar ? splitBar.offsetWidth : 0;
|
|
17281
17287
|
const totalOffset = tasksWidth + splitBarWidth + 2;
|
|
17282
17288
|
const computedStyle = window.getComputedStyle(this.element);
|
|
@@ -17288,8 +17294,8 @@ class ApexGantt extends BaseChart {
|
|
|
17288
17294
|
horizontalScroll.style.width = `${Math.max(0, availableWidth)}px`;
|
|
17289
17295
|
}
|
|
17290
17296
|
compensateForScrollbar() {
|
|
17291
|
-
const bodyWrapper = this.
|
|
17292
|
-
const headerContainer = this.
|
|
17297
|
+
const bodyWrapper = this.chartContext.querySelector(".tasks-body-wrapper");
|
|
17298
|
+
const headerContainer = this.chartContext.querySelector(".tasks-header");
|
|
17293
17299
|
if (!bodyWrapper || !headerContainer) {
|
|
17294
17300
|
return;
|
|
17295
17301
|
}
|
|
@@ -17302,9 +17308,9 @@ class ApexGantt extends BaseChart {
|
|
|
17302
17308
|
}
|
|
17303
17309
|
}
|
|
17304
17310
|
setupTimelineHorizontalScroll() {
|
|
17305
|
-
const horizontalScroll = this.
|
|
17306
|
-
const timelineHeader = this.
|
|
17307
|
-
const timelineBodyWrapper = this.
|
|
17311
|
+
const horizontalScroll = this.chartContext.querySelector(".timeline-horizontal-scroll");
|
|
17312
|
+
const timelineHeader = this.chartContext.querySelector(".timeline-header");
|
|
17313
|
+
const timelineBodyWrapper = this.chartContext.querySelector(".timeline-body-wrapper");
|
|
17308
17314
|
if (!horizontalScroll || !timelineHeader || !timelineBodyWrapper) {
|
|
17309
17315
|
return;
|
|
17310
17316
|
}
|
|
@@ -17431,15 +17437,15 @@ class ApexGantt extends BaseChart {
|
|
|
17431
17437
|
const tasksWithDependency = this.dataManager.getFlatVisibleTasks().filter((task) => !!task.dependency).map((task) => {
|
|
17432
17438
|
const sourceSelector = `.bar-container [data-taskid="${task.dependency}"][data-chart-instance="${chartInstanceId}"]`;
|
|
17433
17439
|
const targetSelector = `.bar-container [data-taskid="${task.id}"][data-chart-instance="${chartInstanceId}"]`;
|
|
17434
|
-
const source = this.
|
|
17435
|
-
const target = this.
|
|
17440
|
+
const source = this.chartContext.querySelector(sourceSelector);
|
|
17441
|
+
const target = this.chartContext.querySelector(targetSelector);
|
|
17436
17442
|
return {
|
|
17437
17443
|
id: `${task.dependency}-${task.id}`,
|
|
17438
17444
|
source,
|
|
17439
17445
|
target
|
|
17440
17446
|
};
|
|
17441
17447
|
}).filter((edge) => edge.source && edge.target);
|
|
17442
|
-
const timelineBody = this.
|
|
17448
|
+
const timelineBody = this.chartContext.querySelector(".timeline-body");
|
|
17443
17449
|
if (!timelineBody) {
|
|
17444
17450
|
console.warn(`[${chartInstanceId}] Timeline body not found for arrows`);
|
|
17445
17451
|
return;
|
|
@@ -17730,7 +17736,7 @@ class ApexGantt extends BaseChart {
|
|
|
17730
17736
|
return this.isColorDark(currentBgColor) ? "dark" : "light";
|
|
17731
17737
|
}
|
|
17732
17738
|
fillEmptyRowsAfterRender() {
|
|
17733
|
-
const ganttContainer = this.
|
|
17739
|
+
const ganttContainer = this.chartContext.querySelector(".gantt-container");
|
|
17734
17740
|
const timelineBody = ganttContainer == null ? void 0 : ganttContainer.querySelector(".timeline-body");
|
|
17735
17741
|
const tasksBody = ganttContainer == null ? void 0 : ganttContainer.querySelector(".tasks-data-container");
|
|
17736
17742
|
if (!ganttContainer || !timelineBody || !tasksBody) {
|
|
@@ -17878,9 +17884,9 @@ class ApexGantt extends BaseChart {
|
|
|
17878
17884
|
* update the horizontal scrollbar's content width to match timeline width
|
|
17879
17885
|
*/
|
|
17880
17886
|
updateHorizontalScrollbarContent() {
|
|
17881
|
-
const horizontalScroll = this.
|
|
17887
|
+
const horizontalScroll = this.chartContext.querySelector(".timeline-horizontal-scroll");
|
|
17882
17888
|
const scrollContent = horizontalScroll == null ? void 0 : horizontalScroll.querySelector(".timeline-horizontal-scroll-content");
|
|
17883
|
-
const timelineBody = this.
|
|
17889
|
+
const timelineBody = this.chartContext.querySelector(".timeline-body");
|
|
17884
17890
|
if (!horizontalScroll || !scrollContent || !timelineBody) {
|
|
17885
17891
|
console.warn("Scrollbar update: Missing elements", {
|
|
17886
17892
|
horizontalScroll: !!horizontalScroll,
|
|
@@ -18106,6 +18112,7 @@ if (typeof window !== "undefined") {
|
|
|
18106
18112
|
}
|
|
18107
18113
|
export {
|
|
18108
18114
|
ApexGantt,
|
|
18115
|
+
ColumnKey,
|
|
18109
18116
|
DarkTheme,
|
|
18110
18117
|
DataParser,
|
|
18111
18118
|
GanttEvents,
|