@jaeungkim/gantt-chart 1.2.0 → 1.3.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/dist/bars/components/GanttBar.d.ts +1 -1
- package/dist/bars/components/GanttBarsLayer.d.ts +1 -1
- package/dist/bars/hooks/useGanttBarDrag.d.ts +1 -2
- package/dist/dependencies/hooks/useGanttLinkDrag.d.ts +1 -1
- package/dist/dependencies/utils/arrowPath.d.ts +1 -1
- package/dist/dependencies/utils/link.d.ts +1 -2
- package/dist/detail/hooks/useGanttDetail.d.ts +3 -3
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +2053 -2076
- package/dist/interaction/hooks/useGanttSelection.d.ts +1 -1
- package/dist/shared/store.d.ts +1 -2
- package/dist/shared/types.d.ts +3 -1
- package/dist/shared/virtual/window.d.ts +1 -0
- package/dist/timeline/utils/geometry.d.ts +1 -4
- package/dist/timeline/utils/transform.d.ts +5 -0
- package/package.json +1 -1
- package/dist/core/index.d.ts +0 -3
|
@@ -6,7 +6,7 @@ interface UseGanttSelectionParams {
|
|
|
6
6
|
}
|
|
7
7
|
interface GanttSelection {
|
|
8
8
|
select: (task: TaskTransformed | null) => void;
|
|
9
|
-
|
|
9
|
+
onTaskActivate: (task: TaskTransformed, event: React.MouseEvent) => void;
|
|
10
10
|
}
|
|
11
11
|
export declare function useGanttSelection({ selectable, onTaskSelect, onTaskClick, }: UseGanttSelectionParams): GanttSelection;
|
|
12
12
|
export {};
|
package/dist/shared/store.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { GanttBottomRowCell, GanttDragMode, GanttDragOffset, GanttLocaleOptions, GanttScaleKey } from './types';
|
|
1
|
+
import { GanttBottomRowCell, GanttDragMode, GanttDragOffset, GanttLocaleOptions, GanttScaleKey, LinkAnchor, LinkRejection } from './types';
|
|
2
2
|
import { Task, TaskTransformed } from './task';
|
|
3
3
|
import { GanttDropMode, GanttMoveRejection, GanttTaskMove } from '../core/reorder';
|
|
4
|
-
import { LinkAnchor, LinkRejection } from '../dependencies/utils/link';
|
|
5
4
|
interface GanttLinkDraft {
|
|
6
5
|
/** Task the drag started on - it becomes the predecessor */
|
|
7
6
|
fromTaskId: string;
|
package/dist/shared/types.d.ts
CHANGED
|
@@ -5,6 +5,8 @@ import { Task, TaskTransformed } from './task';
|
|
|
5
5
|
export type GanttTheme = 'light' | 'dark' | 'system';
|
|
6
6
|
export type GanttScaleKey = 'day' | 'week' | 'month' | 'quarter' | 'year';
|
|
7
7
|
export type GanttLabelUnit = 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year';
|
|
8
|
+
export type LinkAnchor = 'start' | 'end';
|
|
9
|
+
export type LinkRejection = 'self' | 'duplicate' | 'cycle';
|
|
8
10
|
export type GanttDragMode = 'bar' | 'left' | 'right';
|
|
9
11
|
export interface GanttDragBounds {
|
|
10
12
|
min?: Dayjs;
|
|
@@ -95,7 +97,7 @@ export interface GanttDragOffset {
|
|
|
95
97
|
}
|
|
96
98
|
export interface GanttBarOptions {
|
|
97
99
|
onTasksChange?: (updatedTasks: Task[]) => void;
|
|
98
|
-
|
|
100
|
+
onTaskActivate?: (task: TaskTransformed, event: ReactMouseEvent) => void;
|
|
99
101
|
onTaskDoubleClick?: (task: TaskTransformed, event: ReactMouseEvent) => void;
|
|
100
102
|
showTooltip?: boolean;
|
|
101
103
|
}
|
|
@@ -24,6 +24,7 @@ export declare function originShiftPx(prevTicks: GanttBottomRowCell[], nextTicks
|
|
|
24
24
|
export declare function computeNonWorkingRanges(timelineTicks: GanttBottomRowCell[], scaleKey: GanttScaleKey, nonWorkingDayAt: (date: Dayjs) => NonWorkingDay | null): NonWorkingRange[];
|
|
25
25
|
export declare function shiftByDragSteps(date: Dayjs, steps: number, scaleKey: GanttScaleKey): Dayjs;
|
|
26
26
|
export declare function pxBetweenDates(from: Dayjs, to: Dayjs, scaleKey: GanttScaleKey): number;
|
|
27
|
+
export declare function toDragBounds(min: string | undefined, max: string | undefined): GanttDragBounds | null;
|
|
27
28
|
export declare function clampDragDates(mode: GanttDragMode, startDate: Dayjs, endDate: Dayjs, bounds: GanttDragBounds, scaleKey: GanttScaleKey): {
|
|
28
29
|
startDate: Dayjs;
|
|
29
30
|
endDate: Dayjs;
|
|
@@ -33,10 +34,6 @@ export declare function clampMoveDelta(members: {
|
|
|
33
34
|
end: Dayjs;
|
|
34
35
|
bounds: GanttDragBounds;
|
|
35
36
|
}[], requestedMs: number, scaleKey: GanttScaleKey): number;
|
|
36
|
-
export declare function calculateDateOffsets(startDate: Dayjs, endDate: Dayjs, timelineTicks: GanttBottomRowCell[], scaleKey: GanttScaleKey): {
|
|
37
|
-
barMarginLeftAmount: number;
|
|
38
|
-
barWidthSize: number;
|
|
39
|
-
};
|
|
40
37
|
export declare function calculateDateOffsetPx(date: Dayjs, timelineTicks: GanttBottomRowCell[], scaleKey: GanttScaleKey): number | null;
|
|
41
38
|
export declare function dateAtOffsetPx(offsetPx: number, timelineTicks: GanttBottomRowCell[], scaleKey: GanttScaleKey): Dayjs | null;
|
|
42
39
|
export declare function timelineRange(timelineTicks: GanttBottomRowCell[], scaleKey: GanttScaleKey): GanttDateRange | null;
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
+
import { Dayjs } from 'dayjs';
|
|
1
2
|
import { GanttBottomRowCell, GanttScaleKey } from '../../shared/types';
|
|
2
3
|
import { Task, TaskTransformed } from '../../shared/task';
|
|
3
4
|
import { TaskTree } from '../../core/tree';
|
|
5
|
+
export declare function calculateDateOffsets(startDate: Dayjs, endDate: Dayjs, timelineTicks: GanttBottomRowCell[], scaleKey: GanttScaleKey): {
|
|
6
|
+
barMarginLeftAmount: number;
|
|
7
|
+
barWidthSize: number;
|
|
8
|
+
};
|
|
4
9
|
export declare function transformTasks(tasks: Task[], timelineTicks: GanttBottomRowCell[], selectedScale: GanttScaleKey, tree?: TaskTree): TaskTransformed[];
|
package/package.json
CHANGED
package/dist/core/index.d.ts
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export { CALENDAR_DAYS, createWorkingCalendar, type WorkingCalendar, type WorkingCalendarOptions, } from './calendar';
|
|
2
|
-
export { buildTaskTree, collectSubtreeIds, getVisibleTasks, rollUpTasks, type TaskTree, } from './tree';
|
|
3
|
-
export { moveTask, sortTasksBySequence, validateMove, type GanttMoveOptions, } from './reorder';
|