gantt-task-react-powern 0.4.66 → 0.4.67

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,8 +282,7 @@ var TaskListHeaderDefault = function TaskListHeaderDefault(_ref) {
281
282
  fontFamily = _ref.fontFamily,
282
283
  fontSize = _ref.fontSize,
283
284
  rowWidth = _ref.rowWidth,
284
- allSelected = _ref.allSelected,
285
- onSelectAll = _ref.onSelectAll;
285
+ scheduleType = _ref.scheduleType;
286
286
  return React.createElement("div", {
287
287
  className: styles.ganttTable,
288
288
  style: {
@@ -294,19 +294,7 @@ var TaskListHeaderDefault = function TaskListHeaderDefault(_ref) {
294
294
  style: {
295
295
  height: headerHeight - 2
296
296
  }
297
- }, onSelectAll && React.createElement("div", null, React.createElement("div", {
298
- className: styles.ganttTable_HeaderItem,
299
- style: {
300
- minWidth: parseInt(rowWidth) * 0.3,
301
- maxWidth: parseInt(rowWidth) * 0.3
302
- }
303
- }, React.createElement("input", {
304
- type: "checkbox",
305
- checked: allSelected,
306
- onChange: function onChange(e) {
307
- return onSelectAll(e.target.checked);
308
- }
309
- }))), React.createElement("div", {
297
+ }, React.createElement("div", {
310
298
  className: styles.ganttTable_HeaderItem,
311
299
  style: {
312
300
  minWidth: parseInt(rowWidth) * 0.8,
@@ -321,8 +309,8 @@ var TaskListHeaderDefault = function TaskListHeaderDefault(_ref) {
321
309
  }), React.createElement("div", {
322
310
  className: styles.ganttTable_HeaderItem,
323
311
  style: {
324
- minWidth: parseInt(rowWidth) * 1.8,
325
- maxWidth: parseInt(rowWidth) * 1.8
312
+ minWidth: parseInt(rowWidth) * 2,
313
+ maxWidth: parseInt(rowWidth) * 2
326
314
  }
327
315
  }, "Task"), React.createElement("div", {
328
316
  className: styles.ganttTable_HeaderSeparator,
@@ -333,7 +321,7 @@ var TaskListHeaderDefault = function TaskListHeaderDefault(_ref) {
333
321
  }), React.createElement("div", {
334
322
  className: styles.ganttTable_HeaderItem,
335
323
  style: {
336
- minWidth: parseInt(rowWidth) * 0.7
324
+ minWidth: parseInt(rowWidth) * 0.6
337
325
  },
338
326
  title: "Planned Start"
339
327
  }, "Planned Start"), React.createElement("div", {
@@ -345,10 +333,28 @@ var TaskListHeaderDefault = function TaskListHeaderDefault(_ref) {
345
333
  }), React.createElement("div", {
346
334
  className: styles.ganttTable_HeaderItem,
347
335
  style: {
348
- minWidth: parseInt(rowWidth) * 0.7
336
+ minWidth: parseInt(rowWidth) * 0.6
349
337
  },
350
338
  title: "Planned End"
351
- }, "Planned End")));
339
+ }, "Planned End"), scheduleType === "lookAhead" && React.createElement("div", {
340
+ className: styles.ganttTable_HeaderItem,
341
+ style: {
342
+ minWidth: parseInt(rowWidth) * 0.6
343
+ },
344
+ title: "Planned Start"
345
+ }, "Actual Start"), scheduleType === "lookAhead" && React.createElement("div", {
346
+ className: styles.ganttTable_HeaderSeparator,
347
+ style: {
348
+ height: headerHeight * 0.5,
349
+ marginTop: headerHeight * 0.25
350
+ }
351
+ }), scheduleType === "lookAhead" && React.createElement("div", {
352
+ className: styles.ganttTable_HeaderItem,
353
+ style: {
354
+ minWidth: parseInt(rowWidth) * 0.6
355
+ },
356
+ title: "Planned End"
357
+ }, "Actual End")));
352
358
  };
353
359
 
354
360
  var styles$1 = {"taskListWrapper":"_3ZbQT","taskListTableRow":"_34SS0","taskListLookAheadRow":"_GzvG4","taskListMilestoneRow":"_3Ykml","taskListCell":"_3lLk3","taskListNameWrapper":"_nI1Xw","taskListExpander":"_2QjE6","taskListExpanderPlaceholder":"_1fnLB","taskListEmptyExpander":"_2TfEi","taskListText":"_2ZvXU"};
@@ -385,9 +391,6 @@ var TaskListTableDefault = function TaskListTableDefault(_ref) {
385
391
  fontSize = _ref.fontSize,
386
392
  locale = _ref.locale,
387
393
  onExpanderClick = _ref.onExpanderClick,
388
- _ref$selectedTasks = _ref.selectedTasks,
389
- selectedTasks = _ref$selectedTasks === void 0 ? [] : _ref$selectedTasks,
390
- onTaskSelect = _ref.onTaskSelect,
391
394
  _ref$taskLabelRendere = _ref.taskLabelRenderer,
392
395
  taskLabelRenderer = _ref$taskLabelRendere === void 0 ? function (t) {
393
396
  return " " + t.name;
@@ -417,36 +420,13 @@ var TaskListTableDefault = function TaskListTableDefault(_ref) {
417
420
  }
418
421
  }
419
422
 
420
- var isSelected = selectedTasks.includes(t.id);
421
423
  return React.createElement("div", {
422
424
  className: t.type === "milestone" ? styles$1.taskListMilestoneRow : scheduleType === "lookAhead" ? styles$1.taskListLookAheadRow : styles$1.taskListTableRow,
423
425
  style: {
424
426
  height: rowHeight
425
427
  },
426
428
  key: t.id + "row"
427
- }, onTaskSelect && React.createElement("div", {
428
- className: styles$1.taskListCell,
429
- style: {
430
- minWidth: parseInt(rowWidth) * 0.3,
431
- maxWidth: parseInt(rowWidth) * 0.3
432
- }
433
429
  }, React.createElement("div", {
434
- className: styles$1.taskListText,
435
- style: {
436
- display: "flex",
437
- justifyContent: "center",
438
- alignItems: "center",
439
- height: "100%",
440
- paddingLeft: "0",
441
- paddingRight: "0"
442
- }
443
- }, React.createElement("input", {
444
- type: "checkbox",
445
- checked: isSelected,
446
- onChange: function onChange(e) {
447
- return onTaskSelect(t.id, e.target.checked);
448
- }
449
- }))), React.createElement("div", {
450
430
  className: styles$1.taskListCell,
451
431
  style: {
452
432
  minWidth: parseInt(rowWidth) * 0.8,
@@ -498,7 +478,23 @@ var TaskListTableDefault = function TaskListTableDefault(_ref) {
498
478
  }
499
479
  }, React.createElement("div", {
500
480
  className: styles$1.taskListText
501
- }, "\xA0", toLocaleDateString(t.end, dateTimeOptions))));
481
+ }, "\xA0", toLocaleDateString(t.end, dateTimeOptions))), scheduleType === "lookAhead" && React.createElement("div", {
482
+ className: styles$1.taskListCell,
483
+ style: {
484
+ minWidth: parseInt(rowWidth) * 0.6,
485
+ maxWidth: parseInt(rowWidth) * 0.6
486
+ }
487
+ }, React.createElement("div", {
488
+ className: styles$1.taskListText
489
+ }, "\xA0", toLocaleDateString(t.actualStart, dateTimeOptions))), scheduleType === "lookAhead" && React.createElement("div", {
490
+ className: styles$1.taskListCell,
491
+ style: {
492
+ minWidth: parseInt(rowWidth) * 0.6,
493
+ maxWidth: parseInt(rowWidth) * 0.6
494
+ }
495
+ }, React.createElement("div", {
496
+ className: styles$1.taskListText
497
+ }, "\xA0", toLocaleDateString(t.actualEnd, dateTimeOptions))));
502
498
  }));
503
499
  };
504
500
 
