gantt-task-react-v 1.4.6 → 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 -6
- package/dist/components/other/arrow.d.ts +1 -0
- package/dist/components/other/gantt-drawer.d.ts +6 -13
- package/dist/gantt-task-react.es.js +144 -255
- package/dist/gantt-task-react.umd.js +144 -255
- package/dist/style.css +66 -111
- package/dist/types/index.d.ts +0 -1
- package/dist/types/public-types.d.ts +29 -20
- package/package.json +1 -1
package/dist/style.css
CHANGED
|
@@ -439,67 +439,50 @@
|
|
|
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
|
-
._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 */
|
|
476
446
|
/*noinspection CssUnresolvedCustomProperty*/
|
|
477
|
-
.
|
|
478
|
-
filter:
|
|
447
|
+
._arrow_clickable_3u3q2_1:hover ._mainPath_3u3q2_11 {
|
|
448
|
+
filter: var(--gantt-hover-filter);
|
|
479
449
|
stroke: var(--gantt-arrow-hover-color, red);
|
|
480
|
-
stroke-width:
|
|
450
|
+
stroke-width: 2px;
|
|
481
451
|
opacity: 1;
|
|
482
452
|
}
|
|
483
453
|
|
|
484
454
|
/*noinspection CssUnresolvedCustomProperty*/
|
|
485
|
-
.
|
|
455
|
+
._arrow_clickable_3u3q2_1:hover polygon {
|
|
486
456
|
fill: var(--gantt-arrow-hover-color, red);
|
|
487
|
-
opacity: 1;
|
|
488
457
|
}
|
|
489
458
|
|
|
490
|
-
/* Selected state — when arrow or task is clicked */
|
|
491
459
|
/*noinspection CssUnresolvedCustomProperty*/
|
|
492
|
-
.
|
|
493
|
-
stroke: var(--gantt-arrow-
|
|
494
|
-
stroke-width:
|
|
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;
|
|
495
463
|
opacity: 1;
|
|
496
|
-
filter: drop-shadow(0 0 2px var(--gantt-arrow-selected-color, #1976d2));
|
|
497
464
|
}
|
|
498
465
|
|
|
499
466
|
/*noinspection CssUnresolvedCustomProperty*/
|
|
500
|
-
.
|
|
501
|
-
fill: var(--gantt-arrow-
|
|
502
|
-
|
|
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 {
|
|
472
|
+
fill: none;
|
|
473
|
+
stroke-width: 1.2px;
|
|
474
|
+
stroke-linecap: round;
|
|
475
|
+
stroke-linejoin: round;
|
|
476
|
+
opacity: 0.55;
|
|
477
|
+
transition:
|
|
478
|
+
stroke-width 0.15s ease,
|
|
479
|
+
opacity 0.15s ease;
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
._clickZone_3u3q2_81 {
|
|
483
|
+
fill: none;
|
|
484
|
+
stroke: transparent;
|
|
485
|
+
stroke-width: 12px;
|
|
503
486
|
}
|
|
504
487
|
._relationLine_wh2qy_1 {
|
|
505
488
|
/*noinspection CssUnresolvedCustomProperty*/
|
|
@@ -745,102 +728,74 @@
|
|
|
745
728
|
._loaderHidden_covn4_49 {
|
|
746
729
|
display: none;
|
|
747
730
|
}
|
|
748
|
-
.
|
|
731
|
+
._overlay_1rnqn_1 {
|
|
749
732
|
position: absolute;
|
|
750
733
|
top: 0;
|
|
734
|
+
left: 0;
|
|
751
735
|
right: 0;
|
|
752
736
|
bottom: 0;
|
|
753
|
-
|
|
754
|
-
z-index: 100;
|
|
755
|
-
pointer-events: none;
|
|
737
|
+
z-index: 998;
|
|
756
738
|
}
|
|
757
739
|
|
|
758
|
-
.
|
|
740
|
+
._drawer_1rnqn_19 {
|
|
759
741
|
position: absolute;
|
|
760
742
|
top: 0;
|
|
761
743
|
right: 0;
|
|
762
744
|
bottom: 0;
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
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);
|
|
766
749
|
display: flex;
|
|
767
750
|
flex-direction: column;
|
|
768
751
|
overflow: hidden;
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
animation: _slideIn_3p2w6_1 0.2s ease-out;
|
|
752
|
+
transform: translateX(100%);
|
|
753
|
+
transition: transform 0.25s ease;
|
|
772
754
|
}
|
|
773
755
|
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
transform: translateX(100%);
|
|
777
|
-
}
|
|
778
|
-
to {
|
|
779
|
-
transform: translateX(0);
|
|
780
|
-
}
|
|
756
|
+
._drawer_open_1rnqn_51 {
|
|
757
|
+
transform: translateX(0);
|
|
781
758
|
}
|
|
782
759
|
|
|
783
|
-
.
|
|
760
|
+
._header_1rnqn_59 {
|
|
784
761
|
display: flex;
|
|
785
762
|
align-items: center;
|
|
786
|
-
justify-content:
|
|
787
|
-
padding:
|
|
788
|
-
border-bottom: 1px solid #
|
|
763
|
+
justify-content: space-between;
|
|
764
|
+
padding: 12px 16px;
|
|
765
|
+
border-bottom: 1px solid var(--gantt-drawer-border-color, #e0e0e0);
|
|
789
766
|
flex-shrink: 0;
|
|
790
767
|
}
|
|
791
768
|
|
|
792
|
-
.
|
|
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 {
|
|
793
780
|
background: none;
|
|
794
|
-
border:
|
|
795
|
-
border-radius: 4px;
|
|
781
|
+
border: none;
|
|
796
782
|
cursor: pointer;
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
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;
|
|
804
790
|
}
|
|
805
791
|
|
|
806
|
-
.
|
|
807
|
-
background: #
|
|
808
|
-
color: #333;
|
|
792
|
+
._closeButton_1rnqn_97:hover {
|
|
793
|
+
background: var(--gantt-drawer-close-hover-bg, #f0f0f0);
|
|
809
794
|
}
|
|
810
795
|
|
|
811
|
-
.
|
|
796
|
+
._body_1rnqn_131 {
|
|
812
797
|
flex: 1;
|
|
813
798
|
overflow-y: auto;
|
|
799
|
+
overflow-x: hidden;
|
|
814
800
|
padding: 16px;
|
|
815
801
|
}
|
|
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,7 +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
|
-
|
|
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
|
+
}
|
|
6
28
|
export type RenderTopHeader = (date: Date, viewMode: ViewMode, dateSetup: DateSetup) => ReactNode;
|
|
7
29
|
export type RenderCustomLabel = (task: RenderTask, x1: number, width: number, taskHeight: number, arrowIndent: number, taskYOffset: number, movingAction: TaskBarMoveAction | null, viewMode: ViewMode, rtl?: boolean) => ReactNode;
|
|
8
30
|
export type RenderBottomHeader = (date: Date, viewMode: ViewMode, dateSetup: DateSetup, index: number, isUnknownDates: boolean) => ReactNode;
|
|
@@ -192,6 +214,10 @@ export interface GanttTaskBarProps extends GanttTaskBarActions {
|
|
|
192
214
|
* Invokes on double-click on the relation arrow between tasks
|
|
193
215
|
*/
|
|
194
216
|
onArrowDoubleClick?: OnArrowDoubleClick;
|
|
217
|
+
/**
|
|
218
|
+
* Invokes on click on the relation arrow between tasks
|
|
219
|
+
*/
|
|
220
|
+
onArrowClick?: (taskFrom: Task, taskTo: Task) => void;
|
|
195
221
|
/**
|
|
196
222
|
* Invokes on bar double click.
|
|
197
223
|
*/
|
|
@@ -375,26 +401,9 @@ export interface GanttProps {
|
|
|
375
401
|
*/
|
|
376
402
|
scrollToTaskId?: TaskId;
|
|
377
403
|
/**
|
|
378
|
-
*
|
|
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.
|
|
404
|
+
* Drawer panel options for task/arrow click
|
|
386
405
|
*/
|
|
387
|
-
|
|
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;
|
|
406
|
+
drawer?: GanttDrawerProps;
|
|
398
407
|
}
|
|
399
408
|
export interface GanttTaskBarActions {
|
|
400
409
|
allowMoveTaskBar?: (action: TaskBarMoveAction, task: RenderTask) => boolean;
|
package/package.json
CHANGED