-
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Lukas Frey <[email protected]>
- Loading branch information
1 parent
4e398a9
commit 1906d71
Showing
2 changed files
with
23 additions
and
13 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,19 +25,6 @@ public function register(Panel $panel): void | |
|
||
public function boot(Panel $panel): void | ||
{ | ||
Livewire::component('calendar-widget', CalendarWidget::class); | ||
|
||
FilamentAsset::register( | ||
assets: [ | ||
AlpineComponent::make( | ||
'calendar-widget', | ||
__DIR__ . '/../dist/js/calendar-widget.js', | ||
), | ||
Css::make('calendar-styles', 'https://cdn.jsdelivr.net/npm/@event-calendar/[email protected]/event-calendar.min.css'), | ||
Js::make('calendar-script', 'https://cdn.jsdelivr.net/npm/@event-calendar/[email protected]/event-calendar.min.js'), | ||
], | ||
package: 'guava/calendar' | ||
); | ||
} | ||
|
||
public static function make(): static | ||
|
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 |
---|---|---|
|
@@ -2,6 +2,12 @@ | |
|
||
namespace Guava\Calendar; | ||
|
||
use Filament\Support\Assets\AlpineComponent; | ||
use Filament\Support\Assets\Css; | ||
use Filament\Support\Assets\Js; | ||
use Filament\Support\Facades\FilamentAsset; | ||
use Guava\Calendar\Widgets\CalendarWidget; | ||
use Livewire\Livewire; | ||
use Spatie\LaravelPackageTools\Package; | ||
use Spatie\LaravelPackageTools\PackageServiceProvider; | ||
|
||
|
@@ -20,4 +26,21 @@ public function configurePackage(Package $package): void | |
->hasViews() | ||
; | ||
} | ||
|
||
public function packageBooted() | ||
{ | ||
Livewire::component('calendar-widget', CalendarWidget::class); | ||
|
||
FilamentAsset::register( | ||
assets: [ | ||
AlpineComponent::make( | ||
'calendar-widget', | ||
__DIR__ . '/../dist/js/calendar-widget.js', | ||
), | ||
Css::make('calendar-styles', 'https://cdn.jsdelivr.net/npm/@event-calendar/[email protected]/event-calendar.min.css'), | ||
Js::make('calendar-script', 'https://cdn.jsdelivr.net/npm/@event-calendar/[email protected]/event-calendar.min.js'), | ||
], | ||
package: 'guava/calendar' | ||
); | ||
} | ||
} |