funda-ui 4.4.15 → 4.4.35

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 (50) hide show
  1. package/EventCalendar/index.css +114 -114
  2. package/EventCalendar/index.d.ts +1 -0
  3. package/EventCalendar/index.js +116 -84
  4. package/EventCalendarTimeline/index.css +274 -270
  5. package/EventCalendarTimeline/index.d.ts +3 -0
  6. package/EventCalendarTimeline/index.js +641 -224
  7. package/MultipleCheckboxes/index.js +11 -11
  8. package/MultipleSelect/index.js +11 -11
  9. package/NativeSelect/index.js +11 -11
  10. package/Radio/index.js +11 -11
  11. package/Select/index.js +11 -11
  12. package/Table/index.css +1 -0
  13. package/Table/index.js +36 -7
  14. package/TagInput/index.d.ts +1 -0
  15. package/TagInput/index.js +20 -2
  16. package/Tree/index.js +11 -11
  17. package/Utils/object.js +11 -11
  18. package/Utils/os.d.ts +2 -0
  19. package/Utils/os.js +104 -0
  20. package/lib/cjs/EventCalendar/index.d.ts +1 -0
  21. package/lib/cjs/EventCalendar/index.js +116 -84
  22. package/lib/cjs/EventCalendarTimeline/index.d.ts +3 -0
  23. package/lib/cjs/EventCalendarTimeline/index.js +641 -224
  24. package/lib/cjs/MultipleCheckboxes/index.js +11 -11
  25. package/lib/cjs/MultipleSelect/index.js +11 -11
  26. package/lib/cjs/NativeSelect/index.js +11 -11
  27. package/lib/cjs/Radio/index.js +11 -11
  28. package/lib/cjs/Select/index.js +11 -11
  29. package/lib/cjs/Table/index.js +36 -7
  30. package/lib/cjs/TagInput/index.d.ts +1 -0
  31. package/lib/cjs/TagInput/index.js +20 -2
  32. package/lib/cjs/Tree/index.js +11 -11
  33. package/lib/cjs/Utils/object.js +11 -11
  34. package/lib/cjs/Utils/os.d.ts +2 -0
  35. package/lib/cjs/Utils/os.js +104 -0
  36. package/lib/css/EventCalendar/index.css +114 -114
  37. package/lib/css/EventCalendarTimeline/index.css +274 -270
  38. package/lib/css/Table/index.css +1 -0
  39. package/lib/esm/EventCalendar/index.scss +81 -81
  40. package/lib/esm/EventCalendar/index.tsx +136 -98
  41. package/lib/esm/EventCalendarTimeline/index.scss +226 -221
  42. package/lib/esm/EventCalendarTimeline/index.tsx +445 -207
  43. package/lib/esm/ModalDialog/index.tsx +0 -1
  44. package/lib/esm/Table/Table.tsx +0 -1
  45. package/lib/esm/Table/index.scss +2 -0
  46. package/lib/esm/Table/utils/hooks/useTableDraggable.tsx +47 -6
  47. package/lib/esm/TagInput/index.tsx +23 -1
  48. package/lib/esm/Utils/libs/object.ts +67 -67
  49. package/lib/esm/Utils/libs/os.ts +63 -0
  50. package/package.json +1 -1
@@ -11,8 +11,7 @@ import {
11
11
  } from 'funda-utils/dist/cjs/getElementProperty';
12
12
  import { getTodayDate, getCalendarDate, isValidDate, padZero, getDateDetails, getMonthDates, getWeekDatesFromMon } from 'funda-utils/dist/cjs/date';
13
13
  import { clsWrite, combinedCls } from 'funda-utils/dist/cjs/cls';
14
-
15
-
14
+ import getOs from 'funda-utils//dist/cjs/os';
16
15
 
17
16
 
18
17
  export interface EventsValueConfig {
@@ -108,8 +107,10 @@ export type EventCalendarTimelineProps = {
108
107
  onCellMouseLeave?: (el: any) => void;
109
108
  onCellMouseUp?: (el: any, selectedCellsData: any[]) => void;
110
109
  onCellClick?: (el: any, cellData: any) => void;
110
+ onCellDoubleClick?: (el: any, cellData: any) => void;
111
111
  onKeyPressed?: (el: any, selectedCellsData: any[]) => void;
112
-
112
+ onKeyCopy?: (el: any, selectedCellsData: any[]) => void;
113
+ onKeyPaste?: (el: any, selectedCellsData: any[]) => void;
113
114
 
114
115
  // table
115
116
  tableListSectionTitle?: string | React.ReactNode;
@@ -194,7 +195,10 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
194
195
  onCellMouseLeave,
195
196
  onCellMouseUp,
196
197
  onCellClick,
198
+ onCellDoubleClick,
197
199
  onKeyPressed,
200
+ onKeyCopy,
201
+ onKeyPaste,
198
202
 
199
203
  //
200
204
  tableListSectionTitle,
@@ -229,9 +233,10 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
229
233
  const day = date.getDate();
230
234
  return month + ' ' + day;
231
235
  };
236
+ const START_WEEK_ON = 1; // represents "Monday/1" in JavaScript
232
237
 
233
238
  // orginal data
234
- const [val, setVal] = useState<TimelineRowListConfig[]>([]);
239
+ const [orginalData, setOrginalData] = useState<TimelineRowListConfig[]>([]);
235
240
 
236
241
  //
237
242
  const FILL_BLANK_DATE_DISABLD = typeof forwardAndBackFillDisabled === 'undefined' ? true : forwardAndBackFillDisabled;
@@ -272,6 +277,11 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
272
277
  const scrollBodyRef = useRef(null);
273
278
  const scrollListRef = useRef(null);
274
279
 
280
+ // Temporary date
281
+ const [tempDate, setTempDate] = useState<string>('');
282
+
283
+
284
+
275
285
  // Open temporary storage for pop-ups
276
286
  const [tableRowNum, setTableRowNum] = useState<number>(-1);
277
287
  const [tableCellId, setTableCellId] = useState<number>(-1);
@@ -288,6 +298,22 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
288
298
  const [appearanceMode, setAppearanceMode] = useState<string>(appearance);
289
299
 
290
300
 
301
+ const findMondayAndTruncate = (dates: string[]) => {
302
+ const _res = dates.map((s: string) => new Date(s));
303
+ // Find the first Monday in the sequence
304
+ for (let i = 0; i < _res.length; i++) {
305
+ const date = _res[i];
306
+ if (date.getDay() === START_WEEK_ON) {
307
+ // Return dates starting from Monday onwards
308
+ return dates.slice(i);
309
+ }
310
+ }
311
+
312
+ return []; // Return empty array if no Monday found
313
+ }
314
+
315
+
316
+
291
317
  // exposes the following methods
292
318
  useImperativeHandle(
293
319
  contentRef,
@@ -304,6 +330,7 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
304
330
  resetSelectedCells: () => {
305
331
  // reset selection area
306
332
  setSelectedCells([]);
333
+ setCopiedCells(null);
307
334
  }
308
335
  }),
309
336
  [contentRef],
@@ -342,10 +369,6 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
342
369
  const [isSelecting, setIsSelecting] = useState<boolean>(false);
343
370
  const [selectedCells, setSelectedCells] = useState<any[]>([]);
344
371
  const [startCell, setStartCell] = useState<any>(null);
345
- function handleTableMainMouseUp(e: React.MouseEvent) {
346
- setIsSelecting(false);
347
- }
348
-
349
372
 
350
373
  // Determine whether it is a selected cell
351
374
  const isCellSelected = (row: number, col: number) => {
@@ -353,10 +376,50 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
353
376
  };
354
377
 
355
378
 
