gantt-lib 0.146.2 → 0.146.4
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/README.md +2 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +43 -30
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +43 -30
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +17 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -742,6 +742,8 @@ interface TaskChartSharedProps<TTask extends Task = Task> {
|
|
|
742
742
|
renderTaskListActions?: (context: TaskListActionContext<TTask>) => React$1.ReactNode;
|
|
743
743
|
/** Replace/compose the menu; commands contains the configured taskListMenuCommands UI. */
|
|
744
744
|
renderTaskListMenu?: (context: TaskListActionContext<TTask>, commands: React$1.ReactNode) => React$1.ReactNode;
|
|
745
|
+
/** Optional consumer-owned action beside each task date. */
|
|
746
|
+
renderTaskDateAction?: (task: TTask, boundary: 'start' | 'end') => React$1.ReactNode;
|
|
745
747
|
/** Hide row action controls in the TaskList for table-like read/edit presentations. */
|
|
746
748
|
hideTaskListRowActions?: boolean;
|
|
747
749
|
/** Returns an extra CSS class name for a TaskList row. */
|
|
@@ -1265,6 +1267,7 @@ interface TaskListProps {
|
|
|
1265
1267
|
taskListMenuCommands?: TaskListMenuCommand<Task>[];
|
|
1266
1268
|
renderTaskListActions?: (context: TaskListActionContext<Task>) => React$1.ReactNode;
|
|
1267
1269
|
renderTaskListMenu?: (context: TaskListActionContext<Task>, commands: React$1.ReactNode) => React$1.ReactNode;
|
|
1270
|
+
renderTaskDateAction?: (task: Task, boundary: 'start' | 'end') => React$1.ReactNode;
|
|
1268
1271
|
/** Hide row action controls such as insert, hierarchy action buttons, and the context menu trigger. */
|
|
1269
1272
|
hideTaskListRowActions?: boolean;
|
|
1270
1273
|
/** Returns an extra CSS class name for a TaskList row. */
|
package/dist/index.d.ts
CHANGED
|
@@ -742,6 +742,8 @@ interface TaskChartSharedProps<TTask extends Task = Task> {
|
|
|
742
742
|
renderTaskListActions?: (context: TaskListActionContext<TTask>) => React$1.ReactNode;
|
|
743
743
|
/** Replace/compose the menu; commands contains the configured taskListMenuCommands UI. */
|
|
744
744
|
renderTaskListMenu?: (context: TaskListActionContext<TTask>, commands: React$1.ReactNode) => React$1.ReactNode;
|
|
745
|
+
/** Optional consumer-owned action beside each task date. */
|
|
746
|
+
renderTaskDateAction?: (task: TTask, boundary: 'start' | 'end') => React$1.ReactNode;
|
|
745
747
|
/** Hide row action controls in the TaskList for table-like read/edit presentations. */
|
|
746
748
|
hideTaskListRowActions?: boolean;
|
|
747
749
|
/** Returns an extra CSS class name for a TaskList row. */
|
|
@@ -1265,6 +1267,7 @@ interface TaskListProps {
|
|
|
1265
1267
|
taskListMenuCommands?: TaskListMenuCommand<Task>[];
|
|
1266
1268
|
renderTaskListActions?: (context: TaskListActionContext<Task>) => React$1.ReactNode;
|
|
1267
1269
|
renderTaskListMenu?: (context: TaskListActionContext<Task>, commands: React$1.ReactNode) => React$1.ReactNode;
|
|
1270
|
+
renderTaskDateAction?: (task: Task, boundary: 'start' | 'end') => React$1.ReactNode;
|
|
1268
1271
|
/** Hide row action controls such as insert, hierarchy action buttons, and the context menu trigger. */
|
|
1269
1272
|
hideTaskListRowActions?: boolean;
|
|
1270
1273
|
/** Returns an extra CSS class name for a TaskList row. */
|
package/dist/index.js
CHANGED
|
@@ -5976,6 +5976,8 @@ var TaskRow = import_react3.default.memo(
|
|
|
5976
5976
|
}
|
|
5977
5977
|
}
|
|
5978
5978
|
),
|
|
5979
|
+
!milestone && task.fixedStartDate && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "gantt-tr-fixedBoundary gantt-tr-fixedBoundary-start", "aria-hidden": "true" }),
|
|
5980
|
+
!milestone && task.fixedEndDate && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "gantt-tr-fixedBoundary gantt-tr-fixedBoundary-end", "aria-hidden": "true" }),
|
|
5979
5981
|
!milestone && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "gantt-tr-resizeHandle gantt-tr-resizeHandleLeft" }),
|
|
5980
5982
|
shouldRenderCompositeSegments && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("span", { className: "gantt-tr-compositeSegments", "aria-hidden": "true", children: [
|
|
5981
5983
|
compositeSegments.map((segment) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
@@ -8328,7 +8330,7 @@ var resolveActiveCustomCellForRow = (props) => {
|
|
|
8328
8330
|
var areTaskListRowPropsEqual = (prevProps, nextProps) => {
|
|
8329
8331
|
const prevTask = prevProps.task;
|
|
8330
8332
|
const nextTask = nextProps.task;
|
|
8331
|
-
const prevTaskUnchanged = prevTask === nextTask || prevTask.id === nextTask.id && prevTask.name === nextTask.name && prevTask.startDate === nextTask.startDate && prevTask.endDate === nextTask.endDate && prevTask.type === nextTask.type && prevTask.parentId === nextTask.parentId && prevTask.progress === nextTask.progress && prevTask.color === nextTask.color && prevTask.accepted === nextTask.accepted && prevTask.dependencies === nextTask.dependencies;
|
|
8333
|
+
const prevTaskUnchanged = prevTask === nextTask || prevTask.id === nextTask.id && prevTask.name === nextTask.name && prevTask.startDate === nextTask.startDate && prevTask.endDate === nextTask.endDate && prevTask.fixedStartDate === nextTask.fixedStartDate && prevTask.fixedEndDate === nextTask.fixedEndDate && prevTask.type === nextTask.type && prevTask.parentId === nextTask.parentId && prevTask.progress === nextTask.progress && prevTask.color === nextTask.color && prevTask.accepted === nextTask.accepted && prevTask.dependencies === nextTask.dependencies;
|
|
8332
8334
|
const prevIsSelected = prevProps.selectedTaskId === prevTask.id;
|
|
8333
8335
|
const nextIsSelected = nextProps.selectedTaskId === nextTask.id;
|
|
8334
8336
|
const prevIsEditingTask = prevProps.editingTaskId === prevTask.id;
|
|
@@ -8339,7 +8341,7 @@ var areTaskListRowPropsEqual = (prevProps, nextProps) => {
|
|
|
8339
8341
|
const nextPickingTask = nextProps.selectingPredecessorFor === nextTask.id;
|
|
8340
8342
|
const prevAnyPicking = prevProps.selectingPredecessorFor != null;
|
|
8341
8343
|
const nextAnyPicking = nextProps.selectingPredecessorFor != null;
|
|
8342
|
-
return prevTaskUnchanged && prevProps.rowIndex === nextProps.rowIndex && prevProps.taskNumber === nextProps.taskNumber && prevProps.taskNumberMap === nextProps.taskNumberMap && prevProps.rowHeight === nextProps.rowHeight && prevIsSelected === nextIsSelected && prevProps.disableTaskNameEditing === nextProps.disableTaskNameEditing && prevProps.disableDependencyEditing === nextProps.disableDependencyEditing && prevProps.allTasks === nextProps.allTasks && prevProps.activeLinkType === nextProps.activeLinkType && prevProps.dependencyPickMode === nextProps.dependencyPickMode && prevPickingTask === nextPickingTask && prevAnyPicking === nextAnyPicking && resolveSelectedChipRole(prevProps) === resolveSelectedChipRole(nextProps) && prevIsEditingTask === nextIsEditingTask && prevProps.isDragging === nextProps.isDragging && prevProps.isDragOver === nextProps.isDragOver && prevProps.dragOverPlacement === nextProps.dragOverPlacement && prevProps.isNestedDropTarget === nextProps.isNestedDropTarget && prevProps.isDirectChildDropTarget === nextProps.isDirectChildDropTarget && prevCollapsed === nextCollapsed && prevProps.canDemoteTask === nextProps.canDemoteTask && prevProps.isLastChild === nextProps.isLastChild && prevProps.nestingDepth === nextProps.nestingDepth && prevProps.hasVisibleChildren === nextProps.hasVisibleChildren && prevProps.ancestorLineModes === nextProps.ancestorLineModes && prevProps.customDays === nextProps.customDays && prevProps.isWeekend === nextProps.isWeekend && prevProps.fillParentRow === nextProps.fillParentRow && prevProps.businessDays === nextProps.businessDays && prevProps.defaultTaskDurationDays === nextProps.defaultTaskDurationDays && prevProps.isFilterMatch === nextProps.isFilterMatch && prevProps.isFilterHideMode === nextProps.isFilterHideMode && prevProps.resolvedColumns === nextProps.resolvedColumns && prevProps.isTaskSelected === nextProps.isTaskSelected && resolveActiveCustomCellForRow(prevProps) === resolveActiveCustomCellForRow(nextProps) && prevProps.taskListMenuCommands === nextProps.taskListMenuCommands && prevProps.onInsertAfter === nextProps.onInsertAfter && prevProps.onPromoteTask === nextProps.onPromoteTask && prevProps.onDemoteTask === nextProps.onDemoteTask && prevProps.onDuplicateTask === nextProps.onDuplicateTask && prevProps.onDelete === nextProps.onDelete && prevProps.onUngroupTask === nextProps.onUngroupTask && prevProps.renderTaskListActions === nextProps.renderTaskListActions && prevProps.renderTaskListMenu === nextProps.renderTaskListMenu && prevProps.hideTaskListRowActions === nextProps.hideTaskListRowActions && prevProps.rowClassName === nextProps.rowClassName && prevProps.getTaskListNamePrefixIcon === nextProps.getTaskListNamePrefixIcon && prevProps.taskDateChangeMode === nextProps.taskDateChangeMode && prevProps.printDependencyLabels === nextProps.printDependencyLabels;
|
|
8344
|
+
return prevTaskUnchanged && prevProps.rowIndex === nextProps.rowIndex && prevProps.taskNumber === nextProps.taskNumber && prevProps.taskNumberMap === nextProps.taskNumberMap && prevProps.rowHeight === nextProps.rowHeight && prevIsSelected === nextIsSelected && prevProps.disableTaskNameEditing === nextProps.disableTaskNameEditing && prevProps.disableDependencyEditing === nextProps.disableDependencyEditing && prevProps.allTasks === nextProps.allTasks && prevProps.activeLinkType === nextProps.activeLinkType && prevProps.dependencyPickMode === nextProps.dependencyPickMode && prevPickingTask === nextPickingTask && prevAnyPicking === nextAnyPicking && resolveSelectedChipRole(prevProps) === resolveSelectedChipRole(nextProps) && prevIsEditingTask === nextIsEditingTask && prevProps.isDragging === nextProps.isDragging && prevProps.isDragOver === nextProps.isDragOver && prevProps.dragOverPlacement === nextProps.dragOverPlacement && prevProps.isNestedDropTarget === nextProps.isNestedDropTarget && prevProps.isDirectChildDropTarget === nextProps.isDirectChildDropTarget && prevCollapsed === nextCollapsed && prevProps.canDemoteTask === nextProps.canDemoteTask && prevProps.isLastChild === nextProps.isLastChild && prevProps.nestingDepth === nextProps.nestingDepth && prevProps.hasVisibleChildren === nextProps.hasVisibleChildren && prevProps.ancestorLineModes === nextProps.ancestorLineModes && prevProps.customDays === nextProps.customDays && prevProps.isWeekend === nextProps.isWeekend && prevProps.fillParentRow === nextProps.fillParentRow && prevProps.businessDays === nextProps.businessDays && prevProps.defaultTaskDurationDays === nextProps.defaultTaskDurationDays && prevProps.isFilterMatch === nextProps.isFilterMatch && prevProps.isFilterHideMode === nextProps.isFilterHideMode && prevProps.resolvedColumns === nextProps.resolvedColumns && prevProps.isTaskSelected === nextProps.isTaskSelected && resolveActiveCustomCellForRow(prevProps) === resolveActiveCustomCellForRow(nextProps) && prevProps.taskListMenuCommands === nextProps.taskListMenuCommands && prevProps.onInsertAfter === nextProps.onInsertAfter && prevProps.onPromoteTask === nextProps.onPromoteTask && prevProps.onDemoteTask === nextProps.onDemoteTask && prevProps.onDuplicateTask === nextProps.onDuplicateTask && prevProps.onDelete === nextProps.onDelete && prevProps.onUngroupTask === nextProps.onUngroupTask && prevProps.renderTaskListActions === nextProps.renderTaskListActions && prevProps.renderTaskListMenu === nextProps.renderTaskListMenu && prevProps.renderTaskDateAction === nextProps.renderTaskDateAction && prevProps.hideTaskListRowActions === nextProps.hideTaskListRowActions && prevProps.rowClassName === nextProps.rowClassName && prevProps.getTaskListNamePrefixIcon === nextProps.getTaskListNamePrefixIcon && prevProps.taskDateChangeMode === nextProps.taskDateChangeMode && prevProps.printDependencyLabels === nextProps.printDependencyLabels;
|
|
8343
8345
|
};
|
|
8344
8346
|
var TaskListRow = import_react12.default.memo(
|
|
8345
8347
|
({
|
|
@@ -8405,6 +8407,7 @@ var TaskListRow = import_react12.default.memo(
|
|
|
8405
8407
|
taskListMenuCommands = [],
|
|
8406
8408
|
renderTaskListActions,
|
|
8407
8409
|
renderTaskListMenu,
|
|
8410
|
+
renderTaskDateAction,
|
|
8408
8411
|
hideTaskListRowActions = false,
|
|
8409
8412
|
rowClassName,
|
|
8410
8413
|
compositeParentColor,
|
|
@@ -9523,46 +9526,52 @@ var TaskListRow = import_react12.default.memo(
|
|
|
9523
9526
|
] }) : null
|
|
9524
9527
|
] }) : null
|
|
9525
9528
|
] });
|
|
9526
|
-
const startDateCell = /* @__PURE__ */ (0, import_jsx_runtime15.
|
|
9529
|
+
const startDateCell = /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
9527
9530
|
"div",
|
|
9528
9531
|
{
|
|
9529
9532
|
className: "gantt-tl-cell gantt-tl-cell-date",
|
|
9530
9533
|
style: getColumnStyle("startDate", 90),
|
|
9531
9534
|
onClick: (e) => e.stopPropagation(),
|
|
9532
|
-
children:
|
|
9533
|
-
|
|
9534
|
-
|
|
9535
|
-
|
|
9536
|
-
|
|
9537
|
-
|
|
9538
|
-
|
|
9539
|
-
|
|
9540
|
-
|
|
9541
|
-
|
|
9542
|
-
|
|
9543
|
-
|
|
9544
|
-
|
|
9535
|
+
children: [
|
|
9536
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
9537
|
+
DatePicker,
|
|
9538
|
+
{
|
|
9539
|
+
value: startDateISO,
|
|
9540
|
+
onChange: handleStartDateChange,
|
|
9541
|
+
format: "dd.MM.yy",
|
|
9542
|
+
portal: true,
|
|
9543
|
+
disabled: task.locked,
|
|
9544
|
+
isWeekend: weekendPredicate,
|
|
9545
|
+
businessDays,
|
|
9546
|
+
footer: datePickerFooter
|
|
9547
|
+
}
|
|
9548
|
+
),
|
|
9549
|
+
renderTaskDateAction?.(task, "start")
|
|
9550
|
+
]
|
|
9545
9551
|
}
|
|
9546
9552
|
);
|
|
9547
|
-
const endDateCell = /* @__PURE__ */ (0, import_jsx_runtime15.
|
|
9553
|
+
const endDateCell = /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
9548
9554
|
"div",
|
|
9549
9555
|
{
|
|
9550
9556
|
className: "gantt-tl-cell gantt-tl-cell-date",
|
|
9551
9557
|
style: getColumnStyle("endDate", 90),
|
|
9552
9558
|
onClick: (e) => e.stopPropagation(),
|
|
9553
|
-
children:
|
|
9554
|
-
|
|
9555
|
-
|
|
9556
|
-
|
|
9557
|
-
|
|
9558
|
-
|
|
9559
|
-
|
|
9560
|
-
|
|
9561
|
-
|
|
9562
|
-
|
|
9563
|
-
|
|
9564
|
-
|
|
9565
|
-
|
|
9559
|
+
children: [
|
|
9560
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
9561
|
+
DatePicker,
|
|
9562
|
+
{
|
|
9563
|
+
value: endDateISO,
|
|
9564
|
+
onChange: handleEndDateChange,
|
|
9565
|
+
format: "dd.MM.yy",
|
|
9566
|
+
portal: true,
|
|
9567
|
+
disabled: task.locked,
|
|
9568
|
+
isWeekend: weekendPredicate,
|
|
9569
|
+
businessDays,
|
|
9570
|
+
footer: datePickerFooter
|
|
9571
|
+
}
|
|
9572
|
+
),
|
|
9573
|
+
renderTaskDateAction?.(task, "end")
|
|
9574
|
+
]
|
|
9566
9575
|
}
|
|
9567
9576
|
);
|
|
9568
9577
|
const durationCell = /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
@@ -10527,6 +10536,7 @@ var TaskList = ({
|
|
|
10527
10536
|
taskListMenuCommands,
|
|
10528
10537
|
renderTaskListActions,
|
|
10529
10538
|
renderTaskListMenu,
|
|
10539
|
+
renderTaskDateAction,
|
|
10530
10540
|
hideTaskListRowActions = false,
|
|
10531
10541
|
getTaskListRowClassName,
|
|
10532
10542
|
getTaskListNamePrefixIcon,
|
|
@@ -11690,6 +11700,7 @@ var TaskList = ({
|
|
|
11690
11700
|
taskListMenuCommands,
|
|
11691
11701
|
renderTaskListActions,
|
|
11692
11702
|
renderTaskListMenu,
|
|
11703
|
+
renderTaskDateAction,
|
|
11693
11704
|
hideTaskListRowActions,
|
|
11694
11705
|
rowClassName: [
|
|
11695
11706
|
task.parentId && compositeParentIds.has(task.parentId) ? "gantt-tl-row-composite-detail" : "",
|
|
@@ -15654,6 +15665,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
15654
15665
|
taskListMenuCommands,
|
|
15655
15666
|
renderTaskListActions,
|
|
15656
15667
|
renderTaskListMenu,
|
|
15668
|
+
renderTaskDateAction,
|
|
15657
15669
|
hideTaskListRowActions = false,
|
|
15658
15670
|
getTaskListRowClassName,
|
|
15659
15671
|
getTaskListNamePrefixIcon,
|
|
@@ -17013,6 +17025,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
17013
17025
|
taskListMenuCommands,
|
|
17014
17026
|
renderTaskListActions,
|
|
17015
17027
|
renderTaskListMenu,
|
|
17028
|
+
renderTaskDateAction,
|
|
17016
17029
|
hideTaskListRowActions,
|
|
17017
17030
|
getTaskListRowClassName,
|
|
17018
17031
|
getTaskListNamePrefixIcon,
|