gantt-lib 0.3.4 → 0.4.1
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 +17 -1
- package/dist/index.d.ts +17 -1
- package/dist/index.js +433 -153
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +414 -133
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +106 -23
- package/package.json +1 -1
package/dist/styles.css
CHANGED
|
@@ -227,6 +227,19 @@
|
|
|
227
227
|
.gantt-day-btn.disabled:hover {
|
|
228
228
|
background: transparent;
|
|
229
229
|
}
|
|
230
|
+
.gantt-cal-nav {
|
|
231
|
+
display: flex;
|
|
232
|
+
gap: 4px;
|
|
233
|
+
padding: 8px;
|
|
234
|
+
border-top: 1px solid var(--gantt-input-border);
|
|
235
|
+
margin-top: 4px;
|
|
236
|
+
}
|
|
237
|
+
.gantt-cal-nav .gantt-btn {
|
|
238
|
+
flex: 1;
|
|
239
|
+
min-width: 0;
|
|
240
|
+
font-size: 0.8rem;
|
|
241
|
+
padding: 0 8px;
|
|
242
|
+
}
|
|
230
243
|
|
|
231
244
|
/* src/styles.css */
|
|
232
245
|
:root {
|
|
@@ -236,6 +249,7 @@
|
|
|
236
249
|
--gantt-row-height: 30px;
|
|
237
250
|
--gantt-header-height: 40px;
|
|
238
251
|
--gantt-day-width: 30px;
|
|
252
|
+
--gantt-container-border-radius: 10px;
|
|
239
253
|
--gantt-task-bar-default-color: #3b82f6;
|
|
240
254
|
--gantt-task-bar-text-color: #ffffff;
|
|
241
255
|
--gantt-task-bar-border-radius: 4px;
|
|
@@ -629,6 +643,7 @@
|
|
|
629
643
|
border-bottom: 1px solid var(--gantt-grid-line-color, #e0e0e0);
|
|
630
644
|
box-sizing: border-box;
|
|
631
645
|
cursor: pointer;
|
|
646
|
+
position: relative;
|
|
632
647
|
}
|
|
633
648
|
.gantt-tl-row:hover {
|
|
634
649
|
background-color: rgba(59, 130, 246, 0.04);
|
|
@@ -654,26 +669,16 @@
|
|
|
654
669
|
flex-shrink: 0;
|
|
655
670
|
cursor: pointer;
|
|
656
671
|
}
|
|
657
|
-
.gantt-tl-num-icon {
|
|
658
|
-
display: none;
|
|
659
|
-
color: #6b7280;
|
|
660
|
-
}
|
|
661
|
-
.gantt-tl-cell-number:hover .gantt-tl-num-label {
|
|
662
|
-
display: none;
|
|
663
|
-
}
|
|
664
|
-
.gantt-tl-cell-number:hover .gantt-tl-num-icon {
|
|
665
|
-
display: block;
|
|
666
|
-
}
|
|
667
672
|
.gantt-tl-headerCell.gantt-tl-cell-name {
|
|
668
673
|
padding-left: 4px;
|
|
669
674
|
}
|
|
670
675
|
.gantt-tl-cell-name {
|
|
671
676
|
flex: 1;
|
|
672
|
-
min-width:
|
|
677
|
+
min-width: 150px;
|
|
673
678
|
position: relative;
|
|
674
679
|
overflow: visible;
|
|
675
680
|
align-items: center;
|
|
676
|
-
padding: 0;
|
|
681
|
+
padding: 0 4px;
|
|
677
682
|
}
|
|
678
683
|
.gantt-tl-cell-date {
|
|
679
684
|
width: 68px;
|
|
@@ -687,26 +692,28 @@
|
|
|
687
692
|
-webkit-box-orient: vertical;
|
|
688
693
|
-webkit-line-clamp: 2;
|
|
689
694
|
overflow: hidden;
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
padding: 0
|
|
695
|
+
position: absolute;
|
|
696
|
+
inset: 0;
|
|
697
|
+
padding: 0 4px;
|
|
693
698
|
font-size: 0.8rem;
|
|
694
699
|
line-height: 1.2;
|
|
695
700
|
font-family: inherit;
|
|
696
701
|
color: #374151;
|
|
697
702
|
background: transparent;
|
|
698
703
|
border: none;
|
|
699
|
-
cursor:
|
|
704
|
+
cursor: pointer;
|
|
700
705
|
text-align: left;
|
|
701
706
|
user-select: none;
|
|
702
707
|
white-space: normal;
|
|
703
708
|
word-break: break-word;
|
|
704
709
|
box-sizing: border-box;
|
|
705
|
-
min-height: 100%;
|
|
706
710
|
}
|
|
707
711
|
.gantt-tl-name-trigger:hover {
|
|
708
712
|
background-color: rgba(59, 130, 246, 0.1);
|
|
709
713
|
}
|
|
714
|
+
.gantt-tl-name-trigger:active {
|
|
715
|
+
background-color: rgba(59, 130, 246, 0.2);
|
|
716
|
+
}
|
|
710
717
|
.gantt-tl-name-input {
|
|
711
718
|
position: absolute;
|
|
712
719
|
top: 0;
|
|
@@ -726,16 +733,57 @@
|
|
|
726
733
|
.gantt-tl-name-locked {
|
|
727
734
|
cursor: default !important;
|
|
728
735
|
}
|
|
736
|
+
.gantt-tl-name-actions {
|
|
737
|
+
position: absolute;
|
|
738
|
+
right: 4px;
|
|
739
|
+
top: 50%;
|
|
740
|
+
transform: translateY(-50%);
|
|
741
|
+
display: flex;
|
|
742
|
+
gap: 4px;
|
|
743
|
+
align-items: center;
|
|
744
|
+
}
|
|
745
|
+
.gantt-tl-name-action-btn {
|
|
746
|
+
display: inline-flex;
|
|
747
|
+
align-items: center;
|
|
748
|
+
justify-content: center;
|
|
749
|
+
border: none;
|
|
750
|
+
border-radius: 4px;
|
|
751
|
+
width: 20px;
|
|
752
|
+
height: 20px;
|
|
753
|
+
padding: 0;
|
|
754
|
+
cursor: pointer;
|
|
755
|
+
opacity: 0;
|
|
756
|
+
pointer-events: none;
|
|
757
|
+
transition: opacity 0.15s ease, background-color 0.15s ease;
|
|
758
|
+
}
|
|
759
|
+
.gantt-tl-row:hover .gantt-tl-name-action-btn {
|
|
760
|
+
opacity: 1;
|
|
761
|
+
pointer-events: auto;
|
|
762
|
+
}
|
|
729
763
|
.gantt-tl-cell-deps {
|
|
730
|
-
width:
|
|
764
|
+
width: 90px;
|
|
731
765
|
flex-shrink: 0;
|
|
732
766
|
flex-wrap: wrap;
|
|
733
767
|
gap: 2px;
|
|
734
768
|
padding: 2px 4px;
|
|
735
769
|
align-items: center;
|
|
736
|
-
overflow:
|
|
770
|
+
overflow: hidden;
|
|
737
771
|
position: relative;
|
|
738
772
|
}
|
|
773
|
+
.gantt-tl-action-insert {
|
|
774
|
+
background-color: #22c55e;
|
|
775
|
+
color: white;
|
|
776
|
+
}
|
|
777
|
+
.gantt-tl-action-insert:hover {
|
|
778
|
+
background-color: #16a34a;
|
|
779
|
+
}
|
|
780
|
+
.gantt-tl-action-delete {
|
|
781
|
+
background-color: #ef4444;
|
|
782
|
+
color: white;
|
|
783
|
+
}
|
|
784
|
+
.gantt-tl-action-delete:hover {
|
|
785
|
+
background-color: #dc2626;
|
|
786
|
+
}
|
|
739
787
|
.gantt-tl-dep-type-trigger {
|
|
740
788
|
display: flex;
|
|
741
789
|
align-items: center;
|
|
@@ -904,7 +952,7 @@
|
|
|
904
952
|
align-items: center;
|
|
905
953
|
justify-content: center;
|
|
906
954
|
background: transparent;
|
|
907
|
-
border: 1px
|
|
955
|
+
border: 1px solid rgba(59, 130, 246, 0.4);
|
|
908
956
|
border-radius: 4px;
|
|
909
957
|
width: 23px;
|
|
910
958
|
height: 23px;
|
|
@@ -915,6 +963,18 @@
|
|
|
915
963
|
font-family: inherit;
|
|
916
964
|
flex-shrink: 0;
|
|
917
965
|
}
|
|
966
|
+
.gantt-tl-dep-add-hover {
|
|
967
|
+
opacity: 0;
|
|
968
|
+
pointer-events: none;
|
|
969
|
+
transition: opacity 0.15s ease;
|
|
970
|
+
}
|
|
971
|
+
.gantt-tl-row:hover .gantt-tl-dep-add-hover {
|
|
972
|
+
opacity: 1;
|
|
973
|
+
pointer-events: auto;
|
|
974
|
+
}
|
|
975
|
+
.gantt-tl-dep-add-hidden {
|
|
976
|
+
display: none !important;
|
|
977
|
+
}
|
|
918
978
|
.gantt-tl-dep-add:hover {
|
|
919
979
|
background-color: rgba(59, 130, 246, 0.1);
|
|
920
980
|
border-color: #3b82f6;
|
|
@@ -927,14 +987,14 @@
|
|
|
927
987
|
background-color: rgba(59, 130, 246, 0.15);
|
|
928
988
|
}
|
|
929
989
|
.gantt-tl-row-picking-self .gantt-tl-cell-deps {
|
|
930
|
-
cursor:
|
|
990
|
+
cursor: pointer;
|
|
931
991
|
}
|
|
932
992
|
.gantt-tl-dep-source-hint {
|
|
933
993
|
font-size: 0.75rem;
|
|
934
994
|
color: #6b7280;
|
|
935
995
|
font-style: italic;
|
|
936
996
|
pointer-events: none;
|
|
937
|
-
white-space:
|
|
997
|
+
white-space: normal;
|
|
938
998
|
}
|
|
939
999
|
.gantt-tl-dep-delete-label {
|
|
940
1000
|
display: inline-flex;
|
|
@@ -979,6 +1039,29 @@
|
|
|
979
1039
|
z-index: 10;
|
|
980
1040
|
white-space: nowrap;
|
|
981
1041
|
}
|
|
1042
|
+
.gantt-tl-add-btn {
|
|
1043
|
+
width: 100%;
|
|
1044
|
+
padding: 6px 12px;
|
|
1045
|
+
text-align: left;
|
|
1046
|
+
background: transparent;
|
|
1047
|
+
border: none;
|
|
1048
|
+
border-top: 1px dashed var(--gantt-grid-line-color, #e0e0e0);
|
|
1049
|
+
cursor: pointer;
|
|
1050
|
+
font-size: 12px;
|
|
1051
|
+
color: var(--gantt-text-muted, #9ca3af);
|
|
1052
|
+
transition: background 0.15s ease, color 0.15s ease;
|
|
1053
|
+
font-family: inherit;
|
|
1054
|
+
}
|
|
1055
|
+
.gantt-tl-add-btn:hover {
|
|
1056
|
+
background: var(--gantt-hover-bg, rgba(0, 0, 0, 0.04));
|
|
1057
|
+
color: var(--gantt-text-color, #374151);
|
|
1058
|
+
}
|
|
1059
|
+
.gantt-tl-row-new {
|
|
1060
|
+
border-top: 1px dashed var(--gantt-grid-line-color, #e0e0e0);
|
|
1061
|
+
}
|
|
1062
|
+
.gantt-tl-cell-new-name {
|
|
1063
|
+
padding: 2px 4px;
|
|
1064
|
+
}
|
|
982
1065
|
|
|
983
1066
|
/* src/components/GanttChart/GanttChart.css */
|
|
984
1067
|
.gantt-container {
|
|
@@ -992,7 +1075,7 @@
|
|
|
992
1075
|
sans-serif;
|
|
993
1076
|
border: 1px solid var(--gantt-grid-line-color, #e0e0e0);
|
|
994
1077
|
background-color: var(--gantt-cell-background, #ffffff);
|
|
995
|
-
border-radius: 10px;
|
|
1078
|
+
border-radius: var(--gantt-container-border-radius, 10px);
|
|
996
1079
|
overflow: hidden;
|
|
997
1080
|
}
|
|
998
1081
|
.gantt-scrollContainer {
|