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