Spotlight improvements:
Shift+Backspace
shortcut to delete the entire scope.wire:modal
and wire:slide-over
to prevent parallel event triggers from collidingspotlight.toggle
events to fire multiple times when using wire:navigate
You can now define a default placeholder blade view for your modal and/or slide-over when using Livewire's lazy load feature:
1<?php 2 3return [ 4 'default' => 'tailwind', 5 6 'components' => [ 7 'modal' => [ 8 'placeholder' => 'wire-elements-pro::modal.placeholder', 9 // ...10 ],11 'slide-over' => [12 'placeholder' => 'wire-elements-pro::slide-over.placeholder',13 // ...14 ]15]
abstract public function search($query): InsertQueryResults;
as this method accepts a second parameter called $scope
. Adding $scope
to the abstract function would be a breaking change so removing it instead.1<button @click="$wire.$dispatch('spotlight.toggle', { query: 'hello world' })">
$this->close(withForce: true);
from working.1<!-- Close modal or slide-over -->2<button wire:modal="close">Close</button>3<button wire:slide-over="close">Close</button>4 5<!-- Force close modal or slide-over (this will close any child components as well) -->6<button wire:modal="close, {force: true}">Close</button>7<button wire:slide-over="close", {force: true}>Close</button>
emit
. Please use dispatch
instead: 1$this->close( 2 andEmit: [] // Deprecated 3 andDispatch: [] 4); 5 6InsertQueryResult::make( 7 emit: $command['emit'], // Deprecated 8 dispatch: $command['dispatch'], 9);10 11SpotlightResult::make()12 ->setTitle('Pull Requests')13 ->setAction('emit_event', ['name' => 'slide-over.open', 'data' => ['component' => 'dummy-slide-over']]) // Deprecated14 ->setAction('dispatch_event', ['name' => 'slide-over.open', 'data' => ['component' => 'dummy-slide-over']])
Add wire:modal and wire:slide-over directives
1<button wire:modal="my-modal-component, @js(['someModelId' => $model->id])">Open</button>2<button wire:slide-over="my-slide-over-component, @js(['someModelId' => $model->id])">Open</button>
No description available for this release.
No description available for this release.
php artisan livewire:upgrade
command, this will include an automatic update process for Wire Elements Pro. If you have already used the upgrade command before, you can run the pro upgrade process manually: php artisan livewire:upgrade --run-only wire-elements-pro-upgrade
Spotlight improvements:
Shift+Backspace
shortcut to delete the entire scope. 1return [ 2 'default' => 'tailwind', 3 4 'components' => [ 5 'modal' => [ 6 'view' => 'wire-elements-pro::modal.component', 7 'property-resolvers' => [ 8 \WireElements\Pro\Components\Modal\Resolvers\EnumPropertyResolver::class, 9 ],10 // ...
You can use resolvers to resolve component properties automatically. By default, it now ships with an enum resolver:
1class MyComponent extends Modal {2 // This would previously throw a "can't assign string to" error on sequential requests3 public MyEnum $foobar;4}
component-class
will be used. For example, if you want to remove the background blur for a specific modal: 1class EditUser extends Modal 2{ 3 // ... 4 5 public static function attributes(): array 6 { 7 return [ 8 'component-class' => 'remove-background-blue' 9 ];10 }11}
Add the following to your CSS:
1.remove-background-blue .wep-modal-backdrop {2 backdrop-filter: none !important;3}
Insert component
$query
was returning a Stringable
object instead of the string)Str::of()
instead of str()
$query
was returning a Stringable
object instead of the string)No description available for this release.
Str::of()
instead of str()
div
on Spotlight component$confirmationCaller must not be accessed before initialization
error when using the InteractsWithConfirmationModal
trait on multiple components on the same page.Livewire.emit('spotlight.toggle')
No description available for this release.
__()
to make translations possible.1<textarea {{ wep_insert(['user'], [2,3,4]) }}></textarea>
1class UserInsert extends InsertType2{3 public function search($query, $scope = []): InsertQueryResults4 {5 // $scope = 2,3,46 User::whereIn('id', $scope);7 }8}
modal.close
and slide-over.close
when closing overlay component.No description available for this release.
wire-elements-pro.php
config.InsertQueryResult
.No description available for this release.