@@ -205,9 +205,14 @@ export const Wrapper = styled.div<{
205
205
flex-direction: inherit;
206
206
}
207
207
.fc-day-today .fc-daygrid-day-number {
208
- background-color: ${ ( props ) => props . $theme ?. primary ? props . $theme . primary : props . $style . background } ;
208
+ background-color: ${ ( props ) =>
209
+ props . $theme ?. primary ? props . $theme . primary : props . $style . background } ;
209
210
color: ${ ( props ) =>
210
- contrastText ( props . $theme ?. primary || "" , props . $theme ?. textDark || "#000000" , props . $theme ?. textLight || "#ffffff" ) } ;
211
+ contrastText (
212
+ props . $theme ?. primary || "" ,
213
+ props . $theme ?. textDark || "#000000" ,
214
+ props . $theme ?. textLight || "#ffffff"
215
+ ) } ;
211
216
}
212
217
.fc-daygrid-day-events {
213
218
padding: 1px 0 5px 0;
@@ -330,7 +335,8 @@ export const Wrapper = styled.div<{
330
335
height: 20px;
331
336
padding-left: 15px;
332
337
font-weight: 500;
333
- background-color: ${ ( props ) => lightenColor ( props . $style . background , 0.1 ) } ;
338
+ background-color: ${ ( props ) =>
339
+ lightenColor ( props . $style . background , 0.1 ) } ;
334
340
}
335
341
}
336
342
}
@@ -368,7 +374,7 @@ export const Wrapper = styled.div<{
368
374
}
369
375
&:hover {
370
376
.event-remove {
371
- opacity: ${ ( props ) => props . $editable ? 1 : undefined } ;
377
+ opacity: ${ ( props ) => ( props . $editable ? 1 : undefined ) } ;
372
378
}
373
379
}
374
380
}
@@ -398,15 +404,17 @@ export const Wrapper = styled.div<{
398
404
// border-radius, bg
399
405
.fc-theme-standard .fc-list {
400
406
background-color: ${ ( props ) => props . $style . background } ;
401
- border-radius: ${ ( props ) => `0 0 ${ props . $style . radius } ${ props . $style . radius } ` } ;
407
+ border-radius: ${ ( props ) =>
408
+ `0 0 ${ props . $style . radius } ${ props . $style . radius } ` } ;
402
409
border-color: ${ ( props ) => props . $style . border } ;
403
410
border-top-color: ${ ( props ) =>
404
411
toHex ( props . $style . border ) === "#D7D9E0"
405
412
? "#E1E3EB"
406
413
: lightenColor ( props . $style . border , 0.03 ) } ;
407
414
}
408
415
.fc-scrollgrid-liquid {
409
- border-radius: ${ ( props ) => `0 0 ${ props . $style . radius } ${ props . $style . radius } ` } ;
416
+ border-radius: ${ ( props ) =>
417
+ `0 0 ${ props . $style . radius } ${ props . $style . radius } ` } ;
410
418
overflow: hidden;
411
419
border-right-width: 1px;
412
420
border-bottom-width: 1px;
@@ -459,7 +467,8 @@ export const Wrapper = styled.div<{
459
467
margin-bottom: 0;
460
468
border: 1px solid ${ ( props ) => props . $style . border } ;
461
469
border-bottom: none;
462
- border-radius: ${ ( props ) => `${ props . $style . radius } ${ props . $style . radius } 0 0` } ;
470
+ border-radius: ${ ( props ) =>
471
+ `${ props . $style . radius } ${ props . $style . radius } 0 0` } ;
463
472
background-color: ${ ( props ) => props . $style . background } ;
464
473
}
465
474
.fc-toolbar-title {
@@ -488,7 +497,9 @@ export const Wrapper = styled.div<{
488
497
border-color: ${ ( props ) =>
489
498
toHex ( props . $style . headerBtnBackground ) === "#FFFFFF"
490
499
? "#D7D9E0"
491
- : backgroundToBorder ( genHoverColor ( props . $style . headerBtnBackground ) ) } ;
500
+ : backgroundToBorder (
501
+ genHoverColor ( props . $style . headerBtnBackground )
502
+ ) } ;
492
503
}
493
504
}
494
505
&:not(:disabled):focus {
@@ -500,7 +511,8 @@ export const Wrapper = styled.div<{
500
511
&,
501
512
&:hover {
502
513
background-color: ${ ( props ) => props . $style . headerBtnBackground } ;
503
- border-color: ${ ( props ) => backgroundToBorder ( props . $style . headerBtnBackground ) } ;
514
+ border-color: ${ ( props ) =>
515
+ backgroundToBorder ( props . $style . headerBtnBackground ) } ;
504
516
color: ${ ( props ) =>
505
517
toHex ( props . $style . btnText ) === "#222222"
506
518
? "#B8B9BF"
@@ -518,7 +530,8 @@ export const Wrapper = styled.div<{
518
530
font-size: 14px;
519
531
margin-left: 8px;
520
532
background-color: ${ ( props ) => props . $style . headerBtnBackground } ;
521
- border-color: ${ ( props ) => backgroundToBorder ( props . $style . headerBtnBackground ) } ;
533
+ border-color: ${ ( props ) =>
534
+ backgroundToBorder ( props . $style . headerBtnBackground ) } ;
522
535
color: ${ ( props ) => props . $style . btnText } ;
523
536
&.fc-today-button {
524
537
min-width: 52px;
@@ -538,8 +551,8 @@ export const Wrapper = styled.div<{
538
551
toHex ( props . $style . headerBtnBackground ) === "#FFFFFF"
539
552
? "#EFEFF1"
540
553
: isDarkColor ( props . $style . headerBtnBackground )
541
- ? props . $style . headerBtnBackground
542
- : darkenColor ( props . $style . headerBtnBackground , 0.1 ) } ;
554
+ ? props . $style . headerBtnBackground
555
+ : darkenColor ( props . $style . headerBtnBackground , 0.1 ) } ;
543
556
border-radius: 4px;
544
557
margin-left: 16px;
545
558
.fc-button-primary {
@@ -585,10 +598,13 @@ export const Wrapper = styled.div<{
585
598
}
586
599
.fc-day-today.fc-col-header-cell {
587
600
background-color: ${ ( props ) =>
588
- isDarkColor ( props . $style . background ) ? "#ffffff19" : toHex ( props . $theme ?. primary ! ) + "19" } ;
601
+ isDarkColor ( props . $style . background )
602
+ ? "#ffffff19"
603
+ : toHex ( props . $theme ?. primary ! ) + "19" } ;
589
604
a {
590
605
color: ${ ( props ) =>
591
- ! isDarkColor ( props . $style . background ) && darkenColor ( props . $theme ?. primary ! , 0.1 ) } ;
606
+ ! isDarkColor ( props . $style . background ) &&
607
+ darkenColor ( props . $theme ?. primary ! , 0.1 ) } ;
592
608
}
593
609
}
594
610
.fc-col-header-cell-cushion {
@@ -649,7 +665,8 @@ export const Event = styled.div<{
649
665
box-shadow: ${ ( props ) => ! props . isList && "0 0 5px 0 rgba(0, 0, 0, 0.15)" } ;
650
666
border: 1px solid ${ ( props ) => props . $style . border } ;
651
667
display: ${ ( props ) => props . isList && "flex" } ;
652
- background-color: ${ ( props ) => ! props . isList && lightenColor ( props . $style . background , 0.1 ) } ;
668
+ background-color: ${ ( props ) =>
669
+ ! props . isList && lightenColor ( props . $style . background , 0.1 ) } ;
653
670
overflow: hidden;
654
671
font-size: 13px;
655
672
line-height: 19px;
@@ -671,7 +688,9 @@ export const Event = styled.div<{
671
688
.event-time {
672
689
color: ${ ( props ) =>
673
690
! props . isList &&
674
- ( isDarkColor ( props . $style . text ) ? lightenColor ( props . $style . text , 0.2 ) : props . $style . text ) } ;
691
+ ( isDarkColor ( props . $style . text )
692
+ ? lightenColor ( props . $style . text , 0.2 )
693
+ : props . $style . text ) } ;
675
694
margin-left: 15px;
676
695
white-space: pre-wrap;
677
696
margin-top: 2px;
@@ -710,14 +729,15 @@ export const Event = styled.div<{
710
729
}
711
730
}
712
731
&.past {
713
- background-color: ${ ( props ) => isDarkColor ( props . $style . background ) && props . $style . background } ;
732
+ background-color: ${ ( props ) =>
733
+ isDarkColor ( props . $style . background ) && props . $style . background } ;
714
734
&::before {
715
735
background-color: ${ ( props ) =>
716
736
toHex ( props . $style . text ) === "#3C3C3C"
717
737
? "#8B8FA3"
718
738
: isDarkColor ( props . $style . text )
719
- ? lightenColor ( props . $style . text , 0.3 )
720
- : props . $style . text } ;
739
+ ? lightenColor ( props . $style . text , 0.3 )
740
+ : props . $style . text } ;
721
741
}
722
742
&::before,
723
743
.event-title,
@@ -758,9 +778,34 @@ export enum ViewType {
758
778
WEEK = "timeGridWeek" ,
759
779
DAY = "timeGridDay" ,
760
780
LIST = "listWeek" ,
781
+ TIMEGRID = "timeGridDay" ,
761
782
}
762
783
763
- export const DefaultViewOptions = [
784
+
785
+ export const DefaultWithPremiumViewOptions = [
786
+ {
787
+ label : trans ( "calendar.month" ) ,
788
+ value : "dayGridMonth" ,
789
+ } ,
790
+ {
791
+ label : trans ( "calendar.week" ) ,
792
+ value : "timeGridWeek" ,
793
+ } ,
794
+ {
795
+ label : trans ( "calendar.timeline" ) ,
796
+ value : "resourceTimeline" ,
797
+ } ,
798
+ {
799
+ label : trans ( "calendar.day" ) ,
800
+ value : "timeGridDay" ,
801
+ } ,
802
+ {
803
+ label : trans ( "calendar.list" ) ,
804
+ value : "listWeek" ,
805
+ } ,
806
+ ] as const ;
807
+
808
+ export const DefaultWithFreeViewOptions = [
764
809
{
765
810
label : trans ( "calendar.month" ) ,
766
811
value : "dayGridMonth" ,
@@ -815,7 +860,7 @@ export const defaultData = [
815
860
id : "1" ,
816
861
title : "Coding" ,
817
862
start : dayjs ( ) . hour ( 10 ) . minute ( 0 ) . second ( 0 ) . format ( DATE_TIME_FORMAT ) ,
818
- end : dayjs ( ) . hour ( 11 ) . minute ( 30 ) . second ( 0 ) . format ( DATE_TIME_FORMAT ) ,
863
+ end : dayjs ( ) . hour ( 12 ) . minute ( 30 ) . second ( 0 ) . format ( DATE_TIME_FORMAT ) ,
819
864
color : "#079968" ,
820
865
} ,
821
866
{
@@ -831,6 +876,7 @@ export const buttonText = {
831
876
today : trans ( "calendar.today" ) ,
832
877
month : trans ( "calendar.month" ) ,
833
878
week : trans ( "calendar.week" ) ,
879
+ timeline : trans ( "calendar.timeline" ) ,
834
880
day : trans ( "calendar.day" ) ,
835
881
list : trans ( "calendar.list" ) ,
836
882
} ;
@@ -843,7 +889,9 @@ export const headerToolbar = {
843
889
const weekHeadContent = ( info : DayHeaderContentArg ) => {
844
890
const text = info . text . split ( " " ) ;
845
891
return {
846
- html : `<span class="week-head ${ info . isPast && "past" } ${ info . isToday && "today" } ">
892
+ html : `<span class="week-head ${ info . isPast && "past" } ${
893
+ info . isToday && "today"
894
+ } ">
847
895
<span class="week">${ text [ 0 ] } </span>
848
896
<span class="day">${ text [ 1 ] } </span>
849
897
</span>` ,
0 commit comments