@@ -676,61 +672,19 @@ var TaskList = function TaskList(_ref) {
676
672
  horizontalContainerClass = _ref.horizontalContainerClass,
677
673
  TaskListHeader = _ref.TaskListHeader,
678
674
  TaskListTable = _ref.TaskListTable,
679
- taskLabelRenderer = _ref.taskLabelRenderer,
680
- onMultiSelect = _ref.onMultiSelect;
675
+ taskLabelRenderer = _ref.taskLabelRenderer;
681
676
  var horizontalContainerRef = useRef(null);
682
-
683
- var _useState = useState([]),
684
- selectedTasks = _useState[0],
685
- setSelectedTasks = _useState[1];
686
-
687
- var prevSelectedTasksRef = useRef([]);
688
677
  useEffect(function () {
689
678
  if (horizontalContainerRef.current) {
690
679
  horizontalContainerRef.current.scrollTop = scrollY;
691
680
  }
692
681
  }, [scrollY]);
693
- useEffect(function () {
694
- if (onMultiSelect && JSON.stringify(prevSelectedTasksRef.current) !== JSON.stringify(selectedTasks)) {
695
- var selectedTaskObjects = tasks.filter(function (task) {
696
- return selectedTasks.includes(task.id);
697
- });
698
- prevSelectedTasksRef.current = [].concat(selectedTasks);
699
- onMultiSelect(selectedTaskObjects);
700
- }
701
- }, [selectedTasks, tasks, onMultiSelect]);
702
-
703
- var handleTaskSelect = function handleTaskSelect(taskId, selected) {
704
- if (selected) {
705
- setSelectedTasks(function (prev) {
706
- return [].concat(prev, [taskId]);
707
- });
708
- } else {
709
- setSelectedTasks(function (prev) {
710
- return prev.filter(function (id) {
711
- return id !== taskId;
712
- });
713
- });
714
- }
715
- };
716
-
717
- var handleSelectAll = function handleSelectAll(selected) {
718
- if (selected) {
719
- setSelectedTasks(tasks.map(function (task) {
720
- return task.id;
721
- }));
722
- } else {
723
- setSelectedTasks([]);
724
- }
725
- };
726
-
727
682
  var headerProps = {
728
683
  headerHeight: headerHeight,
729
684
  fontFamily: fontFamily,
730
685
  fontSize: fontSize,
731
686
  rowWidth: rowWidth,
732
- allSelected: tasks.length > 0 && selectedTasks.length === tasks.length,
733
- onSelectAll: onMultiSelect ? handleSelectAll : undefined
687
+ scheduleType: scheduleType
734
688
  };
735
689
  var selectedTaskId = selectedTask ? selectedTask.id : "";
736
690
  var tableProps = {
@@ -745,8 +699,6 @@ var TaskList = function TaskList(_ref) {
745
699
  selectedTaskId: selectedTaskId,
746
700
  setSelectedTask: setSelectedTask,
747
701
  onExpanderClick: onExpanderClick,
748
- selectedTasks: onMultiSelect ? selectedTasks : undefined,
749
- onTaskSelect: onMultiSelect ? handleTaskSelect : undefined,
750
702
  taskLabelRenderer: taskLabelRenderer
751
703
  };
752
704
  return React.createElement("div", {
@@ -762,21 +714,19 @@ var TaskList = function TaskList(_ref) {
762
714
 
763
715
  var styles$4 = {"gridRow":"_2dZTy","gridRowLookAhead":"_2RRca","gridRowLine":"_3rUKi","gridTick":"_RuwuK","darkerGridRow":"_2M-tt"};
764
716
 
765
- const GridBody = _ref => {
766
- let {
767
- tasks,
768
- scheduleType,
769
- dates,
770
- rowHeight,
771
- svgWidth,
772
- columnWidth,
773
- todayColor,
774
- weekendColor,
775
- rtl
776
- } = _ref;
777
- let y = 0;
778
- const gridRows = [];
779
- const rowLines = [React.createElement("line", {
717
+ var GridBody = function GridBody(_ref) {
718
+ var tasks = _ref.tasks,
719
+ scheduleType = _ref.scheduleType,
720
+ dates = _ref.dates,
721
+ rowHeight = _ref.rowHeight,
722
+ svgWidth = _ref.svgWidth,
723
+ columnWidth = _ref.columnWidth,
724
+ todayColor = _ref.todayColor,
725
+ weekendColor = _ref.weekendColor,
726
+ rtl = _ref.rtl;
727
+ var y = 0;
728
+ var gridRows = [];
729
+ var rowLines = [React.createElement("line", {
780
730
  key: "RowLineFirst",
781
731
  x: "0",
782
732
  y1: 0,
@@ -785,8 +735,9 @@ const GridBody = _ref => {
785
735
  className: styles$4.gridRowLine
786
736
  })];
787
737
 
788
- for (const task of tasks) {
789
- const isDarkerRow = task.type === "milestone";
738
+ for (var _iterator = _createForOfIteratorHelperLoose(tasks), _step; !(_step = _iterator()).done;) {
739
+ var task = _step.value;
740
+ var isDarkerRow = task.type === "milestone";
790
741
  gridRows.push(React.createElement("rect", {
791
742
  key: "Row" + task.id,
792
743
  x: "0",
@@ -806,14 +757,14 @@ const GridBody = _ref => {
806
757
  y += rowHeight;
807
758
  }
808
759
 
809
- const now = new Date();
810
- let tickX = 0;
811
- const ticks = [];
812
- let today = React.createElement("rect", null);
813
- let weekend = [];
760
+ var now = new Date();
761
+ var tickX = 0;
762
+ var ticks = [];
763
+ var today = React.createElement("rect", null);
764
+ var weekend = [];
814
765
 
815
- for (let i = 0; i < dates.length; i++) {
816
- const date = dates[i];
766
+ for (var i = 0; i < dates.length; i++) {
767
+ var date = dates[i];
817
768
  ticks.push(React.createElement("line", {
818
769
  key: date.getTime(),
819
770
  x1: tickX,
@@ -871,7 +822,7 @@ const GridBody = _ref => {
871
822
  }, today));
872
823
  };
873
824
 
874
- const Grid = props => {
825
+ var Grid = function Grid(props) {
875
826
  return React.createElement("g", {
876
827
  className: "grid"
877
828
  }, React.createElement(GridBody, Object.assign({}, props)));
@@ -879,17 +830,16 @@ const Grid = props => {
879
830
 
880
831
  var styles$5 = {"calendarBottomText":"_9w8d5","calendarTopTick":"_1rLuZ","calendarTopText":"_2q1Kt","calendarHeader":"_35nLX","textAnchorStart":"_2Shd-","textAnchorMiddle":"_2XXW4","textAnchorEnd":"_3GdnC"};
881
832
 
882
- const TopPartOfCalendar = _ref => {
883
- let {
884
- value,
885
- x1Line,
886
- y1Line,
887
- y2Line,
888
- xText,
889
- yText,
890
- textAnchor = "middle"
891
- } = _ref;
892
- const textAnchorClass = textAnchor === "start" ? styles$5.textAnchorStart : textAnchor === "middle" ? styles$5.textAnchorMiddle : styles$5.textAnchorEnd;
833
+ var TopPartOfCalendar = function TopPartOfCalendar(_ref) {
834
+ var value = _ref.value,
835
+ x1Line = _ref.x1Line,
836
+ y1Line = _ref.y1Line,
837
+ y2Line = _ref.y2Line,
838
+ xText = _ref.xText,
839
+ yText = _ref.yText,
840
+ _ref$textAnchor = _ref.textAnchor,
841
+ textAnchor = _ref$textAnchor === void 0 ? "middle" : _ref$textAnchor;
842
+ var textAnchorClass = textAnchor === "start" ? styles$5.textAnchorStart : textAnchor === "middle" ? styles$5.textAnchorMiddle : styles$5.textAnchorEnd;
893
843
  return React.createElement("g", {
894
844
  className: "calendarTop"
895
845
  }, React.createElement("line", {
@@ -903,30 +853,28 @@ const TopPartOfCalendar = _ref => {
903
853
  key: value + "text",
904
854
  y: yText,
905
855
  x: xText,
906
- className: `${styles$5.calendarTopText} ${textAnchorClass}`
856
+ className: styles$5.calendarTopText + " " + textAnchorClass
907
857
  }, value));
908
858
  };
909
859
 
910
- const Calendar = _ref => {
911
- let {
912
- dateSetup,
913
- locale,
914
- viewMode,
915
- rtl,
916
- headerHeight,
917
- columnWidth,
918
- fontFamily,
919
- fontSize
920
- } = _ref;
921
-
922
- const getCalendarValuesForYear = () => {
923
- const topValues = [];
924
- const bottomValues = [];
925
- const topDefaultHeight = headerHeight * 0.5;
926
-
927
- for (let i = 0; i < dateSetup.dates.length; i++) {
928
- const date = dateSetup.dates[i];
929
- const bottomValue = date.getFullYear();
860
+ var Calendar = function Calendar(_ref) {
861
+ var dateSetup = _ref.dateSetup,
862
+ locale = _ref.locale,
863
+ viewMode = _ref.viewMode,
864
+ rtl = _ref.rtl,
865
+ headerHeight = _ref.headerHeight,
866
+ columnWidth = _ref.columnWidth,
867
+ fontFamily = _ref.fontFamily,
868
+ fontSize = _ref.fontSize;
869
+
870
+ var getCalendarValuesForYear = function getCalendarValuesForYear() {
871
+ var topValues = [];
872
+ var bottomValues = [];
873
+ var topDefaultHeight = headerHeight * 0.5;
874
+
875
+ for (var i = 0; i < dateSetup.dates.length; i++) {
876
+ var date = dateSetup.dates[i];
877
+ var bottomValue = date.getFullYear();
930
878
  bottomValues.push(React.createElement("text", {
931
879
  key: date.getFullYear(),
932
880
  y: headerHeight * 0.8,
@@ -935,8 +883,8 @@ const Calendar = _ref => {
935
883
  }, bottomValue));
936
884
 
937
885
  if (i === 0 || date.getFullYear() !== dateSetup.dates[i - 1].getFullYear()) {
938
- const topValue = date.getFullYear().toString();
939
- let xText;
886
+ var topValue = date.getFullYear().toString();
887
+ var xText = void 0;
940
888
 
941
889
  if (rtl) {
942
890
  xText = (6 + i + date.getFullYear() + 1) * columnWidth;
@@ -959,25 +907,25 @@ const Calendar = _ref => {
959
907
  return [topValues, bottomValues];
960
908
  };
961
909
 
962
- const getCalendarValuesForQuarter = () => {
963
- const topValues = [];
964
- const bottomValues = [];
965
- const topDefaultHeight = headerHeight * 0.5;
910
+ var getCalendarValuesForQuarter = function getCalendarValuesForQuarter() {
911
+ var topValues = [];
912
+ var bottomValues = [];
913
+ var topDefaultHeight = headerHeight * 0.5;
966
914
 
967
- for (let i = 0; i < dateSetup.dates.length; i++) {
968
- const date = dateSetup.dates[i];
969
- const quarter = Math.floor(date.getMonth() / 3) + 1;
970
- const bottomValue = `Q${quarter}`;
915
+ for (var i = 0; i < dateSetup.dates.length; i++) {
916
+ var date = dateSetup.dates[i];
917
+ var quarter = Math.floor(date.getMonth() / 3) + 1;
918
+ var bottomValue = "Q" + quarter;
971
919
  bottomValues.push(React.createElement("text", {
972
- key: `${bottomValue}-${date.getFullYear()}`,
920
+ key: bottomValue + "-" + date.getFullYear(),
973
921
  y: headerHeight * 0.8,
974
922
  x: columnWidth * i + columnWidth * 0.5,
975
923
  className: styles$5.calendarBottomText
976
924
  }, bottomValue));
977
925
 
978
926
  if (i === 0 || date.getFullYear() !== dateSetup.dates[i - 1].getFullYear()) {
979
- const topValue = date.getFullYear().toString();
980
- let xText;
927
+ var topValue = date.getFullYear().toString();
928
+ var xText = void 0;
981
929
 
982
930
  if (rtl) {
983
931
  xText = (3 + i + quarter) * columnWidth;
@@ -1000,26 +948,26 @@ const Calendar = _ref => {
1000
948
  return [topValues, bottomValues];
1001
949
  };
1002
950
 
1003
- const getCalendarValuesForMonth = () => {
1004
- const topValues = [];
1005
- const bottomValues = [];
1006
- const topDefaultHeight = headerHeight * 0.5;
951
+ var getCalendarValuesForMonth = function getCalendarValuesForMonth() {
952
+ var topValues = [];
953
+ var bottomValues = [];
954
+ var topDefaultHeight = headerHeight * 0.5;
1007
955
 
1008
- for (let i = 0; i < dateSetup.dates.length; i++) {
1009
- const date = dateSetup.dates[i];
1010
- const bottomValue = date.toLocaleString(locale, {
956
+ for (var i = 0; i < dateSetup.dates.length; i++) {
957
+ var date = dateSetup.dates[i];
958
+ var bottomValue = date.toLocaleString(locale, {
1011
959
  month: "short"
1012
960
  });
1013
961
  bottomValues.push(React.createElement("text", {
1014
962
  key: bottomValue + date.getFullYear(),
1015
963
  y: headerHeight * 0.8,
1016
964
  x: columnWidth * i + columnWidth * 0.5,
1017
- className: `${styles$5.calendarTopText} ${styles$5.textAnchorEnd}`
965
+ className: styles$5.calendarTopText + " " + styles$5.textAnchorEnd
1018
966
  }, bottomValue));
1019
967
 
1020
968
  if (i === 0 || date.getFullYear() !== dateSetup.dates[i - 1].getFullYear()) {
1021
- const topValue = date.getFullYear().toString();
1022
- let xText;
969
+ var topValue = date.getFullYear().toString();
970
+ var xText = void 0;
1023
971
 
1024
972
  if (rtl) {
1025
973
  xText = (6 + i + date.getMonth() + 1) * columnWidth;
@@ -1044,27 +992,27 @@ const Calendar = _ref => {
1044
992
  return [topValues, bottomValues];
1045
993
  };
1046
994
 
1047
- const getCalendarValuesForWeek = () => {
1048
- const topValues = [];
1049
- const bottomValues = [];
1050
- let weeksCount = 1;
1051
- const topDefaultHeight = headerHeight * 0.5;
1052
- const dates = dateSetup.dates;
995
+ var getCalendarValuesForWeek = function getCalendarValuesForWeek() {
996
+ var topValues = [];
997
+ var bottomValues = [];
998
+ var weeksCount = 1;
999
+ var topDefaultHeight = headerHeight * 0.5;
1000
+ var dates = dateSetup.dates;
1053
1001
 
1054
- for (let i = dates.length - 1; i >= 0; i--) {
1055
- const date = dates[i];
1056
- let topValue = "";
1002
+ for (var i = dates.length - 1; i >= 0; i--) {
1003
+ var date = dates[i];
1004
+ var topValue = "";
1057
1005
 
1058
1006
  if (i === 0 || date.getMonth() !== dates[i - 1].getMonth()) {
1059
- topValue = `${getLocaleMonth(date, locale)}, ${date.getFullYear()}`;
1007
+ topValue = getLocaleMonth(date, locale) + ", " + date.getFullYear();
1060
1008
  }
1061
1009
 
1062
- const bottomValue = `W${getWeekNumberISO8601(date)}`;
1010
+ var bottomValue = "W" + getWeekNumberISO8601(date);
1063
1011
  bottomValues.push(React.createElement("text", {
1064
1012
  key: date.getTime(),
1065
1013
  y: headerHeight * 0.8,
1066
1014
  x: columnWidth * (i + +rtl),
1067
- className: `${styles$5.calendarTopText} ${styles$5.textAnchorStart}`
1015
+ className: styles$5.calendarTopText + " " + styles$5.textAnchorStart
1068
1016
  }, bottomValue));
1069
1017
 
1070
1018
  if (topValue) {
@@ -1090,31 +1038,45 @@ const Calendar = _ref => {
1090
1038
  return [topValues, bottomValues];
1091
1039
  };
1092
1040
 
1093
- const getCalendarValuesForDay = () => {
1094
- const topValues = [];
1095
- const bottomValues = [];
1096
- const topDefaultHeight = headerHeight * 0.5;
1097
- const dates = dateSetup.dates;
1041
+ var getCalendarValuesForDay = function getCalendarValuesForDay() {
1042
+ var topValues = [];
1043
+ var bottomValues = [];
1044
+ var topDefaultHeight = headerHeight * 0.5;
1045
+ var dates = dateSetup.dates;
1098
1046
 
1099
- for (let i = 0; i < dates.length; i++) {
1100
- const date = dates[i];
1101
- const bottomValue = `${getLocalDayOfWeek(date, locale, "short")}, ${date.getDate().toString()}`;
1047
+ for (var i = 0; i < dates.length; i++) {
1048
+ var date = dates[i];
1049
+ var bottomValue = getLocalDayOfWeek(date, locale, "short") + ", " + date.getDate().toString();
1102
1050
  bottomValues.push(React.createElement("text", {
1103
1051
  key: date.getTime(),
1104
1052
  y: headerHeight * 0.8,
1105
1053
  x: columnWidth * i + columnWidth * 0.5,
1106
- className: `${styles$5.calendarTopText} ${styles$5.textAnchorMiddle}`
1054
+ className: styles$5.calendarTopText + " " + styles$5.textAnchorMiddle
1107
1055
  }, bottomValue));
1108
1056
 
1109
1057
  if (i + 1 !== dates.length && date.getMonth() !== dates[i + 1].getMonth()) {
1110
- const topValue = `${getLocaleMonth(date, locale)} ${date.getFullYear()}`;
1058
+ var topValue = getLocaleMonth(date, locale) + " " + date.getFullYear();
1111
1059
  topValues.push(React.createElement(TopPartOfCalendar, {
1112
1060
  key: topValue + date.getFullYear(),
1113
1061
  value: topValue,
1114
1062
  x1Line: columnWidth * (i + 1),
1115
1063
  y1Line: 0,
1116
1064
  y2Line: topDefaultHeight,
1117
- xText: columnWidth * (i + 1) - getDaysInMonth(date.getMonth(), date.getFullYear()) * columnWidth * 0.5,
1065
+ xText: topValues.length === 0 ? columnWidth * (i + 1) * 0.5 : columnWidth * (i + 1) - date.getDate() * columnWidth * 0.5,
1066
+ yText: topDefaultHeight * 0.9
1067
+ }));
1068
+ }
1069
+
1070
+ if (i + 1 === dates.length) {
1071
+ var _topValue = getLocaleMonth(date, locale) + " " + date.getFullYear();
1072
+
1073
+ topValues.push(React.createElement(TopPartOfCalendar, {
1074
+ key: _topValue + date.getFullYear(),
1075
+ value: _topValue,
1076
+ x1Line: columnWidth * (i + 1),
1077
+ y1Line: 0,
1078
+ y2Line: topDefaultHeight,
1079
+ xText: columnWidth * (i + 1) - date.getDate() * columnWidth * 0.5,
1118
1080
  yText: topDefaultHeight * 0.9
1119
1081
  }));
1120
1082
  }
@@ -1123,28 +1085,28 @@ const Calendar = _ref => {
1123
1085
  return [topValues, bottomValues];
1124
1086
  };
1125
1087
 
1126
- const getCalendarValuesForPartOfDay = () => {
1127
- const topValues = [];
1128
- const bottomValues = [];
1129
- const ticks = viewMode === ViewMode.HalfDay ? 2 : 4;
1130
- const topDefaultHeight = headerHeight * 0.5;
1131
- const dates = dateSetup.dates;
1088
+ var getCalendarValuesForPartOfDay = function getCalendarValuesForPartOfDay() {
1089
+ var topValues = [];
1090
+ var bottomValues = [];
1091
+ var ticks = viewMode === ViewMode.HalfDay ? 2 : 4;
1092
+ var topDefaultHeight = headerHeight * 0.5;
1093
+ var dates = dateSetup.dates;
1132
1094
 
1133
- for (let i = 0; i < dates.length; i++) {
1134
- const date = dates[i];
1135
- const bottomValue = getCachedDateTimeFormat(locale, {
1095
+ for (var i = 0; i < dates.length; i++) {
1096
+ var date = dates[i];
1097
+ var bottomValue = getCachedDateTimeFormat(locale, {
1136
1098
  hour: "numeric"
1137
1099
  }).format(date);
1138
1100
  bottomValues.push(React.createElement("text", {
1139
1101
  key: date.getTime(),
1140
1102
  y: headerHeight * 0.8,
1141
1103
  x: columnWidth * (i + +rtl),
1142
- className: `${styles$5.calendarTopText} ${styles$5.textAnchorMiddle}`,
1104
+ className: styles$5.calendarTopText + " " + styles$5.textAnchorMiddle,
1143
1105
  fontFamily: fontFamily
1144
1106
  }, bottomValue));
1145
1107
 
1146
1108
  if (i === 0 || date.getDate() !== dates[i - 1].getDate()) {
1147
- const topValue = `${getLocalDayOfWeek(date, locale, "short")}, ${date.getDate()} ${getLocaleMonth(date, locale)}`;
1109
+ var topValue = getLocalDayOfWeek(date, locale, "short") + ", " + date.getDate() + " " + getLocaleMonth(date, locale);
1148
1110
  topValues.push(React.createElement(TopPartOfCalendar, {
1149
1111
  key: topValue + date.getFullYear(),
1150
1112
  value: topValue,
@@ -1160,15 +1122,15 @@ const Calendar = _ref => {
1160
1122
  return [topValues, bottomValues];
1161
1123
  };
1162
1124
 
1163
- const getCalendarValuesForHour = () => {
1164
- const topValues = [];
1165
- const bottomValues = [];
1166
- const topDefaultHeight = headerHeight * 0.5;
1167
- const dates = dateSetup.dates;
1125
+ var getCalendarValuesForHour = function getCalendarValuesForHour() {
1126
+ var topValues = [];
1127
+ var bottomValues = [];
1128
+ var topDefaultHeight = headerHeight * 0.5;
1129
+ var dates = dateSetup.dates;
1168
1130
 
1169
- for (let i = 0; i < dates.length; i++) {
1170
- const date = dates[i];
1171
- const bottomValue = getCachedDateTimeFormat(locale, {
1131
+ for (var i = 0; i < dates.length; i++) {
1132
+ var date = dates[i];
1133
+ var bottomValue = getCachedDateTimeFormat(locale, {
1172
1134
  hour: "numeric"
1173
1135
  }).format(date);
1174
1136
  bottomValues.push(React.createElement("text", {
@@ -1180,9 +1142,9 @@ const Calendar = _ref => {
1180
1142
  }, bottomValue));
1181
1143
 
1182
1144
  if (i !== 0 && date.getDate() !== dates[i - 1].getDate()) {
1183
- const displayDate = dates[i - 1];
1184
- const topValue = `${getLocalDayOfWeek(displayDate, locale, "long")}, ${displayDate.getDate()} ${getLocaleMonth(displayDate, locale)}`;
1185
- const topPosition = (date.getHours() - 24) / 2;
1145
+ var displayDate = dates[i - 1];
1146
+ var topValue = getLocalDayOfWeek(displayDate, locale, "long") + ", " + displayDate.getDate() + " " + getLocaleMonth(displayDate, locale);
1147
+ var topPosition = (date.getHours() - 24) / 2;
1186
1148
  topValues.push(React.createElement(TopPartOfCalendar, {
1187
1149
  key: topValue + displayDate.getFullYear(),
1188
1150
  value: topValue,
@@ -1198,37 +1160,58 @@ const Calendar = _ref => {
1198
1160
  return [topValues, bottomValues];
1199
1161
  };
1200
1162
 
1201
- let topValues = [];
1202
- let bottomValues = [];
1163
+ var topValues = [];
1164
+ var bottomValues = [];
1203
1165
 
1204
1166
  switch (dateSetup.viewMode) {
1205
1167
  case ViewMode.Year:
1206
- [topValues, bottomValues] = getCalendarValuesForYear();
1168
+ var _getCalendarValuesFor = getCalendarValuesForYear();
1169
+
1170
+ topValues = _getCalendarValuesFor[0];
1171
+ bottomValues = _getCalendarValuesFor[1];
1207
1172
  break;
1208
1173
 
1209
1174
  case ViewMode.Quarter:
1210
- [topValues, bottomValues] = getCalendarValuesForQuarter();
1175
+ var _getCalendarValuesFor2 = getCalendarValuesForQuarter();
1176
+
1177
+ topValues = _getCalendarValuesFor2[0];
1178
+ bottomValues = _getCalendarValuesFor2[1];
1211
1179
  break;
1212
1180
 
1213
1181
  case ViewMode.Month:
1214
- [topValues, bottomValues] = getCalendarValuesForMonth();
1182
+ var _getCalendarValuesFor3 = getCalendarValuesForMonth();
1183
+
1184
+ topValues = _getCalendarValuesFor3[0];
1185
+ bottomValues = _getCalendarValuesFor3[1];
1215
1186
  break;
1216
1187
 
1217
1188
  case ViewMode.Week:
1218
- [topValues, bottomValues] = getCalendarValuesForWeek();
1189
+ var _getCalendarValuesFor4 = getCalendarValuesForWeek();
1190
+
1191
+ topValues = _getCalendarValuesFor4[0];
1192
+ bottomValues = _getCalendarValuesFor4[1];
1219
1193
  break;
1220
1194
 
1221
1195
  case ViewMode.Day:
1222
- [topValues, bottomValues] = getCalendarValuesForDay();
1196
+ var _getCalendarValuesFor5 = getCalendarValuesForDay();
1197
+
1198
+ topValues = _getCalendarValuesFor5[0];
1199
+ bottomValues = _getCalendarValuesFor5[1];
1223
1200
  break;
1224
1201
 
1225
1202
  case ViewMode.QuarterDay:
1226
1203
  case ViewMode.HalfDay:
1227
- [topValues, bottomValues] = getCalendarValuesForPartOfDay();
1204
+ var _getCalendarValuesFor6 = getCalendarValuesForPartOfDay();
1205
+
1206
+ topValues = _getCalendarValuesFor6[0];
1207
+ bottomValues = _getCalendarValuesFor6[1];
1228
1208
  break;
1229
1209
 
1230
1210
  case ViewMode.Hour:
1231
- [topValues, bottomValues] = getCalendarValuesForHour();
1211
+ var _getCalendarValuesFor7 = getCalendarValuesForHour();
1212
+
1213
+ topValues = _getCalendarValuesFor7[0];
1214
+ bottomValues = _getCalendarValuesFor7[1];
1232
1215
  }
1233
1216
 
1234
1217
  return React.createElement("g", {
@@ -1264,23 +1247,27 @@ function _catch(body, recover) {
1264
1247
  return result;
1265
1248
  }
1266
1249
 
1267
- const Arrow = _ref => {
1268
- let {
1269
- taskFrom,
1270
- taskTo,
1271
- rowHeight,
1272
- taskHeight,
1273
- arrowIndent,
1274
- rtl,
1275
- arrowColor
1276
- } = _ref;
1277
- let path;
1278
- let trianglePoints;
1250
+ var Arrow = function Arrow(_ref) {
1251
+ var taskFrom = _ref.taskFrom,
1252
+ taskTo = _ref.taskTo,
1253
+ rowHeight = _ref.rowHeight,
1254
+ taskHeight = _ref.taskHeight,
1255
+ arrowIndent = _ref.arrowIndent,
1256
+ rtl = _ref.rtl,
1257
+ arrowColor = _ref.arrowColor;
1258
+ var path;
1259
+ var trianglePoints;
1279
1260
 
1280
1261
  if (rtl) {
1281
- [path, trianglePoints] = drownPathAndTriangleRTL(taskFrom, taskTo, rowHeight, taskHeight, arrowIndent);
1262
+ var _drownPathAndTriangle = drownPathAndTriangleRTL(taskFrom, taskTo, rowHeight, taskHeight, arrowIndent);
1263
+
1264
+ path = _drownPathAndTriangle[0];
1265
+ trianglePoints = _drownPathAndTriangle[1];
1282
1266
  } else {
1283
- [path, trianglePoints] = drownPathAndTriangle(taskFrom, taskTo, rowHeight, taskHeight, arrowIndent);
1267
+ var _drownPathAndTriangle2 = drownPathAndTriangle(taskFrom, taskTo, rowHeight, taskHeight, arrowIndent);
1268
+
1269
+ path = _drownPathAndTriangle2[0];
1270
+ trianglePoints = _drownPathAndTriangle2[1];
1284
1271
  }
1285
1272
 
1286
1273
  return React.createElement("g", {
@@ -1296,8 +1283,8 @@ const Arrow = _ref => {
1296
1283
  }));
1297
1284
  };
1298
1285
 
1299
- const drownPathAndTriangle = (taskFrom, taskTo, rowHeight, taskHeight, arrowIndent) => {
1300
- let taskToStart, taskFromEnd;
1286
+ var drownPathAndTriangle = function drownPathAndTriangle(taskFrom, taskTo, rowHeight, taskHeight, arrowIndent) {
1287
+ var taskToStart, taskFromEnd;
1301
1288
 
1302
1289
  if (taskTo.x1 > 0 && taskTo.actualx1 > 0) {
1303
1290
  taskToStart = Math.min(taskTo.x1, taskTo.actualx1);
@@ -1307,38 +1294,24 @@ const drownPathAndTriangle = (taskFrom, taskTo, rowHeight, taskHeight, arrowInde
1307
1294
  taskFromEnd = Math.max(taskFrom.x2, taskFrom.actualx2);
1308
1295
  } else if (taskFrom.x2 > 0) taskFromEnd = taskFrom.x2;else if (taskFrom.actualx2 > 0) taskFromEnd = taskFrom.actualx2;else taskFromEnd = 0;
1309
1296
 
1310
- const indexCompare = taskFrom.index > taskTo.index ? -1 : 1;
1311
- const taskToEndPosition = taskTo.y + taskHeight / 2;
1312
- const taskFromEndPosition = taskFromEnd + arrowIndent * 2;
1313
- const taskFromHorizontalOffsetValue = taskFromEndPosition < taskToStart ? "" : `H ${taskToStart - arrowIndent}`;
1314
- const taskToHorizontalOffsetValue = taskFromEndPosition > taskToStart ? arrowIndent : taskToStart - taskFromEnd - arrowIndent;
1315
- const path = `M ${taskFromEnd} ${taskFrom.y + taskHeight / 2}
1316
- h ${arrowIndent}
1317
- v ${indexCompare * rowHeight / 2}
1318
- ${taskFromHorizontalOffsetValue}
1319
- V ${taskToEndPosition}
1320
- h ${taskToHorizontalOffsetValue}`;
1321
- const trianglePoints = `${taskToStart},${taskToEndPosition}
1322
- ${taskToStart - 5},${taskToEndPosition - 5}
1323
- ${taskToStart - 5},${taskToEndPosition + 5}`;
1297
+ var indexCompare = taskFrom.index > taskTo.index ? -1 : 1;
1298
+ var taskToEndPosition = taskTo.y + taskHeight / 2;
1299
+ var taskFromEndPosition = taskFromEnd + arrowIndent * 2;
1300
+ var taskFromHorizontalOffsetValue = taskFromEndPosition < taskToStart ? "" : "H " + (taskToStart - arrowIndent);
1301
+ var taskToHorizontalOffsetValue = taskFromEndPosition > taskToStart ? arrowIndent : taskToStart - taskFromEnd - arrowIndent;
1302
+ var path = "M " + taskFromEnd + " " + (taskFrom.y + taskHeight / 2) + " \n h " + arrowIndent + " \n v " + indexCompare * rowHeight / 2 + " \n " + taskFromHorizontalOffsetValue + "\n V " + taskToEndPosition + " \n h " + taskToHorizontalOffsetValue;
1303
+ var trianglePoints = taskToStart + "," + taskToEndPosition + " \n " + (taskToStart - 5) + "," + (taskToEndPosition - 5) + " \n " + (taskToStart - 5) + "," + (taskToEndPosition + 5);
1324
1304
  return [path, trianglePoints];
1325
1305
  };
1326
1306
 
1327
- const drownPathAndTriangleRTL = (taskFrom, taskTo, rowHeight, taskHeight, arrowIndent) => {
1328
- const indexCompare = taskFrom.index > taskTo.index ? -1 : 1;
1329
- const taskToEndPosition = taskTo.y + taskHeight / 2;
1330
- const taskFromEndPosition = taskFrom.x1 - arrowIndent * 2;
1331
- const taskFromHorizontalOffsetValue = taskFromEndPosition > taskTo.x2 ? "" : `H ${taskTo.x2 + arrowIndent}`;
1332
- const taskToHorizontalOffsetValue = taskFromEndPosition < taskTo.x2 ? -arrowIndent : taskTo.x2 - taskFrom.x1 + arrowIndent;
1333
- const path = `M ${taskFrom.x1} ${taskFrom.y + taskHeight / 2}
1334
- h ${-arrowIndent}
1335
- v ${indexCompare * rowHeight / 2}
1336
- ${taskFromHorizontalOffsetValue}
1337
- V ${taskToEndPosition}
1338
- h ${taskToHorizontalOffsetValue}`;
1339
- const trianglePoints = `${taskTo.x2},${taskToEndPosition}
1340
- ${taskTo.x2 + 5},${taskToEndPosition + 5}
1341
- ${taskTo.x2 + 5},${taskToEndPosition - 5}`;
1307
+ var drownPathAndTriangleRTL = function drownPathAndTriangleRTL(taskFrom, taskTo, rowHeight, taskHeight, arrowIndent) {
1308
+ var indexCompare = taskFrom.index > taskTo.index ? -1 : 1;
1309
+ var taskToEndPosition = taskTo.y + taskHeight / 2;
1310
+ var taskFromEndPosition = taskFrom.x1 - arrowIndent * 2;
1311
+ var taskFromHorizontalOffsetValue = taskFromEndPosition > taskTo.x2 ? "" : "H " + (taskTo.x2 + arrowIndent);
1312
+ var taskToHorizontalOffsetValue = taskFromEndPosition < taskTo.x2 ? -arrowIndent : taskTo.x2 - taskFrom.x1 + arrowIndent;
1313
+ 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;
1314
+ var trianglePoints = taskTo.x2 + "," + taskToEndPosition + " \n " + (taskTo.x2 + 5) + "," + (taskToEndPosition + 5) + " \n " + (taskTo.x2 + 5) + "," + (taskToEndPosition - 5);
1342
1315
  return [path, trianglePoints];
1343
1316
  };
1344
1317
 
@@ -1788,26 +1761,24 @@ var sortTasks = function sortTasks(taskA, taskB) {
1788
1761
  }
1789
1762
  };
1790
1763
 
1791
- const BarDisplay = _ref => {
1792
- let {
1793
- x,
1794
- y,
1795
- type,
1796
- width,
1797
- height,
1798
- isSelected,
1799
- progressX,
1800
- progressWidth,
1801
- barCornerRadius,
1802
- styles,
1803
- onMouseDown
1804
- } = _ref;
1805
-
1806
- const getProcessColor = () => {
1764
+ var BarDisplay = function BarDisplay(_ref) {
1765
+ var x = _ref.x,
1766
+ y = _ref.y,
1767
+ type = _ref.type,
1768
+ width = _ref.width,
1769
+ height = _ref.height,
1770
+ isSelected = _ref.isSelected,
1771
+ progressX = _ref.progressX,
1772
+ progressWidth = _ref.progressWidth,
1773
+ barCornerRadius = _ref.barCornerRadius,
1774
+ styles = _ref.styles,
1775
+ onMouseDown = _ref.onMouseDown;
1776
+
1777
+ var getProcessColor = function getProcessColor() {
1807
1778
  return isSelected ? styles.progressSelectedColor : styles.progressColor;
1808
1779
  };
1809
1780
 
1810
- const getBarColor = () => {
1781
+ var getBarColor = function getBarColor() {
1811
1782
  return isSelected ? styles.backgroundSelectedColor : styles.backgroundColor;
1812
1783
  };
1813
1784
 
@@ -1854,15 +1825,13 @@ const BarDisplay = _ref => {
1854
1825
 
1855
1826
  var styles$6 = {"barWrapper":"_KxSXS","barHandle":"_3w_5u","barBackground":"_31ERP"};
1856
1827
 
1857
- const BarDateHandle = _ref => {
1858
- let {
1859
- x,
1860
- y,
1861
- width,
1862
- height,
1863
- barCornerRadius,
1864
- onMouseDown
1865
- } = _ref;
1828
+ var BarDateHandle = function BarDateHandle(_ref) {
1829
+ var x = _ref.x,
1830
+ y = _ref.y,
1831
+ width = _ref.width,
1832
+ height = _ref.height,
1833
+ barCornerRadius = _ref.barCornerRadius,
1834
+ onMouseDown = _ref.onMouseDown;
1866
1835
  return React.createElement("rect", {
1867
1836
  x: x,
1868
1837
  y: y,
@@ -1875,22 +1844,22 @@ const BarDateHandle = _ref => {
1875
1844
  });
1876
1845
  };
1877
1846
 
1878
- const BarProgressHandle = _ref => {
1847
+ var BarProgressHandle = function BarProgressHandle(_ref) {
1848
+ _objectDestructuringEmpty(_ref);
1849
+
1879
1850
  return React.createElement("div", null);
1880
1851
  };
1881
1852
 
1882
- const Bar = _ref => {
1883
- let {
1884
- task,
1885
- isProgressChangeable,
1886
- isDateChangeable,
1887
- rtl,
1888
- type,
1889
- onEventStart,
1890
- isSelected
1891
- } = _ref;
1892
- const progressPoint = getProgressPoint(+!rtl * task.progressWidth + task.progressX, task.y, task.height);
1893
- const handleHeight = task.height / 2 - 1;
1853
+ var Bar = function Bar(_ref) {
1854
+ var task = _ref.task,
1855
+ isProgressChangeable = _ref.isProgressChangeable,
1856
+ isDateChangeable = _ref.isDateChangeable,
1857
+ rtl = _ref.rtl,
1858
+ type = _ref.type,
1859
+ onEventStart = _ref.onEventStart,
1860
+ isSelected = _ref.isSelected;
1861
+ var progressPoint = getProgressPoint(+!rtl * task.progressWidth + task.progressX, task.y, task.height);
1862
+ var handleHeight = task.height / 2 - 1;
1894
1863
 
1895
1864
  if (type == "planned") {
1896
1865
  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", {
@@ -1909,7 +1878,7 @@ const Bar = _ref => {
1909
1878
  barCornerRadius: task.barCornerRadius,
1910
1879
  styles: task.styles,
1911
1880
  isSelected: isSelected,
1912
- onMouseDown: e => {
1881
+ onMouseDown: function onMouseDown(e) {
1913
1882
  isDateChangeable && onEventStart("move", task, e, "planned");
1914
1883
  }
1915
1884
  }), React.createElement("g", {
@@ -1920,7 +1889,7 @@ const Bar = _ref => {
1920
1889
  width: task.handleWidth,
1921
1890
  height: handleHeight,
1922
1891
  barCornerRadius: task.barCornerRadius,
1923
- onMouseDown: e => {
1892
+ onMouseDown: function onMouseDown(e) {
1924
1893
  onEventStart("start", task, e, "planned");
1925
1894
  }
1926
1895
  }), React.createElement(BarDateHandle, {
@@ -1929,12 +1898,12 @@ const Bar = _ref => {
1929
1898
  width: task.handleWidth,
1930
1899
  height: handleHeight,
1931
1900
  barCornerRadius: task.barCornerRadius,
1932
- onMouseDown: e => {
1901
+ onMouseDown: function onMouseDown(e) {
1933
1902
  onEventStart("end", task, e, "planned");
1934
1903
  }
1935
1904
  })), isProgressChangeable && React.createElement(BarProgressHandle, {
1936
1905
  progressPoint: progressPoint,
1937
- onMouseDown: e => {
1906
+ onMouseDown: function onMouseDown(e) {
1938
1907
  onEventStart("progress", task, e, "planned");
1939
1908
  }
1940
1909
  })));else return React.createElement("g", {
@@ -1958,7 +1927,7 @@ const Bar = _ref => {
1958
1927
  barCornerRadius: task.barCornerRadius,
1959
1928
  styles: task.styles,
1960
1929
  isSelected: isSelected,
1961
- onMouseDown: e => {
1930
+ onMouseDown: function onMouseDown(e) {
1962
1931
  isDateChangeable && onEventStart("move", task, e, "actual");
1963
1932
  }
1964
1933
  }), React.createElement("g", {
@@ -1969,7 +1938,7 @@ const Bar = _ref => {
1969
1938
  width: task.handleWidth,
1970
1939
  height: handleHeight,
1971
1940
  barCornerRadius: task.barCornerRadius,
1972
- onMouseDown: e => {
1941
+ onMouseDown: function onMouseDown(e) {
1973
1942
  onEventStart("start", task, e, "actual");
1974
1943
  }
1975
1944
  }), React.createElement(BarDateHandle, {
@@ -1978,12 +1947,12 @@ const Bar = _ref => {
1978
1947
  width: task.handleWidth,
1979
1948
  height: handleHeight,
1980
1949
  barCornerRadius: task.barCornerRadius,
1981
- onMouseDown: e => {
1950
+ onMouseDown: function onMouseDown(e) {
1982
1951
  onEventStart("end", task, e, "actual");
1983
1952
  }
1984
1953
  })), isProgressChangeable && React.createElement(BarProgressHandle, {
1985
1954
  progressPoint: progressPoint,
1986
- onMouseDown: e => {
1955
+ onMouseDown: function onMouseDown(e) {
1987
1956
  onEventStart("progress", task, e, "actual");
1988
1957
  }
1989
1958
  })));
@@ -1995,16 +1964,14 @@ const Bar = _ref => {
1995
1964
  }
1996
1965
  };
1997
1966
 
1998
- const BarSmall = _ref => {
1999
- let {
2000
- task,
2001
- type,
2002
- isProgressChangeable,
2003
- isDateChangeable,
2004
- onEventStart,
2005
- isSelected
2006
- } = _ref;
2007
- const progressPoint = getProgressPoint(task.progressWidth + task.x1, task.y, task.height);
1967
+ var BarSmall = function BarSmall(_ref) {
1968
+ var task = _ref.task,
1969
+ type = _ref.type,
1970
+ isProgressChangeable = _ref.isProgressChangeable,
1971
+ isDateChangeable = _ref.isDateChangeable,
1972
+ onEventStart = _ref.onEventStart,
1973
+ isSelected = _ref.isSelected;
1974
+ var progressPoint = getProgressPoint(task.progressWidth + task.x1, task.y, task.height);
2008
1975
  return React.createElement("g", {
2009
1976
  className: styles$6.barWrapper,
2010
1977
  tabIndex: 0
@@ -2021,14 +1988,14 @@ const BarSmall = _ref => {
2021
1988
  barCornerRadius: task.barCornerRadius,
2022
1989
  styles: task.styles,
2023
1990
  isSelected: isSelected,
2024
- onMouseDown: e => {
1991
+ onMouseDown: function onMouseDown(e) {
2025
1992
  isDateChangeable && onEventStart("move", task, e);
2026
1993
  }
2027
1994
  }), React.createElement("g", {
2028
1995
  className: "handleGroup"
2029
1996
  }, isProgressChangeable && React.createElement(BarProgressHandle, {
2030
1997
  progressPoint: progressPoint,
2031
- onMouseDown: e => {
1998
+ onMouseDown: function onMouseDown(e) {
2032
1999
  onEventStart("progress", task, e);
2033
2000
  }
2034
2001
  })));
@@ -2036,17 +2003,14 @@ const BarSmall = _ref => {
2036
2003
 
2037
2004
  var styles$7 = {"milestoneWrapper":"_RRr13","milestoneBackground":"_2P2B1"};
2038
2005
 
2039
- const Milestone = _ref => {
2040
- let {
2041
- task,
2042
- isDateChangeable,
2043
- onEventStart,
2044
- isSelected
2045
- } = _ref;
2046
- const transform = `rotate(45 ${task.x1 + task.height * 0.356}
2047
- ${task.y + task.height * 0.85})`;
2048
-
2049
- const getBarColor = () => {
2006
+ var Milestone = function Milestone(_ref) {
2007
+ var task = _ref.task,
2008
+ isDateChangeable = _ref.isDateChangeable,
2009
+ onEventStart = _ref.onEventStart,
2010
+ isSelected = _ref.isSelected;
2011
+ var transform = "rotate(45 " + (task.x1 + task.height * 0.356) + " \n " + (task.y + task.height * 0.85) + ")";
2012
+
2013
+ var getBarColor = function getBarColor() {
2050
2014
  return isSelected ? task.styles.backgroundSelectedColor : task.styles.backgroundColor;
2051
2015
  };
2052
2016
 
@@ -2063,7 +2027,7 @@ const Milestone = _ref => {
2063
2027
  ry: task.barCornerRadius,
2064
2028
  transform: transform,
2065
2029
  className: styles$7.milestoneBackground,
2066
- onMouseDown: e => {
2030
+ onMouseDown: function onMouseDown(e) {
2067
2031
  isDateChangeable && onEventStart("move", task, e);
2068
2032
  }
2069
2033
  }));
@@ -2071,16 +2035,14 @@ const Milestone = _ref => {
2071
2035
 
2072
2036
  var styles$8 = {"projectWrapper":"_1KJ6x","projectBackground":"_2RbVy","projectTop":"_2pZMF"};
2073
2037
 
2074
- const Project = _ref => {
2075
- let {
2076
- task,
2077
- isSelected
2078
- } = _ref;
2079
- const barColor = isSelected ? task.styles.backgroundSelectedColor : task.styles.backgroundColor;
2080
- const processColor = isSelected ? task.styles.progressSelectedColor : task.styles.progressColor;
2081
- const projectWith = task.x2 - task.x1;
2082
- 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(",");
2083
- 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(",");
2038
+ var Project = function Project(_ref) {
2039
+ var task = _ref.task,
2040
+ isSelected = _ref.isSelected;
2041
+ var barColor = isSelected ? task.styles.backgroundSelectedColor : task.styles.backgroundColor;
2042
+ var processColor = isSelected ? task.styles.progressSelectedColor : task.styles.progressColor;
2043
+ var projectWith = task.x2 - task.x1;
2044
+ 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(",");
2045
+ 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(",");
2084
2046
  return React.createElement("g", {
2085
2047
  tabIndex: 0,
2086
2048
  className: styles$8.projectWrapper
@@ -2121,16 +2083,18 @@ const Project = _ref => {
2121
2083
  }));
2122
2084
  };
2123
2085
 
2124
- const TaskItem = props => {
2125
- const {
2126
- task,
2127
- isDelete,
2128
- isSelected,
2129
- onEventStart
2130
- } = { ...props
2131
- };
2132
- const [taskItem, setTaskItem] = useState([React.createElement("div", null)]);
2133
- useEffect(() => {
2086
+ var TaskItem = function TaskItem(props) {
2087
+ var _props = _extends({}, props),
2088
+ task = _props.task,
2089
+ isDelete = _props.isDelete,
2090
+ isSelected = _props.isSelected,
2091
+ onEventStart = _props.onEventStart;
2092
+
2093
+ var _useState = useState([React.createElement("div", null)]),
2094
+ taskItem = _useState[0],
2095
+ setTaskItem = _useState[1];
2096
+
2097
+ useEffect(function () {
2134
2098
  switch (task.typeInternal) {
2135
2099
  case "milestone":
2136
2100
  if (task.x1 >= 0 && task.actualx1 >= 0) setTaskItem([React.createElement(Milestone, Object.assign({}, props))]);else setTaskItem([]);
@@ -2146,27 +2110,27 @@ const TaskItem = props => {
2146
2110
 
2147
2111
  default:
2148
2112
  {
2149
- let taskItem = [];
2113
+ var _taskItem = [];
2150
2114
 
2151
2115
  if ((task === null || task === void 0 ? void 0 : task.x1) >= 0 && (task === null || task === void 0 ? void 0 : task.x2) >= 0) {
2152
- taskItem.push(React.createElement(Bar, Object.assign({}, props, {
2116
+ _taskItem.push(React.createElement(Bar, Object.assign({}, props, {
2153
2117
  type: "planned"
2154
2118
  })));
2155
2119
  }
2156
2120
 
2157
2121
  if ((task === null || task === void 0 ? void 0 : task.actualx1) >= 0 && (task === null || task === void 0 ? void 0 : task.actualx2) >= 0) {
2158
- taskItem.push(React.createElement(Bar, Object.assign({}, props, {
2122
+ _taskItem.push(React.createElement(Bar, Object.assign({}, props, {
2159
2123
  type: "actual"
2160
2124
  })));
2161
2125
  }
2162
2126
 
2163
- setTaskItem(taskItem);
2127
+ setTaskItem(_taskItem);
2164
2128
  }
2165
2129
  break;
2166
2130
  }
2167
2131
  }, [task, isSelected]);
2168
2132
  return React.createElement("g", null, React.createElement("g", {
2169
- onKeyDown: e => {
2133
+ onKeyDown: function onKeyDown(e) {
2170
2134
  switch (e.key) {
2171
2135
  case "Delete":
2172
2136
  {
@@ -2177,20 +2141,20 @@ const TaskItem = props => {
2177
2141
 
2178
2142
  e.stopPropagation();
2179
2143
  },
2180
- onMouseEnter: e => {
2144
+ onMouseEnter: function onMouseEnter(e) {
2181
2145
  onEventStart("mouseenter", task, e, "planned");
2182
2146
  },
2183
- onMouseLeave: e => {
2147
+ onMouseLeave: function onMouseLeave(e) {
2184
2148
  onEventStart("mouseleave", task, e, "planned");
2185
2149
  },
2186
- onDoubleClick: e => {
2150
+ onDoubleClick: function onDoubleClick(e) {
2187
2151
  onEventStart("dblclick", task, e, "planned");
2188
2152
  },
2189
- onClick: e => {
2153
+ onClick: function onClick(e) {
2190
2154
  onEventStart("click", task, e, "planned");
2191
2155
  }
2192
2156
  }, taskItem[0]), React.createElement("g", {
2193
- onKeyDown: e => {
2157
+ onKeyDown: function onKeyDown(e) {
2194
2158
  switch (e.key) {
2195
2159
  case "Delete":
2196
2160
  {
@@ -2201,74 +2165,82 @@ const TaskItem = props => {
2201
2165
 
2202
2166
  e.stopPropagation();
2203
2167
  },
2204
- onMouseEnter: e => {
2168
+ onMouseEnter: function onMouseEnter(e) {
2205
2169
  onEventStart("mouseenter", task, e, "actual");
2206
2170
  },
2207
- onMouseLeave: e => {
2171
+ onMouseLeave: function onMouseLeave(e) {
2208
2172
  onEventStart("mouseleave", task, e, "actual");
2209
2173
  },
2210
- onDoubleClick: e => {
2174
+ onDoubleClick: function onDoubleClick(e) {
2211
2175
  onEventStart("dblclick", task, e, "actual");
2212
2176
  },
2213
- onClick: e => {
2177
+ onClick: function onClick(e) {
2214
2178
  onEventStart("click", task, e, "actual");
2215
2179
  }
2216
2180
  }, taskItem[1]));
2217
2181
  };
2218
2182
 
2219
- const TaskGanttContent = _ref => {
2183
+ var TaskGanttContent = function TaskGanttContent(_ref) {
2220
2184
  var _svg$current;
2221
2185
 
2222
- let {
2223
- tasks,
2224
- dates,
2225
- ganttEvent,
2226
- selectedTask,
2227
- rowHeight,
2228
- columnWidth,
2229
- timeStep,
2230
- svg,
2231
- taskHeight,
2232
- arrowIndent,
2233
- fontFamily,
2234
- fontSize,
2235
- rtl,
2236
- setGanttEvent,
2237
- setFailedTask,
2238
- setSelectedTask,
2239
- onDateChange,
2240
- onProgressChange,
2241
- onDoubleClick,
2242
- onClick,
2243
- onDelete
2244
- } = _ref;
2245
- const point = svg === null || svg === void 0 ? void 0 : (_svg$current = svg.current) === null || _svg$current === void 0 ? void 0 : _svg$current.createSVGPoint();
2246
- const [xStep, setXStep] = useState(0);
2247
- const [initEventX1Delta, setInitEventX1Delta] = useState(0);
2248
- const [isMoving, setIsMoving] = useState(false);
2249
- useEffect(() => {
2250
- const dateDelta = dates[1].getTime() - dates[0].getTime() - dates[1].getTimezoneOffset() * 60 * 1000 + dates[0].getTimezoneOffset() * 60 * 1000;
2251
- const newXStep = timeStep * columnWidth / dateDelta;
2186
+ var tasks = _ref.tasks,
2187
+ dates = _ref.dates,
2188
+ ganttEvent = _ref.ganttEvent,
2189
+ selectedTask = _ref.selectedTask,
2190
+ rowHeight = _ref.rowHeight,
2191
+ columnWidth = _ref.columnWidth,
2192
+ timeStep = _ref.timeStep,
2193
+ svg = _ref.svg,
2194
+ taskHeight = _ref.taskHeight,
2195
+ arrowIndent = _ref.arrowIndent,
2196
+ fontFamily = _ref.fontFamily,
2197
+ fontSize = _ref.fontSize,
2198
+ rtl = _ref.rtl,
2199
+ setGanttEvent = _ref.setGanttEvent,
2200
+ setFailedTask = _ref.setFailedTask,
2201
+ setSelectedTask = _ref.setSelectedTask,
2202
+ onDateChange = _ref.onDateChange,
2203
+ onProgressChange = _ref.onProgressChange,
2204
+ onDoubleClick = _ref.onDoubleClick,
2205
+ onClick = _ref.onClick,
2206
+ onDelete = _ref.onDelete;
2207
+ var point = svg === null || svg === void 0 ? void 0 : (_svg$current = svg.current) === null || _svg$current === void 0 ? void 0 : _svg$current.createSVGPoint();
2208
+
2209
+ var _useState = useState(0),
2210
+ xStep = _useState[0],
2211
+ setXStep = _useState[1];
2212
+
2213
+ var _useState2 = useState(0),
2214
+ initEventX1Delta = _useState2[0],
2215
+ setInitEventX1Delta = _useState2[1];
2216
+
2217
+ var _useState3 = useState(false),
2218
+ isMoving = _useState3[0],
2219
+ setIsMoving = _useState3[1];
2220
+
2221
+ useEffect(function () {
2222
+ var dateDelta = dates[1].getTime() - dates[0].getTime() - dates[1].getTimezoneOffset() * 60 * 1000 + dates[0].getTimezoneOffset() * 60 * 1000;
2223
+ var newXStep = timeStep * columnWidth / dateDelta;
2252
2224
  setXStep(newXStep);
2253
2225
  }, [columnWidth, dates, timeStep]);
2254
- useEffect(() => {
2255
- const handleMouseMove = function (event) {
2226
+ useEffect(function () {
2227
+ var handleMouseMove = function handleMouseMove(event) {
2256
2228
  try {
2257
2229
  var _svg$current$getScree;
2258
2230
 
2259
2231
  if (!ganttEvent.changedTask || !point || !(svg !== null && svg !== void 0 && svg.current)) return Promise.resolve();
2260
2232
  event.preventDefault();
2261
2233
  point.x = event.clientX;
2262
- 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());
2263
- const {
2264
- isChanged,
2265
- changedTask
2266
- } = handleTaskBySVGMouseEvent(cursor.x, ganttEvent.action, ganttEvent.changedTask, ganttEvent.type, xStep, timeStep, initEventX1Delta, rtl);
2234
+ 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());
2235
+
2236
+ var _handleTaskBySVGMouse = handleTaskBySVGMouseEvent(cursor.x, ganttEvent.action, ganttEvent.changedTask, ganttEvent.type, xStep, timeStep, initEventX1Delta, rtl),
2237
+ isChanged = _handleTaskBySVGMouse.isChanged,
2238
+ changedTask = _handleTaskBySVGMouse.changedTask;
2267
2239
 
2268
2240
  if (isChanged) {
2269
2241
  setGanttEvent({
2270
2242
  action: ganttEvent.action,
2271
- changedTask
2243
+ changedTask: changedTask
2272
2244
  });
2273
2245
  }
2274
2246
 
@@ -2278,41 +2250,40 @@ const TaskGanttContent = _ref => {
2278
2250
  }
2279
2251
  };
2280
2252
 
2281
- const handleMouseUp = function (event) {
2253
+ var handleMouseUp = function handleMouseUp(event) {
2282
2254
  try {
2283
2255
  var _svg$current$getScree2;
2284
2256
 
2285
- function _temp5() {
2257
+ var _temp6 = function _temp6() {
2286
2258
  if (!operationSuccess) {
2287
2259
  setFailedTask(originalSelectedTask);
2288
2260
  }
2289
- }
2261
+ };
2290
2262
 
2291
- const {
2292
- action,
2293
- originalSelectedTask,
2294
- changedTask,
2295
- type
2296
- } = ganttEvent;
2263
+ var action = ganttEvent.action,
2264
+ originalSelectedTask = ganttEvent.originalSelectedTask,
2265
+ changedTask = ganttEvent.changedTask,
2266
+ type = ganttEvent.type;
2297
2267
  if (!changedTask || !point || !(svg !== null && svg !== void 0 && svg.current) || !originalSelectedTask) return Promise.resolve();
2298
2268
  event.preventDefault();
2299
2269
  point.x = event.clientX;
2300
- 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());
2301
- const {
2302
- changedTask: newChangedTask
2303
- } = handleTaskBySVGMouseEvent(cursor.x, action, changedTask, type, xStep, timeStep, initEventX1Delta, rtl);
2304
- const isNotLikeOriginal = originalSelectedTask.start !== newChangedTask.start || originalSelectedTask.end !== newChangedTask.end || originalSelectedTask.actualStart !== newChangedTask.actualStart || originalSelectedTask.actualEnd !== newChangedTask.actualEnd || originalSelectedTask.progress !== newChangedTask.progress;
2270
+ 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());
2271
+
2272
+ var _handleTaskBySVGMouse2 = handleTaskBySVGMouseEvent(cursor.x, action, changedTask, type, xStep, timeStep, initEventX1Delta, rtl),
2273
+ newChangedTask = _handleTaskBySVGMouse2.changedTask;
2274
+
2275
+ var isNotLikeOriginal = originalSelectedTask.start !== newChangedTask.start || originalSelectedTask.end !== newChangedTask.end || originalSelectedTask.actualStart !== newChangedTask.actualStart || originalSelectedTask.actualEnd !== newChangedTask.actualEnd || originalSelectedTask.progress !== newChangedTask.progress;
2305
2276
  svg.current.removeEventListener("mousemove", handleMouseMove);
2306
2277
  svg.current.removeEventListener("mouseup", handleMouseUp);
2307
2278
  setGanttEvent({
2308
2279
  action: ""
2309
2280
  });
2310
2281
  setIsMoving(false);
2311
- let operationSuccess = true;
2282
+ var operationSuccess = true;
2312
2283
 
2313
- const _temp4 = function () {
2284
+ var _temp7 = function () {
2314
2285
  if ((action === "move" || action === "end" || action === "start") && onDateChange && isNotLikeOriginal) {
2315
- const _temp = _catch(function () {
2286
+ var _temp8 = _catch(function () {
2316
2287
  return Promise.resolve(onDateChange(newChangedTask, newChangedTask.barChildren)).then(function (result) {
2317
2288
  if (result !== undefined) {
2318
2289
  operationSuccess = result;
@@ -2322,11 +2293,11 @@ const TaskGanttContent = _ref => {
2322
2293
  operationSuccess = false;
2323
2294
  });
2324
2295
 
2325
- if (_temp && _temp.then) return _temp.then(function () {});
2296
+ if (_temp8 && _temp8.then) return _temp8.then(function () {});
2326
2297
  } else {
2327
- const _temp3 = function () {
2298
+ var _temp9 = function () {
2328
2299
  if (onProgressChange && isNotLikeOriginal) {
2329
- const _temp2 = _catch(function () {
2300
+ var _temp10 = _catch(function () {
2330
2301
  return Promise.resolve(onProgressChange(newChangedTask, newChangedTask.barChildren)).then(function (result) {
2331
2302
  if (result !== undefined) {
2332
2303
  operationSuccess = result;
@@ -2336,15 +2307,15 @@ const TaskGanttContent = _ref => {
2336
2307
  operationSuccess = false;
2337
2308
  });
2338
2309
 
2339
- if (_temp2 && _temp2.then) return _temp2.then(function () {});
2310
+ if (_temp10 && _temp10.then) return _temp10.then(function () {});
2340
2311
  }
2341
2312
  }();
2342
2313
 
2343
- if (_temp3 && _temp3.then) return _temp3.then(function () {});
2314
+ if (_temp9 && _temp9.then) return _temp9.then(function () {});
2344
2315
  }
2345
2316
  }();
2346
2317
 
2347
- return Promise.resolve(_temp4 && _temp4.then ? _temp4.then(_temp5) : _temp5(_temp4));
2318
+ return Promise.resolve(_temp7 && _temp7.then ? _temp7.then(_temp6) : _temp6(_temp7));
2348
2319
  } catch (e) {
2349
2320
  return Promise.reject(e);
2350
2321
  }
@@ -2357,7 +2328,7 @@ const TaskGanttContent = _ref => {
2357
2328
  }
2358
2329
  }, [ganttEvent, xStep, initEventX1Delta, onProgressChange, timeStep, onDateChange, svg, isMoving, point, rtl, setFailedTask, setGanttEvent]);
2359
2330
 
2360
- const handleBarEventStart = function (action, task, event, type) {
2331
+ var handleBarEventStart = function handleBarEventStart(action, task, event, type) {
2361
2332
  try {
2362
2333
  return Promise.resolve(function () {
2363
2334
  if (!event) {
@@ -2366,15 +2337,15 @@ const TaskGanttContent = _ref => {
2366
2337
  }
2367
2338
  } else return function () {
2368
2339
  if (isKeyboardEvent(event)) {
2369
- const _temp8 = function () {
2340
+ var _temp14 = function () {
2370
2341
  if (action === "delete") {
2371
- const _temp7 = function () {
2342
+ var _temp15 = function () {
2372
2343
  if (onDelete) {
2373
- const _temp6 = _catch(function () {
2344
+ var _temp16 = _catch(function () {
2374
2345
  return Promise.resolve(onDelete(task)).then(function (result) {
2375
2346
  if (result !== undefined && result) {
2376
2347
  setGanttEvent({
2377
- action,
2348
+ action: action,
2378
2349
  changedTask: task
2379
2350
  });
2380
2351
  }
@@ -2383,19 +2354,19 @@ const TaskGanttContent = _ref => {
2383
2354
  console.error("Error on Delete. " + error);
2384
2355
  });
2385
2356
 
2386
- if (_temp6 && _temp6.then) return _temp6.then(function () {});
2357
+ if (_temp16 && _temp16.then) return _temp16.then(function () {});
2387
2358
  }
2388
2359
  }();
2389
2360
 
2390
- if (_temp7 && _temp7.then) return _temp7.then(function () {});
2361
+ if (_temp15 && _temp15.then) return _temp15.then(function () {});
2391
2362
  }
2392
2363
  }();
2393
2364
 
2394
- if (_temp8 && _temp8.then) return _temp8.then(function () {});
2365
+ if (_temp14 && _temp14.then) return _temp14.then(function () {});
2395
2366
  } else if (action === "mouseenter") {
2396
2367
  if (!ganttEvent.action) {
2397
2368
  setGanttEvent({
2398
- action,
2369
+ action: action,
2399
2370
  changedTask: task,
2400
2371
  originalSelectedTask: task,
2401
2372
  type: type
@@ -2416,17 +2387,17 @@ const TaskGanttContent = _ref => {
2416
2387
 
2417
2388
  if (!(svg !== null && svg !== void 0 && svg.current) || !point) return;
2418
2389
  point.x = event.clientX;
2419
- const cursor = point.matrixTransform((_svg$current$getScree3 = svg.current.getScreenCTM()) === null || _svg$current$getScree3 === void 0 ? void 0 : _svg$current$getScree3.inverse());
2390
+ var cursor = point.matrixTransform((_svg$current$getScree3 = svg.current.getScreenCTM()) === null || _svg$current$getScree3 === void 0 ? void 0 : _svg$current$getScree3.inverse());
2420
2391
  if (type == "planned") setInitEventX1Delta(cursor.x - task.x1);else if (type == "actual") setInitEventX1Delta(cursor.x - task.actualx1);
2421
2392
  setGanttEvent({
2422
- action,
2393
+ action: action,
2423
2394
  changedTask: task,
2424
2395
  originalSelectedTask: task,
2425
2396
  type: type
2426
2397
  });
2427
2398
  } else {
2428
2399
  setGanttEvent({
2429
- action,
2400
+ action: action,
2430
2401
  changedTask: task,
2431
2402
  originalSelectedTask: task,
2432
2403
  type: type
@@ -2443,8 +2414,8 @@ const TaskGanttContent = _ref => {
2443
2414
  className: "content"
2444
2415
  }, React.createElement("g", {
2445
2416
  className: "arrows"
2446
- }, tasks.map(_task => {
2447
- const task = _task.start.getTime() > 0 && _task.end.getTime() > 0 ? _task : undefined;
2417
+ }, tasks.map(function (_task) {
2418
+ var task = _task.start.getTime() > 0 && _task.end.getTime() > 0 ? _task : undefined;
2448
2419
 
2449
2420
  if (!task) {
2450
2421
  return React.createElement("g", {
@@ -2455,18 +2426,20 @@ const TaskGanttContent = _ref => {
2455
2426
  });
2456
2427
  }
2457
2428
 
2458
- return task.barChildren.map(child => {
2429
+ return task.barChildren.map(function (child) {
2459
2430
  var _task$criticalPathArr, _task$criticalPathArr2;
2460
2431
 
2461
2432
  if (task.x2 > task.x1 || task.actualx2 > task.actualx1) return React.createElement(Arrow, {
2462
- key: `Arrow from ${task.id} to ${tasks[child.index].id}`,
2433
+ key: "Arrow from " + task.id + " to " + tasks[child.index].id,
2463
2434
  taskFrom: task,
2464
2435
  taskTo: tasks[child.index],
2465
2436
  rowHeight: rowHeight,
2466
2437
  taskHeight: taskHeight,
2467
2438
  arrowIndent: arrowIndent,
2468
2439
  rtl: rtl,
2469
- 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"
2440
+ arrowColor: ((_task$criticalPathArr = task.criticalPathArrows) === null || _task$criticalPathArr === void 0 ? void 0 : (_task$criticalPathArr2 = _task$criticalPathArr.find(function (arrow) {
2441
+ return arrow.taskId == tasks[child.index].id;
2442
+ })) === null || _task$criticalPathArr2 === void 0 ? void 0 : _task$criticalPathArr2.arrowColor) || "#808080"
2470
2443
  });else return React.createElement("g", {
2471
2444
  key: _task.id,
2472
2445
  style: {
@@ -2478,8 +2451,8 @@ const TaskGanttContent = _ref => {
2478
2451
  className: "bar",
2479
2452
  fontFamily: fontFamily,
2480
2453
  fontSize: fontSize
2481
- }, tasks.map(_task => {
2482
- const task = _task.start.getTime() > 0 && _task.end.getTime() > 0 ? _task : undefined;
2454
+ }, tasks.map(function (_task) {
2455
+ var task = _task.start.getTime() > 0 && _task.end.getTime() > 0 ? _task : undefined;
2483
2456
 
2484
2457
  if (!task) {
2485
2458
  return React.createElement("g", {
@@ -2671,7 +2644,6 @@ var Gantt = function Gantt(_ref) {
2671
2644
  onDelete = _ref.onDelete,
2672
2645
  onSelect = _ref.onSelect,
2673
2646
  onExpanderClick = _ref.onExpanderClick,
2674
- onMultiSelect = _ref.onMultiSelect,
2675
2647
  taskLabelRenderer = _ref.taskLabelRenderer;
2676
2648
  var wrapperRef = useRef(null);
2677
2649
  var taskListRef = useRef(null);
@@ -2798,8 +2770,12 @@ var Gantt = function Gantt(_ref) {
2798
2770
  secondaryPath = _getCriticalPaths[1];
2799
2771
 
2800
2772
  uncolorAll(tasks);
2801
- colorPath(secondaryPath, "#00ff00", tasks);
2802
- colorPath(primaryPath, "#ff0000", tasks);
2773
+
2774
+ if (scheduleType !== "lookAhead") {
2775
+ colorPath(secondaryPath, "#00ff00", tasks);
2776
+ colorPath(primaryPath, "#ff0000", tasks);
2777
+ }
2778
+
2803
2779
  setBarTasks(convertToBarTasks(filteredTasks, newDates, columnWidth, rowHeight, taskHeight, barCornerRadius, handleWidth, rtl, barProgressColor, barProgressSelectedColor, barBackgroundColor, barBackgroundSelectedColor, projectProgressColor, projectProgressSelectedColor, projectBackgroundColor, projectBackgroundSelectedColor, milestoneBackgroundColor, milestoneBackgroundSelectedColor));
2804
2780
  }, [tasks, viewMode, preStepsCount, rowHeight, barCornerRadius, columnWidth, taskHeight, handleWidth, barProgressColor, barProgressSelectedColor, barBackgroundColor, barBackgroundSelectedColor, projectProgressColor, projectProgressSelectedColor, projectBackgroundColor, projectBackgroundSelectedColor, milestoneBackgroundColor, milestoneBackgroundSelectedColor, rtl, scrollX, onExpanderClick]);
2805
2781
  useEffect(function () {
@@ -3079,8 +3055,7 @@ var Gantt = function Gantt(_ref) {
3079
3055
  onDoubleClick: onDoubleClick,
3080
3056
  TaskListHeader: TaskListHeader,
3081
3057
  TaskListTable: TaskListTable,
3082
- taskLabelRenderer: taskLabelRenderer,
3083
- onMultiSelect: onMultiSelect
3058
+ taskLabelRenderer: taskLabelRenderer
3084
3059
  };
3085
3060
  return React.createElement("div", null, React.createElement("div", {
3086
3061
  className: styles$9.wrapper,