gantt-task-react-powern 0.4.35 → 0.4.37
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/calendar/top-part-of-calendar.d.ts +1 -0
- package/dist/index.css +12 -2
- package/dist/index.js +19 -10
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +19 -10
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -743,7 +743,7 @@ var Grid = function Grid(props) {
|
|
|
743
743
|
}, React.createElement(GridBody, Object.assign({}, props)));
|
|
744
744
|
};
|
|
745
745
|
|
|
746
|
-
var styles$5 = {"calendarBottomText":"_9w8d5","calendarTopTick":"_1rLuZ","calendarTopText":"_2q1Kt","calendarHeader":"_35nLX"};
|
|
746
|
+
var styles$5 = {"calendarBottomText":"_9w8d5","calendarTopTick":"_1rLuZ","calendarTopText":"_2q1Kt","calendarHeader":"_35nLX","textAnchorStart":"_2Shd-","textAnchorMiddle":"_2XXW4","textAnchorEnd":"_3GdnC"};
|
|
747
747
|
|
|
748
748
|
var TopPartOfCalendar = function TopPartOfCalendar(_ref) {
|
|
749
749
|
var value = _ref.value,
|
|
@@ -751,7 +751,10 @@ var TopPartOfCalendar = function TopPartOfCalendar(_ref) {
|
|
|
751
751
|
y1Line = _ref.y1Line,
|
|
752
752
|
y2Line = _ref.y2Line,
|
|
753
753
|
xText = _ref.xText,
|
|
754
|
-
yText = _ref.yText
|
|
754
|
+
yText = _ref.yText,
|
|
755
|
+
_ref$textAnchor = _ref.textAnchor,
|
|
756
|
+
textAnchor = _ref$textAnchor === void 0 ? "middle" : _ref$textAnchor;
|
|
757
|
+
var textAnchorClass = textAnchor === "start" ? styles$5.textAnchorStart : textAnchor === "middle" ? styles$5.textAnchorMiddle : styles$5.textAnchorEnd;
|
|
755
758
|
return React.createElement("g", {
|
|
756
759
|
className: "calendarTop"
|
|
757
760
|
}, React.createElement("line", {
|
|
@@ -765,7 +768,7 @@ var TopPartOfCalendar = function TopPartOfCalendar(_ref) {
|
|
|
765
768
|
key: value + "text",
|
|
766
769
|
y: yText,
|
|
767
770
|
x: xText,
|
|
768
|
-
className: styles$5.calendarTopText
|
|
771
|
+
className: styles$5.calendarTopText + " " + textAnchorClass
|
|
769
772
|
}, value));
|
|
770
773
|
};
|
|
771
774
|
|
|
@@ -826,12 +829,14 @@ var Calendar = function Calendar(_ref) {
|
|
|
826
829
|
|
|
827
830
|
for (var i = 0; i < dateSetup.dates.length; i++) {
|
|
828
831
|
var date = dateSetup.dates[i];
|
|
829
|
-
var bottomValue =
|
|
832
|
+
var bottomValue = date.toLocaleString(locale, {
|
|
833
|
+
month: "short"
|
|
834
|
+
});
|
|
830
835
|
bottomValues.push(React.createElement("text", {
|
|
831
836
|
key: bottomValue + date.getFullYear(),
|
|
832
837
|
y: headerHeight * 0.8,
|
|
833
838
|
x: columnWidth * i + columnWidth * 0.5,
|
|
834
|
-
className: styles$5.
|
|
839
|
+
className: styles$5.calendarTopText + " " + styles$5.textAnchorEnd
|
|
835
840
|
}, bottomValue));
|
|
836
841
|
|
|
837
842
|
if (i === 0 || date.getFullYear() !== dateSetup.dates[i - 1].getFullYear()) {
|
|
@@ -844,6 +849,7 @@ var Calendar = function Calendar(_ref) {
|
|
|
844
849
|
xText = (6 + i - date.getMonth()) * columnWidth;
|
|
845
850
|
}
|
|
846
851
|
|
|
852
|
+
console.log(xText);
|
|
847
853
|
topValues.push(React.createElement(TopPartOfCalendar, {
|
|
848
854
|
key: topValue,
|
|
849
855
|
value: topValue,
|
|
@@ -851,7 +857,8 @@ var Calendar = function Calendar(_ref) {
|
|
|
851
857
|
y1Line: 0,
|
|
852
858
|
y2Line: topDefaultHeight,
|
|
853
859
|
xText: xText,
|
|
854
|
-
yText: topDefaultHeight * 0.9
|
|
860
|
+
yText: topDefaultHeight * 0.9,
|
|
861
|
+
textAnchor: "end"
|
|
855
862
|
}));
|
|
856
863
|
}
|
|
857
864
|
}
|
|
@@ -879,7 +886,7 @@ var Calendar = function Calendar(_ref) {
|
|
|
879
886
|
key: date.getTime(),
|
|
880
887
|
y: headerHeight * 0.8,
|
|
881
888
|
x: columnWidth * (i + +rtl),
|
|
882
|
-
className: styles$5.
|
|
889
|
+
className: styles$5.calendarTopText + " " + styles$5.textAnchorStart
|
|
883
890
|
}, bottomValue));
|
|
884
891
|
|
|
885
892
|
if (topValue) {
|
|
@@ -891,7 +898,8 @@ var Calendar = function Calendar(_ref) {
|
|
|
891
898
|
y1Line: 0,
|
|
892
899
|
y2Line: topDefaultHeight,
|
|
893
900
|
xText: columnWidth * i + columnWidth * weeksCount * 0.5,
|
|
894
|
-
yText: topDefaultHeight * 0.9
|
|
901
|
+
yText: topDefaultHeight * 0.9,
|
|
902
|
+
textAnchor: "start"
|
|
895
903
|
}));
|
|
896
904
|
}
|
|
897
905
|
|
|
@@ -953,7 +961,7 @@ var Calendar = function Calendar(_ref) {
|
|
|
953
961
|
key: date.getTime(),
|
|
954
962
|
y: headerHeight * 0.8,
|
|
955
963
|
x: columnWidth * (i + +rtl),
|
|
956
|
-
className: styles$5.
|
|
964
|
+
className: styles$5.calendarTopText + " " + styles$5.textAnchorMiddle,
|
|
957
965
|
fontFamily: fontFamily
|
|
958
966
|
}, bottomValue));
|
|
959
967
|
|
|
@@ -1062,7 +1070,8 @@ var Calendar = function Calendar(_ref) {
|
|
|
1062
1070
|
return React.createElement("g", {
|
|
1063
1071
|
className: "calendar",
|
|
1064
1072
|
fontSize: fontSize,
|
|
1065
|
-
fontFamily: fontFamily
|
|
1073
|
+
fontFamily: fontFamily,
|
|
1074
|
+
width: columnWidth * dateSetup.dates.length
|
|
1066
1075
|
}, React.createElement("rect", {
|
|
1067
1076
|
x: 0,
|
|
1068
1077
|
y: 0,
|