gantt-task-react-powern 0.4.70 → 0.4.71

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.
@@ -18,6 +18,10 @@ function _extends() {
18
18
  return _extends.apply(this, arguments);
19
19
  }
20
20
 
21
+ function _objectDestructuringEmpty(obj) {
22
+ if (obj == null) throw new TypeError("Cannot destructure undefined");
23
+ }
24
+
21
25
  function _unsupportedIterableToArray(o, minLen) {
22
26
  if (!o) return;
23
27
  if (typeof o === "string") return _arrayLikeToArray(o, minLen);
@@ -270,9 +274,6 @@ var getWeekNumberISO8601 = function getWeekNumberISO8601(date) {
270
274
  return weekNumber;
271
275
  }
272
276
  };
273
- var getDaysInMonth = function getDaysInMonth(month, year) {
274
- return new Date(year, month + 1, 0).getDate();
275
- };
276
277
 
277
278
  var styles = {"ganttTable":"_3_ygE","ganttTable_Header":"_1nBOt","ganttTable_HeaderSeparator":"_2eZzQ","ganttTable_HeaderItem":"_WuQ0f"};
278
279
 
@@ -281,6 +282,7 @@ var TaskListHeaderDefault = function TaskListHeaderDefault(_ref) {
281
282
  fontFamily = _ref.fontFamily,
282
283
  fontSize = _ref.fontSize,
283
284
  rowWidth = _ref.rowWidth,
285
+ scheduleType = _ref.scheduleType,
284
286
  allSelected = _ref.allSelected,
285
287
  onSelectAll = _ref.onSelectAll;
286
288
  return React.createElement("div", {
@@ -345,7 +347,7 @@ var TaskListHeaderDefault = function TaskListHeaderDefault(_ref) {
345
347
  }), React.createElement("div", {
346
348
  className: styles.ganttTable_HeaderItem,
347
349
  style: {
348
- minWidth: parseInt(rowWidth) * 0.7
350
+ minWidth: parseInt(rowWidth) * 0.6
349
351
  },
350
352
  title: "Planned Start"
351
353
  }, "Planned Start"), React.createElement("div", {
@@ -357,10 +359,28 @@ var TaskListHeaderDefault = function TaskListHeaderDefault(_ref) {
357
359
  }), React.createElement("div", {
358
360
  className: styles.ganttTable_HeaderItem,
359
361
  style: {
360
- minWidth: parseInt(rowWidth) * 0.7
362
+ minWidth: parseInt(rowWidth) * 0.6
363
+ },
364
+ title: "Planned End"
365
+ }, "Planned End"), scheduleType === "lookAhead" && React.createElement("div", {
366
+ className: styles.ganttTable_HeaderItem,
367
+ style: {
368
+ minWidth: parseInt(rowWidth) * 0.6
369
+ },
370
+ title: "Planned Start"
371
+ }, "Actual Start"), scheduleType === "lookAhead" && React.createElement("div", {
372
+ className: styles.ganttTable_HeaderSeparator,
373
+ style: {
374
+ height: headerHeight * 0.5,
375
+ marginTop: headerHeight * 0.25
376
+ }
377
+ }), scheduleType === "lookAhead" && React.createElement("div", {
378
+ className: styles.ganttTable_HeaderItem,
379
+ style: {
380
+ minWidth: parseInt(rowWidth) * 0.6
361
381
  },
362
382
  title: "Planned End"
363
- }, "Planned End")));
383
+ }, "Actual End")));
364
384
  };
365
385
 
366
386
  var styles$1 = {"taskListWrapper":"_3ZbQT","taskListTableRow":"_34SS0","taskListLookAheadRow":"_GzvG4","taskListMilestoneRow":"_3Ykml","taskListCell":"_3lLk3","taskListNameWrapper":"_nI1Xw","taskListExpander":"_2QjE6","taskListExpanderPlaceholder":"_1fnLB","taskListEmptyExpander":"_2TfEi","taskListText":"_2ZvXU"};
@@ -517,7 +537,23 @@ var TaskListTableDefault = function TaskListTableDefault(_ref) {
517
537
  }
518
538
  }, React.createElement("div", {
519
539
  className: styles$1.taskListText
520
- }, "\xA0", toLocaleDateString(t.end, dateTimeOptions))));
540
+ }, "\xA0", toLocaleDateString(t.end, dateTimeOptions))), scheduleType === "lookAhead" && React.createElement("div", {
541
+ className: styles$1.taskListCell,
542
+ style: {
543
+ minWidth: parseInt(rowWidth) * 0.6,
544
+ maxWidth: parseInt(rowWidth) * 0.6
545
+ }
546
+ }, React.createElement("div", {
547
+ className: styles$1.taskListText
548
+ }, "\xA0", toLocaleDateString(t.actualStart, dateTimeOptions))), scheduleType === "lookAhead" && React.createElement("div", {
549
+ className: styles$1.taskListCell,
550
+ style: {
551
+ minWidth: parseInt(rowWidth) * 0.6,
552
+ maxWidth: parseInt(rowWidth) * 0.6
553
+ }
554
+ }, React.createElement("div", {
555
+ className: styles$1.taskListText
556
+ }, "\xA0", toLocaleDateString(t.actualEnd, dateTimeOptions))));
521
557
  }));
522
558
  };
523
559
 
@@ -748,6 +784,7 @@ var TaskList = function TaskList(_ref) {
748
784
  fontFamily: fontFamily,
749
785
  fontSize: fontSize,
750
786
  rowWidth: rowWidth,
787
+ scheduleType: scheduleType,
751
788
  allSelected: tasks.length > 0 && selectedTasks.length === tasks.length,
752
789
  onSelectAll: onMultiSelect ? handleSelectAll : undefined
753
790
  };
