generated from spatie/package-skeleton-laravel
-
-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #164 from cawecoy/feature/eventDidMount
Add support for writing custom JS to interact with FullCalendar's render hooks
- Loading branch information
Showing
6 changed files
with
122 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
<?php | ||
|
||
namespace Saade\FilamentFullCalendar\Widgets\Concerns; | ||
|
||
trait InteractsWithRawJS | ||
{ | ||
/** | ||
* A ClassName Input for adding classNames to the outermost event element. | ||
* If supplied as a callback function, it is called every time the associated event data changes. | ||
* | ||
* @see https://fullcalendar.io/docs/event-render-hooks | ||
* | ||
* @return string | ||
*/ | ||
public function eventClassNames(): string | ||
{ | ||
return <<<JS | ||
null | ||
JS; | ||
} | ||
|
||
/** | ||
* A Content Injection Input. Generated content is inserted inside the inner-most wrapper of the event element. | ||
* If supplied as a callback function, it is called every time the associated event data changes. | ||
* | ||
* @see https://fullcalendar.io/docs/event-render-hooks | ||
* | ||
* @return string | ||
*/ | ||
public function eventContent(): string | ||
{ | ||
return <<<JS | ||
null | ||
JS; | ||
} | ||
|
||
/** | ||
* Called right after the element has been added to the DOM. If the event data changes, this is NOT called again. | ||
* | ||
* @see https://fullcalendar.io/docs/event-render-hooks | ||
* | ||
* @return string | ||
*/ | ||
public function eventDidMount(): string | ||
{ | ||
return <<<JS | ||
null | ||
JS; | ||
} | ||
|
||
/** | ||
* Called right before the element will be removed from the DOM. | ||
* | ||
* @see https://fullcalendar.io/docs/event-render-hooks | ||
* | ||
* @return string | ||
*/ | ||
public function eventWillUnmount(): string | ||
{ | ||
return <<<JS | ||
null | ||
JS; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters