@@ -204,6 +204,7 @@ let childrenMap: any = {
204
204
currentPremiumView : dropdownControl ( DefaultWithPremiumViewOptions , "resourceTimelineDay" ) ,
205
205
animationStyle : styleControl ( AnimationStyle , 'animationStyle' ) ,
206
206
showVerticalScrollbar : withDefault ( BoolControl , false ) ,
207
+ showResourceEventsInFreeView : withDefault ( BoolControl , false ) ,
207
208
initialData : stateComp < JSONObject > ( { } ) ,
208
209
updatedEvents : stateComp < JSONObject > ( { } ) ,
209
210
insertedEvents : stateComp < JSONObject > ( { } ) ,
@@ -248,6 +249,7 @@ let CalendarBasicComp = (function () {
248
249
animationStyle ?:any ;
249
250
modalStyle ?:any ;
250
251
showVerticalScrollbar ?:boolean ;
252
+ showResourceEventsInFreeView ?: boolean ;
251
253
initialData : Array < EventType > ;
252
254
inputFormat : string ;
253
255
} , dispatch : any ) => {
@@ -291,12 +293,16 @@ let CalendarBasicComp = (function () {
291
293
] ) ;
292
294
293
295
const currentEvents = useMemo ( ( ) => {
296
+ if ( props . showResourceEventsInFreeView && Boolean ( props . licenseKey ) ) {
297
+ return props . events . filter ( ( event : { resourceId : any ; } ) => Boolean ( event . resourceId ) )
298
+ }
294
299
return currentView == "resourceTimelineDay" || currentView == "resourceTimeGridDay"
295
300
? props . events . filter ( ( event : { resourceId : any ; } ) => Boolean ( event . resourceId ) )
296
301
: props . events . filter ( ( event : { resourceId : any ; } ) => ! Boolean ( event . resourceId ) ) ;
297
302
} , [
298
303
currentView ,
299
304
props . events ,
305
+ props . showResourceEventsInFreeView ,
300
306
] )
301
307
302
308
// we use one central stack of events for all views
@@ -1072,6 +1078,7 @@ let CalendarBasicComp = (function () {
1072
1078
modalStyle : { getPropertyView : ( ) => any ; } ;
1073
1079
licenseKey : { getView : ( ) => any ; propertyView : ( arg0 : { label : string ; } ) => any ; } ;
1074
1080
showVerticalScrollbar : { propertyView : ( arg0 : { label : string ; } ) => any ; } ;
1081
+ showResourceEventsInFreeView : { propertyView : ( arg0 : { label : string ; } ) => any ; } ;
1075
1082
inputFormat : { propertyView : ( arg0 : { } ) => any ; } ;
1076
1083
} ) => {
1077
1084
const license = children . licenseKey . getView ( ) ;
@@ -1134,6 +1141,7 @@ let CalendarBasicComp = (function () {
1134
1141
: children . currentPremiumView . propertyView ( { label : trans ( "calendar.defaultView" ) , tooltip : trans ( "calendar.defaultViewTooltip" ) , } ) }
1135
1142
{ children . firstDay . propertyView ( { label : trans ( "calendar.startWeek" ) , } ) }
1136
1143
{ children . showVerticalScrollbar . propertyView ( { label : trans ( "calendar.showVerticalScrollbar" ) } ) }
1144
+ { Boolean ( license ) && children . showResourceEventsInFreeView . propertyView ( { label : trans ( "calendar.showResourceEventsInFreeView" ) } ) }
1137
1145
</ Section >
1138
1146
< Section name = { sectionNames . style } >
1139
1147
{ children . style . getPropertyView ( ) }
0 commit comments