356
- // Selecting now
357
- function handleTableMainCellMouseEnter(e: React.MouseEvent, row: number, col: number) {
379
+ // Start selecting
380
+ const handleTableMainCellMouseDown = (e: React.MouseEvent, row: number, col: number, colsOffset: number) => {
381
+ const isMultiSelect = e.ctrlKey || e.metaKey; // Check whether the Ctrl or Command key is pressed
382
+
383
+ setIsSelecting(true);
384
+ setStartCell({ row, col });
385
+
358
386
  const _el: any = e.currentTarget;
359
387
 
388
+ setIsSelecting(true);
389
+ setStartCell({ row, col });
390
+
391
+ setSelectedCells((prevSelectedCells: any[]) => {
392
+ if (isMultiSelect) {
393
+ // Multi-select mode: Add or remove cells
394
+ //++++++++++
395
+ const cellExists = prevSelectedCells.some(({row: r, col: c}) => r === row && c === col);
396
+ if (cellExists) {
397
+ return prevSelectedCells.filter(({row: r, col: c}) => !(r === row && c === col));
398
+ } else {
399
+ return [...prevSelectedCells, {
400
+ rowData: JSON.parse(_el.dataset.rowinfo),
401
+ date: _el.dataset.date,
402
+ row: row,
403
+ col: col
404
+ }];
405
+ }
406
+ } else {
407
+ // Radio Mode: Clear the previous selection, select only the current cell
408
+ //++++++++++
409
+ return [{
410
+ rowData: JSON.parse(_el.dataset.rowinfo),
411
+ date: _el.dataset.date,
412
+ row: row,
413
+ col: col
414
+ }];
415
+ }
416
+ });
417
+
418
+ };
419
+
420
+ // Selecting now
421
+ const handleTableMainCellMouseEnter = (e: React.MouseEvent, row: number, col: number, colsOffset: number) => {
422
+
360
423
  if (isSelecting && startCell) {
361
424
 
362
425
  //########## MODE: WEEK #############
@@ -377,14 +440,15 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
377
440
  const [minRow, maxRow] = [startCell.row, row].sort((a, b) => a - b);
378
441
  const [minCol, maxCol] = [startCell.col, col].sort((a, b) => a - b);
379
442
 
443
+
380
444
  for (let r = minRow; r <= maxRow; r++) {
381
445
  for (let c = minCol; c <= maxCol; c++) {
382
446
 
383
447
  // query date and row data
384
- const curRowData: any = val[r];
448
+ const curRowData: any = orginalData[r];
385
449
  newSelectedCells.push({
386
450
  rowData: curRowData?.listSection,
387
- date: curDateList[c],
451
+ date: curDateList[c - colsOffset],
388
452
  row: r,
389
453
  col: c
390
454
  });
@@ -392,24 +456,133 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
392
456
  }
393
457
  setSelectedCells(newSelectedCells);
394
458
  }
395
- }
459
+ };
396
460
 
397
461
  // Stop selecting
398
- function handleTableMainCellMouseDown(e: React.MouseEvent, row: number, col: number) {
399
- const _el: any = e.currentTarget;
462
+ const handleTableMainMouseUp = (e: React.MouseEvent) => {
463
+ setIsSelecting(false);
464
+ };
465
+
466
+ //================================================================
467
+ // Copy & Paste
468
+ //================================================================
469
+ const [copiedCells, setCopiedCells] = useState<{
470
+ structure: {
471
+ rows: number,
472
+ cols: number
473
+ },
474
+ offset: { row: number, col: number },
475
+ cells: any[]
476
+ } | null>(null);
477
+
478
+ const handleWrapperKeyDown = (e: React.KeyboardEvent<HTMLDivElement>) => {
479
+ const isMac = getOs().isOSX;
480
+
481
+ //########## MODE: WEEK #############
482
+ let curDateList: any[] = [];
483
+ if (appearanceMode === 'week') {
484
+ curDateList = weekDates.map((v: Date) => getCalendarDate(v));
485
+ }
486
+ //########## /MODE: WEEK #############
487
+
488
+ //########## MODE: MONTH #############
489
+ if (appearanceMode === 'month') {
490
+ curDateList = getMonthDates(year, month + 1);
491
+ }
492
+ //########## /MODE: MONTH #############
493
+
494
+
495
+ // Listen for copy
496
+ if ((isMac && e.metaKey && e.key === 'c') || (!isMac && e.ctrlKey && e.key === 'c')) {
497
+
498
+ if (selectedCells.length > 0) {
499
+ // Gets the structure of the selected area
500
+ const _selectedCellsCoordinates = selectedCells.map(({row: r, col: c}) => {
501
+ return [r, c];
502
+ });
503
+
504
+ const [minRow, maxRow] = _selectedCellsCoordinates.reduce(
505
+ ([min, max], [r]) => [Math.min(min, r), Math.max(max, r)],
506
+ [Infinity, -Infinity]
507
+ );
508
+ const [minCol, maxCol] = _selectedCellsCoordinates.reduce(
509
+ ([min, max], [_, c]) => [Math.min(min, c), Math.max(max, c)],
510
+ [Infinity, -Infinity]
511
+ );
512
+
513
+ /*
514
+ [Be equal to:]
515
+
516
+ // Suppose _selectedCellsCoordinates is an array of selected cells, each of which is in the form of [row, col].
517
+ let minRow = Infinity;
518
+ let maxRow = -Infinity;
519
+ let minCol = Infinity;
520
+ let maxCol = -Infinity;
521
+
522
+ for (const [row, col] of _selectedCellsCoordinates) {
523
+ if (row < minRow) minRow = row;
524
+ if (row > maxRow) maxRow = row;
525
+ if (col < minCol) minCol = col;
526
+ if (col > maxCol) maxCol = col;
527
+ }
528
+ */
529
+
530
+ // Calculate the offset and adjust the cell coordinates
531
+ const adjustedCells = _selectedCellsCoordinates.map(([r, c]) => [r - minRow, c - minCol]);
532
+
533
+ // The copy result is independent of the data
534
+ setCopiedCells({
535
+ structure: {
536
+ rows: maxRow - minRow + 1,
537
+ cols: maxCol - minCol + 1
538
+ },
539
+ offset: { row: minRow, col: minCol },
540
+ cells: adjustedCells
541
+ });
542
+
543
+
544
+ //
545
+ onKeyCopy?.(e, selectedCells);
546
+
547
+ }
548
+
549
+ }
550
+
551
+ // Listen for paste
552
+ if ((isMac && e.metaKey && e.key === 'v') || (!isMac && e.ctrlKey && e.key === 'v')) {
553
+
554
+
555
+ if (copiedCells && selectedCells.length > 0) {
556
+ const {rowsTotal, colsTotal, forwardFillTotal} = getCells();
557
+ const {row: targetRow, col: targetCol} = selectedCells[0]; // the first position
558
+ const newSelectedCellsCoordinates = copiedCells.cells.map(([r, c]) => [
559
+ targetRow + r,
560
+ targetCol + c
561
+ ]).filter(([r, c]) => r < rowsTotal && c < colsTotal); // Make sure you don't go beyond the scope of the table
562
+
563
+ // query date and row data
564
+ const newSelectedCells: any[] = [];
565
+ newSelectedCellsCoordinates.forEach((item: any[]) => {
566
+ const [r, c] = item;
567
+ const curRowData: any = orginalData[r];
568
+ newSelectedCells.push({
569
+ rowData: curRowData?.listSection,
570
+ date: curDateList[c - forwardFillTotal],
571
+ row: r,
572
+ col: c
573
+ });
574
+ });
575
+
576
+
577
+ setSelectedCells(newSelectedCells);
578
+
579
+ //
580
+ onKeyPaste?.(e, newSelectedCells);
581
+ }
582
+ }
583
+ };
400
584
 
401
- setIsSelecting(true);
402
- setStartCell({ row, col });
403
- setSelectedCells([{
404
- rowData: JSON.parse(_el.dataset.rowinfo),
405
- date: _el.dataset.date,
406
- row: row,
407
- col: col
408
- }]);
409
- }
410
-
411
585
 
412
-
413
586
 
414
587
  //================================================================
415
588
  // Other
@@ -426,9 +599,6 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
426
599
  {cellAddBtnLabel || ''}
427
600
  </>;
428
601
 
429
-
430
-
431
-
432
602
  // click outside
433
603
  useClickOutside({
434
604
  enabled: isShowTableTooltip && tableGridRef.current,
@@ -489,7 +659,12 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
489
659
 
490
660
  });
491
661
 
492
- return curWeek;
662
+ return {
663
+ rowsTotal: orginalData.length,
664
+ colsTotal: curWeek.length,
665
+ forwardFillTotal: 0,
666
+ list: curWeek
667
+ };
493
668
 
494
669
  }
495
670
  //########## /MODE: WEEK #############
@@ -550,91 +725,110 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
550
725
  return first7Days.map((v: Date) => getCalendarDate(v));
551
726
  };
552
727
 
