gantt-task-react-v 1.4.5 → 1.4.7
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/components/gantt/task-gantt-content.d.ts +2 -0
- package/dist/components/other/arrow.d.ts +2 -0
- package/dist/components/other/gantt-drawer.d.ts +10 -0
- package/dist/gantt-task-react.es.js +256 -161
- package/dist/gantt-task-react.umd.js +256 -161
- package/dist/style.css +89 -6
- package/dist/types/public-types.d.ts +31 -0
- package/package.json +1 -1
package/dist/style.css
CHANGED
|
@@ -439,12 +439,12 @@
|
|
|
439
439
|
._calendarDragging_15t8b_85 {
|
|
440
440
|
cursor: ew-resize;
|
|
441
441
|
}
|
|
442
|
-
.
|
|
442
|
+
._arrow_clickable_3u3q2_1 {
|
|
443
443
|
cursor: pointer;
|
|
444
444
|
}
|
|
445
445
|
|
|
446
446
|
/*noinspection CssUnresolvedCustomProperty*/
|
|
447
|
-
.
|
|
447
|
+
._arrow_clickable_3u3q2_1:hover ._mainPath_3u3q2_11 {
|
|
448
448
|
filter: var(--gantt-hover-filter);
|
|
449
449
|
stroke: var(--gantt-arrow-hover-color, red);
|
|
450
450
|
stroke-width: 2px;
|
|
@@ -452,22 +452,34 @@
|
|
|
452
452
|
}
|
|
453
453
|
|
|
454
454
|
/*noinspection CssUnresolvedCustomProperty*/
|
|
455
|
-
.
|
|
455
|
+
._arrow_clickable_3u3q2_1:hover polygon {
|
|
456
456
|
fill: var(--gantt-arrow-hover-color, red);
|
|
457
457
|
}
|
|
458
458
|
|
|
459
|
-
|
|
459
|
+
/*noinspection CssUnresolvedCustomProperty*/
|
|
460
|
+
._arrow_active_3u3q2_37 ._mainPath_3u3q2_11 {
|
|
461
|
+
stroke: var(--gantt-arrow-active-color, var(--gantt-arrow-hover-color, red));
|
|
462
|
+
stroke-width: 2px;
|
|
463
|
+
opacity: 1;
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
/*noinspection CssUnresolvedCustomProperty*/
|
|
467
|
+
._arrow_active_3u3q2_37 polygon {
|
|
468
|
+
fill: var(--gantt-arrow-active-color, var(--gantt-arrow-hover-color, red));
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
._mainPath_3u3q2_11 {
|
|
460
472
|
fill: none;
|
|
461
473
|
stroke-width: 1.2px;
|
|
462
474
|
stroke-linecap: round;
|
|
463
475
|
stroke-linejoin: round;
|
|
464
|
-
opacity: 0.
|
|
476
|
+
opacity: 0.55;
|
|
465
477
|
transition:
|
|
466
478
|
stroke-width 0.15s ease,
|
|
467
479
|
opacity 0.15s ease;
|
|
468
480
|
}
|
|
469
481
|
|
|
470
|
-
.
|
|
482
|
+
._clickZone_3u3q2_81 {
|
|
471
483
|
fill: none;
|
|
472
484
|
stroke: transparent;
|
|
473
485
|
stroke-width: 12px;
|
|
@@ -716,3 +728,74 @@
|
|
|
716
728
|
._loaderHidden_covn4_49 {
|
|
717
729
|
display: none;
|
|
718
730
|
}
|
|
731
|
+
._overlay_1rnqn_1 {
|
|
732
|
+
position: absolute;
|
|
733
|
+
top: 0;
|
|
734
|
+
left: 0;
|
|
735
|
+
right: 0;
|
|
736
|
+
bottom: 0;
|
|
737
|
+
z-index: 998;
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
._drawer_1rnqn_19 {
|
|
741
|
+
position: absolute;
|
|
742
|
+
top: 0;
|
|
743
|
+
right: 0;
|
|
744
|
+
bottom: 0;
|
|
745
|
+
z-index: 999;
|
|
746
|
+
background: var(--gantt-drawer-background, #fff);
|
|
747
|
+
border-left: 1px solid var(--gantt-drawer-border-color, #e0e0e0);
|
|
748
|
+
box-shadow: -2px 0 8px rgba(0, 0, 0, 0.12);
|
|
749
|
+
display: flex;
|
|
750
|
+
flex-direction: column;
|
|
751
|
+
overflow: hidden;
|
|
752
|
+
transform: translateX(100%);
|
|
753
|
+
transition: transform 0.25s ease;
|
|
754
|
+
}
|
|
755
|
+
|
|
756
|
+
._drawer_open_1rnqn_51 {
|
|
757
|
+
transform: translateX(0);
|
|
758
|
+
}
|
|
759
|
+
|
|
760
|
+
._header_1rnqn_59 {
|
|
761
|
+
display: flex;
|
|
762
|
+
align-items: center;
|
|
763
|
+
justify-content: space-between;
|
|
764
|
+
padding: 12px 16px;
|
|
765
|
+
border-bottom: 1px solid var(--gantt-drawer-border-color, #e0e0e0);
|
|
766
|
+
flex-shrink: 0;
|
|
767
|
+
}
|
|
768
|
+
|
|
769
|
+
._title_1rnqn_77 {
|
|
770
|
+
font-weight: 600;
|
|
771
|
+
font-size: 14px;
|
|
772
|
+
color: var(--gantt-drawer-title-color, #333);
|
|
773
|
+
margin: 0;
|
|
774
|
+
overflow: hidden;
|
|
775
|
+
text-overflow: ellipsis;
|
|
776
|
+
white-space: nowrap;
|
|
777
|
+
}
|
|
778
|
+
|
|
779
|
+
._closeButton_1rnqn_97 {
|
|
780
|
+
background: none;
|
|
781
|
+
border: none;
|
|
782
|
+
cursor: pointer;
|
|
783
|
+
padding: 4px;
|
|
784
|
+
display: flex;
|
|
785
|
+
align-items: center;
|
|
786
|
+
justify-content: center;
|
|
787
|
+
border-radius: 4px;
|
|
788
|
+
color: var(--gantt-drawer-close-color, #666);
|
|
789
|
+
transition: background 0.15s ease;
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
._closeButton_1rnqn_97:hover {
|
|
793
|
+
background: var(--gantt-drawer-close-hover-bg, #f0f0f0);
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
._body_1rnqn_131 {
|
|
797
|
+
flex: 1;
|
|
798
|
+
overflow-y: auto;
|
|
799
|
+
overflow-x: hidden;
|
|
800
|
+
padding: 16px;
|
|
801
|
+
}
|
|
@@ -2,6 +2,29 @@ import type { ComponentType, ReactNode } from "react";
|
|
|
2
2
|
import { GanttPartialTheme } from "./theme-types";
|
|
3
3
|
import { GanttLocale } from "./theme-locale";
|
|
4
4
|
import { ChildByLevelMap, DateSetup, Distances, RelationMoveTarget, RootMapByLevel, Task, TaskBarMoveAction, RenderTask, ViewMode, TaskId } from "./common-types";
|
|
5
|
+
export type GanttDrawerData = {
|
|
6
|
+
type: "task";
|
|
7
|
+
task: Task;
|
|
8
|
+
} | {
|
|
9
|
+
type: "arrow";
|
|
10
|
+
taskFrom: Task;
|
|
11
|
+
taskTo: Task;
|
|
12
|
+
};
|
|
13
|
+
export type RenderDrawerContent = (data: GanttDrawerData) => ReactNode;
|
|
14
|
+
export interface GanttDrawerProps {
|
|
15
|
+
/**
|
|
16
|
+
* Enable the drawer panel on task/arrow click
|
|
17
|
+
*/
|
|
18
|
+
enableDrawer?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Width of the drawer panel in pixels. Defaults to 360.
|
|
21
|
+
*/
|
|
22
|
+
drawerWidth?: number;
|
|
23
|
+
/**
|
|
24
|
+
* Render function for custom drawer content
|
|
25
|
+
*/
|
|
26
|
+
renderDrawerContent?: RenderDrawerContent;
|
|
27
|
+
}
|
|
5
28
|
export type RenderTopHeader = (date: Date, viewMode: ViewMode, dateSetup: DateSetup) => ReactNode;
|
|
6
29
|
export type RenderCustomLabel = (task: RenderTask, x1: number, width: number, taskHeight: number, arrowIndent: number, taskYOffset: number, movingAction: TaskBarMoveAction | null, viewMode: ViewMode, rtl?: boolean) => ReactNode;
|
|
7
30
|
export type RenderBottomHeader = (date: Date, viewMode: ViewMode, dateSetup: DateSetup, index: number, isUnknownDates: boolean) => ReactNode;
|
|
@@ -191,6 +214,10 @@ export interface GanttTaskBarProps extends GanttTaskBarActions {
|
|
|
191
214
|
* Invokes on double-click on the relation arrow between tasks
|
|
192
215
|
*/
|
|
193
216
|
onArrowDoubleClick?: OnArrowDoubleClick;
|
|
217
|
+
/**
|
|
218
|
+
* Invokes on click on the relation arrow between tasks
|
|
219
|
+
*/
|
|
220
|
+
onArrowClick?: (taskFrom: Task, taskTo: Task) => void;
|
|
194
221
|
/**
|
|
195
222
|
* Invokes on bar double click.
|
|
196
223
|
*/
|
|
@@ -373,6 +400,10 @@ export interface GanttProps {
|
|
|
373
400
|
* Set to a task id to scroll both horizontally and vertically to that task.
|
|
374
401
|
*/
|
|
375
402
|
scrollToTaskId?: TaskId;
|
|
403
|
+
/**
|
|
404
|
+
* Drawer panel options for task/arrow click
|
|
405
|
+
*/
|
|
406
|
+
drawer?: GanttDrawerProps;
|
|
376
407
|
}
|
|
377
408
|
export interface GanttTaskBarActions {
|
|
378
409
|
allowMoveTaskBar?: (action: TaskBarMoveAction, task: RenderTask) => boolean;
|
package/package.json
CHANGED