akfatimeline 1.0.4 → 1.0.6

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 (37) hide show
  1. package/dist/Timeline.js +1097 -112
  2. package/dist/dist/components/Timeline/DatePickerComponent.js +17 -0
  3. package/dist/dist/components/Timeline/EventTooltip.js +1 -1
  4. package/dist/dist/components/Timeline/Indicator.js +0 -4
  5. package/dist/dist/components/Timeline/MasterHeader.js +36 -23
  6. package/dist/dist/components/Timeline/Timeline.css +90 -8
  7. package/dist/dist/components/Timeline/Timeline.js +79 -47
  8. package/dist/dist/components/Timeline/TimelineContent.js +154 -130
  9. package/dist/dist/hooks/useEventDragDrop.js +22 -16
  10. package/package.json +1 -1
  11. package/public/dist/Timeline.js +3277 -0
  12. package/public/dist/dist/components/Timeline/DatePickerComponent.js +17 -0
  13. package/public/dist/dist/components/Timeline/DragAndDropHandler.js +35 -0
  14. package/public/dist/dist/components/Timeline/EventTooltip.js +206 -0
  15. package/public/dist/dist/components/Timeline/Indicator.js +29 -0
  16. package/public/dist/dist/components/Timeline/MasterHeader.js +68 -0
  17. package/public/dist/dist/components/Timeline/Resources.js +53 -0
  18. package/public/dist/dist/components/Timeline/ResourcesHeader.js +14 -0
  19. package/public/dist/dist/components/Timeline/Timeline.css +616 -0
  20. package/public/dist/dist/components/Timeline/Timeline.js +304 -0
  21. package/public/dist/dist/components/Timeline/TimelineCell.js +8 -0
  22. package/public/dist/dist/components/Timeline/TimelineContent.js +447 -0
  23. package/public/dist/dist/components/Timeline/TimelineEvents.js +114 -0
  24. package/public/dist/dist/components/Timeline/TimelineHeader.js +43 -0
  25. package/public/dist/dist/components/Timeline/TimelineMonthContainer.js +29 -0
  26. package/public/dist/dist/components/Timeline/TimelineResources.js +16 -0
  27. package/public/dist/dist/hooks/useDragAndDrop.js +80 -0
  28. package/public/dist/dist/hooks/useEventDragDrop.js +126 -0
  29. package/public/dist/dist/hooks/useExtendEvent.js +28 -0
  30. package/public/dist/dist/utils/HorizontalVirtualScroll.js +0 -0
  31. package/public/dist/dist/utils/dateUtils.js +36 -0
  32. package/public/dist/dist/utils/filterTimelineData.js +21 -0
  33. package/public/dist/dist/utils/timelineUtils.js +40 -0
  34. package/src/App.js +3 -1
  35. package/src/components/Timeline/Indicator.js +0 -3
  36. package/src/components/Timeline/Timeline.js +16 -11
  37. package/src/components/Timeline/TimelineContent.js +0 -1