553
-
554
- return _tempCells.map((_: any, j: number) => {
555
- const _col = allDays.slice(j * 7, (j + 1) * 7);
556
-
557
- // back fill
558
- const backFillArr: null[] = [];
559
- for (let k = 0; k < 7 - _col.length; k++) {
560
- backFillArr.push(null);
561
- }
562
- _col.splice(_col.length, 0, ...backFillArr as any);
563
-
564
-
565
- //
566
- const isFirstGroup = j === 0;
567
- const isLastGroup = j === _tempCells.length - 1;
568
-
569
-
570
- // forward fill
571
- const __forwardFillDate: string[] = _getForwardFill(year, month+1);
572
-
573
- // back fill
574
- const __backFillDate: string[] = _getBackFill(year, month+1);
575
-
576
-
577
- const _getDateShow = (_dayIndex: number, _m: number, _startDay: number, _month: number) => {
578
- const currentDay = typeof _dayIndex === 'number' ? _dayIndex - (_startDay - 2) : 0; // ..., -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, ...
579
-
580
- // date
581
- let _dateShow: any = currentDay > 0 ? `${year}-${_month + 1}-${currentDay}` : '';
582
-
583
- // forward & back
584
- if (isFirstGroup && _dateShow === '') {
585
- _dateShow = __forwardFillDate.at(currentDay-1);
728
+
729
+
730
+ // The remaining date of the previous month
731
+ // If the number is 7, the calendar does not include the date of the previous month
732
+ const remainPrevDate = findMondayAndTruncate(_getForwardFill(year, month+1));
733
+ const remainPrevDateTotal = remainPrevDate.length === 7 ? 0 : remainPrevDate.length;
734
+
735
+
736
+ return {
737
+ rowsTotal: orginalData.length,
738
+ colsTotal: allDays.length,
739
+ forwardFillTotal: remainPrevDateTotal,
740
+ list: _tempCells.map((_: any, j: number) => {
741
+ const _col = allDays.slice(j * 7, (j + 1) * 7);
742
+
743
+ // back fill
744
+ const backFillArr: null[] = [];
745
+ for (let k = 0; k < 7 - _col.length; k++) {
746
+ backFillArr.push(null);
586
747
  }
587
-
588
- if (isLastGroup && _dateShow === '') {
589
- _dateShow = __backFillDate.at(_m);
748
+ _col.splice(_col.length, 0, ...backFillArr as any);
749
+
750
+
751
+ //
752
+ const isFirstGroup = j === 0;
753
+ const isLastGroup = j === _tempCells.length - 1;
754
+
755
+
756
+ // forward fill
757
+ const __forwardFillDate: string[] = _getForwardFill(year, month+1);
758
+
759
+ // back fill
760
+ const __backFillDate: string[] = _getBackFill(year, month+1);
761
+
762
+
763
+ const _getDateShow = (_dayIndex: number, _m: number, _startDay: number, _month: number) => {
764
+ const currentDay = typeof _dayIndex === 'number' ? _dayIndex - (_startDay - 2) : 0; // ..., -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, ...
765
+
766
+ // date
767
+ let _dateShow: any = currentDay > 0 ? `${year}-${_month + 1}-${currentDay}` : '';
768
+
769
+ // forward & back
770
+ if (isFirstGroup && _dateShow === '') {
771
+ _dateShow = __forwardFillDate.at(currentDay-1);
772
+ }
773
+
774
+ if (isLastGroup && _dateShow === '') {
775
+ _dateShow = __backFillDate.at(_m);
776
+ }
777
+
778
+
779
+ return {
780
+ date: getCalendarDate(_dateShow),
781
+ firstGroup: isFirstGroup,
782
+ lastGroup: isLastGroup,
783
+ validDisplayDate: currentDay > 0 && currentDay <= days[month]
784
+ };
785
+
590
786
  }
591
-
592
-
787
+
788
+ //
593
789
  return {
594
- date: getCalendarDate(_dateShow),
595
- firstGroup: isFirstGroup,
596
- lastGroup: isLastGroup,
597
- validDisplayDate: currentDay > 0 && currentDay <= days[month]
598
- };
599
-
600
- }
601
-
602
- //
603
- return {
604
- month: currentMonth,
605
- startDay: currentStartDay,
606
- row: j,
607
- col: _col,
608
- dateInfo: _col.map((k: number, m: number) => {
609
- const _lastWeekDays: number = _col.filter(Boolean).length;
610
- return _getDateShow(k, m - _lastWeekDays, currentStartDay, currentMonth);
611
- }),
612
- weekDisplay: _col.map((k: number, m: number) => {
613
- return WEEK[m]
614
- }),
615
- week: _col.map((k: number, m: number) => {
616
- return m
617
- }),
618
-
619
- }
620
- });
790
+ month: currentMonth,
791
+ startDay: currentStartDay,
792
+ row: j,
793
+ col: _col,
794
+ dateInfo: _col.map((k: number, m: number) => {
795
+ const _lastWeekDays: number = _col.filter(Boolean).length;
796
+ return _getDateShow(k, m - _lastWeekDays, currentStartDay, currentMonth);
797
+ }),
798
+ weekDisplay: _col.map((k: number, m: number) => {
799
+ return WEEK[m]
800
+ }),
801
+ week: _col.map((k: number, m: number) => {
802
+ return m
803
+ }),
804
+
805
+ }
806
+ })
807
+ };
808
+
809
+
621
810
  }
622
811
  //########## /MODE: MONTH #############
623
812
 
624
813
 
625
- return [];
814
+ return {
815
+ rowsTotal: 0,
816
+ colsTotal: 0,
817
+ forwardFillTotal: 0,
818
+ list: []
819
+ };
626
820
 
627
821
 
628
822
  };
629
823
 
