gantt-task-react-powern 0.4.64 → 0.4.66

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,10 +21,6 @@ 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
-
28
24
  function _unsupportedIterableToArray(o, minLen) {
29
25
  if (!o) return;
30
26
  if (typeof o === "string") return _arrayLikeToArray(o, minLen);
@@ -285,7 +281,9 @@ var TaskListHeaderDefault = function TaskListHeaderDefault(_ref) {
285
281
  var headerHeight = _ref.headerHeight,
286
282
  fontFamily = _ref.fontFamily,
287
283
  fontSize = _ref.fontSize,
288
- rowWidth = _ref.rowWidth;
284
+ rowWidth = _ref.rowWidth,
285
+ allSelected = _ref.allSelected,
286
+ onSelectAll = _ref.onSelectAll;
289
287
  return React__default.createElement("div", {
290
288
  className: styles.ganttTable,
291
289
  style: {
@@ -297,7 +295,19 @@ var TaskListHeaderDefault = function TaskListHeaderDefault(_ref) {
297
295
  style: {
298
296
  height: headerHeight - 2
299
297
  }
300
- }, React__default.createElement("div", {
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", {
301
311
  className: styles.ganttTable_HeaderItem,
302
312
  style: {
303
313
  minWidth: parseInt(rowWidth) * 0.8,
@@ -376,6 +386,9 @@ var TaskListTableDefault = function TaskListTableDefault(_ref) {
376
386
  fontSize = _ref.fontSize,
377
387
  locale = _ref.locale,
378
388
  onExpanderClick = _ref.onExpanderClick,
389
+ _ref$selectedTasks = _ref.selectedTasks,
390
+ selectedTasks = _ref$selectedTasks === void 0 ? [] : _ref$selectedTasks,
391
+ onTaskSelect = _ref.onTaskSelect,
379
392
  _ref$taskLabelRendere = _ref.taskLabelRenderer,
380
393
  taskLabelRenderer = _ref$taskLabelRendere === void 0 ? function (t) {
381
394
  return " " + t.name;
@@ -405,13 +418,36 @@ var TaskListTableDefault = function TaskListTableDefault(_ref) {
405
418
  }
406
419
  }
407
420
 
421
+ var isSelected = selectedTasks.includes(t.id);
408
422
  return React__default.createElement("div", {
409
423
  className: t.type === "milestone" ? styles$1.taskListMilestoneRow : scheduleType === "lookAhead" ? styles$1.taskListLookAheadRow : styles$1.taskListTableRow,
410
424
  style: {
411
425
  height: rowHeight
412
426
  },
413
427
  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
+ }
414
434
  }, 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", {
415
451
  className: styles$1.taskListCell,
416
452
  style: {
417
453
  minWidth: parseInt(rowWidth) * 0.8,
@@ -641,18 +677,61 @@ var TaskList = function TaskList(_ref) {
641
677
  horizontalContainerClass = _ref.horizontalContainerClass,
642
678
  TaskListHeader = _ref.TaskListHeader,
643
679
  TaskListTable = _ref.TaskListTable,
644
- taskLabelRenderer = _ref.taskLabelRenderer;
680
+ taskLabelRenderer = _ref.taskLabelRenderer,
681
+ onMultiSelect = _ref.onMultiSelect;
645
682
  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([]);
646
689
  React.useEffect(function () {
647
690
  if (horizontalContainerRef.current) {
648
691
  horizontalContainerRef.current.scrollTop = scrollY;
649
692
  }
650
693
  }, [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
+
651
728
  var headerProps = {
652
729
  headerHeight: headerHeight,
653
730
  fontFamily: fontFamily,
654
731
  fontSize: fontSize,
655
- rowWidth: rowWidth
732
+ rowWidth: rowWidth,
733
+ allSelected: tasks.length > 0 && selectedTasks.length === tasks.length,
734
+ onSelectAll: onMultiSelect ? handleSelectAll : undefined
656
735
  };
657
736
  var selectedTaskId = selectedTask ? selectedTask.id : "";
658
737
  var tableProps = {
@@ -667,6 +746,8 @@ var TaskList = function TaskList(_ref) {
667
746
  selectedTaskId: selectedTaskId,
668
747
  setSelectedTask: setSelectedTask,
669
748
  onExpanderClick: onExpanderClick,
749
+ selectedTasks: onMultiSelect ? selectedTasks : undefined,
750
+ onTaskSelect: onMultiSelect ? handleTaskSelect : undefined,
670
751
  taskLabelRenderer: taskLabelRenderer
671
752
  };
672
753
  return React__default.createElement("div", {
@@ -682,19 +763,21 @@ var TaskList = function TaskList(_ref) {
682
763
 
683
764
  var styles$4 = {"gridRow":"_2dZTy","gridRowLookAhead":"_2RRca","gridRowLine":"_3rUKi","gridTick":"_RuwuK","darkerGridRow":"_2M-tt"};
684
765
 
685
- var GridBody = function GridBody(_ref) {
686
- var tasks = _ref.tasks,
687
- scheduleType = _ref.scheduleType,
688
- dates = _ref.dates,
689
- rowHeight = _ref.rowHeight,
690
- svgWidth = _ref.svgWidth,
691
- columnWidth = _ref.columnWidth,
692
- todayColor = _ref.todayColor,
693
- weekendColor = _ref.weekendColor,
694
- rtl = _ref.rtl;
695
- var y = 0;
696
- var gridRows = [];
697
- var rowLines = [React__default.createElement("line", {
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", {
698
781
  key: "RowLineFirst",
699
782
  x: "0",
700
783
  y1: 0,
@@ -703,9 +786,8 @@ var GridBody = function GridBody(_ref) {
703
786
  className: styles$4.gridRowLine
704
787
  })];
705
788
 
706
- for (var _iterator = _createForOfIteratorHelperLoose(tasks), _step; !(_step = _iterator()).done;) {
707
- var task = _step.value;
708
- var isDarkerRow = task.type === "milestone";
789
+ for (const task of tasks) {
790
+ const isDarkerRow = task.type === "milestone";
709
791
  gridRows.push(React__default.createElement("rect", {
710
792
  key: "Row" + task.id,
711
793
  x: "0",
@@ -725,14 +807,14 @@ var GridBody = function GridBody(_ref) {
725
807
  y += rowHeight;
726
808
  }
727
809
 
728
- var now = new Date();
729
- var tickX = 0;
730
- var ticks = [];
731
- var today = React__default.createElement("rect", null);
732
- var weekend = [];
810
+ const now = new Date();
811
+ let tickX = 0;
812
+ const ticks = [];
813
+ let today = React__default.createElement("rect", null);
814
+ let weekend = [];
733
815
 
734
- for (var i = 0; i < dates.length; i++) {
735
- var date = dates[i];
816
+ for (let i = 0; i < dates.length; i++) {
817
+ const date = dates[i];
736
818
  ticks.push(React__default.createElement("line", {
737
819
  key: date.getTime(),
738
820
  x1: tickX,
@@ -790,7 +872,7 @@ var GridBody = function GridBody(_ref) {
790
872
  }, today));
791
873
  };
792
874
 
793
- var Grid = function Grid(props) {
875
+ const Grid = props => {
794
876
  return React__default.createElement("g", {
795
877
  className: "grid"
796
878
  }, React__default.createElement(GridBody, Object.assign({}, props)));
@@ -798,16 +880,17 @@ var Grid = function Grid(props) {
798
880
 
799
881
  var styles$5 = {"calendarBottomText":"_9w8d5","calendarTopTick":"_1rLuZ","calendarTopText":"_2q1Kt","calendarHeader":"_35nLX","textAnchorStart":"_2Shd-","textAnchorMiddle":"_2XXW4","textAnchorEnd":"_3GdnC"};
800
882
 
801
- var TopPartOfCalendar = function TopPartOfCalendar(_ref) {
802
- var value = _ref.value,
803
- x1Line = _ref.x1Line,
804
- y1Line = _ref.y1Line,
805
- y2Line = _ref.y2Line,
806
- xText = _ref.xText,
807
- yText = _ref.yText,
808
- _ref$textAnchor = _ref.textAnchor,
809
- textAnchor = _ref$textAnchor === void 0 ? "middle" : _ref$textAnchor;
810
- var textAnchorClass = textAnchor === "start" ? styles$5.textAnchorStart : textAnchor === "middle" ? styles$5.textAnchorMiddle : styles$5.textAnchorEnd;
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;
811
894
  return React__default.createElement("g", {
812
895
  className: "calendarTop"
813
896
  }, React__default.createElement("line", {
@@ -821,28 +904,30 @@ var TopPartOfCalendar = function TopPartOfCalendar(_ref) {
821
904
  key: value + "text",
822
905
  y: yText,
823
906
  x: xText,
824
- className: styles$5.calendarTopText + " " + textAnchorClass
907
+ className: `${styles$5.calendarTopText} ${textAnchorClass}`
825
908
  }, value));
826
909
  };
827
910
 
828
- var Calendar = function Calendar(_ref) {
829
- var dateSetup = _ref.dateSetup,
830
- locale = _ref.locale,
831
- viewMode = _ref.viewMode,
832
- rtl = _ref.rtl,
833
- headerHeight = _ref.headerHeight,
834
- columnWidth = _ref.columnWidth,
835
- fontFamily = _ref.fontFamily,
836
- fontSize = _ref.fontSize;
837
-
838
- var getCalendarValuesForYear = function getCalendarValuesForYear() {
839
- var topValues = [];
840
- var bottomValues = [];
841
- var topDefaultHeight = headerHeight * 0.5;
842
-
843
- for (var i = 0; i < dateSetup.dates.length; i++) {
844
- var date = dateSetup.dates[i];
845
- var bottomValue = date.getFullYear();
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();
846
931
  bottomValues.push(React__default.createElement("text", {
847
932
  key: date.getFullYear(),
848
933
  y: headerHeight * 0.8,
@@ -851,8 +936,8 @@ var Calendar = function Calendar(_ref) {
851
936
  }, bottomValue));
852
937
 
853
938
  if (i === 0 || date.getFullYear() !== dateSetup.dates[i - 1].getFullYear()) {
854
- var topValue = date.getFullYear().toString();
855
- var xText = void 0;
939
+ const topValue = date.getFullYear().toString();
940
+ let xText;
856
941
 
857
942
  if (rtl) {
858
943
  xText = (6 + i + date.getFullYear() + 1) * columnWidth;
@@ -875,25 +960,25 @@ var Calendar = function Calendar(_ref) {
875
960
  return [topValues, bottomValues];
876
961
  };
877
962
 
878
- var getCalendarValuesForQuarter = function getCalendarValuesForQuarter() {
879
- var topValues = [];
880
- var bottomValues = [];
881
- var topDefaultHeight = headerHeight * 0.5;
963
+ const getCalendarValuesForQuarter = () => {
964
+ const topValues = [];
965
+ const bottomValues = [];
966
+ const topDefaultHeight = headerHeight * 0.5;
882
967
 
883
- for (var i = 0; i < dateSetup.dates.length; i++) {
884
- var date = dateSetup.dates[i];
885
- var quarter = Math.floor(date.getMonth() / 3) + 1;
886
- var bottomValue = "Q" + quarter;
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}`;
887
972
  bottomValues.push(React__default.createElement("text", {
888
- key: bottomValue + "-" + date.getFullYear(),
973
+ key: `${bottomValue}-${date.getFullYear()}`,
889
974
  y: headerHeight * 0.8,
890
975
  x: columnWidth * i + columnWidth * 0.5,
891
976
  className: styles$5.calendarBottomText
892
977
  }, bottomValue));
893
978
 
894
979
  if (i === 0 || date.getFullYear() !== dateSetup.dates[i - 1].getFullYear()) {
895
- var topValue = date.getFullYear().toString();
896
- var xText = void 0;
980
+ const topValue = date.getFullYear().toString();
981
+ let xText;
897
982
 
898
983
  if (rtl) {
899
984
  xText = (3 + i + quarter) * columnWidth;
@@ -916,26 +1001,26 @@ var Calendar = function Calendar(_ref) {
916
1001
  return [topValues, bottomValues];
917
1002
  };
918
1003
 
919
- var getCalendarValuesForMonth = function getCalendarValuesForMonth() {
920
- var topValues = [];
921
- var bottomValues = [];
922
- var topDefaultHeight = headerHeight * 0.5;
1004
+ const getCalendarValuesForMonth = () => {
1005
+ const topValues = [];
1006
+ const bottomValues = [];
1007
+ const topDefaultHeight = headerHeight * 0.5;
923
1008
 
924
- for (var i = 0; i < dateSetup.dates.length; i++) {
925
- var date = dateSetup.dates[i];
926
- var bottomValue = date.toLocaleString(locale, {
1009
+ for (let i = 0; i < dateSetup.dates.length; i++) {
1010
+ const date = dateSetup.dates[i];
1011
+ const bottomValue = date.toLocaleString(locale, {
927
1012
  month: "short"
928
1013
  });
929
1014
  bottomValues.push(React__default.createElement("text", {
930
1015
  key: bottomValue + date.getFullYear(),
931
1016
  y: headerHeight * 0.8,
932
1017
  x: columnWidth * i + columnWidth * 0.5,
933
- className: styles$5.calendarTopText + " " + styles$5.textAnchorEnd
1018
+ className: `${styles$5.calendarTopText} ${styles$5.textAnchorEnd}`
934
1019
  }, bottomValue));
935
1020
 
936
1021
  if (i === 0 || date.getFullYear() !== dateSetup.dates[i - 1].getFullYear()) {
937
- var topValue = date.getFullYear().toString();
938
- var xText = void 0;
1022
+ const topValue = date.getFullYear().toString();
1023
+ let xText;
939
1024
 
940
1025
  if (rtl) {
941
1026
  xText = (6 + i + date.getMonth() + 1) * columnWidth;
@@ -960,27 +1045,27 @@ var Calendar = function Calendar(_ref) {
960
1045
  return [topValues, bottomValues];
961
1046
  };
962
1047
 
963
- var getCalendarValuesForWeek = function getCalendarValuesForWeek() {
964
- var topValues = [];
965
- var bottomValues = [];
966
- var weeksCount = 1;
967
- var topDefaultHeight = headerHeight * 0.5;
968
- var dates = dateSetup.dates;
1048
+ const getCalendarValuesForWeek = () => {
1049
+ const topValues = [];
1050
+ const bottomValues = [];
1051
+ let weeksCount = 1;
1052
+ const topDefaultHeight = headerHeight * 0.5;
1053
+ const dates = dateSetup.dates;
969
1054
 
970
- for (var i = dates.length - 1; i >= 0; i--) {
971
- var date = dates[i];
972
- var topValue = "";
1055
+ for (let i = dates.length - 1; i >= 0; i--) {
1056
+ const date = dates[i];
1057
+ let topValue = "";
973
1058
 
974
1059
  if (i === 0 || date.getMonth() !== dates[i - 1].getMonth()) {
975
- topValue = getLocaleMonth(date, locale) + ", " + date.getFullYear();
1060
+ topValue = `${getLocaleMonth(date, locale)}, ${date.getFullYear()}`;
976
1061
  }
977
1062
 
978
- var bottomValue = "W" + getWeekNumberISO8601(date);
1063
+ const bottomValue = `W${getWeekNumberISO8601(date)}`;
979
1064
  bottomValues.push(React__default.createElement("text", {
980
1065
  key: date.getTime(),
981
1066
  y: headerHeight * 0.8,
982
1067
  x: columnWidth * (i + +rtl),
983
- className: styles$5.calendarTopText + " " + styles$5.textAnchorStart
1068
+ className: `${styles$5.calendarTopText} ${styles$5.textAnchorStart}`
984
1069
  }, bottomValue));
985
1070
 
986
1071
  if (topValue) {
@@ -1006,24 +1091,24 @@ var Calendar = function Calendar(_ref) {
1006
1091
  return [topValues, bottomValues];
1007
1092
  };
1008
1093
 
1009
- var getCalendarValuesForDay = function getCalendarValuesForDay() {
1010
- var topValues = [];
1011
- var bottomValues = [];
1012
- var topDefaultHeight = headerHeight * 0.5;
1013
- var dates = dateSetup.dates;
1094
+ const getCalendarValuesForDay = () => {
1095
+ const topValues = [];
1096
+ const bottomValues = [];
1097
+ const topDefaultHeight = headerHeight * 0.5;
1098
+ const dates = dateSetup.dates;
1014
1099
 
1015
- for (var i = 0; i < dates.length; i++) {
1016
- var date = dates[i];
1017
- var bottomValue = getLocalDayOfWeek(date, locale, "short") + ", " + date.getDate().toString();
1100
+ for (let i = 0; i < dates.length; i++) {
1101
+ const date = dates[i];
1102
+ const bottomValue = `${getLocalDayOfWeek(date, locale, "short")}, ${date.getDate().toString()}`;
1018
1103
  bottomValues.push(React__default.createElement("text", {
1019
1104
  key: date.getTime(),
1020
1105
  y: headerHeight * 0.8,
1021
1106
  x: columnWidth * i + columnWidth * 0.5,
1022
- className: styles$5.calendarTopText + " " + styles$5.textAnchorMiddle
1107
+ className: `${styles$5.calendarTopText} ${styles$5.textAnchorMiddle}`
1023
1108
  }, bottomValue));
1024
1109
 
1025
1110
  if (i + 1 !== dates.length && date.getMonth() !== dates[i + 1].getMonth()) {
1026
- var topValue = getLocaleMonth(date, locale) + " " + date.getFullYear();
1111
+ const topValue = `${getLocaleMonth(date, locale)} ${date.getFullYear()}`;
1027
1112
  topValues.push(React__default.createElement(TopPartOfCalendar, {
1028
1113
  key: topValue + date.getFullYear(),
1029
1114
  value: topValue,
@@ -1039,28 +1124,28 @@ var Calendar = function Calendar(_ref) {
1039
1124
  return [topValues, bottomValues];
1040
1125
  };
1041
1126
 
1042
- var getCalendarValuesForPartOfDay = function getCalendarValuesForPartOfDay() {
1043
- var topValues = [];
1044
- var bottomValues = [];
1045
- var ticks = viewMode === exports.ViewMode.HalfDay ? 2 : 4;
1046
- var topDefaultHeight = headerHeight * 0.5;
1047
- var dates = dateSetup.dates;
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;
1048
1133
 
1049
- for (var i = 0; i < dates.length; i++) {
1050
- var date = dates[i];
1051
- var bottomValue = getCachedDateTimeFormat(locale, {
1134
+ for (let i = 0; i < dates.length; i++) {
1135
+ const date = dates[i];
1136
+ const bottomValue = getCachedDateTimeFormat(locale, {
1052
1137
  hour: "numeric"
1053
1138
  }).format(date);
1054
1139
  bottomValues.push(React__default.createElement("text", {
1055
1140
  key: date.getTime(),
1056
1141
  y: headerHeight * 0.8,
1057
1142
  x: columnWidth * (i + +rtl),
1058
- className: styles$5.calendarTopText + " " + styles$5.textAnchorMiddle,
1143
+ className: `${styles$5.calendarTopText} ${styles$5.textAnchorMiddle}`,
1059
1144
  fontFamily: fontFamily
1060
1145
  }, bottomValue));
1061
1146
 
1062
1147
  if (i === 0 || date.getDate() !== dates[i - 1].getDate()) {
1063
- var topValue = getLocalDayOfWeek(date, locale, "short") + ", " + date.getDate() + " " + getLocaleMonth(date, locale);
1148
+ const topValue = `${getLocalDayOfWeek(date, locale, "short")}, ${date.getDate()} ${getLocaleMonth(date, locale)}`;
1064
1149
  topValues.push(React__default.createElement(TopPartOfCalendar, {
1065
1150
  key: topValue + date.getFullYear(),
1066
1151
  value: topValue,
@@ -1076,15 +1161,15 @@ var Calendar = function Calendar(_ref) {
1076
1161
  return [topValues, bottomValues];
1077
1162
  };
1078
1163
 
1079
- var getCalendarValuesForHour = function getCalendarValuesForHour() {
1080
- var topValues = [];
1081
- var bottomValues = [];
1082
- var topDefaultHeight = headerHeight * 0.5;
1083
- var dates = dateSetup.dates;
1164
+ const getCalendarValuesForHour = () => {
1165
+ const topValues = [];
1166
+ const bottomValues = [];
1167
+ const topDefaultHeight = headerHeight * 0.5;
1168
+ const dates = dateSetup.dates;
1084
1169
 
1085
- for (var i = 0; i < dates.length; i++) {
1086
- var date = dates[i];
1087
- var bottomValue = getCachedDateTimeFormat(locale, {
1170
+ for (let i = 0; i < dates.length; i++) {
1171
+ const date = dates[i];
1172
+ const bottomValue = getCachedDateTimeFormat(locale, {
1088
1173
  hour: "numeric"
1089
1174
  }).format(date);
1090
1175
  bottomValues.push(React__default.createElement("text", {
@@ -1096,9 +1181,9 @@ var Calendar = function Calendar(_ref) {
1096
1181
  }, bottomValue));
1097
1182
 
1098
1183
  if (i !== 0 && date.getDate() !== dates[i - 1].getDate()) {
1099
- var displayDate = dates[i - 1];
1100
- var topValue = getLocalDayOfWeek(displayDate, locale, "long") + ", " + displayDate.getDate() + " " + getLocaleMonth(displayDate, locale);
1101
- var topPosition = (date.getHours() - 24) / 2;
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;
1102
1187
  topValues.push(React__default.createElement(TopPartOfCalendar, {
1103
1188
  key: topValue + displayDate.getFullYear(),
1104
1189
  value: topValue,
@@ -1114,58 +1199,37 @@ var Calendar = function Calendar(_ref) {
1114
1199
  return [topValues, bottomValues];
1115
1200
  };
1116
1201
 
1117
- var topValues = [];
1118
- var bottomValues = [];
1202
+ let topValues = [];
1203
+ let bottomValues = [];
1119
1204
 
1120
1205
  switch (dateSetup.viewMode) {
1121
1206
  case exports.ViewMode.Year:
1122
- var _getCalendarValuesFor = getCalendarValuesForYear();
1123
-
1124
- topValues = _getCalendarValuesFor[0];
1125
- bottomValues = _getCalendarValuesFor[1];
1207
+ [topValues, bottomValues] = getCalendarValuesForYear();
1126
1208
  break;
1127
1209
 
1128
1210
  case exports.ViewMode.Quarter:
1129
- var _getCalendarValuesFor2 = getCalendarValuesForQuarter();
1130
-
1131
- topValues = _getCalendarValuesFor2[0];
1132
- bottomValues = _getCalendarValuesFor2[1];
1211
+ [topValues, bottomValues] = getCalendarValuesForQuarter();
1133
1212
  break;
1134
1213
 
1135
1214
  case exports.ViewMode.Month:
1136
- var _getCalendarValuesFor3 = getCalendarValuesForMonth();
1137
-
1138
- topValues = _getCalendarValuesFor3[0];
1139
- bottomValues = _getCalendarValuesFor3[1];
1215
+ [topValues, bottomValues] = getCalendarValuesForMonth();
1140
1216
  break;
1141
1217
 
1142
1218
  case exports.ViewMode.Week:
1143
- var _getCalendarValuesFor4 = getCalendarValuesForWeek();
1144
-
1145
- topValues = _getCalendarValuesFor4[0];
1146
- bottomValues = _getCalendarValuesFor4[1];
1219
+ [topValues, bottomValues] = getCalendarValuesForWeek();
1147
1220
  break;
1148
1221
 
1149
1222
  case exports.ViewMode.Day:
1150
- var _getCalendarValuesFor5 = getCalendarValuesForDay();
1151
-
1152
- topValues = _getCalendarValuesFor5[0];
1153
- bottomValues = _getCalendarValuesFor5[1];
1223
+ [topValues, bottomValues] = getCalendarValuesForDay();
1154
1224
  break;
1155
1225
 
1156
1226
  case exports.ViewMode.QuarterDay:
1157
1227
  case exports.ViewMode.HalfDay:
1158
- var _getCalendarValuesFor6 = getCalendarValuesForPartOfDay();
1159
-
1160
- topValues = _getCalendarValuesFor6[0];
1161
- bottomValues = _getCalendarValuesFor6[1];
1228
+ [topValues, bottomValues] = getCalendarValuesForPartOfDay();
1162
1229
  break;
1163
1230
 
1164
1231
  case exports.ViewMode.Hour:
1165
- var _getCalendarValuesFor7 = getCalendarValuesForHour();
1166
-
1167
- topValues = _getCalendarValuesFor7[0];
1168
- bottomValues = _getCalendarValuesFor7[1];
1232
+ [topValues, bottomValues] = getCalendarValuesForHour();
1169
1233
  }
1170
1234
 
1171
1235
  return React__default.createElement("g", {
@@ -1201,27 +1265,23 @@ function _catch(body, recover) {
1201
1265
  return result;
1202
1266
  }
1203
1267
 
1204
- var Arrow = function Arrow(_ref) {
1205
- var taskFrom = _ref.taskFrom,
1206
- taskTo = _ref.taskTo,
1207
- rowHeight = _ref.rowHeight,
1208
- taskHeight = _ref.taskHeight,
1209
- arrowIndent = _ref.arrowIndent,
1210
- rtl = _ref.rtl,
1211
- arrowColor = _ref.arrowColor;
1212
- var path;
1213
- var trianglePoints;
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;
1214
1280
 
1215
1281
  if (rtl) {
1216
- var _drownPathAndTriangle = drownPathAndTriangleRTL(taskFrom, taskTo, rowHeight, taskHeight, arrowIndent);
1217
-
1218
- path = _drownPathAndTriangle[0];
1219
- trianglePoints = _drownPathAndTriangle[1];
1282
+ [path, trianglePoints] = drownPathAndTriangleRTL(taskFrom, taskTo, rowHeight, taskHeight, arrowIndent);
1220
1283
  } else {
1221
- var _drownPathAndTriangle2 = drownPathAndTriangle(taskFrom, taskTo, rowHeight, taskHeight, arrowIndent);
1222
-
1223
- path = _drownPathAndTriangle2[0];
1224
- trianglePoints = _drownPathAndTriangle2[1];
1284
+ [path, trianglePoints] = drownPathAndTriangle(taskFrom, taskTo, rowHeight, taskHeight, arrowIndent);
1225
1285
  }
1226
1286
 
1227
1287
  return React__default.createElement("g", {
@@ -1237,8 +1297,8 @@ var Arrow = function Arrow(_ref) {
1237
1297
  }));
1238
1298
  };
1239
1299
 
1240
- var drownPathAndTriangle = function drownPathAndTriangle(taskFrom, taskTo, rowHeight, taskHeight, arrowIndent) {
1241
- var taskToStart, taskFromEnd;
1300
+ const drownPathAndTriangle = (taskFrom, taskTo, rowHeight, taskHeight, arrowIndent) => {
1301
+ let taskToStart, taskFromEnd;
1242
1302
 
1243
1303
  if (taskTo.x1 > 0 && taskTo.actualx1 > 0) {
1244
1304
  taskToStart = Math.min(taskTo.x1, taskTo.actualx1);
@@ -1248,24 +1308,38 @@ var drownPathAndTriangle = function drownPathAndTriangle(taskFrom, taskTo, rowHe
1248
1308
  taskFromEnd = Math.max(taskFrom.x2, taskFrom.actualx2);
1249
1309
  } else if (taskFrom.x2 > 0) taskFromEnd = taskFrom.x2;else if (taskFrom.actualx2 > 0) taskFromEnd = taskFrom.actualx2;else taskFromEnd = 0;
1250
1310
 
1251
- var indexCompare = taskFrom.index > taskTo.index ? -1 : 1;
1252
- var taskToEndPosition = taskTo.y + taskHeight / 2;
1253
- var taskFromEndPosition = taskFromEnd + arrowIndent * 2;
1254
- var taskFromHorizontalOffsetValue = taskFromEndPosition < taskToStart ? "" : "H " + (taskToStart - arrowIndent);
1255
- var taskToHorizontalOffsetValue = taskFromEndPosition > taskToStart ? arrowIndent : taskToStart - taskFromEnd - arrowIndent;
1256
- var path = "M " + taskFromEnd + " " + (taskFrom.y + taskHeight / 2) + " \n h " + arrowIndent + " \n v " + indexCompare * rowHeight / 2 + " \n " + taskFromHorizontalOffsetValue + "\n V " + taskToEndPosition + " \n h " + taskToHorizontalOffsetValue;
1257
- var trianglePoints = taskToStart + "," + taskToEndPosition + " \n " + (taskToStart - 5) + "," + (taskToEndPosition - 5) + " \n " + (taskToStart - 5) + "," + (taskToEndPosition + 5);
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}`;
1258
1325
  return [path, trianglePoints];
1259
1326
  };
1260
1327
 
1261
- var drownPathAndTriangleRTL = function drownPathAndTriangleRTL(taskFrom, taskTo, rowHeight, taskHeight, arrowIndent) {
1262
- var indexCompare = taskFrom.index > taskTo.index ? -1 : 1;
1263
- var taskToEndPosition = taskTo.y + taskHeight / 2;
1264
- var taskFromEndPosition = taskFrom.x1 - arrowIndent * 2;
1265
- var taskFromHorizontalOffsetValue = taskFromEndPosition > taskTo.x2 ? "" : "H " + (taskTo.x2 + arrowIndent);
1266
- var taskToHorizontalOffsetValue = taskFromEndPosition < taskTo.x2 ? -arrowIndent : taskTo.x2 - taskFrom.x1 + arrowIndent;
1267
- 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;
1268
- var trianglePoints = taskTo.x2 + "," + taskToEndPosition + " \n " + (taskTo.x2 + 5) + "," + (taskToEndPosition + 5) + " \n " + (taskTo.x2 + 5) + "," + (taskToEndPosition - 5);
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}`;
1269
1343
  return [path, trianglePoints];
1270
1344
  };
1271
1345
 
@@ -1715,24 +1789,26 @@ var sortTasks = function sortTasks(taskA, taskB) {
1715
1789
  }
1716
1790
  };
1717
1791
 
1718
- var BarDisplay = function BarDisplay(_ref) {
1719
- var x = _ref.x,
1720
- y = _ref.y,
1721
- type = _ref.type,
1722
- width = _ref.width,
1723
- height = _ref.height,
1724
- isSelected = _ref.isSelected,
1725
- progressX = _ref.progressX,
1726
- progressWidth = _ref.progressWidth,
1727
- barCornerRadius = _ref.barCornerRadius,
1728
- styles = _ref.styles,
1729
- onMouseDown = _ref.onMouseDown;
1730
-
1731
- var getProcessColor = function getProcessColor() {
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 = () => {
1732
1808
  return isSelected ? styles.progressSelectedColor : styles.progressColor;
1733
1809
  };
1734
1810
 
1735
- var getBarColor = function getBarColor() {
1811
+ const getBarColor = () => {
1736
1812
  return isSelected ? styles.backgroundSelectedColor : styles.backgroundColor;
1737
1813
  };
1738
1814
 
@@ -1779,13 +1855,15 @@ var BarDisplay = function BarDisplay(_ref) {
1779
1855
 
1780
1856
  var styles$6 = {"barWrapper":"_KxSXS","barHandle":"_3w_5u","barBackground":"_31ERP"};
1781
1857
 
1782
- var BarDateHandle = function BarDateHandle(_ref) {
1783
- var x = _ref.x,
1784
- y = _ref.y,
1785
- width = _ref.width,
1786
- height = _ref.height,
1787
- barCornerRadius = _ref.barCornerRadius,
1788
- onMouseDown = _ref.onMouseDown;
1858
+ const BarDateHandle = _ref => {
1859
+ let {
1860
+ x,
1861
+ y,
1862
+ width,
1863
+ height,
1864
+ barCornerRadius,
1865
+ onMouseDown
1866
+ } = _ref;
1789
1867
  return React__default.createElement("rect", {
1790
1868
  x: x,
1791
1869
  y: y,
@@ -1798,22 +1876,22 @@ var BarDateHandle = function BarDateHandle(_ref) {
1798
1876
  });
1799
1877
  };
1800
1878
 
1801
- var BarProgressHandle = function BarProgressHandle(_ref) {
1802
- _objectDestructuringEmpty(_ref);
1803
-
1879
+ const BarProgressHandle = _ref => {
1804
1880
  return React__default.createElement("div", null);
1805
1881
  };
1806
1882
 
1807
- var Bar = function Bar(_ref) {
1808
- var task = _ref.task,
1809
- isProgressChangeable = _ref.isProgressChangeable,
1810
- isDateChangeable = _ref.isDateChangeable,
1811
- rtl = _ref.rtl,
1812
- type = _ref.type,
1813
- onEventStart = _ref.onEventStart,
1814
- isSelected = _ref.isSelected;
1815
- var progressPoint = getProgressPoint(+!rtl * task.progressWidth + task.progressX, task.y, task.height);
1816
- var handleHeight = task.height / 2 - 1;
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;
1817
1895
 
1818
1896
  if (type == "planned") {
1819
1897
  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", {
@@ -1832,7 +1910,7 @@ var Bar = function Bar(_ref) {
1832
1910
  barCornerRadius: task.barCornerRadius,
1833
1911
  styles: task.styles,
1834
1912
  isSelected: isSelected,
1835
- onMouseDown: function onMouseDown(e) {
1913
+ onMouseDown: e => {
1836
1914
  isDateChangeable && onEventStart("move", task, e, "planned");
1837
1915
  }
1838
1916
  }), React__default.createElement("g", {
@@ -1843,7 +1921,7 @@ var Bar = function Bar(_ref) {
1843
1921
  width: task.handleWidth,
1844
1922
  height: handleHeight,
1845
1923
  barCornerRadius: task.barCornerRadius,
1846
- onMouseDown: function onMouseDown(e) {
1924
+ onMouseDown: e => {
1847
1925
  onEventStart("start", task, e, "planned");
1848
1926
  }
1849
1927
  }), React__default.createElement(BarDateHandle, {
@@ -1852,12 +1930,12 @@ var Bar = function Bar(_ref) {
1852
1930
  width: task.handleWidth,
1853
1931
  height: handleHeight,
1854
1932
  barCornerRadius: task.barCornerRadius,
1855
- onMouseDown: function onMouseDown(e) {
1933
+ onMouseDown: e => {
1856
1934
  onEventStart("end", task, e, "planned");
1857
1935
  }
1858
1936
  })), isProgressChangeable && React__default.createElement(BarProgressHandle, {
1859
1937
  progressPoint: progressPoint,
1860
- onMouseDown: function onMouseDown(e) {
1938
+ onMouseDown: e => {
1861
1939
  onEventStart("progress", task, e, "planned");
1862
1940
  }
1863
1941
  })));else return React__default.createElement("g", {
@@ -1881,7 +1959,7 @@ var Bar = function Bar(_ref) {
1881
1959
  barCornerRadius: task.barCornerRadius,
1882
1960
  styles: task.styles,
1883
1961
  isSelected: isSelected,
1884
- onMouseDown: function onMouseDown(e) {
1962
+ onMouseDown: e => {
1885
1963
  isDateChangeable && onEventStart("move", task, e, "actual");
1886
1964
  }
1887
1965
  }), React__default.createElement("g", {
@@ -1892,7 +1970,7 @@ var Bar = function Bar(_ref) {
1892
1970
  width: task.handleWidth,
1893
1971
  height: handleHeight,
1894
1972
  barCornerRadius: task.barCornerRadius,
1895
- onMouseDown: function onMouseDown(e) {
1973
+ onMouseDown: e => {
1896
1974
  onEventStart("start", task, e, "actual");
1897
1975
  }
1898
1976
  }), React__default.createElement(BarDateHandle, {
@@ -1901,12 +1979,12 @@ var Bar = function Bar(_ref) {
1901
1979
  width: task.handleWidth,
1902
1980
  height: handleHeight,
1903
1981
  barCornerRadius: task.barCornerRadius,
1904
- onMouseDown: function onMouseDown(e) {
1982
+ onMouseDown: e => {
1905
1983
  onEventStart("end", task, e, "actual");
1906
1984
  }
1907
1985
  })), isProgressChangeable && React__default.createElement(BarProgressHandle, {
1908
1986
  progressPoint: progressPoint,
1909
- onMouseDown: function onMouseDown(e) {
1987
+ onMouseDown: e => {
1910
1988
  onEventStart("progress", task, e, "actual");
1911
1989
  }
1912
1990
  })));
@@ -1918,14 +1996,16 @@ var Bar = function Bar(_ref) {
1918
1996
  }
1919
1997
  };
1920
1998
 
1921
- var BarSmall = function BarSmall(_ref) {
1922
- var task = _ref.task,
1923
- type = _ref.type,
1924
- isProgressChangeable = _ref.isProgressChangeable,
1925
- isDateChangeable = _ref.isDateChangeable,
1926
- onEventStart = _ref.onEventStart,
1927
- isSelected = _ref.isSelected;
1928
- var progressPoint = getProgressPoint(task.progressWidth + task.x1, task.y, task.height);
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);
1929
2009
  return React__default.createElement("g", {
1930
2010
  className: styles$6.barWrapper,
1931
2011
  tabIndex: 0
@@ -1942,14 +2022,14 @@ var BarSmall = function BarSmall(_ref) {
1942
2022
  barCornerRadius: task.barCornerRadius,
1943
2023
  styles: task.styles,
1944
2024
  isSelected: isSelected,
1945
- onMouseDown: function onMouseDown(e) {
2025
+ onMouseDown: e => {
1946
2026
  isDateChangeable && onEventStart("move", task, e);
1947
2027
  }
1948
2028
  }), React__default.createElement("g", {
1949
2029
  className: "handleGroup"
1950
2030
  }, isProgressChangeable && React__default.createElement(BarProgressHandle, {
1951
2031
  progressPoint: progressPoint,
1952
- onMouseDown: function onMouseDown(e) {
2032
+ onMouseDown: e => {
1953
2033
  onEventStart("progress", task, e);
1954
2034
  }
1955
2035
  })));
@@ -1957,14 +2037,17 @@ var BarSmall = function BarSmall(_ref) {
1957
2037
 
1958
2038
  var styles$7 = {"milestoneWrapper":"_RRr13","milestoneBackground":"_2P2B1"};
1959
2039
 
1960
- var Milestone = function Milestone(_ref) {
1961
- var task = _ref.task,
1962
- isDateChangeable = _ref.isDateChangeable,
1963
- onEventStart = _ref.onEventStart,
1964
- isSelected = _ref.isSelected;
1965
- var transform = "rotate(45 " + (task.x1 + task.height * 0.356) + " \n " + (task.y + task.height * 0.85) + ")";
1966
-
1967
- var getBarColor = function getBarColor() {
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 = () => {
1968
2051
  return isSelected ? task.styles.backgroundSelectedColor : task.styles.backgroundColor;
1969
2052
  };
1970
2053
 
@@ -1981,7 +2064,7 @@ var Milestone = function Milestone(_ref) {
1981
2064
  ry: task.barCornerRadius,
1982
2065
  transform: transform,
1983
2066
  className: styles$7.milestoneBackground,
1984
- onMouseDown: function onMouseDown(e) {
2067
+ onMouseDown: e => {
1985
2068
  isDateChangeable && onEventStart("move", task, e);
1986
2069
  }
1987
2070
  }));
@@ -1989,14 +2072,16 @@ var Milestone = function Milestone(_ref) {
1989
2072
 
1990
2073
  var styles$8 = {"projectWrapper":"_1KJ6x","projectBackground":"_2RbVy","projectTop":"_2pZMF"};
1991
2074
 
1992
- var Project = function Project(_ref) {
1993
- var task = _ref.task,
1994
- isSelected = _ref.isSelected;
1995
- var barColor = isSelected ? task.styles.backgroundSelectedColor : task.styles.backgroundColor;
1996
- var processColor = isSelected ? task.styles.progressSelectedColor : task.styles.progressColor;
1997
- var projectWith = task.x2 - task.x1;
1998
- 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(",");
1999
- 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(",");
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(",");
2000
2085
  return React__default.createElement("g", {
2001
2086
  tabIndex: 0,
2002
2087
  className: styles$8.projectWrapper
@@ -2037,18 +2122,16 @@ var Project = function Project(_ref) {
2037
2122
  }));
2038
2123
  };
2039
2124
 
2040
- var TaskItem = function TaskItem(props) {
2041
- var _props = _extends({}, props),
2042
- task = _props.task,
2043
- isDelete = _props.isDelete,
2044
- isSelected = _props.isSelected,
2045
- onEventStart = _props.onEventStart;
2046
-
2047
- var _useState = React.useState([React__default.createElement("div", null)]),
2048
- taskItem = _useState[0],
2049
- setTaskItem = _useState[1];
2050
-
2051
- React.useEffect(function () {
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(() => {
2052
2135
  switch (task.typeInternal) {
2053
2136
  case "milestone":
2054
2137
  if (task.x1 >= 0 && task.actualx1 >= 0) setTaskItem([React__default.createElement(Milestone, Object.assign({}, props))]);else setTaskItem([]);
@@ -2064,27 +2147,27 @@ var TaskItem = function TaskItem(props) {
2064
2147
 
2065
2148
  default:
2066
2149
  {
2067
- var _taskItem = [];
2150
+ let taskItem = [];
2068
2151
 
2069
2152
  if ((task === null || task === void 0 ? void 0 : task.x1) >= 0 && (task === null || task === void 0 ? void 0 : task.x2) >= 0) {
2070
- _taskItem.push(React__default.createElement(Bar, Object.assign({}, props, {
2153
+ taskItem.push(React__default.createElement(Bar, Object.assign({}, props, {
2071
2154
  type: "planned"
2072
2155
  })));
2073
2156
  }
2074
2157
 
2075
2158
  if ((task === null || task === void 0 ? void 0 : task.actualx1) >= 0 && (task === null || task === void 0 ? void 0 : task.actualx2) >= 0) {
2076
- _taskItem.push(React__default.createElement(Bar, Object.assign({}, props, {
2159
+ taskItem.push(React__default.createElement(Bar, Object.assign({}, props, {
2077
2160
  type: "actual"
2078
2161
  })));
2079
2162
  }
2080
2163
 
2081
- setTaskItem(_taskItem);
2164
+ setTaskItem(taskItem);
2082
2165
  }
2083
2166
  break;
2084
2167
  }
2085
2168
  }, [task, isSelected]);
2086
2169
  return React__default.createElement("g", null, React__default.createElement("g", {
2087
- onKeyDown: function onKeyDown(e) {
2170
+ onKeyDown: e => {
2088
2171
  switch (e.key) {
2089
2172
  case "Delete":
2090
2173
  {
@@ -2095,20 +2178,20 @@ var TaskItem = function TaskItem(props) {
2095
2178
 
2096
2179
  e.stopPropagation();
2097
2180
  },
2098
- onMouseEnter: function onMouseEnter(e) {
2181
+ onMouseEnter: e => {
2099
2182
  onEventStart("mouseenter", task, e, "planned");
2100
2183
  },
2101
- onMouseLeave: function onMouseLeave(e) {
2184
+ onMouseLeave: e => {
2102
2185
  onEventStart("mouseleave", task, e, "planned");
2103
2186
  },
2104
- onDoubleClick: function onDoubleClick(e) {
2187
+ onDoubleClick: e => {
2105
2188
  onEventStart("dblclick", task, e, "planned");
2106
2189
  },
2107
- onClick: function onClick(e) {
2190
+ onClick: e => {
2108
2191
  onEventStart("click", task, e, "planned");
2109
2192
  }
2110
2193
  }, taskItem[0]), React__default.createElement("g", {
2111
- onKeyDown: function onKeyDown(e) {
2194
+ onKeyDown: e => {
2112
2195
  switch (e.key) {
2113
2196
  case "Delete":
2114
2197
  {
@@ -2119,82 +2202,74 @@ var TaskItem = function TaskItem(props) {
2119
2202
 
2120
2203
  e.stopPropagation();
2121
2204
  },
2122
- onMouseEnter: function onMouseEnter(e) {
2205
+ onMouseEnter: e => {
2123
2206
  onEventStart("mouseenter", task, e, "actual");
2124
2207
  },
2125
- onMouseLeave: function onMouseLeave(e) {
2208
+ onMouseLeave: e => {
2126
2209
  onEventStart("mouseleave", task, e, "actual");
2127
2210
  },
2128
- onDoubleClick: function onDoubleClick(e) {
2211
+ onDoubleClick: e => {
2129
2212
  onEventStart("dblclick", task, e, "actual");
2130
2213
  },
2131
- onClick: function onClick(e) {
2214
+ onClick: e => {
2132
2215
  onEventStart("click", task, e, "actual");
2133
2216
  }
2134
2217
  }, taskItem[1]));
2135
2218
  };
2136
2219
 
2137
- var TaskGanttContent = function TaskGanttContent(_ref) {
2220
+ const TaskGanttContent = _ref => {
2138
2221
  var _svg$current;
2139
2222
 
2140
- var tasks = _ref.tasks,
2141
- dates = _ref.dates,
2142
- ganttEvent = _ref.ganttEvent,
2143
- selectedTask = _ref.selectedTask,
2144
- rowHeight = _ref.rowHeight,
2145
- columnWidth = _ref.columnWidth,
2146
- timeStep = _ref.timeStep,
2147
- svg = _ref.svg,
2148
- taskHeight = _ref.taskHeight,
2149
- arrowIndent = _ref.arrowIndent,
2150
- fontFamily = _ref.fontFamily,
2151
- fontSize = _ref.fontSize,
2152
- rtl = _ref.rtl,
2153
- setGanttEvent = _ref.setGanttEvent,
2154
- setFailedTask = _ref.setFailedTask,
2155
- setSelectedTask = _ref.setSelectedTask,
2156
- onDateChange = _ref.onDateChange,
2157
- onProgressChange = _ref.onProgressChange,
2158
- onDoubleClick = _ref.onDoubleClick,
2159
- onClick = _ref.onClick,
2160
- onDelete = _ref.onDelete;
2161
- var point = svg === null || svg === void 0 ? void 0 : (_svg$current = svg.current) === null || _svg$current === void 0 ? void 0 : _svg$current.createSVGPoint();
2162
-
2163
- var _useState = React.useState(0),
2164
- xStep = _useState[0],
2165
- setXStep = _useState[1];
2166
-
2167
- var _useState2 = React.useState(0),
2168
- initEventX1Delta = _useState2[0],
2169
- setInitEventX1Delta = _useState2[1];
2170
-
2171
- var _useState3 = React.useState(false),
2172
- isMoving = _useState3[0],
2173
- setIsMoving = _useState3[1];
2174
-
2175
- React.useEffect(function () {
2176
- var dateDelta = dates[1].getTime() - dates[0].getTime() - dates[1].getTimezoneOffset() * 60 * 1000 + dates[0].getTimezoneOffset() * 60 * 1000;
2177
- var newXStep = timeStep * columnWidth / dateDelta;
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;
2178
2253
  setXStep(newXStep);
2179
2254
  }, [columnWidth, dates, timeStep]);
2180
- React.useEffect(function () {
2181
- var handleMouseMove = function handleMouseMove(event) {
2255
+ React.useEffect(() => {
2256
+ const handleMouseMove = function (event) {
2182
2257
  try {
2183
2258
  var _svg$current$getScree;
2184
2259
 
2185
2260
  if (!ganttEvent.changedTask || !point || !(svg !== null && svg !== void 0 && svg.current)) return Promise.resolve();
2186
2261
  event.preventDefault();
2187
2262
  point.x = event.clientX;
2188
- 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());
2189
-
2190
- var _handleTaskBySVGMouse = handleTaskBySVGMouseEvent(cursor.x, ganttEvent.action, ganttEvent.changedTask, ganttEvent.type, xStep, timeStep, initEventX1Delta, rtl),
2191
- isChanged = _handleTaskBySVGMouse.isChanged,
2192
- changedTask = _handleTaskBySVGMouse.changedTask;
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);
2193
2268
 
2194
2269
  if (isChanged) {
2195
2270
  setGanttEvent({
2196
2271
  action: ganttEvent.action,
2197
- changedTask: changedTask
2272
+ changedTask
2198
2273
  });
2199
2274
  }
2200
2275
 
@@ -2204,40 +2279,41 @@ var TaskGanttContent = function TaskGanttContent(_ref) {
2204
2279
  }
2205
2280
  };
2206
2281
 
2207
- var handleMouseUp = function handleMouseUp(event) {
2282
+ const handleMouseUp = function (event) {
2208
2283
  try {
2209
2284
  var _svg$current$getScree2;
2210
2285
 
2211
- var _temp6 = function _temp6() {
2286
+ function _temp5() {
2212
2287
  if (!operationSuccess) {
2213
2288
  setFailedTask(originalSelectedTask);
2214
2289
  }
2215
- };
2290
+ }
2216
2291
 
2217
- var action = ganttEvent.action,
2218
- originalSelectedTask = ganttEvent.originalSelectedTask,
2219
- changedTask = ganttEvent.changedTask,
2220
- type = ganttEvent.type;
2292
+ const {
2293
+ action,
2294
+ originalSelectedTask,
2295
+ changedTask,
2296
+ type
2297
+ } = ganttEvent;
2221
2298
  if (!changedTask || !point || !(svg !== null && svg !== void 0 && svg.current) || !originalSelectedTask) return Promise.resolve();
2222
2299
  event.preventDefault();
2223
2300
  point.x = event.clientX;
2224
- 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());
2225
-
2226
- var _handleTaskBySVGMouse2 = handleTaskBySVGMouseEvent(cursor.x, action, changedTask, type, xStep, timeStep, initEventX1Delta, rtl),
2227
- newChangedTask = _handleTaskBySVGMouse2.changedTask;
2228
-
2229
- var isNotLikeOriginal = originalSelectedTask.start !== newChangedTask.start || originalSelectedTask.end !== newChangedTask.end || originalSelectedTask.actualStart !== newChangedTask.actualStart || originalSelectedTask.actualEnd !== newChangedTask.actualEnd || originalSelectedTask.progress !== newChangedTask.progress;
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;
2230
2306
  svg.current.removeEventListener("mousemove", handleMouseMove);
2231
2307
  svg.current.removeEventListener("mouseup", handleMouseUp);
2232
2308
  setGanttEvent({
2233
2309
  action: ""
2234
2310
  });
2235
2311
  setIsMoving(false);
2236
- var operationSuccess = true;
2312
+ let operationSuccess = true;
2237
2313
 
2238
- var _temp7 = function () {
2314
+ const _temp4 = function () {
2239
2315
  if ((action === "move" || action === "end" || action === "start") && onDateChange && isNotLikeOriginal) {
2240
- var _temp8 = _catch(function () {
2316
+ const _temp = _catch(function () {
2241
2317
  return Promise.resolve(onDateChange(newChangedTask, newChangedTask.barChildren)).then(function (result) {
2242
2318
  if (result !== undefined) {
2243
2319
  operationSuccess = result;
@@ -2247,11 +2323,11 @@ var TaskGanttContent = function TaskGanttContent(_ref) {
2247
2323
  operationSuccess = false;
2248
2324
  });
2249
2325
 
2250
- if (_temp8 && _temp8.then) return _temp8.then(function () {});
2326
+ if (_temp && _temp.then) return _temp.then(function () {});
2251
2327
  } else {
2252
- var _temp9 = function () {
2328
+ const _temp3 = function () {
2253
2329
  if (onProgressChange && isNotLikeOriginal) {
2254
- var _temp10 = _catch(function () {
2330
+ const _temp2 = _catch(function () {
2255
2331
  return Promise.resolve(onProgressChange(newChangedTask, newChangedTask.barChildren)).then(function (result) {
2256
2332
  if (result !== undefined) {
2257
2333
  operationSuccess = result;
@@ -2261,15 +2337,15 @@ var TaskGanttContent = function TaskGanttContent(_ref) {
2261
2337
  operationSuccess = false;
2262
2338
  });
2263
2339
 
2264
- if (_temp10 && _temp10.then) return _temp10.then(function () {});
2340
+ if (_temp2 && _temp2.then) return _temp2.then(function () {});
2265
2341
  }
2266
2342
  }();
2267
2343
 
2268
- if (_temp9 && _temp9.then) return _temp9.then(function () {});
2344
+ if (_temp3 && _temp3.then) return _temp3.then(function () {});
2269
2345
  }
2270
2346
  }();
2271
2347
 
2272
- return Promise.resolve(_temp7 && _temp7.then ? _temp7.then(_temp6) : _temp6(_temp7));
2348
+ return Promise.resolve(_temp4 && _temp4.then ? _temp4.then(_temp5) : _temp5(_temp4));
2273
2349
  } catch (e) {
2274
2350
  return Promise.reject(e);
2275
2351
  }
@@ -2282,7 +2358,7 @@ var TaskGanttContent = function TaskGanttContent(_ref) {
2282
2358
  }
2283
2359
  }, [ganttEvent, xStep, initEventX1Delta, onProgressChange, timeStep, onDateChange, svg, isMoving, point, rtl, setFailedTask, setGanttEvent]);
2284
2360
 
2285
- var handleBarEventStart = function handleBarEventStart(action, task, event, type) {
2361
+ const handleBarEventStart = function (action, task, event, type) {
2286
2362
  try {
2287
2363
  return Promise.resolve(function () {
2288
2364
  if (!event) {
@@ -2291,15 +2367,15 @@ var TaskGanttContent = function TaskGanttContent(_ref) {
2291
2367
  }
2292
2368
  } else return function () {
2293
2369
  if (isKeyboardEvent(event)) {
2294
- var _temp14 = function () {
2370
+ const _temp8 = function () {
2295
2371
  if (action === "delete") {
2296
- var _temp15 = function () {
2372
+ const _temp7 = function () {
2297
2373
  if (onDelete) {
2298
- var _temp16 = _catch(function () {
2374
+ const _temp6 = _catch(function () {
2299
2375
  return Promise.resolve(onDelete(task)).then(function (result) {
2300
2376
  if (result !== undefined && result) {
2301
2377
  setGanttEvent({
2302
- action: action,
2378
+ action,
2303
2379
  changedTask: task
2304
2380
  });
2305
2381
  }
@@ -2308,19 +2384,19 @@ var TaskGanttContent = function TaskGanttContent(_ref) {
2308
2384
  console.error("Error on Delete. " + error);
2309
2385
  });
2310
2386
 
2311
- if (_temp16 && _temp16.then) return _temp16.then(function () {});
2387
+ if (_temp6 && _temp6.then) return _temp6.then(function () {});
2312
2388
  }
2313
2389
  }();
2314
2390
 
2315
- if (_temp15 && _temp15.then) return _temp15.then(function () {});
2391
+ if (_temp7 && _temp7.then) return _temp7.then(function () {});
2316
2392
  }
2317
2393
  }();
2318
2394
 
2319
- if (_temp14 && _temp14.then) return _temp14.then(function () {});
2395
+ if (_temp8 && _temp8.then) return _temp8.then(function () {});
2320
2396
  } else if (action === "mouseenter") {
2321
2397
  if (!ganttEvent.action) {
2322
2398
  setGanttEvent({
2323
- action: action,
2399
+ action,
2324
2400
  changedTask: task,
2325
2401
  originalSelectedTask: task,
2326
2402
  type: type
@@ -2341,17 +2417,17 @@ var TaskGanttContent = function TaskGanttContent(_ref) {
2341
2417
 
2342
2418
  if (!(svg !== null && svg !== void 0 && svg.current) || !point) return;
2343
2419
  point.x = event.clientX;
2344
- var cursor = point.matrixTransform((_svg$current$getScree3 = svg.current.getScreenCTM()) === null || _svg$current$getScree3 === void 0 ? void 0 : _svg$current$getScree3.inverse());
2420
+ const cursor = point.matrixTransform((_svg$current$getScree3 = svg.current.getScreenCTM()) === null || _svg$current$getScree3 === void 0 ? void 0 : _svg$current$getScree3.inverse());
2345
2421
  if (type == "planned") setInitEventX1Delta(cursor.x - task.x1);else if (type == "actual") setInitEventX1Delta(cursor.x - task.actualx1);
2346
2422
  setGanttEvent({
2347
- action: action,
2423
+ action,
2348
2424
  changedTask: task,
2349
2425
  originalSelectedTask: task,
2350
2426
  type: type
2351
2427
  });
2352
2428
  } else {
2353
2429
  setGanttEvent({
2354
- action: action,
2430
+ action,
2355
2431
  changedTask: task,
2356
2432
  originalSelectedTask: task,
2357
2433
  type: type
@@ -2368,8 +2444,8 @@ var TaskGanttContent = function TaskGanttContent(_ref) {
2368
2444
  className: "content"
2369
2445
  }, React__default.createElement("g", {
2370
2446
  className: "arrows"
2371
- }, tasks.map(function (_task) {
2372
- var task = _task.start.getTime() > 0 && _task.end.getTime() > 0 ? _task : undefined;
2447
+ }, tasks.map(_task => {
2448
+ const task = _task.start.getTime() > 0 && _task.end.getTime() > 0 ? _task : undefined;
2373
2449
 
2374
2450
  if (!task) {
2375
2451
  return React__default.createElement("g", {
@@ -2380,20 +2456,18 @@ var TaskGanttContent = function TaskGanttContent(_ref) {
2380
2456
  });
2381
2457
  }
2382
2458
 
2383
- return task.barChildren.map(function (child) {
2459
+ return task.barChildren.map(child => {
2384
2460
  var _task$criticalPathArr, _task$criticalPathArr2;
2385
2461
 
2386
2462
  if (task.x2 > task.x1 || task.actualx2 > task.actualx1) return React__default.createElement(Arrow, {
2387
- key: "Arrow from " + task.id + " to " + tasks[child.index].id,
2463
+ key: `Arrow from ${task.id} to ${tasks[child.index].id}`,
2388
2464
  taskFrom: task,
2389
2465
  taskTo: tasks[child.index],
2390
2466
  rowHeight: rowHeight,
2391
2467
  taskHeight: taskHeight,
2392
2468
  arrowIndent: arrowIndent,
2393
2469
  rtl: rtl,
2394
- arrowColor: ((_task$criticalPathArr = task.criticalPathArrows) === null || _task$criticalPathArr === void 0 ? void 0 : (_task$criticalPathArr2 = _task$criticalPathArr.find(function (arrow) {
2395
- return arrow.taskId == tasks[child.index].id;
2396
- })) === null || _task$criticalPathArr2 === void 0 ? void 0 : _task$criticalPathArr2.arrowColor) || "#808080"
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"
2397
2471
  });else return React__default.createElement("g", {
2398
2472
  key: _task.id,
2399
2473
  style: {
@@ -2405,8 +2479,8 @@ var TaskGanttContent = function TaskGanttContent(_ref) {
2405
2479
  className: "bar",
2406
2480
  fontFamily: fontFamily,
2407
2481
  fontSize: fontSize
2408
- }, tasks.map(function (_task) {
2409
- var task = _task.start.getTime() > 0 && _task.end.getTime() > 0 ? _task : undefined;
2482
+ }, tasks.map(_task => {
2483
+ const task = _task.start.getTime() > 0 && _task.end.getTime() > 0 ? _task : undefined;
2410
2484
 
2411
2485
  if (!task) {
2412
2486
  return React__default.createElement("g", {
@@ -2598,6 +2672,7 @@ var Gantt = function Gantt(_ref) {
2598
2672
  onDelete = _ref.onDelete,
2599
2673
  onSelect = _ref.onSelect,
2600
2674
  onExpanderClick = _ref.onExpanderClick,
2675
+ onMultiSelect = _ref.onMultiSelect,
2601
2676
  taskLabelRenderer = _ref.taskLabelRenderer;
2602
2677
  var wrapperRef = React.useRef(null);
2603
2678
  var taskListRef = React.useRef(null);
@@ -3005,7 +3080,8 @@ var Gantt = function Gantt(_ref) {
3005
3080
  onDoubleClick: onDoubleClick,
3006
3081
  TaskListHeader: TaskListHeader,
3007
3082
  TaskListTable: TaskListTable,
3008
- taskLabelRenderer: taskLabelRenderer
3083
+ taskLabelRenderer: taskLabelRenderer,
3084
+ onMultiSelect: onMultiSelect
3009
3085
  };
3010
3086
  return React__default.createElement("div", null, React__default.createElement("div", {
3011
3087
  className: styles$9.wrapper,