package/dist/Timeline.js CHANGED
@@ -12,6 +12,834 @@ return /******/ (() => { // webpackBootstrap
12
12
  /******/ "use strict";
13
13
  /******/ var __webpack_modules__ = ({
14
14
 
15
+ /***/ 941:
16
+ /***/ ((module, __webpack_exports__, __webpack_require__) => {
17
+
18
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
19
+ /* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
20
+ /* harmony export */ });
21
+ /* harmony import */ var _css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(601);
22
+ /* harmony import */ var _css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
23
+ /* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(314);
24
+ /* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
25
+ // Imports
26
+
27
+
28
+ var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
29
+ // Module
30
+ ___CSS_LOADER_EXPORT___.push([module.id, `.flatpickr-calendar {
31
+ background: transparent;
32
+ opacity: 0;
33
+ display: none;
34
+ text-align: center;
35
+ visibility: hidden;
36
+ padding: 0;
37
+ -webkit-animation: none;
38
+ animation: none;
39
+ direction: ltr;
40
+ border: 0;
41
+ font-size: 14px;
42
+ line-height: 24px;
43
+ border-radius: 5px;
44
+ position: absolute;
45
+ width: 307.875px;
46
+ -webkit-box-sizing: border-box;
47
+ box-sizing: border-box;
48
+ -ms-touch-action: manipulation;
49
+ touch-action: manipulation;
50
+ -webkit-box-shadow: 0 3px 13px rgba(0,0,0,0.08);
51
+ box-shadow: 0 3px 13px rgba(0,0,0,0.08);
52
+ }
53
+ .flatpickr-calendar.open,
54
+ .flatpickr-calendar.inline {
55
+ opacity: 1;
56
+ max-height: 640px;
57
+ visibility: visible;
58
+ }
59
+ .flatpickr-calendar.open {
60
+ display: inline-block;
61
+ z-index: 99999;
62
+ }
63
+ .flatpickr-calendar.animate.open {
64
+ -webkit-animation: fpFadeInDown 300ms cubic-bezier(0.23, 1, 0.32, 1);
65
+ animation: fpFadeInDown 300ms cubic-bezier(0.23, 1, 0.32, 1);
66
+ }
67
+ .flatpickr-calendar.inline {
68
+ display: block;
69
+ position: relative;
70
+ top: 2px;
71
+ }
72
+ .flatpickr-calendar.static {
73
+ position: absolute;
74
+ top: calc(100% + 2px);
75
+ }
76
+ .flatpickr-calendar.static.open {
77
+ z-index: 999;
78
+ display: block;
79
+ }
80
+ .flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+1) .flatpickr-day.inRange:nth-child(7n+7) {
81
+ -webkit-box-shadow: none !important;
82
+ box-shadow: none !important;
83
+ }
84
+ .flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+2) .flatpickr-day.inRange:nth-child(7n+1) {
85
+ -webkit-box-shadow: -2px 0 0 #e6e6e6, 5px 0 0 #e6e6e6;
86
+ box-shadow: -2px 0 0 #e6e6e6, 5px 0 0 #e6e6e6;
87
+ }
88
+ .flatpickr-calendar .hasWeeks .dayContainer,
89
+ .flatpickr-calendar .hasTime .dayContainer {
90
+ border-bottom: 0;
91
+ border-bottom-right-radius: 0;
92
+ border-bottom-left-radius: 0;
93
+ }
94
+ .flatpickr-calendar .hasWeeks .dayContainer {
95
+ border-left: 0;
96
+ }
97
+ .flatpickr-calendar.hasTime .flatpickr-time {
98
+ height: 40px;
99
+ border-top: 1px solid rgba(72,72,72,0.2);
100
+ }
101
+ .flatpickr-calendar.hasTime .flatpickr-innerContainer {
102
+ border-bottom: 0;
103
+ }
104
+ .flatpickr-calendar.hasTime .flatpickr-time {
105
+ border: 1px solid rgba(72,72,72,0.2);
106
+ }
107
+ .flatpickr-calendar.noCalendar.hasTime .flatpickr-time {
108
+ height: auto;
109
+ }
110
+ .flatpickr-calendar:before,
111
+ .flatpickr-calendar:after {
112
+ position: absolute;
113
+ display: block;
114
+ pointer-events: none;
115
+ border: solid transparent;
116
+ content: '';
117
+ height: 0;
118
+ width: 0;
119
+ left: 22px;
120
+ }
121
+ .flatpickr-calendar.rightMost:before,
122
+ .flatpickr-calendar.arrowRight:before,
123
+ .flatpickr-calendar.rightMost:after,
124
+ .flatpickr-calendar.arrowRight:after {
125
+ left: auto;
126
+ right: 22px;
127
+ }
128
+ .flatpickr-calendar.arrowCenter:before,
129
+ .flatpickr-calendar.arrowCenter:after {
130
+ left: 50%;
131
+ right: 50%;
132
+ }
133
+ .flatpickr-calendar:before {
134
+ border-width: 5px;
135
+ margin: 0 -5px;
136
+ }
137
+ .flatpickr-calendar:after {
138
+ border-width: 4px;
139
+ margin: 0 -4px;
140
+ }
141
+ .flatpickr-calendar.arrowTop:before,
142
+ .flatpickr-calendar.arrowTop:after {
143
+ bottom: 100%;
144
+ }
145
+ .flatpickr-calendar.arrowTop:before {
146
+ border-bottom-color: rgba(72,72,72,0.2);
147
+ }
148
+ .flatpickr-calendar.arrowTop:after {
149
+ border-bottom-color: #1bbc9b;
150
+ }
151
+ .flatpickr-calendar.arrowBottom:before,
152
+ .flatpickr-calendar.arrowBottom:after {
153
+ top: 100%;
154
+ }
155
+ .flatpickr-calendar.arrowBottom:before {
156
+ border-top-color: rgba(72,72,72,0.2);
157
+ }
158
+ .flatpickr-calendar.arrowBottom:after {
159
+ border-top-color: #1bbc9b;
160
+ }
161
+ .flatpickr-calendar:focus {
162
+ outline: 0;
163
+ }
164
+ .flatpickr-wrapper {
165
+ position: relative;
166
+ display: inline-block;
167
+ }
168
+ .flatpickr-months {
169
+ display: -webkit-box;
170
+ display: -webkit-flex;
171
+ display: -ms-flexbox;
172
+ display: flex;
173
+ }
174
+ .flatpickr-months .flatpickr-month {
175
+ border-radius: 5px 5px 0 0;
176
+ background: #1bbc9b;
177
+ color: #fff;
178
+ fill: #fff;
179
+ height: 34px;
180
+ line-height: 1;
181
+ text-align: center;
182
+ position: relative;
183
+ -webkit-user-select: none;
184
+ -moz-user-select: none;
185
+ -ms-user-select: none;
186
+ user-select: none;
187
+ overflow: hidden;
188
+ -webkit-box-flex: 1;
189
+ -webkit-flex: 1;
190
+ -ms-flex: 1;
191
+ flex: 1;
192
+ }
193
+ .flatpickr-months .flatpickr-prev-month,
194
+ .flatpickr-months .flatpickr-next-month {
195
+ -webkit-user-select: none;
196
+ -moz-user-select: none;
197
+ -ms-user-select: none;
198
+ user-select: none;
199
+ text-decoration: none;
200
+ cursor: pointer;
201
+ position: absolute;
202
+ top: 0;
203
+ height: 34px;
204
+ padding: 10px;
205
+ z-index: 3;
206
+ color: #fff;
207
+ fill: #fff;
208
+ }
209
+ .flatpickr-months .flatpickr-prev-month.flatpickr-disabled,
210
+ .flatpickr-months .flatpickr-next-month.flatpickr-disabled {
211
+ display: none;
212
+ }
213
+ .flatpickr-months .flatpickr-prev-month i,
214
+ .flatpickr-months .flatpickr-next-month i {
215
+ position: relative;
216
+ }
217
+ .flatpickr-months .flatpickr-prev-month.flatpickr-prev-month,
218
+ .flatpickr-months .flatpickr-next-month.flatpickr-prev-month {
219
+ /*
220
+ /*rtl:begin:ignore*/
221
+ /*
222
+ */
223
+ left: 0;
224
+ /*
225
+ /*rtl:end:ignore*/
226
+ /*
227
+ */
228
+ }
229
+ /*
230
+ /*rtl:begin:ignore*/
231
+ /*
232
+ /*rtl:end:ignore*/
233
+ .flatpickr-months .flatpickr-prev-month.flatpickr-next-month,
234
+ .flatpickr-months .flatpickr-next-month.flatpickr-next-month {
235
+ /*
236
+ /*rtl:begin:ignore*/
237
+ /*
238
+ */
239
+ right: 0;
240
+ /*
241
+ /*rtl:end:ignore*/
242
+ /*
243
+ */
244
+ }
245
+ /*
246
+ /*rtl:begin:ignore*/
247
+ /*
248
+ /*rtl:end:ignore*/
249
+ .flatpickr-months .flatpickr-prev-month:hover,
250
+ .flatpickr-months .flatpickr-next-month:hover {
251
+ color: #bbb;
252
+ }
253
+ .flatpickr-months .flatpickr-prev-month:hover svg,
254
+ .flatpickr-months .flatpickr-next-month:hover svg {
255
+ fill: #f64747;
256
+ }
257
+ .flatpickr-months .flatpickr-prev-month svg,
258
+ .flatpickr-months .flatpickr-next-month svg {
259
+ width: 14px;
260
+ height: 14px;
261
+ }
262
+ .flatpickr-months .flatpickr-prev-month svg path,
263
+ .flatpickr-months .flatpickr-next-month svg path {
264
+ -webkit-transition: fill 0.1s;
265
+ transition: fill 0.1s;
266
+ fill: inherit;
267
+ }
268
+ .numInputWrapper {
269
+ position: relative;
270
+ height: auto;
271
+ }
272
+ .numInputWrapper input,
273
+ .numInputWrapper span {
274
+ display: inline-block;
275
+ }
276
+ .numInputWrapper input {
277
+ width: 100%;
278
+ }
279
+ .numInputWrapper input::-ms-clear {
280
+ display: none;
281
+ }
282
+ .numInputWrapper input::-webkit-outer-spin-button,
283
+ .numInputWrapper input::-webkit-inner-spin-button {
284
+ margin: 0;
285
+ -webkit-appearance: none;
286
+ }
287
+ .numInputWrapper span {
288
+ position: absolute;
289
+ right: 0;
290
+ width: 14px;
291
+ padding: 0 4px 0 2px;
292
+ height: 50%;
293
+ line-height: 50%;
294
+ opacity: 0;
295
+ cursor: pointer;
296
+ border: 1px solid rgba(72,72,72,0.15);
297
+ -webkit-box-sizing: border-box;
298
+ box-sizing: border-box;
299
+ }
300
+ .numInputWrapper span:hover {
301
+ background: rgba(0,0,0,0.1);
302
+ }
303
+ .numInputWrapper span:active {
304
+ background: rgba(0,0,0,0.2);
305
+ }
306
+ .numInputWrapper span:after {
307
+ display: block;
308
+ content: "";
309
+ position: absolute;
310
+ }
311
+ .numInputWrapper span.arrowUp {
312
+ top: 0;
313
+ border-bottom: 0;
314
+ }
315
+ .numInputWrapper span.arrowUp:after {
316
+ border-left: 4px solid transparent;
317
+ border-right: 4px solid transparent;
318
+ border-bottom: 4px solid rgba(72,72,72,0.6);
319
+ top: 26%;
320
+ }
321
+ .numInputWrapper span.arrowDown {
322
+ top: 50%;
323
+ }
324
+ .numInputWrapper span.arrowDown:after {
325
+ border-left: 4px solid transparent;
326
+ border-right: 4px solid transparent;
327
+ border-top: 4px solid rgba(72,72,72,0.6);
328
+ top: 40%;
329
+ }
330
+ .numInputWrapper span svg {
331
+ width: inherit;
332
+ height: auto;
333
+ }
334
+ .numInputWrapper span svg path {
335
+ fill: rgba(255,255,255,0.5);
336
+ }
337
+ .numInputWrapper:hover {
338
+ background: rgba(0,0,0,0.05);
339
+ }
340
+ .numInputWrapper:hover span {
341
+ opacity: 1;
342
+ }
343
+ .flatpickr-current-month {
344
+ font-size: 135%;
345
+ line-height: inherit;
346
+ font-weight: 300;
347
+ color: inherit;
348
+ position: absolute;
349
+ width: 75%;
350
+ left: 12.5%;
351
+ padding: 7.48px 0 0 0;
352
+ line-height: 1;
353
+ height: 34px;
354
+ display: inline-block;
355
+ text-align: center;
356
+ -webkit-transform: translate3d(0px, 0px, 0px);
357
+ transform: translate3d(0px, 0px, 0px);
358
+ }
359
+ .flatpickr-current-month span.cur-month {
360
+ font-family: inherit;
361
+ font-weight: 700;
362
+ color: inherit;
363
+ display: inline-block;
364
+ margin-left: 0.5ch;
365
+ padding: 0;
366
+ }
367
+ .flatpickr-current-month span.cur-month:hover {
368
+ background: rgba(0,0,0,0.05);
369
+ }
370
+ .flatpickr-current-month .numInputWrapper {
371
+ width: 6ch;
372
+ width: 7ch\\0;
373
+ display: inline-block;
374
+ }
375
+ .flatpickr-current-month .numInputWrapper span.arrowUp:after {
376
+ border-bottom-color: #fff;
377
+ }
378
+ .flatpickr-current-month .numInputWrapper span.arrowDown:after {
379
+ border-top-color: #fff;
380
+ }
381
+ .flatpickr-current-month input.cur-year {
382
+ background: transparent;
383
+ -webkit-box-sizing: border-box;
384
+ box-sizing: border-box;
385
+ color: inherit;
386
+ cursor: text;
387
+ padding: 0 0 0 0.5ch;
388
+ margin: 0;
389
+ display: inline-block;
390
+ font-size: inherit;
391
+ font-family: inherit;
392
+ font-weight: 300;
393
+ line-height: inherit;
394
+ height: auto;
395
+ border: 0;
396
+ border-radius: 0;
397
+ vertical-align: initial;
398
+ -webkit-appearance: textfield;
399
+ -moz-appearance: textfield;
400
+ appearance: textfield;
401
+ }
402
+ .flatpickr-current-month input.cur-year:focus {
403
+ outline: 0;
404
+ }
405
+ .flatpickr-current-month input.cur-year[disabled],
406
+ .flatpickr-current-month input.cur-year[disabled]:hover {
407
+ font-size: 100%;
408
+ color: rgba(255,255,255,0.5);
409
+ background: transparent;
410
+ pointer-events: none;
411
+ }
412
+ .flatpickr-current-month .flatpickr-monthDropdown-months {
413
+ appearance: menulist;
414
+ background: #1bbc9b;
415
+ border: none;
416
+ border-radius: 0;
417
+ box-sizing: border-box;
418
+ color: inherit;
419
+ cursor: pointer;
420
+ font-size: inherit;
421
+ font-family: inherit;
422
+ font-weight: 300;
423
+ height: auto;
424
+ line-height: inherit;
425
+ margin: -1px 0 0 0;
426
+ outline: none;
427
+ padding: 0 0 0 0.5ch;
428
+ position: relative;
429
+ vertical-align: initial;
430
+ -webkit-box-sizing: border-box;
431
+ -webkit-appearance: menulist;
432
+ -moz-appearance: menulist;
433
+ width: auto;
434
+ }
435
+ .flatpickr-current-month .flatpickr-monthDropdown-months:focus,
436
+ .flatpickr-current-month .flatpickr-monthDropdown-months:active {
437
+ outline: none;
438
+ }
439
+ .flatpickr-current-month .flatpickr-monthDropdown-months:hover {
440
+ background: rgba(0,0,0,0.05);
441
+ }
442
+ .flatpickr-current-month .flatpickr-monthDropdown-months .flatpickr-monthDropdown-month {
443
+ background-color: #1bbc9b;
444
+ outline: none;
445
+ padding: 0;
446
+ }
447
+ .flatpickr-weekdays {
448
+ background: #1bbc9b;
449
+ text-align: center;
450
+ overflow: hidden;
451
+ width: 100%;
452
+ display: -webkit-box;
453
+ display: -webkit-flex;
454
+ display: -ms-flexbox;
455
+ display: flex;
456
+ -webkit-box-align: center;
457
+ -webkit-align-items: center;
458
+ -ms-flex-align: center;
459
+ align-items: center;
460
+ height: 28px;
461
+ }
462
+ .flatpickr-weekdays .flatpickr-weekdaycontainer {
463
+ display: -webkit-box;
464
+ display: -webkit-flex;
465
+ display: -ms-flexbox;
466
+ display: flex;
467
+ -webkit-box-flex: 1;
468
+ -webkit-flex: 1;
469
+ -ms-flex: 1;
470
+ flex: 1;
471
+ }
472
+ span.flatpickr-weekday {
473
+ cursor: default;
474
+ font-size: 90%;
475
+ background: #1bbc9b;
476
+ color: rgba(0,0,0,0.54);
477
+ line-height: 1;
478
+ margin: 0;
479
+ text-align: center;
480
+ display: block;
481
+ -webkit-box-flex: 1;
482
+ -webkit-flex: 1;
483
+ -ms-flex: 1;
484
+ flex: 1;
485
+ font-weight: bolder;
486
+ }
487
+ .dayContainer,
488
+ .flatpickr-weeks {
489
+ padding: 1px 0 0 0;
490
+ }
491
+ .flatpickr-days {
492
+ position: relative;
493
+ overflow: hidden;
494
+ display: -webkit-box;
495
+ display: -webkit-flex;
496
+ display: -ms-flexbox;
497
+ display: flex;
498
+ -webkit-box-align: start;
499
+ -webkit-align-items: flex-start;
500
+ -ms-flex-align: start;
501
+ align-items: flex-start;
502
+ width: 307.875px;
503
+ border-left: 1px solid rgba(72,72,72,0.2);
504
+ border-right: 1px solid rgba(72,72,72,0.2);
505
+ }
506
+ .flatpickr-days:focus {
507
+ outline: 0;
508
+ }
509
+ .dayContainer {
510
+ padding: 0;
511
+ outline: 0;
512
+ text-align: left;
513
+ width: 307.875px;
514
+ min-width: 307.875px;
515
+ max-width: 307.875px;
516
+ -webkit-box-sizing: border-box;
517
+ box-sizing: border-box;
518
+ display: inline-block;
519
+ display: -ms-flexbox;
520
+ display: -webkit-box;
521
+ display: -webkit-flex;
522
+ display: flex;
523
+ -webkit-flex-wrap: wrap;
524
+ flex-wrap: wrap;
525
+ -ms-flex-wrap: wrap;
526
+ -ms-flex-pack: justify;
527
+ -webkit-justify-content: space-around;
528
+ justify-content: space-around;
529
+ -webkit-transform: translate3d(0px, 0px, 0px);
530
+ transform: translate3d(0px, 0px, 0px);
531
+ opacity: 1;
532
+ }
533
+ .dayContainer + .dayContainer {
534
+ -webkit-box-shadow: -1px 0 0 rgba(72,72,72,0.2);
535
+ box-shadow: -1px 0 0 rgba(72,72,72,0.2);
536
+ }
537
+ .flatpickr-day {
538
+ background: none;
539
+ border: 1px solid transparent;
540
+ border-radius: 150px;
541
+ -webkit-box-sizing: border-box;
542
+ box-sizing: border-box;
543
+ color: #484848;
544
+ cursor: pointer;
545
+ font-weight: 400;
546
+ width: 14.2857143%;
547
+ -webkit-flex-basis: 14.2857143%;
548
+ -ms-flex-preferred-size: 14.2857143%;
549
+ flex-basis: 14.2857143%;
550
+ max-width: 39px;
551
+ height: 39px;
552
+ line-height: 39px;
553
+ margin: 0;
554
+ display: inline-block;
555
+ position: relative;
556
+ -webkit-box-pack: center;
557
+ -webkit-justify-content: center;
558
+ -ms-flex-pack: center;
559
+ justify-content: center;
560
+ text-align: center;
561
+ }
562
+ .flatpickr-day.inRange,
563
+ .flatpickr-day.prevMonthDay.inRange,
564
+ .flatpickr-day.nextMonthDay.inRange,
565
+ .flatpickr-day.today.inRange,
566
+ .flatpickr-day.prevMonthDay.today.inRange,
567
+ .flatpickr-day.nextMonthDay.today.inRange,
568
+ .flatpickr-day:hover,
569
+ .flatpickr-day.prevMonthDay:hover,
570
+ .flatpickr-day.nextMonthDay:hover,
571
+ .flatpickr-day:focus,
572
+ .flatpickr-day.prevMonthDay:focus,
573
+ .flatpickr-day.nextMonthDay:focus {
574
+ cursor: pointer;
575
+ outline: 0;
576
+ background: #e2e2e2;
577
+ border-color: #e2e2e2;
578
+ }
579
+ .flatpickr-day.today {
580
+ border-color: #bbb;
581
+ }
582
+ .flatpickr-day.today:hover,
583
+ .flatpickr-day.today:focus {
584
+ border-color: #bbb;
585
+ background: #bbb;
586
+ color: #fff;
587
+ }
588
+ .flatpickr-day.selected,
589
+ .flatpickr-day.startRange,
590
+ .flatpickr-day.endRange,
591
+ .flatpickr-day.selected.inRange,
592
+ .flatpickr-day.startRange.inRange,
593
+ .flatpickr-day.endRange.inRange,
594
+ .flatpickr-day.selected:focus,
595
+ .flatpickr-day.startRange:focus,
596
+ .flatpickr-day.endRange:focus,
597
+ .flatpickr-day.selected:hover,
598
+ .flatpickr-day.startRange:hover,
599
+ .flatpickr-day.endRange:hover,
600
+ .flatpickr-day.selected.prevMonthDay,
601
+ .flatpickr-day.startRange.prevMonthDay,
602
+ .flatpickr-day.endRange.prevMonthDay,
603
+ .flatpickr-day.selected.nextMonthDay,
604
+ .flatpickr-day.startRange.nextMonthDay,
605
+ .flatpickr-day.endRange.nextMonthDay {
606
+ background: #1bbc9b;
607
+ -webkit-box-shadow: none;
608
+ box-shadow: none;
609
+ color: #fff;
610
+ border-color: #1bbc9b;
611
+ }
612
+ .flatpickr-day.selected.startRange,
613
+ .flatpickr-day.startRange.startRange,
614
+ .flatpickr-day.endRange.startRange {
615
+ border-radius: 50px 0 0 50px;
616
+ }
617
+ .flatpickr-day.selected.endRange,
618
+ .flatpickr-day.startRange.endRange,
619
+ .flatpickr-day.endRange.endRange {
620
+ border-radius: 0 50px 50px 0;
621
+ }
622
+ .flatpickr-day.selected.startRange + .endRange:not(:nth-child(7n+1)),
623
+ .flatpickr-day.startRange.startRange + .endRange:not(:nth-child(7n+1)),
624
+ .flatpickr-day.endRange.startRange + .endRange:not(:nth-child(7n+1)) {
625
+ -webkit-box-shadow: -10px 0 0 #1bbc9b;
626
+ box-shadow: -10px 0 0 #1bbc9b;
627
+ }
628
+ .flatpickr-day.selected.startRange.endRange,
629
+ .flatpickr-day.startRange.startRange.endRange,
630
+ .flatpickr-day.endRange.startRange.endRange {
631
+ border-radius: 50px;
632
+ }
633
+ .flatpickr-day.inRange {
634
+ border-radius: 0;
635
+ -webkit-box-shadow: -5px 0 0 #e2e2e2, 5px 0 0 #e2e2e2;
636
+ box-shadow: -5px 0 0 #e2e2e2, 5px 0 0 #e2e2e2;
637
+ }
638
+ .flatpickr-day.flatpickr-disabled,
639
+ .flatpickr-day.flatpickr-disabled:hover,
640
+ .flatpickr-day.prevMonthDay,
641
+ .flatpickr-day.nextMonthDay,
642
+ .flatpickr-day.notAllowed,
643
+ .flatpickr-day.notAllowed.prevMonthDay,
644
+ .flatpickr-day.notAllowed.nextMonthDay {
645
+ color: rgba(72,72,72,0.3);
646
+ background: transparent;
647
+ border-color: transparent;
648
+ cursor: default;
649
+ }
650
+ .flatpickr-day.flatpickr-disabled,
651
+ .flatpickr-day.flatpickr-disabled:hover {
652
+ cursor: not-allowed;
653
+ color: rgba(72,72,72,0.1);
654
+ }
655
+ .flatpickr-day.week.selected {
656
+ border-radius: 0;
657
+ -webkit-box-shadow: -5px 0 0 #1bbc9b, 5px 0 0 #1bbc9b;
658
+ box-shadow: -5px 0 0 #1bbc9b, 5px 0 0 #1bbc9b;
659
+ }
660
+ .flatpickr-day.hidden {
661
+ visibility: hidden;
662
+ }
663
+ .rangeMode .flatpickr-day {
664
+ margin-top: 1px;
665
+ }
666
+ .flatpickr-weekwrapper {
667
+ float: left;
668
+ }
669
+ .flatpickr-weekwrapper .flatpickr-weeks {
670
+ padding: 0 12px;
671
+ border-left: 1px solid rgba(72,72,72,0.2);
672
+ }
673
+ .flatpickr-weekwrapper .flatpickr-weekday {
674
+ float: none;
675
+ width: 100%;
676
+ line-height: 28px;
677
+ }
678
+ .flatpickr-weekwrapper span.flatpickr-day,
679
+ .flatpickr-weekwrapper span.flatpickr-day:hover {
680
+ display: block;
681
+ width: 100%;
682
+ max-width: none;
683
+ color: rgba(72,72,72,0.3);
684
+ background: transparent;
685
+ cursor: default;
686
+ border: none;
687
+ }
688
+ .flatpickr-innerContainer {
689
+ display: block;
690
+ display: -webkit-box;
691
+ display: -webkit-flex;
692
+ display: -ms-flexbox;
693
+ display: flex;
694
+ -webkit-box-sizing: border-box;
695
+ box-sizing: border-box;
696
+ overflow: hidden;
697
+ background: #fff;
698
+ border-bottom: 1px solid rgba(72,72,72,0.2);
699
+ }
700
+ .flatpickr-rContainer {
701
+ display: inline-block;
702
+ padding: 0;
703
+ -webkit-box-sizing: border-box;
704
+ box-sizing: border-box;
705
+ }
706
+ .flatpickr-time {
707
+ text-align: center;
708
+ outline: 0;
709
+ display: block;
710
+ height: 0;
711
+ line-height: 40px;
712
+ max-height: 40px;
713
+ -webkit-box-sizing: border-box;
714
+ box-sizing: border-box;
715
+ overflow: hidden;
716
+ display: -webkit-box;
717
+ display: -webkit-flex;
718
+ display: -ms-flexbox;
719
+ display: flex;
720
+ background: #fff;
721
+ border-radius: 0 0 5px 5px;
722
+ }
723
+ .flatpickr-time:after {
724
+ content: "";
725
+ display: table;
726
+ clear: both;
727
+ }
728
+ .flatpickr-time .numInputWrapper {
729
+ -webkit-box-flex: 1;
730
+ -webkit-flex: 1;
731
+ -ms-flex: 1;
732
+ flex: 1;
733
+ width: 40%;
734
+ height: 40px;
735
+ float: left;
736
+ }
737
+ .flatpickr-time .numInputWrapper span.arrowUp:after {
738
+ border-bottom-color: #484848;
739
+ }
740
+ .flatpickr-time .numInputWrapper span.arrowDown:after {
741
+ border-top-color: #484848;
742
+ }
743
+ .flatpickr-time.hasSeconds .numInputWrapper {
744
+ width: 26%;
745
+ }
746
+ .flatpickr-time.time24hr .numInputWrapper {
747
+ width: 49%;
748
+ }
749
+ .flatpickr-time input {
750
+ background: transparent;
751
+ -webkit-box-shadow: none;
752
+ box-shadow: none;
753
+ border: 0;
754
+ border-radius: 0;
755
+ text-align: center;
756
+ margin: 0;
757
+ padding: 0;
758
+ height: inherit;
759
+ line-height: inherit;
760
+ color: #484848;
761
+ font-size: 14px;
762
+ position: relative;
763
+ -webkit-box-sizing: border-box;
764
+ box-sizing: border-box;
765
+ -webkit-appearance: textfield;
766
+ -moz-appearance: textfield;
767
+ appearance: textfield;
768
+ }
769
+ .flatpickr-time input.flatpickr-hour {
770
+ font-weight: bold;
771
+ }
772
+ .flatpickr-time input.flatpickr-minute,
773
+ .flatpickr-time input.flatpickr-second {
774
+ font-weight: 400;
775
+ }
776
+ .flatpickr-time input:focus {
777
+ outline: 0;
778
+ border: 0;
779
+ }
780
+ .flatpickr-time .flatpickr-time-separator,
781
+ .flatpickr-time .flatpickr-am-pm {
782
+ height: inherit;
783
+ float: left;
784
+ line-height: inherit;
785
+ color: #484848;
786
+ font-weight: bold;
787
+ width: 2%;
788
+ -webkit-user-select: none;
789
+ -moz-user-select: none;
790
+ -ms-user-select: none;
791
+ user-select: none;
792
+ -webkit-align-self: center;
793
+ -ms-flex-item-align: center;
794
+ align-self: center;
795
+ }
796
+ .flatpickr-time .flatpickr-am-pm {
797
+ outline: 0;
798
+ width: 18%;
799
+ cursor: pointer;
800
+ text-align: center;
801
+ font-weight: 400;
802
+ }
803
+ .flatpickr-time input:hover,
804
+ .flatpickr-time .flatpickr-am-pm:hover,
805
+ .flatpickr-time input:focus,
806
+ .flatpickr-time .flatpickr-am-pm:focus {
807
+ background: #eaeaea;
808
+ }
809
+ .flatpickr-input[readonly] {
810
+ cursor: pointer;
811
+ }
812
+ @-webkit-keyframes fpFadeInDown {
813
+ from {
814
+ opacity: 0;
815
+ -webkit-transform: translate3d(0, -20px, 0);
816
+ transform: translate3d(0, -20px, 0);
817
+ }
818
+ to {
819
+ opacity: 1;
820
+ -webkit-transform: translate3d(0, 0, 0);
821
+ transform: translate3d(0, 0, 0);
822
+ }
823
+ }
824
+ @keyframes fpFadeInDown {
825
+ from {
826
+ opacity: 0;
827
+ -webkit-transform: translate3d(0, -20px, 0);
828
+ transform: translate3d(0, -20px, 0);
829
+ }
830
+ to {
831
+ opacity: 1;
832
+ -webkit-transform: translate3d(0, 0, 0);
833
+ transform: translate3d(0, 0, 0);
834
+ }
835
+ }
836
+ `, ""]);
837
+ // Exports
838
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
839
+
840
+
841
+ /***/ }),
842
+
15
843
  /***/ 27:
16
844
  /***/ ((module, __webpack_exports__, __webpack_require__) => {
17
845
 
@@ -22,10 +850,13 @@ return /******/ (() => { // webpackBootstrap
22
850
  /* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
23
851
  /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(314);
24
852
  /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
853
+ /* harmony import */ var _node_modules_css_loader_dist_cjs_js_node_modules_flatpickr_dist_themes_material_green_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(941);
25
854
  // Imports
26
855
 
27
856
 
857
+
28
858
  var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
859
+ ___CSS_LOADER_EXPORT___.i(_node_modules_css_loader_dist_cjs_js_node_modules_flatpickr_dist_themes_material_green_css__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A);
29
860
  // Module
30
861
  ___CSS_LOADER_EXPORT___.push([module.id, `/* src/components/Timeline/Timeline.css */
31
862
 
@@ -405,31 +1236,31 @@ ___CSS_LOADER_EXPORT___.push([module.id, `/* src/components/Timeline/Timeline.cs
405
1236
  .master-header-container {
406
1237
  display: flex;
407
1238
  align-items: center;
1239
+ justify-content: space-between; /* Butonlar solda, select sağda */
408
1240
  padding: 10px;
409
-
410
1241
  background-color: var(--header-background-color);
411
1242
  color: var(--header-text-color);
1243
+ }
412
1244
 
413
- /* eğer border vs. istersen
414
- border-bottom: 1px solid var(--border-color);
415
- */
1245
+ .master-header-buttons {
1246
+ display: flex; /* Yan yana dizilim */
1247
+ align-items: center; /* Dikey hizalama */
416
1248
  }
417
1249
 
418
- /* Butonlar */
419
1250
  .master-header-btn {
420
1251
  background-color: transparent;
421
1252
  color: var(--header-text-color);
422
1253
  border: 1px solid var(--border-color);
423
1254
  border-radius: 4px;
424
1255
  padding: 6px 12px;
425
- margin-right: 10px;
1256
+ margin-right: 10px; /* Butonlar arasında mesafe */
426
1257
  cursor: pointer;
427
1258
  font-size: 14px;
428
1259
  transition: background-color 0.2s ease, color 0.2s ease;
429
1260
  }
430
1261
 
431
1262
  .master-header-btn:hover {
432
- background-color: rgba(25, 118, 210, 0.2); /* Light tema hover */
1263
+ background-color: rgba(25, 118, 210, 0.2); /* Açık tema hover */
433
1264
  }
434
1265
 
435
1266
  .dark-mode .master-header-btn:hover {
@@ -440,9 +1271,36 @@ ___CSS_LOADER_EXPORT___.push([module.id, `/* src/components/Timeline/Timeline.cs
440
1271
  outline: none;
441
1272
  }
442
1273
 
1274
+
1275
+
1276
+ /* Tarih seçici (Date Picker) */
1277
+ .master-header-date-picker {
1278
+ background-color: transparent;
1279
+ color: var(--header-text-color);
1280
+ border: 1px solid var(--border-color);
1281
+ border-radius: 4px;
1282
+ padding: 5px 12px;
1283
+ margin-right: 10px; /* Butonlar arasında mesafe */
1284
+ cursor: pointer;
1285
+ font-size: 14px;
1286
+ transition: background-color 0.2s ease, color 0.2s ease;
1287
+ }
1288
+
1289
+ .master-header-date-picker:hover {
1290
+ background-color: rgba(25, 118, 210, 0.2); /* Açık tema hover */
1291
+ }
1292
+
1293
+ .dark-mode .master-header-date-picker:hover {
1294
+ background-color: rgba(76, 175, 80, 0.2); /* Koyu tema hover */
1295
+ }
1296
+
1297
+ .master-header-date-picker:focus {
1298
+ outline: none;
1299
+ }
1300
+
443
1301
  /* Select */
444
1302
  .master-header-select {
445
- margin-left: 10px;
1303
+ margin-left: auto; /* Sağa yaslamak için */
446
1304
  background-color: transparent;
447
1305
  color: var(--header-text-color);
448
1306
  border: 1px solid var(--border-color);
@@ -456,6 +1314,60 @@ ___CSS_LOADER_EXPORT___.push([module.id, `/* src/components/Timeline/Timeline.cs
456
1314
  outline: none;
457
1315
  }
458
1316
 
1317
+ /* Flatpickr Takvim Kutusu */
1318
+ .flatpickr-calendar {
1319
+ background-color: var(--background-color);
1320
+ color: var(--text-color);
1321
+ border: 1px solid var(--border-color);
1322
+ box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2); /* Gölge efekti */
1323
+ }
1324
+
1325
+
1326
+ /* Flatpickr Günü */
1327
+ .flatpickr-day {
1328
+ background-color: var(--background-color); /* Arka plan rengi */
1329
+ color: var(--text-color); /* Yazı rengi */
1330
+ border-radius: 4px; /* Köşeleri yuvarlat */
1331
+ cursor: pointer;
1332
+ }
1333
+
1334
+ .flatpickr-day:hover {
1335
+ background-color: rgba(25, 118, 210, 0.2); /* Hover efekti */
1336
+ }
1337
+
1338
+ .dark-mode .flatpickr-day:hover {
1339
+ background-color: rgba(76, 175, 80, 0.2); /* Koyu tema hover efekti */
1340
+ }
1341
+
1342
+ /* Seçili Gün */
1343
+ .flatpickr-day.selected {
1344
+ background-color: #4caf50; /* Seçili gün rengi */
1345
+ color: white; /* Seçili gün yazı rengi */
1346
+ }
1347
+
1348
+ /* Flatpickr Ay ve Yıl */
1349
+ .flatpickr-months .flatpickr-month {
1350
+ background-color: var(--background-color);
1351
+ color: var(--text-color);
1352
+ }
1353
+
1354
+ /* Flatpickr Ay İleri ve Geri Düğmeleri */
1355
+ .flatpickr-prev-month, .flatpickr-next-month {
1356
+ color: var(--text-color);
1357
+ cursor: pointer;
1358
+ }
1359
+
1360
+ /* Koyu Tema Örnekleri */
1361
+ .dark-mode .flatpickr-calendar {
1362
+ background-color: #1f2937; /* Koyu tema arka plan */
1363
+ color: #ffffff; /* Koyu tema yazı rengi */
1364
+ }
1365
+
1366
+ .dark-mode .flatpickr-day.selected {
1367
+ background-color: #4caf50;
1368
+ color: white;
1369
+ }
1370
+
459
1371
 
460
1372
  /* Container */
461
1373
  .timeline-content-container {
@@ -1058,54 +1970,92 @@ var update = injectStylesIntoStyleTag_default()(Timeline/* default */.A, options
1058
1970
 
1059
1971
  /* harmony default export */ const Timeline_Timeline = (Timeline/* default */.A && Timeline/* default */.A.locals ? Timeline/* default */.A.locals : undefined);
1060
1972
 
1973
+ // EXTERNAL MODULE: ./node_modules/css-loader/dist/cjs.js!./node_modules/flatpickr/dist/themes/material_green.css
1974
+ var material_green = __webpack_require__(941);
1975
+ ;// ./node_modules/flatpickr/dist/themes/material_green.css
1976
+
1977
+
1978
+
1979
+
1980
+
1981
+
1982
+
1983
+
1984
+
1985
+
1986
+
1987
+ var material_green_options = {};
1988
+
1989
+ material_green_options.styleTagTransform = (styleTagTransform_default());
1990
+ material_green_options.setAttributes = (setAttributesWithoutAttributes_default());
1991
+ material_green_options.insert = insertBySelector_default().bind(null, "head");
1992
+ material_green_options.domAPI = (styleDomAPI_default());
1993
+ material_green_options.insertStyleElement = (insertStyleElement_default());
1994
+
1995
+ var material_green_update = injectStylesIntoStyleTag_default()(material_green/* default */.A, material_green_options);
1996
+
1997
+
1998
+
1999
+
2000
+ /* harmony default export */ const themes_material_green = (material_green/* default */.A && material_green/* default */.A.locals ? material_green/* default */.A.locals : undefined);
2001
+
1061
2002
  ;// ./src/components/Timeline/MasterHeader.js
1062
- // src/components/Timeline/MasterHeader.js
1063
2003
 
1064
2004
  // veya MasterHeader.css, eğer ayrı dosyaya koyacaksan
2005
+ // Flatpickr Tema
1065
2006
 
1066
2007
  const MasterHeader = _ref => {
1067
2008
  let {
2009
+ selectedDate,
2010
+ onDateSelect,
1068
2011
  onToday,
1069
2012
  onAdvance,
1070
2013
  onRetreat,
1071
2014
  onMonthAdvance,
1072
2015
  onMonthRetreat,
1073
2016
  dayRange,
1074
- setDayRange,
1075
- isDarkMode,
1076
- toggleDarkMode
2017
+ setDayRange
1077
2018
  } = _ref;
2019
+ const formattedDate = new Date(selectedDate.getTime() + 24 * 60 * 60 * 1000 - selectedDate.getTimezoneOffset() * 60000).toISOString().split("T")[0]; // YYYY-MM-DD formatı
2020
+
1078
2021
  return /*#__PURE__*/external_react_default().createElement("div", {
1079
2022
  className: "master-header-container"
2023
+ }, /*#__PURE__*/external_react_default().createElement("div", {
2024
+ className: "master-header-buttons"
1080
2025
  }, /*#__PURE__*/external_react_default().createElement("button", {
1081
- className: "master-header-btn",
1082
- onClick: onToday
1083
- }, "Today"), /*#__PURE__*/external_react_default().createElement("button", {
1084
2026
  className: "master-header-btn",
1085
2027
  onClick: onMonthRetreat
1086
2028
  }, "1 Ay Geri"), /*#__PURE__*/external_react_default().createElement("button", {
1087
2029
  className: "master-header-btn",
1088
2030
  onClick: onRetreat
1089
- }, "5 G\xFCn Geri"), /*#__PURE__*/external_react_default().createElement("button", {
2031
+ }, "5 G\xFCn Geri"), /*#__PURE__*/external_react_default().createElement("input", {
2032
+ type: "date",
2033
+ className: "master-header-date-picker",
2034
+ value: formattedDate // Seçili tarih burada gösteriliyor
2035
+ ,
2036
+ onChange: e => onDateSelect(e.target.value) // Tarih seçimi
2037
+ ,
2038
+ onKeyDown: e => e.preventDefault() // Manuel girişleri engelle
2039
+ }), /*#__PURE__*/external_react_default().createElement("button", {
1090
2040
  className: "master-header-btn",
1091
2041
  onClick: onAdvance
1092
2042
  }, "5 G\xFCn \u0130leri"), /*#__PURE__*/external_react_default().createElement("button", {
1093
2043
  className: "master-header-btn",
1094
2044
  onClick: onMonthAdvance
1095
- }, "1 Ay \u0130leri"), /*#__PURE__*/external_react_default().createElement("select", {
2045
+ }, "1 Ay \u0130leri"), /*#__PURE__*/external_react_default().createElement("button", {
2046
+ className: "master-header-btn",
2047
+ onClick: onToday
2048
+ }, "Bug\xFCn")), /*#__PURE__*/external_react_default().createElement("select", {
1096
2049
  className: "master-header-select",
1097
2050
  value: dayRange,
1098
- onChange: e => setDayRange(parseInt(e.target.value))
2051
+ onChange: e => setDayRange(parseInt(e.target.value, 10))
1099
2052
  }, /*#__PURE__*/external_react_default().createElement("option", {
1100
2053
  value: 30
1101
2054
  }, "30 G\xFCn"), /*#__PURE__*/external_react_default().createElement("option", {
1102
2055
  value: 60
1103
2056
  }, "60 G\xFCn"), /*#__PURE__*/external_react_default().createElement("option", {
1104
2057
  value: 90
1105
- }, "90 G\xFCn")), /*#__PURE__*/external_react_default().createElement("button", {
1106
- className: "master-header-btn",
1107
- onClick: toggleDarkMode
1108
- }, isDarkMode ? "Light Mode" : "Dark Mode"));
2058
+ }, "90 G\xFCn")));
1109
2059
  };
1110
2060
  /* harmony default export */ const Timeline_MasterHeader = (MasterHeader);
1111
2061
  ;// ./src/components/Timeline/ResourcesHeader.js
@@ -1360,14 +2310,15 @@ const useEventDragDrop = (events, setEvents, setDropInfo) => {
1360
2310
  const offsetDays = Math.floor(dragOffset / cellWidth);
1361
2311
  const newStartDate = new Date(targetDate.getTime() - offsetDays * 24 * 60 * 60 * 1000);
1362
2312
  const newEndDate = new Date(newStartDate.getTime() + duration);
1363
- console.log("New Start Date:", newStartDate);
1364
- console.log("New End Date:", newEndDate);
1365
- setEvents(prevEvents => prevEvents.map(evt => evt.id === draggingEvent ? _objectSpread(_objectSpread({}, evt), {}, {
1366
- resourceId,
1367
- startDate: newStartDate,
1368
- endDate: newEndDate
1369
- }) : evt));
2313
+
2314
+ // Callback kontrolü ve loglama
1370
2315
  if (setDropInfo) {
2316
+ console.log("setDropInfo is being called with:", {
2317
+ id: draggingEvent,
2318
+ newResourceId: resourceId,
2319
+ newStartDate,
2320
+ newEndDate
2321
+ });
1371
2322
  setDropInfo({
1372
2323
  id: draggingEvent,
1373
2324
  newResourceId: resourceId,
@@ -1375,6 +2326,13 @@ const useEventDragDrop = (events, setEvents, setDropInfo) => {
1375
2326
  newEndDate
1376
2327
  });
1377
2328
  }
2329
+
2330
+ // Event güncellemesi
2331
+ setEvents(prevEvents => prevEvents.map(evt => evt.id === draggingEvent ? _objectSpread(_objectSpread({}, evt), {}, {
2332
+ resourceId,
2333
+ startDate: newStartDate,
2334
+ endDate: newEndDate
2335
+ }) : evt));
1378
2336
  }
1379
2337
  }
1380
2338
  setDraggingEvent(null);
@@ -1413,11 +2371,8 @@ const Indicator = _ref => {
1413
2371
  totalDays
1414
2372
  } = _ref;
1415
2373
  if (todayIndex < 0 || todayIndex >= totalDays) {
1416
- console.log("Indicator not visible: Out of bounds");
1417
2374
  return null; // Bugün timeline dışında ise çizgiyi gösterme
1418
2375
  }
1419
- console.log("todayIndex:", todayIndex);
1420
- console.log("totalDays:", totalDays);
1421
2376
  return /*#__PURE__*/external_react_default().createElement("div", {
1422
2377
  style: {
1423
2378
  position: "absolute",
@@ -1487,14 +2442,16 @@ const TimelineContent = _ref => {
1487
2442
  indicatorOn,
1488
2443
  resourceSettings,
1489
2444
  setDropInfo,
1490
- // Yeni prop'lar
1491
2445
  eventsDragOn = true,
1492
2446
  eventsExtendOn = true,
1493
2447
  createNewEventOn = true,
1494
- onDragInfo,
1495
2448
  onExtendInfo,
1496
2449
  onCreateEventInfo,
1497
- onEventRightClick
2450
+ onEventRightClick,
2451
+ eventTooltipOn = true,
2452
+ tooltipComponent: TooltipComponent,
2453
+ tempEventStyle = {},
2454
+ eventStyleResolver = () => ({})
1498
2455
  } = _ref;
1499
2456
  // ------------------- HOOKS & STATE -------------------
1500
2457
  const containerRef = (0,external_react_.useRef)(null);
@@ -1510,7 +2467,8 @@ const TimelineContent = _ref => {
1510
2467
  handleDragOver,
1511
2468
  handleDrop,
1512
2469
  handleDragEnd
1513
- } = hooks_useEventDragDrop(events, setEvents, setDropInfo);
2470
+ } = hooks_useEventDragDrop(events, setEvents, setDropInfo // Doğrudan setDropInfo'yu geçiriyoruz
2471
+ );
1514
2472
 
1515
2473
  // Extend
1516
2474
  const {
@@ -1536,6 +2494,11 @@ const TimelineContent = _ref => {
1536
2494
  // ------------------- Tooltip Logic -------------------
1537
2495
  const handleEventClickInternal = (event, e) => {
1538
2496
  e.stopPropagation();
2497
+ // Eğer mod "extend" ise tooltip'i açma
2498
+ if (mode === "extend") {
2499
+ return;
2500
+ }
2501
+
1539
2502
  // Harici callback
1540
2503
  if (onEventClick) onEventClick(event, e);
1541
2504
 
@@ -1625,7 +2588,6 @@ const TimelineContent = _ref => {
1625
2588
  return;
1626
2589
  }
1627
2590
  handleDragEnd();
1628
- // onDragInfo(...) => if needed
1629
2591
  };
1630
2592
 
1631
2593
  // ------------------- Extend Logic -------------------
@@ -1647,7 +2609,6 @@ const TimelineContent = _ref => {
1647
2609
  const daysToAdd = Math.floor(deltaX / cellW);
1648
2610
  const newEndDate = new Date((originalEndDate !== null && originalEndDate !== void 0 ? originalEndDate : new Date()).getTime());
1649
2611
  newEndDate.setDate(newEndDate.getDate() + daysToAdd);
1650
- console.log(">>> Extending ID:", extendingEvent.id, "=>", newEndDate);
1651
2612
  setEvents(prev => prev.map(evt => evt.id === extendingEvent.id ? TimelineContent_objectSpread(TimelineContent_objectSpread({}, evt), {}, {
1652
2613
  endDate: newEndDate
1653
2614
  }) : evt));
@@ -1664,7 +2625,11 @@ const TimelineContent = _ref => {
1664
2625
  });
1665
2626
  }
1666
2627
  }
1667
- setMode(null);
2628
+
2629
+ // Tooltip açılmasını engellemek için modun null olmasını geciktiriyoruz
2630
+ setTimeout(() => {
2631
+ setMode(null);
2632
+ }, 100); // 100ms gecikme
1668
2633
  setExtendingEvent(null);
1669
2634
  setOriginalEndDate(null);
1670
2635
  setStartMouseX(null);
@@ -1769,6 +2734,9 @@ const TimelineContent = _ref => {
1769
2734
  isPartialEnd
1770
2735
  } = calculatePosition(event, dates);
1771
2736
  if (!isVisible) return null;
2737
+
2738
+ // Kullanıcıdan gelen stil
2739
+ const eventStyle = eventStyleResolver ? eventStyleResolver(event) : {};
1772
2740
  return /*#__PURE__*/external_react_default().createElement("div", {
1773
2741
  key: event.id,
1774
2742
  className: "timeline-event",
@@ -1789,18 +2757,16 @@ const TimelineContent = _ref => {
1789
2757
  },
1790
2758
  onContextMenu: reactEvent => handleRightClickEvent(event, reactEvent),
1791
2759
  onClick: ev => handleEventClickInternal(event, ev),
1792
- style: {
2760
+ style: TimelineContent_objectSpread({
1793
2761
  left,
1794
2762
  width,
1795
2763
  top: "5px",
1796
- // color from var(--timeline-event-text-color)
1797
- // background from event.color or var(...) => if event.color empty, fallback in CSS
1798
2764
  borderTopLeftRadius: isPartialStart ? "0px" : "20px",
1799
2765
  borderBottomLeftRadius: isPartialStart ? "0px" : "20px",
1800
2766
  borderTopRightRadius: isPartialEnd ? "0px" : "20px",
1801
2767
  borderBottomRightRadius: isPartialEnd ? "0px" : "20px",
1802
2768
  cursor: mode === "extend" ? "col-resize" : "grab"
1803
- }
2769
+ }, eventStyle)
1804
2770
  }, event.title, eventsExtendOn && /*#__PURE__*/external_react_default().createElement("div", {
1805
2771
  className: "timeline-event-extend-handle",
1806
2772
  onMouseDown: mouseEvent => {
@@ -1810,9 +2776,7 @@ const TimelineContent = _ref => {
1810
2776
  }));
1811
2777
  }), tempEvent && tempEvent.resourceId === resource.id && /*#__PURE__*/external_react_default().createElement("div", {
1812
2778
  className: "timeline-temp-event",
1813
- style: TimelineContent_objectSpread(TimelineContent_objectSpread({}, calculatePosition(tempEvent, dates)), {}, {
1814
- top: "5px"
1815
- })
2779
+ style: TimelineContent_objectSpread(TimelineContent_objectSpread({}, calculatePosition(tempEvent, dates)), tempEventStyle)
1816
2780
  }, tempEvent.title), dates.map((dateObj, colIndex) => /*#__PURE__*/external_react_default().createElement("div", {
1817
2781
  key: "cell-".concat(groupIndex, "-").concat(rowIndex, "-").concat(colIndex),
1818
2782
  className: "timeline-cell ".concat(isCellSelected(resource.id, dateObj) ? "selected" : ""),
@@ -1822,25 +2786,11 @@ const TimelineContent = _ref => {
1822
2786
  onDragOver: e => handleDragOver(e),
1823
2787
  onDrop: e => handleDrop(e, resource.id, parseDate(dateObj.fullDate))
1824
2788
  })));
1825
- }))), selectedEvent &&
1826
- /*#__PURE__*/
1827
- // "timeline-event-tooltip" gibi className tanımlanabilir
1828
- // eğer custom css istenirse
1829
- external_react_default().createElement("div", {
1830
- style: {
1831
- position: "absolute",
1832
- top: tooltipPosition.top,
1833
- left: tooltipPosition.left,
1834
- // ...
1835
- backgroundColor: "#333",
1836
- color: "#fff",
1837
- padding: "5px",
1838
- borderRadius: "4px",
1839
- zIndex: 999
1840
- }
1841
- }, /*#__PURE__*/external_react_default().createElement("button", {
1842
- onClick: () => handleCloseTooltip()
1843
- }, "X"), selectedEvent.title));
2789
+ }))), eventTooltipOn && selectedEvent && TooltipComponent && mode !== "extend" && /*#__PURE__*/external_react_default().createElement(TooltipComponent, {
2790
+ event: selectedEvent,
2791
+ position: tooltipPosition,
2792
+ onClose: handleCloseTooltip
2793
+ }));
1844
2794
  };
1845
2795
  /* harmony default export */ const Timeline_TimelineContent = (TimelineContent);
1846
2796
  ;// ./src/components/Timeline/EventTooltip.js
@@ -1887,7 +2837,7 @@ const EventTooltip = _ref => {
1887
2837
  return /*#__PURE__*/external_react_default().createElement("div", {
1888
2838
  style: {
1889
2839
  position: "absolute",
1890
- top: top - 30,
2840
+ top: top - 200,
1891
2841
  // Tooltip'in biraz yukarıda görünmesi için
1892
2842
  left: left + 70,
1893
2843
  transform: "translateX(-50%)",
@@ -2087,7 +3037,25 @@ const Timeline_Timeline_Timeline = _ref => {
2087
3037
  onEventClick,
2088
3038
  onEventRightClick,
2089
3039
  // Yatay scroll özelliği aç/kapa
2090
- horizontalScrollOn = false // Varsayılan false
3040
+ horizontalScrollOn = false,
3041
+ // Varsayılan false
3042
+
3043
+ dayRange = 30,
3044
+ setDayRange,
3045
+ themeType = "light",
3046
+ // Tema bilgisi varsayılan olarak light
3047
+
3048
+ eventTooltipOn = true,
3049
+ tooltipComponent: TooltipComponent,
3050
+ // Özelleştirilebilir Tooltip bileşeni
3051
+ tempEventStyle = {},
3052
+ eventStyleResolver = () => ({}),
3053
+ indicatorDate = new Date(),
3054
+ onToday,
3055
+ onAdvance,
3056
+ onRetreat,
3057
+ onMonthAdvance,
3058
+ onMonthRetreat
2091
3059
  } = _ref;
2092
3060
  // ---------------------------------------------------------
2093
3061
  // 1) timelineData oluştur (dates, monthHeaders vs.)
@@ -2097,16 +3065,16 @@ const Timeline_Timeline_Timeline = _ref => {
2097
3065
  dates,
2098
3066
  monthHeaders
2099
3067
  } = timelineData;
3068
+ const [selectedDate, setSelectedDate] = (0,external_react_.useState)(() => {
3069
+ const date = programDate ? new Date(programDate) : new Date();
3070
+ date.setDate(date.getDate() - 3); // Program tarihinden 3 gün öncesini al
3071
+ return date;
3072
+ });
2100
3073
 
2101
3074
  // ---------------------------------------------------------
2102
3075
  // 2) local state
2103
3076
  // ---------------------------------------------------------
2104
3077
  const [collapsedGroups, setCollapsedGroups] = (0,external_react_.useState)({});
2105
- const [selectedDate, setSelectedDate] = (0,external_react_.useState)(() => {
2106
- const date = programDate ? new Date(programDate) : new Date();
2107
- date.setDate(date.getDate() - 3);
2108
- return date;
2109
- });
2110
3078
  const [localEvents, setLocalEvents] = (0,external_react_.useState)(events);
2111
3079
  const [selectedEvent, setSelectedEvent] = (0,external_react_.useState)(null);
2112
3080
  const [tooltipPosition, setTooltipPosition] = (0,external_react_.useState)({
@@ -2115,9 +3083,16 @@ const Timeline_Timeline_Timeline = _ref => {
2115
3083
  });
2116
3084
 
2117
3085
  // dayRange = ekranda göstermeyi istediğimiz gün/hücre sayısı (ör. 30 gün)
2118
- const [dayRange, setDayRange] = (0,external_react_.useState)(30);
2119
- const [isDarkMode, setIsDarkMode] = (0,external_react_.useState)(false);
2120
3086
 
3087
+ const [isDarkMode, setIsDarkMode] = (0,external_react_.useState)(themeType === "dark");
3088
+ (0,external_react_.useEffect)(() => {
3089
+ if (themeType !== undefined) {
3090
+ setIsDarkMode(themeType === "dark");
3091
+ }
3092
+ }, [themeType]);
3093
+ const toggleDarkMode = () => {
3094
+ setIsDarkMode(prev => !prev);
3095
+ };
2121
3096
  // ---------------------------------------------------------
2122
3097
  // 3) Sabit hücre genişliği (örneğin 56.95 px)
2123
3098
  // Container genişliği = dayRange * cellWidth
@@ -2156,7 +3131,8 @@ const Timeline_Timeline_Timeline = _ref => {
2156
3131
  const endIndex = startIndex + dayRange;
2157
3132
  const filteredDates = startIndex !== -1 ? dates.slice(startIndex, Math.min(endIndex, dates.length)) : [];
2158
3133
  const today = programDate ? new Date(programDate) : new Date();
2159
- const todayIndex = filteredDates.findIndex(d => new Date(d.fullDate).toDateString() === today.toDateString());
3134
+ today.setDate(today.getDate() - 3);
3135
+ const todayIndex = filteredDates.findIndex(d => new Date(d.fullDate).toDateString() === new Date(indicatorDate).toDateString());
2160
3136
  const totalDays = filteredDates.length;
2161
3137
 
2162
3138
  // ---------------------------------------------------------
@@ -2170,34 +3146,40 @@ const Timeline_Timeline_Timeline = _ref => {
2170
3146
 
2171
3147
  // ---------------------------------------------------------
2172
3148
  // 7) Navigation fonksiyonları
2173
- // ---------------------------------------------------------
3149
+ // --------------------------------------------------------- const { dates, monthHeaders } = timelineData;
3150
+
3151
+ const handleDateChange = newDate => {
3152
+ setSelectedDate(new Date(newDate));
3153
+ };
2174
3154
  const handleToday = () => {
2175
- const date = programDate ? new Date(programDate) : new Date();
2176
- date.setDate(date.getDate() - 3);
2177
- setSelectedDate(date);
3155
+ const today = programDate ? new Date(programDate) : new Date();
3156
+ today.setDate(today.getDate() - 3); // Program tarihinden 3 gün öncesini ayarla
3157
+ setSelectedDate(today);
3158
+ };
3159
+ const handleAdvance = () => {
3160
+ setSelectedDate(prev => new Date(prev.getTime() + 5 * 24 * 60 * 60 * 1000));
3161
+ };
3162
+ const handleRetreat = () => {
3163
+ setSelectedDate(prev => new Date(prev.getTime() - 5 * 24 * 60 * 60 * 1000));
3164
+ };
3165
+ const handleMonthAdvance = () => {
3166
+ setSelectedDate(prev => {
3167
+ const newDate = new Date(prev);
3168
+ newDate.setMonth(newDate.getMonth() + 1);
3169
+ return newDate;
3170
+ });
3171
+ };
3172
+ const handleMonthRetreat = () => {
3173
+ setSelectedDate(prev => {
3174
+ const newDate = new Date(prev);
3175
+ newDate.setMonth(newDate.getMonth() - 1);
3176
+ return newDate;
3177
+ });
2178
3178
  };
2179
- const handleAdvance = () => setSelectedDate(prev => new Date(prev.getTime() + 5 * 24 * 60 * 60 * 1000));
2180
- const handleRetreat = () => setSelectedDate(prev => new Date(prev.getTime() - 5 * 24 * 60 * 60 * 1000));
2181
- const handleMonthRetreat = () => setSelectedDate(prev => {
2182
- const newDate = new Date(prev);
2183
- newDate.setMonth(newDate.getMonth() - 1);
2184
- return newDate;
2185
- });
2186
- const handleMonthAdvance = () => setSelectedDate(prev => {
2187
- const newDate = new Date(prev);
2188
- newDate.setMonth(newDate.getMonth() + 1);
2189
- return newDate;
2190
- });
2191
3179
 
2192
3180
  // ---------------------------------------------------------
2193
3181
  // 8) Dark Mode
2194
3182
  // ---------------------------------------------------------
2195
- const toggleDarkMode = () => {
2196
- setIsDarkMode(prevMode => !prevMode);
2197
- };
2198
- (0,external_react_.useEffect)(() => {
2199
- document.body.classList.toggle("dark-mode", isDarkMode);
2200
- }, [isDarkMode]);
2201
3183
 
2202
3184
  // ---------------------------------------------------------
2203
3185
  // 9) Ay başlıklarını filtrele
@@ -2219,20 +3201,23 @@ const Timeline_Timeline_Timeline = _ref => {
2219
3201
  }, masterHeaderView && /*#__PURE__*/external_react_default().createElement("div", {
2220
3202
  className: "timeline-master-header"
2221
3203
  }, /*#__PURE__*/external_react_default().createElement(Timeline_MasterHeader, {
3204
+ selectedDate: selectedDate // Seçili tarihi gönder
3205
+ ,
3206
+ onDateSelect: handleDateChange,
2222
3207
  onToday: handleToday,
2223
3208
  onAdvance: handleAdvance,
2224
3209
  onRetreat: handleRetreat,
2225
3210
  onMonthAdvance: handleMonthAdvance,
2226
3211
  onMonthRetreat: handleMonthRetreat,
2227
3212
  dayRange: dayRange,
2228
- setDayRange: setDayRange // dayRange'ı burada user değiştirebilir
2229
- ,
2230
- isDarkMode: isDarkMode,
2231
- toggleDarkMode: toggleDarkMode
3213
+ setDayRange: setDayRange
2232
3214
  })), /*#__PURE__*/external_react_default().createElement("div", {
2233
3215
  className: "timeline-body"
2234
3216
  }, /*#__PURE__*/external_react_default().createElement("div", {
2235
- className: "timeline-resources-container"
3217
+ className: "timeline-resources-container",
3218
+ style: {
3219
+ overflow: "hidden"
3220
+ }
2236
3221
  }, /*#__PURE__*/external_react_default().createElement(Timeline_ResourcesHeader, {
2237
3222
  content: resourceHeaderContent
2238
3223
  }), /*#__PURE__*/external_react_default().createElement(Timeline_Resources, {
@@ -2253,31 +3238,31 @@ const Timeline_Timeline_Timeline = _ref => {
2253
3238
  }, /*#__PURE__*/external_react_default().createElement(Timeline_TimelineHeader, {
2254
3239
  dates: filteredDates,
2255
3240
  monthHeaders: filteredMonthHeaders
2256
- }), /*#__PURE__*/external_react_default().createElement(Timeline_TimelineContent
2257
- // Props
2258
- , {
3241
+ }), /*#__PURE__*/external_react_default().createElement(Timeline_TimelineContent, {
2259
3242
  groupedResources: resources,
2260
3243
  dates: filteredDates,
2261
3244
  collapsedGroups: collapsedGroups,
2262
3245
  events: localEvents,
2263
3246
  setEvents: setLocalEvents,
2264
- onEventClick: handleEventClick,
3247
+ onEventClick: onEventClick,
2265
3248
  todayIndex: todayIndex,
2266
- totalDays: totalDays,
2267
3249
  indicatorOn: indicatorOn,
2268
3250
  resourceSettings: resourceSettings,
2269
3251
  toggleGroupCollapse: toggleGroupCollapse,
2270
- setDropInfo: setDropInfo
2271
-
2272
- // Yeni prop'lar
2273
- ,
3252
+ setDropInfo: setDropInfo,
2274
3253
  eventsDragOn: eventsDragOn,
2275
3254
  eventsExtendOn: eventsExtendOn,
2276
3255
  createNewEventOn: createNewEventOn,
2277
3256
  onDragInfo: onDragInfo,
2278
3257
  onExtendInfo: onExtendInfo,
2279
3258
  onCreateEventInfo: onCreateEventInfo,
2280
- onEventRightClick: onEventRightClick
3259
+ onEventRightClick: onEventRightClick,
3260
+ eventTooltipOn: eventTooltipOn // Tooltip kontrolü
3261
+ ,
3262
+ tooltipComponent: TooltipComponent // Özelleştirilebilir Tooltip bileşeni
3263
+ ,
3264
+ tempEventStyle: tempEventStyle,
3265
+ eventStyleResolver: eventStyleResolver
2281
3266
  }), selectedEvent && /*#__PURE__*/external_react_default().createElement(Timeline_EventTooltip, {
2282
3267
  event: selectedEvent,
2283
3268
  position: tooltipPosition,