630
824
  const queryItemObj = () => {
631
- const curRowData: any = val[tableRowNum];
825
+ const curRowData: any = orginalData[tableRowNum];
826
+ const curDate: string = tempDate !== '' ? tempDate : `${year}-${month + 1}-${day}`;
632
827
 
633
-
634
828
  if (curRowData) {
635
829
  const eventSourcesData = curRowData.eventSources;
636
830
 
637
- const _rowData = eventSourcesData.filter((item: any) => getCalendarDate(item.date as string) === getCalendarDate(`${year}-${month + 1}-${day}`));
831
+ const _rowData = eventSourcesData.filter((item: any) => getCalendarDate(item.date as string) === getCalendarDate(curDate));
638
832
 
639
833
  let _currentData: any = undefined;
640
834
  if (_rowData[0]) {
@@ -646,7 +840,7 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
646
840
  _currentData = {
647
841
  rowData: curRowData.listSection,
648
842
  id: 0,
649
- date: getCalendarDate(`${year}-${month + 1}-${day}`)
843
+ date: getCalendarDate(curDate)
650
844
  };
651
845
  } else {
652
846
  // edit or delete
@@ -658,7 +852,7 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
658
852
  return _rowData[0] ? _currentData: {
659
853
  rowData: curRowData.listSection,
660
854
  id: 0,
661
- date: getCalendarDate(`${year}-${month + 1}-${day}`)
855
+ date: getCalendarDate(curDate)
662
856
  };
663
857
  }
664
858
  };
@@ -743,7 +937,7 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
743
937
 
744
938
 
745
939
  // Determine whether it exceeds the far right or left side of the screen
746
- const _modalContent = _tableTooltipModalRef.querySelector('.e-cal-timeline-table__cell-tooltipcontent');
940
+ const _modalContent = _tableTooltipModalRef.querySelector('.custom-event-tl-table__cell-tooltipcontent');
747
941
  const _modalBox = _modalContent.getBoundingClientRect();
748
942
  if (typeof _modalContent.dataset.offset === 'undefined' && _modalBox.left > 0) {
749
943
 
@@ -992,12 +1186,12 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
992
1186
  // ================================================================
993
1187
 
994
1188
  function generateListSectionUi() {
995
- return val.map((item: any, i: number) => {
1189
+ return orginalData.map((item: any, i: number) => {
996
1190
 
997
1191
  return (
998
1192
  <tr key={i} role="row" data-index={i}>
999
- <td role="gridcell" data-resource-index={i} className="e-cal-timeline-table__datagrid-cell">
1000
- <div className="e-cal-timeline-table__cell-cushion e-cal-timeline-table__cell-cushion-title" dangerouslySetInnerHTML={{
1193
+ <td role="gridcell" data-resource-index={i} className="custom-event-tl-table__datagrid-cell">
1194
+ <div className="custom-event-tl-table__cell-cushion custom-event-tl-table__cell-cushion-title" dangerouslySetInnerHTML={{
1001
1195
  __html: item.listSection.title
1002
1196
  }} />
1003
1197
  </td>
@@ -1013,7 +1207,8 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
1013
1207
  // colIndex
1014
1208
  let colIndex = 0;
1015
1209
 
1016
- return getCells().map((item: any, j: number) => {
1210
+ const {forwardFillTotal, list: cellsList} = getCells();
1211
+ return cellsList.map((item: any, j: number) => {
1017
1212
 
1018
1213
 
1019
1214
 
@@ -1035,7 +1230,7 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
1035
1230
  // helper
1036
1231
  const d = parseFloat(_dateDayShow);
1037
1232
  const _currentData = eventSourcesData.filter((item: any) => getCalendarDate(item.date as string) === _dateShow);
1038
- const isLastCol = colIndex === 7 * getCells().length;
1233
+ const isLastCol = colIndex === 7 * cellsList.length;
1039
1234
  const isInteractive = item.dateInfo[i].validDisplayDate; // The date on which the user interaction can occur, e.g. click, modify
1040
1235
  const isForward = item.dateInfo[i].firstGroup && !isInteractive;
1041
1236
  const isBack = item.dateInfo[i].lastGroup && !isInteractive;
@@ -1049,7 +1244,7 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
1049
1244
 
1050
1245
  return <th
1051
1246
  className={combinedCls(
1052
- 'e-cal-timeline-table__cell-cushion-headercontent__container',
1247
+ 'custom-event-tl-table__cell-cushion-headercontent__container',
1053
1248
  {
1054
1249
  'empty': !isInteractive,
1055
1250
  'today': d === now.getDate(),
@@ -1081,6 +1276,7 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
1081
1276
 
1082
1277
  // reset selection area
1083
1278
  setSelectedCells([]);
1279
+ setCopiedCells(null);
1084
1280
 
1085
1281
 
1086
1282
  //
@@ -1099,6 +1295,9 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
1099
1295
  id: 0,
1100
1296
  date: _dateShow
1101
1297
  } : _currentData[0], () => setShowEdit(true), 'normal');
1298
+
1299
+ // set temporary date
1300
+ setTempDate(_dateShow);
1102
1301
  }
1103
1302
  }
1104
1303
 
@@ -1115,7 +1314,7 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
1115
1314
  {/* forward fill & day & back fill */}
1116
1315
  <div
1117
1316
  className={combinedCls(
1118
- 'e-cal-timeline-table__cell-cushion e-cal-timeline-table__cell-cushion-headercontent',
1317
+ 'custom-event-tl-table__cell-cushion custom-event-tl-table__cell-cushion-headercontent',
1119
1318
  {
1120
1319
  'disabled': !isInteractive
1121
1320
  }
@@ -1163,7 +1362,7 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
1163
1362
 
1164
1363
  const _eventContentTooltip = typeof cellItem.dataTooltip === 'undefined' ? '' : <>
1165
1364
  <div
1166
- className="e-cal-timeline__day__event-tooltipcontent"
1365
+ className="custom-event-tl__day__event-tooltipcontent"
1167
1366
  dangerouslySetInnerHTML={{
1168
1367
  __html: cellItem.dataTooltip
1169
1368
  }}
@@ -1172,14 +1371,14 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
1172
1371
 
1173
1372
  return <div
1174
1373
  className={combinedCls(
1175
- `e-cal-timeline-table__cell-cushion-content__item e-cal-timeline-table__cell-cushion-content__item-${cellItemIndex}`,
1374
+ `custom-event-tl-table__cell-cushion-content__item custom-event-tl-table__cell-cushion-content__item-${cellItemIndex}`,
1176
1375
  {
1177
1376
  'first': cellItemIndex === 0,
1178
1377
  'last': cellItemIndex === _items.length-1
1179
1378
  }
1180
1379
  )}
1181
1380
  key={`cell-item-${rowIndex}-${cellItemIndex}}`}
1182
- data-overlay-id={`e-cal-timeline-table__cell-tooltipwrapper-${idRes}`}
1381
+ data-overlay-id={`custom-event-tl-table__cell-tooltipwrapper-${idRes}`}
1183
1382
  data-cell-item-index={cellItemIndex}
1184
1383
  data-date={_dateShow}
1185
1384
  data-day={_dateDayShow}
@@ -1230,6 +1429,9 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
1230
1429
 
1231
1430
  if (EVENTS_ENABLED) {
1232
1431
  onModalEditOpen?.(cellItem, () => setShowEdit(true), 'normal');
1432
+
1433
+ // set temporary date
1434
+ setTempDate(_dateShow);
1233
1435
  }
1234
1436
  }
1235
1437
  }}
@@ -1239,7 +1441,7 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
1239
1441
 
1240
1442
  {/* ITEM */}
1241
1443
  <div
1242
- className="e-cal-timeline__day__event"
1444
+ className="custom-event-tl__day__event"
1243
1445
  style={typeof cellItem !== 'undefined' && (cellItem as any).eventStyles !== 'undefined' ? cellItem.eventStyles : {}}
1244
1446
  dangerouslySetInnerHTML={typeof cellItem.data === 'string' ? {
1245
1447
  __html: cellItem.data
@@ -1251,7 +1453,7 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
1251
1453
 
1252
1454
  {/* DELETE BUTTON */}
1253
1455
  <div
1254
- className={`e-cal-timeline__day__eventdel ${cellCloseBtnClassName || ''}`}
1456
+ className={`custom-event-tl__day__eventdel ${cellCloseBtnClassName || ''}`}
1255
1457
  >
1256
1458
  <a
1257
1459
  href="#"
@@ -1289,6 +1491,9 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
1289
1491
 
1290
1492
  if (EVENTS_DELETE_ENABLED) {
1291
1493
  onModalDeleteOpen?.(_existsContent, () => setShowDelete(true));
1494
+
1495
+ // set temporary date
1496
+ setTempDate(_dateShow);
1292
1497
  }
1293
1498
  }
1294
1499
 
@@ -1311,7 +1516,7 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
1311
1516
 
1312
1517
  return <td
1313
1518
  className={combinedCls(
1314
- 'e-cal-timeline-table__cell-cushion-content__container e-cal-timeline-table__cell-tooltiptrigger',
1519
+ 'custom-event-tl-table__cell-cushion-content__container custom-event-tl-table__cell-tooltiptrigger',
1315
1520
  {
1316
1521
  'has-event': eventSourcesData && _currentData.length > 0,
1317
1522
  'empty': !isInteractive,
@@ -1323,7 +1528,7 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
1323
1528
  key={"col" + i}
1324
1529
  data-index={colIndex - 1}
1325
1530
  colSpan={1}
1326
- data-rowinfo={JSON.stringify(val[rowIndex]?.listSection)}
1531
+ data-rowinfo={JSON.stringify(orginalData[rowIndex]?.listSection)}
1327
1532
  data-date={_dateShow}
1328
1533
  data-day={_dateDayShow}
1329
1534
  data-week={weekDay}
@@ -1332,12 +1537,12 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
1332
1537
  onCellMouseEnter?.(e);
1333
1538
 
1334
1539
  //
1335
- if (multipleCells) handleTableMainCellMouseEnter(e, rowIndex, dayIndex);
1540
+ if (multipleCells) handleTableMainCellMouseEnter(e, rowIndex, dayIndex, forwardFillTotal);
1336
1541
  }}
1337
1542
  onMouseDown={(e: React.MouseEvent) => {
1338
1543
  //
1339
1544
  onCellClick?.(e, {
1340
- rowData: val[rowIndex]?.listSection,
1545
+ rowData: orginalData[rowIndex]?.listSection,
1341
1546
  date: _dateShow,
1342
1547
  row: rowIndex,
1343
1548
  col: dayIndex
@@ -1348,7 +1553,18 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
1348
1553
  onChangeDate?.(e, null);
1349
1554
  }
1350
1555
 
1351
- if (multipleCells) handleTableMainCellMouseDown(e, rowIndex, dayIndex);
1556
+
1557
+ if (multipleCells) handleTableMainCellMouseDown(e, rowIndex, dayIndex, forwardFillTotal);
1558
+ }}
1559
+
1560
+ onDoubleClick={(e: React.MouseEvent) => {
1561
+ //
1562
+ onCellDoubleClick?.(e, {
1563
+ rowData: orginalData[rowIndex]?.listSection,
1564
+ date: _dateShow,
1565
+ row: rowIndex,
1566
+ col: dayIndex
1567
+ });
1352
1568
  }}
1353
1569
  onMouseLeave={(e: React.MouseEvent) => {
1354
1570
  onCellMouseLeave?.(e);
@@ -1362,7 +1578,7 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
1362
1578
  {/* forward fill & day & back fill */}
1363
1579
  <div
1364
1580
  className={combinedCls(
1365
- 'e-cal-timeline-table__cell-cushion e-cal-timeline-table__cell-cushion-content',
1581
+ 'custom-event-tl-table__cell-cushion custom-event-tl-table__cell-cushion-content',
1366
1582
  {
1367
1583
  'disabled': !isInteractive
1368
1584
  }
@@ -1377,7 +1593,7 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
1377
1593
  {/* ADD BUTTON */}
1378
1594
  {isForward || isBack ? null : <>
1379
1595
  <div
1380
- className={`e-cal-timeline__day__eventadd ${cellAddBtnClassName || ''}`}
1596
+ className={`custom-event-tl__day__eventadd ${cellAddBtnClassName || ''}`}
1381
1597
  >
1382
1598
  <a
1383
1599
  href="#"
@@ -1413,6 +1629,10 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
1413
1629
  id: 0,
1414
1630
  date: _dateShow
1415
1631
  }, () => setShowEdit(true), 'new');
1632
+
1633
+ // set temporary date
1634
+ setTempDate(_dateShow);
1635
+
1416
1636
  }
1417
1637
  }
1418
1638
  }}
@@ -1485,7 +1705,8 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
1485
1705
  // colIndex
1486
1706
  let colIndex = 0;
1487
1707
 
1488
- return getCells().map((item: any, j: number) => {
1708
+ const {forwardFillTotal, list: cellsList} = getCells();
1709
+ return cellsList.map((item: any, j: number) => {
1489
1710
  return item.col.map((dayIndex: number | null, i: number) => {
1490
1711
 
1491
1712
  colIndex++;
@@ -1576,8 +1797,8 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
1576
1797
  const tableGridEl: any = tableGridRef.current;
1577
1798
 
1578
1799
  // initialize cell height
1579
- const headerTitleTrElements = tableGridEl.querySelector('.e-cal-timeline-table__datagrid-body__title tbody').getElementsByTagName('tr');
1580
- const trElements = tableGridEl.querySelector('.e-cal-timeline-table__datagrid-body__content tbody').getElementsByTagName('tr');
1800
+ const headerTitleTrElements = tableGridEl.querySelector('.custom-event-tl-table__datagrid-body__title tbody').getElementsByTagName('tr');
1801
+ const trElements = tableGridEl.querySelector('.custom-event-tl-table__datagrid-body__content tbody').getElementsByTagName('tr');
1581
1802
 
1582
1803
  for (let i = 0; i < headerTitleTrElements.length; i++) {
1583
1804
 
@@ -1596,9 +1817,10 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
1596
1817
  //
1597
1818
  if (tableGridRef.current === null) return;
1598
1819
 
1820
+ const {forwardFillTotal, list: cellsList} = getCells();
1599
1821
  const tableGridEl: any = tableGridRef.current;
1600
1822
  let _curCellMinWidth: number = CELL_MIN_W;
1601
- let _curColCount: number = FILL_BLANK_DATE_DISABLD ? days[month] : 7 * getCells().length;
1823
+ let _curColCount: number = FILL_BLANK_DATE_DISABLD ? days[month] : 7 * cellsList.length;
1602
1824
 
1603
1825
 
1604
1826
  if (appearanceMode === 'week') {
@@ -1613,8 +1835,8 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
1613
1835
  //--------------
1614
1836
  if (appearanceMode === 'week') {
1615
1837
  const tableMaxWidth = tableGridEl.clientWidth;
1616
- const tableHeaderTitleWidth = tableGridEl.querySelector('.e-cal-timeline-table__cell-cushion-headertitle').clientWidth;
1617
- const tableDividerWidth = tableGridEl.querySelector('.e-cal-timeline-table__timeline-divider').clientWidth;
1838
+ const tableHeaderTitleWidth = tableGridEl.querySelector('.custom-event-tl-table__cell-cushion-headertitle').clientWidth;
1839
+ const tableDividerWidth = tableGridEl.querySelector('.custom-event-tl-table__timeline-divider').clientWidth;
1618
1840
  const tableBorderWidth = 4;
1619
1841
  const scrollMaxWidth = tableMaxWidth - tableHeaderTitleWidth - tableDividerWidth - tableBorderWidth;
1620
1842
 
@@ -1622,7 +1844,7 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
1622
1844
  _curColCount = 7;
1623
1845
 
1624
1846
  // header
1625
- tableGridEl.querySelectorAll('.e-cal-timeline-table__cell-cushion-headercontent__container, .e-cal-timeline-table__cell-cushion-content').forEach((node: HTMLDivElement) => {
1847
+ tableGridEl.querySelectorAll('.custom-event-tl-table__cell-cushion-headercontent__container, .custom-event-tl-table__cell-cushion-content').forEach((node: HTMLDivElement) => {
1626
1848
  node.style.width = _curCellMinWidth + 'px';
1627
1849
  });
1628
1850
 
@@ -1646,20 +1868,20 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
1646
1868
  //****************
1647
1869
  // initialize "header & main" cells
1648
1870
  //--------------
1649
- const headerThContentContainers: any = tableGridEl.querySelector('.e-cal-timeline-table__datagrid-header__content tbody').getElementsByTagName('th');
1871
+ const headerThContentContainers: any = tableGridEl.querySelector('.custom-event-tl-table__datagrid-header__content tbody').getElementsByTagName('th');
1650
1872
  for (let i = 0; i < headerThContentContainers.length; i++) {
1651
- const curHeaderThContent = headerThContentContainers[i].querySelector('.e-cal-timeline-table__cell-cushion-headercontent');
1873
+ const curHeaderThContent = headerThContentContainers[i].querySelector('.custom-event-tl-table__cell-cushion-headercontent');
1652
1874
  if (curHeaderThContent !== null) curHeaderThContent.style.width = _curCellMinWidth + 'px';
1653
1875
  }
1654
1876
 
1655
1877
 
1656
- const mainTdContentContainers: any = tableGridEl.querySelector('.e-cal-timeline-table__datagrid-body__content tbody').getElementsByTagName('td');
1878
+ const mainTdContentContainers: any = tableGridEl.querySelector('.custom-event-tl-table__datagrid-body__content tbody').getElementsByTagName('td');
1657
1879
  for (let i = 0; i < mainTdContentContainers.length; i++) {
1658
- const curHeaderThContent = mainTdContentContainers[i].querySelector('.e-cal-timeline-table__cell-cushion-content');
1880
+ const curHeaderThContent = mainTdContentContainers[i].querySelector('.custom-event-tl-table__cell-cushion-content');
1659
1881
  if (curHeaderThContent !== null) curHeaderThContent.style.width = _curCellMinWidth + 'px';
1660
1882
  }
1661
1883
 
1662
- const mainTdContentCols: any = tableGridEl.querySelector('.e-cal-timeline-table__datagrid-body__content colgroup').getElementsByTagName('col')
1884
+ const mainTdContentCols: any = tableGridEl.querySelector('.custom-event-tl-table__datagrid-body__content colgroup').getElementsByTagName('col')
1663
1885
  for (let i = 0; i < mainTdContentCols.length; i++) {
1664
1886
  mainTdContentCols[i].style.minWidth = _curCellMinWidth + 'px';
1665
1887
  }
@@ -1670,22 +1892,22 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
1670
1892
  //****************
1671
1893
  // initialize scrollable wrapper (width)
1672
1894
  //--------------
1673
- const _scrollableWrapper: HTMLElement[] = tableGridEl.querySelectorAll('.e-cal-timeline-table__scroller-harness');
1895
+ const _scrollableWrapper: HTMLElement[] = tableGridEl.querySelectorAll('.custom-event-tl-table__scroller-harness');
1674
1896
  [].slice.call(_scrollableWrapper).forEach((el: any) => {
1675
1897
  const scrollType = el.dataset.scroll;
1676
1898
 
1677
1899
  if (appearanceMode === 'week') {
1678
- el.classList.add('e-cal-timeline-table__scroller-harness--hideX');
1900
+ el.classList.add('custom-event-tl-table__scroller-harness--hideX');
1679
1901
  }
1680
1902
  if (appearanceMode === 'month') {
1681
- el.classList.remove('e-cal-timeline-table__scroller-harness--hideX');
1903
+ el.classList.remove('custom-event-tl-table__scroller-harness--hideX');
1682
1904
  }
1683
1905
 
1684
1906
  if (scrollType !== 'list') {
1685
- const _content = el.querySelector('.e-cal-timeline-table__scroller');
1907
+ const _content = el.querySelector('.custom-event-tl-table__scroller');
1686
1908
  const tableMaxWidth = tableGridEl.clientWidth;
1687
- const tableHeaderTitleWidth = tableGridEl.querySelector('.e-cal-timeline-table__cell-cushion-headertitle').clientWidth;
1688
- const tableDividerWidth = tableGridEl.querySelector('.e-cal-timeline-table__timeline-divider').clientWidth;
1909
+ const tableHeaderTitleWidth = tableGridEl.querySelector('.custom-event-tl-table__cell-cushion-headertitle').clientWidth;
1910
+ const tableDividerWidth = tableGridEl.querySelector('.custom-event-tl-table__timeline-divider').clientWidth;
1689
1911
  const tableBorderWidth = 4;
1690
1912
  const scrollMaxWidth = tableMaxWidth - tableHeaderTitleWidth - tableDividerWidth - tableBorderWidth;
1691
1913
 
@@ -1702,14 +1924,14 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
1702
1924
  //****************
1703
1925
  // initialize cell width
1704
1926
  //--------------
1705
- const tdElementMaxWidth: number = typeof mainTdContentContainers[0] === 'undefined' ? 0 : parseFloat(window.getComputedStyle(mainTdContentContainers[0].querySelector('.e-cal-timeline-table__cell-cushion-content')).maxWidth);
1927
+ const tdElementMaxWidth: number = typeof mainTdContentContainers[0] === 'undefined' ? 0 : parseFloat(window.getComputedStyle(mainTdContentContainers[0].querySelector('.custom-event-tl-table__cell-cushion-content')).maxWidth);
1706
1928
 
1707
1929
 
1708
1930
  if (Array.isArray(eventsValue) && eventsValue.length > 0) {
1709
1931
 
1710
1932
  for (let i = 0; i < headerThContentContainers.length; i++) {
1711
1933
 
1712
- const curHeaderThContent = headerThContentContainers[i].querySelector('.e-cal-timeline-table__cell-cushion-headercontent');
1934
+ const curHeaderThContent = headerThContentContainers[i].querySelector('.custom-event-tl-table__cell-cushion-headercontent');
1713
1935
  const curHeaderThContentMaxWidth = parseFloat(window.getComputedStyle(curHeaderThContent).width);
1714
1936
  const targetElement = headerThContentContainers[i].offsetWidth > mainTdContentContainers[i].offsetWidth ? headerThContentContainers[i] : mainTdContentContainers[i];
1715
1937
  let tdOwidth = parseFloat(window.getComputedStyle(targetElement).width);
@@ -1729,7 +1951,7 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
1729
1951
  tdOwidth = tdOwidth - 1;
1730
1952
 
1731
1953
 
1732
- headerThContentContainers[i].querySelector('.e-cal-timeline-table__cell-cushion-headercontent').style.width = tdOwidth + 'px';
1954
+ headerThContentContainers[i].querySelector('.custom-event-tl-table__cell-cushion-headercontent').style.width = tdOwidth + 'px';
1733
1955
  mainTdContentCols[i].style.minWidth = tdOwidth + 'px';
1734
1956
 
1735
1957
 
@@ -1743,7 +1965,7 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
1743
1965
  // initialize max width of table content
1744
1966
  //--------------
1745
1967
  if (scrollBodyRef.current !== null && scrollHeaderRef.current !== null) {
1746
- const tableContentWidth = window.getComputedStyle(tableGridEl.querySelector('.e-cal-timeline-table__datagrid-body__content')).width;
1968
+ const tableContentWidth = window.getComputedStyle(tableGridEl.querySelector('.custom-event-tl-table__datagrid-body__content')).width;
1747
1969
  const scrollBodyEl: any = scrollBodyRef.current;
1748
1970
  const scrollHeaderEl: any = scrollHeaderRef.current;
1749
1971
 
@@ -1755,7 +1977,7 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
1755
1977
  //
1756
1978
  const tableWrapperMaxWidthLatest = tableGridEl.clientWidth;
1757
1979
  if (tableWrapperMaxWidthLatest > parseFloat(tableContentWidth)) {
1758
- tableGridEl.querySelector('.e-cal-timeline-table__timeline-table').style.width = tableContentWidth;
1980
+ tableGridEl.querySelector('.custom-event-tl-table__timeline-table').style.width = tableContentWidth;
1759
1981
  }
1760
1982
 
1761
1983
 
@@ -1804,8 +2026,8 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
1804
2026
  //--------------
1805
2027
  if (appearanceMode === 'week') {
1806
2028
  const tableMaxWidth = tableGridEl.clientWidth;
1807
- const tableHeaderTitleWidth = tableGridEl.querySelector('.e-cal-timeline-table__cell-cushion-headertitle').clientWidth;
1808
- const tableDividerWidth = tableGridEl.querySelector('.e-cal-timeline-table__timeline-divider').clientWidth;
2029
+ const tableHeaderTitleWidth = tableGridEl.querySelector('.custom-event-tl-table__cell-cushion-headertitle').clientWidth;
2030
+ const tableDividerWidth = tableGridEl.querySelector('.custom-event-tl-table__timeline-divider').clientWidth;
1809
2031
  const tableBorderWidth = 4;
1810
2032
  const scrollMaxWidth = tableMaxWidth - tableHeaderTitleWidth - tableDividerWidth - tableBorderWidth;
1811
2033
 
@@ -1813,12 +2035,12 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
1813
2035
  _curColCount = 7;
1814
2036
 
1815
2037
  // header content
1816
- tableGridEl.querySelectorAll('.e-cal-timeline-table__cell-cushion-headercontent__container, .e-cal-timeline-table__cell-cushion-headercontent').forEach((node: HTMLDivElement) => {
2038
+ tableGridEl.querySelectorAll('.custom-event-tl-table__cell-cushion-headercontent__container, .custom-event-tl-table__cell-cushion-headercontent').forEach((node: HTMLDivElement) => {
1817
2039
  node.style.width = _curCellMinWidth + 'px';
1818
2040
  });
1819
2041
 
1820
2042
  // main content
1821
- tableGridEl.querySelectorAll('.e-cal-timeline-table__cell-cushion-content').forEach((node: HTMLDivElement) => {
2043
+ tableGridEl.querySelectorAll('.custom-event-tl-table__cell-cushion-content').forEach((node: HTMLDivElement) => {
1822
2044
  node.style.width = _curCellMinWidth + 'px';
1823
2045
  });
1824
2046
 
@@ -1835,10 +2057,10 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
1835
2057
 
1836
2058
  // initialize scrollable wrapper (width & height)
1837
2059
  //--------------
1838
- const _scrollableWrapper = tableGridEl.querySelectorAll('.e-cal-timeline-table__scroller-harness');
2060
+ const _scrollableWrapper = tableGridEl.querySelectorAll('.custom-event-tl-table__scroller-harness');
1839
2061
  [].slice.call(_scrollableWrapper).forEach((el: any) => {
1840
2062
 
1841
- const _content = el.querySelector('.e-cal-timeline-table__scroller');
2063
+ const _content = el.querySelector('.custom-event-tl-table__scroller');
1842
2064
  el.removeAttribute('data-width');
1843
2065
  el.removeAttribute('style');
1844
2066
  _content.removeAttribute('style');
@@ -1847,8 +2069,8 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
1847
2069
 
1848
2070
  // initialize cell height
1849
2071
  //--------------
1850
- const headerTitleTrElements = tableGridEl.querySelector('.e-cal-timeline-table__datagrid-body__title tbody').getElementsByTagName('tr');
1851
- const trElements = tableGridEl.querySelector('.e-cal-timeline-table__datagrid-body__content tbody').getElementsByTagName('tr');
2072
+ const headerTitleTrElements = tableGridEl.querySelector('.custom-event-tl-table__datagrid-body__title tbody').getElementsByTagName('tr');
2073
+ const trElements = tableGridEl.querySelector('.custom-event-tl-table__datagrid-body__content tbody').getElementsByTagName('tr');
1852
2074
 
1853
2075
  for (let i = 0; i < headerTitleTrElements.length; i++) {
1854
2076
  headerTitleTrElements[i].removeAttribute('style');
@@ -1891,10 +2113,12 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
1891
2113
 
1892
2114
 
1893
2115
  useEffect(() => {
2116
+
2117
+ const {forwardFillTotal, list: cellsList} = getCells();
1894
2118
  if (typeof appearanceWeekTmpl === 'function') {
1895
- setDisplayWeekForHeader([getCells().at(0).dateInfo[0].date, getCells().at(-1).dateInfo[0].date]);
2119
+ setDisplayWeekForHeader([cellsList.at(0).dateInfo[0].date, cellsList.at(-1).dateInfo[0].date]);
1896
2120
  } else {
1897
- setDisplayWeekForHeader([formatToEnglishMonthDay(getCells().at(0).dateInfo[0].date), formatToEnglishMonthDay(getCells().at(-1).dateInfo[0].date)]);
2121
+ setDisplayWeekForHeader([formatToEnglishMonthDay(cellsList.at(0).dateInfo[0].date), formatToEnglishMonthDay(cellsList.at(-1).dateInfo[0].date)]);
1898
2122
  }
1899
2123
 
1900
2124
  }, [weekOffset]);
@@ -1902,7 +2126,7 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
1902
2126
  useEffect(() => {
1903
2127
 
1904
2128
  // update events value
1905
- if (Array.isArray(eventsValue) && eventsValue.length > 0) setVal(eventsValue);
2129
+ if (Array.isArray(eventsValue) && eventsValue.length > 0) setOrginalData(eventsValue);
1906
2130
 
1907
2131
  // update current today
1908
2132
  if (typeof customTodayDate !== 'undefined' && isValidDate(customTodayDate)) {
@@ -1913,17 +2137,25 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
1913
2137
  // Call a function when the list has been rendered completely
1914
2138
  onListRenderComplete?.();
1915
2139
 
2140
+ }, [eventsValue, customTodayDate, appearanceMode]);
1916
2141
 
2142
+
2143
+
2144
+ useEffect(() => {
2145
+
2146
+
2147
+ // !!!Please do not use dependencies
1917
2148
  return () => {
1918
2149
 
1919
2150
  // reset table grid
1920
2151
  tableGridReset();
1921
- }
1922
-
1923
- }, [eventsValue, customTodayDate, appearanceMode]);
1924
-
1925
2152
 
2153
+ // reset selection area
2154
+ setSelectedCells([]);
2155
+ setCopiedCells(null);
2156
+ }
1926
2157
 
2158
+ }, []);
1927
2159
  return (
1928
2160
  <>
1929
2161
 
@@ -1932,13 +2164,13 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
1932
2164
  {/*////////////////////////////////////////////////// */}
1933
2165
 
1934
2166
  <div className={combinedCls(
1935
- `e-cal-timeline__wrapper e-cal-timeline__wrapper--${appearanceMode}`,
2167
+ `custom-event-tl__wrapper custom-event-tl__wrapper--${appearanceMode}`,
1936
2168
  calendarWrapperClassName
1937
2169
  )}>
1938
2170
 
1939
2171
  {/*++++++++++++++++ MAIN ++++++++++++++++*/}
1940
- <div className="e-cal-timeline__header bg-body-tertiary">
1941
- <button tabIndex={-1} type="button" className="e-cal-timeline__btn e-cal-timeline__btn--prev" onClick={handlePrevChange}>
2172
+ <div className="custom-event-tl__header bg-body-tertiary">
2173
+ <button tabIndex={-1} type="button" className="custom-event-tl__btn custom-event-tl__btn--prev" onClick={handlePrevChange}>
1942
2174
  <svg width="20px" height="20px" viewBox="0 0 24 24" fill="none">
1943
2175
  <path d="M14.2893 5.70708C13.8988 5.31655 13.2657 5.31655 12.8751 5.70708L7.98768 10.5993C7.20729 11.3805 7.2076 12.6463 7.98837 13.427L12.8787 18.3174C13.2693 18.7079 13.9024 18.7079 14.293 18.3174C14.6835 17.9269 14.6835 17.2937 14.293 16.9032L10.1073 12.7175C9.71678 12.327 9.71678 11.6939 10.1073 11.3033L14.2893 7.12129C14.6799 6.73077 14.6799 6.0976 14.2893 5.70708Z" fill="#000" />
1944
2176
  </svg>
@@ -1946,7 +2178,7 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
1946
2178
 
1947
2179
  {/* //########## MODE: WEEK ############# */}
1948
2180
  {appearanceMode === 'week' ? <>
1949
- <div className="e-cal-timeline__header__info">
2181
+ <div className="custom-event-tl__header__info">
1950
2182
  {typeof appearanceWeekTmpl === 'function' ? <>{appearanceWeekTmpl(displayWeekForHeader[0], displayWeekForHeader[1])}</> : <>{displayWeekForHeader[0]} - {displayWeekForHeader[1]}</>}
1951
2183
  </div>
1952
2184
  </> : null}
@@ -1955,12 +2187,12 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
1955
2187
 
1956
2188
  {/* //########## MODE: MONTH ############# */}
1957
2189
  {appearanceMode === 'month' ? <>
1958
- <div className="e-cal-timeline__header__btns">
1959
- <button tabIndex={-1} type="button" className={`e-cal-timeline__btn ${winMonth ? 'active' : ''}`} onClick={handleShowWinMonth}>
2190
+ <div className="custom-event-tl__header__btns">
2191
+ <button tabIndex={-1} type="button" className={`custom-event-tl__btn ${winMonth ? 'active' : ''}`} onClick={handleShowWinMonth}>
1960
2192
  {MONTHS[month]}
1961
2193
  <svg width="12px" height="12px" viewBox="0 0 24 24"><path d="M11.178 19.569a.998.998 0 0 0 1.644 0l9-13A.999.999 0 0 0 21 5H3a1.002 1.002 0 0 0-.822 1.569l9 13z" fill="#000000" /></svg>
1962
2194
  </button>
1963
- <button tabIndex={-1} type="button" className={`e-cal-timeline__btn ${winYear ? 'active' : ''}`} onClick={handleShowWinYear}>
2195
+ <button tabIndex={-1} type="button" className={`custom-event-tl__btn ${winYear ? 'active' : ''}`} onClick={handleShowWinYear}>
1964
2196
  {year}
1965
2197
  <svg width="12px" height="12px" viewBox="0 0 24 24"><path d="M11.178 19.569a.998.998 0 0 0 1.644 0l9-13A.999.999 0 0 0 21 5H3a1.002 1.002 0 0 0-.822 1.569l9 13z" fill="#000000" /></svg>
1966
2198
  </button>
@@ -1970,7 +2202,7 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
1970
2202
 
1971
2203
 
1972
2204
 
1973
- <button tabIndex={-1} type="button" className="e-cal-timeline__btn e-cal-timeline__btn--next" onClick={handleNextChange}>
2205
+ <button tabIndex={-1} type="button" className="custom-event-tl__btn custom-event-tl__btn--next" onClick={handleNextChange}>
1974
2206
  <svg width="20px" height="20px" viewBox="0 0 24 24" fill="none">
1975
2207
  <path d="M9.71069 18.2929C10.1012 18.6834 10.7344 18.6834 11.1249 18.2929L16.0123 13.4006C16.7927 12.6195 16.7924 11.3537 16.0117 10.5729L11.1213 5.68254C10.7308 5.29202 10.0976 5.29202 9.70708 5.68254C9.31655 6.07307 9.31655 6.70623 9.70708 7.09676L13.8927 11.2824C14.2833 11.6729 14.2833 12.3061 13.8927 12.6966L9.71069 16.8787C9.32016 17.2692 9.32016 17.9023 9.71069 18.2929Z" fill="#000" />
1976
2208
  </svg>
@@ -1979,10 +2211,10 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
1979
2211
 
1980
2212
 
1981
2213
 
1982
- <div className="e-cal-timeline__body">
2214
+ <div className="custom-event-tl__body">
1983
2215
 
1984
2216
 
1985
- <div className="e-cal-timeline__row">
2217
+ <div className="custom-event-tl__row">
1986
2218
  {/* day */}
1987
2219
 
1988
2220
  {/* /day */}
@@ -1993,12 +2225,12 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
1993
2225
 
1994
2226
 
1995
2227
  {/*++++++++++++++++ MONTH SELECTION TAB ++++++++++++++++*/}
1996
- <div className={`e-cal-timeline__month-wrapper shadow p-3 mb-5 bg-body-tertiary rounded ${winMonth ? 'active' : ''}`}>
1997
- <div className="e-cal-timeline__month-container">
2228
+ <div className={`custom-event-tl__month-wrapper shadow p-3 mb-5 bg-body-tertiary rounded ${winMonth ? 'active' : ''}`}>
2229
+ <div className="custom-event-tl__month-container">
1998
2230
  {MONTHS_FULL.map((month, index) => {
1999
2231
  return <div
2000
2232
  data-month={padZero(index + 1)}
2001
- className={`e-cal-timeline__month ${selectedMonth === index ? ' selected' : ''}`}
2233
+ className={`custom-event-tl__month ${selectedMonth === index ? ' selected' : ''}`}
2002
2234
  key={month + index}
2003
2235
  onClick={() => { handleMonthChange(index) }}
2004
2236
  >{month}</div>
@@ -2008,12 +2240,12 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
2008
2240
  {/*++++++++++++++++ /MONTH SELECTION TAB ++++++++++++++++*/}
2009
2241
 
2010
2242
  {/*++++++++++++++++ YEAR SELECTION TAB ++++++++++++++++*/}
2011
- <div className={`e-cal-timeline__year-wrapper shadow p-3 mb-5 bg-body-tertiary rounded ${winYear ? 'active' : ''}`}>
2012
- <div className="e-cal-timeline__year-container bg-body-tertiary">
2243
+ <div className={`custom-event-tl__year-wrapper shadow p-3 mb-5 bg-body-tertiary rounded ${winYear ? 'active' : ''}`}>
2244
+ <div className="custom-event-tl__year-container bg-body-tertiary">
2013
2245
  {yearsArray.map((year, index) => {
2014
2246
  return <div
2015
2247
  data-year={year}
2016
- className={`e-cal-timeline__year ${selectedYear === year ? ' selected' : ''}`}
2248
+ className={`custom-event-tl__year ${selectedYear === year ? ' selected' : ''}`}
2017
2249
  key={year + index}
2018
2250
  onClick={() => { handleYearChange(year) }}
2019
2251
  >{year}</div>
@@ -2026,11 +2258,11 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
2026
2258
 
2027
2259
 
2028
2260
  {/*++++++++++++++++ TODAY SELECTION TAB ++++++++++++++++*/}
2029
- <div className="e-cal-timeline__today-wrapper p-2">
2261
+ <div className="custom-event-tl__today-wrapper p-2">
2030
2262
  <button
2031
2263
  tabIndex={-1}
2032
2264
  type="button"
2033
- className="e-cal-timeline__btn e-cal-timeline__btn--today"
2265
+ className="custom-event-tl__btn custom-event-tl__btn--today"
2034
2266
  onClick={handleTodayChange}
2035
2267
  >
2036
2268
  {langToday || 'Today'}
@@ -2040,7 +2272,7 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
2040
2272
  <button
2041
2273
  tabIndex={-1}
2042
2274
  type="button"
2043
- className={`e-cal-timeline__btn e-cal-timeline__btn--appearance ${appearanceMode === 'month' ? 'active' : ''}`}
2275
+ className={`custom-event-tl__btn custom-event-tl__btn--appearance ${appearanceMode === 'month' ? 'active' : ''}`}
2044
2276
  data-mode="month"
2045
2277
  onClick={handleAppearanceChange}
2046
2278
  >
@@ -2049,7 +2281,7 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
2049
2281
  <button
2050
2282
  tabIndex={-1}
2051
2283
  type="button"
2052
- className={`e-cal-timeline__btn e-cal-timeline__btn--appearance ${appearanceMode === 'week' ? 'active' : ''}`}
2284
+ className={`custom-event-tl__btn custom-event-tl__btn--appearance ${appearanceMode === 'week' ? 'active' : ''}`}
2053
2285
  data-mode="week"
2054
2286
  onClick={handleAppearanceChange}
2055
2287
  >
@@ -2061,31 +2293,34 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
2061
2293
  {/*++++++++++++++++ /TODAY SELECTION TAB ++++++++++++++++*/}
2062
2294
 
2063
2295
 
2064
- </div>{/* /.e-cal-timeline__wrapper */}
2296
+ </div>{/* /.custom-event-tl__wrapper */}
2065
2297
 
2066
2298
 
2067
2299
 
2068
2300
  {/*/////////////////////////////////////////////////// */}
2069
2301
  {/*//////////////////// Table Grid //////////////////// */}
2070
2302
  {/*////////////////////////////////////////////////// */}
2071
- {val.length === 0 ? null : <>
2303
+ {orginalData.length === 0 ? null : <>
2072
2304
  <div
2073
2305
  ref={tableGridRef}
2074
2306
  className={combinedCls(
2075
- `e-cal-timeline-table__timeline-table__wrapper e-cal-timeline-table__timeline-table__wrapper--${appearanceMode} invisible`,
2307
+ `custom-event-tl-table__timeline-table__wrapper custom-event-tl-table__timeline-table__wrapper--${appearanceMode} invisible`,
2076
2308
  tableWrapperClassName
2077
2309
  )}
2078
2310
  onKeyDown={(e: React.KeyboardEvent<HTMLDivElement>) => {
2079
2311
  onKeyPressed?.(e, selectedCells);
2312
+
2313
+ // Copy & Paste
2314
+ handleWrapperKeyDown(e);
2080
2315
  }}
2081
2316
  tabIndex={-1} // require "tabIndex" attribute
2082
2317
  >
2083
2318
  <table role="grid" className={combinedCls(
2084
- "e-cal-timeline-table__timeline-table",
2319
+ "custom-event-tl-table__timeline-table",
2085
2320
  tableClassName
2086
2321
  )}>
2087
2322
  <colgroup>
2088
- <col className="e-cal-timeline-table__datagrid-header" />
2323
+ <col className="custom-event-tl-table__datagrid-header" />
2089
2324
  <col />
2090
2325
  <col />
2091
2326
  </colgroup>
@@ -2099,16 +2334,16 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
2099
2334
  <tr role="presentation">
2100
2335
  <th role="presentation">
2101
2336
  {/*<!--///// HEADER LEFT //////-->*/}
2102
- <div className="e-cal-timeline-table__timeline-header e-cal-timeline-table__timeline-headertitle">
2337
+ <div className="custom-event-tl-table__timeline-header custom-event-tl-table__timeline-headertitle">
2103
2338
 
2104
- <table role="presentation" className="e-cal-timeline-table__datagrid-header__title">
2339
+ <table role="presentation" className="custom-event-tl-table__datagrid-header__title">
2105
2340
  <colgroup>
2106
2341
  <col />
2107
2342
  </colgroup>
2108
2343
  <thead role="presentation">
2109
2344
  <tr role="row">
2110
2345
  <th role="columnheader">
2111
- <div className="e-cal-timeline-table__cell-cushion e-cal-timeline-table__cell-cushion-headertitle">
2346
+ <div className="custom-event-tl-table__cell-cushion custom-event-tl-table__cell-cushion-headertitle">
2112
2347
  {tableListSectionTitle || ''}
2113
2348
  </div>
2114
2349
  </th>
@@ -2122,20 +2357,20 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
2122
2357
 
2123
2358
 
2124
2359
  </th>
2125
- <th role="presentation" className="e-cal-timeline-table__timeline-divider"><div></div></th>
2360
+ <th role="presentation" className="custom-event-tl-table__timeline-divider"><div></div></th>
2126
2361
  <th role="presentation">
2127
2362
  <div
2128
2363
  ref={scrollHeaderRef}
2129
- className="e-cal-timeline-table__scroller-harness e-cal-timeline-table__scroller-harness--hide"
2364
+ className="custom-event-tl-table__scroller-harness custom-event-tl-table__scroller-harness--hide"
2130
2365
  data-scroll="header"
2131
2366
  onScroll={syncTableScrollHeader}
2132
2367
  >
2133
- <div className="e-cal-timeline-table__scroller">
2368
+ <div className="custom-event-tl-table__scroller">
2134
2369
 
2135
2370
  {/*<!--///// HEADER RIGHT //////-->*/}
2136
- <div className="e-cal-timeline-table__timeline-header">
2371
+ <div className="custom-event-tl-table__timeline-header">
2137
2372
 
2138
- <table className="e-cal-timeline-table__datagrid-header__content e-cal-timeline-table__scrollgrid-sync-table" >
2373
+ <table className="custom-event-tl-table__datagrid-header__content custom-event-tl-table__scrollgrid-sync-table" >
2139
2374
  <tbody>
2140
2375
  <tr>
2141
2376
  {generateDaysUi()}
@@ -2157,7 +2392,7 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
2157
2392
  )}
2158
2393
  role="rowgroup"
2159
2394
  >
2160
- <tr role="presentation" className="e-cal-timeline-table__list-section">
2395
+ <tr role="presentation" className="custom-event-tl-table__list-section">
2161
2396
  <td
2162
2397
  role="presentation"
2163
2398
  className={combinedCls(
@@ -2169,7 +2404,7 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
2169
2404
  <div
2170
2405
  ref={scrollListRef}
2171
2406
  className={combinedCls(
2172
- 'e-cal-timeline-table__scroller-harness',
2407
+ 'custom-event-tl-table__scroller-harness',
2173
2408
  {
2174
2409
  'autoscroll': AUTO_SCROLL
2175
2410
  }
@@ -2177,10 +2412,10 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
2177
2412
  data-scroll="list"
2178
2413
  onScroll={syncTableScrollList}
2179
2414
  >
2180
- <div className="e-cal-timeline-table__scroller">
2415
+ <div className="custom-event-tl-table__scroller">
2181
2416
 
2182
2417
  {/*<!--///// RESOURCE LEFT //////-->*/}
2183
- <table role="presentation" className="e-cal-timeline-table__datagrid-body__title e-cal-timeline-table__scrollgrid-sync-table">
2418
+ <table role="presentation" className="custom-event-tl-table__datagrid-body__title custom-event-tl-table__scrollgrid-sync-table">
2184
2419
  <colgroup>
2185
2420
  <col />
2186
2421
  </colgroup>
@@ -2201,7 +2436,7 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
2201
2436
  <td
2202
2437
  role="presentation"
2203
2438
  className={combinedCls(
2204
- 'e-cal-timeline-table__timeline-divider',
2439
+ 'custom-event-tl-table__timeline-divider',
2205
2440
  tableListDividerClassName
2206
2441
  )}
2207
2442
  >
@@ -2218,7 +2453,7 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
2218
2453
  <div
2219
2454
  ref={scrollBodyRef}
2220
2455
  className={combinedCls(
2221
- 'e-cal-timeline-table__scroller-harness',
2456
+ 'custom-event-tl-table__scroller-harness',
2222
2457
  {
2223
2458
  'autoscroll': AUTO_SCROLL
2224
2459
  }
@@ -2230,23 +2465,22 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
2230
2465
  onMouseUp={BODY_DRAG ? handleTableDragEnd : () => { }}
2231
2466
  onMouseLeave={BODY_DRAG ? handleTableDragEnd : () => { }}
2232
2467
  >
2233
- <div className="e-cal-timeline-table__scroller">
2468
+ <div className="custom-event-tl-table__scroller">
2234
2469
  {/*<!--///// RESOURCE RIGHT //////-->*/}
2235
- <div className="e-cal-timeline-table__timeline-body">
2470
+ <div className="custom-event-tl-table__timeline-body">
2236
2471
  <table
2237
- className="e-cal-timeline-table__datagrid-body__content e-cal-timeline-table__scrollgrid-sync-table"
2472
+ className="custom-event-tl-table__datagrid-body__content custom-event-tl-table__scrollgrid-sync-table"
2238
2473
  /* Drag to activate the selection area */
2239
2474
  onMouseLeave={multipleCells ? handleTableMainMouseUp : undefined}
2240
2475
  onMouseUp={multipleCells ? handleTableMainMouseUp : undefined}
2241
2476
 
2242
-
2243
2477
  >
2244
2478
  <colgroup>
2245
2479
  {generateColUi()}
2246
2480
  </colgroup>
2247
2481
  <tbody>
2248
2482
  {/*<!-- per row -->*/}
2249
- {val.map((item: any, i: number) => {
2483
+ {orginalData.map((item: any, i: number) => {
2250
2484
 
2251
2485
  return (
2252
2486
  <tr key={i}>
@@ -2272,7 +2506,7 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
2272
2506
  </tbody>
2273
2507
  </table>
2274
2508
 
2275
- </div>{/* /.e-cal-timeline-table__timeline-table__wrapper */}
2509
+ </div>{/* /.custom-event-tl-table__timeline-table__wrapper */}
2276
2510
 
2277
2511
 
2278
2512
  </>}
@@ -2300,6 +2534,8 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
2300
2534
  setTimeout(() => {
2301
2535
  setShowDelete(false);
2302
2536
  onModalDeleteClose?.(queryItemObj());
2537
+ // set temporary date
2538
+ setTempDate('');
2303
2539
  }, 350);
2304
2540
  }}
2305
2541
  onSubmit={async (e: any, closewin: Function, data: any) => {
@@ -2336,6 +2572,8 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
2336
2572
  setTimeout(() => {
2337
2573
  setShowEdit(false);
2338
2574
  onModalEditClose?.(queryItemObj());
2575
+ // set temporary date
2576
+ setTempDate('');
2339
2577
  }, 350);
2340
2578
  }}
2341
2579
  onSubmit={async (e: any, closewin: Function, data: any) => {
@@ -2367,14 +2605,14 @@ const EventCalendarTimeline = (props: EventCalendarTimelineProps) => {
2367
2605
  <RootPortal show={true} containerClassName="EventCalendarTimeline-TooltipModal">
2368
2606
  <div
2369
2607
  ref={tableTooltipModalRef}
2370
- id={`e-cal-timeline-table__cell-tooltipwrapper-${idRes}`}
2371
- className={`e-cal-timeline-table__cell-tooltipwrapper d-inline-block ${isShowTableTooltip ? 'active' : ''}`}
2608
+ id={`custom-event-tl-table__cell-tooltipwrapper-${idRes}`}
2609
+ className={`custom-event-tl-table__cell-tooltipwrapper d-inline-block ${isShowTableTooltip ? 'active' : ''}`}
2372
2610
  role="tooltip"
2373
2611
  data-microtip-position={tableTooltipDirection || 'bottom'}
2374
2612
  data-microtip-size={tableTooltipSize || 'auto'}
2375
2613
  style={{ display: 'none' }}
2376
2614
  >
2377
- <div className="e-cal-timeline-table__cell-tooltipcontent">
2615
+ <div className="custom-event-tl-table__cell-tooltipcontent">
2378
2616
  {tableTooltipContent}
2379
2617
  </div>
2380
2618
  </div>