akfatimeline 1.0.0

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.
Files changed (42) hide show
  1. package/README.md +924 -0
  2. package/babel.config.json +4 -0
  3. package/package.json +50 -0
  4. package/public/favicon.ico +0 -0
  5. package/public/index.html +43 -0
  6. package/public/logo192.png +0 -0
  7. package/public/logo512.png +0 -0
  8. package/public/manifest.json +25 -0
  9. package/public/robots.txt +3 -0
  10. package/src/App copy.js +185 -0
  11. package/src/App.css +38 -0
  12. package/src/App.js +201 -0
  13. package/src/App.test.js +8 -0
  14. package/src/components/Timeline/DragAndDropHandler.js +35 -0
  15. package/src/components/Timeline/EventTooltip.js +206 -0
  16. package/src/components/Timeline/Indicator.js +30 -0
  17. package/src/components/Timeline/MasterHeader.js +55 -0
  18. package/src/components/Timeline/Resources.js +53 -0
  19. package/src/components/Timeline/ResourcesHeader.js +14 -0
  20. package/src/components/Timeline/Timeline.css +534 -0
  21. package/src/components/Timeline/Timeline.js +277 -0
  22. package/src/components/Timeline/TimelineCell.js +8 -0
  23. package/src/components/Timeline/TimelineContent copy.js +421 -0
  24. package/src/components/Timeline/TimelineContent.js +422 -0
  25. package/src/components/Timeline/TimelineEvents.js +114 -0
  26. package/src/components/Timeline/TimelineHeader.js +43 -0
  27. package/src/components/Timeline/TimelineMonthContainer.js +29 -0
  28. package/src/components/Timeline/TimelineResources.js +16 -0
  29. package/src/dist/Timeline.js +277 -0
  30. package/src/hooks/useDragAndDrop.js +80 -0
  31. package/src/hooks/useEventDragDrop.js +120 -0
  32. package/src/hooks/useExtendEvent.js +28 -0
  33. package/src/index.css +13 -0
  34. package/src/index.js +17 -0
  35. package/src/logo.svg +1 -0
  36. package/src/reportWebVitals.js +13 -0
  37. package/src/setupTests.js +5 -0
  38. package/src/utils/HorizontalVirtualScroll.js +0 -0
  39. package/src/utils/dateUtils.js +36 -0
  40. package/src/utils/filterTimelineData.js +21 -0
  41. package/src/utils/timelineUtils.js +40 -0
  42. package/webpack.config.js +31 -0
