gantt-task-react-powern 0.4.65 → 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);
@@ -286,7 +282,8 @@ var TaskListHeaderDefault = function TaskListHeaderDefault(_ref) {
286
282
  fontFamily = _ref.fontFamily,
287
283
  fontSize = _ref.fontSize,
288
284
  rowWidth = _ref.rowWidth,
289
- scheduleType = _ref.scheduleType;
285
+ allSelected = _ref.allSelected,
286
+ onSelectAll = _ref.onSelectAll;
290
287
  return React__default.createElement("div", {
291
288
  className: styles.ganttTable,
292
289
  style: {
@@ -298,7 +295,19 @@ var TaskListHeaderDefault = function TaskListHeaderDefault(_ref) {
298
295
  style: {
299
296
  height: headerHeight - 2
300
297
  }
301
- }, 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", {
302
311
  className: styles.ganttTable_HeaderItem,
303
312
  style: {
304
313
  minWidth: parseInt(rowWidth) * 0.8,
@@ -313,8 +322,8 @@ var TaskListHeaderDefault = function TaskListHeaderDefault(_ref) {
313
322
  }), React__default.createElement("div", {
314
323
  className: styles.ganttTable_HeaderItem,
315
324
  style: {
316
- minWidth: parseInt(rowWidth) * 2,
317
- maxWidth: parseInt(rowWidth) * 2
325
+ minWidth: parseInt(rowWidth) * 1.8,
326
+ maxWidth: parseInt(rowWidth) * 1.8
318
327
  }
319
328
  }, "Task"), React__default.createElement("div", {
320
329
  className: styles.ganttTable_HeaderSeparator,
@@ -325,7 +334,7 @@ var TaskListHeaderDefault = function TaskListHeaderDefault(_ref) {
325
334
  }), React__default.createElement("div", {
326
335
  className: styles.ganttTable_HeaderItem,
327
336
  style: {
328
- minWidth: parseInt(rowWidth) * 0.6
337
+ minWidth: parseInt(rowWidth) * 0.7
329
338
  },
330
339
  title: "Planned Start"
331
340
  }, "Planned Start"), React__default.createElement("div", {
@@ -337,28 +346,10 @@ var TaskListHeaderDefault = function TaskListHeaderDefault(_ref) {
337
346
  }), React__default.createElement("div", {
338
347
  className: styles.ganttTable_HeaderItem,
339
348
  style: {
340
- minWidth: parseInt(rowWidth) * 0.6
349
+ minWidth: parseInt(rowWidth) * 0.7
341
350
  },
342
351
  title: "Planned End"
343
- }, "Planned End"), scheduleType === "lookAhead" && React__default.createElement("div", {
344
- className: styles.ganttTable_HeaderItem,
345
- style: {
346
- minWidth: parseInt(rowWidth) * 0.6
347
- },
348
- title: "Planned Start"
349
- }, "Actual Start"), scheduleType === "lookAhead" && React__default.createElement("div", {
350
- className: styles.ganttTable_HeaderSeparator,
351
- style: {
352
- height: headerHeight * 0.5,
353
- marginTop: headerHeight * 0.25
354
- }
355
- }), scheduleType === "lookAhead" && React__default.createElement("div", {
356
- className: styles.ganttTable_HeaderItem,
357
- style: {
358
- minWidth: parseInt(rowWidth) * 0.6
359
- },
360
- title: "Planned End"
361
- }, "Actual End")));
352
+ }, "Planned End")));
362
353
  };
363
354
 
364
355
  var styles$1 = {"taskListWrapper":"_3ZbQT","taskListTableRow":"_34SS0","taskListLookAheadRow":"_GzvG4","taskListMilestoneRow":"_3Ykml","taskListCell":"_3lLk3","taskListNameWrapper":"_nI1Xw","taskListExpander":"_2QjE6","taskListExpanderPlaceholder":"_1fnLB","taskListEmptyExpander":"_2TfEi","taskListText":"_2ZvXU"};
@@ -395,6 +386,9 @@ var TaskListTableDefault = function TaskListTableDefault(_ref) {
395
386
  fontSize = _ref.fontSize,
396
387
  locale = _ref.locale,
397
388
  onExpanderClick = _ref.onExpanderClick,
389
+ _ref$selectedTasks = _ref.selectedTasks,
390
+ selectedTasks = _ref$selectedTasks === void 0 ? [] : _ref$selectedTasks,
391
+ onTaskSelect = _ref.onTaskSelect,
398
392
  _ref$taskLabelRendere = _ref.taskLabelRenderer,
399
393
  taskLabelRenderer = _ref$taskLabelRendere === void 0 ? function (t) {
400
394
  return " " + t.name;
@@ -424,13 +418,36 @@ var TaskListTableDefault = function TaskListTableDefault(_ref) {
424
418
  }
425
419
  }
426
420
 
421
+ var isSelected = selectedTasks.includes(t.id);
427
422
  return React__default.createElement("div", {
428
423
  className: t.type === "milestone" ? styles$1.taskListMilestoneRow : scheduleType === "lookAhead" ? styles$1.taskListLookAheadRow : styles$1.taskListTableRow,
429
424
  style: {
430
425
  height: rowHeight
431
426
  },
432
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
+ }
433
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", {
434
451
  className: styles$1.taskListCell,
435
452
  style: {
436
453
  minWidth: parseInt(rowWidth) * 0.8,
@@ -482,23 +499,7 @@ var TaskListTableDefault = function TaskListTableDefault(_ref) {
482
499
  }
483
500
  }, React__default.createElement("div", {
484
501
  className: styles$1.taskListText
485
- }, "\xA0", toLocaleDateString(t.end, dateTimeOptions))), scheduleType === "lookAhead" && React__default.createElement("div", {
486
- className: styles$1.taskListCell,
487
- style: {
488
- minWidth: parseInt(rowWidth) * 0.6,
489
- maxWidth: parseInt(rowWidth) * 0.6
490
- }
491
- }, React__default.createElement("div", {
492
- className: styles$1.taskListText
493
- }, "\xA0", toLocaleDateString(t.actualStart, dateTimeOptions))), scheduleType === "lookAhead" && React__default.createElement("div", {
494
- className: styles$1.taskListCell,
495
- style: {
496
- minWidth: parseInt(rowWidth) * 0.6,
497
- maxWidth: parseInt(rowWidth) * 0.6
498
- }
499
- }, React__default.createElement("div", {
500
- className: styles$1.taskListText
501
- }, "\xA0", toLocaleDateString(t.actualEnd, dateTimeOptions))));
502
+ }, "\xA0", toLocaleDateString(t.end, dateTimeOptions))));
502
503
  }));
503
504
  };
504
505
 
