gantt-lib 0.121.2 → 0.123.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/index.css.map +1 -1
- package/dist/index.d.mts +16 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.js +885 -460
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +965 -540
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +220 -4
- package/package.json +1 -1
package/dist/styles.css
CHANGED
|
@@ -567,6 +567,80 @@
|
|
|
567
567
|
display: flex;
|
|
568
568
|
align-items: center;
|
|
569
569
|
}
|
|
570
|
+
.gantt-tr-dependencyPort {
|
|
571
|
+
position: absolute;
|
|
572
|
+
top: 50%;
|
|
573
|
+
z-index: 12;
|
|
574
|
+
width: 24px;
|
|
575
|
+
height: var(--gantt-dependency-port-height, var(--gantt-task-bar-height, 28px));
|
|
576
|
+
padding: 0;
|
|
577
|
+
border: 0;
|
|
578
|
+
border-radius: 8px;
|
|
579
|
+
background: transparent;
|
|
580
|
+
transform: translateY(-50%);
|
|
581
|
+
cursor: crosshair;
|
|
582
|
+
opacity: 0;
|
|
583
|
+
transition:
|
|
584
|
+
opacity 140ms ease,
|
|
585
|
+
background-color 140ms ease,
|
|
586
|
+
transform 140ms ease;
|
|
587
|
+
}
|
|
588
|
+
.gantt-tr-row:hover .gantt-tr-dependencyPort,
|
|
589
|
+
.gantt-tr-dependencyPort:focus-visible,
|
|
590
|
+
.gantt-tr-dependencyPortDragActive {
|
|
591
|
+
opacity: 1;
|
|
592
|
+
}
|
|
593
|
+
.gantt-tr-dependencyPort::after {
|
|
594
|
+
content: "";
|
|
595
|
+
position: absolute;
|
|
596
|
+
top: 50%;
|
|
597
|
+
width: 8px;
|
|
598
|
+
height: 8px;
|
|
599
|
+
border: 2px solid var(--gantt-dependency-port-color, #7c3aed);
|
|
600
|
+
border-radius: 50%;
|
|
601
|
+
background: var(--gantt-cell-background, #fff);
|
|
602
|
+
transform: translateY(-50%) scale(.75);
|
|
603
|
+
transition: transform 140ms cubic-bezier(.2, 0, 0, 1), background-color 140ms ease;
|
|
604
|
+
}
|
|
605
|
+
.gantt-tr-dependencyPort:hover,
|
|
606
|
+
.gantt-tr-dependencyPort:focus-visible {
|
|
607
|
+
background: color-mix(in srgb, var(--gantt-dependency-port-color, #7c3aed) 12%, transparent);
|
|
608
|
+
outline: none;
|
|
609
|
+
}
|
|
610
|
+
.gantt-tr-dependencyPort:hover::after,
|
|
611
|
+
.gantt-tr-dependencyPort:focus-visible::after,
|
|
612
|
+
.gantt-tr-dependencyPortDragActive::after {
|
|
613
|
+
transform: translateY(-50%) scale(1);
|
|
614
|
+
background: var(--gantt-dependency-port-color, #7c3aed);
|
|
615
|
+
}
|
|
616
|
+
.gantt-tr-dependencyPortLeft {
|
|
617
|
+
}
|
|
618
|
+
.gantt-tr-dependencyPort::after {
|
|
619
|
+
pointer-events: none;
|
|
620
|
+
}
|
|
621
|
+
.gantt-tr-dependencyPortLeft::after {
|
|
622
|
+
left: 12px;
|
|
623
|
+
}
|
|
624
|
+
.gantt-tr-dependencyPortRight::after {
|
|
625
|
+
left: 0;
|
|
626
|
+
}
|
|
627
|
+
.gantt-tr-dependencyPortMilestone {
|
|
628
|
+
height: var(--gantt-dependency-port-height, 14px);
|
|
629
|
+
}
|
|
630
|
+
.gantt-tr-dependencyPortParent {
|
|
631
|
+
top: calc(50% - 4px);
|
|
632
|
+
height: var(--gantt-parent-bar-height, 14px);
|
|
633
|
+
transform: translateY(-50%);
|
|
634
|
+
}
|
|
635
|
+
.gantt-tr-dependencyPortDragActive {
|
|
636
|
+
background: color-mix(in srgb, var(--gantt-dependency-port-color, #7c3aed) 10%, transparent);
|
|
637
|
+
}
|
|
638
|
+
@media (prefers-reduced-motion: reduce) {
|
|
639
|
+
.gantt-tr-dependencyPort,
|
|
640
|
+
.gantt-tr-dependencyPort::after {
|
|
641
|
+
transition: none;
|
|
642
|
+
}
|
|
643
|
+
}
|
|
570
644
|
.gantt-tr-baseline {
|
|
571
645
|
position: absolute;
|
|
572
646
|
top: calc(50% + var(--gantt-task-bar-height, 28px) / 2 + var(--gantt-baseline-offset, -6px));
|
|
@@ -812,6 +886,7 @@
|
|
|
812
886
|
}
|
|
813
887
|
.gantt-dependency-line {
|
|
814
888
|
pointer-events: visibleStroke;
|
|
889
|
+
cursor: pointer;
|
|
815
890
|
}
|
|
816
891
|
.gantt-dependency-hit-area {
|
|
817
892
|
fill: none;
|
|
@@ -820,6 +895,7 @@
|
|
|
820
895
|
stroke-linecap: round;
|
|
821
896
|
stroke-linejoin: round;
|
|
822
897
|
pointer-events: stroke;
|
|
898
|
+
cursor: pointer;
|
|
823
899
|
}
|
|
824
900
|
.gantt-dependency-path {
|
|
825
901
|
fill: none;
|
|
@@ -840,11 +916,11 @@
|
|
|
840
916
|
stroke: #ef4444;
|
|
841
917
|
stroke-width: 2;
|
|
842
918
|
}
|
|
843
|
-
.gantt-dependency-line
|
|
844
|
-
stroke:
|
|
845
|
-
stroke-width:
|
|
919
|
+
.gantt-dependency-line-hovered .gantt-dependency-hit-area {
|
|
920
|
+
stroke: transparent;
|
|
921
|
+
stroke-width: 12;
|
|
846
922
|
}
|
|
847
|
-
.gantt-dependency-line
|
|
923
|
+
.gantt-dependency-line-hovered .gantt-dependency-path {
|
|
848
924
|
stroke: var(--gantt-dependency-hover-color, #ef4444);
|
|
849
925
|
stroke-width: 2;
|
|
850
926
|
marker-end: url(#arrowhead-hover);
|
|
@@ -863,6 +939,55 @@
|
|
|
863
939
|
opacity: 0.85;
|
|
864
940
|
}
|
|
865
941
|
|
|
942
|
+
/* src/components/DependencyCreationOverlay/DependencyCreationOverlay.css */
|
|
943
|
+
.gantt-dependencyCreation-svg {
|
|
944
|
+
position: absolute;
|
|
945
|
+
inset: 0;
|
|
946
|
+
z-index: 15;
|
|
947
|
+
overflow: visible;
|
|
948
|
+
pointer-events: none;
|
|
949
|
+
}
|
|
950
|
+
.gantt-dependencyCreation-path {
|
|
951
|
+
fill: none;
|
|
952
|
+
stroke: var(--gantt-dependency-port-color, #7c3aed);
|
|
953
|
+
stroke-width: 2;
|
|
954
|
+
stroke-linecap: round;
|
|
955
|
+
stroke-dasharray: 5 5;
|
|
956
|
+
animation: gantt-dependencyCreation-dash 420ms linear infinite;
|
|
957
|
+
}
|
|
958
|
+
.gantt-dependencyCreation-pathTargeted {
|
|
959
|
+
stroke: var(--gantt-dependency-port-target-color, #16a34a);
|
|
960
|
+
}
|
|
961
|
+
.gantt-dependencyCreation-source,
|
|
962
|
+
.gantt-dependencyCreation-target {
|
|
963
|
+
fill: var(--gantt-cell-background, #fff);
|
|
964
|
+
stroke: var(--gantt-dependency-port-color, #7c3aed);
|
|
965
|
+
stroke-width: 2;
|
|
966
|
+
}
|
|
967
|
+
.gantt-dependencyCreation-targetValid {
|
|
968
|
+
fill: var(--gantt-dependency-port-target-color, #16a34a);
|
|
969
|
+
stroke: var(--gantt-cell-background, #fff);
|
|
970
|
+
}
|
|
971
|
+
.gantt-dependencyCreation-label {
|
|
972
|
+
fill: var(--gantt-dependency-port-color, #7c3aed);
|
|
973
|
+
font-size: 11px;
|
|
974
|
+
font-weight: 700;
|
|
975
|
+
paint-order: stroke;
|
|
976
|
+
stroke: var(--gantt-cell-background, #fff);
|
|
977
|
+
stroke-width: 4px;
|
|
978
|
+
stroke-linejoin: round;
|
|
979
|
+
}
|
|
980
|
+
@keyframes gantt-dependencyCreation-dash {
|
|
981
|
+
to {
|
|
982
|
+
stroke-dashoffset: -10;
|
|
983
|
+
}
|
|
984
|
+
}
|
|
985
|
+
@media (prefers-reduced-motion: reduce) {
|
|
986
|
+
.gantt-dependencyCreation-path {
|
|
987
|
+
animation: none;
|
|
988
|
+
}
|
|
989
|
+
}
|
|
990
|
+
|
|
866
991
|
/* src/components/TaskList/TaskList.css */
|
|
867
992
|
.gantt-tl-overlay {
|
|
868
993
|
position: sticky;
|
|
@@ -1831,6 +1956,11 @@
|
|
|
1831
1956
|
font-weight: 600;
|
|
1832
1957
|
color: #1d4ed8;
|
|
1833
1958
|
}
|
|
1959
|
+
.gantt-tl-dep-chip-control {
|
|
1960
|
+
position: relative;
|
|
1961
|
+
display: inline-flex;
|
|
1962
|
+
align-items: center;
|
|
1963
|
+
}
|
|
1834
1964
|
.gantt-tl-dep-chip {
|
|
1835
1965
|
display: inline-flex;
|
|
1836
1966
|
align-items: center;
|
|
@@ -1856,6 +1986,28 @@
|
|
|
1856
1986
|
font-size: 0.75rem;
|
|
1857
1987
|
padding: 3px 6px;
|
|
1858
1988
|
}
|
|
1989
|
+
.gantt-tl-dep-expand {
|
|
1990
|
+
position: absolute;
|
|
1991
|
+
left: calc(100% + 4px);
|
|
1992
|
+
top: 50%;
|
|
1993
|
+
display: inline-flex;
|
|
1994
|
+
align-items: center;
|
|
1995
|
+
justify-content: center;
|
|
1996
|
+
width: 24px;
|
|
1997
|
+
height: 22px;
|
|
1998
|
+
padding: 0;
|
|
1999
|
+
border: 0;
|
|
2000
|
+
border-radius: 5px;
|
|
2001
|
+
background: transparent;
|
|
2002
|
+
color: #2563eb;
|
|
2003
|
+
cursor: pointer;
|
|
2004
|
+
transform: translateY(-50%);
|
|
2005
|
+
}
|
|
2006
|
+
.gantt-tl-dep-expand:hover,
|
|
2007
|
+
.gantt-tl-dep-expand:focus-visible {
|
|
2008
|
+
background: rgba(37, 99, 235, 0.12);
|
|
2009
|
+
outline: none;
|
|
2010
|
+
}
|
|
1859
2011
|
.gantt-tl-dep-chip-with-number:hover {
|
|
1860
2012
|
background-color: rgba(59, 130, 246, 0.12);
|
|
1861
2013
|
}
|
|
@@ -2122,6 +2274,7 @@
|
|
|
2122
2274
|
.gantt-tl-dep-overflow-list {
|
|
2123
2275
|
display: flex;
|
|
2124
2276
|
flex-direction: column;
|
|
2277
|
+
align-items: flex-start;
|
|
2125
2278
|
gap: 4px;
|
|
2126
2279
|
padding: 8px;
|
|
2127
2280
|
min-width: 140px;
|
|
@@ -3975,6 +4128,69 @@
|
|
|
3975
4128
|
position: relative;
|
|
3976
4129
|
background-color: var(--gantt-cell-background, #ffffff);
|
|
3977
4130
|
}
|
|
4131
|
+
.gantt-dependencyCreation-error {
|
|
4132
|
+
position: sticky;
|
|
4133
|
+
top: 12px;
|
|
4134
|
+
z-index: 30;
|
|
4135
|
+
width: max-content;
|
|
4136
|
+
max-width: min(360px, calc(100% - 24px));
|
|
4137
|
+
margin: 12px auto 0;
|
|
4138
|
+
padding: 8px 12px;
|
|
4139
|
+
border-radius: 8px;
|
|
4140
|
+
color: #991b1b;
|
|
4141
|
+
background: #fef2f2;
|
|
4142
|
+
box-shadow: 0 6px 18px rgba(127, 29, 29, .14);
|
|
4143
|
+
font-size: .8rem;
|
|
4144
|
+
font-weight: 650;
|
|
4145
|
+
pointer-events: none;
|
|
4146
|
+
}
|
|
4147
|
+
.gantt-dependencyLineMenu {
|
|
4148
|
+
position: absolute;
|
|
4149
|
+
z-index: 32;
|
|
4150
|
+
display: inline-flex;
|
|
4151
|
+
align-items: center;
|
|
4152
|
+
gap: 5px;
|
|
4153
|
+
min-height: 28px;
|
|
4154
|
+
padding: 3px 4px 3px 8px;
|
|
4155
|
+
border-radius: 7px;
|
|
4156
|
+
background: var(--gantt-popover-bg, #fff);
|
|
4157
|
+
box-shadow: 0 5px 16px rgba(15, 23, 42, .18), 0 0 0 1px rgba(148, 163, 184, .2);
|
|
4158
|
+
transform: translateY(-50%);
|
|
4159
|
+
pointer-events: auto;
|
|
4160
|
+
}
|
|
4161
|
+
.gantt-dependencyLineMenuType {
|
|
4162
|
+
color: var(--gantt-dependency-hover-color, #ef4444);
|
|
4163
|
+
font-size: .72rem;
|
|
4164
|
+
font-weight: 750;
|
|
4165
|
+
line-height: 1;
|
|
4166
|
+
}
|
|
4167
|
+
.gantt-dependencyLineMenuDelete {
|
|
4168
|
+
display: inline-grid;
|
|
4169
|
+
width: 22px;
|
|
4170
|
+
height: 22px;
|
|
4171
|
+
place-items: center;
|
|
4172
|
+
padding: 0;
|
|
4173
|
+
border: 0;
|
|
4174
|
+
border-radius: 5px;
|
|
4175
|
+
color: #991b1b;
|
|
4176
|
+
background: #fef2f2;
|
|
4177
|
+
cursor: pointer;
|
|
4178
|
+
font-size: 17px;
|
|
4179
|
+
line-height: 1;
|
|
4180
|
+
transition:
|
|
4181
|
+
background-color 120ms ease,
|
|
4182
|
+
color 120ms ease,
|
|
4183
|
+
transform 120ms ease;
|
|
4184
|
+
}
|
|
4185
|
+
.gantt-dependencyLineMenuDelete:hover,
|
|
4186
|
+
.gantt-dependencyLineMenuDelete:focus-visible {
|
|
4187
|
+
color: #fff;
|
|
4188
|
+
background: #dc2626;
|
|
4189
|
+
outline: none;
|
|
4190
|
+
}
|
|
4191
|
+
.gantt-dependencyLineMenuDelete:active {
|
|
4192
|
+
transform: scale(.96);
|
|
4193
|
+
}
|
|
3978
4194
|
.gantt-chartSurface {
|
|
3979
4195
|
display: block;
|
|
3980
4196
|
}
|