gantt-task-react-powern 0.4.66 → 0.4.68

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -21,6 +21,10 @@ function _extends() {
21
21
  return _extends.apply(this, arguments);
22
22
  }
23
23
 
24
+ function _objectDestructuringEmpty(obj) {
25
+ if (obj == null) throw new TypeError("Cannot destructure undefined");
26
+ }
27
+
24
28
  function _unsupportedIterableToArray(o, minLen) {
25
29
  if (!o) return;
26
30
  if (typeof o === "string") return _arrayLikeToArray(o, minLen);
@@ -281,9 +285,7 @@ var TaskListHeaderDefault = function TaskListHeaderDefault(_ref) {
281
285
  var headerHeight = _ref.headerHeight,
282
286
  fontFamily = _ref.fontFamily,
283
287
  fontSize = _ref.fontSize,
284
- rowWidth = _ref.rowWidth,
285
- allSelected = _ref.allSelected,
286
- onSelectAll = _ref.onSelectAll;
288
+ rowWidth = _ref.rowWidth;
287
289
  return React__default.createElement("div", {
288
290
  className: styles.ganttTable,
289
291
  style: {
@@ -295,19 +297,7 @@ var TaskListHeaderDefault = function TaskListHeaderDefault(_ref) {
295
297
  style: {
296
298
  height: headerHeight - 2
297
299
  }
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", {
300
+ }, React__default.createElement("div", {
311
301
  className: styles.ganttTable_HeaderItem,
312
302
  style: {
313
303
  minWidth: parseInt(rowWidth) * 0.8,
@@ -352,7 +342,7 @@ var TaskListHeaderDefault = function TaskListHeaderDefault(_ref) {
352
342
  }, "Planned End")));
353
343
  };
354
344
 
355
- var styles$1 = {"taskListWrapper":"_3ZbQT","taskListTableRow":"_34SS0","taskListLookAheadRow":"_GzvG4","taskListMilestoneRow":"_3Ykml","taskListCell":"_3lLk3","taskListNameWrapper":"_nI1Xw","taskListExpander":"_2QjE6","taskListExpanderPlaceholder":"_1fnLB","taskListEmptyExpander":"_2TfEi","taskListText":"_2ZvXU"};
345
+ var styles$1 = {"taskListWrapper":"_3ZbQT","taskListTableRow":"_34SS0","taskListCell":"_3lLk3","taskListNameWrapper":"_nI1Xw","taskListExpander":"_2QjE6","taskListExpanderPlaceholder":"_1fnLB","taskListEmptyExpander":"_2TfEi","taskListText":"_2ZvXU"};
356
346
 
357
347
  var localeDateStringCache = {};
358
348
 
@@ -380,15 +370,11 @@ var TaskListTableDefault = function TaskListTableDefault(_ref) {
380
370
  var rowHeight = _ref.rowHeight,
381
371
  rowWidth = _ref.rowWidth,
382
372
  tasks = _ref.tasks,
383
- scheduleType = _ref.scheduleType,
384
373
  leafTasks = _ref.leafTasks,
385
374
  fontFamily = _ref.fontFamily,
386
375
  fontSize = _ref.fontSize,
387
376
  locale = _ref.locale,
388
377
  onExpanderClick = _ref.onExpanderClick,
389
- _ref$selectedTasks = _ref.selectedTasks,
390
- selectedTasks = _ref$selectedTasks === void 0 ? [] : _ref$selectedTasks,
391
- onTaskSelect = _ref.onTaskSelect,
392
378
  _ref$taskLabelRendere = _ref.taskLabelRenderer,
393
379
  taskLabelRenderer = _ref$taskLabelRendere === void 0 ? function (t) {
394
380
  return " " + t.name;
@@ -418,36 +404,13 @@ var TaskListTableDefault = function TaskListTableDefault(_ref) {
418
404
  }
419
405
  }
420
406
 
421
- var isSelected = selectedTasks.includes(t.id);
422
407
  return React__default.createElement("div", {
423
- className: t.type === "milestone" ? styles$1.taskListMilestoneRow : scheduleType === "lookAhead" ? styles$1.taskListLookAheadRow : styles$1.taskListTableRow,
408
+ className: styles$1.taskListTableRow,
424
409
  style: {
425
410
  height: rowHeight
426
411
  },
427
412
  key: t.id + "row"
428
- }, onTaskSelect && React__default.createElement("div", {
429
- className: styles$1.taskListCell,
430
- style: {
431
- minWidth: parseInt(rowWidth) * 0.3,
432
- maxWidth: parseInt(rowWidth) * 0.3
433
- }
434
413
  }, React__default.createElement("div", {
435
- className: styles$1.taskListText,
436
- style: {
437
- display: "flex",
438
- justifyContent: "center",
439
- alignItems: "center",
440
- height: "100%",
441
- paddingLeft: "0",
442
- paddingRight: "0"
443
- }
444
- }, React__default.createElement("input", {
445
- type: "checkbox",
446
- checked: isSelected,
447
- onChange: function onChange(e) {
448
- return onTaskSelect(t.id, e.target.checked);
449
- }
450
- }))), React__default.createElement("div", {
451
414
  className: styles$1.taskListCell,
452
415
  style: {
453
416
  minWidth: parseInt(rowWidth) * 0.8,
@@ -666,7 +629,6 @@ var TaskList = function TaskList(_ref) {
666
629
  rowHeight = _ref.rowHeight,
667
630
  scrollY = _ref.scrollY,
668
631
  tasks = _ref.tasks,
669
- scheduleType = _ref.scheduleType,
670
632
  leafTasks = _ref.leafTasks,
671
633
  selectedTask = _ref.selectedTask,
672
634
  setSelectedTask = _ref.setSelectedTask,
@@ -677,61 +639,18 @@ var TaskList = function TaskList(_ref) {
677
639
  horizontalContainerClass = _ref.horizontalContainerClass,
678
640
  TaskListHeader = _ref.TaskListHeader,
679
641
  TaskListTable = _ref.TaskListTable,
680
- taskLabelRenderer = _ref.taskLabelRenderer,
681
- onMultiSelect = _ref.onMultiSelect;
642
+ taskLabelRenderer = _ref.taskLabelRenderer;
682
643
  var horizontalContainerRef = React.useRef(null);
683
-
684
- var _useState = React.useState([]),
685
- selectedTasks = _useState[0],
686
- setSelectedTasks = _useState[1];
687
-
688
- var prevSelectedTasksRef = React.useRef([]);
689
644
  React.useEffect(function () {
690
645
  if (horizontalContainerRef.current) {
691
646
  horizontalContainerRef.current.scrollTop = scrollY;
692
647
  }
693
648
  }, [scrollY]);
694
- React.useEffect(function () {
695
- if (onMultiSelect && JSON.stringify(prevSelectedTasksRef.current) !== JSON.stringify(selectedTasks)) {
696
- var selectedTaskObjects = tasks.filter(function (task) {
697
- return selectedTasks.includes(task.id);
698
- });
699
- prevSelectedTasksRef.current = [].concat(selectedTasks);
700
- onMultiSelect(selectedTaskObjects);
701
- }
702
- }, [selectedTasks, tasks, onMultiSelect]);
703
-
704
- var handleTaskSelect = function handleTaskSelect(taskId, selected) {
705
- if (selected) {
706
- setSelectedTasks(function (prev) {
707
- return [].concat(prev, [taskId]);
708
- });
709
- } else {
710
- setSelectedTasks(function (prev) {
711
- return prev.filter(function (id) {
712
- return id !== taskId;
713
- });
714
- });
715
- }
716
- };
717
-
718
- var handleSelectAll = function handleSelectAll(selected) {
719
- if (selected) {
720
- setSelectedTasks(tasks.map(function (task) {
721
- return task.id;
722
- }));
723
- } else {
724
- setSelectedTasks([]);
725
- }
726
- };
727
-
728
649
  var headerProps = {
729
650
  headerHeight: headerHeight,
730
651
  fontFamily: fontFamily,
731
652
  fontSize: fontSize,
732
- rowWidth: rowWidth,
733
- allSelected: tasks.length > 0 && selectedTasks.length === tasks.length,
734
- onSelectAll: onMultiSelect ? handleSelectAll : undefined
653
+ rowWidth: rowWidth
735
654
  };
736
655
  var selectedTaskId = selectedTask ? selectedTask.id : "";
737
656
  var tableProps = {
@@ -741,13 +660,10 @@ var TaskList = function TaskList(_ref) {
741
660
  fontSize: fontSize,
742
661
  tasks: tasks,
743
662
  leafTasks: leafTasks,
744
- scheduleType: scheduleType,
745
663
  locale: locale,
746
664
  selectedTaskId: selectedTaskId,
747
665
  setSelectedTask: setSelectedTask,
748
666
  onExpanderClick: onExpanderClick,
749
- selectedTasks: onMultiSelect ? selectedTasks : undefined,
750
- onTaskSelect: onMultiSelect ? handleTaskSelect : undefined,
751
667
  taskLabelRenderer: taskLabelRenderer
752
668
  };
753
669
  return React__default.createElement("div", {
@@ -761,23 +677,19 @@ var TaskList = function TaskList(_ref) {
761
677
  }, React__default.createElement(TaskListTable, Object.assign({}, tableProps))));
762
678
  };
763
679
 
764
- var styles$4 = {"gridRow":"_2dZTy","gridRowLookAhead":"_2RRca","gridRowLine":"_3rUKi","gridTick":"_RuwuK","darkerGridRow":"_2M-tt"};
765
-
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", {
680
+ var styles$4 = {"gridRow":"_2dZTy","gridRowLine":"_3rUKi","gridTick":"_RuwuK","darkerGridRow":"_2M-tt"};
681
+
682
+ var GridBody = function GridBody(_ref) {
683
+ var tasks = _ref.tasks,
684
+ dates = _ref.dates,
685
+ rowHeight = _ref.rowHeight,
686
+ svgWidth = _ref.svgWidth,
687
+ columnWidth = _ref.columnWidth,
688
+ todayColor = _ref.todayColor,
689
+ rtl = _ref.rtl;
690
+ var y = 0;
691
+ var gridRows = [];
692
+ var rowLines = [React__default.createElement("line", {
781
693
  key: "RowLineFirst",
782
694
  x: "0",
783
695
  y1: 0,
@@ -786,15 +698,16 @@ const GridBody = _ref => {
786
698
  className: styles$4.gridRowLine
787
699
  })];
788
700
 
789
- for (const task of tasks) {
790
- const isDarkerRow = task.type === "milestone";
701
+ for (var _iterator = _createForOfIteratorHelperLoose(tasks), _step; !(_step = _iterator()).done;) {
702
+ var task = _step.value;
703
+ var isDarkerRow = task.type === "milestone";
791
704
  gridRows.push(React__default.createElement("rect", {
792
705
  key: "Row" + task.id,
793
706
  x: "0",
794
707
  y: y,
795
708
  width: svgWidth,
796
709
  height: rowHeight,
797
- className: isDarkerRow ? styles$4.darkerGridRow : scheduleType === "lookAhead" ? styles$4.gridRowLookAhead : styles$4.gridRow
710
+ className: isDarkerRow ? styles$4.darkerGridRow : styles$4.gridRow
798
711
  }));
799
712
  rowLines.push(React__default.createElement("line", {
800
713
  key: "RowLine" + task.id,
@@ -807,14 +720,13 @@ const GridBody = _ref => {
807
720
  y += rowHeight;
808
721
  }
809
722
 
810
- const now = new Date();
811
- let tickX = 0;
812
- const ticks = [];
813
- let today = React__default.createElement("rect", null);
814
- let weekend = [];
723
+ var now = new Date();
724
+ var tickX = 0;
725
+ var ticks = [];
726
+ var today = React__default.createElement("rect", null);
815
727
 
816
- for (let i = 0; i < dates.length; i++) {
817
- const date = dates[i];
728
+ for (var i = 0; i < dates.length; i++) {
729
+ var date = dates[i];
818
730
  ticks.push(React__default.createElement("line", {
819
731
  key: date.getTime(),
820
732
  x1: tickX,
@@ -834,16 +746,6 @@ const GridBody = _ref => {
834
746
  });
835
747
  }
836
748
 
837
- if (date.getDay() === 6 || date.getDay() === 0) {
838
- weekend.push(React__default.createElement("rect", {
839
- x: tickX,
840
- y: 0,
841
- width: columnWidth,
842
- height: y,
843
- fill: weekendColor
844
- }));
845
- }
846
-
847
749
  if (rtl && i + 1 !== dates.length && date.getTime() >= now.getTime() && dates[i + 1].getTime() < now.getTime()) {
848
750
  today = React__default.createElement("rect", {
849
751
  x: tickX + columnWidth,
@@ -865,14 +767,12 @@ const GridBody = _ref => {
865
767
  className: "rowLines"
866
768
  }, rowLines), React__default.createElement("g", {
867
769
  className: "ticks"
868
- }, ticks), scheduleType === "lookAhead" && React__default.createElement("g", {
869
- className: "weekend"
870
- }, weekend), React__default.createElement("g", {
770
+ }, ticks), React__default.createElement("g", {
871
771
  className: "today"
872
772
  }, today));
873
773
  };
874
774
 
875
- const Grid = props => {
775
+ var Grid = function Grid(props) {
876
776
  return React__default.createElement("g", {
877
777
  className: "grid"
878
778
  }, React__default.createElement(GridBody, Object.assign({}, props)));
@@ -880,17 +780,16 @@ const Grid = props => {
880
780
 
881
781
  var styles$5 = {"calendarBottomText":"_9w8d5","calendarTopTick":"_1rLuZ","calendarTopText":"_2q1Kt","calendarHeader":"_35nLX","textAnchorStart":"_2Shd-","textAnchorMiddle":"_2XXW4","textAnchorEnd":"_3GdnC"};
882
782
 
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;
783
+ var TopPartOfCalendar = function TopPartOfCalendar(_ref) {
784
+ var value = _ref.value,
785
+ x1Line = _ref.x1Line,
786
+ y1Line = _ref.y1Line,
787
+ y2Line = _ref.y2Line,
788
+ xText = _ref.xText,
789
+ yText = _ref.yText,
790
+ _ref$textAnchor = _ref.textAnchor,
791
+ textAnchor = _ref$textAnchor === void 0 ? "middle" : _ref$textAnchor;
792
+ var textAnchorClass = textAnchor === "start" ? styles$5.textAnchorStart : textAnchor === "middle" ? styles$5.textAnchorMiddle : styles$5.textAnchorEnd;
894
793
  return React__default.createElement("g", {
895
794
  className: "calendarTop"
896
795
  }, React__default.createElement("line", {
@@ -904,30 +803,28 @@ const TopPartOfCalendar = _ref => {
904
803
  key: value + "text",
905
804
  y: yText,
906
805
  x: xText,
907
- className: `${styles$5.calendarTopText} ${textAnchorClass}`
806
+ className: styles$5.calendarTopText + " " + textAnchorClass
908
807
  }, value));
909
808
  };
910
809
 
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();
810
+ var Calendar = function Calendar(_ref) {
811
+ var dateSetup = _ref.dateSetup,
812
+ locale = _ref.locale,
813
+ viewMode = _ref.viewMode,
814
+ rtl = _ref.rtl,
815
+ headerHeight = _ref.headerHeight,
816
+ columnWidth = _ref.columnWidth,
817
+ fontFamily = _ref.fontFamily,
818
+ fontSize = _ref.fontSize;
819
+
820
+ var getCalendarValuesForYear = function getCalendarValuesForYear() {
821
+ var topValues = [];
822
+ var bottomValues = [];
823
+ var topDefaultHeight = headerHeight * 0.5;
824
+
825
+ for (var i = 0; i < dateSetup.dates.length; i++) {
826
+ var date = dateSetup.dates[i];
827
+ var bottomValue = date.getFullYear();
931
828
  bottomValues.push(React__default.createElement("text", {
932
829
  key: date.getFullYear(),
933
830
  y: headerHeight * 0.8,
@@ -936,8 +833,8 @@ const Calendar = _ref => {
936
833
  }, bottomValue));
937
834
 
938
835
  if (i === 0 || date.getFullYear() !== dateSetup.dates[i - 1].getFullYear()) {
939
- const topValue = date.getFullYear().toString();
940
- let xText;
836
+ var topValue = date.getFullYear().toString();
837
+ var xText = void 0;
941
838
 
942
839
  if (rtl) {
943
840
  xText = (6 + i + date.getFullYear() + 1) * columnWidth;
@@ -960,25 +857,25 @@ const Calendar = _ref => {
960
857
  return [topValues, bottomValues];
961
858
  };
962
859
 
963
- const getCalendarValuesForQuarter = () => {
964
- const topValues = [];
965
- const bottomValues = [];
966
- const topDefaultHeight = headerHeight * 0.5;
860
+ var getCalendarValuesForQuarter = function getCalendarValuesForQuarter() {
861
+ var topValues = [];
862
+ var bottomValues = [];
863
+ var topDefaultHeight = headerHeight * 0.5;
967
864
 
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}`;
865
+ for (var i = 0; i < dateSetup.dates.length; i++) {
866
+ var date = dateSetup.dates[i];
867
+ var quarter = Math.floor(date.getMonth() / 3) + 1;
868
+ var bottomValue = "Q" + quarter;
972
869
  bottomValues.push(React__default.createElement("text", {
973
- key: `${bottomValue}-${date.getFullYear()}`,
870
+ key: bottomValue + "-" + date.getFullYear(),
974
871
  y: headerHeight * 0.8,
975
872
  x: columnWidth * i + columnWidth * 0.5,
976
873
  className: styles$5.calendarBottomText
977
874
  }, bottomValue));
978
875
 
979
876
  if (i === 0 || date.getFullYear() !== dateSetup.dates[i - 1].getFullYear()) {
980
- const topValue = date.getFullYear().toString();
981
- let xText;
877
+ var topValue = date.getFullYear().toString();
878
+ var xText = void 0;
982
879
 
983
880
  if (rtl) {
984
881
  xText = (3 + i + quarter) * columnWidth;
@@ -1001,26 +898,26 @@ const Calendar = _ref => {
1001
898
  return [topValues, bottomValues];
1002
899
  };
1003
900
 
1004
- const getCalendarValuesForMonth = () => {
1005
- const topValues = [];
1006
- const bottomValues = [];
1007
- const topDefaultHeight = headerHeight * 0.5;
901
+ var getCalendarValuesForMonth = function getCalendarValuesForMonth() {
902
+ var topValues = [];
903
+ var bottomValues = [];
904
+ var topDefaultHeight = headerHeight * 0.5;
1008
905
 
1009
- for (let i = 0; i < dateSetup.dates.length; i++) {
1010
- const date = dateSetup.dates[i];
1011
- const bottomValue = date.toLocaleString(locale, {
906
+ for (var i = 0; i < dateSetup.dates.length; i++) {
907
+ var date = dateSetup.dates[i];
908
+ var bottomValue = date.toLocaleString(locale, {
1012
909
  month: "short"
1013
910
  });
1014
911
  bottomValues.push(React__default.createElement("text", {
1015
912
  key: bottomValue + date.getFullYear(),
1016
913
  y: headerHeight * 0.8,
1017
914
  x: columnWidth * i + columnWidth * 0.5,
1018
- className: `${styles$5.calendarTopText} ${styles$5.textAnchorEnd}`
915
+ className: styles$5.calendarTopText + " " + styles$5.textAnchorEnd
1019
916
  }, bottomValue));
1020
917
 
1021
918
  if (i === 0 || date.getFullYear() !== dateSetup.dates[i - 1].getFullYear()) {
1022
- const topValue = date.getFullYear().toString();
1023
- let xText;
919
+ var topValue = date.getFullYear().toString();
920
+ var xText = void 0;
1024
921
 
1025
922
  if (rtl) {
1026
923
  xText = (6 + i + date.getMonth() + 1) * columnWidth;
@@ -1045,27 +942,27 @@ const Calendar = _ref => {
1045
942
  return [topValues, bottomValues];
1046
943
  };
1047
944
 
1048
- const getCalendarValuesForWeek = () => {
1049
- const topValues = [];
1050
- const bottomValues = [];
1051
- let weeksCount = 1;
1052
- const topDefaultHeight = headerHeight * 0.5;
1053
- const dates = dateSetup.dates;
945
+ var getCalendarValuesForWeek = function getCalendarValuesForWeek() {
946
+ var topValues = [];
947
+ var bottomValues = [];
948
+ var weeksCount = 1;
949
+ var topDefaultHeight = headerHeight * 0.5;
950
+ var dates = dateSetup.dates;
1054
951
 
1055
- for (let i = dates.length - 1; i >= 0; i--) {
1056
- const date = dates[i];
1057
- let topValue = "";
952
+ for (var i = dates.length - 1; i >= 0; i--) {
953
+ var date = dates[i];
954
+ var topValue = "";
1058
955
 
1059
956
  if (i === 0 || date.getMonth() !== dates[i - 1].getMonth()) {
1060
- topValue = `${getLocaleMonth(date, locale)}, ${date.getFullYear()}`;
957
+ topValue = getLocaleMonth(date, locale) + ", " + date.getFullYear();
1061
958
  }
1062
959
 
1063
- const bottomValue = `W${getWeekNumberISO8601(date)}`;
960
+ var bottomValue = "W" + getWeekNumberISO8601(date);
1064
961
  bottomValues.push(React__default.createElement("text", {
1065
962
  key: date.getTime(),
1066
963
  y: headerHeight * 0.8,
1067
964
  x: columnWidth * (i + +rtl),
1068
- className: `${styles$5.calendarTopText} ${styles$5.textAnchorStart}`
965
+ className: styles$5.calendarTopText + " " + styles$5.textAnchorStart
1069
966
  }, bottomValue));
1070
967
 
1071
968
  if (topValue) {
@@ -1091,24 +988,24 @@ const Calendar = _ref => {
1091
988
  return [topValues, bottomValues];
1092
989
  };
1093
990
 
1094
- const getCalendarValuesForDay = () => {
1095
- const topValues = [];
1096
- const bottomValues = [];
1097
- const topDefaultHeight = headerHeight * 0.5;
1098
- const dates = dateSetup.dates;
991
+ var getCalendarValuesForDay = function getCalendarValuesForDay() {
992
+ var topValues = [];
993
+ var bottomValues = [];
994
+ var topDefaultHeight = headerHeight * 0.5;
995
+ var dates = dateSetup.dates;
1099
996
 
1100
- for (let i = 0; i < dates.length; i++) {
1101
- const date = dates[i];
1102
- const bottomValue = `${getLocalDayOfWeek(date, locale, "short")}, ${date.getDate().toString()}`;
997
+ for (var i = 0; i < dates.length; i++) {
998
+ var date = dates[i];
999
+ var bottomValue = getLocalDayOfWeek(date, locale, "short") + ", " + date.getDate().toString();
1103
1000
  bottomValues.push(React__default.createElement("text", {
1104
1001
  key: date.getTime(),
1105
1002
  y: headerHeight * 0.8,
1106
1003
  x: columnWidth * i + columnWidth * 0.5,
1107
- className: `${styles$5.calendarTopText} ${styles$5.textAnchorMiddle}`
1004
+ className: styles$5.calendarTopText + " " + styles$5.textAnchorMiddle
1108
1005
  }, bottomValue));
1109
1006
 
1110
1007
  if (i + 1 !== dates.length && date.getMonth() !== dates[i + 1].getMonth()) {
1111
- const topValue = `${getLocaleMonth(date, locale)} ${date.getFullYear()}`;
1008
+ var topValue = getLocaleMonth(date, locale) + " " + date.getFullYear();
1112
1009
  topValues.push(React__default.createElement(TopPartOfCalendar, {
1113
1010
  key: topValue + date.getFullYear(),
1114
1011
  value: topValue,
@@ -1124,28 +1021,28 @@ const Calendar = _ref => {
1124
1021
  return [topValues, bottomValues];
1125
1022
  };
1126
1023
 
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;
1024
+ var getCalendarValuesForPartOfDay = function getCalendarValuesForPartOfDay() {
1025
+ var topValues = [];
1026
+ var bottomValues = [];
1027
+ var ticks = viewMode === exports.ViewMode.HalfDay ? 2 : 4;
1028
+ var topDefaultHeight = headerHeight * 0.5;
1029
+ var dates = dateSetup.dates;
1133
1030
 
1134
- for (let i = 0; i < dates.length; i++) {
1135
- const date = dates[i];
1136
- const bottomValue = getCachedDateTimeFormat(locale, {
1031
+ for (var i = 0; i < dates.length; i++) {
1032
+ var date = dates[i];
1033
+ var bottomValue = getCachedDateTimeFormat(locale, {
1137
1034
  hour: "numeric"
1138
1035
  }).format(date);
1139
1036
  bottomValues.push(React__default.createElement("text", {
1140
1037
  key: date.getTime(),
1141
1038
  y: headerHeight * 0.8,
1142
1039
  x: columnWidth * (i + +rtl),
1143
- className: `${styles$5.calendarTopText} ${styles$5.textAnchorMiddle}`,
1040
+ className: styles$5.calendarTopText + " " + styles$5.textAnchorMiddle,
1144
1041
  fontFamily: fontFamily
1145
1042
  }, bottomValue));
1146
1043
 
1147
1044
  if (i === 0 || date.getDate() !== dates[i - 1].getDate()) {
1148
- const topValue = `${getLocalDayOfWeek(date, locale, "short")}, ${date.getDate()} ${getLocaleMonth(date, locale)}`;
1045
+ var topValue = getLocalDayOfWeek(date, locale, "short") + ", " + date.getDate() + " " + getLocaleMonth(date, locale);
1149
1046
  topValues.push(React__default.createElement(TopPartOfCalendar, {
1150
1047
  key: topValue + date.getFullYear(),
1151
1048
  value: topValue,
@@ -1161,15 +1058,15 @@ const Calendar = _ref => {
1161
1058
  return [topValues, bottomValues];
1162
1059
  };
1163
1060
 
1164
- const getCalendarValuesForHour = () => {
1165
- const topValues = [];
1166
- const bottomValues = [];
1167
- const topDefaultHeight = headerHeight * 0.5;
1168
- const dates = dateSetup.dates;
1061
+ var getCalendarValuesForHour = function getCalendarValuesForHour() {
1062
+ var topValues = [];
1063
+ var bottomValues = [];
1064
+ var topDefaultHeight = headerHeight * 0.5;
1065
+ var dates = dateSetup.dates;
1169
1066
 
1170
- for (let i = 0; i < dates.length; i++) {
1171
- const date = dates[i];
1172
- const bottomValue = getCachedDateTimeFormat(locale, {
1067
+ for (var i = 0; i < dates.length; i++) {
1068
+ var date = dates[i];
1069
+ var bottomValue = getCachedDateTimeFormat(locale, {
1173
1070
  hour: "numeric"
1174
1071
  }).format(date);
1175
1072
  bottomValues.push(React__default.createElement("text", {
@@ -1181,9 +1078,9 @@ const Calendar = _ref => {
1181
1078
  }, bottomValue));
1182
1079
 
1183
1080
  if (i !== 0 && date.getDate() !== dates[i - 1].getDate()) {
1184
- const displayDate = dates[i - 1];
1185
- const topValue = `${getLocalDayOfWeek(displayDate, locale, "long")}, ${displayDate.getDate()} ${getLocaleMonth(displayDate, locale)}`;
1186
- const topPosition = (date.getHours() - 24) / 2;
1081
+ var displayDate = dates[i - 1];
1082
+ var topValue = getLocalDayOfWeek(displayDate, locale, "long") + ", " + displayDate.getDate() + " " + getLocaleMonth(displayDate, locale);
1083
+ var topPosition = (date.getHours() - 24) / 2;
1187
1084
  topValues.push(React__default.createElement(TopPartOfCalendar, {
1188
1085
  key: topValue + displayDate.getFullYear(),
1189
1086
  value: topValue,
@@ -1199,37 +1096,58 @@ const Calendar = _ref => {
1199
1096
  return [topValues, bottomValues];
1200
1097
  };
1201
1098
 
1202
- let topValues = [];
1203
- let bottomValues = [];
1099
+ var topValues = [];
1100
+ var bottomValues = [];
1204
1101
 
1205
1102
  switch (dateSetup.viewMode) {
1206
1103
  case exports.ViewMode.Year:
1207
- [topValues, bottomValues] = getCalendarValuesForYear();
1104
+ var _getCalendarValuesFor = getCalendarValuesForYear();
1105
+
1106
+ topValues = _getCalendarValuesFor[0];
1107
+ bottomValues = _getCalendarValuesFor[1];
1208
1108
  break;
1209
1109
 
1210
1110
  case exports.ViewMode.Quarter:
1211
- [topValues, bottomValues] = getCalendarValuesForQuarter();
1111
+ var _getCalendarValuesFor2 = getCalendarValuesForQuarter();
1112
+
1113
+ topValues = _getCalendarValuesFor2[0];
1114
+ bottomValues = _getCalendarValuesFor2[1];
1212
1115
  break;
1213
1116
 
1214
1117
  case exports.ViewMode.Month:
1215
- [topValues, bottomValues] = getCalendarValuesForMonth();
1118
+ var _getCalendarValuesFor3 = getCalendarValuesForMonth();
1119
+
1120
+ topValues = _getCalendarValuesFor3[0];
1121
+ bottomValues = _getCalendarValuesFor3[1];
1216
1122
  break;
1217
1123
 
1218
1124
  case exports.ViewMode.Week:
1219
- [topValues, bottomValues] = getCalendarValuesForWeek();
1125
+ var _getCalendarValuesFor4 = getCalendarValuesForWeek();
1126
+
1127
+ topValues = _getCalendarValuesFor4[0];
1128
+ bottomValues = _getCalendarValuesFor4[1];
1220
1129
  break;
1221
1130
 
1222
1131
  case exports.ViewMode.Day:
1223
- [topValues, bottomValues] = getCalendarValuesForDay();
1132
+ var _getCalendarValuesFor5 = getCalendarValuesForDay();
1133
+
1134
+ topValues = _getCalendarValuesFor5[0];
1135
+ bottomValues = _getCalendarValuesFor5[1];
1224
1136
  break;
1225
1137
 
1226
1138
  case exports.ViewMode.QuarterDay:
1227
1139
  case exports.ViewMode.HalfDay:
1228
- [topValues, bottomValues] = getCalendarValuesForPartOfDay();
1140
+ var _getCalendarValuesFor6 = getCalendarValuesForPartOfDay();
1141
+
1142
+ topValues = _getCalendarValuesFor6[0];
1143
+ bottomValues = _getCalendarValuesFor6[1];
1229
1144
  break;
1230
1145
 
1231
1146
  case exports.ViewMode.Hour:
1232
- [topValues, bottomValues] = getCalendarValuesForHour();
1147
+ var _getCalendarValuesFor7 = getCalendarValuesForHour();
1148
+
1149
+ topValues = _getCalendarValuesFor7[0];
1150
+ bottomValues = _getCalendarValuesFor7[1];
1233
1151
  }
1234
1152
 
1235
1153
  return React__default.createElement("g", {
@@ -1265,23 +1183,27 @@ function _catch(body, recover) {
1265
1183
  return result;
1266
1184
  }
1267
1185
 
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;
1186
+ var Arrow = function Arrow(_ref) {
1187
+ var taskFrom = _ref.taskFrom,
1188
+ taskTo = _ref.taskTo,
1189
+ rowHeight = _ref.rowHeight,
1190
+ taskHeight = _ref.taskHeight,
1191
+ arrowIndent = _ref.arrowIndent,
1192
+ rtl = _ref.rtl,
1193
+ arrowColor = _ref.arrowColor;
1194
+ var path;
1195
+ var trianglePoints;
1280
1196
 
1281
1197
  if (rtl) {
1282
- [path, trianglePoints] = drownPathAndTriangleRTL(taskFrom, taskTo, rowHeight, taskHeight, arrowIndent);
1198
+ var _drownPathAndTriangle = drownPathAndTriangleRTL(taskFrom, taskTo, rowHeight, taskHeight, arrowIndent);
1199
+
1200
+ path = _drownPathAndTriangle[0];
1201
+ trianglePoints = _drownPathAndTriangle[1];
1283
1202
  } else {
1284
- [path, trianglePoints] = drownPathAndTriangle(taskFrom, taskTo, rowHeight, taskHeight, arrowIndent);
1203
+ var _drownPathAndTriangle2 = drownPathAndTriangle(taskFrom, taskTo, rowHeight, taskHeight, arrowIndent);
1204
+
1205
+ path = _drownPathAndTriangle2[0];
1206
+ trianglePoints = _drownPathAndTriangle2[1];
1285
1207
  }
1286
1208
 
1287
1209
  return React__default.createElement("g", {
@@ -1297,8 +1219,8 @@ const Arrow = _ref => {
1297
1219
  }));
1298
1220
  };
1299
1221
 
1300
- const drownPathAndTriangle = (taskFrom, taskTo, rowHeight, taskHeight, arrowIndent) => {
1301
- let taskToStart, taskFromEnd;
1222
+ var drownPathAndTriangle = function drownPathAndTriangle(taskFrom, taskTo, rowHeight, taskHeight, arrowIndent) {
1223
+ var taskToStart, taskFromEnd;
1302
1224
 
1303
1225
  if (taskTo.x1 > 0 && taskTo.actualx1 > 0) {
1304
1226
  taskToStart = Math.min(taskTo.x1, taskTo.actualx1);
@@ -1308,38 +1230,24 @@ const drownPathAndTriangle = (taskFrom, taskTo, rowHeight, taskHeight, arrowInde
1308
1230
  taskFromEnd = Math.max(taskFrom.x2, taskFrom.actualx2);
1309
1231
  } else if (taskFrom.x2 > 0) taskFromEnd = taskFrom.x2;else if (taskFrom.actualx2 > 0) taskFromEnd = taskFrom.actualx2;else taskFromEnd = 0;
1310
1232
 
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}`;
1233
+ var indexCompare = taskFrom.index > taskTo.index ? -1 : 1;
1234
+ var taskToEndPosition = taskTo.y + taskHeight / 2;
1235
+ var taskFromEndPosition = taskFromEnd + arrowIndent * 2;
1236
+ var taskFromHorizontalOffsetValue = taskFromEndPosition < taskToStart ? "" : "H " + (taskToStart - arrowIndent);
1237
+ var taskToHorizontalOffsetValue = taskFromEndPosition > taskToStart ? arrowIndent : taskToStart - taskFromEnd - arrowIndent;
1238
+ var path = "M " + taskFromEnd + " " + (taskFrom.y + taskHeight / 2) + " \n h " + arrowIndent + " \n v " + indexCompare * rowHeight / 2 + " \n " + taskFromHorizontalOffsetValue + "\n V " + taskToEndPosition + " \n h " + taskToHorizontalOffsetValue;
1239
+ var trianglePoints = taskToStart + "," + taskToEndPosition + " \n " + (taskToStart - 5) + "," + (taskToEndPosition - 5) + " \n " + (taskToStart - 5) + "," + (taskToEndPosition + 5);
1325
1240
  return [path, trianglePoints];
1326
1241
  };
1327
1242
 
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}`;
1243
+ var drownPathAndTriangleRTL = function drownPathAndTriangleRTL(taskFrom, taskTo, rowHeight, taskHeight, arrowIndent) {
1244
+ var indexCompare = taskFrom.index > taskTo.index ? -1 : 1;
1245
+ var taskToEndPosition = taskTo.y + taskHeight / 2;
1246
+ var taskFromEndPosition = taskFrom.x1 - arrowIndent * 2;
1247
+ var taskFromHorizontalOffsetValue = taskFromEndPosition > taskTo.x2 ? "" : "H " + (taskTo.x2 + arrowIndent);
1248
+ var taskToHorizontalOffsetValue = taskFromEndPosition < taskTo.x2 ? -arrowIndent : taskTo.x2 - taskFrom.x1 + arrowIndent;
1249
+ 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;
1250
+ var trianglePoints = taskTo.x2 + "," + taskToEndPosition + " \n " + (taskTo.x2 + 5) + "," + (taskToEndPosition + 5) + " \n " + (taskTo.x2 + 5) + "," + (taskToEndPosition - 5);
1343
1251
  return [path, trianglePoints];
1344
1252
  };
1345
1253
 
@@ -1789,26 +1697,24 @@ var sortTasks = function sortTasks(taskA, taskB) {
1789
1697
  }
1790
1698
  };
1791
1699
 
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 = () => {
1700
+ var BarDisplay = function BarDisplay(_ref) {
1701
+ var x = _ref.x,
1702
+ y = _ref.y,
1703
+ type = _ref.type,
1704
+ width = _ref.width,
1705
+ height = _ref.height,
1706
+ isSelected = _ref.isSelected,
1707
+ progressX = _ref.progressX,
1708
+ progressWidth = _ref.progressWidth,
1709
+ barCornerRadius = _ref.barCornerRadius,
1710
+ styles = _ref.styles,
1711
+ onMouseDown = _ref.onMouseDown;
1712
+
1713
+ var getProcessColor = function getProcessColor() {
1808
1714
  return isSelected ? styles.progressSelectedColor : styles.progressColor;
1809
1715
  };
1810
1716
 
1811
- const getBarColor = () => {
1717
+ var getBarColor = function getBarColor() {
1812
1718
  return isSelected ? styles.backgroundSelectedColor : styles.backgroundColor;
1813
1719
  };
1814
1720
 
@@ -1855,15 +1761,13 @@ const BarDisplay = _ref => {
1855
1761
 
1856
1762
  var styles$6 = {"barWrapper":"_KxSXS","barHandle":"_3w_5u","barBackground":"_31ERP"};
1857
1763
 
1858
- const BarDateHandle = _ref => {
1859
- let {
1860
- x,
1861
- y,
1862
- width,
1863
- height,
1864
- barCornerRadius,
1865
- onMouseDown
1866
- } = _ref;
1764
+ var BarDateHandle = function BarDateHandle(_ref) {
1765
+ var x = _ref.x,
1766
+ y = _ref.y,
1767
+ width = _ref.width,
1768
+ height = _ref.height,
1769
+ barCornerRadius = _ref.barCornerRadius,
1770
+ onMouseDown = _ref.onMouseDown;
1867
1771
  return React__default.createElement("rect", {
1868
1772
  x: x,
1869
1773
  y: y,
@@ -1876,25 +1780,25 @@ const BarDateHandle = _ref => {
1876
1780
  });
1877
1781
  };
1878
1782
 
1879
- const BarProgressHandle = _ref => {
1783
+ var BarProgressHandle = function BarProgressHandle(_ref) {
1784
+ _objectDestructuringEmpty(_ref);
1785
+
1880
1786
  return React__default.createElement("div", null);
1881
1787
  };
1882
1788
 
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;
1789
+ var Bar = function Bar(_ref) {
1790
+ var task = _ref.task,
1791
+ isProgressChangeable = _ref.isProgressChangeable,
1792
+ isDateChangeable = _ref.isDateChangeable,
1793
+ rtl = _ref.rtl,
1794
+ type = _ref.type,
1795
+ onEventStart = _ref.onEventStart,
1796
+ isSelected = _ref.isSelected;
1797
+ var progressPoint = getProgressPoint(+!rtl * task.progressWidth + task.progressX, task.y, task.height);
1798
+ var handleHeight = task.height / 2 - 1;
1895
1799
 
1896
1800
  if (type == "planned") {
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", {
1801
+ if (task.x1 && task.x2) return React__default.createElement("g", {
1898
1802
  className: styles$6.barWrapper,
1899
1803
  tabIndex: 0
1900
1804
  }, React__default.createElement(BarDisplay, {
@@ -1910,7 +1814,7 @@ const Bar = _ref => {
1910
1814
  barCornerRadius: task.barCornerRadius,
1911
1815
  styles: task.styles,
1912
1816
  isSelected: isSelected,
1913
- onMouseDown: e => {
1817
+ onMouseDown: function onMouseDown(e) {
1914
1818
  isDateChangeable && onEventStart("move", task, e, "planned");
1915
1819
  }
1916
1820
  }), React__default.createElement("g", {
@@ -1921,7 +1825,7 @@ const Bar = _ref => {
1921
1825
  width: task.handleWidth,
1922
1826
  height: handleHeight,
1923
1827
  barCornerRadius: task.barCornerRadius,
1924
- onMouseDown: e => {
1828
+ onMouseDown: function onMouseDown(e) {
1925
1829
  onEventStart("start", task, e, "planned");
1926
1830
  }
1927
1831
  }), React__default.createElement(BarDateHandle, {
@@ -1930,19 +1834,19 @@ const Bar = _ref => {
1930
1834
  width: task.handleWidth,
1931
1835
  height: handleHeight,
1932
1836
  barCornerRadius: task.barCornerRadius,
1933
- onMouseDown: e => {
1837
+ onMouseDown: function onMouseDown(e) {
1934
1838
  onEventStart("end", task, e, "planned");
1935
1839
  }
1936
1840
  })), isProgressChangeable && React__default.createElement(BarProgressHandle, {
1937
1841
  progressPoint: progressPoint,
1938
- onMouseDown: e => {
1842
+ onMouseDown: function onMouseDown(e) {
1939
1843
  onEventStart("progress", task, e, "planned");
1940
1844
  }
1941
1845
  })));else return React__default.createElement("g", {
1942
1846
  className: styles$6.barWrapper,
1943
1847
  tabIndex: 0
1944
1848
  });
1945
- } else if ((task === null || task === void 0 ? void 0 : task.actualx1) >= 0 && (task === null || task === void 0 ? void 0 : task.actualx2) >= 0) {
1849
+ } else if (task.actualx1 && task.actualx2) {
1946
1850
  return React__default.createElement("g", {
1947
1851
  className: styles$6.barWrapper,
1948
1852
  tabIndex: 0
@@ -1959,7 +1863,7 @@ const Bar = _ref => {
1959
1863
  barCornerRadius: task.barCornerRadius,
1960
1864
  styles: task.styles,
1961
1865
  isSelected: isSelected,
1962
- onMouseDown: e => {
1866
+ onMouseDown: function onMouseDown(e) {
1963
1867
  isDateChangeable && onEventStart("move", task, e, "actual");
1964
1868
  }
1965
1869
  }), React__default.createElement("g", {
@@ -1970,7 +1874,7 @@ const Bar = _ref => {
1970
1874
  width: task.handleWidth,
1971
1875
  height: handleHeight,
1972
1876
  barCornerRadius: task.barCornerRadius,
1973
- onMouseDown: e => {
1877
+ onMouseDown: function onMouseDown(e) {
1974
1878
  onEventStart("start", task, e, "actual");
1975
1879
  }
1976
1880
  }), React__default.createElement(BarDateHandle, {
@@ -1979,12 +1883,12 @@ const Bar = _ref => {
1979
1883
  width: task.handleWidth,
1980
1884
  height: handleHeight,
1981
1885
  barCornerRadius: task.barCornerRadius,
1982
- onMouseDown: e => {
1886
+ onMouseDown: function onMouseDown(e) {
1983
1887
  onEventStart("end", task, e, "actual");
1984
1888
  }
1985
1889
  })), isProgressChangeable && React__default.createElement(BarProgressHandle, {
1986
1890
  progressPoint: progressPoint,
1987
- onMouseDown: e => {
1891
+ onMouseDown: function onMouseDown(e) {
1988
1892
  onEventStart("progress", task, e, "actual");
1989
1893
  }
1990
1894
  })));
@@ -1996,16 +1900,14 @@ const Bar = _ref => {
1996
1900
  }
1997
1901
  };
1998
1902
 
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);
1903
+ var BarSmall = function BarSmall(_ref) {
1904
+ var task = _ref.task,
1905
+ type = _ref.type,
1906
+ isProgressChangeable = _ref.isProgressChangeable,
1907
+ isDateChangeable = _ref.isDateChangeable,
1908
+ onEventStart = _ref.onEventStart,
1909
+ isSelected = _ref.isSelected;
1910
+ var progressPoint = getProgressPoint(task.progressWidth + task.x1, task.y, task.height);
2009
1911
  return React__default.createElement("g", {
2010
1912
  className: styles$6.barWrapper,
2011
1913
  tabIndex: 0
@@ -2022,14 +1924,14 @@ const BarSmall = _ref => {
2022
1924
  barCornerRadius: task.barCornerRadius,
2023
1925
  styles: task.styles,
2024
1926
  isSelected: isSelected,
2025
- onMouseDown: e => {
1927
+ onMouseDown: function onMouseDown(e) {
2026
1928
  isDateChangeable && onEventStart("move", task, e);
2027
1929
  }
2028
1930
  }), React__default.createElement("g", {
2029
1931
  className: "handleGroup"
2030
1932
  }, isProgressChangeable && React__default.createElement(BarProgressHandle, {
2031
1933
  progressPoint: progressPoint,
2032
- onMouseDown: e => {
1934
+ onMouseDown: function onMouseDown(e) {
2033
1935
  onEventStart("progress", task, e);
2034
1936
  }
2035
1937
  })));
@@ -2037,17 +1939,14 @@ const BarSmall = _ref => {
2037
1939
 
2038
1940
  var styles$7 = {"milestoneWrapper":"_RRr13","milestoneBackground":"_2P2B1"};
2039
1941
 
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 = () => {
1942
+ var Milestone = function Milestone(_ref) {
1943
+ var task = _ref.task,
1944
+ isDateChangeable = _ref.isDateChangeable,
1945
+ onEventStart = _ref.onEventStart,
1946
+ isSelected = _ref.isSelected;
1947
+ var transform = "rotate(45 " + (task.x1 + task.height * 0.356) + " \n " + (task.y + task.height * 0.85) + ")";
1948
+
1949
+ var getBarColor = function getBarColor() {
2051
1950
  return isSelected ? task.styles.backgroundSelectedColor : task.styles.backgroundColor;
2052
1951
  };
2053
1952
 
@@ -2064,7 +1963,7 @@ const Milestone = _ref => {
2064
1963
  ry: task.barCornerRadius,
2065
1964
  transform: transform,
2066
1965
  className: styles$7.milestoneBackground,
2067
- onMouseDown: e => {
1966
+ onMouseDown: function onMouseDown(e) {
2068
1967
  isDateChangeable && onEventStart("move", task, e);
2069
1968
  }
2070
1969
  }));
@@ -2072,16 +1971,14 @@ const Milestone = _ref => {
2072
1971
 
2073
1972
  var styles$8 = {"projectWrapper":"_1KJ6x","projectBackground":"_2RbVy","projectTop":"_2pZMF"};
2074
1973
 
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(",");
1974
+ var Project = function Project(_ref) {
1975
+ var task = _ref.task,
1976
+ isSelected = _ref.isSelected;
1977
+ var barColor = isSelected ? task.styles.backgroundSelectedColor : task.styles.backgroundColor;
1978
+ var processColor = isSelected ? task.styles.progressSelectedColor : task.styles.progressColor;
1979
+ var projectWith = task.x2 - task.x1;
1980
+ 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(",");
1981
+ var projectRightTriangle = [task.x2, task.y + task.height / 2 - 1, task.x2, task.y + task.height, task.x2 - 15, task.y + task.height / 2 - 1].join(",");
2085
1982
  return React__default.createElement("g", {
2086
1983
  tabIndex: 0,
2087
1984
  className: styles$8.projectWrapper
@@ -2122,23 +2019,25 @@ const Project = _ref => {
2122
2019
  }));
2123
2020
  };
2124
2021
 
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(() => {
2022
+ var TaskItem = function TaskItem(props) {
2023
+ var _props = _extends({}, props),
2024
+ task = _props.task,
2025
+ isDelete = _props.isDelete,
2026
+ isSelected = _props.isSelected,
2027
+ onEventStart = _props.onEventStart;
2028
+
2029
+ var _useState = React.useState([React__default.createElement("div", null)]),
2030
+ taskItem = _useState[0],
2031
+ setTaskItem = _useState[1];
2032
+
2033
+ React.useEffect(function () {
2135
2034
  switch (task.typeInternal) {
2136
2035
  case "milestone":
2137
- if (task.x1 >= 0 && task.actualx1 >= 0) setTaskItem([React__default.createElement(Milestone, Object.assign({}, props))]);else setTaskItem([]);
2036
+ setTaskItem([React__default.createElement(Milestone, Object.assign({}, props))]);
2138
2037
  break;
2139
2038
 
2140
2039
  case "project":
2141
- if ((task === null || task === void 0 ? void 0 : task.x1) >= 0 && (task === null || task === void 0 ? void 0 : task.x2) >= 0 && task.x2 > task.x1 && (task === null || task === void 0 ? void 0 : task.actualx1) >= 0 && (task === null || task === void 0 ? void 0 : task.actualx2) >= 0 && task.actualx2 > task.actualx1) setTaskItem([React__default.createElement(Project, Object.assign({}, props))]);else setTaskItem([]);
2040
+ setTaskItem([React__default.createElement(Project, Object.assign({}, props))]);
2142
2041
  break;
2143
2042
 
2144
2043
  case "smalltask":
@@ -2147,27 +2046,27 @@ const TaskItem = props => {
2147
2046
 
2148
2047
  default:
2149
2048
  {
2150
- let taskItem = [];
2049
+ var _taskItem = [];
2151
2050
 
2152
- if ((task === null || task === void 0 ? void 0 : task.x1) >= 0 && (task === null || task === void 0 ? void 0 : task.x2) >= 0) {
2153
- taskItem.push(React__default.createElement(Bar, Object.assign({}, props, {
2051
+ if (task.x1 && task.x2) {
2052
+ _taskItem.push(React__default.createElement(Bar, Object.assign({}, props, {
2154
2053
  type: "planned"
2155
2054
  })));
2156
2055
  }
2157
2056
 
2158
- if ((task === null || task === void 0 ? void 0 : task.actualx1) >= 0 && (task === null || task === void 0 ? void 0 : task.actualx2) >= 0) {
2159
- taskItem.push(React__default.createElement(Bar, Object.assign({}, props, {
2057
+ if (task.actualx1 && task.actualx2) {
2058
+ _taskItem.push(React__default.createElement(Bar, Object.assign({}, props, {
2160
2059
  type: "actual"
2161
2060
  })));
2162
2061
  }
2163
2062
 
2164
- setTaskItem(taskItem);
2063
+ setTaskItem(_taskItem);
2165
2064
  }
2166
2065
  break;
2167
2066
  }
2168
2067
  }, [task, isSelected]);
2169
2068
  return React__default.createElement("g", null, React__default.createElement("g", {
2170
- onKeyDown: e => {
2069
+ onKeyDown: function onKeyDown(e) {
2171
2070
  switch (e.key) {
2172
2071
  case "Delete":
2173
2072
  {
@@ -2178,20 +2077,20 @@ const TaskItem = props => {
2178
2077
 
2179
2078
  e.stopPropagation();
2180
2079
  },
2181
- onMouseEnter: e => {
2080
+ onMouseEnter: function onMouseEnter(e) {
2182
2081
  onEventStart("mouseenter", task, e, "planned");
2183
2082
  },
2184
- onMouseLeave: e => {
2083
+ onMouseLeave: function onMouseLeave(e) {
2185
2084
  onEventStart("mouseleave", task, e, "planned");
2186
2085
  },
2187
- onDoubleClick: e => {
2086
+ onDoubleClick: function onDoubleClick(e) {
2188
2087
  onEventStart("dblclick", task, e, "planned");
2189
2088
  },
2190
- onClick: e => {
2089
+ onClick: function onClick(e) {
2191
2090
  onEventStart("click", task, e, "planned");
2192
2091
  }
2193
2092
  }, taskItem[0]), React__default.createElement("g", {
2194
- onKeyDown: e => {
2093
+ onKeyDown: function onKeyDown(e) {
2195
2094
  switch (e.key) {
2196
2095
  case "Delete":
2197
2096
  {
@@ -2202,74 +2101,82 @@ const TaskItem = props => {
2202
2101
 
2203
2102
  e.stopPropagation();
2204
2103
  },
2205
- onMouseEnter: e => {
2104
+ onMouseEnter: function onMouseEnter(e) {
2206
2105
  onEventStart("mouseenter", task, e, "actual");
2207
2106
  },
2208
- onMouseLeave: e => {
2107
+ onMouseLeave: function onMouseLeave(e) {
2209
2108
  onEventStart("mouseleave", task, e, "actual");
2210
2109
  },
2211
- onDoubleClick: e => {
2110
+ onDoubleClick: function onDoubleClick(e) {
2212
2111
  onEventStart("dblclick", task, e, "actual");
2213
2112
  },
2214
- onClick: e => {
2113
+ onClick: function onClick(e) {
2215
2114
  onEventStart("click", task, e, "actual");
2216
2115
  }
2217
2116
  }, taskItem[1]));
2218
2117
  };
2219
2118
 
2220
- const TaskGanttContent = _ref => {
2119
+ var TaskGanttContent = function TaskGanttContent(_ref) {
2221
2120
  var _svg$current;
2222
2121
 
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;
2122
+ var tasks = _ref.tasks,
2123
+ dates = _ref.dates,
2124
+ ganttEvent = _ref.ganttEvent,
2125
+ selectedTask = _ref.selectedTask,
2126
+ rowHeight = _ref.rowHeight,
2127
+ columnWidth = _ref.columnWidth,
2128
+ timeStep = _ref.timeStep,
2129
+ svg = _ref.svg,
2130
+ taskHeight = _ref.taskHeight,
2131
+ arrowIndent = _ref.arrowIndent,
2132
+ fontFamily = _ref.fontFamily,
2133
+ fontSize = _ref.fontSize,
2134
+ rtl = _ref.rtl,
2135
+ setGanttEvent = _ref.setGanttEvent,
2136
+ setFailedTask = _ref.setFailedTask,
2137
+ setSelectedTask = _ref.setSelectedTask,
2138
+ onDateChange = _ref.onDateChange,
2139
+ onProgressChange = _ref.onProgressChange,
2140
+ onDoubleClick = _ref.onDoubleClick,
2141
+ onClick = _ref.onClick,
2142
+ onDelete = _ref.onDelete;
2143
+ var point = svg === null || svg === void 0 ? void 0 : (_svg$current = svg.current) === null || _svg$current === void 0 ? void 0 : _svg$current.createSVGPoint();
2144
+
2145
+ var _useState = React.useState(0),
2146
+ xStep = _useState[0],
2147
+ setXStep = _useState[1];
2148
+
2149
+ var _useState2 = React.useState(0),
2150
+ initEventX1Delta = _useState2[0],
2151
+ setInitEventX1Delta = _useState2[1];
2152
+
2153
+ var _useState3 = React.useState(false),
2154
+ isMoving = _useState3[0],
2155
+ setIsMoving = _useState3[1];
2156
+
2157
+ React.useEffect(function () {
2158
+ var dateDelta = dates[1].getTime() - dates[0].getTime() - dates[1].getTimezoneOffset() * 60 * 1000 + dates[0].getTimezoneOffset() * 60 * 1000;
2159
+ var newXStep = timeStep * columnWidth / dateDelta;
2253
2160
  setXStep(newXStep);
2254
2161
  }, [columnWidth, dates, timeStep]);
2255
- React.useEffect(() => {
2256
- const handleMouseMove = function (event) {
2162
+ React.useEffect(function () {
2163
+ var handleMouseMove = function handleMouseMove(event) {
2257
2164
  try {
2258
2165
  var _svg$current$getScree;
2259
2166
 
2260
2167
  if (!ganttEvent.changedTask || !point || !(svg !== null && svg !== void 0 && svg.current)) return Promise.resolve();
2261
2168
  event.preventDefault();
2262
2169
  point.x = event.clientX;
2263
- const cursor = point.matrixTransform(svg === null || svg === void 0 ? void 0 : (_svg$current$getScree = svg.current.getScreenCTM()) === null || _svg$current$getScree === void 0 ? void 0 : _svg$current$getScree.inverse());
2264
- const {
2265
- isChanged,
2266
- changedTask
2267
- } = handleTaskBySVGMouseEvent(cursor.x, ganttEvent.action, ganttEvent.changedTask, ganttEvent.type, xStep, timeStep, initEventX1Delta, rtl);
2170
+ 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());
2171
+
2172
+ var _handleTaskBySVGMouse = handleTaskBySVGMouseEvent(cursor.x, ganttEvent.action, ganttEvent.changedTask, ganttEvent.type, xStep, timeStep, initEventX1Delta, rtl),
2173
+ isChanged = _handleTaskBySVGMouse.isChanged,
2174
+ changedTask = _handleTaskBySVGMouse.changedTask;
2268
2175
 
2269
2176
  if (isChanged) {
2270
2177
  setGanttEvent({
2271
2178
  action: ganttEvent.action,
2272
- changedTask
2179
+ changedTask: changedTask
2273
2180
  });
2274
2181
  }
2275
2182
 
@@ -2279,41 +2186,40 @@ const TaskGanttContent = _ref => {
2279
2186
  }
2280
2187
  };
2281
2188
 
2282
- const handleMouseUp = function (event) {
2189
+ var handleMouseUp = function handleMouseUp(event) {
2283
2190
  try {
2284
2191
  var _svg$current$getScree2;
2285
2192
 
2286
- function _temp5() {
2193
+ var _temp6 = function _temp6() {
2287
2194
  if (!operationSuccess) {
2288
2195
  setFailedTask(originalSelectedTask);
2289
2196
  }
2290
- }
2197
+ };
2291
2198
 
2292
- const {
2293
- action,
2294
- originalSelectedTask,
2295
- changedTask,
2296
- type
2297
- } = ganttEvent;
2199
+ var action = ganttEvent.action,
2200
+ originalSelectedTask = ganttEvent.originalSelectedTask,
2201
+ changedTask = ganttEvent.changedTask,
2202
+ type = ganttEvent.type;
2298
2203
  if (!changedTask || !point || !(svg !== null && svg !== void 0 && svg.current) || !originalSelectedTask) return Promise.resolve();
2299
2204
  event.preventDefault();
2300
2205
  point.x = event.clientX;
2301
- const cursor = point.matrixTransform(svg === null || svg === void 0 ? void 0 : (_svg$current$getScree2 = svg.current.getScreenCTM()) === null || _svg$current$getScree2 === void 0 ? void 0 : _svg$current$getScree2.inverse());
2302
- const {
2303
- changedTask: newChangedTask
2304
- } = handleTaskBySVGMouseEvent(cursor.x, action, changedTask, type, xStep, timeStep, initEventX1Delta, rtl);
2305
- const isNotLikeOriginal = originalSelectedTask.start !== newChangedTask.start || originalSelectedTask.end !== newChangedTask.end || originalSelectedTask.actualStart !== newChangedTask.actualStart || originalSelectedTask.actualEnd !== newChangedTask.actualEnd || originalSelectedTask.progress !== newChangedTask.progress;
2206
+ 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());
2207
+
2208
+ var _handleTaskBySVGMouse2 = handleTaskBySVGMouseEvent(cursor.x, action, changedTask, type, xStep, timeStep, initEventX1Delta, rtl),
2209
+ newChangedTask = _handleTaskBySVGMouse2.changedTask;
2210
+
2211
+ var isNotLikeOriginal = originalSelectedTask.start !== newChangedTask.start || originalSelectedTask.end !== newChangedTask.end || originalSelectedTask.actualStart !== newChangedTask.actualStart || originalSelectedTask.actualEnd !== newChangedTask.actualEnd || originalSelectedTask.progress !== newChangedTask.progress;
2306
2212
  svg.current.removeEventListener("mousemove", handleMouseMove);
2307
2213
  svg.current.removeEventListener("mouseup", handleMouseUp);
2308
2214
  setGanttEvent({
2309
2215
  action: ""
2310
2216
  });
2311
2217
  setIsMoving(false);
2312
- let operationSuccess = true;
2218
+ var operationSuccess = true;
2313
2219
 
2314
- const _temp4 = function () {
2220
+ var _temp7 = function () {
2315
2221
  if ((action === "move" || action === "end" || action === "start") && onDateChange && isNotLikeOriginal) {
2316
- const _temp = _catch(function () {
2222
+ var _temp8 = _catch(function () {
2317
2223
  return Promise.resolve(onDateChange(newChangedTask, newChangedTask.barChildren)).then(function (result) {
2318
2224
  if (result !== undefined) {
2319
2225
  operationSuccess = result;
@@ -2323,11 +2229,11 @@ const TaskGanttContent = _ref => {
2323
2229
  operationSuccess = false;
2324
2230
  });
2325
2231
 
2326
- if (_temp && _temp.then) return _temp.then(function () {});
2232
+ if (_temp8 && _temp8.then) return _temp8.then(function () {});
2327
2233
  } else {
2328
- const _temp3 = function () {
2234
+ var _temp9 = function () {
2329
2235
  if (onProgressChange && isNotLikeOriginal) {
2330
- const _temp2 = _catch(function () {
2236
+ var _temp10 = _catch(function () {
2331
2237
  return Promise.resolve(onProgressChange(newChangedTask, newChangedTask.barChildren)).then(function (result) {
2332
2238
  if (result !== undefined) {
2333
2239
  operationSuccess = result;
@@ -2337,15 +2243,15 @@ const TaskGanttContent = _ref => {
2337
2243
  operationSuccess = false;
2338
2244
  });
2339
2245
 
2340
- if (_temp2 && _temp2.then) return _temp2.then(function () {});
2246
+ if (_temp10 && _temp10.then) return _temp10.then(function () {});
2341
2247
  }
2342
2248
  }();
2343
2249
 
2344
- if (_temp3 && _temp3.then) return _temp3.then(function () {});
2250
+ if (_temp9 && _temp9.then) return _temp9.then(function () {});
2345
2251
  }
2346
2252
  }();
2347
2253
 
2348
- return Promise.resolve(_temp4 && _temp4.then ? _temp4.then(_temp5) : _temp5(_temp4));
2254
+ return Promise.resolve(_temp7 && _temp7.then ? _temp7.then(_temp6) : _temp6(_temp7));
2349
2255
  } catch (e) {
2350
2256
  return Promise.reject(e);
2351
2257
  }
@@ -2358,7 +2264,7 @@ const TaskGanttContent = _ref => {
2358
2264
  }
2359
2265
  }, [ganttEvent, xStep, initEventX1Delta, onProgressChange, timeStep, onDateChange, svg, isMoving, point, rtl, setFailedTask, setGanttEvent]);
2360
2266
 
2361
- const handleBarEventStart = function (action, task, event, type) {
2267
+ var handleBarEventStart = function handleBarEventStart(action, task, event, type) {
2362
2268
  try {
2363
2269
  return Promise.resolve(function () {
2364
2270
  if (!event) {
@@ -2367,15 +2273,15 @@ const TaskGanttContent = _ref => {
2367
2273
  }
2368
2274
  } else return function () {
2369
2275
  if (isKeyboardEvent(event)) {
2370
- const _temp8 = function () {
2276
+ var _temp14 = function () {
2371
2277
  if (action === "delete") {
2372
- const _temp7 = function () {
2278
+ var _temp15 = function () {
2373
2279
  if (onDelete) {
2374
- const _temp6 = _catch(function () {
2280
+ var _temp16 = _catch(function () {
2375
2281
  return Promise.resolve(onDelete(task)).then(function (result) {
2376
2282
  if (result !== undefined && result) {
2377
2283
  setGanttEvent({
2378
- action,
2284
+ action: action,
2379
2285
  changedTask: task
2380
2286
  });
2381
2287
  }
@@ -2384,19 +2290,19 @@ const TaskGanttContent = _ref => {
2384
2290
  console.error("Error on Delete. " + error);
2385
2291
  });
2386
2292
 
2387
- if (_temp6 && _temp6.then) return _temp6.then(function () {});
2293
+ if (_temp16 && _temp16.then) return _temp16.then(function () {});
2388
2294
  }
2389
2295
  }();
2390
2296
 
2391
- if (_temp7 && _temp7.then) return _temp7.then(function () {});
2297
+ if (_temp15 && _temp15.then) return _temp15.then(function () {});
2392
2298
  }
2393
2299
  }();
2394
2300
 
2395
- if (_temp8 && _temp8.then) return _temp8.then(function () {});
2301
+ if (_temp14 && _temp14.then) return _temp14.then(function () {});
2396
2302
  } else if (action === "mouseenter") {
2397
2303
  if (!ganttEvent.action) {
2398
2304
  setGanttEvent({
2399
- action,
2305
+ action: action,
2400
2306
  changedTask: task,
2401
2307
  originalSelectedTask: task,
2402
2308
  type: type
@@ -2417,17 +2323,17 @@ const TaskGanttContent = _ref => {
2417
2323
 
2418
2324
  if (!(svg !== null && svg !== void 0 && svg.current) || !point) return;
2419
2325
  point.x = event.clientX;
2420
- const cursor = point.matrixTransform((_svg$current$getScree3 = svg.current.getScreenCTM()) === null || _svg$current$getScree3 === void 0 ? void 0 : _svg$current$getScree3.inverse());
2326
+ var cursor = point.matrixTransform((_svg$current$getScree3 = svg.current.getScreenCTM()) === null || _svg$current$getScree3 === void 0 ? void 0 : _svg$current$getScree3.inverse());
2421
2327
  if (type == "planned") setInitEventX1Delta(cursor.x - task.x1);else if (type == "actual") setInitEventX1Delta(cursor.x - task.actualx1);
2422
2328
  setGanttEvent({
2423
- action,
2329
+ action: action,
2424
2330
  changedTask: task,
2425
2331
  originalSelectedTask: task,
2426
2332
  type: type
2427
2333
  });
2428
2334
  } else {
2429
2335
  setGanttEvent({
2430
- action,
2336
+ action: action,
2431
2337
  changedTask: task,
2432
2338
  originalSelectedTask: task,
2433
2339
  type: type
@@ -2444,8 +2350,8 @@ const TaskGanttContent = _ref => {
2444
2350
  className: "content"
2445
2351
  }, React__default.createElement("g", {
2446
2352
  className: "arrows"
2447
- }, tasks.map(_task => {
2448
- const task = _task.start.getTime() > 0 && _task.end.getTime() > 0 ? _task : undefined;
2353
+ }, tasks.map(function (_task) {
2354
+ var task = _task.start.getTime() > 0 && _task.end.getTime() > 0 ? _task : undefined;
2449
2355
 
2450
2356
  if (!task) {
2451
2357
  return React__default.createElement("g", {
@@ -2456,31 +2362,28 @@ const TaskGanttContent = _ref => {
2456
2362
  });
2457
2363
  }
2458
2364
 
2459
- return task.barChildren.map(child => {
2365
+ return task.barChildren.map(function (child) {
2460
2366
  var _task$criticalPathArr, _task$criticalPathArr2;
2461
2367
 
2462
- if (task.x2 > task.x1 || task.actualx2 > task.actualx1) return React__default.createElement(Arrow, {
2463
- key: `Arrow from ${task.id} to ${tasks[child.index].id}`,
2368
+ return React__default.createElement(Arrow, {
2369
+ key: "Arrow from " + task.id + " to " + tasks[child.index].id,
2464
2370
  taskFrom: task,
2465
2371
  taskTo: tasks[child.index],
2466
2372
  rowHeight: rowHeight,
2467
2373
  taskHeight: taskHeight,
2468
2374
  arrowIndent: arrowIndent,
2469
2375
  rtl: rtl,
2470
- arrowColor: ((_task$criticalPathArr = task.criticalPathArrows) === null || _task$criticalPathArr === void 0 ? void 0 : (_task$criticalPathArr2 = _task$criticalPathArr.find(arrow => arrow.taskId == tasks[child.index].id)) === null || _task$criticalPathArr2 === void 0 ? void 0 : _task$criticalPathArr2.arrowColor) || "#808080"
2471
- });else return React__default.createElement("g", {
2472
- key: _task.id,
2473
- style: {
2474
- height: taskHeight
2475
- }
2376
+ arrowColor: ((_task$criticalPathArr = task.criticalPathArrows) === null || _task$criticalPathArr === void 0 ? void 0 : (_task$criticalPathArr2 = _task$criticalPathArr.find(function (arrow) {
2377
+ return arrow.taskId == tasks[child.index].id;
2378
+ })) === null || _task$criticalPathArr2 === void 0 ? void 0 : _task$criticalPathArr2.arrowColor) || "#808080"
2476
2379
  });
2477
2380
  });
2478
2381
  })), React__default.createElement("g", {
2479
2382
  className: "bar",
2480
2383
  fontFamily: fontFamily,
2481
2384
  fontSize: fontSize
2482
- }, tasks.map(_task => {
2483
- const task = _task.start.getTime() > 0 && _task.end.getTime() > 0 ? _task : undefined;
2385
+ }, tasks.map(function (_task) {
2386
+ var task = _task.start.getTime() > 0 && _task.end.getTime() > 0 ? _task : undefined;
2484
2387
 
2485
2388
  if (!task) {
2486
2389
  return React__default.createElement("g", {
@@ -2594,12 +2497,6 @@ var Gantt = function Gantt(_ref) {
2594
2497
  var tasks = _ref.tasks,
2595
2498
  _ref$leafTasks = _ref.leafTasks,
2596
2499
  leafTasks = _ref$leafTasks === void 0 ? [] : _ref$leafTasks,
2597
- _ref$scheduleType = _ref.scheduleType,
2598
- scheduleType = _ref$scheduleType === void 0 ? "main" : _ref$scheduleType,
2599
- _ref$startDate = _ref.startDate,
2600
- startDate = _ref$startDate === void 0 ? new Date() : _ref$startDate,
2601
- _ref$endDate = _ref.endDate,
2602
- endDate = _ref$endDate === void 0 ? new Date() : _ref$endDate,
2603
2500
  _ref$headerHeight = _ref.headerHeight,
2604
2501
  headerHeight = _ref$headerHeight === void 0 ? 50 : _ref$headerHeight,
2605
2502
  _ref$columnWidth = _ref.columnWidth,
@@ -2656,8 +2553,6 @@ var Gantt = function Gantt(_ref) {
2656
2553
  arrowIndent = _ref$arrowIndent === void 0 ? 20 : _ref$arrowIndent,
2657
2554
  _ref$todayColor = _ref.todayColor,
2658
2555
  todayColor = _ref$todayColor === void 0 ? "rgba(252, 248, 227, 0.5)" : _ref$todayColor,
2659
- _ref$weekendColor = _ref.weekendColor,
2660
- weekendColor = _ref$weekendColor === void 0 ? "#f5f5f5" : _ref$weekendColor,
2661
2556
  viewDate = _ref.viewDate,
2662
2557
  _ref$TooltipContent = _ref.TooltipContent,
2663
2558
  TooltipContent = _ref$TooltipContent === void 0 ? StandardTooltipContent : _ref$TooltipContent,
@@ -2672,26 +2567,18 @@ var Gantt = function Gantt(_ref) {
2672
2567
  onDelete = _ref.onDelete,
2673
2568
  onSelect = _ref.onSelect,
2674
2569
  onExpanderClick = _ref.onExpanderClick,
2675
- onMultiSelect = _ref.onMultiSelect,
2676
2570
  taskLabelRenderer = _ref.taskLabelRenderer;
2677
2571
  var wrapperRef = React.useRef(null);
2678
2572
  var taskListRef = React.useRef(null);
2679
2573
 
2680
2574
  var _useState = React.useState(function () {
2681
2575
  var _ganttDateRange = ganttDateRange(tasks, viewMode, preStepsCount),
2682
- startDateRange = _ganttDateRange[0],
2683
- endDateRange = _ganttDateRange[1];
2684
-
2685
- if (scheduleType === "lookAhead") {
2686
- return {
2687
- viewMode: viewMode,
2688
- dates: seedDates(startDate, endDate, viewMode)
2689
- };
2690
- }
2576
+ startDate = _ganttDateRange[0],
2577
+ endDate = _ganttDateRange[1];
2691
2578
 
2692
2579
  return {
2693
2580
  viewMode: viewMode,
2694
- dates: seedDates(startDateRange, endDateRange, viewMode)
2581
+ dates: seedDates(startDate, endDate, viewMode)
2695
2582
  };
2696
2583
  }),
2697
2584
  dateSetup = _useState[0],
@@ -2750,14 +2637,6 @@ var Gantt = function Gantt(_ref) {
2750
2637
  ignoreScrollEvent = _useState12[0],
2751
2638
  setIgnoreScrollEvent = _useState12[1];
2752
2639
 
2753
- React.useEffect(function () {
2754
- if (scheduleType === "lookAhead" && startDate && endDate) {
2755
- setDateSetup({
2756
- viewMode: viewMode,
2757
- dates: seedDates(startDate, endDate, viewMode)
2758
- });
2759
- }
2760
- }, [startDate, endDate]);
2761
2640
  React.useEffect(function () {
2762
2641
  var filteredTasks;
2763
2642
 
@@ -2770,14 +2649,10 @@ var Gantt = function Gantt(_ref) {
2770
2649
  filteredTasks = filteredTasks.sort(sortTasks);
2771
2650
 
2772
2651
  var _ganttDateRange2 = ganttDateRange(filteredTasks, viewMode, preStepsCount),
2773
- startDateRange = _ganttDateRange2[0],
2774
- endDateRange = _ganttDateRange2[1];
2775
-
2776
- var newDates = seedDates(startDateRange, endDateRange, viewMode);
2652
+ startDate = _ganttDateRange2[0],
2653
+ endDate = _ganttDateRange2[1];
2777
2654
 
2778
- if (scheduleType === "lookAhead") {
2779
- newDates = seedDates(startDate, endDate, viewMode);
2780
- }
2655
+ var newDates = seedDates(startDate, endDate, viewMode);
2781
2656
 
2782
2657
  if (rtl) {
2783
2658
  newDates = newDates.reverse();
@@ -2787,12 +2662,10 @@ var Gantt = function Gantt(_ref) {
2787
2662
  }
2788
2663
  }
2789
2664
 
2790
- if (scheduleType !== "lookAhead") {
2791
- setDateSetup({
2792
- dates: seedDates(startDateRange, endDateRange, viewMode),
2793
- viewMode: viewMode
2794
- });
2795
- }
2665
+ setDateSetup({
2666
+ dates: newDates,
2667
+ viewMode: viewMode
2668
+ });
2796
2669
 
2797
2670
  var _getCriticalPaths = getCriticalPaths(leafTasks),
2798
2671
  primaryPath = _getCriticalPaths[0],
@@ -3019,11 +2892,9 @@ var Gantt = function Gantt(_ref) {
3019
2892
  columnWidth: columnWidth,
3020
2893
  svgWidth: svgWidth,
3021
2894
  tasks: tasks,
3022
- scheduleType: scheduleType,
3023
2895
  rowHeight: rowHeight,
3024
2896
  dates: dateSetup.dates,
3025
2897
  todayColor: todayColor,
3026
- weekendColor: weekendColor,
3027
2898
  rtl: rtl
3028
2899
  };
3029
2900
  var calendarProps = {
@@ -3067,7 +2938,6 @@ var Gantt = function Gantt(_ref) {
3067
2938
  fontSize: fontSize,
3068
2939
  tasks: barTasks,
3069
2940
  leafTasks: leafTasks,
3070
- scheduleType: scheduleType,
3071
2941
  locale: locale,
3072
2942
  headerHeight: headerHeight,
3073
2943
  scrollY: scrollY,
@@ -3080,8 +2950,7 @@ var Gantt = function Gantt(_ref) {
3080
2950
  onDoubleClick: onDoubleClick,
3081
2951
  TaskListHeader: TaskListHeader,
3082
2952
  TaskListTable: TaskListTable,
3083
- taskLabelRenderer: taskLabelRenderer,
3084
- onMultiSelect: onMultiSelect
2953
+ taskLabelRenderer: taskLabelRenderer
3085
2954
  };
3086
2955
  return React__default.createElement("div", null, React__default.createElement("div", {
3087
2956
  className: styles$9.wrapper,