@@ -676,19 +677,61 @@ var TaskList = function TaskList(_ref) {
676
677
  horizontalContainerClass = _ref.horizontalContainerClass,
677
678
  TaskListHeader = _ref.TaskListHeader,
678
679
  TaskListTable = _ref.TaskListTable,
679
- taskLabelRenderer = _ref.taskLabelRenderer;
680
+ taskLabelRenderer = _ref.taskLabelRenderer,
681
+ onMultiSelect = _ref.onMultiSelect;
680
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([]);
681
689
  React.useEffect(function () {
682
690
  if (horizontalContainerRef.current) {
683
691
  horizontalContainerRef.current.scrollTop = scrollY;
684
692
  }
685
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
+
686
728
  var headerProps = {
687
729
  headerHeight: headerHeight,
688
730
  fontFamily: fontFamily,
689
731
  fontSize: fontSize,
690
732
  rowWidth: rowWidth,
691
- scheduleType: scheduleType
733
+ allSelected: tasks.length > 0 && selectedTasks.length === tasks.length,
734
+ onSelectAll: onMultiSelect ? handleSelectAll : undefined
692
735
  };
693
736
  var selectedTaskId = selectedTask ? selectedTask.id : "";
694
737
  var tableProps = {
@@ -703,6 +746,8 @@ var TaskList = function TaskList(_ref) {
703
746
  selectedTaskId: selectedTaskId,
704
747
  setSelectedTask: setSelectedTask,
705
748
  onExpanderClick: onExpanderClick,
749
+ selectedTasks: onMultiSelect ? selectedTasks : undefined,
750
+ onTaskSelect: onMultiSelect ? handleTaskSelect : undefined,
706
751
  taskLabelRenderer: taskLabelRenderer
707
752
  };
708
753
  return React__default.createElement("div", {
@@ -718,19 +763,21 @@ var TaskList = function TaskList(_ref) {
718
763
 
719
764
  var styles$4 = {"gridRow":"_2dZTy","gridRowLookAhead":"_2RRca","gridRowLine":"_3rUKi","gridTick":"_RuwuK","darkerGridRow":"_2M-tt"};
720
765
 
721
- var GridBody = function GridBody(_ref) {
722
- var tasks = _ref.tasks,
723
- scheduleType = _ref.scheduleType,
724
- dates = _ref.dates,
725
- rowHeight = _ref.rowHeight,
726
- svgWidth = _ref.svgWidth,
727
- columnWidth = _ref.columnWidth,
728
- todayColor = _ref.todayColor,
729
- weekendColor = _ref.weekendColor,
730
- rtl = _ref.rtl;
731
- var y = 0;
732
- var gridRows = [];
733
- 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", {
734
781
  key: "RowLineFirst",
735
782
  x: "0",
736
783
  y1: 0,
@@ -739,9 +786,8 @@ var GridBody = function GridBody(_ref) {
739
786
  className: styles$4.gridRowLine
740
787
  })];
741
788
 
742
- for (var _iterator = _createForOfIteratorHelperLoose(tasks), _step; !(_step = _iterator()).done;) {
743
- var task = _step.value;
744
- var isDarkerRow = task.type === "milestone";
789
+ for (const task of tasks) {
790
+ const isDarkerRow = task.type === "milestone";
745
791
  gridRows.push(React__default.createElement("rect", {
746
792
  key: "Row" + task.id,
747
793
  x: "0",
@@ -761,14 +807,14 @@ var GridBody = function GridBody(_ref) {
761
807
  y += rowHeight;
762
808
  }
763
809
 
764
- var now = new Date();
765
- var tickX = 0;
766
- var ticks = [];
767
- var today = React__default.createElement("rect", null);
768
- 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 = [];
769
815
 
770
- for (var i = 0; i < dates.length; i++) {
771
- var date = dates[i];
816
+ for (let i = 0; i < dates.length; i++) {
817
+ const date = dates[i];
772
818
  ticks.push(React__default.createElement("line", {
773
819
  key: date.getTime(),
774
820
  x1: tickX,
@@ -826,7 +872,7 @@ var GridBody = function GridBody(_ref) {
826
872
  }, today));
827
873
  };
828
874
 
829
- var Grid = function Grid(props) {
875
+ const Grid = props => {
830
876
  return React__default.createElement("g", {
831
877
  className: "grid"
832
878
  }, React__default.createElement(GridBody, Object.assign({}, props)));
@@ -834,16 +880,17 @@ var Grid = function Grid(props) {
834
880
 
835
881
  var styles$5 = {"calendarBottomText":"_9w8d5","calendarTopTick":"_1rLuZ","calendarTopText":"_2q1Kt","calendarHeader":"_35nLX","textAnchorStart":"_2Shd-","textAnchorMiddle":"_2XXW4","textAnchorEnd":"_3GdnC"};
836
882
 
837
- var TopPartOfCalendar = function TopPartOfCalendar(_ref) {
838
- var value = _ref.value,
839
- x1Line = _ref.x1Line,
840
- y1Line = _ref.y1Line,
841
- y2Line = _ref.y2Line,
842
- xText = _ref.xText,
843
- yText = _ref.yText,
844
- _ref$textAnchor = _ref.textAnchor,
845
- textAnchor = _ref$textAnchor === void 0 ? "middle" : _ref$textAnchor;
846
- 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;
847
894
  return React__default.createElement("g", {
848
895
  className: "calendarTop"
849
896
  }, React__default.createElement("line", {
@@ -857,28 +904,30 @@ var TopPartOfCalendar = function TopPartOfCalendar(_ref) {
857
904
  key: value + "text",
858
905
  y: yText,
859
906
  x: xText,
860
- className: styles$5.calendarTopText + " " + textAnchorClass
907
+ className: `${styles$5.calendarTopText} ${textAnchorClass}`
861
908
  }, value));
862
909
  };
863
910
 
864
- var Calendar = function Calendar(_ref) {
865
- var dateSetup = _ref.dateSetup,
866
- locale = _ref.locale,
867
- viewMode = _ref.viewMode,
868
- rtl = _ref.rtl,
869
- headerHeight = _ref.headerHeight,
870
- columnWidth = _ref.columnWidth,
871
- fontFamily = _ref.fontFamily,
872
- fontSize = _ref.fontSize;
873
-
874
- var getCalendarValuesForYear = function getCalendarValuesForYear() {
875
- var topValues = [];
876
- var bottomValues = [];
877
- var topDefaultHeight = headerHeight * 0.5;
878
-
879
- for (var i = 0; i < dateSetup.dates.length; i++) {
880
- var date = dateSetup.dates[i];
881
- 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();
882
931
  bottomValues.push(React__default.createElement("text", {
883
932
  key: date.getFullYear(),
884
933
  y: headerHeight * 0.8,
@@ -887,8 +936,8 @@ var Calendar = function Calendar(_ref) {
887
936
  }, bottomValue));
888
937
 
889
938
  if (i === 0 || date.getFullYear() !== dateSetup.dates[i - 1].getFullYear()) {
890
- var topValue = date.getFullYear().toString();
891
- var xText = void 0;
939
+ const topValue = date.getFullYear().toString();
940
+ let xText;
892
941
 
893
942
  if (rtl) {
894
943
  xText = (6 + i + date.getFullYear() + 1) * columnWidth;
@@ -911,25 +960,25 @@ var Calendar = function Calendar(_ref) {
911
960
  return [topValues, bottomValues];
912
961
  };
913
962
 
914
- var getCalendarValuesForQuarter = function getCalendarValuesForQuarter() {
915
- var topValues = [];
916
- var bottomValues = [];
917
- var topDefaultHeight = headerHeight * 0.5;
963
+ const getCalendarValuesForQuarter = () => {
964
+ const topValues = [];
965
+ const bottomValues = [];
966
+ const topDefaultHeight = headerHeight * 0.5;
918
967
 
919
- for (var i = 0; i < dateSetup.dates.length; i++) {
920
- var date = dateSetup.dates[i];
921
- var quarter = Math.floor(date.getMonth() / 3) + 1;
922
- 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}`;
923
972
  bottomValues.push(React__default.createElement("text", {
924
- key: bottomValue + "-" + date.getFullYear(),
973
+ key: `${bottomValue}-${date.getFullYear()}`,
925
974
  y: headerHeight * 0.8,
926
975
  x: columnWidth * i + columnWidth * 0.5,
927
976
  className: styles$5.calendarBottomText
928
977
  }, bottomValue));
929
978
 
930
979
  if (i === 0 || date.getFullYear() !== dateSetup.dates[i - 1].getFullYear()) {
931
- var topValue = date.getFullYear().toString();
932
- var xText = void 0;
980
+ const topValue = date.getFullYear().toString();
981
+ let xText;
933
982
 
934
983
  if (rtl) {
935
984
  xText = (3 + i + quarter) * columnWidth;
@@ -952,26 +1001,26 @@ var Calendar = function Calendar(_ref) {
952
1001
  return [topValues, bottomValues];
953
1002
  };
954
1003
 
955
- var getCalendarValuesForMonth = function getCalendarValuesForMonth() {
956
- var topValues = [];
957
- var bottomValues = [];
958
- var topDefaultHeight = headerHeight * 0.5;
1004
+ const getCalendarValuesForMonth = () => {
1005
+ const topValues = [];
1006
+ const bottomValues = [];
1007
+ const topDefaultHeight = headerHeight * 0.5;
959
1008
 
960
- for (var i = 0; i < dateSetup.dates.length; i++) {
961
- var date = dateSetup.dates[i];
962
- 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, {
963
1012
  month: "short"
964
1013
  });
965
1014
  bottomValues.push(React__default.createElement("text", {
966
1015
  key: bottomValue + date.getFullYear(),
967
1016
  y: headerHeight * 0.8,
968
1017
  x: columnWidth * i + columnWidth * 0.5,
969
- className: styles$5.calendarTopText + " " + styles$5.textAnchorEnd
1018
+ className: `${styles$5.calendarTopText} ${styles$5.textAnchorEnd}`
970
1019
  }, bottomValue));
971
1020
 
972
1021
  if (i === 0 || date.getFullYear() !== dateSetup.dates[i - 1].getFullYear()) {
973
- var topValue = date.getFullYear().toString();
974
- var xText = void 0;
1022
+ const topValue = date.getFullYear().toString();
1023
+ let xText;
975
1024
 
976
1025
  if (rtl) {
977
1026
  xText = (6 + i + date.getMonth() + 1) * columnWidth;
@@ -996,27 +1045,27 @@ var Calendar = function Calendar(_ref) {
996
1045
  return [topValues, bottomValues];
997
1046
  };
998
1047
 
999
- var getCalendarValuesForWeek = function getCalendarValuesForWeek() {
1000
- var topValues = [];
1001
- var bottomValues = [];
1002
- var weeksCount = 1;
1003
- var topDefaultHeight = headerHeight * 0.5;
1004
- 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;
1005
1054
 
1006
- for (var i = dates.length - 1; i >= 0; i--) {
1007
- var date = dates[i];
1008
- var topValue = "";
1055
+ for (let i = dates.length - 1; i >= 0; i--) {
1056
+ const date = dates[i];
1057
+ let topValue = "";
1009
1058
 
1010
1059
  if (i === 0 || date.getMonth() !== dates[i - 1].getMonth()) {
1011
- topValue = getLocaleMonth(date, locale) + ", " + date.getFullYear();
1060
+ topValue = `${getLocaleMonth(date, locale)}, ${date.getFullYear()}`;
1012
1061
  }
1013
1062
 
1014
- var bottomValue = "W" + getWeekNumberISO8601(date);
1063
+ const bottomValue = `W${getWeekNumberISO8601(date)}`;
1015
1064
  bottomValues.push(React__default.createElement("text", {
1016
1065
  key: date.getTime(),
1017
1066
  y: headerHeight * 0.8,
1018
1067
  x: columnWidth * (i + +rtl),
1019
- className: styles$5.calendarTopText + " " + styles$5.textAnchorStart
1068
+ className: `${styles$5.calendarTopText} ${styles$5.textAnchorStart}`
1020
1069
  }, bottomValue));
1021
1070
 
1022
1071
  if (topValue) {
@@ -1042,24 +1091,24 @@ var Calendar = function Calendar(_ref) {
1042
1091
  return [topValues, bottomValues];
1043
1092
  };
1044
1093
 
1045
- var getCalendarValuesForDay = function getCalendarValuesForDay() {
1046
- var topValues = [];
1047
- var bottomValues = [];
1048
- var topDefaultHeight = headerHeight * 0.5;
1049
- var dates = dateSetup.dates;
1094
+ const getCalendarValuesForDay = () => {
1095
+ const topValues = [];
1096
+ const bottomValues = [];
1097
+ const topDefaultHeight = headerHeight * 0.5;
1098
+ const dates = dateSetup.dates;
1050
1099
 
1051
- for (var i = 0; i < dates.length; i++) {
1052
- var date = dates[i];
1053
- 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()}`;
1054
1103
  bottomValues.push(React__default.createElement("text", {
1055
1104
  key: date.getTime(),
1056
1105
  y: headerHeight * 0.8,
1057
1106
  x: columnWidth * i + columnWidth * 0.5,
1058
- className: styles$5.calendarTopText + " " + styles$5.textAnchorMiddle
1107
+ className: `${styles$5.calendarTopText} ${styles$5.textAnchorMiddle}`
1059
1108
  }, bottomValue));
1060
1109
 
1061
1110
  if (i + 1 !== dates.length && date.getMonth() !== dates[i + 1].getMonth()) {
1062
- var topValue = getLocaleMonth(date, locale) + " " + date.getFullYear();
1111
+ const topValue = `${getLocaleMonth(date, locale)} ${date.getFullYear()}`;
1063
1112
  topValues.push(React__default.createElement(TopPartOfCalendar, {
1064
1113
  key: topValue + date.getFullYear(),
1065
1114
  value: topValue,
@@ -1075,28 +1124,28 @@ var Calendar = function Calendar(_ref) {
1075
1124
  return [topValues, bottomValues];
1076
1125
  };
1077
1126
 
1078
- var getCalendarValuesForPartOfDay = function getCalendarValuesForPartOfDay() {
1079
- var topValues = [];
1080
- var bottomValues = [];
1081
- var ticks = viewMode === exports.ViewMode.HalfDay ? 2 : 4;
1082
- var topDefaultHeight = headerHeight * 0.5;
1083
- 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;
1084
1133
 
1085
- for (var i = 0; i < dates.length; i++) {
1086
- var date = dates[i];
1087
- var bottomValue = getCachedDateTimeFormat(locale, {
1134
+ for (let i = 0; i < dates.length; i++) {
1135
+ const date = dates[i];
1136
+ const bottomValue = getCachedDateTimeFormat(locale, {
1088
1137
  hour: "numeric"
1089
1138
  }).format(date);
1090
1139
  bottomValues.push(React__default.createElement("text", {
1091
1140
  key: date.getTime(),
1092
1141
  y: headerHeight * 0.8,
1093
1142
  x: columnWidth * (i + +rtl),
1094
- className: styles$5.calendarTopText + " " + styles$5.textAnchorMiddle,
1143
+ className: `${styles$5.calendarTopText} ${styles$5.textAnchorMiddle}`,
1095
1144
  fontFamily: fontFamily
1096
1145
  }, bottomValue));
1097
1146
 
1098
1147
  if (i === 0 || date.getDate() !== dates[i - 1].getDate()) {
1099
- var topValue = getLocalDayOfWeek(date, locale, "short") + ", " + date.getDate() + " " + getLocaleMonth(date, locale);
1148
+ const topValue = `${getLocalDayOfWeek(date, locale, "short")}, ${date.getDate()} ${getLocaleMonth(date, locale)}`;
1100
1149
  topValues.push(React__default.createElement(TopPartOfCalendar, {
1101
1150
  key: topValue + date.getFullYear(),
1102
1151
  value: topValue,
@@ -1112,15 +1161,15 @@ var Calendar = function Calendar(_ref) {
1112
1161
  return [topValues, bottomValues];
1113
1162
  };
1114
1163
 
1115
- var getCalendarValuesForHour = function getCalendarValuesForHour() {
1116
- var topValues = [];
1117
- var bottomValues = [];
1118
- var topDefaultHeight = headerHeight * 0.5;
1119
- var dates = dateSetup.dates;
1164
+ const getCalendarValuesForHour = () => {
1165
+ const topValues = [];
1166
+ const bottomValues = [];
1167
+ const topDefaultHeight = headerHeight * 0.5;
1168
+ const dates = dateSetup.dates;
1120
1169
 
1121
- for (var i = 0; i < dates.length; i++) {
1122
- var date = dates[i];
1123
- var bottomValue = getCachedDateTimeFormat(locale, {
1170
+ for (let i = 0; i < dates.length; i++) {
1171
+ const date = dates[i];
1172
+ const bottomValue = getCachedDateTimeFormat(locale, {
1124
1173
  hour: "numeric"
1125
1174
  }).format(date);
1126
1175
  bottomValues.push(React__default.createElement("text", {
@@ -1132,9 +1181,9 @@ var Calendar = function Calendar(_ref) {
1132
1181
  }, bottomValue));
1133
1182
 
1134
1183
  if (i !== 0 && date.getDate() !== dates[i - 1].getDate()) {
1135
- var displayDate = dates[i - 1];
1136
- var topValue = getLocalDayOfWeek(displayDate, locale, "long") + ", " + displayDate.getDate() + " " + getLocaleMonth(displayDate, locale);
1137
- 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;
1138
1187
  topValues.push(React__default.createElement(TopPartOfCalendar, {
1139
1188
  key: topValue + displayDate.getFullYear(),
1140
1189
  value: topValue,
@@ -1150,58 +1199,37 @@ var Calendar = function Calendar(_ref) {
1150
1199
  return [topValues, bottomValues];
1151
1200
  };
1152
1201
 
1153
- var topValues = [];
1154
- var bottomValues = [];
1202
+ let topValues = [];
1203
+ let bottomValues = [];
1155
1204
 
1156
1205
  switch (dateSetup.viewMode) {
1157
1206
  case exports.ViewMode.Year:
1158
- var _getCalendarValuesFor = getCalendarValuesForYear();
1159
-
1160
- topValues = _getCalendarValuesFor[0];
1161
- bottomValues = _getCalendarValuesFor[1];
1207
+ [topValues, bottomValues] = getCalendarValuesForYear();
1162
1208
  break;
1163
1209
 
1164
1210
  case exports.ViewMode.Quarter:
1165
- var _getCalendarValuesFor2 = getCalendarValuesForQuarter();
1166
-
1167
- topValues = _getCalendarValuesFor2[0];
1168
- bottomValues = _getCalendarValuesFor2[1];
1211
+ [topValues, bottomValues] = getCalendarValuesForQuarter();
1169
1212
  break;
1170
1213
 
1171
1214
  case exports.ViewMode.Month:
1172
- var _getCalendarValuesFor3 = getCalendarValuesForMonth();
1173
-
1174
- topValues = _getCalendarValuesFor3[0];
1175
- bottomValues = _getCalendarValuesFor3[1];
1215
+ [topValues, bottomValues] = getCalendarValuesForMonth();
1176
1216
  break;
1177
1217
 
1178
1218
  case exports.ViewMode.Week:
1179
- var _getCalendarValuesFor4 = getCalendarValuesForWeek();
1180
-
1181
- topValues = _getCalendarValuesFor4[0];
1182
- bottomValues = _getCalendarValuesFor4[1];
1219
+ [topValues, bottomValues] = getCalendarValuesForWeek();
1183
1220
  break;
1184
1221
 
1185
1222
  case exports.ViewMode.Day:
1186
- var _getCalendarValuesFor5 = getCalendarValuesForDay();
1187
-
1188
- topValues = _getCalendarValuesFor5[0];
1189
- bottomValues = _getCalendarValuesFor5[1];
1223
+ [topValues, bottomValues] = getCalendarValuesForDay();
1190
1224
  break;
1191
1225
 
1192
1226
  case exports.ViewMode.QuarterDay:
1193
1227
  case exports.ViewMode.HalfDay:
1194
- var _getCalendarValuesFor6 = getCalendarValuesForPartOfDay();
1195
-
1196
- topValues = _getCalendarValuesFor6[0];
1197
- bottomValues = _getCalendarValuesFor6[1];
1228
+ [topValues, bottomValues] = getCalendarValuesForPartOfDay();
1198
1229
  break;
1199
1230
 
1200
1231
  case exports.ViewMode.Hour:
1201
- var _getCalendarValuesFor7 = getCalendarValuesForHour();
1202
-
1203
- topValues = _getCalendarValuesFor7[0];
1204
- bottomValues = _getCalendarValuesFor7[1];
1232
+ [topValues, bottomValues] = getCalendarValuesForHour();
1205
1233
  }
1206
1234
 
1207
1235
  return React__default.createElement("g", {
@@ -1237,27 +1265,23 @@ function _catch(body, recover) {
1237
1265
  return result;
1238
1266
  }
1239
1267
 
1240
- var Arrow = function Arrow(_ref) {
1241
- var taskFrom = _ref.taskFrom,
1242
- taskTo = _ref.taskTo,
1243
- rowHeight = _ref.rowHeight,
1244
- taskHeight = _ref.taskHeight,
1245
- arrowIndent = _ref.arrowIndent,
1246
- rtl = _ref.rtl,
1247
- arrowColor = _ref.arrowColor;
1248
- var path;
1249
- 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;
1250
1280
 
1251
1281
  if (rtl) {
1252
- var _drownPathAndTriangle = drownPathAndTriangleRTL(taskFrom, taskTo, rowHeight, taskHeight, arrowIndent);
1253
-
1254
- path = _drownPathAndTriangle[0];
1255
- trianglePoints = _drownPathAndTriangle[1];
1282
+ [path, trianglePoints] = drownPathAndTriangleRTL(taskFrom, taskTo, rowHeight, taskHeight, arrowIndent);
1256
1283
  } else {
1257
- var _drownPathAndTriangle2 = drownPathAndTriangle(taskFrom, taskTo, rowHeight, taskHeight, arrowIndent);
1258
-
1259
- path = _drownPathAndTriangle2[0];
1260
- trianglePoints = _drownPathAndTriangle2[1];
1284
+ [path, trianglePoints] = drownPathAndTriangle(taskFrom, taskTo, rowHeight, taskHeight, arrowIndent);
1261
1285
  }
1262
1286
 
1263
1287
  return React__default.createElement("g", {
@@ -1273,8 +1297,8 @@ var Arrow = function Arrow(_ref) {
1273
1297
  }));
1274
1298
  };
1275
1299
 
1276
- var drownPathAndTriangle = function drownPathAndTriangle(taskFrom, taskTo, rowHeight, taskHeight, arrowIndent) {
1277
- var taskToStart, taskFromEnd;
1300
+ const drownPathAndTriangle = (taskFrom, taskTo, rowHeight, taskHeight, arrowIndent) => {
1301
+ let taskToStart, taskFromEnd;
1278
1302
 
1279
1303
  if (taskTo.x1 > 0 && taskTo.actualx1 > 0) {
1280
1304
  taskToStart = Math.min(taskTo.x1, taskTo.actualx1);
@@ -1284,24 +1308,38 @@ var drownPathAndTriangle = function drownPathAndTriangle(taskFrom, taskTo, rowHe
1284
1308
  taskFromEnd = Math.max(taskFrom.x2, taskFrom.actualx2);
1285
1309
  } else if (taskFrom.x2 > 0) taskFromEnd = taskFrom.x2;else if (taskFrom.actualx2 > 0) taskFromEnd = taskFrom.actualx2;else taskFromEnd = 0;
1286
1310
 
1287
- var indexCompare = taskFrom.index > taskTo.index ? -1 : 1;
1288
- var taskToEndPosition = taskTo.y + taskHeight / 2;
1289
- var taskFromEndPosition = taskFromEnd + arrowIndent * 2;
1290
- var taskFromHorizontalOffsetValue = taskFromEndPosition < taskToStart ? "" : "H " + (taskToStart - arrowIndent);
1291
- var taskToHorizontalOffsetValue = taskFromEndPosition > taskToStart ? arrowIndent : taskToStart - taskFromEnd - arrowIndent;
1292
- var path = "M " + taskFromEnd + " " + (taskFrom.y + taskHeight / 2) + " \n h " + arrowIndent + " \n v " + indexCompare * rowHeight / 2 + " \n " + taskFromHorizontalOffsetValue + "\n V " + taskToEndPosition + " \n h " + taskToHorizontalOffsetValue;
1293
- 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}`;
1294
1325
  return [path, trianglePoints];
1295
1326
  };
1296
1327
 
1297
- var drownPathAndTriangleRTL = function drownPathAndTriangleRTL(taskFrom, taskTo, rowHeight, taskHeight, arrowIndent) {
1298
- var indexCompare = taskFrom.index > taskTo.index ? -1 : 1;
1299
- var taskToEndPosition = taskTo.y + taskHeight / 2;
1300
- var taskFromEndPosition = taskFrom.x1 - arrowIndent * 2;
1301
- var taskFromHorizontalOffsetValue = taskFromEndPosition > taskTo.x2 ? "" : "H " + (taskTo.x2 + arrowIndent);
1302
- var taskToHorizontalOffsetValue = taskFromEndPosition < taskTo.x2 ? -arrowIndent : taskTo.x2 - taskFrom.x1 + arrowIndent;
1303
- 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;
1304
- 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}`;
1305
1343
  return [path, trianglePoints];
1306
1344
  };
1307
1345
 
@@ -1751,24 +1789,26 @@ var sortTasks = function sortTasks(taskA, taskB) {
1751
1789
  }
1752
1790
  };
1753
1791
 
1754
- var BarDisplay = function BarDisplay(_ref) {
1755
- var x = _ref.x,
1756
- y = _ref.y,
1757
- type = _ref.type,
1758
- width = _ref.width,
1759
- height = _ref.height,
1760
- isSelected = _ref.isSelected,
1761
- progressX = _ref.progressX,
1762
- progressWidth = _ref.progressWidth,
1763
- barCornerRadius = _ref.barCornerRadius,
1764
- styles = _ref.styles,
1765
- onMouseDown = _ref.onMouseDown;
1766
-
1767
- 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 = () => {
1768
1808
  return isSelected ? styles.progressSelectedColor : styles.progressColor;
1769
1809
  };
1770
1810
 
1771
- var getBarColor = function getBarColor() {
1811
+ const getBarColor = () => {
1772
1812
  return isSelected ? styles.backgroundSelectedColor : styles.backgroundColor;
1773
1813
  };
1774
1814
 
@@ -1815,13 +1855,15 @@ var BarDisplay = function BarDisplay(_ref) {
1815
1855
 
1816
1856
  var styles$6 = {"barWrapper":"_KxSXS","barHandle":"_3w_5u","barBackground":"_31ERP"};
1817
1857
 
1818
- var BarDateHandle = function BarDateHandle(_ref) {
1819
- var x = _ref.x,
1820
- y = _ref.y,
1821
- width = _ref.width,
1822
- height = _ref.height,
1823
- barCornerRadius = _ref.barCornerRadius,
1824
- onMouseDown = _ref.onMouseDown;
1858
+ const BarDateHandle = _ref => {
1859
+ let {
1860
+ x,
1861
+ y,
1862
+ width,
1863
+ height,
1864
+ barCornerRadius,
1865
+ onMouseDown
1866
+ } = _ref;
1825
1867
  return React__default.createElement("rect", {
1826
1868
  x: x,
1827
1869
  y: y,
@@ -1834,22 +1876,22 @@ var BarDateHandle = function BarDateHandle(_ref) {
1834
1876
  });
1835
1877
  };
1836
1878
 
1837
- var BarProgressHandle = function BarProgressHandle(_ref) {
1838
- _objectDestructuringEmpty(_ref);
1839
-
1879
+ const BarProgressHandle = _ref => {
1840
1880
  return React__default.createElement("div", null);
1841
1881
  };
1842
1882
 
1843
- var Bar = function Bar(_ref) {
1844
- var task = _ref.task,
1845
- isProgressChangeable = _ref.isProgressChangeable,
1846
- isDateChangeable = _ref.isDateChangeable,
1847
- rtl = _ref.rtl,
1848
- type = _ref.type,
1849
- onEventStart = _ref.onEventStart,
1850
- isSelected = _ref.isSelected;
1851
- var progressPoint = getProgressPoint(+!rtl * task.progressWidth + task.progressX, task.y, task.height);
1852
- 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;
1853
1895
 
1854
1896
  if (type == "planned") {
1855
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", {
@@ -1868,7 +1910,7 @@ var Bar = function Bar(_ref) {
1868
1910
  barCornerRadius: task.barCornerRadius,
1869
1911
  styles: task.styles,
1870
1912
  isSelected: isSelected,
1871
- onMouseDown: function onMouseDown(e) {
1913
+ onMouseDown: e => {
1872
1914
  isDateChangeable && onEventStart("move", task, e, "planned");
1873
1915
  }
1874
1916
  }), React__default.createElement("g", {
@@ -1879,7 +1921,7 @@ var Bar = function Bar(_ref) {
1879
1921
  width: task.handleWidth,
1880
1922
  height: handleHeight,
1881
1923
  barCornerRadius: task.barCornerRadius,
1882
- onMouseDown: function onMouseDown(e) {
1924
+ onMouseDown: e => {
1883
1925
  onEventStart("start", task, e, "planned");
1884
1926
  }
1885
1927
  }), React__default.createElement(BarDateHandle, {
@@ -1888,12 +1930,12 @@ var Bar = function Bar(_ref) {
1888
1930
  width: task.handleWidth,
1889
1931
  height: handleHeight,
1890
1932
  barCornerRadius: task.barCornerRadius,
1891
- onMouseDown: function onMouseDown(e) {
1933
+ onMouseDown: e => {
1892
1934
  onEventStart("end", task, e, "planned");
1893
1935
  }
1894
1936
  })), isProgressChangeable && React__default.createElement(BarProgressHandle, {
1895
1937
  progressPoint: progressPoint,
1896
- onMouseDown: function onMouseDown(e) {
1938
+ onMouseDown: e => {
1897
1939
  onEventStart("progress", task, e, "planned");
1898
1940
  }
1899
1941
  })));else return React__default.createElement("g", {
@@ -1917,7 +1959,7 @@ var Bar = function Bar(_ref) {
1917
1959
  barCornerRadius: task.barCornerRadius,
1918
1960
  styles: task.styles,
1919
1961
  isSelected: isSelected,
1920
- onMouseDown: function onMouseDown(e) {
1962
+ onMouseDown: e => {
1921
1963
  isDateChangeable && onEventStart("move", task, e, "actual");
1922
1964
  }
1923
1965
  }), React__default.createElement("g", {
@@ -1928,7 +1970,7 @@ var Bar = function Bar(_ref) {
1928
1970
  width: task.handleWidth,
1929
1971
  height: handleHeight,
1930
1972
  barCornerRadius: task.barCornerRadius,
1931
- onMouseDown: function onMouseDown(e) {
1973
+ onMouseDown: e => {
1932
1974
  onEventStart("start", task, e, "actual");
1933
1975
  }
1934
1976
  }), React__default.createElement(BarDateHandle, {
@@ -1937,12 +1979,12 @@ var Bar = function Bar(_ref) {
1937
1979
  width: task.handleWidth,
1938
1980
  height: handleHeight,
1939
1981
  barCornerRadius: task.barCornerRadius,
1940
- onMouseDown: function onMouseDown(e) {
1982
+ onMouseDown: e => {
1941
1983
  onEventStart("end", task, e, "actual");
1942
1984
  }
1943
1985
  })), isProgressChangeable && React__default.createElement(BarProgressHandle, {
1944
1986
  progressPoint: progressPoint,
1945
- onMouseDown: function onMouseDown(e) {
1987
+ onMouseDown: e => {
1946
1988
  onEventStart("progress", task, e, "actual");
1947
1989
  }
1948
1990
  })));
@@ -1954,14 +1996,16 @@ var Bar = function Bar(_ref) {
1954
1996
  }
1955
1997
  };
1956
1998
 
1957
- var BarSmall = function BarSmall(_ref) {
1958
- var task = _ref.task,
1959
- type = _ref.type,
1960
- isProgressChangeable = _ref.isProgressChangeable,
1961
- isDateChangeable = _ref.isDateChangeable,
1962
- onEventStart = _ref.onEventStart,
1963
- isSelected = _ref.isSelected;
1964
- 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);
1965
2009
  return React__default.createElement("g", {
1966
2010
  className: styles$6.barWrapper,
1967
2011
  tabIndex: 0
@@ -1978,14 +2022,14 @@ var BarSmall = function BarSmall(_ref) {
1978
2022
  barCornerRadius: task.barCornerRadius,
1979
2023
  styles: task.styles,
1980
2024
  isSelected: isSelected,
1981
- onMouseDown: function onMouseDown(e) {
2025
+ onMouseDown: e => {
1982
2026
  isDateChangeable && onEventStart("move", task, e);
1983
2027
  }
1984
2028
  }), React__default.createElement("g", {
1985
2029
  className: "handleGroup"
1986
2030
  }, isProgressChangeable && React__default.createElement(BarProgressHandle, {
1987
2031
  progressPoint: progressPoint,
1988
- onMouseDown: function onMouseDown(e) {
2032
+ onMouseDown: e => {
1989
2033
  onEventStart("progress", task, e);
1990
2034
  }
1991
2035
  })));
@@ -1993,14 +2037,17 @@ var BarSmall = function BarSmall(_ref) {
1993
2037
 
1994
2038
  var styles$7 = {"milestoneWrapper":"_RRr13","milestoneBackground":"_2P2B1"};
1995
2039
 
1996
- var Milestone = function Milestone(_ref) {
1997
- var task = _ref.task,
1998
- isDateChangeable = _ref.isDateChangeable,
1999
- onEventStart = _ref.onEventStart,
2000
- isSelected = _ref.isSelected;
2001
- var transform = "rotate(45 " + (task.x1 + task.height * 0.356) + " \n " + (task.y + task.height * 0.85) + ")";
2002
-
2003
- 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 = () => {
2004
2051
  return isSelected ? task.styles.backgroundSelectedColor : task.styles.backgroundColor;
2005
2052
  };
2006
2053
 
@@ -2017,7 +2064,7 @@ var Milestone = function Milestone(_ref) {
2017
2064
  ry: task.barCornerRadius,
2018
2065
  transform: transform,
2019
2066
  className: styles$7.milestoneBackground,
2020
- onMouseDown: function onMouseDown(e) {
2067
+ onMouseDown: e => {
2021
2068
  isDateChangeable && onEventStart("move", task, e);
2022
2069
  }
2023
2070
  }));
@@ -2025,14 +2072,16 @@ var Milestone = function Milestone(_ref) {
2025
2072
 
2026
2073
  var styles$8 = {"projectWrapper":"_1KJ6x","projectBackground":"_2RbVy","projectTop":"_2pZMF"};
2027
2074
 
2028
- var Project = function Project(_ref) {
2029
- var task = _ref.task,
2030
- isSelected = _ref.isSelected;
2031
- var barColor = isSelected ? task.styles.backgroundSelectedColor : task.styles.backgroundColor;
2032
- var processColor = isSelected ? task.styles.progressSelectedColor : task.styles.progressColor;
2033
- var projectWith = task.x2 - task.x1;
2034
- 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(",");
2035
- 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(",");
2036
2085
  return React__default.createElement("g", {
2037
2086
  tabIndex: 0,
2038
2087
  className: styles$8.projectWrapper
@@ -2073,18 +2122,16 @@ var Project = function Project(_ref) {
2073
2122
  }));
2074
2123
  };
2075
2124
 
2076
- var TaskItem = function TaskItem(props) {
2077
- var _props = _extends({}, props),
2078
- task = _props.task,
2079
- isDelete = _props.isDelete,
2080
- isSelected = _props.isSelected,
2081
- onEventStart = _props.onEventStart;
2082
-
2083
- var _useState = React.useState([React__default.createElement("div", null)]),
2084
- taskItem = _useState[0],
2085
- setTaskItem = _useState[1];
2086
-
2087
- 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(() => {
2088
2135
  switch (task.typeInternal) {
2089
2136
  case "milestone":
2090
2137
  if (task.x1 >= 0 && task.actualx1 >= 0) setTaskItem([React__default.createElement(Milestone, Object.assign({}, props))]);else setTaskItem([]);
@@ -2100,27 +2147,27 @@ var TaskItem = function TaskItem(props) {
2100
2147
 
2101
2148
  default:
2102
2149
  {
2103
- var _taskItem = [];
2150
+ let taskItem = [];
2104
2151
 
2105
2152
  if ((task === null || task === void 0 ? void 0 : task.x1) >= 0 && (task === null || task === void 0 ? void 0 : task.x2) >= 0) {
2106
- _taskItem.push(React__default.createElement(Bar, Object.assign({}, props, {
2153
+ taskItem.push(React__default.createElement(Bar, Object.assign({}, props, {
2107
2154
  type: "planned"
2108
2155
  })));
2109
2156
  }
2110
2157
 
2111
2158
  if ((task === null || task === void 0 ? void 0 : task.actualx1) >= 0 && (task === null || task === void 0 ? void 0 : task.actualx2) >= 0) {
2112
- _taskItem.push(React__default.createElement(Bar, Object.assign({}, props, {
2159
+ taskItem.push(React__default.createElement(Bar, Object.assign({}, props, {
2113
2160
  type: "actual"
2114
2161
  })));
2115
2162
  }
2116
2163
 
2117
- setTaskItem(_taskItem);
2164
+ setTaskItem(taskItem);
2118
2165
  }
2119
2166
  break;
2120
2167
  }
2121
2168
  }, [task, isSelected]);
2122
2169
  return React__default.createElement("g", null, React__default.createElement("g", {
2123
- onKeyDown: function onKeyDown(e) {
2170
+ onKeyDown: e => {
2124
2171
  switch (e.key) {
2125
2172
  case "Delete":
2126
2173
  {
@@ -2131,20 +2178,20 @@ var TaskItem = function TaskItem(props) {
2131
2178
 
2132
2179
  e.stopPropagation();
2133
2180
  },
2134
- onMouseEnter: function onMouseEnter(e) {
2181
+ onMouseEnter: e => {
2135
2182
  onEventStart("mouseenter", task, e, "planned");
2136
2183
  },
2137
- onMouseLeave: function onMouseLeave(e) {
2184
+ onMouseLeave: e => {
2138
2185
  onEventStart("mouseleave", task, e, "planned");
2139
2186
  },
2140
- onDoubleClick: function onDoubleClick(e) {
2187
+ onDoubleClick: e => {
2141
2188
  onEventStart("dblclick", task, e, "planned");
2142
2189
  },
2143
- onClick: function onClick(e) {
2190
+ onClick: e => {
2144
2191
  onEventStart("click", task, e, "planned");
2145
2192
  }
2146
2193
  }, taskItem[0]), React__default.createElement("g", {
2147
- onKeyDown: function onKeyDown(e) {
2194
+ onKeyDown: e => {
2148
2195
  switch (e.key) {
2149
2196
  case "Delete":
2150
2197
  {
@@ -2155,82 +2202,74 @@ var TaskItem = function TaskItem(props) {
2155
2202
 
2156
2203
  e.stopPropagation();
2157
2204
  },
2158
- onMouseEnter: function onMouseEnter(e) {
2205
+ onMouseEnter: e => {
2159
2206
  onEventStart("mouseenter", task, e, "actual");
2160
2207
  },
2161
- onMouseLeave: function onMouseLeave(e) {
2208
+ onMouseLeave: e => {
2162
2209
  onEventStart("mouseleave", task, e, "actual");
2163
2210
  },
2164
- onDoubleClick: function onDoubleClick(e) {
2211
+ onDoubleClick: e => {
2165
2212
  onEventStart("dblclick", task, e, "actual");
2166
2213
  },
2167
- onClick: function onClick(e) {
2214
+ onClick: e => {
2168
2215
  onEventStart("click", task, e, "actual");
2169
2216
  }
2170
2217
  }, taskItem[1]));
2171
2218
  };
2172
2219
 
2173
- var TaskGanttContent = function TaskGanttContent(_ref) {
2220
+ const TaskGanttContent = _ref => {
2174
2221
  var _svg$current;
2175
2222
 
2176
- var tasks = _ref.tasks,
2177
- dates = _ref.dates,
2178
- ganttEvent = _ref.ganttEvent,
2179
- selectedTask = _ref.selectedTask,
2180
- rowHeight = _ref.rowHeight,
2181
- columnWidth = _ref.columnWidth,
2182
- timeStep = _ref.timeStep,
2183
- svg = _ref.svg,
2184
- taskHeight = _ref.taskHeight,
2185
- arrowIndent = _ref.arrowIndent,
2186
- fontFamily = _ref.fontFamily,
2187
- fontSize = _ref.fontSize,
2188
- rtl = _ref.rtl,
2189
- setGanttEvent = _ref.setGanttEvent,
2190
- setFailedTask = _ref.setFailedTask,
2191
- setSelectedTask = _ref.setSelectedTask,
2192
- onDateChange = _ref.onDateChange,
2193
- onProgressChange = _ref.onProgressChange,
2194
- onDoubleClick = _ref.onDoubleClick,
2195
- onClick = _ref.onClick,
2196
- onDelete = _ref.onDelete;
2197
- var point = svg === null || svg === void 0 ? void 0 : (_svg$current = svg.current) === null || _svg$current === void 0 ? void 0 : _svg$current.createSVGPoint();
2198
-
2199
- var _useState = React.useState(0),
2200
- xStep = _useState[0],
2201
- setXStep = _useState[1];
2202
-
2203
- var _useState2 = React.useState(0),
2204
- initEventX1Delta = _useState2[0],
2205
- setInitEventX1Delta = _useState2[1];
2206
-
2207
- var _useState3 = React.useState(false),
2208
- isMoving = _useState3[0],
2209
- setIsMoving = _useState3[1];
2210
-
2211
- React.useEffect(function () {
2212
- var dateDelta = dates[1].getTime() - dates[0].getTime() - dates[1].getTimezoneOffset() * 60 * 1000 + dates[0].getTimezoneOffset() * 60 * 1000;
2213
- 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;
2214
2253
  setXStep(newXStep);
2215
2254
  }, [columnWidth, dates, timeStep]);
2216
- React.useEffect(function () {
2217
- var handleMouseMove = function handleMouseMove(event) {
2255
+ React.useEffect(() => {
2256
+ const handleMouseMove = function (event) {
2218
2257
  try {
2219
2258
  var _svg$current$getScree;
2220
2259
 
2221
2260
  if (!ganttEvent.changedTask || !point || !(svg !== null && svg !== void 0 && svg.current)) return Promise.resolve();
2222
2261
  event.preventDefault();
2223
2262
  point.x = event.clientX;
2224
- 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());
2225
-
2226
- var _handleTaskBySVGMouse = handleTaskBySVGMouseEvent(cursor.x, ganttEvent.action, ganttEvent.changedTask, ganttEvent.type, xStep, timeStep, initEventX1Delta, rtl),
2227
- isChanged = _handleTaskBySVGMouse.isChanged,
2228
- 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);
2229
2268
 
2230
2269
  if (isChanged) {
2231
2270
  setGanttEvent({
2232
2271
  action: ganttEvent.action,
2233
- changedTask: changedTask
2272
+ changedTask
2234
2273
  });
2235
2274
  }
2236
2275
 
@@ -2240,40 +2279,41 @@ var TaskGanttContent = function TaskGanttContent(_ref) {
2240
2279
  }
2241
2280
  };
2242
2281
 
2243
- var handleMouseUp = function handleMouseUp(event) {
2282
+ const handleMouseUp = function (event) {
2244
2283
  try {
2245
2284
  var _svg$current$getScree2;
2246
2285
 
2247
- var _temp6 = function _temp6() {
2286
+ function _temp5() {
2248
2287
  if (!operationSuccess) {
2249
2288
  setFailedTask(originalSelectedTask);
2250
2289
  }
2251
- };
2290
+ }
2252
2291
 
2253
- var action = ganttEvent.action,
2254
- originalSelectedTask = ganttEvent.originalSelectedTask,
2255
- changedTask = ganttEvent.changedTask,
2256
- type = ganttEvent.type;
2292
+ const {
2293
+ action,
2294
+ originalSelectedTask,
2295
+ changedTask,
2296
+ type
2297
+ } = ganttEvent;
2257
2298
  if (!changedTask || !point || !(svg !== null && svg !== void 0 && svg.current) || !originalSelectedTask) return Promise.resolve();
2258
2299
  event.preventDefault();
2259
2300
  point.x = event.clientX;
2260
- 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());
2261
-
2262
- var _handleTaskBySVGMouse2 = handleTaskBySVGMouseEvent(cursor.x, action, changedTask, type, xStep, timeStep, initEventX1Delta, rtl),
2263
- newChangedTask = _handleTaskBySVGMouse2.changedTask;
2264
-
2265
- 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;
2266
2306
  svg.current.removeEventListener("mousemove", handleMouseMove);
2267
2307
  svg.current.removeEventListener("mouseup", handleMouseUp);
2268
2308
  setGanttEvent({
2269
2309
  action: ""
2270
2310
  });
2271
2311
  setIsMoving(false);
2272
- var operationSuccess = true;
2312
+ let operationSuccess = true;
2273
2313
 
2274
- var _temp7 = function () {
2314
+ const _temp4 = function () {
2275
2315
  if ((action === "move" || action === "end" || action === "start") && onDateChange && isNotLikeOriginal) {
2276
- var _temp8 = _catch(function () {
2316
+ const _temp = _catch(function () {
2277
2317
  return Promise.resolve(onDateChange(newChangedTask, newChangedTask.barChildren)).then(function (result) {
2278
2318
  if (result !== undefined) {
2279
2319
  operationSuccess = result;
@@ -2283,11 +2323,11 @@ var TaskGanttContent = function TaskGanttContent(_ref) {
2283
2323
  operationSuccess = false;
2284
2324
  });
2285
2325
 
2286
- if (_temp8 && _temp8.then) return _temp8.then(function () {});
2326
+ if (_temp && _temp.then) return _temp.then(function () {});
2287
2327
  } else {
2288
- var _temp9 = function () {
2328
+ const _temp3 = function () {
2289
2329
  if (onProgressChange && isNotLikeOriginal) {
2290
- var _temp10 = _catch(function () {
2330
+ const _temp2 = _catch(function () {
2291
2331
  return Promise.resolve(onProgressChange(newChangedTask, newChangedTask.barChildren)).then(function (result) {
2292
2332
  if (result !== undefined) {
2293
2333
  operationSuccess = result;
@@ -2297,15 +2337,15 @@ var TaskGanttContent = function TaskGanttContent(_ref) {
2297
2337
  operationSuccess = false;
2298
2338
  });
2299
2339
 
2300
- if (_temp10 && _temp10.then) return _temp10.then(function () {});
2340
+ if (_temp2 && _temp2.then) return _temp2.then(function () {});
2301
2341
  }
2302
2342
  }();
2303
2343
 
2304
- if (_temp9 && _temp9.then) return _temp9.then(function () {});
2344
+ if (_temp3 && _temp3.then) return _temp3.then(function () {});
2305
2345
  }
2306
2346
  }();
2307
2347
 
2308
- return Promise.resolve(_temp7 && _temp7.then ? _temp7.then(_temp6) : _temp6(_temp7));
2348
+ return Promise.resolve(_temp4 && _temp4.then ? _temp4.then(_temp5) : _temp5(_temp4));
2309
2349
  } catch (e) {
2310
2350
  return Promise.reject(e);
2311
2351
  }
@@ -2318,7 +2358,7 @@ var TaskGanttContent = function TaskGanttContent(_ref) {
2318
2358
  }
2319
2359
  }, [ganttEvent, xStep, initEventX1Delta, onProgressChange, timeStep, onDateChange, svg, isMoving, point, rtl, setFailedTask, setGanttEvent]);
2320
2360
 
2321
- var handleBarEventStart = function handleBarEventStart(action, task, event, type) {
2361
+ const handleBarEventStart = function (action, task, event, type) {
2322
2362
  try {
2323
2363
  return Promise.resolve(function () {
2324
2364
  if (!event) {
@@ -2327,15 +2367,15 @@ var TaskGanttContent = function TaskGanttContent(_ref) {
2327
2367
  }
2328
2368
  } else return function () {
2329
2369
  if (isKeyboardEvent(event)) {
2330
- var _temp14 = function () {
2370
+ const _temp8 = function () {
2331
2371
  if (action === "delete") {
2332
- var _temp15 = function () {
2372
+ const _temp7 = function () {
2333
2373
  if (onDelete) {
2334
- var _temp16 = _catch(function () {
2374
+ const _temp6 = _catch(function () {
2335
2375
  return Promise.resolve(onDelete(task)).then(function (result) {
2336
2376
  if (result !== undefined && result) {
2337
2377
  setGanttEvent({
2338
- action: action,
2378
+ action,
2339
2379
  changedTask: task
2340
2380
  });
2341
2381
  }
@@ -2344,19 +2384,19 @@ var TaskGanttContent = function TaskGanttContent(_ref) {
2344
2384
  console.error("Error on Delete. " + error);
2345
2385
  });
2346
2386
 
2347
- if (_temp16 && _temp16.then) return _temp16.then(function () {});
2387
+ if (_temp6 && _temp6.then) return _temp6.then(function () {});
2348
2388
  }
2349
2389
  }();
2350
2390
 
2351
- if (_temp15 && _temp15.then) return _temp15.then(function () {});
2391
+ if (_temp7 && _temp7.then) return _temp7.then(function () {});
2352
2392
  }
2353
2393
  }();
2354
2394
 
2355
- if (_temp14 && _temp14.then) return _temp14.then(function () {});
2395
+ if (_temp8 && _temp8.then) return _temp8.then(function () {});
2356
2396
  } else if (action === "mouseenter") {
2357
2397
  if (!ganttEvent.action) {
2358
2398
  setGanttEvent({
2359
- action: action,
2399
+ action,
2360
2400
  changedTask: task,
2361
2401
  originalSelectedTask: task,
2362
2402
  type: type
@@ -2377,17 +2417,17 @@ var TaskGanttContent = function TaskGanttContent(_ref) {
2377
2417
 
2378
2418
  if (!(svg !== null && svg !== void 0 && svg.current) || !point) return;
2379
2419
  point.x = event.clientX;
2380
- 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());
2381
2421
  if (type == "planned") setInitEventX1Delta(cursor.x - task.x1);else if (type == "actual") setInitEventX1Delta(cursor.x - task.actualx1);
2382
2422
  setGanttEvent({
2383
- action: action,
2423
+ action,
2384
2424
  changedTask: task,
2385
2425
  originalSelectedTask: task,
2386
2426
  type: type
2387
2427
  });
2388
2428
  } else {
2389
2429
  setGanttEvent({
2390
- action: action,
2430
+ action,
2391
2431
  changedTask: task,
2392
2432
  originalSelectedTask: task,
2393
2433
  type: type
@@ -2404,8 +2444,8 @@ var TaskGanttContent = function TaskGanttContent(_ref) {
2404
2444
  className: "content"
2405
2445
  }, React__default.createElement("g", {
2406
2446
  className: "arrows"
2407
- }, tasks.map(function (_task) {
2408
- 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;
2409
2449
 
2410
2450
  if (!task) {
2411
2451
  return React__default.createElement("g", {
@@ -2416,20 +2456,18 @@ var TaskGanttContent = function TaskGanttContent(_ref) {
2416
2456
  });
2417
2457
  }
2418
2458
 
2419
- return task.barChildren.map(function (child) {
2459
+ return task.barChildren.map(child => {
2420
2460
  var _task$criticalPathArr, _task$criticalPathArr2;
2421
2461
 
2422
2462
  if (task.x2 > task.x1 || task.actualx2 > task.actualx1) return React__default.createElement(Arrow, {
2423
- key: "Arrow from " + task.id + " to " + tasks[child.index].id,
2463
+ key: `Arrow from ${task.id} to ${tasks[child.index].id}`,
2424
2464
  taskFrom: task,
2425
2465
  taskTo: tasks[child.index],
2426
2466
  rowHeight: rowHeight,
2427
2467
  taskHeight: taskHeight,
2428
2468
  arrowIndent: arrowIndent,
2429
2469
  rtl: rtl,
2430
- arrowColor: ((_task$criticalPathArr = task.criticalPathArrows) === null || _task$criticalPathArr === void 0 ? void 0 : (_task$criticalPathArr2 = _task$criticalPathArr.find(function (arrow) {
2431
- return arrow.taskId == tasks[child.index].id;
2432
- })) === 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"
2433
2471
  });else return React__default.createElement("g", {
2434
2472
  key: _task.id,
2435
2473
  style: {
@@ -2441,8 +2479,8 @@ var TaskGanttContent = function TaskGanttContent(_ref) {
2441
2479
  className: "bar",
2442
2480
  fontFamily: fontFamily,
2443
2481
  fontSize: fontSize
2444
- }, tasks.map(function (_task) {
2445
- 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;
2446
2484
 
2447
2485
  if (!task) {
2448
2486
  return React__default.createElement("g", {
@@ -2634,6 +2672,7 @@ var Gantt = function Gantt(_ref) {
2634
2672
  onDelete = _ref.onDelete,
2635
2673
  onSelect = _ref.onSelect,
2636
2674
  onExpanderClick = _ref.onExpanderClick,
2675
+ onMultiSelect = _ref.onMultiSelect,
2637
2676
  taskLabelRenderer = _ref.taskLabelRenderer;
2638
2677
  var wrapperRef = React.useRef(null);
2639
2678
  var taskListRef = React.useRef(null);
@@ -3041,7 +3080,8 @@ var Gantt = function Gantt(_ref) {
3041
3080
  onDoubleClick: onDoubleClick,
3042
3081
  TaskListHeader: TaskListHeader,
3043
3082
  TaskListTable: TaskListTable,
3044
- taskLabelRenderer: taskLabelRenderer
3083
+ taskLabelRenderer: taskLabelRenderer,
3084
+ onMultiSelect: onMultiSelect
3045
3085
  };
3046
3086
  return React__default.createElement("div", null, React__default.createElement("div", {
3047
3087
  className: styles$9.wrapper,