@@ -781,21 +818,19 @@ var TaskList = function TaskList(_ref) {
781
818
 
782
819
  var styles$4 = {"gridRow":"_2dZTy","gridRowLookAhead":"_2RRca","gridRowLine":"_3rUKi","gridTick":"_RuwuK","darkerGridRow":"_2M-tt"};
783
820
 
784
- const GridBody = _ref => {
785
- let {
786
- tasks,
787
- scheduleType,
788
- dates,
789
- rowHeight,
790
- svgWidth,
791
- columnWidth,
792
- todayColor,
793
- weekendColor,
794
- rtl
795
- } = _ref;
796
- let y = 0;
797
- const gridRows = [];
798
- const rowLines = [React.createElement("line", {
821
+ var GridBody = function GridBody(_ref) {
822
+ var tasks = _ref.tasks,
823
+ scheduleType = _ref.scheduleType,
824
+ dates = _ref.dates,
825
+ rowHeight = _ref.rowHeight,
826
+ svgWidth = _ref.svgWidth,
827
+ columnWidth = _ref.columnWidth,
828
+ todayColor = _ref.todayColor,
829
+ weekendColor = _ref.weekendColor,
830
+ rtl = _ref.rtl;
831
+ var y = 0;
832
+ var gridRows = [];
833
+ var rowLines = [React.createElement("line", {
799
834
  key: "RowLineFirst",
800
835
  x: "0",
801
836
  y1: 0,
@@ -804,8 +839,9 @@ const GridBody = _ref => {
804
839
  className: styles$4.gridRowLine
805
840
  })];
806
841
 
807
- for (const task of tasks) {
808
- const isDarkerRow = task.type === "milestone";
842
+ for (var _iterator = _createForOfIteratorHelperLoose(tasks), _step; !(_step = _iterator()).done;) {
843
+ var task = _step.value;
844
+ var isDarkerRow = task.type === "milestone";
809
845
  gridRows.push(React.createElement("rect", {
810
846
  key: "Row" + task.id,
811
847
  x: "0",
@@ -825,14 +861,14 @@ const GridBody = _ref => {
825
861
  y += rowHeight;
826
862
  }
827
863
 
828
- const now = new Date();
829
- let tickX = 0;
830
- const ticks = [];
831
- let today = React.createElement("rect", null);
832
- let weekend = [];
864
+ var now = new Date();
865
+ var tickX = 0;
866
+ var ticks = [];
867
+ var today = React.createElement("rect", null);
868
+ var weekend = [];
833
869
 
834
- for (let i = 0; i < dates.length; i++) {
835
- const date = dates[i];
870
+ for (var i = 0; i < dates.length; i++) {
871
+ var date = dates[i];
836
872
  ticks.push(React.createElement("line", {
837
873
  key: date.getTime(),
838
874
  x1: tickX,
@@ -890,7 +926,7 @@ const GridBody = _ref => {
890
926
  }, today));
891
927
  };
892
928
 
893
- const Grid = props => {
929
+ var Grid = function Grid(props) {
894
930
  return React.createElement("g", {
895
931
  className: "grid"
896
932
  }, React.createElement(GridBody, Object.assign({}, props)));
@@ -898,17 +934,16 @@ const Grid = props => {
898
934
 
899
935
  var styles$5 = {"calendarBottomText":"_9w8d5","calendarTopTick":"_1rLuZ","calendarTopText":"_2q1Kt","calendarHeader":"_35nLX","textAnchorStart":"_2Shd-","textAnchorMiddle":"_2XXW4","textAnchorEnd":"_3GdnC"};
900
936
 
901
- const TopPartOfCalendar = _ref => {
902
- let {
903
- value,
904
- x1Line,
905
- y1Line,
906
- y2Line,
907
- xText,
908
- yText,
909
- textAnchor = "middle"
910
- } = _ref;
911
- const textAnchorClass = textAnchor === "start" ? styles$5.textAnchorStart : textAnchor === "middle" ? styles$5.textAnchorMiddle : styles$5.textAnchorEnd;
937
+ var TopPartOfCalendar = function TopPartOfCalendar(_ref) {
938
+ var value = _ref.value,
939
+ x1Line = _ref.x1Line,
940
+ y1Line = _ref.y1Line,
941
+ y2Line = _ref.y2Line,
942
+ xText = _ref.xText,
943
+ yText = _ref.yText,
944
+ _ref$textAnchor = _ref.textAnchor,
945
+ textAnchor = _ref$textAnchor === void 0 ? "middle" : _ref$textAnchor;
946
+ var textAnchorClass = textAnchor === "start" ? styles$5.textAnchorStart : textAnchor === "middle" ? styles$5.textAnchorMiddle : styles$5.textAnchorEnd;
912
947
  return React.createElement("g", {
913
948
  className: "calendarTop"
914
949
  }, React.createElement("line", {
@@ -922,30 +957,28 @@ const TopPartOfCalendar = _ref => {
922
957
  key: value + "text",
923
958
  y: yText,
924
959
  x: xText,
925
- className: `${styles$5.calendarTopText} ${textAnchorClass}`
960
+ className: styles$5.calendarTopText + " " + textAnchorClass
926
961
  }, value));
927
962
  };
928
963
 
929
- const Calendar = _ref => {
930
- let {
931
- dateSetup,
932
- locale,
933
- viewMode,
934
- rtl,
935
- headerHeight,
936
- columnWidth,
937
- fontFamily,
938
- fontSize
939
- } = _ref;
940
-
941
- const getCalendarValuesForYear = () => {
942
- const topValues = [];
943
- const bottomValues = [];
944
- const topDefaultHeight = headerHeight * 0.5;
945
-
946
- for (let i = 0; i < dateSetup.dates.length; i++) {
947
- const date = dateSetup.dates[i];
948
- const bottomValue = date.getFullYear();
964
+ var Calendar = function Calendar(_ref) {
965
+ var dateSetup = _ref.dateSetup,
966
+ locale = _ref.locale,
967
+ viewMode = _ref.viewMode,
968
+ rtl = _ref.rtl,
969
+ headerHeight = _ref.headerHeight,
970
+ columnWidth = _ref.columnWidth,
971
+ fontFamily = _ref.fontFamily,
972
+ fontSize = _ref.fontSize;
973
+
974
+ var getCalendarValuesForYear = function getCalendarValuesForYear() {
975
+ var topValues = [];
976
+ var bottomValues = [];
977
+ var topDefaultHeight = headerHeight * 0.5;
978
+
979
+ for (var i = 0; i < dateSetup.dates.length; i++) {
980
+ var date = dateSetup.dates[i];
981
+ var bottomValue = date.getFullYear();
949
982
  bottomValues.push(React.createElement("text", {
950
983
  key: date.getFullYear(),
951
984
  y: headerHeight * 0.8,
@@ -954,8 +987,8 @@ const Calendar = _ref => {
954
987
  }, bottomValue));
955
988
 
956
989
  if (i === 0 || date.getFullYear() !== dateSetup.dates[i - 1].getFullYear()) {
957
- const topValue = date.getFullYear().toString();
958
- let xText;
990
+ var topValue = date.getFullYear().toString();
991
+ var xText = void 0;
959
992
 
960
993
  if (rtl) {
961
994
  xText = (6 + i + date.getFullYear() + 1) * columnWidth;
@@ -978,25 +1011,25 @@ const Calendar = _ref => {
978
1011
  return [topValues, bottomValues];
979
1012
  };
980
1013
 
981
- const getCalendarValuesForQuarter = () => {
982
- const topValues = [];
983
- const bottomValues = [];
984
- const topDefaultHeight = headerHeight * 0.5;
1014
+ var getCalendarValuesForQuarter = function getCalendarValuesForQuarter() {
1015
+ var topValues = [];
1016
+ var bottomValues = [];
1017
+ var topDefaultHeight = headerHeight * 0.5;
985
1018
 
986
- for (let i = 0; i < dateSetup.dates.length; i++) {
987
- const date = dateSetup.dates[i];
988
- const quarter = Math.floor(date.getMonth() / 3) + 1;
989
- const bottomValue = `Q${quarter}`;
1019
+ for (var i = 0; i < dateSetup.dates.length; i++) {
1020
+ var date = dateSetup.dates[i];
1021
+ var quarter = Math.floor(date.getMonth() / 3) + 1;
1022
+ var bottomValue = "Q" + quarter;
990
1023
  bottomValues.push(React.createElement("text", {
991
- key: `${bottomValue}-${date.getFullYear()}`,
1024
+ key: bottomValue + "-" + date.getFullYear(),
992
1025
  y: headerHeight * 0.8,
993
1026
  x: columnWidth * i + columnWidth * 0.5,
994
1027
  className: styles$5.calendarBottomText
995
1028
  }, bottomValue));
996
1029
 
997
1030
  if (i === 0 || date.getFullYear() !== dateSetup.dates[i - 1].getFullYear()) {
998
- const topValue = date.getFullYear().toString();
999
- let xText;
1031
+ var topValue = date.getFullYear().toString();
1032
+ var xText = void 0;
1000
1033
 
1001
1034
  if (rtl) {
1002
1035
  xText = (3 + i + quarter) * columnWidth;
@@ -1019,26 +1052,26 @@ const Calendar = _ref => {
1019
1052
  return [topValues, bottomValues];
1020
1053
  };
1021
1054
 
1022
- const getCalendarValuesForMonth = () => {
1023
- const topValues = [];
1024
- const bottomValues = [];
1025
- const topDefaultHeight = headerHeight * 0.5;
1055
+ var getCalendarValuesForMonth = function getCalendarValuesForMonth() {
1056
+ var topValues = [];
1057
+ var bottomValues = [];
1058
+ var topDefaultHeight = headerHeight * 0.5;
1026
1059
 
1027
- for (let i = 0; i < dateSetup.dates.length; i++) {
1028
- const date = dateSetup.dates[i];
1029
- const bottomValue = date.toLocaleString(locale, {
1060
+ for (var i = 0; i < dateSetup.dates.length; i++) {
1061
+ var date = dateSetup.dates[i];
1062
+ var bottomValue = date.toLocaleString(locale, {
1030
1063
  month: "short"
1031
1064
  });
1032
1065
  bottomValues.push(React.createElement("text", {
1033
1066
  key: bottomValue + date.getFullYear(),
1034
1067
  y: headerHeight * 0.8,
1035
1068
  x: columnWidth * i + columnWidth * 0.5,
1036
- className: `${styles$5.calendarTopText} ${styles$5.textAnchorEnd}`
1069
+ className: styles$5.calendarTopText + " " + styles$5.textAnchorEnd
1037
1070
  }, bottomValue));
1038
1071
 
1039
1072
  if (i === 0 || date.getFullYear() !== dateSetup.dates[i - 1].getFullYear()) {
1040
- const topValue = date.getFullYear().toString();
1041
- let xText;
1073
+ var topValue = date.getFullYear().toString();
1074
+ var xText = void 0;
1042
1075
 
1043
1076
  if (rtl) {
1044
1077
  xText = (6 + i + date.getMonth() + 1) * columnWidth;
@@ -1063,27 +1096,27 @@ const Calendar = _ref => {
1063
1096
  return [topValues, bottomValues];
1064
1097
  };
1065
1098
 
1066
- const getCalendarValuesForWeek = () => {
1067
- const topValues = [];
1068
- const bottomValues = [];
1069
- let weeksCount = 1;
1070
- const topDefaultHeight = headerHeight * 0.5;
1071
- const dates = dateSetup.dates;
1099
+ var getCalendarValuesForWeek = function getCalendarValuesForWeek() {
1100
+ var topValues = [];
1101
+ var bottomValues = [];
1102
+ var weeksCount = 1;
1103
+ var topDefaultHeight = headerHeight * 0.5;
1104
+ var dates = dateSetup.dates;
1072
1105
 
1073
- for (let i = dates.length - 1; i >= 0; i--) {
1074
- const date = dates[i];
1075
- let topValue = "";
1106
+ for (var i = dates.length - 1; i >= 0; i--) {
1107
+ var date = dates[i];
1108
+ var topValue = "";
1076
1109
 
1077
1110
  if (i === 0 || date.getMonth() !== dates[i - 1].getMonth()) {
1078
- topValue = `${getLocaleMonth(date, locale)}, ${date.getFullYear()}`;
1111
+ topValue = getLocaleMonth(date, locale) + ", " + date.getFullYear();
1079
1112
  }
1080
1113
 
1081
- const bottomValue = `W${getWeekNumberISO8601(date)}`;
1114
+ var bottomValue = "W" + getWeekNumberISO8601(date);
1082
1115
  bottomValues.push(React.createElement("text", {
1083
1116
  key: date.getTime(),
1084
1117
  y: headerHeight * 0.8,
1085
1118
  x: columnWidth * (i + +rtl),
1086
- className: `${styles$5.calendarTopText} ${styles$5.textAnchorStart}`
1119
+ className: styles$5.calendarTopText + " " + styles$5.textAnchorStart
1087
1120
  }, bottomValue));
1088
1121
 
1089
1122
  if (topValue) {
@@ -1109,31 +1142,45 @@ const Calendar = _ref => {
1109
1142
  return [topValues, bottomValues];
1110
1143
  };
1111
1144
 
1112
- const getCalendarValuesForDay = () => {
1113
- const topValues = [];
1114
- const bottomValues = [];
1115
- const topDefaultHeight = headerHeight * 0.5;
1116
- const dates = dateSetup.dates;
1145
+ var getCalendarValuesForDay = function getCalendarValuesForDay() {
1146
+ var topValues = [];
1147
+ var bottomValues = [];
1148
+ var topDefaultHeight = headerHeight * 0.5;
1149
+ var dates = dateSetup.dates;
1117
1150
 
1118
- for (let i = 0; i < dates.length; i++) {
1119
- const date = dates[i];
1120
- const bottomValue = `${getLocalDayOfWeek(date, locale, "short")}, ${date.getDate().toString()}`;
1151
+ for (var i = 0; i < dates.length; i++) {
1152
+ var date = dates[i];
1153
+ var bottomValue = getLocalDayOfWeek(date, locale, "short") + ", " + date.getDate().toString();
1121
1154
  bottomValues.push(React.createElement("text", {
1122
1155
  key: date.getTime(),
1123
1156
  y: headerHeight * 0.8,
1124
1157
  x: columnWidth * i + columnWidth * 0.5,
1125
- className: `${styles$5.calendarTopText} ${styles$5.textAnchorMiddle}`
1158
+ className: styles$5.calendarTopText + " " + styles$5.textAnchorMiddle
1126
1159
  }, bottomValue));
1127
1160
 
1128
1161
  if (i + 1 !== dates.length && date.getMonth() !== dates[i + 1].getMonth()) {
1129
- const topValue = `${getLocaleMonth(date, locale)} ${date.getFullYear()}`;
1162
+ var topValue = getLocaleMonth(date, locale) + " " + date.getFullYear();
1130
1163
  topValues.push(React.createElement(TopPartOfCalendar, {
1131
1164
  key: topValue + date.getFullYear(),
1132
1165
  value: topValue,
1133
1166
  x1Line: columnWidth * (i + 1),
1134
1167
  y1Line: 0,
1135
1168
  y2Line: topDefaultHeight,
1136
- xText: columnWidth * (i + 1) - getDaysInMonth(date.getMonth(), date.getFullYear()) * columnWidth * 0.5,
1169
+ xText: topValues.length === 0 ? columnWidth * (i + 1) * 0.5 : columnWidth * (i + 1) - date.getDate() * columnWidth * 0.5,
1170
+ yText: topDefaultHeight * 0.9
1171
+ }));
1172
+ }
1173
+
1174
+ if (i + 1 === dates.length) {
1175
+ var _topValue = getLocaleMonth(date, locale) + " " + date.getFullYear();
1176
+
1177
+ topValues.push(React.createElement(TopPartOfCalendar, {
1178
+ key: _topValue + date.getFullYear(),
1179
+ value: _topValue,
1180
+ x1Line: columnWidth * (i + 1),
1181
+ y1Line: 0,
1182
+ y2Line: topDefaultHeight,
1183
+ xText: columnWidth * (i + 1) - date.getDate() * columnWidth * 0.5,
1137
1184
  yText: topDefaultHeight * 0.9
1138
1185
  }));
1139
1186
  }
@@ -1142,28 +1189,28 @@ const Calendar = _ref => {
1142
1189
  return [topValues, bottomValues];
1143
1190
  };
1144
1191
 
1145
- const getCalendarValuesForPartOfDay = () => {
1146
- const topValues = [];
1147
- const bottomValues = [];
1148
- const ticks = viewMode === ViewMode.HalfDay ? 2 : 4;
1149
- const topDefaultHeight = headerHeight * 0.5;
1150
- const dates = dateSetup.dates;
1192
+ var getCalendarValuesForPartOfDay = function getCalendarValuesForPartOfDay() {
1193
+ var topValues = [];
1194
+ var bottomValues = [];
1195
+ var ticks = viewMode === ViewMode.HalfDay ? 2 : 4;
1196
+ var topDefaultHeight = headerHeight * 0.5;
1197
+ var dates = dateSetup.dates;
1151
1198
 
1152
- for (let i = 0; i < dates.length; i++) {
1153
- const date = dates[i];
1154
- const bottomValue = getCachedDateTimeFormat(locale, {
1199
+ for (var i = 0; i < dates.length; i++) {
1200
+ var date = dates[i];
1201
+ var bottomValue = getCachedDateTimeFormat(locale, {
1155
1202
  hour: "numeric"
1156
1203
  }).format(date);
1157
1204
  bottomValues.push(React.createElement("text", {
1158
1205
  key: date.getTime(),
1159
1206
  y: headerHeight * 0.8,
1160
1207
  x: columnWidth * (i + +rtl),
1161
- className: `${styles$5.calendarTopText} ${styles$5.textAnchorMiddle}`,
1208
+ className: styles$5.calendarTopText + " " + styles$5.textAnchorMiddle,
1162
1209
  fontFamily: fontFamily
1163
1210
  }, bottomValue));
1164
1211
 
1165
1212
  if (i === 0 || date.getDate() !== dates[i - 1].getDate()) {
1166
- const topValue = `${getLocalDayOfWeek(date, locale, "short")}, ${date.getDate()} ${getLocaleMonth(date, locale)}`;
1213
+ var topValue = getLocalDayOfWeek(date, locale, "short") + ", " + date.getDate() + " " + getLocaleMonth(date, locale);
1167
1214
  topValues.push(React.createElement(TopPartOfCalendar, {
1168
1215
  key: topValue + date.getFullYear(),
1169
1216
  value: topValue,
@@ -1179,15 +1226,15 @@ const Calendar = _ref => {
1179
1226
  return [topValues, bottomValues];
1180
1227
  };
1181
1228
 
1182
- const getCalendarValuesForHour = () => {
1183
- const topValues = [];
1184
- const bottomValues = [];
1185
- const topDefaultHeight = headerHeight * 0.5;
1186
- const dates = dateSetup.dates;
1229
+ var getCalendarValuesForHour = function getCalendarValuesForHour() {
1230
+ var topValues = [];
1231
+ var bottomValues = [];
1232
+ var topDefaultHeight = headerHeight * 0.5;
1233
+ var dates = dateSetup.dates;
1187
1234
 
1188
- for (let i = 0; i < dates.length; i++) {
1189
- const date = dates[i];
1190
- const bottomValue = getCachedDateTimeFormat(locale, {
1235
+ for (var i = 0; i < dates.length; i++) {
1236
+ var date = dates[i];
1237
+ var bottomValue = getCachedDateTimeFormat(locale, {
1191
1238
  hour: "numeric"
1192
1239
  }).format(date);
1193
1240
  bottomValues.push(React.createElement("text", {
@@ -1199,9 +1246,9 @@ const Calendar = _ref => {
1199
1246
  }, bottomValue));
1200
1247
 
1201
1248
  if (i !== 0 && date.getDate() !== dates[i - 1].getDate()) {
1202
- const displayDate = dates[i - 1];
1203
- const topValue = `${getLocalDayOfWeek(displayDate, locale, "long")}, ${displayDate.getDate()} ${getLocaleMonth(displayDate, locale)}`;
1204
- const topPosition = (date.getHours() - 24) / 2;
1249
+ var displayDate = dates[i - 1];
1250
+ var topValue = getLocalDayOfWeek(displayDate, locale, "long") + ", " + displayDate.getDate() + " " + getLocaleMonth(displayDate, locale);
1251
+ var topPosition = (date.getHours() - 24) / 2;
1205
1252
  topValues.push(React.createElement(TopPartOfCalendar, {
1206
1253
  key: topValue + displayDate.getFullYear(),
1207
1254
  value: topValue,
@@ -1217,37 +1264,58 @@ const Calendar = _ref => {
1217
1264
  return [topValues, bottomValues];
1218
1265
  };
1219
1266
 
1220
- let topValues = [];
1221
- let bottomValues = [];
1267
+ var topValues = [];
1268
+ var bottomValues = [];
1222
1269
 
1223
1270
  switch (dateSetup.viewMode) {
1224
1271
  case ViewMode.Year:
1225
- [topValues, bottomValues] = getCalendarValuesForYear();
1272
+ var _getCalendarValuesFor = getCalendarValuesForYear();
1273
+
1274
+ topValues = _getCalendarValuesFor[0];
1275
+ bottomValues = _getCalendarValuesFor[1];
1226
1276
  break;
1227
1277
 
1228
1278
  case ViewMode.Quarter:
1229
- [topValues, bottomValues] = getCalendarValuesForQuarter();
1279
+ var _getCalendarValuesFor2 = getCalendarValuesForQuarter();
1280
+
1281
+ topValues = _getCalendarValuesFor2[0];
1282
+ bottomValues = _getCalendarValuesFor2[1];
1230
1283
  break;
1231
1284
 
1232
1285
  case ViewMode.Month:
1233
- [topValues, bottomValues] = getCalendarValuesForMonth();
1286
+ var _getCalendarValuesFor3 = getCalendarValuesForMonth();
1287
+
1288
+ topValues = _getCalendarValuesFor3[0];
1289
+ bottomValues = _getCalendarValuesFor3[1];
1234
1290
  break;
1235
1291
 
1236
1292
  case ViewMode.Week:
1237
- [topValues, bottomValues] = getCalendarValuesForWeek();
1293
+ var _getCalendarValuesFor4 = getCalendarValuesForWeek();
1294
+
1295
+ topValues = _getCalendarValuesFor4[0];
1296
+ bottomValues = _getCalendarValuesFor4[1];
1238
1297
  break;
1239
1298
 
1240
1299
  case ViewMode.Day:
1241
- [topValues, bottomValues] = getCalendarValuesForDay();
1300
+ var _getCalendarValuesFor5 = getCalendarValuesForDay();
1301
+
1302
+ topValues = _getCalendarValuesFor5[0];
1303
+ bottomValues = _getCalendarValuesFor5[1];
1242
1304
  break;
1243
1305
 
1244
1306
  case ViewMode.QuarterDay:
1245
1307
  case ViewMode.HalfDay:
1246
- [topValues, bottomValues] = getCalendarValuesForPartOfDay();
1308
+ var _getCalendarValuesFor6 = getCalendarValuesForPartOfDay();
1309
+
1310
+ topValues = _getCalendarValuesFor6[0];
1311
+ bottomValues = _getCalendarValuesFor6[1];
1247
1312
  break;
1248
1313
 
1249
1314
  case ViewMode.Hour:
1250
- [topValues, bottomValues] = getCalendarValuesForHour();
1315
+ var _getCalendarValuesFor7 = getCalendarValuesForHour();
1316
+
1317
+ topValues = _getCalendarValuesFor7[0];
1318
+ bottomValues = _getCalendarValuesFor7[1];
1251
1319
  }
1252
1320
 
1253
1321
  return React.createElement("g", {
@@ -1283,23 +1351,27 @@ function _catch(body, recover) {
1283
1351
  return result;
1284
1352
  }
1285
1353
 
1286
- const Arrow = _ref => {
1287
- let {
1288
- taskFrom,
1289
- taskTo,
1290
- rowHeight,
1291
- taskHeight,
1292
- arrowIndent,
1293
- rtl,
1294
- arrowColor
1295
- } = _ref;
1296
- let path;
1297
- let trianglePoints;
1354
+ var Arrow = function Arrow(_ref) {
1355
+ var taskFrom = _ref.taskFrom,
1356
+ taskTo = _ref.taskTo,
1357
+ rowHeight = _ref.rowHeight,
1358
+ taskHeight = _ref.taskHeight,
1359
+ arrowIndent = _ref.arrowIndent,
1360
+ rtl = _ref.rtl,
1361
+ arrowColor = _ref.arrowColor;
1362
+ var path;
1363
+ var trianglePoints;
1298
1364
 
1299
1365
  if (rtl) {
1300
- [path, trianglePoints] = drownPathAndTriangleRTL(taskFrom, taskTo, rowHeight, taskHeight, arrowIndent);
1366
+ var _drownPathAndTriangle = drownPathAndTriangleRTL(taskFrom, taskTo, rowHeight, taskHeight, arrowIndent);
1367
+
1368
+ path = _drownPathAndTriangle[0];
1369
+ trianglePoints = _drownPathAndTriangle[1];
1301
1370
  } else {
1302
- [path, trianglePoints] = drownPathAndTriangle(taskFrom, taskTo, rowHeight, taskHeight, arrowIndent);
1371
+ var _drownPathAndTriangle2 = drownPathAndTriangle(taskFrom, taskTo, rowHeight, taskHeight, arrowIndent);
1372
+
1373
+ path = _drownPathAndTriangle2[0];
1374
+ trianglePoints = _drownPathAndTriangle2[1];
1303
1375
  }
1304
1376
 
1305
1377
  return React.createElement("g", {
@@ -1315,8 +1387,8 @@ const Arrow = _ref => {
1315
1387
  }));
1316
1388
  };
1317
1389
 
1318
- const drownPathAndTriangle = (taskFrom, taskTo, rowHeight, taskHeight, arrowIndent) => {
1319
- let taskToStart, taskFromEnd;
1390
+ var drownPathAndTriangle = function drownPathAndTriangle(taskFrom, taskTo, rowHeight, taskHeight, arrowIndent) {
1391
+ var taskToStart, taskFromEnd;
1320
1392
 
1321
1393
  if (taskTo.x1 > 0 && taskTo.actualx1 > 0) {
1322
1394
  taskToStart = Math.min(taskTo.x1, taskTo.actualx1);
@@ -1326,38 +1398,24 @@ const drownPathAndTriangle = (taskFrom, taskTo, rowHeight, taskHeight, arrowInde
1326
1398
  taskFromEnd = Math.max(taskFrom.x2, taskFrom.actualx2);
1327
1399
  } else if (taskFrom.x2 > 0) taskFromEnd = taskFrom.x2;else if (taskFrom.actualx2 > 0) taskFromEnd = taskFrom.actualx2;else taskFromEnd = 0;
1328
1400
 
1329
- const indexCompare = taskFrom.index > taskTo.index ? -1 : 1;
1330
- const taskToEndPosition = taskTo.y + taskHeight / 2;
1331
- const taskFromEndPosition = taskFromEnd + arrowIndent * 2;
1332
- const taskFromHorizontalOffsetValue = taskFromEndPosition < taskToStart ? "" : `H ${taskToStart - arrowIndent}`;
1333
- const taskToHorizontalOffsetValue = taskFromEndPosition > taskToStart ? arrowIndent : taskToStart - taskFromEnd - arrowIndent;
1334
- const path = `M ${taskFromEnd} ${taskFrom.y + taskHeight / 2}
1335
- h ${arrowIndent}
1336
- v ${indexCompare * rowHeight / 2}
1337
- ${taskFromHorizontalOffsetValue}
1338
- V ${taskToEndPosition}
1339
- h ${taskToHorizontalOffsetValue}`;
1340
- const trianglePoints = `${taskToStart},${taskToEndPosition}
1341
- ${taskToStart - 5},${taskToEndPosition - 5}
1342
- ${taskToStart - 5},${taskToEndPosition + 5}`;
1401
+ var indexCompare = taskFrom.index > taskTo.index ? -1 : 1;
1402
+ var taskToEndPosition = taskTo.y + taskHeight / 2;
1403
+ var taskFromEndPosition = taskFromEnd + arrowIndent * 2;
1404
+ var taskFromHorizontalOffsetValue = taskFromEndPosition < taskToStart ? "" : "H " + (taskToStart - arrowIndent);
1405
+ var taskToHorizontalOffsetValue = taskFromEndPosition > taskToStart ? arrowIndent : taskToStart - taskFromEnd - arrowIndent;
1406
+ var path = "M " + taskFromEnd + " " + (taskFrom.y + taskHeight / 2) + " \n h " + arrowIndent + " \n v " + indexCompare * rowHeight / 2 + " \n " + taskFromHorizontalOffsetValue + "\n V " + taskToEndPosition + " \n h " + taskToHorizontalOffsetValue;
1407
+ var trianglePoints = taskToStart + "," + taskToEndPosition + " \n " + (taskToStart - 5) + "," + (taskToEndPosition - 5) + " \n " + (taskToStart - 5) + "," + (taskToEndPosition + 5);
1343
1408
  return [path, trianglePoints];
1344
1409
  };
1345
1410
 
1346
- const drownPathAndTriangleRTL = (taskFrom, taskTo, rowHeight, taskHeight, arrowIndent) => {
1347
- const indexCompare = taskFrom.index > taskTo.index ? -1 : 1;
1348
- const taskToEndPosition = taskTo.y + taskHeight / 2;
1349
- const taskFromEndPosition = taskFrom.x1 - arrowIndent * 2;
1350
- const taskFromHorizontalOffsetValue = taskFromEndPosition > taskTo.x2 ? "" : `H ${taskTo.x2 + arrowIndent}`;
1351
- const taskToHorizontalOffsetValue = taskFromEndPosition < taskTo.x2 ? -arrowIndent : taskTo.x2 - taskFrom.x1 + arrowIndent;
1352
- const path = `M ${taskFrom.x1} ${taskFrom.y + taskHeight / 2}
1353
- h ${-arrowIndent}
1354
- v ${indexCompare * rowHeight / 2}
1355
- ${taskFromHorizontalOffsetValue}
1356
- V ${taskToEndPosition}
1357
- h ${taskToHorizontalOffsetValue}`;
1358
- const trianglePoints = `${taskTo.x2},${taskToEndPosition}
1359
- ${taskTo.x2 + 5},${taskToEndPosition + 5}
1360
- ${taskTo.x2 + 5},${taskToEndPosition - 5}`;
1411
+ var drownPathAndTriangleRTL = function drownPathAndTriangleRTL(taskFrom, taskTo, rowHeight, taskHeight, arrowIndent) {
1412
+ var indexCompare = taskFrom.index > taskTo.index ? -1 : 1;
1413
+ var taskToEndPosition = taskTo.y + taskHeight / 2;
1414
+ var taskFromEndPosition = taskFrom.x1 - arrowIndent * 2;
1415
+ var taskFromHorizontalOffsetValue = taskFromEndPosition > taskTo.x2 ? "" : "H " + (taskTo.x2 + arrowIndent);
1416
+ var taskToHorizontalOffsetValue = taskFromEndPosition < taskTo.x2 ? -arrowIndent : taskTo.x2 - taskFrom.x1 + arrowIndent;
1417
+ var path = "M " + taskFrom.x1 + " " + (taskFrom.y + taskHeight / 2) + " \n h " + -arrowIndent + " \n v " + indexCompare * rowHeight / 2 + " \n " + taskFromHorizontalOffsetValue + "\n V " + taskToEndPosition + " \n h " + taskToHorizontalOffsetValue;
1418
+ var trianglePoints = taskTo.x2 + "," + taskToEndPosition + " \n " + (taskTo.x2 + 5) + "," + (taskToEndPosition + 5) + " \n " + (taskTo.x2 + 5) + "," + (taskToEndPosition - 5);
1361
1419
  return [path, trianglePoints];
1362
1420
  };
1363
1421
 
@@ -1807,26 +1865,24 @@ var sortTasks = function sortTasks(taskA, taskB) {
1807
1865
  }
1808
1866
  };
1809
1867
 
1810
- const BarDisplay = _ref => {
1811
- let {
1812
- x,
1813
- y,
1814
- type,
1815
- width,
1816
- height,
1817
- isSelected,
1818
- progressX,
1819
- progressWidth,
1820
- barCornerRadius,
1821
- styles,
1822
- onMouseDown
1823
- } = _ref;
1824
-
1825
- const getProcessColor = () => {
1868
+ var BarDisplay = function BarDisplay(_ref) {
1869
+ var x = _ref.x,
1870
+ y = _ref.y,
1871
+ type = _ref.type,
1872
+ width = _ref.width,
1873
+ height = _ref.height,
1874
+ isSelected = _ref.isSelected,
1875
+ progressX = _ref.progressX,
1876
+ progressWidth = _ref.progressWidth,
1877
+ barCornerRadius = _ref.barCornerRadius,
1878
+ styles = _ref.styles,
1879
+ onMouseDown = _ref.onMouseDown;
1880
+
1881
+ var getProcessColor = function getProcessColor() {
1826
1882
  return isSelected ? styles.progressSelectedColor : styles.progressColor;
1827
1883
  };
1828
1884
 
1829
- const getBarColor = () => {
1885
+ var getBarColor = function getBarColor() {
1830
1886
  return isSelected ? styles.backgroundSelectedColor : styles.backgroundColor;
1831
1887
  };
1832
1888
 
@@ -1873,15 +1929,13 @@ const BarDisplay = _ref => {
1873
1929
 
1874
1930
  var styles$6 = {"barWrapper":"_KxSXS","barHandle":"_3w_5u","barBackground":"_31ERP"};
1875
1931
 
1876
- const BarDateHandle = _ref => {
1877
- let {
1878
- x,
1879
- y,
1880
- width,
1881
- height,
1882
- barCornerRadius,
1883
- onMouseDown
1884
- } = _ref;
1932
+ var BarDateHandle = function BarDateHandle(_ref) {
1933
+ var x = _ref.x,
1934
+ y = _ref.y,
1935
+ width = _ref.width,
1936
+ height = _ref.height,
1937
+ barCornerRadius = _ref.barCornerRadius,
1938
+ onMouseDown = _ref.onMouseDown;
1885
1939
  return React.createElement("rect", {
1886
1940
  x: x,
1887
1941
  y: y,
@@ -1894,22 +1948,22 @@ const BarDateHandle = _ref => {
1894
1948
  });
1895
1949
  };
1896
1950
 
1897
- const BarProgressHandle = _ref => {
1951
+ var BarProgressHandle = function BarProgressHandle(_ref) {
1952
+ _objectDestructuringEmpty(_ref);
1953
+
1898
1954
  return React.createElement("div", null);
1899
1955
  };
1900
1956
 
1901
- const Bar = _ref => {
1902
- let {
1903
- task,
1904
- isProgressChangeable,
1905
- isDateChangeable,
1906
- rtl,
1907
- type,
1908
- onEventStart,
1909
- isSelected
1910
- } = _ref;
1911
- const progressPoint = getProgressPoint(+!rtl * task.progressWidth + task.progressX, task.y, task.height);
1912
- const handleHeight = task.height / 2 - 1;
1957
+ var Bar = function Bar(_ref) {
1958
+ var task = _ref.task,
1959
+ isProgressChangeable = _ref.isProgressChangeable,
1960
+ isDateChangeable = _ref.isDateChangeable,
1961
+ rtl = _ref.rtl,
1962
+ type = _ref.type,
1963
+ onEventStart = _ref.onEventStart,
1964
+ isSelected = _ref.isSelected;
1965
+ var progressPoint = getProgressPoint(+!rtl * task.progressWidth + task.progressX, task.y, task.height);
1966
+ var handleHeight = task.height / 2 - 1;
1913
1967
 
1914
1968
  if (type == "planned") {
1915
1969
  if ((task === null || task === void 0 ? void 0 : task.x1) >= 0 && (task === null || task === void 0 ? void 0 : task.x2) >= 0) return React.createElement("g", {
@@ -1928,7 +1982,7 @@ const Bar = _ref => {
1928
1982
  barCornerRadius: task.barCornerRadius,
1929
1983
  styles: task.styles,
1930
1984
  isSelected: isSelected,
1931
- onMouseDown: e => {
1985
+ onMouseDown: function onMouseDown(e) {
1932
1986
  isDateChangeable && onEventStart("move", task, e, "planned");
1933
1987
  }
1934
1988
  }), React.createElement("g", {
@@ -1939,7 +1993,7 @@ const Bar = _ref => {
1939
1993
  width: task.handleWidth,
1940
1994
  height: handleHeight,
1941
1995
  barCornerRadius: task.barCornerRadius,
1942
- onMouseDown: e => {
1996
+ onMouseDown: function onMouseDown(e) {
1943
1997
  onEventStart("start", task, e, "planned");
1944
1998
  }
1945
1999
  }), React.createElement(BarDateHandle, {
@@ -1948,12 +2002,12 @@ const Bar = _ref => {
1948
2002
  width: task.handleWidth,
1949
2003
  height: handleHeight,
1950
2004
  barCornerRadius: task.barCornerRadius,
1951
- onMouseDown: e => {
2005
+ onMouseDown: function onMouseDown(e) {
1952
2006
  onEventStart("end", task, e, "planned");
1953
2007
  }
1954
2008
  })), isProgressChangeable && React.createElement(BarProgressHandle, {
1955
2009
  progressPoint: progressPoint,
1956
- onMouseDown: e => {
2010
+ onMouseDown: function onMouseDown(e) {
1957
2011
  onEventStart("progress", task, e, "planned");
1958
2012
  }
1959
2013
  })));else return React.createElement("g", {
@@ -1977,7 +2031,7 @@ const Bar = _ref => {
1977
2031
  barCornerRadius: task.barCornerRadius,
1978
2032
  styles: task.styles,
1979
2033
  isSelected: isSelected,
1980
- onMouseDown: e => {
2034
+ onMouseDown: function onMouseDown(e) {
1981
2035
  isDateChangeable && onEventStart("move", task, e, "actual");
1982
2036
  }
1983
2037
  }), React.createElement("g", {
@@ -1988,7 +2042,7 @@ const Bar = _ref => {
1988
2042
  width: task.handleWidth,
1989
2043
  height: handleHeight,
1990
2044
  barCornerRadius: task.barCornerRadius,
1991
- onMouseDown: e => {
2045
+ onMouseDown: function onMouseDown(e) {
1992
2046
  onEventStart("start", task, e, "actual");
1993
2047
  }
1994
2048
  }), React.createElement(BarDateHandle, {
@@ -1997,12 +2051,12 @@ const Bar = _ref => {
1997
2051
  width: task.handleWidth,
1998
2052
  height: handleHeight,
1999
2053
  barCornerRadius: task.barCornerRadius,
2000
- onMouseDown: e => {
2054
+ onMouseDown: function onMouseDown(e) {
2001
2055
  onEventStart("end", task, e, "actual");
2002
2056
  }
2003
2057
  })), isProgressChangeable && React.createElement(BarProgressHandle, {
2004
2058
  progressPoint: progressPoint,
2005
- onMouseDown: e => {
2059
+ onMouseDown: function onMouseDown(e) {
2006
2060
  onEventStart("progress", task, e, "actual");
2007
2061
  }
2008
2062
  })));
@@ -2014,16 +2068,14 @@ const Bar = _ref => {
2014
2068
  }
2015
2069
  };
2016
2070
 
2017
- const BarSmall = _ref => {
2018
- let {
2019
- task,
2020
- type,
2021
- isProgressChangeable,
2022
- isDateChangeable,
2023
- onEventStart,
2024
- isSelected
2025
- } = _ref;
2026
- const progressPoint = getProgressPoint(task.progressWidth + task.x1, task.y, task.height);
2071
+ var BarSmall = function BarSmall(_ref) {
2072
+ var task = _ref.task,
2073
+ type = _ref.type,
2074
+ isProgressChangeable = _ref.isProgressChangeable,
2075
+ isDateChangeable = _ref.isDateChangeable,
2076
+ onEventStart = _ref.onEventStart,
2077
+ isSelected = _ref.isSelected;
2078
+ var progressPoint = getProgressPoint(task.progressWidth + task.x1, task.y, task.height);
2027
2079
  return React.createElement("g", {
2028
2080
  className: styles$6.barWrapper,
2029
2081
  tabIndex: 0
@@ -2040,14 +2092,14 @@ const BarSmall = _ref => {
2040
2092
  barCornerRadius: task.barCornerRadius,
2041
2093
  styles: task.styles,
2042
2094
  isSelected: isSelected,
2043
- onMouseDown: e => {
2095
+ onMouseDown: function onMouseDown(e) {
2044
2096
  isDateChangeable && onEventStart("move", task, e);
2045
2097
  }
2046
2098
  }), React.createElement("g", {
2047
2099
  className: "handleGroup"
2048
2100
  }, isProgressChangeable && React.createElement(BarProgressHandle, {
2049
2101
  progressPoint: progressPoint,
2050
- onMouseDown: e => {
2102
+ onMouseDown: function onMouseDown(e) {
2051
2103
  onEventStart("progress", task, e);
2052
2104
  }
2053
2105
  })));
@@ -2055,17 +2107,14 @@ const BarSmall = _ref => {
2055
2107
 
2056
2108
  var styles$7 = {"milestoneWrapper":"_RRr13","milestoneBackground":"_2P2B1"};
2057
2109
 
2058
- const Milestone = _ref => {
2059
- let {
2060
- task,
2061
- isDateChangeable,
2062
- onEventStart,
2063
- isSelected
2064
- } = _ref;
2065
- const transform = `rotate(45 ${task.x1 + task.height * 0.356}
2066
- ${task.y + task.height * 0.85})`;
2067
-
2068
- const getBarColor = () => {
2110
+ var Milestone = function Milestone(_ref) {
2111
+ var task = _ref.task,
2112
+ isDateChangeable = _ref.isDateChangeable,
2113
+ onEventStart = _ref.onEventStart,
2114
+ isSelected = _ref.isSelected;
2115
+ var transform = "rotate(45 " + (task.x1 + task.height * 0.356) + " \n " + (task.y + task.height * 0.85) + ")";
2116
+
2117
+ var getBarColor = function getBarColor() {
2069
2118
  return isSelected ? task.styles.backgroundSelectedColor : task.styles.backgroundColor;
2070
2119
  };
2071
2120
 
@@ -2082,7 +2131,7 @@ const Milestone = _ref => {
2082
2131
  ry: task.barCornerRadius,
2083
2132
  transform: transform,
2084
2133
  className: styles$7.milestoneBackground,
2085
- onMouseDown: e => {
2134
+ onMouseDown: function onMouseDown(e) {
2086
2135
  isDateChangeable && onEventStart("move", task, e);
2087
2136
  }
2088
2137
  }));
@@ -2090,16 +2139,14 @@ const Milestone = _ref => {
2090
2139
 
2091
2140
  var styles$8 = {"projectWrapper":"_1KJ6x","projectBackground":"_2RbVy","projectTop":"_2pZMF"};
2092
2141
 
2093
- const Project = _ref => {
2094
- let {
2095
- task,
2096
- isSelected
2097
- } = _ref;
2098
- const barColor = isSelected ? task.styles.backgroundSelectedColor : task.styles.backgroundColor;
2099
- const processColor = isSelected ? task.styles.progressSelectedColor : task.styles.progressColor;
2100
- const projectWith = task.x2 - task.x1;
2101
- const projectLeftTriangle = [task.x1, task.y + task.height / 2 - 1, task.x1, task.y + task.height, task.x1 + 15, task.y + task.height / 2 - 1].join(",");
2102
- const projectRightTriangle = [task.x2, task.y + task.height / 2 - 1, task.x2, task.y + task.height, task.x2 - 15, task.y + task.height / 2 - 1].join(",");
2142
+ var Project = function Project(_ref) {
2143
+ var task = _ref.task,
2144
+ isSelected = _ref.isSelected;
2145
+ var barColor = isSelected ? task.styles.backgroundSelectedColor : task.styles.backgroundColor;
2146
+ var processColor = isSelected ? task.styles.progressSelectedColor : task.styles.progressColor;
2147
+ var projectWith = task.x2 - task.x1;
2148
+ var projectLeftTriangle = [task.x1, task.y + task.height / 2 - 1, task.x1, task.y + task.height, task.x1 + 15, task.y + task.height / 2 - 1].join(",");
2149
+ var projectRightTriangle = [task.x2, task.y + task.height / 2 - 1, task.x2, task.y + task.height, task.x2 - 15, task.y + task.height / 2 - 1].join(",");
2103
2150
  return React.createElement("g", {
2104
2151
  tabIndex: 0,
2105
2152
  className: styles$8.projectWrapper
@@ -2140,16 +2187,18 @@ const Project = _ref => {
2140
2187
  }));
2141
2188
  };
2142
2189
 
2143
- const TaskItem = props => {
2144
- const {
2145
- task,
2146
- isDelete,
2147
- isSelected,
2148
- onEventStart
2149
- } = { ...props
2150
- };
2151
- const [taskItem, setTaskItem] = useState([React.createElement("div", null)]);
2152
- useEffect(() => {
2190
+ var TaskItem = function TaskItem(props) {
2191
+ var _props = _extends({}, props),
2192
+ task = _props.task,
2193
+ isDelete = _props.isDelete,
2194
+ isSelected = _props.isSelected,
2195
+ onEventStart = _props.onEventStart;
2196
+
2197
+ var _useState = useState([React.createElement("div", null)]),
2198
+ taskItem = _useState[0],
2199
+ setTaskItem = _useState[1];
2200
+
2201
+ useEffect(function () {
2153
2202
  switch (task.typeInternal) {
2154
2203
  case "milestone":
2155
2204
  if (task.x1 >= 0 && task.actualx1 >= 0) setTaskItem([React.createElement(Milestone, Object.assign({}, props))]);else setTaskItem([]);
@@ -2165,27 +2214,27 @@ const TaskItem = props => {
2165
2214
 
2166
2215
  default:
2167
2216
  {
2168
- let taskItem = [];
2217
+ var _taskItem = [];
2169
2218
 
2170
2219
  if ((task === null || task === void 0 ? void 0 : task.x1) >= 0 && (task === null || task === void 0 ? void 0 : task.x2) >= 0) {
2171
- taskItem.push(React.createElement(Bar, Object.assign({}, props, {
2220
+ _taskItem.push(React.createElement(Bar, Object.assign({}, props, {
2172
2221
  type: "planned"
2173
2222
  })));
2174
2223
  }
2175
2224
 
2176
2225
  if ((task === null || task === void 0 ? void 0 : task.actualx1) >= 0 && (task === null || task === void 0 ? void 0 : task.actualx2) >= 0) {
2177
- taskItem.push(React.createElement(Bar, Object.assign({}, props, {
2226
+ _taskItem.push(React.createElement(Bar, Object.assign({}, props, {
2178
2227
  type: "actual"
2179
2228
  })));
2180
2229
  }
2181
2230
 
2182
- setTaskItem(taskItem);
2231
+ setTaskItem(_taskItem);
2183
2232
  }
2184
2233
  break;
2185
2234
  }
2186
2235
  }, [task, isSelected]);
2187
2236
  return React.createElement("g", null, React.createElement("g", {
2188
- onKeyDown: e => {
2237
+ onKeyDown: function onKeyDown(e) {
2189
2238
  switch (e.key) {
2190
2239
  case "Delete":
2191
2240
  {
@@ -2196,20 +2245,20 @@ const TaskItem = props => {
2196
2245
 
2197
2246
  e.stopPropagation();
2198
2247
  },
2199
- onMouseEnter: e => {
2248
+ onMouseEnter: function onMouseEnter(e) {
2200
2249
  onEventStart("mouseenter", task, e, "planned");
2201
2250
  },
2202
- onMouseLeave: e => {
2251
+ onMouseLeave: function onMouseLeave(e) {
2203
2252
  onEventStart("mouseleave", task, e, "planned");
2204
2253
  },
2205
- onDoubleClick: e => {
2254
+ onDoubleClick: function onDoubleClick(e) {
2206
2255
  onEventStart("dblclick", task, e, "planned");
2207
2256
  },
2208
- onClick: e => {
2257
+ onClick: function onClick(e) {
2209
2258
  onEventStart("click", task, e, "planned");
2210
2259
  }
2211
2260
  }, taskItem[0]), React.createElement("g", {
2212
- onKeyDown: e => {
2261
+ onKeyDown: function onKeyDown(e) {
2213
2262
  switch (e.key) {
2214
2263
  case "Delete":
2215
2264
  {
@@ -2220,74 +2269,82 @@ const TaskItem = props => {
2220
2269
 
2221
2270
  e.stopPropagation();
2222
2271
  },
2223
- onMouseEnter: e => {
2272
+ onMouseEnter: function onMouseEnter(e) {
2224
2273
  onEventStart("mouseenter", task, e, "actual");
2225
2274
  },
2226
- onMouseLeave: e => {
2275
+ onMouseLeave: function onMouseLeave(e) {
2227
2276
  onEventStart("mouseleave", task, e, "actual");
2228
2277
  },
2229
- onDoubleClick: e => {
2278
+ onDoubleClick: function onDoubleClick(e) {
2230
2279
  onEventStart("dblclick", task, e, "actual");
2231
2280
  },
2232
- onClick: e => {
2281
+ onClick: function onClick(e) {
2233
2282
  onEventStart("click", task, e, "actual");
2234
2283
  }
2235
2284
  }, taskItem[1]));
2236
2285
  };
2237
2286
 
2238
- const TaskGanttContent = _ref => {
2287
+ var TaskGanttContent = function TaskGanttContent(_ref) {
2239
2288
  var _svg$current;
2240
2289
 
2241
- let {
2242
- tasks,
2243
- dates,
2244
- ganttEvent,
2245
- selectedTask,
2246
- rowHeight,
2247
- columnWidth,
2248
- timeStep,
2249
- svg,
2250
- taskHeight,
2251
- arrowIndent,
2252
- fontFamily,
2253
- fontSize,
2254
- rtl,
2255
- setGanttEvent,
2256
- setFailedTask,
2257
- setSelectedTask,
2258
- onDateChange,
2259
- onProgressChange,
2260
- onDoubleClick,
2261
- onClick,
2262
- onDelete
2263
- } = _ref;
2264
- const point = svg === null || svg === void 0 ? void 0 : (_svg$current = svg.current) === null || _svg$current === void 0 ? void 0 : _svg$current.createSVGPoint();
2265
- const [xStep, setXStep] = useState(0);
2266
- const [initEventX1Delta, setInitEventX1Delta] = useState(0);
2267
- const [isMoving, setIsMoving] = useState(false);
2268
- useEffect(() => {
2269
- const dateDelta = dates[1].getTime() - dates[0].getTime() - dates[1].getTimezoneOffset() * 60 * 1000 + dates[0].getTimezoneOffset() * 60 * 1000;
2270
- const newXStep = timeStep * columnWidth / dateDelta;
2290
+ var tasks = _ref.tasks,
2291
+ dates = _ref.dates,
2292
+ ganttEvent = _ref.ganttEvent,
2293
+ selectedTask = _ref.selectedTask,
2294
+ rowHeight = _ref.rowHeight,
2295
+ columnWidth = _ref.columnWidth,
2296
+ timeStep = _ref.timeStep,
2297
+ svg = _ref.svg,
2298
+ taskHeight = _ref.taskHeight,
2299
+ arrowIndent = _ref.arrowIndent,
2300
+ fontFamily = _ref.fontFamily,
2301
+ fontSize = _ref.fontSize,
2302
+ rtl = _ref.rtl,
2303
+ setGanttEvent = _ref.setGanttEvent,
2304
+ setFailedTask = _ref.setFailedTask,
2305
+ setSelectedTask = _ref.setSelectedTask,
2306
+ onDateChange = _ref.onDateChange,
2307
+ onProgressChange = _ref.onProgressChange,
2308
+ onDoubleClick = _ref.onDoubleClick,
2309
+ onClick = _ref.onClick,
2310
+ onDelete = _ref.onDelete;
2311
+ var point = svg === null || svg === void 0 ? void 0 : (_svg$current = svg.current) === null || _svg$current === void 0 ? void 0 : _svg$current.createSVGPoint();
2312
+
2313
+ var _useState = useState(0),
2314
+ xStep = _useState[0],
2315
+ setXStep = _useState[1];
2316
+
2317
+ var _useState2 = useState(0),
2318
+ initEventX1Delta = _useState2[0],
2319
+ setInitEventX1Delta = _useState2[1];
2320
+
2321
+ var _useState3 = useState(false),
2322
+ isMoving = _useState3[0],
2323
+ setIsMoving = _useState3[1];
2324
+
2325
+ useEffect(function () {
2326
+ var dateDelta = dates[1].getTime() - dates[0].getTime() - dates[1].getTimezoneOffset() * 60 * 1000 + dates[0].getTimezoneOffset() * 60 * 1000;
2327
+ var newXStep = timeStep * columnWidth / dateDelta;
2271
2328
  setXStep(newXStep);
2272
2329
  }, [columnWidth, dates, timeStep]);
2273
- useEffect(() => {
2274
- const handleMouseMove = function (event) {
2330
+ useEffect(function () {
2331
+ var handleMouseMove = function handleMouseMove(event) {
2275
2332
  try {
2276
2333
  var _svg$current$getScree;
2277
2334
 
2278
2335
  if (!ganttEvent.changedTask || !point || !(svg !== null && svg !== void 0 && svg.current)) return Promise.resolve();
2279
2336
  event.preventDefault();
2280
2337
  point.x = event.clientX;
2281
- const cursor = point.matrixTransform(svg === null || svg === void 0 ? void 0 : (_svg$current$getScree = svg.current.getScreenCTM()) === null || _svg$current$getScree === void 0 ? void 0 : _svg$current$getScree.inverse());
2282
- const {
2283
- isChanged,
2284
- changedTask
2285
- } = handleTaskBySVGMouseEvent(cursor.x, ganttEvent.action, ganttEvent.changedTask, ganttEvent.type, xStep, timeStep, initEventX1Delta, rtl);
2338
+ var cursor = point.matrixTransform(svg === null || svg === void 0 ? void 0 : (_svg$current$getScree = svg.current.getScreenCTM()) === null || _svg$current$getScree === void 0 ? void 0 : _svg$current$getScree.inverse());
2339
+
2340
+ var _handleTaskBySVGMouse = handleTaskBySVGMouseEvent(cursor.x, ganttEvent.action, ganttEvent.changedTask, ganttEvent.type, xStep, timeStep, initEventX1Delta, rtl),
2341
+ isChanged = _handleTaskBySVGMouse.isChanged,
2342
+ changedTask = _handleTaskBySVGMouse.changedTask;
2286
2343
 
2287
2344
  if (isChanged) {
2288
2345
  setGanttEvent({
2289
2346
  action: ganttEvent.action,
2290
- changedTask
2347
+ changedTask: changedTask
2291
2348
  });
2292
2349
  }
2293
2350
 
@@ -2297,41 +2354,40 @@ const TaskGanttContent = _ref => {
2297
2354
  }
2298
2355
  };
2299
2356
 
2300
- const handleMouseUp = function (event) {
2357
+ var handleMouseUp = function handleMouseUp(event) {
2301
2358
  try {
2302
2359
  var _svg$current$getScree2;
2303
2360
 
2304
- function _temp5() {
2361
+ var _temp6 = function _temp6() {
2305
2362
  if (!operationSuccess) {
2306
2363
  setFailedTask(originalSelectedTask);
2307
2364
  }
2308
- }
2365
+ };
2309
2366
 
2310
- const {
2311
- action,
2312
- originalSelectedTask,
2313
- changedTask,
2314
- type
2315
- } = ganttEvent;
2367
+ var action = ganttEvent.action,
2368
+ originalSelectedTask = ganttEvent.originalSelectedTask,
2369
+ changedTask = ganttEvent.changedTask,
2370
+ type = ganttEvent.type;
2316
2371
  if (!changedTask || !point || !(svg !== null && svg !== void 0 && svg.current) || !originalSelectedTask) return Promise.resolve();
2317
2372
  event.preventDefault();
2318
2373
  point.x = event.clientX;
2319
- const cursor = point.matrixTransform(svg === null || svg === void 0 ? void 0 : (_svg$current$getScree2 = svg.current.getScreenCTM()) === null || _svg$current$getScree2 === void 0 ? void 0 : _svg$current$getScree2.inverse());
2320
- const {
2321
- changedTask: newChangedTask
2322
- } = handleTaskBySVGMouseEvent(cursor.x, action, changedTask, type, xStep, timeStep, initEventX1Delta, rtl);
2323
- const isNotLikeOriginal = originalSelectedTask.start !== newChangedTask.start || originalSelectedTask.end !== newChangedTask.end || originalSelectedTask.actualStart !== newChangedTask.actualStart || originalSelectedTask.actualEnd !== newChangedTask.actualEnd || originalSelectedTask.progress !== newChangedTask.progress;
2374
+ var cursor = point.matrixTransform(svg === null || svg === void 0 ? void 0 : (_svg$current$getScree2 = svg.current.getScreenCTM()) === null || _svg$current$getScree2 === void 0 ? void 0 : _svg$current$getScree2.inverse());
2375
+
2376
+ var _handleTaskBySVGMouse2 = handleTaskBySVGMouseEvent(cursor.x, action, changedTask, type, xStep, timeStep, initEventX1Delta, rtl),
2377
+ newChangedTask = _handleTaskBySVGMouse2.changedTask;
2378
+
2379
+ var isNotLikeOriginal = originalSelectedTask.start !== newChangedTask.start || originalSelectedTask.end !== newChangedTask.end || originalSelectedTask.actualStart !== newChangedTask.actualStart || originalSelectedTask.actualEnd !== newChangedTask.actualEnd || originalSelectedTask.progress !== newChangedTask.progress;
2324
2380
  svg.current.removeEventListener("mousemove", handleMouseMove);
2325
2381
  svg.current.removeEventListener("mouseup", handleMouseUp);
2326
2382
  setGanttEvent({
2327
2383
  action: ""
2328
2384
  });
2329
2385
  setIsMoving(false);
2330
- let operationSuccess = true;
2386
+ var operationSuccess = true;
2331
2387
 
2332
- const _temp4 = function () {
2388
+ var _temp7 = function () {
2333
2389
  if ((action === "move" || action === "end" || action === "start") && onDateChange && isNotLikeOriginal) {
2334
- const _temp = _catch(function () {
2390
+ var _temp8 = _catch(function () {
2335
2391
  return Promise.resolve(onDateChange(newChangedTask, newChangedTask.barChildren)).then(function (result) {
2336
2392
  if (result !== undefined) {
2337
2393
  operationSuccess = result;
@@ -2341,11 +2397,11 @@ const TaskGanttContent = _ref => {
2341
2397
  operationSuccess = false;
2342
2398
  });
2343
2399
 
2344
- if (_temp && _temp.then) return _temp.then(function () {});
2400
+ if (_temp8 && _temp8.then) return _temp8.then(function () {});
2345
2401
  } else {
2346
- const _temp3 = function () {
2402
+ var _temp9 = function () {
2347
2403
  if (onProgressChange && isNotLikeOriginal) {
2348
- const _temp2 = _catch(function () {
2404
+ var _temp10 = _catch(function () {
2349
2405
  return Promise.resolve(onProgressChange(newChangedTask, newChangedTask.barChildren)).then(function (result) {
2350
2406
  if (result !== undefined) {
2351
2407
  operationSuccess = result;
@@ -2355,15 +2411,15 @@ const TaskGanttContent = _ref => {
2355
2411
  operationSuccess = false;
2356
2412
  });
2357
2413
 
2358
- if (_temp2 && _temp2.then) return _temp2.then(function () {});
2414
+ if (_temp10 && _temp10.then) return _temp10.then(function () {});
2359
2415
  }
2360
2416
  }();
2361
2417
 
2362
- if (_temp3 && _temp3.then) return _temp3.then(function () {});
2418
+ if (_temp9 && _temp9.then) return _temp9.then(function () {});
2363
2419
  }
2364
2420
  }();
2365
2421
 
2366
- return Promise.resolve(_temp4 && _temp4.then ? _temp4.then(_temp5) : _temp5(_temp4));
2422
+ return Promise.resolve(_temp7 && _temp7.then ? _temp7.then(_temp6) : _temp6(_temp7));
2367
2423
  } catch (e) {
2368
2424
  return Promise.reject(e);
2369
2425
  }
@@ -2376,7 +2432,7 @@ const TaskGanttContent = _ref => {
2376
2432
  }
2377
2433
  }, [ganttEvent, xStep, initEventX1Delta, onProgressChange, timeStep, onDateChange, svg, isMoving, point, rtl, setFailedTask, setGanttEvent]);
2378
2434
 
2379
- const handleBarEventStart = function (action, task, event, type) {
2435
+ var handleBarEventStart = function handleBarEventStart(action, task, event, type) {
2380
2436
  try {
2381
2437
  return Promise.resolve(function () {
2382
2438
  if (!event) {
@@ -2385,15 +2441,15 @@ const TaskGanttContent = _ref => {
2385
2441
  }
2386
2442
  } else return function () {
2387
2443
  if (isKeyboardEvent(event)) {
2388
- const _temp8 = function () {
2444
+ var _temp14 = function () {
2389
2445
  if (action === "delete") {
2390
- const _temp7 = function () {
2446
+ var _temp15 = function () {
2391
2447
  if (onDelete) {
2392
- const _temp6 = _catch(function () {
2448
+ var _temp16 = _catch(function () {
2393
2449
  return Promise.resolve(onDelete(task)).then(function (result) {
2394
2450
  if (result !== undefined && result) {
2395
2451
  setGanttEvent({
2396
- action,
2452
+ action: action,
2397
2453
  changedTask: task
2398
2454
  });
2399
2455
  }
@@ -2402,19 +2458,19 @@ const TaskGanttContent = _ref => {
2402
2458
  console.error("Error on Delete. " + error);
2403
2459
  });
2404
2460
 
2405
- if (_temp6 && _temp6.then) return _temp6.then(function () {});
2461
+ if (_temp16 && _temp16.then) return _temp16.then(function () {});
2406
2462
  }
2407
2463
  }();
2408
2464
 
2409
- if (_temp7 && _temp7.then) return _temp7.then(function () {});
2465
+ if (_temp15 && _temp15.then) return _temp15.then(function () {});
2410
2466
  }
2411
2467
  }();
2412
2468
 
2413
- if (_temp8 && _temp8.then) return _temp8.then(function () {});
2469
+ if (_temp14 && _temp14.then) return _temp14.then(function () {});
2414
2470
  } else if (action === "mouseenter") {
2415
2471
  if (!ganttEvent.action) {
2416
2472
  setGanttEvent({
2417
- action,
2473
+ action: action,
2418
2474
  changedTask: task,
2419
2475
  originalSelectedTask: task,
2420
2476
  type: type
@@ -2435,17 +2491,17 @@ const TaskGanttContent = _ref => {
2435
2491
 
2436
2492
  if (!(svg !== null && svg !== void 0 && svg.current) || !point) return;
2437
2493
  point.x = event.clientX;
2438
- const cursor = point.matrixTransform((_svg$current$getScree3 = svg.current.getScreenCTM()) === null || _svg$current$getScree3 === void 0 ? void 0 : _svg$current$getScree3.inverse());
2494
+ var cursor = point.matrixTransform((_svg$current$getScree3 = svg.current.getScreenCTM()) === null || _svg$current$getScree3 === void 0 ? void 0 : _svg$current$getScree3.inverse());
2439
2495
  if (type == "planned") setInitEventX1Delta(cursor.x - task.x1);else if (type == "actual") setInitEventX1Delta(cursor.x - task.actualx1);
2440
2496
  setGanttEvent({
2441
- action,
2497
+ action: action,
2442
2498
  changedTask: task,
2443
2499
  originalSelectedTask: task,
2444
2500
  type: type
2445
2501
  });
2446
2502
  } else {
2447
2503
  setGanttEvent({
2448
- action,
2504
+ action: action,
2449
2505
  changedTask: task,
2450
2506
  originalSelectedTask: task,
2451
2507
  type: type
@@ -2462,8 +2518,8 @@ const TaskGanttContent = _ref => {
2462
2518
  className: "content"
2463
2519
  }, React.createElement("g", {
2464
2520
  className: "arrows"
2465
- }, tasks.map(_task => {
2466
- const task = _task.start.getTime() > 0 && _task.end.getTime() > 0 ? _task : undefined;
2521
+ }, tasks.map(function (_task) {
2522
+ var task = _task.start.getTime() > 0 && _task.end.getTime() > 0 ? _task : undefined;
2467
2523
 
2468
2524
  if (!task) {
2469
2525
  return React.createElement("g", {
@@ -2474,18 +2530,20 @@ const TaskGanttContent = _ref => {
2474
2530
  });
2475
2531
  }
2476
2532
 
2477
- return task.barChildren.map(child => {
2533
+ return task.barChildren.map(function (child) {
2478
2534
  var _task$criticalPathArr, _task$criticalPathArr2;
2479
2535
 
2480
2536
  if (task.x2 > task.x1 || task.actualx2 > task.actualx1) return React.createElement(Arrow, {
2481
- key: `Arrow from ${task.id} to ${tasks[child.index].id}`,
2537
+ key: "Arrow from " + task.id + " to " + tasks[child.index].id,
2482
2538
  taskFrom: task,
2483
2539
  taskTo: tasks[child.index],
2484
2540
  rowHeight: rowHeight,
2485
2541
  taskHeight: taskHeight,
2486
2542
  arrowIndent: arrowIndent,
2487
2543
  rtl: rtl,
2488
- arrowColor: ((_task$criticalPathArr = task.criticalPathArrows) === null || _task$criticalPathArr === void 0 ? void 0 : (_task$criticalPathArr2 = _task$criticalPathArr.find(arrow => arrow.taskId == tasks[child.index].id)) === null || _task$criticalPathArr2 === void 0 ? void 0 : _task$criticalPathArr2.arrowColor) || "#808080"
2544
+ arrowColor: ((_task$criticalPathArr = task.criticalPathArrows) === null || _task$criticalPathArr === void 0 ? void 0 : (_task$criticalPathArr2 = _task$criticalPathArr.find(function (arrow) {
2545
+ return arrow.taskId == tasks[child.index].id;
2546
+ })) === null || _task$criticalPathArr2 === void 0 ? void 0 : _task$criticalPathArr2.arrowColor) || "#808080"
2489
2547
  });else return React.createElement("g", {
2490
2548
  key: _task.id,
2491
2549
  style: {
@@ -2497,8 +2555,8 @@ const TaskGanttContent = _ref => {
2497
2555
  className: "bar",
2498
2556
  fontFamily: fontFamily,
2499
2557
  fontSize: fontSize
2500
- }, tasks.map(_task => {
2501
- const task = _task.start.getTime() > 0 && _task.end.getTime() > 0 ? _task : undefined;
2558
+ }, tasks.map(function (_task) {
2559
+ var task = _task.start.getTime() > 0 && _task.end.getTime() > 0 ? _task : undefined;
2502
2560
 
2503
2561
  if (!task) {
2504
2562
  return React.createElement("g", {
@@ -2817,8 +2875,12 @@ var Gantt = function Gantt(_ref) {
2817
2875
  secondaryPath = _getCriticalPaths[1];
2818
2876
 
2819
2877
  uncolorAll(tasks);
2820
- colorPath(secondaryPath, "#00ff00", tasks);
2821
- colorPath(primaryPath, "#ff0000", tasks);
2878
+
2879
+ if (scheduleType !== "lookAhead") {
2880
+ colorPath(secondaryPath, "#00ff00", tasks);
2881
+ colorPath(primaryPath, "#ff0000", tasks);
2882
+ }
2883
+
2822
2884
  setBarTasks(convertToBarTasks(filteredTasks, newDates, columnWidth, rowHeight, taskHeight, barCornerRadius, handleWidth, rtl, barProgressColor, barProgressSelectedColor, barBackgroundColor, barBackgroundSelectedColor, projectProgressColor, projectProgressSelectedColor, projectBackgroundColor, projectBackgroundSelectedColor, milestoneBackgroundColor, milestoneBackgroundSelectedColor));
2823
2885
  }, [tasks, viewMode, preStepsCount, rowHeight, barCornerRadius, columnWidth, taskHeight, handleWidth, barProgressColor, barProgressSelectedColor, barBackgroundColor, barBackgroundSelectedColor, projectProgressColor, projectProgressSelectedColor, projectBackgroundColor, projectBackgroundSelectedColor, milestoneBackgroundColor, milestoneBackgroundSelectedColor, rtl, scrollX, onExpanderClick]);
2824
2886
  useEffect(function () {