gantt-task-react-powern 0.4.62 → 0.4.63
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/components/task-list/task-list-table.d.ts +2 -0
- package/dist/components/task-list/task-list.d.ts +4 -0
- package/dist/index.css +6 -18
- package/dist/index.js +694 -720
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +694 -720
- package/dist/index.modern.js.map +1 -1
- package/dist/types/public-types.d.ts +2 -0
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -18,10 +18,6 @@ function _extends() {
|
|
|
18
18
|
return _extends.apply(this, arguments);
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
function _objectDestructuringEmpty(obj) {
|
|
22
|
-
if (obj == null) throw new TypeError("Cannot destructure undefined");
|
|
23
|
-
}
|
|
24
|
-
|
|
25
21
|
function _unsupportedIterableToArray(o, minLen) {
|
|
26
22
|
if (!o) return;
|
|
27
23
|
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
@@ -280,11 +276,13 @@ var getDaysInMonth = function getDaysInMonth(month, year) {
|
|
|
280
276
|
|
|
281
277
|
var styles = {"ganttTable":"_3_ygE","ganttTable_Header":"_1nBOt","ganttTable_HeaderSeparator":"_2eZzQ","ganttTable_HeaderItem":"_WuQ0f"};
|
|
282
278
|
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
279
|
+
const TaskListHeaderDefault = _ref => {
|
|
280
|
+
let {
|
|
281
|
+
headerHeight,
|
|
282
|
+
fontFamily,
|
|
283
|
+
fontSize,
|
|
284
|
+
rowWidth
|
|
285
|
+
} = _ref;
|
|
288
286
|
return React.createElement("div", {
|
|
289
287
|
className: styles.ganttTable,
|
|
290
288
|
style: {
|
|
@@ -341,59 +339,59 @@ var TaskListHeaderDefault = function TaskListHeaderDefault(_ref) {
|
|
|
341
339
|
}, "Planned End")));
|
|
342
340
|
};
|
|
343
341
|
|
|
344
|
-
var styles$1 = {"taskListWrapper":"_3ZbQT","taskListTableRow":"_34SS0","taskListCell":"_3lLk3","taskListNameWrapper":"_nI1Xw","taskListExpander":"_2QjE6","taskListExpanderPlaceholder":"_1fnLB","taskListEmptyExpander":"_2TfEi","taskListText":"_2ZvXU"};
|
|
342
|
+
var styles$1 = {"taskListWrapper":"_3ZbQT","taskListTableRow":"_34SS0","taskListCell":"_3lLk3","taskListNameWrapper":"_nI1Xw","taskListExpander":"_2QjE6","taskListExpanderPlaceholder":"_1fnLB","taskListEmptyExpander":"_2TfEi","taskListText":"_2ZvXU","taskListCheckbox":"_1KIaF"};
|
|
345
343
|
|
|
346
|
-
|
|
344
|
+
const localeDateStringCache = {};
|
|
347
345
|
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
var lds = localeDateStringCache[key];
|
|
346
|
+
const toLocaleDateStringFactory = locale => (date, dateTimeOptions) => {
|
|
347
|
+
if (!date || date.getTime() === 0) return "";
|
|
348
|
+
const key = date.toString();
|
|
349
|
+
let lds = localeDateStringCache[key];
|
|
353
350
|
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
351
|
+
if (!lds) {
|
|
352
|
+
lds = date.toLocaleDateString(locale, dateTimeOptions);
|
|
353
|
+
localeDateStringCache[key] = lds;
|
|
354
|
+
}
|
|
358
355
|
|
|
359
|
-
|
|
360
|
-
};
|
|
356
|
+
return lds;
|
|
361
357
|
};
|
|
362
358
|
|
|
363
|
-
|
|
359
|
+
const dateTimeOptions = {
|
|
364
360
|
year: "numeric",
|
|
365
361
|
month: "numeric",
|
|
366
362
|
day: "numeric"
|
|
367
363
|
};
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
}
|
|
364
|
+
const TaskListTableDefault = _ref => {
|
|
365
|
+
let {
|
|
366
|
+
rowHeight,
|
|
367
|
+
rowWidth,
|
|
368
|
+
tasks,
|
|
369
|
+
leafTasks,
|
|
370
|
+
fontFamily,
|
|
371
|
+
fontSize,
|
|
372
|
+
locale,
|
|
373
|
+
onExpanderClick,
|
|
374
|
+
taskLabelRenderer = t => " " + t.name,
|
|
375
|
+
selectedTaskIds = [],
|
|
376
|
+
onTaskSelectionChange
|
|
377
|
+
} = _ref;
|
|
378
|
+
const toLocaleDateString = useMemo(() => toLocaleDateStringFactory(locale), [locale]);
|
|
379
|
+
|
|
380
|
+
const handleCheckboxChange = (taskId, isChecked) => {
|
|
381
|
+
if (!onTaskSelectionChange) return;
|
|
382
|
+
const newSelectedIds = isChecked ? [...selectedTaskIds, taskId] : selectedTaskIds.filter(id => id !== taskId);
|
|
383
|
+
onTaskSelectionChange(newSelectedIds);
|
|
384
|
+
};
|
|
385
|
+
|
|
386
|
+
const leafTaskIds = useMemo(() => new Set(leafTasks.map(t => t.id)), [leafTasks]);
|
|
389
387
|
return React.createElement("div", {
|
|
390
388
|
className: styles$1.taskListWrapper,
|
|
391
389
|
style: {
|
|
392
390
|
fontFamily: fontFamily,
|
|
393
391
|
fontSize: fontSize
|
|
394
392
|
}
|
|
395
|
-
}, tasks.map(
|
|
396
|
-
|
|
393
|
+
}, tasks.map(t => {
|
|
394
|
+
let expanderSymbol = "";
|
|
397
395
|
|
|
398
396
|
if (!leafTaskIds.has(t.id)) {
|
|
399
397
|
if (t.hideChildren === false) {
|
|
@@ -403,13 +401,27 @@ var TaskListTableDefault = function TaskListTableDefault(_ref) {
|
|
|
403
401
|
}
|
|
404
402
|
}
|
|
405
403
|
|
|
404
|
+
const isChecked = selectedTaskIds.includes(t.id);
|
|
406
405
|
return React.createElement("div", {
|
|
407
406
|
className: styles$1.taskListTableRow,
|
|
408
407
|
style: {
|
|
409
408
|
height: rowHeight
|
|
410
409
|
},
|
|
411
|
-
key: t.id
|
|
410
|
+
key: `${t.id}row`
|
|
412
411
|
}, React.createElement("div", {
|
|
412
|
+
className: styles$1.taskListCell,
|
|
413
|
+
style: {
|
|
414
|
+
minWidth: "40px",
|
|
415
|
+
maxWidth: "40px"
|
|
416
|
+
}
|
|
417
|
+
}, React.createElement("div", {
|
|
418
|
+
className: styles$1.taskListCheckbox
|
|
419
|
+
}, React.createElement("input", {
|
|
420
|
+
type: "checkbox",
|
|
421
|
+
checked: isChecked,
|
|
422
|
+
onChange: e => handleCheckboxChange(t.id, e.target.checked),
|
|
423
|
+
onClick: e => e.stopPropagation()
|
|
424
|
+
}))), React.createElement("div", {
|
|
413
425
|
className: styles$1.taskListCell,
|
|
414
426
|
style: {
|
|
415
427
|
minWidth: parseInt(rowWidth) * 0.8,
|
|
@@ -419,13 +431,11 @@ var TaskListTableDefault = function TaskListTableDefault(_ref) {
|
|
|
419
431
|
}, React.createElement("div", {
|
|
420
432
|
className: styles$1.taskListNameWrapper,
|
|
421
433
|
style: {
|
|
422
|
-
paddingLeft: t.depth * 4
|
|
434
|
+
paddingLeft: `${t.depth * 4}px`
|
|
423
435
|
}
|
|
424
436
|
}, !leafTaskIds.has(t.id) ? React.createElement("div", {
|
|
425
437
|
className: styles$1.taskListExpander,
|
|
426
|
-
onClick:
|
|
427
|
-
return onExpanderClick(t);
|
|
428
|
-
}
|
|
438
|
+
onClick: () => onExpanderClick(t)
|
|
429
439
|
}, expanderSymbol) : React.createElement("div", {
|
|
430
440
|
className: styles$1.taskListExpanderPlaceholder
|
|
431
441
|
}), React.createElement("div", {
|
|
@@ -453,7 +463,7 @@ var TaskListTableDefault = function TaskListTableDefault(_ref) {
|
|
|
453
463
|
}
|
|
454
464
|
}, React.createElement("div", {
|
|
455
465
|
className: styles$1.taskListText
|
|
456
|
-
}, "\
|
|
466
|
+
}, "\u00A0", toLocaleDateString(t.start, dateTimeOptions))), React.createElement("div", {
|
|
457
467
|
className: styles$1.taskListCell,
|
|
458
468
|
style: {
|
|
459
469
|
minWidth: parseInt(rowWidth) * 0.6,
|
|
@@ -461,43 +471,38 @@ var TaskListTableDefault = function TaskListTableDefault(_ref) {
|
|
|
461
471
|
}
|
|
462
472
|
}, React.createElement("div", {
|
|
463
473
|
className: styles$1.taskListText
|
|
464
|
-
}, "\
|
|
474
|
+
}, "\u00A0", toLocaleDateString(t.end, dateTimeOptions))));
|
|
465
475
|
}));
|
|
466
476
|
};
|
|
467
477
|
|
|
468
478
|
var styles$2 = {"tooltipDefaultContainer":"_3T42e","tooltipDefaultContainerParagraph":"_29NTg","tooltipDetailsContainer":"_25P-K","tooltipDetailsContainerHidden":"_3gVAq"};
|
|
469
479
|
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
var _useState2 = useState(0),
|
|
492
|
-
relatedX = _useState2[0],
|
|
493
|
-
setRelatedX = _useState2[1];
|
|
494
|
-
|
|
495
|
-
useEffect(function () {
|
|
480
|
+
const Tooltip = _ref => {
|
|
481
|
+
let {
|
|
482
|
+
task,
|
|
483
|
+
type,
|
|
484
|
+
rowHeight,
|
|
485
|
+
rtl,
|
|
486
|
+
svgContainerHeight,
|
|
487
|
+
svgContainerWidth,
|
|
488
|
+
scrollX,
|
|
489
|
+
scrollY,
|
|
490
|
+
arrowIndent,
|
|
491
|
+
fontSize,
|
|
492
|
+
fontFamily,
|
|
493
|
+
headerHeight,
|
|
494
|
+
taskListWidth,
|
|
495
|
+
TooltipContent
|
|
496
|
+
} = _ref;
|
|
497
|
+
const tooltipRef = useRef(null);
|
|
498
|
+
const [relatedY, setRelatedY] = useState(0);
|
|
499
|
+
const [relatedX, setRelatedX] = useState(0);
|
|
500
|
+
useEffect(() => {
|
|
496
501
|
if (tooltipRef.current) {
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
502
|
+
const tooltipHeight = tooltipRef.current.offsetHeight * 1.1;
|
|
503
|
+
const tooltipWidth = tooltipRef.current.offsetWidth * 1.1;
|
|
504
|
+
let newRelatedY = task.index * rowHeight - scrollY + headerHeight;
|
|
505
|
+
let newRelatedX;
|
|
501
506
|
|
|
502
507
|
if (rtl) {
|
|
503
508
|
newRelatedX = task.x1 - arrowIndent * 1.5 - tooltipWidth - scrollX;
|
|
@@ -506,7 +511,7 @@ var Tooltip = function Tooltip(_ref) {
|
|
|
506
511
|
newRelatedX = task.x2 + arrowIndent * 1.5 - scrollX;
|
|
507
512
|
}
|
|
508
513
|
|
|
509
|
-
|
|
514
|
+
const tooltipLeftmostPoint = tooltipWidth + newRelatedX;
|
|
510
515
|
|
|
511
516
|
if (tooltipLeftmostPoint > svgContainerWidth) {
|
|
512
517
|
newRelatedX = svgContainerWidth - tooltipWidth;
|
|
@@ -514,12 +519,10 @@ var Tooltip = function Tooltip(_ref) {
|
|
|
514
519
|
}
|
|
515
520
|
} else {
|
|
516
521
|
newRelatedX = type == "planned" ? task.x2 + arrowIndent * 1.5 + taskListWidth - scrollX : task.actualx2 + arrowIndent * 1.5 + taskListWidth - scrollX;
|
|
522
|
+
const tooltipLeftmostPoint = tooltipWidth + newRelatedX;
|
|
523
|
+
const fullChartWidth = taskListWidth + svgContainerWidth;
|
|
517
524
|
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
var fullChartWidth = taskListWidth + svgContainerWidth;
|
|
521
|
-
|
|
522
|
-
if (_tooltipLeftmostPoint > fullChartWidth) {
|
|
525
|
+
if (tooltipLeftmostPoint > fullChartWidth) {
|
|
523
526
|
newRelatedX = type == "planned" ? task.x1 + taskListWidth - arrowIndent * 1.5 - scrollX - tooltipWidth : task.actualx1 + taskListWidth - arrowIndent * 1.5 - scrollX - tooltipWidth;
|
|
524
527
|
}
|
|
525
528
|
|
|
@@ -529,7 +532,7 @@ var Tooltip = function Tooltip(_ref) {
|
|
|
529
532
|
}
|
|
530
533
|
}
|
|
531
534
|
|
|
532
|
-
|
|
535
|
+
const tooltipLowerPoint = tooltipHeight + newRelatedY - scrollY;
|
|
533
536
|
|
|
534
537
|
if (tooltipLowerPoint > svgContainerHeight - scrollY) {
|
|
535
538
|
newRelatedY = svgContainerHeight - tooltipHeight;
|
|
@@ -553,14 +556,16 @@ var Tooltip = function Tooltip(_ref) {
|
|
|
553
556
|
type: type
|
|
554
557
|
}));
|
|
555
558
|
};
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
559
|
+
const StandardTooltipContent = _ref2 => {
|
|
560
|
+
let {
|
|
561
|
+
task,
|
|
562
|
+
fontSize,
|
|
563
|
+
fontFamily,
|
|
564
|
+
type
|
|
565
|
+
} = _ref2;
|
|
566
|
+
const style = {
|
|
567
|
+
fontSize,
|
|
568
|
+
fontFamily
|
|
564
569
|
};
|
|
565
570
|
if (type == "planned") return React.createElement("div", {
|
|
566
571
|
className: styles$2.tooltipDefaultContainer,
|
|
@@ -569,35 +574,37 @@ var StandardTooltipContent = function StandardTooltipContent(_ref2) {
|
|
|
569
574
|
style: {
|
|
570
575
|
fontSize: fontSize + 6
|
|
571
576
|
}
|
|
572
|
-
}, task.name
|
|
577
|
+
}, `${task.name}: Planned dates: `), React.createElement("b", null, `${task.start.getMonth() + 1}/${task.start.getDate()}/${task.start.getFullYear()} - ${task.end.getMonth() + 1}/${task.end.getDate()}/${task.end.getFullYear()}`), task.end.getTime() - task.start.getTime() !== 0 && React.createElement("p", {
|
|
573
578
|
className: styles$2.tooltipDefaultContainerParagraph
|
|
574
|
-
},
|
|
579
|
+
}, `Duration: ${~~((task.end.getTime() - task.start.getTime()) / (1000 * 60 * 60 * 24))} day(s)`), React.createElement("p", {
|
|
575
580
|
className: styles$2.tooltipDefaultContainerParagraph
|
|
576
|
-
}, !!task.progress &&
|
|
581
|
+
}, !!task.progress && `Progress: ${task.progress} %`));else return React.createElement("div", {
|
|
577
582
|
className: styles$2.tooltipDefaultContainer,
|
|
578
583
|
style: style
|
|
579
584
|
}, React.createElement("b", {
|
|
580
585
|
style: {
|
|
581
586
|
fontSize: fontSize + 6
|
|
582
587
|
}
|
|
583
|
-
}, task.name
|
|
588
|
+
}, `${task.name}: Actual dates: `), React.createElement("b", null, `${task.actualStart.getMonth() + 1}/${task.actualStart.getDate()}/${task.actualStart.getFullYear()} - ${task.actualEnd.getMonth() + 1}/${task.actualEnd.getDate()}/${task.actualEnd.getFullYear()}`), task.actualEnd.getTime() - task.actualStart.getTime() !== 0 && React.createElement("p", {
|
|
584
589
|
className: styles$2.tooltipDefaultContainerParagraph
|
|
585
|
-
},
|
|
590
|
+
}, `Duration: ${~~((task.actualEnd.getTime() - task.actualStart.getTime()) / (1000 * 60 * 60 * 24))} day(s)`), React.createElement("p", {
|
|
586
591
|
className: styles$2.tooltipDefaultContainerParagraph
|
|
587
|
-
}, !!task.progress &&
|
|
592
|
+
}, !!task.progress && `Progress: ${task.progress} %`));
|
|
588
593
|
};
|
|
589
594
|
|
|
590
595
|
var styles$3 = {"scroll":"_1eT-t"};
|
|
591
596
|
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
597
|
+
const VerticalScroll = _ref => {
|
|
598
|
+
let {
|
|
599
|
+
scroll,
|
|
600
|
+
ganttHeight,
|
|
601
|
+
ganttFullHeight,
|
|
602
|
+
headerHeight,
|
|
603
|
+
rtl,
|
|
604
|
+
onScroll
|
|
605
|
+
} = _ref;
|
|
606
|
+
const scrollRef = useRef(null);
|
|
607
|
+
useEffect(() => {
|
|
601
608
|
if (scrollRef.current) {
|
|
602
609
|
scrollRef.current.scrollTop = scroll;
|
|
603
610
|
}
|
|
@@ -620,50 +627,56 @@ var VerticalScroll = function VerticalScroll(_ref) {
|
|
|
620
627
|
}));
|
|
621
628
|
};
|
|
622
629
|
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
630
|
+
const TaskList = _ref => {
|
|
631
|
+
let {
|
|
632
|
+
headerHeight,
|
|
633
|
+
fontFamily,
|
|
634
|
+
fontSize,
|
|
635
|
+
rowWidth,
|
|
636
|
+
rowHeight,
|
|
637
|
+
scrollY,
|
|
638
|
+
tasks,
|
|
639
|
+
leafTasks,
|
|
640
|
+
selectedTask,
|
|
641
|
+
setSelectedTask,
|
|
642
|
+
onExpanderClick,
|
|
643
|
+
locale,
|
|
644
|
+
ganttHeight,
|
|
645
|
+
taskListRef,
|
|
646
|
+
horizontalContainerClass,
|
|
647
|
+
TaskListHeader,
|
|
648
|
+
TaskListTable,
|
|
649
|
+
taskLabelRenderer,
|
|
650
|
+
selectedTaskIds,
|
|
651
|
+
onTaskSelectionChange
|
|
652
|
+
} = _ref;
|
|
653
|
+
const horizontalContainerRef = useRef(null);
|
|
654
|
+
useEffect(() => {
|
|
644
655
|
if (horizontalContainerRef.current) {
|
|
645
656
|
horizontalContainerRef.current.scrollTop = scrollY;
|
|
646
657
|
}
|
|
647
658
|
}, [scrollY]);
|
|
648
|
-
|
|
649
|
-
headerHeight
|
|
650
|
-
fontFamily
|
|
651
|
-
fontSize
|
|
652
|
-
rowWidth
|
|
659
|
+
const headerProps = {
|
|
660
|
+
headerHeight,
|
|
661
|
+
fontFamily,
|
|
662
|
+
fontSize,
|
|
663
|
+
rowWidth
|
|
653
664
|
};
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
rowHeight
|
|
657
|
-
rowWidth
|
|
658
|
-
fontFamily
|
|
659
|
-
fontSize
|
|
660
|
-
tasks
|
|
661
|
-
leafTasks
|
|
662
|
-
locale
|
|
665
|
+
const selectedTaskId = selectedTask ? selectedTask.id : "";
|
|
666
|
+
const tableProps = {
|
|
667
|
+
rowHeight,
|
|
668
|
+
rowWidth,
|
|
669
|
+
fontFamily,
|
|
670
|
+
fontSize,
|
|
671
|
+
tasks,
|
|
672
|
+
leafTasks,
|
|
673
|
+
locale,
|
|
663
674
|
selectedTaskId: selectedTaskId,
|
|
664
|
-
setSelectedTask
|
|
665
|
-
onExpanderClick
|
|
666
|
-
taskLabelRenderer
|
|
675
|
+
setSelectedTask,
|
|
676
|
+
onExpanderClick,
|
|
677
|
+
taskLabelRenderer,
|
|
678
|
+
selectedTaskIds,
|
|
679
|
+
onTaskSelectionChange
|
|
667
680
|
};
|
|
668
681
|
return React.createElement("div", {
|
|
669
682
|
ref: taskListRef
|
|
@@ -678,17 +691,19 @@ var TaskList = function TaskList(_ref) {
|
|
|
678
691
|
|
|
679
692
|
var styles$4 = {"gridRow":"_2dZTy","gridRowLine":"_3rUKi","gridTick":"_RuwuK","darkerGridRow":"_2M-tt"};
|
|
680
693
|
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
694
|
+
const GridBody = _ref => {
|
|
695
|
+
let {
|
|
696
|
+
tasks,
|
|
697
|
+
dates,
|
|
698
|
+
rowHeight,
|
|
699
|
+
svgWidth,
|
|
700
|
+
columnWidth,
|
|
701
|
+
todayColor,
|
|
702
|
+
rtl
|
|
703
|
+
} = _ref;
|
|
704
|
+
let y = 0;
|
|
705
|
+
const gridRows = [];
|
|
706
|
+
const rowLines = [React.createElement("line", {
|
|
692
707
|
key: "RowLineFirst",
|
|
693
708
|
x: "0",
|
|
694
709
|
y1: 0,
|
|
@@ -697,9 +712,8 @@ var GridBody = function GridBody(_ref) {
|
|
|
697
712
|
className: styles$4.gridRowLine
|
|
698
713
|
})];
|
|
699
714
|
|
|
700
|
-
for (
|
|
701
|
-
|
|
702
|
-
var isDarkerRow = task.type === "milestone";
|
|
715
|
+
for (const task of tasks) {
|
|
716
|
+
const isDarkerRow = task.type === "milestone";
|
|
703
717
|
gridRows.push(React.createElement("rect", {
|
|
704
718
|
key: "Row" + task.id,
|
|
705
719
|
x: "0",
|
|
@@ -719,13 +733,13 @@ var GridBody = function GridBody(_ref) {
|
|
|
719
733
|
y += rowHeight;
|
|
720
734
|
}
|
|
721
735
|
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
736
|
+
const now = new Date();
|
|
737
|
+
let tickX = 0;
|
|
738
|
+
const ticks = [];
|
|
739
|
+
let today = React.createElement("rect", null);
|
|
726
740
|
|
|
727
|
-
for (
|
|
728
|
-
|
|
741
|
+
for (let i = 0; i < dates.length; i++) {
|
|
742
|
+
const date = dates[i];
|
|
729
743
|
ticks.push(React.createElement("line", {
|
|
730
744
|
key: date.getTime(),
|
|
731
745
|
x1: tickX,
|
|
@@ -771,7 +785,7 @@ var GridBody = function GridBody(_ref) {
|
|
|
771
785
|
}, today));
|
|
772
786
|
};
|
|
773
787
|
|
|
774
|
-
|
|
788
|
+
const Grid = props => {
|
|
775
789
|
return React.createElement("g", {
|
|
776
790
|
className: "grid"
|
|
777
791
|
}, React.createElement(GridBody, Object.assign({}, props)));
|
|
@@ -779,16 +793,17 @@ var Grid = function Grid(props) {
|
|
|
779
793
|
|
|
780
794
|
var styles$5 = {"calendarBottomText":"_9w8d5","calendarTopTick":"_1rLuZ","calendarTopText":"_2q1Kt","calendarHeader":"_35nLX","textAnchorStart":"_2Shd-","textAnchorMiddle":"_2XXW4","textAnchorEnd":"_3GdnC"};
|
|
781
795
|
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
796
|
+
const TopPartOfCalendar = _ref => {
|
|
797
|
+
let {
|
|
798
|
+
value,
|
|
799
|
+
x1Line,
|
|
800
|
+
y1Line,
|
|
801
|
+
y2Line,
|
|
802
|
+
xText,
|
|
803
|
+
yText,
|
|
804
|
+
textAnchor = "middle"
|
|
805
|
+
} = _ref;
|
|
806
|
+
const textAnchorClass = textAnchor === "start" ? styles$5.textAnchorStart : textAnchor === "middle" ? styles$5.textAnchorMiddle : styles$5.textAnchorEnd;
|
|
792
807
|
return React.createElement("g", {
|
|
793
808
|
className: "calendarTop"
|
|
794
809
|
}, React.createElement("line", {
|
|
@@ -802,28 +817,30 @@ var TopPartOfCalendar = function TopPartOfCalendar(_ref) {
|
|
|
802
817
|
key: value + "text",
|
|
803
818
|
y: yText,
|
|
804
819
|
x: xText,
|
|
805
|
-
className: styles$5.calendarTopText
|
|
820
|
+
className: `${styles$5.calendarTopText} ${textAnchorClass}`
|
|
806
821
|
}, value));
|
|
807
822
|
};
|
|
808
823
|
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
824
|
+
const Calendar = _ref => {
|
|
825
|
+
let {
|
|
826
|
+
dateSetup,
|
|
827
|
+
locale,
|
|
828
|
+
viewMode,
|
|
829
|
+
rtl,
|
|
830
|
+
headerHeight,
|
|
831
|
+
columnWidth,
|
|
832
|
+
fontFamily,
|
|
833
|
+
fontSize
|
|
834
|
+
} = _ref;
|
|
835
|
+
|
|
836
|
+
const getCalendarValuesForYear = () => {
|
|
837
|
+
const topValues = [];
|
|
838
|
+
const bottomValues = [];
|
|
839
|
+
const topDefaultHeight = headerHeight * 0.5;
|
|
840
|
+
|
|
841
|
+
for (let i = 0; i < dateSetup.dates.length; i++) {
|
|
842
|
+
const date = dateSetup.dates[i];
|
|
843
|
+
const bottomValue = date.getFullYear();
|
|
827
844
|
bottomValues.push(React.createElement("text", {
|
|
828
845
|
key: date.getFullYear(),
|
|
829
846
|
y: headerHeight * 0.8,
|
|
@@ -832,8 +849,8 @@ var Calendar = function Calendar(_ref) {
|
|
|
832
849
|
}, bottomValue));
|
|
833
850
|
|
|
834
851
|
if (i === 0 || date.getFullYear() !== dateSetup.dates[i - 1].getFullYear()) {
|
|
835
|
-
|
|
836
|
-
|
|
852
|
+
const topValue = date.getFullYear().toString();
|
|
853
|
+
let xText;
|
|
837
854
|
|
|
838
855
|
if (rtl) {
|
|
839
856
|
xText = (6 + i + date.getFullYear() + 1) * columnWidth;
|
|
@@ -856,25 +873,25 @@ var Calendar = function Calendar(_ref) {
|
|
|
856
873
|
return [topValues, bottomValues];
|
|
857
874
|
};
|
|
858
875
|
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
876
|
+
const getCalendarValuesForQuarter = () => {
|
|
877
|
+
const topValues = [];
|
|
878
|
+
const bottomValues = [];
|
|
879
|
+
const topDefaultHeight = headerHeight * 0.5;
|
|
863
880
|
|
|
864
|
-
for (
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
881
|
+
for (let i = 0; i < dateSetup.dates.length; i++) {
|
|
882
|
+
const date = dateSetup.dates[i];
|
|
883
|
+
const quarter = Math.floor(date.getMonth() / 3) + 1;
|
|
884
|
+
const bottomValue = `Q${quarter}`;
|
|
868
885
|
bottomValues.push(React.createElement("text", {
|
|
869
|
-
key: bottomValue
|
|
886
|
+
key: `${bottomValue}-${date.getFullYear()}`,
|
|
870
887
|
y: headerHeight * 0.8,
|
|
871
888
|
x: columnWidth * i + columnWidth * 0.5,
|
|
872
889
|
className: styles$5.calendarBottomText
|
|
873
890
|
}, bottomValue));
|
|
874
891
|
|
|
875
892
|
if (i === 0 || date.getFullYear() !== dateSetup.dates[i - 1].getFullYear()) {
|
|
876
|
-
|
|
877
|
-
|
|
893
|
+
const topValue = date.getFullYear().toString();
|
|
894
|
+
let xText;
|
|
878
895
|
|
|
879
896
|
if (rtl) {
|
|
880
897
|
xText = (3 + i + quarter) * columnWidth;
|
|
@@ -897,26 +914,26 @@ var Calendar = function Calendar(_ref) {
|
|
|
897
914
|
return [topValues, bottomValues];
|
|
898
915
|
};
|
|
899
916
|
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
917
|
+
const getCalendarValuesForMonth = () => {
|
|
918
|
+
const topValues = [];
|
|
919
|
+
const bottomValues = [];
|
|
920
|
+
const topDefaultHeight = headerHeight * 0.5;
|
|
904
921
|
|
|
905
|
-
for (
|
|
906
|
-
|
|
907
|
-
|
|
922
|
+
for (let i = 0; i < dateSetup.dates.length; i++) {
|
|
923
|
+
const date = dateSetup.dates[i];
|
|
924
|
+
const bottomValue = date.toLocaleString(locale, {
|
|
908
925
|
month: "short"
|
|
909
926
|
});
|
|
910
927
|
bottomValues.push(React.createElement("text", {
|
|
911
928
|
key: bottomValue + date.getFullYear(),
|
|
912
929
|
y: headerHeight * 0.8,
|
|
913
930
|
x: columnWidth * i + columnWidth * 0.5,
|
|
914
|
-
className: styles$5.calendarTopText
|
|
931
|
+
className: `${styles$5.calendarTopText} ${styles$5.textAnchorEnd}`
|
|
915
932
|
}, bottomValue));
|
|
916
933
|
|
|
917
934
|
if (i === 0 || date.getFullYear() !== dateSetup.dates[i - 1].getFullYear()) {
|
|
918
|
-
|
|
919
|
-
|
|
935
|
+
const topValue = date.getFullYear().toString();
|
|
936
|
+
let xText;
|
|
920
937
|
|
|
921
938
|
if (rtl) {
|
|
922
939
|
xText = (6 + i + date.getMonth() + 1) * columnWidth;
|
|
@@ -941,27 +958,27 @@ var Calendar = function Calendar(_ref) {
|
|
|
941
958
|
return [topValues, bottomValues];
|
|
942
959
|
};
|
|
943
960
|
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
961
|
+
const getCalendarValuesForWeek = () => {
|
|
962
|
+
const topValues = [];
|
|
963
|
+
const bottomValues = [];
|
|
964
|
+
let weeksCount = 1;
|
|
965
|
+
const topDefaultHeight = headerHeight * 0.5;
|
|
966
|
+
const dates = dateSetup.dates;
|
|
950
967
|
|
|
951
|
-
for (
|
|
952
|
-
|
|
953
|
-
|
|
968
|
+
for (let i = dates.length - 1; i >= 0; i--) {
|
|
969
|
+
const date = dates[i];
|
|
970
|
+
let topValue = "";
|
|
954
971
|
|
|
955
972
|
if (i === 0 || date.getMonth() !== dates[i - 1].getMonth()) {
|
|
956
|
-
topValue = getLocaleMonth(date, locale)
|
|
973
|
+
topValue = `${getLocaleMonth(date, locale)}, ${date.getFullYear()}`;
|
|
957
974
|
}
|
|
958
975
|
|
|
959
|
-
|
|
976
|
+
const bottomValue = `W${getWeekNumberISO8601(date)}`;
|
|
960
977
|
bottomValues.push(React.createElement("text", {
|
|
961
978
|
key: date.getTime(),
|
|
962
979
|
y: headerHeight * 0.8,
|
|
963
980
|
x: columnWidth * (i + +rtl),
|
|
964
|
-
className: styles$5.calendarTopText
|
|
981
|
+
className: `${styles$5.calendarTopText} ${styles$5.textAnchorStart}`
|
|
965
982
|
}, bottomValue));
|
|
966
983
|
|
|
967
984
|
if (topValue) {
|
|
@@ -987,24 +1004,24 @@ var Calendar = function Calendar(_ref) {
|
|
|
987
1004
|
return [topValues, bottomValues];
|
|
988
1005
|
};
|
|
989
1006
|
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
1007
|
+
const getCalendarValuesForDay = () => {
|
|
1008
|
+
const topValues = [];
|
|
1009
|
+
const bottomValues = [];
|
|
1010
|
+
const topDefaultHeight = headerHeight * 0.5;
|
|
1011
|
+
const dates = dateSetup.dates;
|
|
995
1012
|
|
|
996
|
-
for (
|
|
997
|
-
|
|
998
|
-
|
|
1013
|
+
for (let i = 0; i < dates.length; i++) {
|
|
1014
|
+
const date = dates[i];
|
|
1015
|
+
const bottomValue = `${getLocalDayOfWeek(date, locale, "short")}, ${date.getDate().toString()}`;
|
|
999
1016
|
bottomValues.push(React.createElement("text", {
|
|
1000
1017
|
key: date.getTime(),
|
|
1001
1018
|
y: headerHeight * 0.8,
|
|
1002
1019
|
x: columnWidth * i + columnWidth * 0.5,
|
|
1003
|
-
className: styles$5.calendarTopText
|
|
1020
|
+
className: `${styles$5.calendarTopText} ${styles$5.textAnchorMiddle}`
|
|
1004
1021
|
}, bottomValue));
|
|
1005
1022
|
|
|
1006
1023
|
if (i + 1 !== dates.length && date.getMonth() !== dates[i + 1].getMonth()) {
|
|
1007
|
-
|
|
1024
|
+
const topValue = `${getLocaleMonth(date, locale)} ${date.getFullYear()}`;
|
|
1008
1025
|
topValues.push(React.createElement(TopPartOfCalendar, {
|
|
1009
1026
|
key: topValue + date.getFullYear(),
|
|
1010
1027
|
value: topValue,
|
|
@@ -1020,28 +1037,28 @@ var Calendar = function Calendar(_ref) {
|
|
|
1020
1037
|
return [topValues, bottomValues];
|
|
1021
1038
|
};
|
|
1022
1039
|
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1040
|
+
const getCalendarValuesForPartOfDay = () => {
|
|
1041
|
+
const topValues = [];
|
|
1042
|
+
const bottomValues = [];
|
|
1043
|
+
const ticks = viewMode === ViewMode.HalfDay ? 2 : 4;
|
|
1044
|
+
const topDefaultHeight = headerHeight * 0.5;
|
|
1045
|
+
const dates = dateSetup.dates;
|
|
1029
1046
|
|
|
1030
|
-
for (
|
|
1031
|
-
|
|
1032
|
-
|
|
1047
|
+
for (let i = 0; i < dates.length; i++) {
|
|
1048
|
+
const date = dates[i];
|
|
1049
|
+
const bottomValue = getCachedDateTimeFormat(locale, {
|
|
1033
1050
|
hour: "numeric"
|
|
1034
1051
|
}).format(date);
|
|
1035
1052
|
bottomValues.push(React.createElement("text", {
|
|
1036
1053
|
key: date.getTime(),
|
|
1037
1054
|
y: headerHeight * 0.8,
|
|
1038
1055
|
x: columnWidth * (i + +rtl),
|
|
1039
|
-
className: styles$5.calendarTopText
|
|
1056
|
+
className: `${styles$5.calendarTopText} ${styles$5.textAnchorMiddle}`,
|
|
1040
1057
|
fontFamily: fontFamily
|
|
1041
1058
|
}, bottomValue));
|
|
1042
1059
|
|
|
1043
1060
|
if (i === 0 || date.getDate() !== dates[i - 1].getDate()) {
|
|
1044
|
-
|
|
1061
|
+
const topValue = `${getLocalDayOfWeek(date, locale, "short")}, ${date.getDate()} ${getLocaleMonth(date, locale)}`;
|
|
1045
1062
|
topValues.push(React.createElement(TopPartOfCalendar, {
|
|
1046
1063
|
key: topValue + date.getFullYear(),
|
|
1047
1064
|
value: topValue,
|
|
@@ -1057,15 +1074,15 @@ var Calendar = function Calendar(_ref) {
|
|
|
1057
1074
|
return [topValues, bottomValues];
|
|
1058
1075
|
};
|
|
1059
1076
|
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1077
|
+
const getCalendarValuesForHour = () => {
|
|
1078
|
+
const topValues = [];
|
|
1079
|
+
const bottomValues = [];
|
|
1080
|
+
const topDefaultHeight = headerHeight * 0.5;
|
|
1081
|
+
const dates = dateSetup.dates;
|
|
1065
1082
|
|
|
1066
|
-
for (
|
|
1067
|
-
|
|
1068
|
-
|
|
1083
|
+
for (let i = 0; i < dates.length; i++) {
|
|
1084
|
+
const date = dates[i];
|
|
1085
|
+
const bottomValue = getCachedDateTimeFormat(locale, {
|
|
1069
1086
|
hour: "numeric"
|
|
1070
1087
|
}).format(date);
|
|
1071
1088
|
bottomValues.push(React.createElement("text", {
|
|
@@ -1077,9 +1094,9 @@ var Calendar = function Calendar(_ref) {
|
|
|
1077
1094
|
}, bottomValue));
|
|
1078
1095
|
|
|
1079
1096
|
if (i !== 0 && date.getDate() !== dates[i - 1].getDate()) {
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1097
|
+
const displayDate = dates[i - 1];
|
|
1098
|
+
const topValue = `${getLocalDayOfWeek(displayDate, locale, "long")}, ${displayDate.getDate()} ${getLocaleMonth(displayDate, locale)}`;
|
|
1099
|
+
const topPosition = (date.getHours() - 24) / 2;
|
|
1083
1100
|
topValues.push(React.createElement(TopPartOfCalendar, {
|
|
1084
1101
|
key: topValue + displayDate.getFullYear(),
|
|
1085
1102
|
value: topValue,
|
|
@@ -1095,58 +1112,37 @@ var Calendar = function Calendar(_ref) {
|
|
|
1095
1112
|
return [topValues, bottomValues];
|
|
1096
1113
|
};
|
|
1097
1114
|
|
|
1098
|
-
|
|
1099
|
-
|
|
1115
|
+
let topValues = [];
|
|
1116
|
+
let bottomValues = [];
|
|
1100
1117
|
|
|
1101
1118
|
switch (dateSetup.viewMode) {
|
|
1102
1119
|
case ViewMode.Year:
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
topValues = _getCalendarValuesFor[0];
|
|
1106
|
-
bottomValues = _getCalendarValuesFor[1];
|
|
1120
|
+
[topValues, bottomValues] = getCalendarValuesForYear();
|
|
1107
1121
|
break;
|
|
1108
1122
|
|
|
1109
1123
|
case ViewMode.Quarter:
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
topValues = _getCalendarValuesFor2[0];
|
|
1113
|
-
bottomValues = _getCalendarValuesFor2[1];
|
|
1124
|
+
[topValues, bottomValues] = getCalendarValuesForQuarter();
|
|
1114
1125
|
break;
|
|
1115
1126
|
|
|
1116
1127
|
case ViewMode.Month:
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
topValues = _getCalendarValuesFor3[0];
|
|
1120
|
-
bottomValues = _getCalendarValuesFor3[1];
|
|
1128
|
+
[topValues, bottomValues] = getCalendarValuesForMonth();
|
|
1121
1129
|
break;
|
|
1122
1130
|
|
|
1123
1131
|
case ViewMode.Week:
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
topValues = _getCalendarValuesFor4[0];
|
|
1127
|
-
bottomValues = _getCalendarValuesFor4[1];
|
|
1132
|
+
[topValues, bottomValues] = getCalendarValuesForWeek();
|
|
1128
1133
|
break;
|
|
1129
1134
|
|
|
1130
1135
|
case ViewMode.Day:
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
topValues = _getCalendarValuesFor5[0];
|
|
1134
|
-
bottomValues = _getCalendarValuesFor5[1];
|
|
1136
|
+
[topValues, bottomValues] = getCalendarValuesForDay();
|
|
1135
1137
|
break;
|
|
1136
1138
|
|
|
1137
1139
|
case ViewMode.QuarterDay:
|
|
1138
1140
|
case ViewMode.HalfDay:
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
topValues = _getCalendarValuesFor6[0];
|
|
1142
|
-
bottomValues = _getCalendarValuesFor6[1];
|
|
1141
|
+
[topValues, bottomValues] = getCalendarValuesForPartOfDay();
|
|
1143
1142
|
break;
|
|
1144
1143
|
|
|
1145
1144
|
case ViewMode.Hour:
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
topValues = _getCalendarValuesFor7[0];
|
|
1149
|
-
bottomValues = _getCalendarValuesFor7[1];
|
|
1145
|
+
[topValues, bottomValues] = getCalendarValuesForHour();
|
|
1150
1146
|
}
|
|
1151
1147
|
|
|
1152
1148
|
return React.createElement("g", {
|
|
@@ -1182,27 +1178,23 @@ function _catch(body, recover) {
|
|
|
1182
1178
|
return result;
|
|
1183
1179
|
}
|
|
1184
1180
|
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1181
|
+
const Arrow = _ref => {
|
|
1182
|
+
let {
|
|
1183
|
+
taskFrom,
|
|
1184
|
+
taskTo,
|
|
1185
|
+
rowHeight,
|
|
1186
|
+
taskHeight,
|
|
1187
|
+
arrowIndent,
|
|
1188
|
+
rtl,
|
|
1189
|
+
arrowColor
|
|
1190
|
+
} = _ref;
|
|
1191
|
+
let path;
|
|
1192
|
+
let trianglePoints;
|
|
1195
1193
|
|
|
1196
1194
|
if (rtl) {
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
path = _drownPathAndTriangle[0];
|
|
1200
|
-
trianglePoints = _drownPathAndTriangle[1];
|
|
1195
|
+
[path, trianglePoints] = drownPathAndTriangleRTL(taskFrom, taskTo, rowHeight, taskHeight, arrowIndent);
|
|
1201
1196
|
} else {
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
path = _drownPathAndTriangle2[0];
|
|
1205
|
-
trianglePoints = _drownPathAndTriangle2[1];
|
|
1197
|
+
[path, trianglePoints] = drownPathAndTriangle(taskFrom, taskTo, rowHeight, taskHeight, arrowIndent);
|
|
1206
1198
|
}
|
|
1207
1199
|
|
|
1208
1200
|
return React.createElement("g", {
|
|
@@ -1218,8 +1210,8 @@ var Arrow = function Arrow(_ref) {
|
|
|
1218
1210
|
}));
|
|
1219
1211
|
};
|
|
1220
1212
|
|
|
1221
|
-
|
|
1222
|
-
|
|
1213
|
+
const drownPathAndTriangle = (taskFrom, taskTo, rowHeight, taskHeight, arrowIndent) => {
|
|
1214
|
+
let taskToStart, taskFromEnd;
|
|
1223
1215
|
|
|
1224
1216
|
if (taskTo.x1 > 0 && taskTo.actualx1 > 0) {
|
|
1225
1217
|
taskToStart = Math.min(taskTo.x1, taskTo.actualx1);
|
|
@@ -1229,43 +1221,51 @@ var drownPathAndTriangle = function drownPathAndTriangle(taskFrom, taskTo, rowHe
|
|
|
1229
1221
|
taskFromEnd = Math.max(taskFrom.x2, taskFrom.actualx2);
|
|
1230
1222
|
} else if (taskFrom.x2 > 0) taskFromEnd = taskFrom.x2;else if (taskFrom.actualx2 > 0) taskFromEnd = taskFrom.actualx2;else taskFromEnd = 0;
|
|
1231
1223
|
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1224
|
+
const indexCompare = taskFrom.index > taskTo.index ? -1 : 1;
|
|
1225
|
+
const taskToEndPosition = taskTo.y + taskHeight / 2;
|
|
1226
|
+
const taskFromEndPosition = taskFromEnd + arrowIndent * 2;
|
|
1227
|
+
const taskFromHorizontalOffsetValue = taskFromEndPosition < taskToStart ? "" : `H ${taskToStart - arrowIndent}`;
|
|
1228
|
+
const taskToHorizontalOffsetValue = taskFromEndPosition > taskToStart ? arrowIndent : taskToStart - taskFromEnd - arrowIndent;
|
|
1229
|
+
const path = `M ${taskFromEnd} ${taskFrom.y + taskHeight / 2}
|
|
1230
|
+
h ${arrowIndent}
|
|
1231
|
+
v ${indexCompare * rowHeight / 2}
|
|
1232
|
+
${taskFromHorizontalOffsetValue}
|
|
1233
|
+
V ${taskToEndPosition}
|
|
1234
|
+
h ${taskToHorizontalOffsetValue}`;
|
|
1235
|
+
const trianglePoints = `${taskToStart},${taskToEndPosition}
|
|
1236
|
+
${taskToStart - 5},${taskToEndPosition - 5}
|
|
1237
|
+
${taskToStart - 5},${taskToEndPosition + 5}`;
|
|
1239
1238
|
return [path, trianglePoints];
|
|
1240
1239
|
};
|
|
1241
1240
|
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1241
|
+
const drownPathAndTriangleRTL = (taskFrom, taskTo, rowHeight, taskHeight, arrowIndent) => {
|
|
1242
|
+
const indexCompare = taskFrom.index > taskTo.index ? -1 : 1;
|
|
1243
|
+
const taskToEndPosition = taskTo.y + taskHeight / 2;
|
|
1244
|
+
const taskFromEndPosition = taskFrom.x1 - arrowIndent * 2;
|
|
1245
|
+
const taskFromHorizontalOffsetValue = taskFromEndPosition > taskTo.x2 ? "" : `H ${taskTo.x2 + arrowIndent}`;
|
|
1246
|
+
const taskToHorizontalOffsetValue = taskFromEndPosition < taskTo.x2 ? -arrowIndent : taskTo.x2 - taskFrom.x1 + arrowIndent;
|
|
1247
|
+
const path = `M ${taskFrom.x1} ${taskFrom.y + taskHeight / 2}
|
|
1248
|
+
h ${-arrowIndent}
|
|
1249
|
+
v ${indexCompare * rowHeight / 2}
|
|
1250
|
+
${taskFromHorizontalOffsetValue}
|
|
1251
|
+
V ${taskToEndPosition}
|
|
1252
|
+
h ${taskToHorizontalOffsetValue}`;
|
|
1253
|
+
const trianglePoints = `${taskTo.x2},${taskToEndPosition}
|
|
1254
|
+
${taskTo.x2 + 5},${taskToEndPosition + 5}
|
|
1255
|
+
${taskTo.x2 + 5},${taskToEndPosition - 5}`;
|
|
1250
1256
|
return [path, trianglePoints];
|
|
1251
1257
|
};
|
|
1252
1258
|
|
|
1253
|
-
|
|
1254
|
-
|
|
1259
|
+
const convertToBarTasks = (tasks, dates, columnWidth, rowHeight, taskHeight, barCornerRadius, handleWidth, rtl, barProgressColor, barProgressSelectedColor, barBackgroundColor, barBackgroundSelectedColor, projectProgressColor, projectProgressSelectedColor, projectBackgroundColor, projectBackgroundSelectedColor, milestoneBackgroundColor, milestoneBackgroundSelectedColor) => {
|
|
1260
|
+
let barTasks = tasks.map((t, i) => {
|
|
1255
1261
|
return convertToBarTask(t, i, dates, columnWidth, rowHeight, taskHeight, barCornerRadius, handleWidth, rtl, barProgressColor, barProgressSelectedColor, barBackgroundColor, barBackgroundSelectedColor, projectProgressColor, projectProgressSelectedColor, projectBackgroundColor, projectBackgroundSelectedColor, milestoneBackgroundColor, milestoneBackgroundSelectedColor);
|
|
1256
1262
|
});
|
|
1257
|
-
barTasks = barTasks.map(
|
|
1258
|
-
|
|
1263
|
+
barTasks = barTasks.map(task => {
|
|
1264
|
+
const dependencies = task.dependencies || [];
|
|
1259
1265
|
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
return value.id === dependencies[j];
|
|
1263
|
-
});
|
|
1266
|
+
for (let j = 0; j < dependencies.length; j++) {
|
|
1267
|
+
const dependence = barTasks.findIndex(value => value.id === dependencies[j]);
|
|
1264
1268
|
if (dependence !== -1 && task.start.getTime() > 0 && task.end.getTime() > 0) barTasks[dependence].barChildren.push(task);
|
|
1265
|
-
};
|
|
1266
|
-
|
|
1267
|
-
for (var j = 0; j < dependencies.length; j++) {
|
|
1268
|
-
_loop(j);
|
|
1269
1269
|
}
|
|
1270
1270
|
|
|
1271
1271
|
return task;
|
|
@@ -1273,8 +1273,8 @@ var convertToBarTasks = function convertToBarTasks(tasks, dates, columnWidth, ro
|
|
|
1273
1273
|
return barTasks;
|
|
1274
1274
|
};
|
|
1275
1275
|
|
|
1276
|
-
|
|
1277
|
-
|
|
1276
|
+
const convertToBarTask = (task, index, dates, columnWidth, rowHeight, taskHeight, barCornerRadius, handleWidth, rtl, barProgressColor, barProgressSelectedColor, barBackgroundColor, barBackgroundSelectedColor, projectProgressColor, projectProgressSelectedColor, projectBackgroundColor, projectBackgroundSelectedColor, milestoneBackgroundColor, milestoneBackgroundSelectedColor) => {
|
|
1277
|
+
let barTask;
|
|
1278
1278
|
|
|
1279
1279
|
switch (task.type) {
|
|
1280
1280
|
case "milestone":
|
|
@@ -1293,13 +1293,13 @@ var convertToBarTask = function convertToBarTask(task, index, dates, columnWidth
|
|
|
1293
1293
|
return barTask;
|
|
1294
1294
|
};
|
|
1295
1295
|
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1296
|
+
const convertToBar = (task, index, dates, columnWidth, rowHeight, taskHeight, barCornerRadius, handleWidth, rtl, barProgressColor, barProgressSelectedColor, barBackgroundColor, barBackgroundSelectedColor) => {
|
|
1297
|
+
let x1;
|
|
1298
|
+
let x2;
|
|
1299
|
+
let actualx1;
|
|
1300
|
+
let actualx2;
|
|
1301
|
+
let progressStartWidth;
|
|
1302
|
+
let progressEndWidth;
|
|
1303
1303
|
|
|
1304
1304
|
if (rtl) {
|
|
1305
1305
|
x2 = task.start ? taskXCoordinateRTL(task.start, dates, columnWidth) : -1;
|
|
@@ -1315,108 +1315,100 @@ var convertToBar = function convertToBar(task, index, dates, columnWidth, rowHei
|
|
|
1315
1315
|
|
|
1316
1316
|
progressStartWidth = actualx1 && x1 ? Math.abs(actualx1 - x1) : -1;
|
|
1317
1317
|
progressEndWidth = actualx2 && x2 ? Math.abs(actualx2 - x2) : -1;
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
var y = taskYCoordinate(index, rowHeight, taskHeight);
|
|
1325
|
-
var hideChildren = task.hideChildren || false;
|
|
1326
|
-
|
|
1327
|
-
var styles = _extends({
|
|
1318
|
+
let typeInternal = task.type;
|
|
1319
|
+
const [progressWidth, progressX] = progressWithByParams(actualx1, actualx2, task.progress, rtl);
|
|
1320
|
+
const y = taskYCoordinate(index, rowHeight, taskHeight);
|
|
1321
|
+
const hideChildren = task.hideChildren || false;
|
|
1322
|
+
const styles = {
|
|
1328
1323
|
backgroundColor: barBackgroundColor,
|
|
1329
1324
|
backgroundSelectedColor: barBackgroundSelectedColor,
|
|
1330
1325
|
progressColor: barProgressColor,
|
|
1331
|
-
progressSelectedColor: barProgressSelectedColor
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
return
|
|
1335
|
-
typeInternal
|
|
1336
|
-
x1
|
|
1337
|
-
x2
|
|
1338
|
-
actualx1
|
|
1339
|
-
actualx2
|
|
1340
|
-
progressStartWidth
|
|
1341
|
-
progressEndWidth
|
|
1342
|
-
y
|
|
1343
|
-
index
|
|
1344
|
-
progressX
|
|
1345
|
-
progressWidth
|
|
1346
|
-
barCornerRadius
|
|
1347
|
-
handleWidth
|
|
1348
|
-
hideChildren
|
|
1326
|
+
progressSelectedColor: barProgressSelectedColor,
|
|
1327
|
+
...task.styles
|
|
1328
|
+
};
|
|
1329
|
+
return { ...task,
|
|
1330
|
+
typeInternal,
|
|
1331
|
+
x1,
|
|
1332
|
+
x2,
|
|
1333
|
+
actualx1,
|
|
1334
|
+
actualx2,
|
|
1335
|
+
progressStartWidth,
|
|
1336
|
+
progressEndWidth,
|
|
1337
|
+
y,
|
|
1338
|
+
index,
|
|
1339
|
+
progressX,
|
|
1340
|
+
progressWidth,
|
|
1341
|
+
barCornerRadius,
|
|
1342
|
+
handleWidth,
|
|
1343
|
+
hideChildren,
|
|
1349
1344
|
height: taskHeight,
|
|
1350
1345
|
barChildren: [],
|
|
1351
|
-
styles
|
|
1352
|
-
}
|
|
1346
|
+
styles
|
|
1347
|
+
};
|
|
1353
1348
|
};
|
|
1354
1349
|
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
var styles = _extends({
|
|
1350
|
+
const convertToMilestone = (task, index, dates, columnWidth, rowHeight, taskHeight, barCornerRadius, handleWidth, milestoneBackgroundColor, milestoneBackgroundSelectedColor) => {
|
|
1351
|
+
const x = task.start && task.end ? taskXCoordinate(task.start, dates, columnWidth) : 0;
|
|
1352
|
+
const y = taskYCoordinate(index, rowHeight, taskHeight);
|
|
1353
|
+
const x1 = task.start && task.end ? x - taskHeight * 0.5 : 0;
|
|
1354
|
+
const x2 = task.start && task.end ? x + taskHeight * 0.5 : 0;
|
|
1355
|
+
const rotatedHeight = taskHeight / 1.414;
|
|
1356
|
+
const styles = {
|
|
1363
1357
|
backgroundColor: milestoneBackgroundColor,
|
|
1364
1358
|
backgroundSelectedColor: milestoneBackgroundSelectedColor,
|
|
1365
1359
|
progressColor: "",
|
|
1366
|
-
progressSelectedColor: ""
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
return
|
|
1370
|
-
x1
|
|
1371
|
-
x2
|
|
1360
|
+
progressSelectedColor: "",
|
|
1361
|
+
...task.styles
|
|
1362
|
+
};
|
|
1363
|
+
return { ...task,
|
|
1364
|
+
x1,
|
|
1365
|
+
x2,
|
|
1372
1366
|
actualx1: x1,
|
|
1373
1367
|
actualx2: x2,
|
|
1374
1368
|
progressStartWidth: 0,
|
|
1375
1369
|
progressEndWidth: 0,
|
|
1376
|
-
y
|
|
1377
|
-
index
|
|
1370
|
+
y,
|
|
1371
|
+
index,
|
|
1378
1372
|
progressX: 0,
|
|
1379
1373
|
progressWidth: 0,
|
|
1380
|
-
barCornerRadius
|
|
1381
|
-
handleWidth
|
|
1374
|
+
barCornerRadius,
|
|
1375
|
+
handleWidth,
|
|
1382
1376
|
typeInternal: task.type,
|
|
1383
1377
|
progress: 0,
|
|
1384
1378
|
height: rotatedHeight,
|
|
1385
1379
|
hideChildren: undefined,
|
|
1386
1380
|
barChildren: [],
|
|
1387
|
-
styles
|
|
1388
|
-
}
|
|
1381
|
+
styles
|
|
1382
|
+
};
|
|
1389
1383
|
};
|
|
1390
1384
|
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
return d.getTime() >= xDate.getTime();
|
|
1394
|
-
}) - 1;
|
|
1385
|
+
const taskXCoordinate = (xDate, dates, columnWidth) => {
|
|
1386
|
+
const index = dates.findIndex(d => d.getTime() >= xDate.getTime()) - 1;
|
|
1395
1387
|
|
|
1396
1388
|
if (index < 0) {
|
|
1397
1389
|
return 0;
|
|
1398
1390
|
}
|
|
1399
1391
|
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1392
|
+
const remainderMillis = xDate.getTime() - dates[index].getTime();
|
|
1393
|
+
const percentOfInterval = remainderMillis / (dates[index + 1].getTime() - dates[index].getTime());
|
|
1394
|
+
const x = index * columnWidth + percentOfInterval * columnWidth;
|
|
1403
1395
|
return x;
|
|
1404
1396
|
};
|
|
1405
1397
|
|
|
1406
|
-
|
|
1407
|
-
|
|
1398
|
+
const taskXCoordinateRTL = (xDate, dates, columnWidth) => {
|
|
1399
|
+
let x = taskXCoordinate(xDate, dates, columnWidth);
|
|
1408
1400
|
x += columnWidth;
|
|
1409
1401
|
return x;
|
|
1410
1402
|
};
|
|
1411
1403
|
|
|
1412
|
-
|
|
1413
|
-
|
|
1404
|
+
const taskYCoordinate = (index, rowHeight, taskHeight) => {
|
|
1405
|
+
const y = index * rowHeight + (rowHeight - taskHeight) / 2;
|
|
1414
1406
|
return y;
|
|
1415
1407
|
};
|
|
1416
1408
|
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1409
|
+
const progressWithByParams = (taskX1, taskX2, progress, rtl) => {
|
|
1410
|
+
const progressWidth = taskX2 > 0 && taskX1 > 0 ? (taskX2 - taskX1) * progress * 0.01 : 0;
|
|
1411
|
+
let progressX;
|
|
1420
1412
|
|
|
1421
1413
|
if (rtl) {
|
|
1422
1414
|
progressX = taskX2 > 0 ? taskX2 - progressWidth : 0;
|
|
@@ -1426,79 +1418,79 @@ var progressWithByParams = function progressWithByParams(taskX1, taskX2, progres
|
|
|
1426
1418
|
|
|
1427
1419
|
return [progressWidth, progressX];
|
|
1428
1420
|
};
|
|
1429
|
-
|
|
1430
|
-
|
|
1421
|
+
const getProgressPoint = (progressX, taskY, taskHeight) => {
|
|
1422
|
+
const point = [progressX - 5, taskY + taskHeight, progressX + 5, taskY + taskHeight, progressX, taskY + taskHeight - 8.66];
|
|
1431
1423
|
return point.join(",");
|
|
1432
1424
|
};
|
|
1433
1425
|
|
|
1434
|
-
|
|
1426
|
+
const startByX = (x, xStep, task) => {
|
|
1435
1427
|
if (x >= task.x2 - task.handleWidth * 2) {
|
|
1436
1428
|
x = task.x2 - task.handleWidth * 2;
|
|
1437
1429
|
}
|
|
1438
1430
|
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1431
|
+
const steps = Math.round((x - task.x1) / xStep);
|
|
1432
|
+
const additionalXValue = steps * xStep;
|
|
1433
|
+
const newX = task.x1 + additionalXValue;
|
|
1442
1434
|
return newX;
|
|
1443
1435
|
};
|
|
1444
1436
|
|
|
1445
|
-
|
|
1437
|
+
const startByActualX = (x, xStep, task) => {
|
|
1446
1438
|
if (x >= task.actualx2 - task.handleWidth * 2) {
|
|
1447
1439
|
x = task.actualx2 - task.handleWidth * 2;
|
|
1448
1440
|
}
|
|
1449
1441
|
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1442
|
+
const steps = Math.round((x - task.actualx1) / xStep);
|
|
1443
|
+
const additionalXValue = steps * xStep;
|
|
1444
|
+
const newX = task.actualx1 + additionalXValue;
|
|
1453
1445
|
return newX;
|
|
1454
1446
|
};
|
|
1455
1447
|
|
|
1456
|
-
|
|
1448
|
+
const endByX = (x, xStep, task) => {
|
|
1457
1449
|
if (x <= task.x1 + task.handleWidth * 2) {
|
|
1458
1450
|
x = task.x1 + task.handleWidth * 2;
|
|
1459
1451
|
}
|
|
1460
1452
|
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1453
|
+
const steps = Math.round((x - task.x2) / xStep);
|
|
1454
|
+
const additionalXValue = steps * xStep;
|
|
1455
|
+
const newX = task.x2 + additionalXValue;
|
|
1464
1456
|
return newX;
|
|
1465
1457
|
};
|
|
1466
1458
|
|
|
1467
|
-
|
|
1459
|
+
const endByActualX = (x, xStep, task) => {
|
|
1468
1460
|
if (x <= task.actualx1 + task.handleWidth * 2) {
|
|
1469
1461
|
x = task.actualx1 + task.handleWidth * 2;
|
|
1470
1462
|
}
|
|
1471
1463
|
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1464
|
+
const steps = Math.round((x - task.actualx2) / xStep);
|
|
1465
|
+
const additionalXValue = steps * xStep;
|
|
1466
|
+
const newX = task.actualx2 + additionalXValue;
|
|
1475
1467
|
return newX;
|
|
1476
1468
|
};
|
|
1477
1469
|
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1470
|
+
const moveByX = (x, xStep, task) => {
|
|
1471
|
+
const steps = Math.round((x - task.x1) / xStep);
|
|
1472
|
+
const additionalXValue = steps * xStep;
|
|
1473
|
+
const newX1 = task.x1 + additionalXValue;
|
|
1474
|
+
const newX2 = newX1 + task.x2 - task.x1;
|
|
1483
1475
|
return [newX1, newX2];
|
|
1484
1476
|
};
|
|
1485
1477
|
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1478
|
+
const moveByActualX = (x, xStep, task) => {
|
|
1479
|
+
const steps = Math.round((x - task.actualx1) / xStep);
|
|
1480
|
+
const additionalXValue = steps * xStep;
|
|
1481
|
+
const newX1 = task.actualx1 + additionalXValue;
|
|
1482
|
+
const newX2 = newX1 + task.actualx2 - task.actualx1;
|
|
1491
1483
|
return [newX1, newX2];
|
|
1492
1484
|
};
|
|
1493
1485
|
|
|
1494
|
-
|
|
1495
|
-
|
|
1486
|
+
const dateByX = (x, taskX, taskDate, xStep, timeStep) => {
|
|
1487
|
+
let newDate = new Date((x - taskX) / xStep * timeStep + taskDate.getTime());
|
|
1496
1488
|
newDate = new Date(newDate.getTime() + (newDate.getTimezoneOffset() - taskDate.getTimezoneOffset()) * 60000);
|
|
1497
1489
|
return newDate;
|
|
1498
1490
|
};
|
|
1499
1491
|
|
|
1500
|
-
|
|
1501
|
-
|
|
1492
|
+
const handleTaskBySVGMouseEvent = (svgX, action, selectedTask, type, xStep, timeStep, initEventX1Delta, rtl) => {
|
|
1493
|
+
let result;
|
|
1502
1494
|
|
|
1503
1495
|
switch (selectedTask.type) {
|
|
1504
1496
|
case "milestone":
|
|
@@ -1513,15 +1505,15 @@ var handleTaskBySVGMouseEvent = function handleTaskBySVGMouseEvent(svgX, action,
|
|
|
1513
1505
|
return result;
|
|
1514
1506
|
};
|
|
1515
1507
|
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1508
|
+
const handleTaskBySVGMouseEventForBar = (svgX, action, selectedTask, type, xStep, timeStep, initEventX1Delta, rtl) => {
|
|
1509
|
+
const changedTask = { ...selectedTask
|
|
1510
|
+
};
|
|
1511
|
+
let isChanged = false;
|
|
1520
1512
|
|
|
1521
1513
|
switch (action) {
|
|
1522
1514
|
case "start":
|
|
1523
1515
|
{
|
|
1524
|
-
|
|
1516
|
+
const newX1 = type == "planned" ? startByX(svgX, xStep, selectedTask) : startByActualX(svgX, xStep, selectedTask);
|
|
1525
1517
|
if (type == "planned") changedTask.x1 = newX1;else if (type == "actual") changedTask.actualx1 = newX1;
|
|
1526
1518
|
isChanged = changedTask.x1 !== selectedTask.x1 || changedTask.actualx1 !== selectedTask.actualx1;
|
|
1527
1519
|
|
|
@@ -1534,10 +1526,7 @@ var handleTaskBySVGMouseEventForBar = function handleTaskBySVGMouseEventForBar(s
|
|
|
1534
1526
|
if (type == "actual") changedTask.actualStart = dateByX(newX1, selectedTask.actualx1, selectedTask.actualStart, xStep, timeStep);
|
|
1535
1527
|
}
|
|
1536
1528
|
|
|
1537
|
-
|
|
1538
|
-
progressWidth = _progressWithByParams2[0],
|
|
1539
|
-
progressX = _progressWithByParams2[1];
|
|
1540
|
-
|
|
1529
|
+
const [progressWidth, progressX] = progressWithByParams(changedTask.x1, changedTask.x2, changedTask.progress, rtl);
|
|
1541
1530
|
changedTask.progressWidth = progressWidth;
|
|
1542
1531
|
changedTask.progressX = progressX;
|
|
1543
1532
|
}
|
|
@@ -1547,7 +1536,7 @@ var handleTaskBySVGMouseEventForBar = function handleTaskBySVGMouseEventForBar(s
|
|
|
1547
1536
|
|
|
1548
1537
|
case "end":
|
|
1549
1538
|
{
|
|
1550
|
-
|
|
1539
|
+
const newX2 = type == "planned" ? endByX(svgX, xStep, selectedTask) : endByActualX(svgX, xStep, selectedTask);
|
|
1551
1540
|
if (type == "planned") changedTask.x2 = newX2;else if (type == "actual") changedTask.actualx2 = newX2;
|
|
1552
1541
|
isChanged = changedTask.x2 !== selectedTask.x2 || changedTask.actualx2 !== selectedTask.actualx2;
|
|
1553
1542
|
|
|
@@ -1560,12 +1549,9 @@ var handleTaskBySVGMouseEventForBar = function handleTaskBySVGMouseEventForBar(s
|
|
|
1560
1549
|
if (type == "actual") changedTask.actualEnd = dateByX(newX2, selectedTask.actualx2, selectedTask.actualEnd, xStep, timeStep);
|
|
1561
1550
|
}
|
|
1562
1551
|
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
changedTask.progressWidth = _progressWidth;
|
|
1568
|
-
changedTask.progressX = _progressX;
|
|
1552
|
+
const [progressWidth, progressX] = progressWithByParams(changedTask.x1, changedTask.x2, changedTask.progress, rtl);
|
|
1553
|
+
changedTask.progressWidth = progressWidth;
|
|
1554
|
+
changedTask.progressX = progressX;
|
|
1569
1555
|
}
|
|
1570
1556
|
|
|
1571
1557
|
break;
|
|
@@ -1573,10 +1559,7 @@ var handleTaskBySVGMouseEventForBar = function handleTaskBySVGMouseEventForBar(s
|
|
|
1573
1559
|
|
|
1574
1560
|
case "move":
|
|
1575
1561
|
{
|
|
1576
|
-
|
|
1577
|
-
newMoveX1 = _ref[0],
|
|
1578
|
-
newMoveX2 = _ref[1];
|
|
1579
|
-
|
|
1562
|
+
const [newMoveX1, newMoveX2] = type == "planned" ? moveByX(svgX - initEventX1Delta, xStep, selectedTask) : moveByActualX(svgX - initEventX1Delta, xStep, selectedTask);
|
|
1580
1563
|
if (type == "planned") isChanged = newMoveX1 !== selectedTask.x1;
|
|
1581
1564
|
if (type == "actual") isChanged = newMoveX1 !== selectedTask.actualx1;
|
|
1582
1565
|
|
|
@@ -1601,23 +1584,20 @@ var handleTaskBySVGMouseEventForBar = function handleTaskBySVGMouseEventForBar(s
|
|
|
1601
1584
|
}
|
|
1602
1585
|
|
|
1603
1586
|
return {
|
|
1604
|
-
isChanged
|
|
1605
|
-
changedTask
|
|
1587
|
+
isChanged,
|
|
1588
|
+
changedTask
|
|
1606
1589
|
};
|
|
1607
1590
|
};
|
|
1608
1591
|
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1592
|
+
const handleTaskBySVGMouseEventForMilestone = (svgX, action, selectedTask, xStep, timeStep, initEventX1Delta) => {
|
|
1593
|
+
const changedTask = { ...selectedTask
|
|
1594
|
+
};
|
|
1595
|
+
let isChanged = false;
|
|
1613
1596
|
|
|
1614
1597
|
switch (action) {
|
|
1615
1598
|
case "move":
|
|
1616
1599
|
{
|
|
1617
|
-
|
|
1618
|
-
newMoveX1 = _moveByX[0],
|
|
1619
|
-
newMoveX2 = _moveByX[1];
|
|
1620
|
-
|
|
1600
|
+
const [newMoveX1, newMoveX2] = moveByX(svgX - initEventX1Delta, xStep, selectedTask);
|
|
1621
1601
|
isChanged = newMoveX1 !== selectedTask.x1;
|
|
1622
1602
|
|
|
1623
1603
|
if (isChanged) {
|
|
@@ -1632,8 +1612,8 @@ var handleTaskBySVGMouseEventForMilestone = function handleTaskBySVGMouseEventFo
|
|
|
1632
1612
|
}
|
|
1633
1613
|
|
|
1634
1614
|
return {
|
|
1635
|
-
isChanged
|
|
1636
|
-
changedTask
|
|
1615
|
+
isChanged,
|
|
1616
|
+
changedTask
|
|
1637
1617
|
};
|
|
1638
1618
|
};
|
|
1639
1619
|
|
|
@@ -1641,21 +1621,13 @@ function isKeyboardEvent(event) {
|
|
|
1641
1621
|
return event.key !== undefined;
|
|
1642
1622
|
}
|
|
1643
1623
|
function removeHiddenTasks(tasks) {
|
|
1644
|
-
|
|
1645
|
-
return t.hideChildren && t.type === "project";
|
|
1646
|
-
});
|
|
1624
|
+
const groupedTasks = tasks.filter(t => t.hideChildren && t.type === "project");
|
|
1647
1625
|
|
|
1648
1626
|
if (groupedTasks.length > 0) {
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
tasks = tasks.filter(
|
|
1653
|
-
return children.indexOf(t) === -1;
|
|
1654
|
-
});
|
|
1655
|
-
};
|
|
1656
|
-
|
|
1657
|
-
for (var i = 0; groupedTasks.length > i; i++) {
|
|
1658
|
-
_loop(i);
|
|
1627
|
+
for (let i = 0; groupedTasks.length > i; i++) {
|
|
1628
|
+
const groupedTask = groupedTasks[i];
|
|
1629
|
+
const children = getChildren(tasks, groupedTask);
|
|
1630
|
+
tasks = tasks.filter(t => children.indexOf(t) === -1);
|
|
1659
1631
|
}
|
|
1660
1632
|
}
|
|
1661
1633
|
|
|
@@ -1663,29 +1635,25 @@ function removeHiddenTasks(tasks) {
|
|
|
1663
1635
|
}
|
|
1664
1636
|
|
|
1665
1637
|
function getChildren(taskList, task) {
|
|
1666
|
-
|
|
1638
|
+
let tasks = [];
|
|
1667
1639
|
|
|
1668
1640
|
if (task.type !== "project") {
|
|
1669
|
-
tasks = taskList.filter(
|
|
1670
|
-
return t.dependencies && t.dependencies.indexOf(task.id) !== -1;
|
|
1671
|
-
});
|
|
1641
|
+
tasks = taskList.filter(t => t.dependencies && t.dependencies.indexOf(task.id) !== -1);
|
|
1672
1642
|
} else {
|
|
1673
|
-
tasks = taskList.filter(
|
|
1674
|
-
return t.project && t.project === task.id;
|
|
1675
|
-
});
|
|
1643
|
+
tasks = taskList.filter(t => t.project && t.project === task.id);
|
|
1676
1644
|
}
|
|
1677
1645
|
|
|
1678
1646
|
var taskChildren = [];
|
|
1679
|
-
tasks.forEach(
|
|
1680
|
-
taskChildren.push
|
|
1647
|
+
tasks.forEach(t => {
|
|
1648
|
+
taskChildren.push(...getChildren(taskList, t));
|
|
1681
1649
|
});
|
|
1682
1650
|
tasks = tasks.concat(tasks, taskChildren);
|
|
1683
1651
|
return tasks;
|
|
1684
1652
|
}
|
|
1685
1653
|
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1654
|
+
const sortTasks = (taskA, taskB) => {
|
|
1655
|
+
const orderA = taskA.displayOrder || Number.MAX_VALUE;
|
|
1656
|
+
const orderB = taskB.displayOrder || Number.MAX_VALUE;
|
|
1689
1657
|
|
|
1690
1658
|
if (orderA > orderB) {
|
|
1691
1659
|
return 1;
|
|
@@ -1696,24 +1664,26 @@ var sortTasks = function sortTasks(taskA, taskB) {
|
|
|
1696
1664
|
}
|
|
1697
1665
|
};
|
|
1698
1666
|
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1667
|
+
const BarDisplay = _ref => {
|
|
1668
|
+
let {
|
|
1669
|
+
x,
|
|
1670
|
+
y,
|
|
1671
|
+
type,
|
|
1672
|
+
width,
|
|
1673
|
+
height,
|
|
1674
|
+
isSelected,
|
|
1675
|
+
progressX,
|
|
1676
|
+
progressWidth,
|
|
1677
|
+
barCornerRadius,
|
|
1678
|
+
styles,
|
|
1679
|
+
onMouseDown
|
|
1680
|
+
} = _ref;
|
|
1681
|
+
|
|
1682
|
+
const getProcessColor = () => {
|
|
1713
1683
|
return isSelected ? styles.progressSelectedColor : styles.progressColor;
|
|
1714
1684
|
};
|
|
1715
1685
|
|
|
1716
|
-
|
|
1686
|
+
const getBarColor = () => {
|
|
1717
1687
|
return isSelected ? styles.backgroundSelectedColor : styles.backgroundColor;
|
|
1718
1688
|
};
|
|
1719
1689
|
|
|
@@ -1760,13 +1730,15 @@ var BarDisplay = function BarDisplay(_ref) {
|
|
|
1760
1730
|
|
|
1761
1731
|
var styles$6 = {"barWrapper":"_KxSXS","barHandle":"_3w_5u","barBackground":"_31ERP"};
|
|
1762
1732
|
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1733
|
+
const BarDateHandle = _ref => {
|
|
1734
|
+
let {
|
|
1735
|
+
x,
|
|
1736
|
+
y,
|
|
1737
|
+
width,
|
|
1738
|
+
height,
|
|
1739
|
+
barCornerRadius,
|
|
1740
|
+
onMouseDown
|
|
1741
|
+
} = _ref;
|
|
1770
1742
|
return React.createElement("rect", {
|
|
1771
1743
|
x: x,
|
|
1772
1744
|
y: y,
|
|
@@ -1779,22 +1751,22 @@ var BarDateHandle = function BarDateHandle(_ref) {
|
|
|
1779
1751
|
});
|
|
1780
1752
|
};
|
|
1781
1753
|
|
|
1782
|
-
|
|
1783
|
-
_objectDestructuringEmpty(_ref);
|
|
1784
|
-
|
|
1754
|
+
const BarProgressHandle = _ref => {
|
|
1785
1755
|
return React.createElement("div", null);
|
|
1786
1756
|
};
|
|
1787
1757
|
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1758
|
+
const Bar = _ref => {
|
|
1759
|
+
let {
|
|
1760
|
+
task,
|
|
1761
|
+
isProgressChangeable,
|
|
1762
|
+
isDateChangeable,
|
|
1763
|
+
rtl,
|
|
1764
|
+
type,
|
|
1765
|
+
onEventStart,
|
|
1766
|
+
isSelected
|
|
1767
|
+
} = _ref;
|
|
1768
|
+
const progressPoint = getProgressPoint(+!rtl * task.progressWidth + task.progressX, task.y, task.height);
|
|
1769
|
+
const handleHeight = task.height / 2 - 1;
|
|
1798
1770
|
|
|
1799
1771
|
if (type == "planned") {
|
|
1800
1772
|
if (task.x1 && task.x2) return React.createElement("g", {
|
|
@@ -1813,7 +1785,7 @@ var Bar = function Bar(_ref) {
|
|
|
1813
1785
|
barCornerRadius: task.barCornerRadius,
|
|
1814
1786
|
styles: task.styles,
|
|
1815
1787
|
isSelected: isSelected,
|
|
1816
|
-
onMouseDown:
|
|
1788
|
+
onMouseDown: e => {
|
|
1817
1789
|
isDateChangeable && onEventStart("move", task, e, "planned");
|
|
1818
1790
|
}
|
|
1819
1791
|
}), React.createElement("g", {
|
|
@@ -1824,7 +1796,7 @@ var Bar = function Bar(_ref) {
|
|
|
1824
1796
|
width: task.handleWidth,
|
|
1825
1797
|
height: handleHeight,
|
|
1826
1798
|
barCornerRadius: task.barCornerRadius,
|
|
1827
|
-
onMouseDown:
|
|
1799
|
+
onMouseDown: e => {
|
|
1828
1800
|
onEventStart("start", task, e, "planned");
|
|
1829
1801
|
}
|
|
1830
1802
|
}), React.createElement(BarDateHandle, {
|
|
@@ -1833,12 +1805,12 @@ var Bar = function Bar(_ref) {
|
|
|
1833
1805
|
width: task.handleWidth,
|
|
1834
1806
|
height: handleHeight,
|
|
1835
1807
|
barCornerRadius: task.barCornerRadius,
|
|
1836
|
-
onMouseDown:
|
|
1808
|
+
onMouseDown: e => {
|
|
1837
1809
|
onEventStart("end", task, e, "planned");
|
|
1838
1810
|
}
|
|
1839
1811
|
})), isProgressChangeable && React.createElement(BarProgressHandle, {
|
|
1840
1812
|
progressPoint: progressPoint,
|
|
1841
|
-
onMouseDown:
|
|
1813
|
+
onMouseDown: e => {
|
|
1842
1814
|
onEventStart("progress", task, e, "planned");
|
|
1843
1815
|
}
|
|
1844
1816
|
})));else return React.createElement("g", {
|
|
@@ -1862,7 +1834,7 @@ var Bar = function Bar(_ref) {
|
|
|
1862
1834
|
barCornerRadius: task.barCornerRadius,
|
|
1863
1835
|
styles: task.styles,
|
|
1864
1836
|
isSelected: isSelected,
|
|
1865
|
-
onMouseDown:
|
|
1837
|
+
onMouseDown: e => {
|
|
1866
1838
|
isDateChangeable && onEventStart("move", task, e, "actual");
|
|
1867
1839
|
}
|
|
1868
1840
|
}), React.createElement("g", {
|
|
@@ -1873,7 +1845,7 @@ var Bar = function Bar(_ref) {
|
|
|
1873
1845
|
width: task.handleWidth,
|
|
1874
1846
|
height: handleHeight,
|
|
1875
1847
|
barCornerRadius: task.barCornerRadius,
|
|
1876
|
-
onMouseDown:
|
|
1848
|
+
onMouseDown: e => {
|
|
1877
1849
|
onEventStart("start", task, e, "actual");
|
|
1878
1850
|
}
|
|
1879
1851
|
}), React.createElement(BarDateHandle, {
|
|
@@ -1882,12 +1854,12 @@ var Bar = function Bar(_ref) {
|
|
|
1882
1854
|
width: task.handleWidth,
|
|
1883
1855
|
height: handleHeight,
|
|
1884
1856
|
barCornerRadius: task.barCornerRadius,
|
|
1885
|
-
onMouseDown:
|
|
1857
|
+
onMouseDown: e => {
|
|
1886
1858
|
onEventStart("end", task, e, "actual");
|
|
1887
1859
|
}
|
|
1888
1860
|
})), isProgressChangeable && React.createElement(BarProgressHandle, {
|
|
1889
1861
|
progressPoint: progressPoint,
|
|
1890
|
-
onMouseDown:
|
|
1862
|
+
onMouseDown: e => {
|
|
1891
1863
|
onEventStart("progress", task, e, "actual");
|
|
1892
1864
|
}
|
|
1893
1865
|
})));
|
|
@@ -1899,14 +1871,16 @@ var Bar = function Bar(_ref) {
|
|
|
1899
1871
|
}
|
|
1900
1872
|
};
|
|
1901
1873
|
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1874
|
+
const BarSmall = _ref => {
|
|
1875
|
+
let {
|
|
1876
|
+
task,
|
|
1877
|
+
type,
|
|
1878
|
+
isProgressChangeable,
|
|
1879
|
+
isDateChangeable,
|
|
1880
|
+
onEventStart,
|
|
1881
|
+
isSelected
|
|
1882
|
+
} = _ref;
|
|
1883
|
+
const progressPoint = getProgressPoint(task.progressWidth + task.x1, task.y, task.height);
|
|
1910
1884
|
return React.createElement("g", {
|
|
1911
1885
|
className: styles$6.barWrapper,
|
|
1912
1886
|
tabIndex: 0
|
|
@@ -1923,14 +1897,14 @@ var BarSmall = function BarSmall(_ref) {
|
|
|
1923
1897
|
barCornerRadius: task.barCornerRadius,
|
|
1924
1898
|
styles: task.styles,
|
|
1925
1899
|
isSelected: isSelected,
|
|
1926
|
-
onMouseDown:
|
|
1900
|
+
onMouseDown: e => {
|
|
1927
1901
|
isDateChangeable && onEventStart("move", task, e);
|
|
1928
1902
|
}
|
|
1929
1903
|
}), React.createElement("g", {
|
|
1930
1904
|
className: "handleGroup"
|
|
1931
1905
|
}, isProgressChangeable && React.createElement(BarProgressHandle, {
|
|
1932
1906
|
progressPoint: progressPoint,
|
|
1933
|
-
onMouseDown:
|
|
1907
|
+
onMouseDown: e => {
|
|
1934
1908
|
onEventStart("progress", task, e);
|
|
1935
1909
|
}
|
|
1936
1910
|
})));
|
|
@@ -1938,14 +1912,17 @@ var BarSmall = function BarSmall(_ref) {
|
|
|
1938
1912
|
|
|
1939
1913
|
var styles$7 = {"milestoneWrapper":"_RRr13","milestoneBackground":"_2P2B1"};
|
|
1940
1914
|
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1915
|
+
const Milestone = _ref => {
|
|
1916
|
+
let {
|
|
1917
|
+
task,
|
|
1918
|
+
isDateChangeable,
|
|
1919
|
+
onEventStart,
|
|
1920
|
+
isSelected
|
|
1921
|
+
} = _ref;
|
|
1922
|
+
const transform = `rotate(45 ${task.x1 + task.height * 0.356}
|
|
1923
|
+
${task.y + task.height * 0.85})`;
|
|
1924
|
+
|
|
1925
|
+
const getBarColor = () => {
|
|
1949
1926
|
return isSelected ? task.styles.backgroundSelectedColor : task.styles.backgroundColor;
|
|
1950
1927
|
};
|
|
1951
1928
|
|
|
@@ -1962,7 +1939,7 @@ var Milestone = function Milestone(_ref) {
|
|
|
1962
1939
|
ry: task.barCornerRadius,
|
|
1963
1940
|
transform: transform,
|
|
1964
1941
|
className: styles$7.milestoneBackground,
|
|
1965
|
-
onMouseDown:
|
|
1942
|
+
onMouseDown: e => {
|
|
1966
1943
|
isDateChangeable && onEventStart("move", task, e);
|
|
1967
1944
|
}
|
|
1968
1945
|
}));
|
|
@@ -1970,14 +1947,16 @@ var Milestone = function Milestone(_ref) {
|
|
|
1970
1947
|
|
|
1971
1948
|
var styles$8 = {"projectWrapper":"_1KJ6x","projectBackground":"_2RbVy","projectTop":"_2pZMF"};
|
|
1972
1949
|
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1950
|
+
const Project = _ref => {
|
|
1951
|
+
let {
|
|
1952
|
+
task,
|
|
1953
|
+
isSelected
|
|
1954
|
+
} = _ref;
|
|
1955
|
+
const barColor = isSelected ? task.styles.backgroundSelectedColor : task.styles.backgroundColor;
|
|
1956
|
+
const processColor = isSelected ? task.styles.progressSelectedColor : task.styles.progressColor;
|
|
1957
|
+
const projectWith = task.x2 - task.x1;
|
|
1958
|
+
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(",");
|
|
1959
|
+
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(",");
|
|
1981
1960
|
return React.createElement("g", {
|
|
1982
1961
|
tabIndex: 0,
|
|
1983
1962
|
className: styles$8.projectWrapper
|
|
@@ -2018,18 +1997,16 @@ var Project = function Project(_ref) {
|
|
|
2018
1997
|
}));
|
|
2019
1998
|
};
|
|
2020
1999
|
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
useEffect(function () {
|
|
2000
|
+
const TaskItem = props => {
|
|
2001
|
+
const {
|
|
2002
|
+
task,
|
|
2003
|
+
isDelete,
|
|
2004
|
+
isSelected,
|
|
2005
|
+
onEventStart
|
|
2006
|
+
} = { ...props
|
|
2007
|
+
};
|
|
2008
|
+
const [taskItem, setTaskItem] = useState([React.createElement("div", null)]);
|
|
2009
|
+
useEffect(() => {
|
|
2033
2010
|
switch (task.typeInternal) {
|
|
2034
2011
|
case "milestone":
|
|
2035
2012
|
setTaskItem([React.createElement(Milestone, Object.assign({}, props))]);
|
|
@@ -2045,27 +2022,27 @@ var TaskItem = function TaskItem(props) {
|
|
|
2045
2022
|
|
|
2046
2023
|
default:
|
|
2047
2024
|
{
|
|
2048
|
-
|
|
2025
|
+
let taskItem = [];
|
|
2049
2026
|
|
|
2050
2027
|
if (task.x1 && task.x2) {
|
|
2051
|
-
|
|
2028
|
+
taskItem.push(React.createElement(Bar, Object.assign({}, props, {
|
|
2052
2029
|
type: "planned"
|
|
2053
2030
|
})));
|
|
2054
2031
|
}
|
|
2055
2032
|
|
|
2056
2033
|
if (task.actualx1 && task.actualx2) {
|
|
2057
|
-
|
|
2034
|
+
taskItem.push(React.createElement(Bar, Object.assign({}, props, {
|
|
2058
2035
|
type: "actual"
|
|
2059
2036
|
})));
|
|
2060
2037
|
}
|
|
2061
2038
|
|
|
2062
|
-
setTaskItem(
|
|
2039
|
+
setTaskItem(taskItem);
|
|
2063
2040
|
}
|
|
2064
2041
|
break;
|
|
2065
2042
|
}
|
|
2066
2043
|
}, [task, isSelected]);
|
|
2067
2044
|
return React.createElement("g", null, React.createElement("g", {
|
|
2068
|
-
onKeyDown:
|
|
2045
|
+
onKeyDown: e => {
|
|
2069
2046
|
switch (e.key) {
|
|
2070
2047
|
case "Delete":
|
|
2071
2048
|
{
|
|
@@ -2076,20 +2053,20 @@ var TaskItem = function TaskItem(props) {
|
|
|
2076
2053
|
|
|
2077
2054
|
e.stopPropagation();
|
|
2078
2055
|
},
|
|
2079
|
-
onMouseEnter:
|
|
2056
|
+
onMouseEnter: e => {
|
|
2080
2057
|
onEventStart("mouseenter", task, e, "planned");
|
|
2081
2058
|
},
|
|
2082
|
-
onMouseLeave:
|
|
2059
|
+
onMouseLeave: e => {
|
|
2083
2060
|
onEventStart("mouseleave", task, e, "planned");
|
|
2084
2061
|
},
|
|
2085
|
-
onDoubleClick:
|
|
2062
|
+
onDoubleClick: e => {
|
|
2086
2063
|
onEventStart("dblclick", task, e, "planned");
|
|
2087
2064
|
},
|
|
2088
|
-
onClick:
|
|
2065
|
+
onClick: e => {
|
|
2089
2066
|
onEventStart("click", task, e, "planned");
|
|
2090
2067
|
}
|
|
2091
2068
|
}, taskItem[0]), React.createElement("g", {
|
|
2092
|
-
onKeyDown:
|
|
2069
|
+
onKeyDown: e => {
|
|
2093
2070
|
switch (e.key) {
|
|
2094
2071
|
case "Delete":
|
|
2095
2072
|
{
|
|
@@ -2100,82 +2077,74 @@ var TaskItem = function TaskItem(props) {
|
|
|
2100
2077
|
|
|
2101
2078
|
e.stopPropagation();
|
|
2102
2079
|
},
|
|
2103
|
-
onMouseEnter:
|
|
2080
|
+
onMouseEnter: e => {
|
|
2104
2081
|
onEventStart("mouseenter", task, e, "actual");
|
|
2105
2082
|
},
|
|
2106
|
-
onMouseLeave:
|
|
2083
|
+
onMouseLeave: e => {
|
|
2107
2084
|
onEventStart("mouseleave", task, e, "actual");
|
|
2108
2085
|
},
|
|
2109
|
-
onDoubleClick:
|
|
2086
|
+
onDoubleClick: e => {
|
|
2110
2087
|
onEventStart("dblclick", task, e, "actual");
|
|
2111
2088
|
},
|
|
2112
|
-
onClick:
|
|
2089
|
+
onClick: e => {
|
|
2113
2090
|
onEventStart("click", task, e, "actual");
|
|
2114
2091
|
}
|
|
2115
2092
|
}, taskItem[1]));
|
|
2116
2093
|
};
|
|
2117
2094
|
|
|
2118
|
-
|
|
2095
|
+
const TaskGanttContent = _ref => {
|
|
2119
2096
|
var _svg$current;
|
|
2120
2097
|
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
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;
|
|
2098
|
+
let {
|
|
2099
|
+
tasks,
|
|
2100
|
+
dates,
|
|
2101
|
+
ganttEvent,
|
|
2102
|
+
selectedTask,
|
|
2103
|
+
rowHeight,
|
|
2104
|
+
columnWidth,
|
|
2105
|
+
timeStep,
|
|
2106
|
+
svg,
|
|
2107
|
+
taskHeight,
|
|
2108
|
+
arrowIndent,
|
|
2109
|
+
fontFamily,
|
|
2110
|
+
fontSize,
|
|
2111
|
+
rtl,
|
|
2112
|
+
setGanttEvent,
|
|
2113
|
+
setFailedTask,
|
|
2114
|
+
setSelectedTask,
|
|
2115
|
+
onDateChange,
|
|
2116
|
+
onProgressChange,
|
|
2117
|
+
onDoubleClick,
|
|
2118
|
+
onClick,
|
|
2119
|
+
onDelete
|
|
2120
|
+
} = _ref;
|
|
2121
|
+
const point = svg === null || svg === void 0 ? void 0 : (_svg$current = svg.current) === null || _svg$current === void 0 ? void 0 : _svg$current.createSVGPoint();
|
|
2122
|
+
const [xStep, setXStep] = useState(0);
|
|
2123
|
+
const [initEventX1Delta, setInitEventX1Delta] = useState(0);
|
|
2124
|
+
const [isMoving, setIsMoving] = useState(false);
|
|
2125
|
+
useEffect(() => {
|
|
2126
|
+
const dateDelta = dates[1].getTime() - dates[0].getTime() - dates[1].getTimezoneOffset() * 60 * 1000 + dates[0].getTimezoneOffset() * 60 * 1000;
|
|
2127
|
+
const newXStep = timeStep * columnWidth / dateDelta;
|
|
2159
2128
|
setXStep(newXStep);
|
|
2160
2129
|
}, [columnWidth, dates, timeStep]);
|
|
2161
|
-
useEffect(
|
|
2162
|
-
|
|
2130
|
+
useEffect(() => {
|
|
2131
|
+
const handleMouseMove = function (event) {
|
|
2163
2132
|
try {
|
|
2164
2133
|
var _svg$current$getScree;
|
|
2165
2134
|
|
|
2166
2135
|
if (!ganttEvent.changedTask || !point || !(svg !== null && svg !== void 0 && svg.current)) return Promise.resolve();
|
|
2167
2136
|
event.preventDefault();
|
|
2168
2137
|
point.x = event.clientX;
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2138
|
+
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());
|
|
2139
|
+
const {
|
|
2140
|
+
isChanged,
|
|
2141
|
+
changedTask
|
|
2142
|
+
} = handleTaskBySVGMouseEvent(cursor.x, ganttEvent.action, ganttEvent.changedTask, ganttEvent.type, xStep, timeStep, initEventX1Delta, rtl);
|
|
2174
2143
|
|
|
2175
2144
|
if (isChanged) {
|
|
2176
2145
|
setGanttEvent({
|
|
2177
2146
|
action: ganttEvent.action,
|
|
2178
|
-
changedTask
|
|
2147
|
+
changedTask
|
|
2179
2148
|
});
|
|
2180
2149
|
}
|
|
2181
2150
|
|
|
@@ -2185,40 +2154,41 @@ var TaskGanttContent = function TaskGanttContent(_ref) {
|
|
|
2185
2154
|
}
|
|
2186
2155
|
};
|
|
2187
2156
|
|
|
2188
|
-
|
|
2157
|
+
const handleMouseUp = function (event) {
|
|
2189
2158
|
try {
|
|
2190
2159
|
var _svg$current$getScree2;
|
|
2191
2160
|
|
|
2192
|
-
|
|
2161
|
+
function _temp5() {
|
|
2193
2162
|
if (!operationSuccess) {
|
|
2194
2163
|
setFailedTask(originalSelectedTask);
|
|
2195
2164
|
}
|
|
2196
|
-
}
|
|
2165
|
+
}
|
|
2197
2166
|
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2167
|
+
const {
|
|
2168
|
+
action,
|
|
2169
|
+
originalSelectedTask,
|
|
2170
|
+
changedTask,
|
|
2171
|
+
type
|
|
2172
|
+
} = ganttEvent;
|
|
2202
2173
|
if (!changedTask || !point || !(svg !== null && svg !== void 0 && svg.current) || !originalSelectedTask) return Promise.resolve();
|
|
2203
2174
|
event.preventDefault();
|
|
2204
2175
|
point.x = event.clientX;
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
var isNotLikeOriginal = originalSelectedTask.start !== newChangedTask.start || originalSelectedTask.end !== newChangedTask.end || originalSelectedTask.actualStart !== newChangedTask.actualStart || originalSelectedTask.actualEnd !== newChangedTask.actualEnd || originalSelectedTask.progress !== newChangedTask.progress;
|
|
2176
|
+
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());
|
|
2177
|
+
const {
|
|
2178
|
+
changedTask: newChangedTask
|
|
2179
|
+
} = handleTaskBySVGMouseEvent(cursor.x, action, changedTask, type, xStep, timeStep, initEventX1Delta, rtl);
|
|
2180
|
+
const isNotLikeOriginal = originalSelectedTask.start !== newChangedTask.start || originalSelectedTask.end !== newChangedTask.end || originalSelectedTask.actualStart !== newChangedTask.actualStart || originalSelectedTask.actualEnd !== newChangedTask.actualEnd || originalSelectedTask.progress !== newChangedTask.progress;
|
|
2211
2181
|
svg.current.removeEventListener("mousemove", handleMouseMove);
|
|
2212
2182
|
svg.current.removeEventListener("mouseup", handleMouseUp);
|
|
2213
2183
|
setGanttEvent({
|
|
2214
2184
|
action: ""
|
|
2215
2185
|
});
|
|
2216
2186
|
setIsMoving(false);
|
|
2217
|
-
|
|
2187
|
+
let operationSuccess = true;
|
|
2218
2188
|
|
|
2219
|
-
|
|
2189
|
+
const _temp4 = function () {
|
|
2220
2190
|
if ((action === "move" || action === "end" || action === "start") && onDateChange && isNotLikeOriginal) {
|
|
2221
|
-
|
|
2191
|
+
const _temp = _catch(function () {
|
|
2222
2192
|
return Promise.resolve(onDateChange(newChangedTask, newChangedTask.barChildren)).then(function (result) {
|
|
2223
2193
|
if (result !== undefined) {
|
|
2224
2194
|
operationSuccess = result;
|
|
@@ -2228,11 +2198,11 @@ var TaskGanttContent = function TaskGanttContent(_ref) {
|
|
|
2228
2198
|
operationSuccess = false;
|
|
2229
2199
|
});
|
|
2230
2200
|
|
|
2231
|
-
if (
|
|
2201
|
+
if (_temp && _temp.then) return _temp.then(function () {});
|
|
2232
2202
|
} else {
|
|
2233
|
-
|
|
2203
|
+
const _temp3 = function () {
|
|
2234
2204
|
if (onProgressChange && isNotLikeOriginal) {
|
|
2235
|
-
|
|
2205
|
+
const _temp2 = _catch(function () {
|
|
2236
2206
|
return Promise.resolve(onProgressChange(newChangedTask, newChangedTask.barChildren)).then(function (result) {
|
|
2237
2207
|
if (result !== undefined) {
|
|
2238
2208
|
operationSuccess = result;
|
|
@@ -2242,15 +2212,15 @@ var TaskGanttContent = function TaskGanttContent(_ref) {
|
|
|
2242
2212
|
operationSuccess = false;
|
|
2243
2213
|
});
|
|
2244
2214
|
|
|
2245
|
-
if (
|
|
2215
|
+
if (_temp2 && _temp2.then) return _temp2.then(function () {});
|
|
2246
2216
|
}
|
|
2247
2217
|
}();
|
|
2248
2218
|
|
|
2249
|
-
if (
|
|
2219
|
+
if (_temp3 && _temp3.then) return _temp3.then(function () {});
|
|
2250
2220
|
}
|
|
2251
2221
|
}();
|
|
2252
2222
|
|
|
2253
|
-
return Promise.resolve(
|
|
2223
|
+
return Promise.resolve(_temp4 && _temp4.then ? _temp4.then(_temp5) : _temp5(_temp4));
|
|
2254
2224
|
} catch (e) {
|
|
2255
2225
|
return Promise.reject(e);
|
|
2256
2226
|
}
|
|
@@ -2263,7 +2233,7 @@ var TaskGanttContent = function TaskGanttContent(_ref) {
|
|
|
2263
2233
|
}
|
|
2264
2234
|
}, [ganttEvent, xStep, initEventX1Delta, onProgressChange, timeStep, onDateChange, svg, isMoving, point, rtl, setFailedTask, setGanttEvent]);
|
|
2265
2235
|
|
|
2266
|
-
|
|
2236
|
+
const handleBarEventStart = function (action, task, event, type) {
|
|
2267
2237
|
try {
|
|
2268
2238
|
return Promise.resolve(function () {
|
|
2269
2239
|
if (!event) {
|
|
@@ -2272,15 +2242,15 @@ var TaskGanttContent = function TaskGanttContent(_ref) {
|
|
|
2272
2242
|
}
|
|
2273
2243
|
} else return function () {
|
|
2274
2244
|
if (isKeyboardEvent(event)) {
|
|
2275
|
-
|
|
2245
|
+
const _temp8 = function () {
|
|
2276
2246
|
if (action === "delete") {
|
|
2277
|
-
|
|
2247
|
+
const _temp7 = function () {
|
|
2278
2248
|
if (onDelete) {
|
|
2279
|
-
|
|
2249
|
+
const _temp6 = _catch(function () {
|
|
2280
2250
|
return Promise.resolve(onDelete(task)).then(function (result) {
|
|
2281
2251
|
if (result !== undefined && result) {
|
|
2282
2252
|
setGanttEvent({
|
|
2283
|
-
action
|
|
2253
|
+
action,
|
|
2284
2254
|
changedTask: task
|
|
2285
2255
|
});
|
|
2286
2256
|
}
|
|
@@ -2289,19 +2259,19 @@ var TaskGanttContent = function TaskGanttContent(_ref) {
|
|
|
2289
2259
|
console.error("Error on Delete. " + error);
|
|
2290
2260
|
});
|
|
2291
2261
|
|
|
2292
|
-
if (
|
|
2262
|
+
if (_temp6 && _temp6.then) return _temp6.then(function () {});
|
|
2293
2263
|
}
|
|
2294
2264
|
}();
|
|
2295
2265
|
|
|
2296
|
-
if (
|
|
2266
|
+
if (_temp7 && _temp7.then) return _temp7.then(function () {});
|
|
2297
2267
|
}
|
|
2298
2268
|
}();
|
|
2299
2269
|
|
|
2300
|
-
if (
|
|
2270
|
+
if (_temp8 && _temp8.then) return _temp8.then(function () {});
|
|
2301
2271
|
} else if (action === "mouseenter") {
|
|
2302
2272
|
if (!ganttEvent.action) {
|
|
2303
2273
|
setGanttEvent({
|
|
2304
|
-
action
|
|
2274
|
+
action,
|
|
2305
2275
|
changedTask: task,
|
|
2306
2276
|
originalSelectedTask: task,
|
|
2307
2277
|
type: type
|
|
@@ -2322,17 +2292,17 @@ var TaskGanttContent = function TaskGanttContent(_ref) {
|
|
|
2322
2292
|
|
|
2323
2293
|
if (!(svg !== null && svg !== void 0 && svg.current) || !point) return;
|
|
2324
2294
|
point.x = event.clientX;
|
|
2325
|
-
|
|
2295
|
+
const cursor = point.matrixTransform((_svg$current$getScree3 = svg.current.getScreenCTM()) === null || _svg$current$getScree3 === void 0 ? void 0 : _svg$current$getScree3.inverse());
|
|
2326
2296
|
if (type == "planned") setInitEventX1Delta(cursor.x - task.x1);else if (type == "actual") setInitEventX1Delta(cursor.x - task.actualx1);
|
|
2327
2297
|
setGanttEvent({
|
|
2328
|
-
action
|
|
2298
|
+
action,
|
|
2329
2299
|
changedTask: task,
|
|
2330
2300
|
originalSelectedTask: task,
|
|
2331
2301
|
type: type
|
|
2332
2302
|
});
|
|
2333
2303
|
} else {
|
|
2334
2304
|
setGanttEvent({
|
|
2335
|
-
action
|
|
2305
|
+
action,
|
|
2336
2306
|
changedTask: task,
|
|
2337
2307
|
originalSelectedTask: task,
|
|
2338
2308
|
type: type
|
|
@@ -2349,8 +2319,8 @@ var TaskGanttContent = function TaskGanttContent(_ref) {
|
|
|
2349
2319
|
className: "content"
|
|
2350
2320
|
}, React.createElement("g", {
|
|
2351
2321
|
className: "arrows"
|
|
2352
|
-
}, tasks.map(
|
|
2353
|
-
|
|
2322
|
+
}, tasks.map(_task => {
|
|
2323
|
+
const task = _task.start.getTime() > 0 && _task.end.getTime() > 0 ? _task : undefined;
|
|
2354
2324
|
|
|
2355
2325
|
if (!task) {
|
|
2356
2326
|
return React.createElement("g", {
|
|
@@ -2361,28 +2331,26 @@ var TaskGanttContent = function TaskGanttContent(_ref) {
|
|
|
2361
2331
|
});
|
|
2362
2332
|
}
|
|
2363
2333
|
|
|
2364
|
-
return task.barChildren.map(
|
|
2334
|
+
return task.barChildren.map(child => {
|
|
2365
2335
|
var _task$criticalPathArr, _task$criticalPathArr2;
|
|
2366
2336
|
|
|
2367
2337
|
return React.createElement(Arrow, {
|
|
2368
|
-
key:
|
|
2338
|
+
key: `Arrow from ${task.id} to ${tasks[child.index].id}`,
|
|
2369
2339
|
taskFrom: task,
|
|
2370
2340
|
taskTo: tasks[child.index],
|
|
2371
2341
|
rowHeight: rowHeight,
|
|
2372
2342
|
taskHeight: taskHeight,
|
|
2373
2343
|
arrowIndent: arrowIndent,
|
|
2374
2344
|
rtl: rtl,
|
|
2375
|
-
arrowColor: ((_task$criticalPathArr = task.criticalPathArrows) === null || _task$criticalPathArr === void 0 ? void 0 : (_task$criticalPathArr2 = _task$criticalPathArr.find(
|
|
2376
|
-
return arrow.taskId == tasks[child.index].id;
|
|
2377
|
-
})) === null || _task$criticalPathArr2 === void 0 ? void 0 : _task$criticalPathArr2.arrowColor) || "#808080"
|
|
2345
|
+
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"
|
|
2378
2346
|
});
|
|
2379
2347
|
});
|
|
2380
2348
|
})), React.createElement("g", {
|
|
2381
2349
|
className: "bar",
|
|
2382
2350
|
fontFamily: fontFamily,
|
|
2383
2351
|
fontSize: fontSize
|
|
2384
|
-
}, tasks.map(
|
|
2385
|
-
|
|
2352
|
+
}, tasks.map(_task => {
|
|
2353
|
+
const task = _task.start.getTime() > 0 && _task.end.getTime() > 0 ? _task : undefined;
|
|
2386
2354
|
|
|
2387
2355
|
if (!task) {
|
|
2388
2356
|
return React.createElement("g", {
|
|
@@ -2410,27 +2378,27 @@ var TaskGanttContent = function TaskGanttContent(_ref) {
|
|
|
2410
2378
|
|
|
2411
2379
|
var styles$9 = {"ganttVerticalContainer":"_CZjuD","horizontalContainer":"_2B2zv","wrapper":"_3eULf"};
|
|
2412
2380
|
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2381
|
+
const TaskGantt = _ref => {
|
|
2382
|
+
let {
|
|
2383
|
+
gridProps,
|
|
2384
|
+
calendarProps,
|
|
2385
|
+
barProps,
|
|
2386
|
+
ganttHeight,
|
|
2387
|
+
scrollY,
|
|
2388
|
+
scrollX
|
|
2389
|
+
} = _ref;
|
|
2390
|
+
const ganttSVGRef = useRef(null);
|
|
2391
|
+
const horizontalContainerRef = useRef(null);
|
|
2392
|
+
const verticalGanttContainerRef = useRef(null);
|
|
2393
|
+
const newBarProps = { ...barProps,
|
|
2425
2394
|
svg: ganttSVGRef
|
|
2426
|
-
}
|
|
2427
|
-
|
|
2428
|
-
useEffect(function () {
|
|
2395
|
+
};
|
|
2396
|
+
useEffect(() => {
|
|
2429
2397
|
if (horizontalContainerRef.current) {
|
|
2430
2398
|
horizontalContainerRef.current.scrollTop = scrollY;
|
|
2431
2399
|
}
|
|
2432
2400
|
}, [scrollY]);
|
|
2433
|
-
useEffect(
|
|
2401
|
+
useEffect(() => {
|
|
2434
2402
|
if (verticalGanttContainerRef.current) {
|
|
2435
2403
|
verticalGanttContainerRef.current.scrollLeft = scrollX;
|
|
2436
2404
|
}
|
|
@@ -2464,14 +2432,16 @@ var TaskGantt = function TaskGantt(_ref) {
|
|
|
2464
2432
|
|
|
2465
2433
|
var styles$a = {"scrollWrapper":"_2k9Ys","scroll":"_19jgW"};
|
|
2466
2434
|
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2435
|
+
const HorizontalScroll = _ref => {
|
|
2436
|
+
let {
|
|
2437
|
+
scroll,
|
|
2438
|
+
svgWidth,
|
|
2439
|
+
taskListWidth,
|
|
2440
|
+
rtl,
|
|
2441
|
+
onScroll
|
|
2442
|
+
} = _ref;
|
|
2443
|
+
const scrollRef = useRef(null);
|
|
2444
|
+
useEffect(() => {
|
|
2475
2445
|
if (scrollRef.current) {
|
|
2476
2446
|
scrollRef.current.scrollLeft = scroll;
|
|
2477
2447
|
}
|
|
@@ -2479,7 +2449,7 @@ var HorizontalScroll = function HorizontalScroll(_ref) {
|
|
|
2479
2449
|
return React.createElement("div", {
|
|
2480
2450
|
dir: "ltr",
|
|
2481
2451
|
style: {
|
|
2482
|
-
margin: rtl ?
|
|
2452
|
+
margin: rtl ? `0px ${taskListWidth}px 0px 0px` : `0px 0px 0px ${taskListWidth}px`
|
|
2483
2453
|
},
|
|
2484
2454
|
className: styles$a.scrollWrapper,
|
|
2485
2455
|
onScroll: onScroll,
|
|
@@ -2566,7 +2536,9 @@ var Gantt = function Gantt(_ref) {
|
|
|
2566
2536
|
onDelete = _ref.onDelete,
|
|
2567
2537
|
onSelect = _ref.onSelect,
|
|
2568
2538
|
onExpanderClick = _ref.onExpanderClick,
|
|
2569
|
-
taskLabelRenderer = _ref.taskLabelRenderer
|
|
2539
|
+
taskLabelRenderer = _ref.taskLabelRenderer,
|
|
2540
|
+
selectedTaskIds = _ref.selectedTaskIds,
|
|
2541
|
+
onTaskSelectionChange = _ref.onTaskSelectionChange;
|
|
2570
2542
|
var wrapperRef = useRef(null);
|
|
2571
2543
|
var taskListRef = useRef(null);
|
|
2572
2544
|
|
|
@@ -2949,7 +2921,9 @@ var Gantt = function Gantt(_ref) {
|
|
|
2949
2921
|
onDoubleClick: onDoubleClick,
|
|
2950
2922
|
TaskListHeader: TaskListHeader,
|
|
2951
2923
|
TaskListTable: TaskListTable,
|
|
2952
|
-
taskLabelRenderer: taskLabelRenderer
|
|
2924
|
+
taskLabelRenderer: taskLabelRenderer,
|
|
2925
|
+
selectedTaskIds: selectedTaskIds,
|
|
2926
|
+
onTaskSelectionChange: onTaskSelectionChange
|
|
2953
2927
|
};
|
|
2954
2928
|
return React.createElement("div", null, React.createElement("div", {
|
|
2955
2929
|
className: styles$9.wrapper,
|