gantt-task-react-v 1.4.4 → 1.4.6
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 +6 -0
- package/dist/components/other/arrow.d.ts +1 -0
- package/dist/components/other/gantt-drawer.d.ts +17 -0
- package/dist/gantt-task-react.es.js +355 -108
- package/dist/gantt-task-react.umd.js +355 -108
- package/dist/style.css +146 -18
- package/dist/types/index.d.ts +1 -0
- package/dist/types/public-types.d.ts +22 -0
- package/package.json +1 -1
package/dist/style.css
CHANGED
|
@@ -439,38 +439,67 @@
|
|
|
439
439
|
._calendarDragging_15t8b_85 {
|
|
440
440
|
cursor: ew-resize;
|
|
441
441
|
}
|
|
442
|
-
.
|
|
442
|
+
._arrow_clickable_13ifc_1 {
|
|
443
443
|
cursor: pointer;
|
|
444
444
|
}
|
|
445
445
|
|
|
446
|
+
._mainPath_13ifc_9 {
|
|
447
|
+
fill: none;
|
|
448
|
+
stroke-width: 1px;
|
|
449
|
+
stroke-linecap: round;
|
|
450
|
+
stroke-linejoin: round;
|
|
451
|
+
opacity: 0.3;
|
|
452
|
+
transition:
|
|
453
|
+
stroke-width 0.2s ease,
|
|
454
|
+
opacity 0.2s ease,
|
|
455
|
+
filter 0.2s ease;
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
._clickZone_13ifc_33 {
|
|
459
|
+
fill: none;
|
|
460
|
+
stroke: transparent;
|
|
461
|
+
stroke-width: 12px;
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
/* Highlighted state — when connected task is hovered */
|
|
465
|
+
.gantt-arrow-highlighted ._mainPath_13ifc_9 {
|
|
466
|
+
stroke-width: 2px;
|
|
467
|
+
opacity: 0.85;
|
|
468
|
+
filter: drop-shadow(0 0 1px currentColor);
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
.gantt-arrow-highlighted polygon {
|
|
472
|
+
opacity: 0.85;
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
/* Direct arrow hover — takes priority over highlighted */
|
|
446
476
|
/*noinspection CssUnresolvedCustomProperty*/
|
|
447
|
-
.
|
|
448
|
-
filter: var(--gantt-hover-
|
|
477
|
+
._arrow_clickable_13ifc_1:hover ._mainPath_13ifc_9 {
|
|
478
|
+
filter: drop-shadow(0 0 3px var(--gantt-arrow-hover-color, red));
|
|
449
479
|
stroke: var(--gantt-arrow-hover-color, red);
|
|
450
|
-
stroke-width:
|
|
480
|
+
stroke-width: 2.5px;
|
|
451
481
|
opacity: 1;
|
|
452
482
|
}
|
|
453
483
|
|
|
454
484
|
/*noinspection CssUnresolvedCustomProperty*/
|
|
455
|
-
.
|
|
485
|
+
._arrow_clickable_13ifc_1:hover polygon {
|
|
456
486
|
fill: var(--gantt-arrow-hover-color, red);
|
|
487
|
+
opacity: 1;
|
|
457
488
|
}
|
|
458
489
|
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
stroke
|
|
463
|
-
stroke-
|
|
464
|
-
opacity:
|
|
465
|
-
|
|
466
|
-
stroke-width 0.15s ease,
|
|
467
|
-
opacity 0.15s ease;
|
|
490
|
+
/* Selected state — when arrow or task is clicked */
|
|
491
|
+
/*noinspection CssUnresolvedCustomProperty*/
|
|
492
|
+
.gantt-arrow-selected ._mainPath_13ifc_9 {
|
|
493
|
+
stroke: var(--gantt-arrow-selected-color, #1976d2);
|
|
494
|
+
stroke-width: 2.5px;
|
|
495
|
+
opacity: 1;
|
|
496
|
+
filter: drop-shadow(0 0 2px var(--gantt-arrow-selected-color, #1976d2));
|
|
468
497
|
}
|
|
469
498
|
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
499
|
+
/*noinspection CssUnresolvedCustomProperty*/
|
|
500
|
+
.gantt-arrow-selected polygon {
|
|
501
|
+
fill: var(--gantt-arrow-selected-color, #1976d2);
|
|
502
|
+
opacity: 1;
|
|
474
503
|
}
|
|
475
504
|
._relationLine_wh2qy_1 {
|
|
476
505
|
/*noinspection CssUnresolvedCustomProperty*/
|
|
@@ -716,3 +745,102 @@
|
|
|
716
745
|
._loaderHidden_covn4_49 {
|
|
717
746
|
display: none;
|
|
718
747
|
}
|
|
748
|
+
._drawerOverlay_3p2w6_1 {
|
|
749
|
+
position: absolute;
|
|
750
|
+
top: 0;
|
|
751
|
+
right: 0;
|
|
752
|
+
bottom: 0;
|
|
753
|
+
left: 0;
|
|
754
|
+
z-index: 100;
|
|
755
|
+
pointer-events: none;
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
._drawer_3p2w6_1 {
|
|
759
|
+
position: absolute;
|
|
760
|
+
top: 0;
|
|
761
|
+
right: 0;
|
|
762
|
+
bottom: 0;
|
|
763
|
+
background: #fff;
|
|
764
|
+
border-left: 1px solid #ddd;
|
|
765
|
+
box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
|
|
766
|
+
display: flex;
|
|
767
|
+
flex-direction: column;
|
|
768
|
+
overflow: hidden;
|
|
769
|
+
pointer-events: auto;
|
|
770
|
+
z-index: 101;
|
|
771
|
+
animation: _slideIn_3p2w6_1 0.2s ease-out;
|
|
772
|
+
}
|
|
773
|
+
|
|
774
|
+
@keyframes _slideIn_3p2w6_1 {
|
|
775
|
+
from {
|
|
776
|
+
transform: translateX(100%);
|
|
777
|
+
}
|
|
778
|
+
to {
|
|
779
|
+
transform: translateX(0);
|
|
780
|
+
}
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
._drawerHeader_3p2w6_71 {
|
|
784
|
+
display: flex;
|
|
785
|
+
align-items: center;
|
|
786
|
+
justify-content: flex-end;
|
|
787
|
+
padding: 8px 12px;
|
|
788
|
+
border-bottom: 1px solid #eee;
|
|
789
|
+
flex-shrink: 0;
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
._closeButton_3p2w6_89 {
|
|
793
|
+
background: none;
|
|
794
|
+
border: 1px solid #ddd;
|
|
795
|
+
border-radius: 4px;
|
|
796
|
+
cursor: pointer;
|
|
797
|
+
font-size: 18px;
|
|
798
|
+
line-height: 1;
|
|
799
|
+
padding: 4px 8px;
|
|
800
|
+
color: #666;
|
|
801
|
+
transition:
|
|
802
|
+
background 0.15s ease,
|
|
803
|
+
color 0.15s ease;
|
|
804
|
+
}
|
|
805
|
+
|
|
806
|
+
._closeButton_3p2w6_89:hover {
|
|
807
|
+
background: #f5f5f5;
|
|
808
|
+
color: #333;
|
|
809
|
+
}
|
|
810
|
+
|
|
811
|
+
._drawerContent_3p2w6_127 {
|
|
812
|
+
flex: 1;
|
|
813
|
+
overflow-y: auto;
|
|
814
|
+
padding: 16px;
|
|
815
|
+
}
|
|
816
|
+
|
|
817
|
+
._defaultSection_3p2w6_139 {
|
|
818
|
+
margin-bottom: 16px;
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
._defaultSection_3p2w6_139 h3 {
|
|
822
|
+
margin: 0 0 12px 0;
|
|
823
|
+
font-size: 14px;
|
|
824
|
+
font-weight: 600;
|
|
825
|
+
color: #333;
|
|
826
|
+
}
|
|
827
|
+
|
|
828
|
+
._defaultSection_3p2w6_139 h4 {
|
|
829
|
+
margin: 12px 0 8px 0;
|
|
830
|
+
font-size: 13px;
|
|
831
|
+
font-weight: 600;
|
|
832
|
+
color: #555;
|
|
833
|
+
}
|
|
834
|
+
|
|
835
|
+
._defaultField_3p2w6_175 {
|
|
836
|
+
display: flex;
|
|
837
|
+
gap: 8px;
|
|
838
|
+
padding: 4px 0;
|
|
839
|
+
font-size: 13px;
|
|
840
|
+
color: #444;
|
|
841
|
+
}
|
|
842
|
+
|
|
843
|
+
._defaultFieldLabel_3p2w6_191 {
|
|
844
|
+
font-weight: 600;
|
|
845
|
+
min-width: 60px;
|
|
846
|
+
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ 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
|
+
import type { GanttDrawerData } from "../components/other/gantt-drawer";
|
|
5
6
|
export type RenderTopHeader = (date: Date, viewMode: ViewMode, dateSetup: DateSetup) => ReactNode;
|
|
6
7
|
export type RenderCustomLabel = (task: RenderTask, x1: number, width: number, taskHeight: number, arrowIndent: number, taskYOffset: number, movingAction: TaskBarMoveAction | null, viewMode: ViewMode, rtl?: boolean) => ReactNode;
|
|
7
8
|
export type RenderBottomHeader = (date: Date, viewMode: ViewMode, dateSetup: DateSetup, index: number, isUnknownDates: boolean) => ReactNode;
|
|
@@ -373,6 +374,27 @@ export interface GanttProps {
|
|
|
373
374
|
* Set to a task id to scroll both horizontally and vertically to that task.
|
|
374
375
|
*/
|
|
375
376
|
scrollToTaskId?: TaskId;
|
|
377
|
+
/**
|
|
378
|
+
* Enable the right-side drawer that opens on task or arrow click.
|
|
379
|
+
* When enabled, clicking a task highlights its connected arrows and opens
|
|
380
|
+
* a drawer with the task data. Clicking an arrow highlights it and opens
|
|
381
|
+
* a drawer with the connection data.
|
|
382
|
+
*/
|
|
383
|
+
enableDrawer?: boolean;
|
|
384
|
+
/**
|
|
385
|
+
* Width in pixels of the drawer panel. Defaults to 300.
|
|
386
|
+
*/
|
|
387
|
+
drawerWidth?: number;
|
|
388
|
+
/**
|
|
389
|
+
* Custom render function for the drawer content.
|
|
390
|
+
* Receives the drawer data (task or connection) and should return a ReactNode.
|
|
391
|
+
* If not provided, a default layout showing task/connection details is used.
|
|
392
|
+
*/
|
|
393
|
+
renderDrawerContent?: (data: GanttDrawerData) => ReactNode;
|
|
394
|
+
/**
|
|
395
|
+
* Callback fired when an arrow (relation) is clicked.
|
|
396
|
+
*/
|
|
397
|
+
onArrowClick?: (taskFrom: Task, taskTo: Task) => void;
|
|
376
398
|
}
|
|
377
399
|
export interface GanttTaskBarActions {
|
|
378
400
|
allowMoveTaskBar?: (action: TaskBarMoveAction, task: RenderTask) => boolean;
|
package/package.json
CHANGED