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