package/README.md ADDED
@@ -0,0 +1,924 @@
1
+ # AkfaTimeline
2
+
3
+ AkfaTimeline, React uygulamaları için tamamen özelleştirilebilir bir timeline bileşenidir. Bu bileşen; kaynak gruplama, etkinlik düzenleme, dinamik tema desteği ve daha fazlasını sunar. Modern React uygulamalarında etkin zaman çizelgeleri oluşturmayı hızlı ve kolay hale getirir.
4
+
5
+ ![AkfaTimeline Screenshot](https://i.hizliresim.com/pc4zva7.jpg)
6
+
7
+ ---
8
+
9
+ ## 🚀 Özellikler
10
+ Kaynak Gruplama ve Özelleştirme:
11
+
12
+ Kaynakları gruplar halinde yönetebilir veya düz bir liste olarak görüntüleyebilirsiniz.
13
+ Gruplar açılıp kapanabilir ve başlık içerikleri özelleştirilebilir.
14
+ Kaynak ID'si veya adı arasında seçim yaparak görüntüleme düzenini değiştirebilirsiniz.
15
+ Dinamik Etkinlik Yönetimi:
16
+
17
+ Sürükle ve Bırak: Etkinlikleri kolayca taşıyabilirsiniz.
18
+ Uzatma: Etkinlikleri sağ kenarından uzatarak tarihlerini değiştirebilirsiniz.
19
+ Yeni Etkinlik Oluşturma: Hücrelere tıklayarak yeni etkinlikler ekleyebilirsiniz.
20
+ Etkinlik Tıklama ve Sağ Tıklama: Kullanıcı etkileşimlerine özel geri bildirim sağlama.
21
+ Zaman Yönetimi ve Filtreleme:
22
+
23
+ Seçilebilir gün aralığı (dayRange) ile görüntülenen tarihleri dinamik olarak ayarlayın.
24
+ Yatay kaydırma desteği ile daha geniş tarih aralıklarını yönetebilirsiniz.
25
+ "Bugün" göstergesi ile önemli tarihleri vurgulayın.
26
+ Tema ve Özelleştirme:
27
+
28
+ Dark ve Light tema desteği ile kolay tema geçişi.
29
+ CSS değişkenleri sayesinde bileşen tasarımını kendi markanıza göre özelleştirin.
30
+ Callback Destekleri:
31
+
32
+ onDragInfo: Sürüklenen etkinlik bilgilerini yakalayın.
33
+ onExtendInfo: Uzatılan etkinliklerin güncellenmiş tarih bilgilerini alın.
34
+ onCreateEventInfo: Yeni oluşturulan etkinliklerin verilerini alın.
35
+ onEventClick ve onEventRightClick: Etkinliklere yapılan tıklamaları işleyin.
36
+ Gelişmiş Başlık ve Kaynak Yönetimi:
37
+
38
+ Master başlık görünürlüğünü (masterHeaderView) kontrol edin.
39
+ Kaynak başlığını (resourceHeaderContent) tamamen özelleştirin.
40
+ Yatay Kaydırma ve Responsive Yapı:
41
+
42
+ Dinamik hücre genişlikleri ve yatay kaydırma desteği.
43
+ Responsive tasarım ile her ekran boyutunda mükemmel görünüm.
44
+ Kolay Entegrasyon: Kullanıcı dostu API ile bileşeni dakikalar içinde entegre edin.
45
+
46
+ ---
47
+
48
+ ## 📦 Kurulum
49
+
50
+ Projeye eklemek için aşağıdaki komutu çalıştırın:
51
+
52
+ ```bash
53
+ npm install akfatimeline
54
+
55
+
56
+ 🛠️ Kullanım Şekli
57
+ AkfaTimeline'ı kullanmaya başlamak için aşağıdaki örnek kodu inceleyebilirsiniz. Bu örnek, kaynaklar, etkinlikler ve temel ayarlarla bir timeline oluşturur.
58
+
59
+ 1. Bileşeni İçeri Aktarın
60
+ İlk olarak, AkfaTimeline bileşenini projenize dahil edin:
61
+
62
+ jsx
63
+
64
+ import React from "react";
65
+ import Timeline from "akfatimeline";
66
+ 2. Verilerinizi Hazırlayın
67
+ Timeline için kaynaklar ve etkinlikler verisi tanımlayın:
68
+
69
+ jsx
70
+
71
+ const resources = [
72
+ {
73
+ groupName: "Luxury Rooms",
74
+ resources: [
75
+ { id: "lux-101", name: "Room 101" },
76
+ { id: "lux-102", name: "Room 102" },
77
+ ],
78
+ },
79
+ {
80
+ groupName: "Family Suites",
81
+ resources: [
82
+ { id: "fam-201", name: "Suite 201" },
83
+ { id: "fam-202", name: "Suite 202" },
84
+ ],
85
+ },
86
+ ];
87
+
88
+ const events = [
89
+ {
90
+ id: "lux-101-1",
91
+ title: "Room 101 Event",
92
+ startDate: new Date("2025-01-01"),
93
+ endDate: new Date("2025-01-08"),
94
+ resourceId: "lux-101",
95
+ color: "#ff5733",
96
+ },
97
+ {
98
+ id: "fam-201-1",
99
+ title: "Suite 201 Event",
100
+ startDate: new Date("2025-01-03"),
101
+ endDate: new Date("2025-01-06"),
102
+ resourceId: "fam-201",
103
+ color: "#33a1ff",
104
+ },
105
+ ];
106
+ 3. Timeline Bileşenini Kullanın
107
+ Timeline bileşenini kullanarak verilerinizi gösterin:
108
+
109
+ jsx
110
+
111
+ const App = () => {
112
+ const resourceSettings = {
113
+ showIdAsName: false,
114
+ isGrouped: true,
115
+ isCollapsible: true,
116
+ };
117
+
118
+ return (
119
+ <Timeline
120
+ resources={resources} // Kaynak listesi
121
+ events={events} // Etkinlik listesi
122
+ programDate="2025-01-01" // Timeline başlangıç tarihi
123
+ resourceSettings={resourceSettings} // Kaynak ayarları
124
+ indicatorOn={true} // Bugün göstergesi
125
+ horizontalScrollOn={true} // Yatay kaydırma
126
+ />
127
+ );
128
+ };
129
+
130
+ export default App;
131
+ 4. CSS ve Temalar
132
+ AkfaTimeline varsayılan stillerle birlikte gelir. Kendi temalarınızı uygulamak için CSS değişkenlerini kullanabilirsiniz.
133
+
134
+ css
135
+
136
+ :root {
137
+ --background-color: #ffffff;
138
+ --timeline-event-background-color: #ff5733;
139
+ --timeline-event-text-color: #fff;
140
+ }
141
+ 🧩 Callback Kullanımı
142
+ Etkinlikler üzerinde işlem yapmak için callback'leri kullanabilirsiniz. Örneğin:
143
+
144
+ jsx
145
+
146
+ <Timeline
147
+ events={events}
148
+ onEventClick={(event) => console.log("Event Clicked:", event)}
149
+ onDragInfo={(dragData) => console.log("Dragged Event Info:", dragData)}
150
+ onExtendInfo={(extendData) => console.log("Extended Event Info:", extendData)}
151
+ />
152
+
153
+
154
+
155
+
156
+ Örnek App.js dosyası
157
+
158
+
159
+ // Gerekli kütüphaneleri import ediyoruz
160
+ import React, { useState } from "react";
161
+ // Timeline bileşenini import ediyoruz
162
+ import Timeline from "./components/Timeline/Timeline";
163
+
164
+ const App = () => {
165
+ // Timeline başlangıç tarihi (zorunlu, format: "YYYY-MM-DD")
166
+ const programDate = "2025-01-02";
167
+
168
+ // Timeline için etkinliklerin veri listesi
169
+ const events = [
170
+ {
171
+ id: "lux-101-1", // Benzersiz etkinlik kimliği (zorunlu)
172
+ title: "Room 101 Event", // Etkinlik adı (zorunlu)
173
+ startDate: new Date("2025-01-01"), // Başlangıç tarihi (zorunlu, JS Date formatı)
174
+ endDate: new Date("2025-01-08"), // Bitiş tarihi (zorunlu, JS Date formatı)
175
+ resourceId: "lux-101", // Hangi kaynağa ait olduğunu belirten ID (zorunlu)
176
+ color: "#ff5733", // Etkinlik için özel renk (isteğe bağlı)
177
+ totalAmount: 500, // Ek alan: Toplam borç (isteğe bağlı)
178
+ amountPaid: 200, // Ek alan: Ödenen miktar (isteğe bağlı)
179
+ status: "Confirmed", // Ek alan: Rezervasyon durumu (isteğe bağlı)
180
+ note: "Misafirler özel talep olarak ekstra yastık istediler.", // Not (isteğe bağlı)
181
+ },
182
+ {
183
+ id: "lux-102-1",
184
+ title: "Room 102 Event",
185
+ startDate: new Date("2025-01-02"),
186
+ endDate: new Date("2025-01-04"),
187
+ resourceId: "lux-102",
188
+ color: "#33a1ff",
189
+ },
190
+ {
191
+ id: "lux-103-1",
192
+ title: "Room 103 Event",
193
+ startDate: new Date("2025-01-01"),
194
+ endDate: new Date("2025-01-02"),
195
+ resourceId: "lux-103",
196
+ color: "#33ff57",
197
+ },
198
+ {
199
+ id: "fam-201-1",
200
+ title: "Suite 201 Event",
201
+ startDate: new Date("2025-01-01"),
202
+ endDate: new Date("2025-01-02"),
203
+ resourceId: "fam-201",
204
+ color: "#ff33a1",
205
+ },
206
+ {
207
+ id: "fam-202-1",
208
+ title: "Suite 202 Event",
209
+ startDate: new Date("2025-01-03"),
210
+ endDate: new Date("2025-01-05"),
211
+ resourceId: "fam-202",
212
+ color: "#a1ff33",
213
+ },
214
+ {
215
+ id: "bus-301-1",
216
+ title: "Room 301 Event",
217
+ startDate: new Date("2025-01-02"),
218
+ endDate: new Date("2025-01-04"),
219
+ resourceId: "bus-301",
220
+ color: "#ff9a00",
221
+ },
222
+ {
223
+ id: "vip-401-1",
224
+ title: "VIP 401 Event",
225
+ startDate: new Date("2025-01-04"),
226
+ endDate: new Date("2025-01-06"),
227
+ resourceId: "vip-401",
228
+ color: "#800080",
229
+ },
230
+ {
231
+ id: "vip-402-1",
232
+ title: "VIP 402 Event",
233
+ startDate: new Date("2025-01-05"),
234
+ endDate: new Date("2025-01-06"),
235
+ resourceId: "vip-402",
236
+ color: "#008080",
237
+ },
238
+ // Diğer etkinlikler...
239
+ ];
240
+
241
+ // Kaynakların listesi (zorunlu, grup ve kaynak bilgisi içermeli)
242
+ const resources = [
243
+ {
244
+ groupName: "Luxury Rooms", // Grup adı (zorunlu)
245
+ resources: [
246
+ { id: "lux-101", name: "Room 101" }, // Kaynak ID ve adı (zorunlu)
247
+ { id: "lux-102", name: "Room 102" },
248
+ { id: "lux-103", name: "Room 103" },
249
+ { id: "lux-104", name: "Room 104" },
250
+ ],
251
+ },
252
+ {
253
+ groupName: "Family Suites",
254
+ resources: [
255
+ { id: "fam-201", name: "Suite 201" },
256
+ { id: "fam-202", name: "Suite 202" },
257
+ { id: "fam-203", name: "Suite 203" },
258
+ { id: "fam-204", name: "Suite 204" },
259
+ ],
260
+ },
261
+ {
262
+ groupName: "Business Class",
263
+ resources: [
264
+ { id: "bus-301", name: "Room 301" },
265
+ { id: "bus-302", name: "Room 302" },
266
+ { id: "bus-303", name: "Room 303" },
267
+ { id: "bus-304", name: "Room 304" },
268
+ ],
269
+ },
270
+ {
271
+ groupName: "VIP Exclusive",
272
+ resources: [
273
+ { id: "vip-401", name: "VIP 401" },
274
+ { id: "vip-402", name: "VIP 402" },
275
+ { id: "vip-403", name: "VIP 403" },
276
+ { id: "vip-404", name: "VIP 404" },
277
+
278
+ ],
279
+ },
280
+ ];
281
+
282
+ // Kaynak ayarları (isteğe bağlı, varsayılan ayarlar mevcut)
283
+ const resourceSettings = {
284
+ showIdAsName: false, // true: Kaynak ID gösterir, false: Kaynak adı gösterir
285
+ isGrouped: true, // true: Kaynakları gruplar halinde gösterir
286
+ isCollapsible: true, // true: Gruplar açılıp kapatılabilir
287
+ };
288
+
289
+ // Drag-and-drop işlemleri için gerekli callback ve state'ler
290
+ const [dropInfo, setDropInfo] = useState(null); // Sürükle-bırak sonrası bilgi saklar
291
+ const handleDragInfo = (dragData) => {
292
+ console.log("Dragged Event Info:", dragData);
293
+ };
294
+
295
+ // Etkinlik genişletme (extend) işlemi callback'i
296
+ const handleExtendInfo = (extendData) => {
297
+ console.log("Extended Event Info:", extendData);
298
+ };
299
+
300
+ // Yeni etkinlik oluşturma işlemi callback'i
301
+ const handleCreateEventInfo = (newEventData) => {
302
+ console.log("New Event Created:", newEventData);
303
+ };
304
+
305
+ // Etkinlik tıklama işlemi callback'i
306
+ const handleEventClick = (evt, ev) => {
307
+ console.log("Event clicked:", evt);
308
+ };
309
+
310
+ // Etkinlik sağ tıklama işlemi callback'i
311
+ const handleEventRightClick = (evt, ev) => {
312
+ ev.preventDefault(); // Varsayılan sağ tık menüsünü engeller
313
+ console.log("Event right-clicked:", evt);
314
+ };
315
+
316
+ // Diğer özellikler ve kontrol mekanizmaları
317
+ const eventsDragOn = true; // true: Etkinlik sürükle-bırak özelliği aktif
318
+ const eventsExtendOn = true; // true: Etkinlik genişletme özelliği aktif
319
+ const createNewEventOn = true; // true: Yeni etkinlik oluşturma özelliği aktif
320
+ const horizontalScrollOn = true; // true: Yatay kaydırma özelliği aktif
321
+ const [masterHeaderView, setMasterHeaderView] = useState(true); // true: Master Header gösterilir
322
+ const [resourceHeaderContent, setResourceHeaderContent] = useState("Akfa Timeline"); // Resources başlık içeriği
323
+
324
+ return (
325
+ <Timeline
326
+ // Kaynak verileri (zorunlu)
327
+ resources={resources}
328
+ // Kaynak ayarları (isteğe bağlı)
329
+ resourceSettings={resourceSettings}
330
+ // Timeline başlangıç tarihi (zorunlu)
331
+ programDate={programDate}
332
+ // Etkinlik verileri (zorunlu)
333
+ events={events}
334
+ externalEvents={events}
335
+ // Drop bilgisi için callback ve state
336
+ setDropInfo={setDropInfo}
337
+ dropInfo={dropInfo}
338
+ // Bugün göstergesi (isteğe bağlı)
339
+ indicatorOn={true}
340
+ // Sürükle-bırak ve genişletme özellikleri (isteğe bağlı)
341
+ eventsDragOn={eventsDragOn}
342
+ eventsExtendOn={eventsExtendOn}
343
+ createNewEventOn={createNewEventOn}
344
+ // Callback'ler
345
+ onDragInfo={handleDragInfo}
346
+ onExtendInfo={handleExtendInfo}
347
+ onCreateEventInfo={handleCreateEventInfo}
348
+ onEventClick={handleEventClick}
349
+ onEventRightClick={handleEventRightClick}
350
+ // Yatay kaydırma özelliği (isteğe bağlı)
351
+ horizontalScrollOn={horizontalScrollOn}
352
+ // Master Header görünürlüğü ve Resources başlığı içeriği
353
+ masterHeaderView={masterHeaderView}
354
+ resourceHeaderContent={resourceHeaderContent}
355
+ />
356
+ );
357
+ };
358
+
359
+ export default App;
360
+
361
+ ---
362
+
363
+ ## 🎨 CSS Özelleştirme
364
+ AkfaTimeline, CSS değişkenleri ile kolayca özelleştirilebilir.
365
+
366
+ /* src/components/Timeline/Timeline.css */
367
+
368
+ /*
369
+ Temel: "sales sayfası" temasıyla uyumlu renkler,
370
+ light vs. dark tanımları
371
+ */
372
+
373
+ :root {
374
+ /* Light Tema Varsayılan Renkler */
375
+ --background-color: #f5f5f2; /* Açık tema arka plan */
376
+ --text-color: #666; /* Açık tema yazı rengi */
377
+ --border-color: #bbb; /* Daha yumuşak border */
378
+
379
+ /* Header */
380
+ --header-background-color: #f5f5f2; /* Üst header, tablo header */
381
+ --header-text-color: #666;
382
+
383
+ /* Resources */
384
+ --resource-background-color: #f5f5f2;
385
+ --resource-text-color: #666;
386
+ --group-header-background-color: #dadada;
387
+
388
+ /* Timeline */
389
+ --timeline-header-background-color: #f5f5f2;
390
+ --timeline-cell-border-color: #ccc;
391
+ --timeline-event-background-color: #fff;
392
+ --timeline-event-border-color: #666;
393
+ --timeline-event-text-color: #666;
394
+
395
+ /* Scrollbar */
396
+ --scrollbar-thumb-background: #aaa;
397
+ --scrollbar-thumb-hover-background: #888;
398
+
399
+ --resource-width: 150px;
400
+ --cell-height: 40px;
401
+ --header-height: 60px;
402
+ --time-slot-height: 20px;
403
+ --container-height: 480px;
404
+
405
+ --timeline-new-event-background-color: #ff5722;
406
+ --timeline-new-event-text-color: #fff;
407
+
408
+ --timeline-event-background-color: #ff7f50;
409
+ --timeline-event-text-color: #fff;
410
+ --timeline-event-border-color: #fff;
411
+
412
+ --timeline-cell-selected-bg: rgba(25,118,210,0.2);
413
+
414
+ user-select: none; /* Metin seçimini engelle */
415
+ }
416
+
417
+ /* Koyu Tema */
418
+ .dark-mode {
419
+ /* Koyu tema */
420
+ --background-color: #16202a; /* Koyu tema arka plan */
421
+ --text-color: #ddd; /* Koyu tema yazı rengi */
422
+ --border-color: #444;
423
+
424
+ --header-background-color: #16202a;
425
+ --header-text-color: #bbb;
426
+
427
+ --resource-background-color: #16202a;
428
+ --resource-text-color: #bbb;
429
+ --group-header-background-color: #0d141b;
430
+
431
+ --timeline-header-background-color: #16202a;
432
+ --timeline-cell-border-color: #444;
433
+ --timeline-event-background-color: #2a2a2a;
434
+ --timeline-event-border-color: #222;
435
+ --timeline-event-text-color: #ddd;
436
+
437
+ --scrollbar-thumb-background: #555;
438
+ --scrollbar-thumb-hover-background: #888;
439
+
440
+ --timeline-new-event-background-color: #a83e20;
441
+ --timeline-new-event-text-color: #eee;
442
+
443
+ --timeline-event-background-color: #a83e20;
444
+ --timeline-event-text-color: #fff;
445
+ --timeline-event-border-color: #222;
446
+
447
+ --timeline-cell-selected-bg: rgba(76,175,80,0.2);
448
+ }
449
+
450
+ /* Genel Timeline Konteyner */
451
+ .timeline-container {
452
+ display: flex;
453
+ flex-direction: column;
454
+ width: 100%;
455
+ height: 100%;
456
+ border: 1px solid var(--border-color);
457
+ border-radius: 8px;
458
+ overflow: hidden;
459
+ box-sizing: border-box;
460
+ background-color: var(--background-color);
461
+ color: var(--text-color);
462
+ }
463
+
464
+ /* Master Header */
465
+ .timeline-master-header {
466
+ width: 100%;
467
+ background-color: var(--header-background-color);
468
+ color: var(--header-text-color);
469
+ border-bottom: 1px solid var(--border-color);
470
+ z-index: 10;
471
+ padding: 10px;
472
+ box-sizing: border-box;
473
+ }
474
+
475
+ /* Timeline Body */
476
+ .timeline-body {
477
+ display: flex;
478
+ flex: 1;
479
+ }
480
+
481
+ /* Sol Kısım: Resources */
482
+ .timeline-resources-container {
483
+ width: var(--resource-width);
484
+ display: flex;
485
+ flex-direction: column;
486
+ border-right: 1px solid var(--border-color);
487
+ position: sticky;
488
+ left: 0;
489
+ top: var(--header-height);
490
+ z-index: 2;
491
+ background-color: var(--resource-background-color);
492
+ overflow-y: auto;
493
+ }
494
+
495
+ /* Resources Header */
496
+ .resources-header {
497
+ background-color: var(--header-background-color);
498
+ color: var(--resource-text-color);
499
+ text-align: center;
500
+ width: var(--resource-width);
501
+ font-weight: bold;
502
+ display: flex;
503
+ flex-direction: column;
504
+ justify-content: center;
505
+ align-items: center;
506
+ height: calc(var(--header-height) * 2); /* Üst üste iki header yüksekliği */
507
+ border-right: 1px solid var(--border-color);
508
+ box-sizing: border-box;
509
+ }
510
+
511
+ /* Grup Başlığı Hücreleri */
512
+ .group-header-row {
513
+ display: flex;
514
+ height: var(--cell-height);
515
+ background-color: var(--group-header-background-color);
516
+ color: var(--resource-text-color);
517
+ font-weight: bold;
518
+ }
519
+
520
+ .group-header-cell {
521
+ flex: 1;
522
+ border: 1px solid var(--border-color);
523
+ text-align: center;
524
+ background-color: var(--group-header-background-color);
525
+ color: var(--resource-text-color);
526
+ height: var(--cell-height);
527
+ display: flex;
528
+ align-items: center;
529
+ justify-content: center;
530
+ }
531
+
532
+ /* Resource Grupları */
533
+ .resource-group {
534
+ display: flex;
535
+ flex-direction: column;
536
+ }
537
+
538
+ /* Resource Grup Header */
539
+ .resource-group-header {
540
+ background-color: var(--group-header-background-color);
541
+ color: var(--resource-text-color);
542
+ font-weight: bold;
543
+ height: var(--cell-height);
544
+ box-sizing: border-box;
545
+ display: flex;
546
+ align-items: center;
547
+ justify-content: space-between;
548
+ padding: 0 0px;
549
+ cursor: pointer;
550
+ border: 1px solid var(--border-color);
551
+ }
552
+
553
+ /* Resource Hücreleri */
554
+ .resource-cell {
555
+ padding: 0;
556
+ text-align: left;
557
+ background-color: var(--resource-background-color);
558
+ color: var(--resource-text-color);
559
+ height: var(--cell-height);
560
+ display: flex;
561
+ align-items: center;
562
+ border: 0.3px solid var(--border-color);
563
+ box-sizing: border-box;
564
+ }
565
+
566
+ /* Sağ Kısım: Timeline */
567
+ .timeline-scrollable-container {
568
+ flex: 1;
569
+ overflow-x: auto;
570
+ overflow-y: hidden;
571
+ display: flex;
572
+ flex-direction: column;
573
+ position: relative;
574
+ }
575
+
576
+ /* Header ve Content Wrapper */
577
+ .timeline-header-content-wrapper {
578
+ display: flex;
579
+ flex-direction: column;
580
+ }
581
+
582
+ /* Timeline Header */
583
+ .timeline-header {
584
+ display: flex;
585
+ background-color: var(--timeline-header-background-color);
586
+ color: var(--header-text-color);
587
+ position: sticky;
588
+ top: 0;
589
+ z-index: 2;
590
+ height: var(--header-height);
591
+ overflow: hidden;
592
+ box-sizing: border-box;
593
+ }
594
+
595
+ /* Timeline Content */
596
+ .timeline-content {
597
+ display: flex;
598
+ flex-direction: column;
599
+ }
600
+
601
+ /* Grup Container */
602
+ .group-container {
603
+ display: flex;
604
+ flex-direction: column;
605
+ }
606
+
607
+ /* Resource Satırları */
608
+ .resource-row {
609
+ display: flex;
610
+ box-sizing: border-box;
611
+ position: relative;
612
+ height: var(--cell-height);
613
+ border: 1px solid var(--border-color);
614
+ margin-top: -1px;
615
+ overflow: hidden;
616
+ }
617
+
618
+ /* Timeline Hücreleri */
619
+ .timeline-cell {
620
+ flex: 1;
621
+ border: 1px solid var(--timeline-cell-border-color);
622
+ height: 100%;
623
+ box-sizing: border-box;
624
+ }
625
+
626
+ /* Hücre Seçili Durumu */
627
+ .timeline-cell.selected {
628
+ background-color: rgba(25, 118, 210, 0.2); /* satır içi/hover */
629
+ }
630
+
631
+ /* Event Stilleri */
632
+ .event {
633
+ position: absolute;
634
+ background-color: var(--timeline-event-background-color);
635
+ color: var(--timeline-event-text-color);
636
+ font-size: 12px;
637
+ padding: 2px 5px;
638
+ border-radius: 4px;
639
+ text-align: left;
640
+ display: flex;
641
+ flex-direction: column;
642
+ justify-content: center;
643
+ box-sizing: border-box;
644
+ z-index: 10;
645
+ overflow: hidden;
646
+ text-overflow: ellipsis;
647
+ white-space: nowrap;
648
+ border: 1px solid var(--timeline-event-border-color);
649
+ cursor: pointer;
650
+ }
651
+
652
+ /* Event Time Stili */
653
+ .event-time {
654
+ font-size: 10px;
655
+ margin-top: 2px;
656
+ }
657
+
658
+ /* Scrollbar için */
659
+ .timeline-scrollable-container::-webkit-scrollbar {
660
+ height: 10px;
661
+ }
662
+
663
+ .timeline-scrollable-container::-webkit-scrollbar-thumb {
664
+ background: var(--scrollbar-thumb-background);
665
+ border-radius: 5px;
666
+ }
667
+
668
+ .timeline-scrollable-container::-webkit-scrollbar-thumb:hover {
669
+ background: var(--scrollbar-thumb-hover-background);
670
+ }
671
+
672
+ .resources-header {
673
+ background-color: var(--header-background-color);
674
+ color: var(--resource-text-color);
675
+ text-align: center;
676
+ width: var(--resource-width);
677
+ font-weight: bold;
678
+ display: flex;
679
+ flex-direction: column;
680
+ justify-content: center;
681
+ align-items: center;
682
+ height: 80px;
683
+ border-right: 1px solid var(--border-color);
684
+ box-sizing: border-box;
685
+ }
686
+
687
+ /* TimelineHeader Container */
688
+ .timeline-header-container {
689
+ flex: 1;
690
+ display: flex;
691
+ flex-direction: column;
692
+ }
693
+
694
+ /* Ay + Yıl satırı */
695
+ .timeline-header-month-row {
696
+ display: flex;
697
+ background-color: var(--header-background-color);
698
+ color: var(--header-text-color);
699
+ font-weight: bold;
700
+ font-size: 16px;
701
+ height: 40px;
702
+ line-height: 40px;
703
+ border-bottom: 1px solid var(--border-color);
704
+ }
705
+
706
+ /* Ay + Yıl hücreleri */
707
+ .timeline-header-month-cell {
708
+ text-align: center;
709
+ display: flex;
710
+ align-items: center;
711
+ justify-content: center;
712
+ /* border-right => dynamic, inline style if needed */
713
+ box-sizing: border-box;
714
+ }
715
+
716
+ /* Günlük Hücreler (tarih satırı) */
717
+ .timeline-header-day-row {
718
+ display: flex;
719
+ background-color: var(--timeline-header-background-color);
720
+ color: var(--header-text-color);
721
+ /* border-bottom: 1px solid var(--border-color); if needed */
722
+ }
723
+
724
+ /* Günlük hücre (her gün) */
725
+ .timeline-header-day-cell {
726
+ height: 40px;
727
+ line-height: 40px;
728
+ font-size: 14px;
729
+ white-space: nowrap;
730
+ overflow: hidden;
731
+ text-overflow: ellipsis;
732
+ text-align: center;
733
+ box-sizing: border-box;
734
+ }
735
+
736
+
737
+ /* src/components/Timeline/Timeline.css */
738
+ /* Ekleme: MasterHeader stili */
739
+
740
+ /* Kapsayıcı */
741
+ .master-header-container {
742
+ display: flex;
743
+ align-items: center;
744
+ padding: 10px;
745
+
746
+ background-color: var(--header-background-color);
747
+ color: var(--header-text-color);
748
+
749
+ /* eğer border vs. istersen
750
+ border-bottom: 1px solid var(--border-color);
751
+ */
752
+ }
753
+
754
+ /* Butonlar */
755
+ .master-header-btn {
756
+ background-color: transparent;
757
+ color: var(--header-text-color);
758
+ border: 1px solid var(--border-color);
759
+ border-radius: 4px;
760
+ padding: 6px 12px;
761
+ margin-right: 10px;
762
+ cursor: pointer;
763
+ font-size: 14px;
764
+ transition: background-color 0.2s ease, color 0.2s ease;
765
+ }
766
+
767
+ .master-header-btn:hover {
768
+ background-color: rgba(25, 118, 210, 0.2); /* Light tema hover */
769
+ }
770
+
771
+ .dark-mode .master-header-btn:hover {
772
+ background-color: rgba(76, 175, 80, 0.2); /* Koyu tema hover */
773
+ }
774
+
775
+ .master-header-btn:focus {
776
+ outline: none;
777
+ }
778
+
779
+ /* Select */
780
+ .master-header-select {
781
+ margin-left: 10px;
782
+ background-color: transparent;
783
+ color: var(--header-text-color);
784
+ border: 1px solid var(--border-color);
785
+ border-radius: 4px;
786
+ padding: 4px 8px;
787
+ font-size: 14px;
788
+ cursor: pointer;
789
+ }
790
+
791
+ .master-header-select:focus {
792
+ outline: none;
793
+ }
794
+
795
+
796
+ /* Container */
797
+ .timeline-content-container {
798
+ position: relative;
799
+ width: 100%;
800
+ height: auto; /* or as needed */
801
+ display: flex;
802
+ flex-direction: column;
803
+ }
804
+
805
+ /* Group container */
806
+ .timeline-group-container {
807
+ margin-bottom: 0px;
808
+ display: flex;
809
+ flex-direction: column;
810
+ }
811
+
812
+ /* Group header row */
813
+ .timeline-group-header-row {
814
+ display: flex;
815
+ margin-top: -0.08rem;
816
+ }
817
+
818
+ .timeline-group-header-cell {
819
+ flex: 1;
820
+ height: 2.58rem;
821
+ background-color: var(--group-header-background-color);
822
+ border: 1px solid var(--border-color);
823
+
824
+ box-sizing: border-box;
825
+ display: flex;
826
+ align-items: center;
827
+ justify-content: center;
828
+ }
829
+
830
+ /* Resource row */
831
+ .timeline-resource-row {
832
+ display: flex;
833
+ position: relative;
834
+ height: var(--cell-height, 40px);
835
+ border: 1px solid var(--border-color);
836
+ box-sizing: border-box;
837
+ }
838
+
839
+ /* Each day cell */
840
+ .timeline-cell {
841
+ flex: 1;
842
+ height: 100%;
843
+ position: relative;
844
+ border-left: 1px solid var(--border-color);
845
+ border-right: 1px solid var(--border-color);
846
+ box-sizing: border-box;
847
+ cursor: pointer;
848
+ }
849
+
850
+ /* "selected" day cell */
851
+ .timeline-cell.selected {
852
+ background-color: var(--timeline-cell-selected-bg, rgba(25,118,210,0.2));
853
+ }
854
+
855
+ /* Event */
856
+ .timeline-event {
857
+ position: absolute;
858
+ background-color: var(--timeline-event-background-color, #0093ce);
859
+ color: var(--timeline-event-text-color, #fff);
860
+ font-size: 14px;
861
+ padding: 5px;
862
+ border-radius: 20px;
863
+ box-sizing: border-box;
864
+ z-index: 10;
865
+ overflow: hidden;
866
+ text-overflow: ellipsis;
867
+ white-space: nowrap;
868
+ border: 1px solid var(--timeline-event-border-color, #fff);
869
+ top: 5px; /* or a variable offset if you want */
870
+ /* "left" and "width" are inline from JS */
871
+ }
872
+
873
+ /* Extend handle */
874
+ .timeline-event-extend-handle {
875
+ position: absolute;
876
+ right: 0;
877
+ top: 0;
878
+ width: 10px;
879
+ height: 100%;
880
+ background-color: rgba(0,0,0,0.2);
881
+ cursor: col-resize;
882
+ z-index: 20;
883
+ }
884
+
885
+ /* Temp event (while creating) */
886
+ .timeline-temp-event {
887
+ position: absolute;
888
+ background-color: var(--timeline-new-event-background-color, #0093ce);
889
+ color: var(--timeline-new-event-text-color, #fff);
890
+ opacity: 0.7;
891
+ border-radius: 20px;
892
+ z-index: 9;
893
+ display: flex;
894
+ align-items: center;
895
+ justify-content: center;
896
+ font-size: 14px;
897
+ /* "left"/"width" from JS: " ...calculatePosition(tempEvent, dates)" */
898
+ top: 5px;
899
+ }
900
+
901
+
902
+ ---
903
+
904
+ ## 🎨 🛡 Lisans
905
+ Bu proje MIT Lisansı ile lisanslanmıştır.
906
+
907
+
908
+ 🤝 Katkıda Bulunun
909
+ Projeyi geliştirmek veya bir hata bildirmek için aşağıdaki adımları izleyebilirsiniz:
910
+
911
+ Bu projeyi forklayın.
912
+ Yeni bir dal oluşturun: git checkout -b feature-isim
913
+ Değişikliklerinizi yapın.
914
+ Değişikliklerinizi gönderin: git push origin feature-isim
915
+ Pull Request oluşturun.
916
+ 📞 İletişim
917
+ Sorularınız için ahmetkursadaydogan@gmail.com adresine ulaşabilirsiniz. Daha fazla bilgi için GitHub Issues sayfasını ziyaret edin.
918
+
919
+
920
+ 📚 Kaynaklar ve Referanslar
921
+ React Documentation
922
+ React-Window
923
+ NPM AkfaTimeline
924
+