akfatimeline 1.0.4 → 1.0.5
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/Timeline.js +1095 -110
- package/dist/dist/components/Timeline/DatePickerComponent.js +17 -0
- package/dist/dist/components/Timeline/EventTooltip.js +1 -1
- package/dist/dist/components/Timeline/Indicator.js +1 -2
- package/dist/dist/components/Timeline/MasterHeader.js +36 -23
- package/dist/dist/components/Timeline/Timeline.css +90 -8
- package/dist/dist/components/Timeline/Timeline.js +71 -44
- package/dist/dist/components/Timeline/TimelineContent.js +154 -129
- package/dist/dist/hooks/useEventDragDrop.js +22 -16
- package/package.json +1 -1
- package/public/dist/Timeline.js +3277 -0
- package/public/dist/dist/components/Timeline/DatePickerComponent.js +17 -0
- package/public/dist/dist/components/Timeline/DragAndDropHandler.js +35 -0
- package/public/dist/dist/components/Timeline/EventTooltip.js +206 -0
- package/public/dist/dist/components/Timeline/Indicator.js +29 -0
- package/public/dist/dist/components/Timeline/MasterHeader.js +68 -0
- package/public/dist/dist/components/Timeline/Resources.js +53 -0
- package/public/dist/dist/components/Timeline/ResourcesHeader.js +14 -0
- package/public/dist/dist/components/Timeline/Timeline.css +616 -0
- package/public/dist/dist/components/Timeline/Timeline.js +304 -0
- package/public/dist/dist/components/Timeline/TimelineCell.js +8 -0
- package/public/dist/dist/components/Timeline/TimelineContent.js +447 -0
- package/public/dist/dist/components/Timeline/TimelineEvents.js +114 -0
- package/public/dist/dist/components/Timeline/TimelineHeader.js +43 -0
- package/public/dist/dist/components/Timeline/TimelineMonthContainer.js +29 -0
- package/public/dist/dist/components/Timeline/TimelineResources.js +16 -0
- package/public/dist/dist/hooks/useDragAndDrop.js +80 -0
- package/public/dist/dist/hooks/useEventDragDrop.js +126 -0
- package/public/dist/dist/hooks/useExtendEvent.js +28 -0
- package/public/dist/dist/utils/HorizontalVirtualScroll.js +0 -0
- package/public/dist/dist/utils/dateUtils.js +36 -0
- package/public/dist/dist/utils/filterTimelineData.js +21 -0
- package/public/dist/dist/utils/timelineUtils.js +40 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React, { useRef, useEffect } from "react";
|
|
2
|
+
import flatpickr from "flatpickr";
|
|
3
|
+
import "flatpickr/dist/themes/material_green.css"; // Tema
|
|
4
|
+
|
|
5
|
+
const DatePickerComponent = ({ onDateSelect }) => {
|
|
6
|
+
const pickerRef = useRef();
|
|
7
|
+
|
|
8
|
+
useEffect(() => {
|
|
9
|
+
flatpickr(pickerRef.current, {
|
|
10
|
+
onChange: ([selectedDate]) => onDateSelect(selectedDate),
|
|
11
|
+
});
|
|
12
|
+
}, []);
|
|
13
|
+
|
|
14
|
+
return <input type="text" ref={pickerRef} />;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export default DatePickerComponent;
|
|
@@ -28,7 +28,7 @@ const EventTooltip = ({ event, position = { top: 0, left: 0 }, onClose, onEdit,
|
|
|
28
28
|
<div
|
|
29
29
|
style={{
|
|
30
30
|
position: "absolute",
|
|
31
|
-
top: top -
|
|
31
|
+
top: top - 200, // Tooltip'in biraz yukarıda görünmesi için
|
|
32
32
|
left: left + 70,
|
|
33
33
|
transform: "translateX(-50%)",
|
|
34
34
|
backgroundColor: "#ffffff",
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
// src/components/Timeline/MasterHeader.js
|
|
2
1
|
import React from "react";
|
|
3
2
|
import "./Timeline.css"; // veya MasterHeader.css, eğer ayrı dosyaya koyacaksan
|
|
3
|
+
import "flatpickr/dist/themes/material_green.css"; // Flatpickr Tema
|
|
4
4
|
|
|
5
5
|
const MasterHeader = ({
|
|
6
|
+
selectedDate,
|
|
7
|
+
onDateSelect,
|
|
6
8
|
onToday,
|
|
7
9
|
onAdvance,
|
|
8
10
|
onRetreat,
|
|
@@ -10,44 +12,55 @@ const MasterHeader = ({
|
|
|
10
12
|
onMonthRetreat,
|
|
11
13
|
dayRange,
|
|
12
14
|
setDayRange,
|
|
13
|
-
isDarkMode,
|
|
14
|
-
toggleDarkMode,
|
|
15
15
|
}) => {
|
|
16
|
+
const formattedDate = new Date(
|
|
17
|
+
selectedDate.getTime() + 24 * 60 * 60 * 1000 - selectedDate.getTimezoneOffset() * 60000
|
|
18
|
+
)
|
|
19
|
+
.toISOString()
|
|
20
|
+
.split("T")[0]; // YYYY-MM-DD formatı
|
|
21
|
+
|
|
16
22
|
return (
|
|
17
23
|
<div className="master-header-container">
|
|
18
|
-
<
|
|
19
|
-
|
|
20
|
-
|
|
24
|
+
<div className="master-header-buttons">
|
|
25
|
+
<button className="master-header-btn" onClick={onMonthRetreat}>
|
|
26
|
+
1 Ay Geri
|
|
27
|
+
</button>
|
|
28
|
+
|
|
29
|
+
<button className="master-header-btn" onClick={onRetreat}>
|
|
30
|
+
5 Gün Geri
|
|
31
|
+
</button>
|
|
21
32
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
33
|
+
<input
|
|
34
|
+
type="date"
|
|
35
|
+
className="master-header-date-picker"
|
|
36
|
+
value={formattedDate} // Seçili tarih burada gösteriliyor
|
|
37
|
+
onChange={(e) => onDateSelect(e.target.value)} // Tarih seçimi
|
|
38
|
+
onKeyDown={(e) => e.preventDefault()} // Manuel girişleri engelle
|
|
39
|
+
/>
|
|
25
40
|
|
|
26
|
-
<button className="master-header-btn" onClick={onRetreat}>
|
|
27
|
-
5 Gün Geri
|
|
28
|
-
</button>
|
|
29
41
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
42
|
+
<button className="master-header-btn" onClick={onAdvance}>
|
|
43
|
+
5 Gün İleri
|
|
44
|
+
</button>
|
|
33
45
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
46
|
+
<button className="master-header-btn" onClick={onMonthAdvance}>
|
|
47
|
+
1 Ay İleri
|
|
48
|
+
</button>
|
|
49
|
+
|
|
50
|
+
<button className="master-header-btn" onClick={onToday}>
|
|
51
|
+
Bugün
|
|
52
|
+
</button>
|
|
53
|
+
</div>
|
|
37
54
|
|
|
38
55
|
<select
|
|
39
56
|
className="master-header-select"
|
|
40
57
|
value={dayRange}
|
|
41
|
-
onChange={(e) => setDayRange(parseInt(e.target.value))}
|
|
58
|
+
onChange={(e) => setDayRange(parseInt(e.target.value, 10))}
|
|
42
59
|
>
|
|
43
60
|
<option value={30}>30 Gün</option>
|
|
44
61
|
<option value={60}>60 Gün</option>
|
|
45
62
|
<option value={90}>90 Gün</option>
|
|
46
63
|
</select>
|
|
47
|
-
|
|
48
|
-
<button className="master-header-btn" onClick={toggleDarkMode}>
|
|
49
|
-
{isDarkMode ? "Light Mode" : "Dark Mode"}
|
|
50
|
-
</button>
|
|
51
64
|
</div>
|
|
52
65
|
);
|
|
53
66
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/* src/components/Timeline/Timeline.css */
|
|
2
|
+
@import "flatpickr/dist/themes/material_green.css";
|
|
2
3
|
|
|
3
4
|
/*
|
|
4
5
|
Temel: "sales sayfası" temasıyla uyumlu renkler,
|
|
@@ -376,31 +377,31 @@
|
|
|
376
377
|
.master-header-container {
|
|
377
378
|
display: flex;
|
|
378
379
|
align-items: center;
|
|
380
|
+
justify-content: space-between; /* Butonlar solda, select sağda */
|
|
379
381
|
padding: 10px;
|
|
380
|
-
|
|
381
382
|
background-color: var(--header-background-color);
|
|
382
383
|
color: var(--header-text-color);
|
|
384
|
+
}
|
|
383
385
|
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
*/
|
|
386
|
+
.master-header-buttons {
|
|
387
|
+
display: flex; /* Yan yana dizilim */
|
|
388
|
+
align-items: center; /* Dikey hizalama */
|
|
387
389
|
}
|
|
388
390
|
|
|
389
|
-
/* Butonlar */
|
|
390
391
|
.master-header-btn {
|
|
391
392
|
background-color: transparent;
|
|
392
393
|
color: var(--header-text-color);
|
|
393
394
|
border: 1px solid var(--border-color);
|
|
394
395
|
border-radius: 4px;
|
|
395
396
|
padding: 6px 12px;
|
|
396
|
-
margin-right: 10px;
|
|
397
|
+
margin-right: 10px; /* Butonlar arasında mesafe */
|
|
397
398
|
cursor: pointer;
|
|
398
399
|
font-size: 14px;
|
|
399
400
|
transition: background-color 0.2s ease, color 0.2s ease;
|
|
400
401
|
}
|
|
401
402
|
|
|
402
403
|
.master-header-btn:hover {
|
|
403
|
-
background-color: rgba(25, 118, 210, 0.2); /*
|
|
404
|
+
background-color: rgba(25, 118, 210, 0.2); /* Açık tema hover */
|
|
404
405
|
}
|
|
405
406
|
|
|
406
407
|
.dark-mode .master-header-btn:hover {
|
|
@@ -411,9 +412,36 @@
|
|
|
411
412
|
outline: none;
|
|
412
413
|
}
|
|
413
414
|
|
|
415
|
+
|
|
416
|
+
|
|
417
|
+
/* Tarih seçici (Date Picker) */
|
|
418
|
+
.master-header-date-picker {
|
|
419
|
+
background-color: transparent;
|
|
420
|
+
color: var(--header-text-color);
|
|
421
|
+
border: 1px solid var(--border-color);
|
|
422
|
+
border-radius: 4px;
|
|
423
|
+
padding: 5px 12px;
|
|
424
|
+
margin-right: 10px; /* Butonlar arasında mesafe */
|
|
425
|
+
cursor: pointer;
|
|
426
|
+
font-size: 14px;
|
|
427
|
+
transition: background-color 0.2s ease, color 0.2s ease;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
.master-header-date-picker:hover {
|
|
431
|
+
background-color: rgba(25, 118, 210, 0.2); /* Açık tema hover */
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
.dark-mode .master-header-date-picker:hover {
|
|
435
|
+
background-color: rgba(76, 175, 80, 0.2); /* Koyu tema hover */
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
.master-header-date-picker:focus {
|
|
439
|
+
outline: none;
|
|
440
|
+
}
|
|
441
|
+
|
|
414
442
|
/* Select */
|
|
415
443
|
.master-header-select {
|
|
416
|
-
margin-left:
|
|
444
|
+
margin-left: auto; /* Sağa yaslamak için */
|
|
417
445
|
background-color: transparent;
|
|
418
446
|
color: var(--header-text-color);
|
|
419
447
|
border: 1px solid var(--border-color);
|
|
@@ -427,6 +455,60 @@
|
|
|
427
455
|
outline: none;
|
|
428
456
|
}
|
|
429
457
|
|
|
458
|
+
/* Flatpickr Takvim Kutusu */
|
|
459
|
+
.flatpickr-calendar {
|
|
460
|
+
background-color: var(--background-color);
|
|
461
|
+
color: var(--text-color);
|
|
462
|
+
border: 1px solid var(--border-color);
|
|
463
|
+
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2); /* Gölge efekti */
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
|
|
467
|
+
/* Flatpickr Günü */
|
|
468
|
+
.flatpickr-day {
|
|
469
|
+
background-color: var(--background-color); /* Arka plan rengi */
|
|
470
|
+
color: var(--text-color); /* Yazı rengi */
|
|
471
|
+
border-radius: 4px; /* Köşeleri yuvarlat */
|
|
472
|
+
cursor: pointer;
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
.flatpickr-day:hover {
|
|
476
|
+
background-color: rgba(25, 118, 210, 0.2); /* Hover efekti */
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
.dark-mode .flatpickr-day:hover {
|
|
480
|
+
background-color: rgba(76, 175, 80, 0.2); /* Koyu tema hover efekti */
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
/* Seçili Gün */
|
|
484
|
+
.flatpickr-day.selected {
|
|
485
|
+
background-color: #4caf50; /* Seçili gün rengi */
|
|
486
|
+
color: white; /* Seçili gün yazı rengi */
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
/* Flatpickr Ay ve Yıl */
|
|
490
|
+
.flatpickr-months .flatpickr-month {
|
|
491
|
+
background-color: var(--background-color);
|
|
492
|
+
color: var(--text-color);
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
/* Flatpickr Ay İleri ve Geri Düğmeleri */
|
|
496
|
+
.flatpickr-prev-month, .flatpickr-next-month {
|
|
497
|
+
color: var(--text-color);
|
|
498
|
+
cursor: pointer;
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
/* Koyu Tema Örnekleri */
|
|
502
|
+
.dark-mode .flatpickr-calendar {
|
|
503
|
+
background-color: #1f2937; /* Koyu tema arka plan */
|
|
504
|
+
color: #ffffff; /* Koyu tema yazı rengi */
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
.dark-mode .flatpickr-day.selected {
|
|
508
|
+
background-color: #4caf50;
|
|
509
|
+
color: white;
|
|
510
|
+
}
|
|
511
|
+
|
|
430
512
|
|
|
431
513
|
/* Container */
|
|
432
514
|
.timeline-content-container {
|
|
@@ -35,32 +35,56 @@ const Timeline = ({
|
|
|
35
35
|
|
|
36
36
|
// Yatay scroll özelliği aç/kapa
|
|
37
37
|
horizontalScrollOn = false, // Varsayılan false
|
|
38
|
+
|
|
39
|
+
dayRange = 30,
|
|
40
|
+
setDayRange,
|
|
41
|
+
themeType = "light", // Tema bilgisi varsayılan olarak light
|
|
42
|
+
|
|
43
|
+
eventTooltipOn = true,
|
|
44
|
+
tooltipComponent: TooltipComponent, // Özelleştirilebilir Tooltip bileşeni
|
|
45
|
+
tempEventStyle = {},
|
|
46
|
+
eventStyleResolver = () => ({}),
|
|
47
|
+
|
|
48
|
+
onToday,
|
|
49
|
+
onAdvance,
|
|
50
|
+
onRetreat,
|
|
51
|
+
onMonthAdvance,
|
|
52
|
+
onMonthRetreat,
|
|
38
53
|
}) => {
|
|
39
54
|
// ---------------------------------------------------------
|
|
40
55
|
// 1) timelineData oluştur (dates, monthHeaders vs.)
|
|
41
56
|
// ---------------------------------------------------------
|
|
42
57
|
const timelineData = generateTimelineData(2020, 2030); // 10 yıllık veri
|
|
43
58
|
const { dates, monthHeaders } = timelineData;
|
|
44
|
-
|
|
45
|
-
// ---------------------------------------------------------
|
|
46
|
-
// 2) local state
|
|
47
|
-
// ---------------------------------------------------------
|
|
48
|
-
const [collapsedGroups, setCollapsedGroups] = useState({});
|
|
49
59
|
const [selectedDate, setSelectedDate] = useState(() => {
|
|
50
60
|
const date = programDate ? new Date(programDate) : new Date();
|
|
51
|
-
date.setDate(date.getDate() - 3);
|
|
61
|
+
date.setDate(date.getDate() - 3); // Program tarihinden 3 gün öncesini al
|
|
52
62
|
return date;
|
|
53
63
|
});
|
|
64
|
+
|
|
65
|
+
// ---------------------------------------------------------
|
|
66
|
+
// 2) local state
|
|
67
|
+
// ---------------------------------------------------------
|
|
68
|
+
const [collapsedGroups, setCollapsedGroups] = useState({});
|
|
69
|
+
|
|
54
70
|
const [localEvents, setLocalEvents] = useState(events);
|
|
55
71
|
|
|
56
72
|
const [selectedEvent, setSelectedEvent] = useState(null);
|
|
57
73
|
const [tooltipPosition, setTooltipPosition] = useState({ top: 0, left: 0 });
|
|
58
74
|
|
|
59
75
|
// dayRange = ekranda göstermeyi istediğimiz gün/hücre sayısı (ör. 30 gün)
|
|
60
|
-
const [dayRange, setDayRange] = useState(30);
|
|
61
76
|
|
|
62
|
-
const [isDarkMode, setIsDarkMode] = useState(
|
|
77
|
+
const [isDarkMode, setIsDarkMode] = useState(themeType === "dark");
|
|
78
|
+
|
|
79
|
+
useEffect(() => {
|
|
80
|
+
if (themeType !== undefined) {
|
|
81
|
+
setIsDarkMode(themeType === "dark");
|
|
82
|
+
}
|
|
83
|
+
}, [themeType]);
|
|
63
84
|
|
|
85
|
+
const toggleDarkMode = () => {
|
|
86
|
+
setIsDarkMode((prev) => !prev);
|
|
87
|
+
};
|
|
64
88
|
// ---------------------------------------------------------
|
|
65
89
|
// 3) Sabit hücre genişliği (örneğin 56.95 px)
|
|
66
90
|
// Container genişliği = dayRange * cellWidth
|
|
@@ -119,43 +143,49 @@ const Timeline = ({
|
|
|
119
143
|
|
|
120
144
|
// ---------------------------------------------------------
|
|
121
145
|
// 7) Navigation fonksiyonları
|
|
122
|
-
// ---------------------------------------------------------
|
|
146
|
+
// --------------------------------------------------------- const { dates, monthHeaders } = timelineData;
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
const handleDateChange = (newDate) => {
|
|
151
|
+
setSelectedDate(new Date(newDate));
|
|
152
|
+
};
|
|
153
|
+
|
|
123
154
|
const handleToday = () => {
|
|
124
|
-
const
|
|
125
|
-
|
|
126
|
-
setSelectedDate(
|
|
155
|
+
const today = new Date();
|
|
156
|
+
today.setDate(today.getDate() - 3); // Bugünden 3 gün öncesini ayarla
|
|
157
|
+
setSelectedDate(today);
|
|
127
158
|
};
|
|
159
|
+
|
|
128
160
|
|
|
129
|
-
const handleAdvance = () =>
|
|
161
|
+
const handleAdvance = () => {
|
|
130
162
|
setSelectedDate((prev) => new Date(prev.getTime() + 5 * 24 * 60 * 60 * 1000));
|
|
163
|
+
};
|
|
131
164
|
|
|
132
|
-
const handleRetreat = () =>
|
|
165
|
+
const handleRetreat = () => {
|
|
133
166
|
setSelectedDate((prev) => new Date(prev.getTime() - 5 * 24 * 60 * 60 * 1000));
|
|
167
|
+
};
|
|
134
168
|
|
|
135
|
-
const
|
|
169
|
+
const handleMonthAdvance = () => {
|
|
136
170
|
setSelectedDate((prev) => {
|
|
137
171
|
const newDate = new Date(prev);
|
|
138
|
-
newDate.setMonth(newDate.getMonth()
|
|
172
|
+
newDate.setMonth(newDate.getMonth() + 1);
|
|
139
173
|
return newDate;
|
|
140
174
|
});
|
|
175
|
+
};
|
|
141
176
|
|
|
142
|
-
const
|
|
177
|
+
const handleMonthRetreat = () => {
|
|
143
178
|
setSelectedDate((prev) => {
|
|
144
179
|
const newDate = new Date(prev);
|
|
145
|
-
newDate.setMonth(newDate.getMonth()
|
|
180
|
+
newDate.setMonth(newDate.getMonth() - 1);
|
|
146
181
|
return newDate;
|
|
147
182
|
});
|
|
183
|
+
};
|
|
148
184
|
|
|
149
185
|
// ---------------------------------------------------------
|
|
150
186
|
// 8) Dark Mode
|
|
151
187
|
// ---------------------------------------------------------
|
|
152
|
-
const toggleDarkMode = () => {
|
|
153
|
-
setIsDarkMode((prevMode) => !prevMode);
|
|
154
|
-
};
|
|
155
188
|
|
|
156
|
-
useEffect(() => {
|
|
157
|
-
document.body.classList.toggle("dark-mode", isDarkMode);
|
|
158
|
-
}, [isDarkMode]);
|
|
159
189
|
|
|
160
190
|
// ---------------------------------------------------------
|
|
161
191
|
// 9) Ay başlıklarını filtrele
|
|
@@ -181,21 +211,22 @@ const Timeline = ({
|
|
|
181
211
|
{masterHeaderView && (
|
|
182
212
|
<div className="timeline-master-header">
|
|
183
213
|
<MasterHeader
|
|
214
|
+
selectedDate={selectedDate} // Seçili tarihi gönder
|
|
215
|
+
onDateSelect={handleDateChange}
|
|
184
216
|
onToday={handleToday}
|
|
185
217
|
onAdvance={handleAdvance}
|
|
186
218
|
onRetreat={handleRetreat}
|
|
187
219
|
onMonthAdvance={handleMonthAdvance}
|
|
188
220
|
onMonthRetreat={handleMonthRetreat}
|
|
189
221
|
dayRange={dayRange}
|
|
190
|
-
setDayRange={setDayRange}
|
|
191
|
-
isDarkMode={isDarkMode}
|
|
192
|
-
toggleDarkMode={toggleDarkMode}
|
|
222
|
+
setDayRange={setDayRange}
|
|
193
223
|
/>
|
|
194
224
|
</div>
|
|
195
225
|
)}
|
|
196
226
|
{/* Body: Sol kısım => Resources, Sağ kısım => timeline */}
|
|
197
227
|
<div className="timeline-body">
|
|
198
|
-
<div className="timeline-resources-container"
|
|
228
|
+
<div className="timeline-resources-container"
|
|
229
|
+
style={{ overflow: "hidden"}}>
|
|
199
230
|
<ResourcesHeader content={resourceHeaderContent} />
|
|
200
231
|
<Resources
|
|
201
232
|
groupedResources={resources}
|
|
@@ -205,21 +236,14 @@ const Timeline = ({
|
|
|
205
236
|
/>
|
|
206
237
|
</div>
|
|
207
238
|
|
|
208
|
-
|
|
209
|
-
Dış kap => .timeline-scrollable-container
|
|
210
|
-
horizontalScrollOn => overflow-x auto/hidden
|
|
211
|
-
*/}
|
|
239
|
+
|
|
212
240
|
<div
|
|
213
241
|
className="timeline-scrollable-container"
|
|
214
242
|
style={{
|
|
215
243
|
overflowX: horizontalScrollOn ? "auto" : "hidden",
|
|
216
244
|
}}
|
|
217
245
|
>
|
|
218
|
-
|
|
219
|
-
İç kap => .timeline-header-content-wrapper
|
|
220
|
-
Genişlik => dayRange * cellWidth px (eğer horizontalScrollOn=true)
|
|
221
|
-
Yoksa 100% (scroll devre dışı)
|
|
222
|
-
*/}
|
|
246
|
+
|
|
223
247
|
<div
|
|
224
248
|
className="timeline-header-content-wrapper"
|
|
225
249
|
style={{
|
|
@@ -231,22 +255,20 @@ const Timeline = ({
|
|
|
231
255
|
monthHeaders={filteredMonthHeaders}
|
|
232
256
|
/>
|
|
233
257
|
|
|
234
|
-
|
|
235
|
-
// Props
|
|
258
|
+
<TimelineContent
|
|
236
259
|
groupedResources={resources}
|
|
237
260
|
dates={filteredDates}
|
|
238
261
|
collapsedGroups={collapsedGroups}
|
|
239
262
|
events={localEvents}
|
|
240
263
|
setEvents={setLocalEvents}
|
|
241
|
-
onEventClick={
|
|
242
|
-
todayIndex={
|
|
243
|
-
|
|
264
|
+
onEventClick={onEventClick}
|
|
265
|
+
todayIndex={filteredDates.findIndex(
|
|
266
|
+
(d) => new Date(d.fullDate).toDateString() === new Date().toDateString()
|
|
267
|
+
)}
|
|
244
268
|
indicatorOn={indicatorOn}
|
|
245
269
|
resourceSettings={resourceSettings}
|
|
246
270
|
toggleGroupCollapse={toggleGroupCollapse}
|
|
247
271
|
setDropInfo={setDropInfo}
|
|
248
|
-
|
|
249
|
-
// Yeni prop'lar
|
|
250
272
|
eventsDragOn={eventsDragOn}
|
|
251
273
|
eventsExtendOn={eventsExtendOn}
|
|
252
274
|
createNewEventOn={createNewEventOn}
|
|
@@ -254,6 +276,11 @@ const Timeline = ({
|
|
|
254
276
|
onExtendInfo={onExtendInfo}
|
|
255
277
|
onCreateEventInfo={onCreateEventInfo}
|
|
256
278
|
onEventRightClick={onEventRightClick}
|
|
279
|
+
eventTooltipOn={eventTooltipOn} // Tooltip kontrolü
|
|
280
|
+
tooltipComponent={TooltipComponent} // Özelleştirilebilir Tooltip bileşeni
|
|
281
|
+
tempEventStyle = {tempEventStyle}
|
|
282
|
+
eventStyleResolver={eventStyleResolver}
|
|
283
|
+
|
|
257
284
|
/>
|
|
258
285
|
|
|
259
286
|
{/* Tooltip */}
|