@@ -205,9 +205,14 @@ export const Wrapper = styled.div<{
205205 flex-direction: inherit;
206206 }
207207 .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 } ;
209210 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+ ) } ;
211216 }
212217 .fc-daygrid-day-events {
213218 padding: 1px 0 5px 0;
@@ -330,7 +335,8 @@ export const Wrapper = styled.div<{
330335 height: 20px;
331336 padding-left: 15px;
332337 font-weight: 500;
333- background-color: ${ ( props ) => lightenColor ( props . $style . background , 0.1 ) } ;
338+ background-color: ${ ( props ) =>
339+ lightenColor ( props . $style . background , 0.1 ) } ;
334340 }
335341 }
336342 }
@@ -368,7 +374,7 @@ export const Wrapper = styled.div<{
368374 }
369375 &:hover {
370376 .event-remove {
371- opacity: ${ ( props ) => props . $editable ? 1 : undefined } ;
377+ opacity: ${ ( props ) => ( props . $editable ? 1 : undefined ) } ;
372378 }
373379 }
374380 }
@@ -398,15 +404,17 @@ export const Wrapper = styled.div<{
398404 // border-radius, bg
399405 .fc-theme-standard .fc-list {
400406 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 } ` } ;
402409 border-color: ${ ( props ) => props . $style . border } ;
403410 border-top-color: ${ ( props ) =>
404411 toHex ( props . $style . border ) === "#D7D9E0"
405412 ? "#E1E3EB"
406413 : lightenColor ( props . $style . border , 0.03 ) } ;
407414 }
408415 .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 } ` } ;
410418 overflow: hidden;
411419 border-right-width: 1px;
412420 border-bottom-width: 1px;
@@ -459,7 +467,8 @@ export const Wrapper = styled.div<{
459467 margin-bottom: 0;
460468 border: 1px solid ${ ( props ) => props . $style . border } ;
461469 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` } ;
463472 background-color: ${ ( props ) => props . $style . background } ;
464473 }
465474 .fc-toolbar-title {
@@ -488,7 +497,9 @@ export const Wrapper = styled.div<{
488497 border-color: ${ ( props ) =>
489498 toHex ( props . $style . headerBtnBackground ) === "#FFFFFF"
490499 ? "#D7D9E0"
491- : backgroundToBorder ( genHoverColor ( props . $style . headerBtnBackground ) ) } ;
500+ : backgroundToBorder (
501+ genHoverColor ( props . $style . headerBtnBackground )
502+ ) } ;
492503 }
493504 }
494505 &:not(:disabled):focus {
@@ -500,7 +511,8 @@ export const Wrapper = styled.div<{
500511 &,
501512 &:hover {
502513 background-color: ${ ( props ) => props . $style . headerBtnBackground } ;
503- border-color: ${ ( props ) => backgroundToBorder ( props . $style . headerBtnBackground ) } ;
514+ border-color: ${ ( props ) =>
515+ backgroundToBorder ( props . $style . headerBtnBackground ) } ;
504516 color: ${ ( props ) =>
505517 toHex ( props . $style . btnText ) === "#222222"
506518 ? "#B8B9BF"
@@ -518,7 +530,8 @@ export const Wrapper = styled.div<{
518530 font-size: 14px;
519531 margin-left: 8px;
520532 background-color: ${ ( props ) => props . $style . headerBtnBackground } ;
521- border-color: ${ ( props ) => backgroundToBorder ( props . $style . headerBtnBackground ) } ;
533+ border-color: ${ ( props ) =>
534+ backgroundToBorder ( props . $style . headerBtnBackground ) } ;
522535 color: ${ ( props ) => props . $style . btnText } ;
523536 &.fc-today-button {
524537 min-width: 52px;
@@ -538,8 +551,8 @@ export const Wrapper = styled.div<{
538551 toHex ( props . $style . headerBtnBackground ) === "#FFFFFF"
539552 ? "#EFEFF1"
540553 : 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 ) } ;
543556 border-radius: 4px;
544557 margin-left: 16px;
545558 .fc-button-primary {
@@ -585,10 +598,13 @@ export const Wrapper = styled.div<{
585598 }
586599 .fc-day-today.fc-col-header-cell {
587600 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" } ;
589604 a {
590605 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 ) } ;
592608 }
593609 }
594610 .fc-col-header-cell-cushion {
@@ -649,7 +665,8 @@ export const Event = styled.div<{
649665 box-shadow: ${ ( props ) => ! props . isList && "0 0 5px 0 rgba(0, 0, 0, 0.15)" } ;
650666 border: 1px solid ${ ( props ) => props . $style . border } ;
651667 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 ) } ;
653670 overflow: hidden;
654671 font-size: 13px;
655672 line-height: 19px;
@@ -671,7 +688,9 @@ export const Event = styled.div<{
671688 .event-time {
672689 color: ${ ( props ) =>
673690 ! 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 ) } ;
675694 margin-left: 15px;
676695 white-space: pre-wrap;
677696 margin-top: 2px;
@@ -710,14 +729,15 @@ export const Event = styled.div<{
710729 }
711730 }
712731 &.past {
713- background-color: ${ ( props ) => isDarkColor ( props . $style . background ) && props . $style . background } ;
732+ background-color: ${ ( props ) =>
733+ isDarkColor ( props . $style . background ) && props . $style . background } ;
714734 &::before {
715735 background-color: ${ ( props ) =>
716736 toHex ( props . $style . text ) === "#3C3C3C"
717737 ? "#8B8FA3"
718738 : 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 } ;
721741 }
722742 &::before,
723743 .event-title,
@@ -758,9 +778,34 @@ export enum ViewType {
758778 WEEK = "timeGridWeek" ,
759779 DAY = "timeGridDay" ,
760780 LIST = "listWeek" ,
781+ TIMEGRID = "timeGridDay" ,
761782}
762783
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 = [
764809 {
765810 label : trans ( "calendar.month" ) ,
766811 value : "dayGridMonth" ,
@@ -815,7 +860,7 @@ export const defaultData = [
815860 id : "1" ,
816861 title : "Coding" ,
817862 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 ) ,
819864 color : "#079968" ,
820865 } ,
821866 {
@@ -831,6 +876,7 @@ export const buttonText = {
831876 today : trans ( "calendar.today" ) ,
832877 month : trans ( "calendar.month" ) ,
833878 week : trans ( "calendar.week" ) ,
879+ timeline : trans ( "calendar.timeline" ) ,
834880 day : trans ( "calendar.day" ) ,
835881 list : trans ( "calendar.list" ) ,
836882} ;
@@ -843,7 +889,9 @@ export const headerToolbar = {
843889const weekHeadContent = ( info : DayHeaderContentArg ) => {
844890 const text = info . text . split ( " " ) ;
845891 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+ } ">
847895 <span class="week">${ text [ 0 ] } </span>
848896 <span class="day">${ text [ 1 ] } </span>
849897 </span>` ,
0 commit comments