Skip to content

Commit 47d7e17

Browse files
committed
Deprecate custom action views for Filament v4
Replaced the contents of several custom action Blade views with deprecation comments, indicating they are no longer needed with Filament v4. This prepares the codebase for compatibility with the new version and signals to developers that these files are obsolete.
1 parent a534833 commit 47d7e17

File tree

6 files changed

+6
-324
lines changed

6 files changed

+6
-324
lines changed
Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1 @@
1-
<x-filament-tree::actions.action
2-
:action="$action"
3-
dynamic-component="filament::button"
4-
:outlined="$isOutlined()"
5-
:labeled-from="$getLabeledFromBreakpoint()"
6-
:icon-position="$getIconPosition()"
7-
:icon-size="$getIconSize()"
8-
class="filament-tree-button-action"
9-
>
10-
{{ $getLabel() }}
11-
</x-filament-tree::actions.action>
12-
1+
{{-- Deprecated with filament v4 --}}
Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1 @@
1-
<x-filament-actions::group
2-
:actions="$getActions()"
3-
:dark-mode="config('filament.dark_mode')"
4-
:color="$getColor()"
5-
:icon="$getIcon()"
6-
:label="$getLabel()"
7-
:size="$getSize()"
8-
:tooltip="$getTooltip()"
9-
/>
1+
{{-- Deprecated with filament v4 --}}
Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1 @@
1-
<x-filament-tree::actions.action
2-
:action="$action"
3-
dynamic-component="filament::dropdown.list.item"
4-
:icon="$getGroupedIcon()"
5-
class="filament-grouped-action"
6-
>
7-
{{ $getLabel() }}
8-
</x-filament-tree::actions.action>
1+
{{-- Deprecated with filament v4 --}}
Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1 @@
1-
<x-filament-tree::actions.action
2-
:action="$action"
3-
:label="$getLabel()"
4-
dynamic-component="filament::icon-button"
5-
class="filament-tree-icon-button-action"
6-
/>
1+
{{-- Deprecated with filament v4 --}}
Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1 @@
1-
<x-filament-tree::actions.action
2-
:action="$action"
3-
dynamic-component="filament::link"
4-
:icon-position="$getIconPosition()"
5-
:icon-size="$getIconSize()"
6-
class="filament-tree-link-action"
7-
>
8-
{{ $getLabel() }}
9-
</x-filament-tree::actions.action>
1+
{{-- Deprecated with filament v4 --}}
Lines changed: 1 addition & 280 deletions
Original file line numberDiff line numberDiff line change
@@ -1,280 +1 @@
1-
@if ($this instanceof \Filament\Actions\Contracts\HasActions && (! $this->hasActionsModalRendered))
2-
<form wire:submit.prevent="callMountedAction">
3-
@php
4-
$action = $this->getMountedAction();
5-
@endphp
6-
7-
<x-filament::modal
8-
:alignment="$action?->getModalAlignment()"
9-
:close-button="$action?->hasModalCloseButton()"
10-
:close-by-clicking-away="$action?->isModalClosedByClickingAway()"
11-
:description="$action?->getModalDescription()"
12-
display-classes="block"
13-
:footer-actions="$action?->getVisibleModalFooterActions()"
14-
:footer-actions-alignment="$action?->getModalFooterActionsAlignment()"
15-
:heading="$action?->getModalHeading()"
16-
:icon="$action?->getModalIcon()"
17-
:icon-color="$action?->getModalIconColor()"
18-
:id="$this->getId() . '-action'"
19-
:slide-over="$action?->isModalSlideOver()"
20-
:sticky-footer="$action?->isModalFooterSticky()"
21-
:sticky-header="$action?->isModalHeaderSticky()"
22-
:visible="filled($action)"
23-
:width="$action?->getModalWidth()"
24-
:wire:key="$action ? $this->getId() . '.actions.' . $action->getName() . '.modal' : null"
25-
x-on:closed-form-component-action-modal.window="if (($event.detail.id === '{{ $this->getId() }}') && $wire.mountedActions.length) open()"
26-
x-on:modal-closed.stop="
27-
const mountedActionShouldOpenModal = {{ \Illuminate\Support\Js::from($action && $this->mountedActionShouldOpenModal()) }}
28-
29-
if (! mountedActionShouldOpenModal) {
30-
return
31-
}
32-
33-
if ($wire.mountedFormComponentActions.length) {
34-
return
35-
}
36-
37-
$wire.unmountAction(false)
38-
"
39-
x-on:opened-form-component-action-modal.window="if ($event.detail.id === '{{ $this->getId() }}') close()"
40-
>
41-
@if ($action)
42-
{{ $action->getModalContent() }}
43-
44-
@if (count(($infolist = $action->getInfolist())?->getComponents() ?? []))
45-
{{ $infolist }}
46-
@elseif ($this->mountedActionHasForm())
47-
{{ $this->getMountedActionForm() }}
48-
@endif
49-
50-
{{ $action->getModalContentFooter() }}
51-
@endif
52-
</x-filament::modal>
53-
</form>
54-
55-
@php
56-
$this->hasActionsModalRendered = true;
57-
@endphp
58-
@endif
59-
60-
@if ($this instanceof \Filament\Infolists\Contracts\HasInfolists && (! $this->hasInfolistsModalRendered))
61-
<form wire:submit.prevent="callMountedInfolistAction">
62-
@php
63-
$action = $this->getMountedInfolistAction();
64-
@endphp
65-
66-
<x-filament::modal
67-
:alignment="$action?->getModalAlignment()"
68-
:close-button="$action?->hasModalCloseButton()"
69-
:close-by-clicking-away="$action?->isModalClosedByClickingAway()"
70-
:description="$action?->getModalDescription()"
71-
display-classes="block"
72-
:footer-actions="$action?->getVisibleModalFooterActions()"
73-
:footer-actions-alignment="$action?->getModalFooterActionsAlignment()"
74-
:heading="$action?->getModalHeading()"
75-
:icon="$action?->getModalIcon()"
76-
:icon-color="$action?->getModalIconColor()"
77-
:id="$this->getId() . '-infolist-action'"
78-
:slide-over="$action?->isModalSlideOver()"
79-
:sticky-footer="$action?->isModalFooterSticky()"
80-
:sticky-header="$action?->isModalHeaderSticky()"
81-
:visible="filled($action)"
82-
:width="$action?->getModalWidth()"
83-
:wire:key="$action ? $this->getId() . '.infolist.actions.' . $action->getName() . '.modal' : null"
84-
x-on:closed-form-component-action-modal.window="if (($event.detail.id === '{{ $this->getId() }}') && $wire.mountedInfolistActions.length) open()"
85-
x-on:modal-closed.stop="
86-
const mountedInfolistActionShouldOpenModal = {{ \Illuminate\Support\Js::from($action && $this->mountedInfolistActionShouldOpenModal()) }}
87-
88-
if (! mountedInfolistActionShouldOpenModal) {
89-
return
90-
}
91-
92-
if ($wire.mountedFormComponentActions.length) {
93-
return
94-
}
95-
96-
$wire.unmountInfolistAction(false)
97-
"
98-
x-on:opened-form-component-action-modal.window="if ($event.detail.id === '{{ $this->getId() }}') close()"
99-
>
100-
@if ($action)
101-
{{ $action->getModalContent() }}
102-
103-
@if (count(($infolist = $action->getInfolist())?->getComponents() ?? []))
104-
{{ $infolist }}
105-
@elseif ($this->mountedInfolistActionHasForm())
106-
{{ $this->getMountedInfolistActionForm() }}
107-
@endif
108-
109-
{{ $action->getModalContentFooter() }}
110-
@endif
111-
</x-filament::modal>
112-
</form>
113-
114-
@php
115-
$this->hasInfolistsModalRendered = true;
116-
@endphp
117-
@endif
118-
119-
@if ($this instanceof \Filament\Tables\Contracts\HasTable && (! $this->hasTableModalRendered))
120-
<form wire:submit.prevent="callMountedTableAction">
121-
@php
122-
$action = $this->getMountedTableAction();
123-
@endphp
124-
125-
<x-filament::modal
126-
:alignment="$action?->getModalAlignment()"
127-
:close-button="$action?->hasModalCloseButton()"
128-
:close-by-clicking-away="$action?->isModalClosedByClickingAway()"
129-
:description="$action?->getModalDescription()"
130-
display-classes="block"
131-
:footer-actions="$action?->getVisibleModalFooterActions()"
132-
:footer-actions-alignment="$action?->getModalFooterActionsAlignment()"
133-
:heading="$action?->getModalHeading()"
134-
:icon="$action?->getModalIcon()"
135-
:icon-color="$action?->getModalIconColor()"
136-
:id="$this->getId() . '-table-action'"
137-
:slide-over="$action?->isModalSlideOver()"
138-
:sticky-footer="$action?->isModalFooterSticky()"
139-
:sticky-header="$action?->isModalHeaderSticky()"
140-
:visible="filled($action)"
141-
:width="$action?->getModalWidth()"
142-
:wire:key="$action ? $this->getId() . '.table.actions.' . $action->getName() . '.modal' : null"
143-
x-on:closed-form-component-action-modal.window="if (($event.detail.id === '{{ $this->getId() }}') && $wire.mountedTableActions.length) open()"
144-
x-on:modal-closed.stop="
145-
const mountedTableActionShouldOpenModal = {{ \Illuminate\Support\Js::from($action && $this->mountedTableActionShouldOpenModal()) }}
146-
147-
if (! mountedTableActionShouldOpenModal) {
148-
return
149-
}
150-
151-
if ($wire.mountedFormComponentActions.length) {
152-
return
153-
}
154-
155-
$wire.unmountTableAction(false)
156-
"
157-
x-on:opened-form-component-action-modal.window="if ($event.detail.id === '{{ $this->getId() }}') close()"
158-
>
159-
@if ($action)
160-
{{ $action->getModalContent() }}
161-
162-
@if (count(($infolist = $action->getInfolist())?->getComponents() ?? []))
163-
{{ $infolist }}
164-
@elseif ($this->mountedTableActionHasForm())
165-
{{ $this->getMountedTableActionForm() }}
166-
@endif
167-
168-
{{ $action->getModalContentFooter() }}
169-
@endif
170-
</x-filament::modal>
171-
</form>
172-
173-
<form wire:submit.prevent="callMountedTableBulkAction">
174-
@php
175-
$action = $this->getMountedTableBulkAction();
176-
@endphp
177-
178-
<x-filament::modal
179-
:alignment="$action?->getModalAlignment()"
180-
:close-button="$action?->hasModalCloseButton()"
181-
:close-by-clicking-away="$action?->isModalClosedByClickingAway()"
182-
:description="$action?->getModalDescription()"
183-
display-classes="block"
184-
:footer-actions="$action?->getVisibleModalFooterActions()"
185-
:footer-actions-alignment="$action?->getModalFooterActionsAlignment()"
186-
:heading="$action?->getModalHeading()"
187-
:icon="$action?->getModalIcon()"
188-
:icon-color="$action?->getModalIconColor()"
189-
:id="$this->getId() . '-table-bulk-action'"
190-
:slide-over="$action?->isModalSlideOver()"
191-
:sticky-footer="$action?->isModalFooterSticky()"
192-
:sticky-header="$action?->isModalHeaderSticky()"
193-
:visible="filled($action)"
194-
:width="$action?->getModalWidth()"
195-
:wire:key="$action ? $this->getId() . '.table.bulk-actions.' . $action->getName() . '.modal' : null"
196-
x-on:closed-form-component-action-modal.window="if (($event.detail.id === '{{ $this->getId() }}') && $wire.mountedTableBulkAction) open()"
197-
x-on:modal-closed.stop="
198-
const mountedTableBulkActionShouldOpenModal = {{ \Illuminate\Support\Js::from($action && $this->mountedTableBulkActionShouldOpenModal()) }}
199-
200-
if (! mountedTableBulkActionShouldOpenModal) {
201-
return
202-
}
203-
204-
if ($wire.mountedFormComponentActions.length) {
205-
return
206-
}
207-
208-
$wire.mountedTableBulkAction = null
209-
"
210-
x-on:opened-form-component-action-modal.window="if ($event.detail.id === '{{ $this->getId() }}') close()"
211-
>
212-
@if ($action)
213-
{{ $action->getModalContent() }}
214-
215-
@if (count(($infolist = $action->getInfolist())?->getComponents() ?? []))
216-
{{ $infolist }}
217-
@elseif ($this->mountedTableBulkActionHasForm())
218-
{{ $this->getMountedTableBulkActionForm() }}
219-
@endif
220-
221-
{{ $action->getModalContentFooter() }}
222-
@endif
223-
</x-filament::modal>
224-
</form>
225-
226-
@php
227-
$this->hasTableModalRendered = true;
228-
@endphp
229-
@endif
230-
231-
@if (! $this->hasFormsModalRendered)
232-
@php
233-
$action = $this->getMountedFormComponentAction();
234-
@endphp
235-
236-
<form wire:submit.prevent="callMountedFormComponentAction">
237-
<x-filament::modal
238-
:alignment="$action?->getModalAlignment()"
239-
:close-button="$action?->hasModalCloseButton()"
240-
:close-by-clicking-away="$action?->isModalClosedByClickingAway()"
241-
:description="$action?->getModalDescription()"
242-
display-classes="block"
243-
:footer-actions="$action?->getVisibleModalFooterActions()"
244-
:footer-actions-alignment="$action?->getModalFooterActionsAlignment()"
245-
:heading="$action?->getModalHeading()"
246-
:icon="$action?->getModalIcon()"
247-
:icon-color="$action?->getModalIconColor()"
248-
:id="$this->getId() . '-form-component-action'"
249-
:slide-over="$action?->isModalSlideOver()"
250-
:sticky-footer="$action?->isModalFooterSticky()"
251-
:sticky-header="$action?->isModalHeaderSticky()"
252-
:visible="filled($action)"
253-
:width="$action?->getModalWidth()"
254-
:wire:key="$action ? $this->getId() . '.' . $action->getComponent()->getStatePath() . '.actions.' . $action->getName() . '.modal' : null"
255-
x-on:modal-closed.stop="
256-
const mountedFormComponentActionShouldOpenModal = {{ \Illuminate\Support\Js::from($action && $this->mountedFormComponentActionShouldOpenModal()) }}
257-
258-
if (mountedFormComponentActionShouldOpenModal) {
259-
$wire.unmountFormComponentAction(false)
260-
}
261-
"
262-
>
263-
@if ($action)
264-
{{ $action->getModalContent() }}
265-
266-
@if (count(($infolist = $action->getInfolist())?->getComponents() ?? []))
267-
{{ $infolist }}
268-
@elseif ($this->mountedFormComponentActionHasForm())
269-
{{ $this->getMountedFormComponentActionForm() }}
270-
@endif
271-
272-
{{ $action->getModalContentFooter() }}
273-
@endif
274-
</x-filament::modal>
275-
</form>
276-
277-
@php
278-
$this->hasFormsModalRendered = true;
279-
@endphp
280-
@endif
1+
{{-- Deprecated with filament v4 --}}

0 commit comments

Comments
 (0)