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