Skip to content

Commit cf20177

Browse files
authored
V3 - Develop to Master - Toolbar splitting (#1461)
* v3 - Fix - Correct setFilter behaviour (#1451) * Fix for setFilter * Update return types --------- Co-authored-by: lrljoe <[email protected]> * Fixes for missing brackets (#1455) * v3 Toolbar - Splitting of Views/Blades (#1454) * Initial Commit - Full Split of Toolbar * Remove Confirms Code * Fix superfluous endif * Combining Blades - Stage 1 * More Merging * Bulk Actions - Icon Adjustment * Further clean up of toolbar - filter button * Stripping Toolbar Theme Distinctions * Adjust childElementOpen to respect hierachy * To remove files * Merge Column-Select into Single Blade * Clean Up Blades * Fix missing BootStrap Classes from Toolbar Blade (#1466) * Adding x-cloak where it is missing for x-show (#1463) * V3 - QueryString migration into Traits (#1465) * Initial migration of queryString to Traits * Lock $queryStringStatus * Add WithQueryString Trait * Add default queryStringStatus --------- Co-authored-by: lrljoe <[email protected]> * Update Changelog (#1467) --------- Co-authored-by: lrljoe <[email protected]>
1 parent 94b2cc9 commit cf20177

31 files changed

+861
-878
lines changed

CHANGELOG.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,17 @@
22

33
All notable changes to `laravel-livewire-tables` will be documented in this file
44

5-
## UNRELEASED
6-
- Fix for setFilter (allowing setFilter at boot/mount)
5+
## [3.0.0-beta.10] - 2023-10-27
6+
- Changes to toolbar blade structure by @lrljoe in #[1454](https://github.com/rappasoft/laravel-livewire-tables/pull/1454)
7+
- Fix queryStringEnabled by @lrljoe in #[1465](https://github.com/rappasoft/laravel-livewire-tables/pull/1465)
8+
- Add missing x-cloak by @lrljoe in #[1463](https://github.com/rappasoft/laravel-livewire-tables/pull/1463)
9+
10+
## [3.0.0-beta.9] - 2023-10-27
11+
- Fixes for missing default behaviour by @lrljoe in #[1455](https://github.com/rappasoft/laravel-livewire-tables/pull/1455)
12+
13+
## [3.0.0-beta.8] - 2023-10-26
14+
- Fix for setFilter - allows setting values at mount/boot (#1451) by @lrljoe in #[1452](https://github.com/rappasoft/laravel-livewire-tables/pull/1452)
15+
716

817
## [3.0.0-beta.7] - 2023-10-25
918
- Add wire:navigate option for clickable rows

resources/views/components/table/td/bulk-actions.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
'form-check' => $theme === 'bootstrap-5',
1111
])>
1212
<input
13-
x-show="!currentlyReorderingStatus"
13+
x-cloak x-show="!currentlyReorderingStatus"
1414
x-model="selectedItems"
1515
wire:key="{{ $tableName . 'selectedItems-'.$row->{$this->getPrimaryKey()} }}"
1616
wire:loading.attr.delay="disabled"

resources/views/components/table/td/reorder.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<x-livewire-tables::table.td.plain x-cloak x-show="currentlyReorderingStatus" wire:key="{{ $tableName }}-tbody-reorder-{{ $rowID }}" :displayMinimisedOnReorder="false">
77
<svg
8-
x-show="currentlyReorderingStatus"
8+
x-cloak x-show="currentlyReorderingStatus"
99
xmlns="http://www.w3.org/2000/svg"
1010
fill="none" stroke="currentColor"
1111
viewBox="0 0 24 24"

resources/views/components/table/td/row-contents.blade.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
>
1616
@if (! $hidden)
1717
<button
18-
x-show="!currentlyReorderingStatus"
18+
x-cloak x-show="!currentlyReorderingStatus"
1919
x-on:click.prevent="$dispatch('toggle-row-content', {'row': {{ $rowIndex }}}); open = !open"
2020
>
21-
<x-heroicon-o-plus-circle x-show="!open" class="text-green-600 h-6 w-6" />
21+
<x-heroicon-o-plus-circle x-cloak x-show="!open" class="text-green-600 h-6 w-6" />
2222
<x-heroicon-o-minus-circle x-cloak x-show="open" class="text-yellow-600 h-6 w-6" />
2323
</button>
2424
@endif
@@ -35,12 +35,12 @@
3535
>
3636
@if (! $hidden)
3737
<button
38-
x-show="!currentlyReorderingStatus"
38+
x-cloak x-show="!currentlyReorderingStatus"
3939
x-on:click.prevent="$dispatch('toggle-row-content', {'row': {{ $rowIndex }}});open = !open"
4040
class="p-0"
4141
style="background:none;border:none;"
4242
>
43-
<x-heroicon-o-plus-circle x-show="!open" class="text-success" style="width:1.4em;height:1.4em;" />
43+
<x-heroicon-o-plus-circle x-cloak x-show="!open" class="text-success" style="width:1.4em;height:1.4em;" />
4444
<x-heroicon-o-minus-circle x-cloak x-show="open" class="text-warning" style="width:1.4em;height:1.4em;" />
4545
</button>
4646
@endif

resources/views/components/table/th/bulk-actions.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<div
77
x-data="{newSelectCount: 0, indeterminateCheckbox: false, bulkActionHeaderChecked: false}"
88
x-init="$watch('selectedItems', value => indeterminateCheckbox = (value.length > 0 && value.length < paginationTotalItemCount))"
9-
x-show="currentlyReorderingStatus !== true"
9+
x-cloak x-show="currentlyReorderingStatus !== true"
1010
@class([
1111
'inline-flex rounded-md shadow-sm' => $theme === 'tailwind',
1212
'form-check' => $theme === 'bootstrap-5',
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
@aware(['component', 'tableName'])
22

33
<x-livewire-tables::table.th.plain x-cloak x-show="currentlyReorderingStatus" wire:key="{{ $tableName }}-thead-reorder" :displayMinimisedOnReorder="false">
4-
<div x-show="currentlyReorderingStatus"></div>
4+
<div x-cloak x-show="currentlyReorderingStatus"></div>
55
</x-livewire-tables::table.th.plain>

resources/views/components/table/tr/bulk-actions.blade.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010

1111
@if ($component->isTailwind())
1212
<x-livewire-tables::table.tr.plain
13-
x-cloak
14-
x-show="selectedItems.length > 0 && !currentlyReorderingStatus"
13+
x-cloak x-show="selectedItems.length > 0 && !currentlyReorderingStatus"
1514
wire:key="{{ $tableName }}-bulk-select-message"
1615
class="bg-indigo-50 dark:bg-gray-900 dark:text-white"
1716
>
@@ -76,8 +75,7 @@ class="ml-1 text-blue-600 underline text-gray-700 text-sm leading-5 font-medium
7675
</x-livewire-tables::table.tr.plain>
7776
@elseif ($component->isBootstrap())
7877
<x-livewire-tables::table.tr.plain
79-
x-cloak
80-
x-show="selectedItems.length > 0 && !currentlyReorderingStatus"
78+
x-cloak x-show="selectedItems.length > 0 && !currentlyReorderingStatus"
8179
wire:key="{{ $tableName }}-bulk-select-message"
8280
>
8381
<x-livewire-tables::table.td.plain :colspan="$colspan">

resources/views/components/tools/filter-pills.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<div @class([
66
'mb-4 px-4 md:p-0' => $component->isTailwind(),
77
'mb-3' => $component->isBootstrap(),
8-
]) x-show="!currentlyReorderingStatus">
8+
]) x-cloak x-show="!currentlyReorderingStatus">
99
<small @class([
1010
'text-gray-700 dark:text-white' => $component->isTailwind(),
1111
'' => $component->isBootstrap(),

resources/views/components/tools/sorting-pills.blade.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
@if ($component->isTailwind())
44
<div>
55
@if ($component->sortingPillsAreEnabled() && $component->hasSorts())
6-
<div class="mb-4 px-4 md:p-0" x-show="!currentlyReorderingStatus">
6+
<div class="mb-4 px-4 md:p-0" x-cloak x-show="!currentlyReorderingStatus">
77
<small class="text-gray-700 dark:text-white">@lang('Applied Sorting'):</small>
88

99
@foreach($component->getSorts() as $columnSelectName => $direction)
@@ -44,7 +44,7 @@ class="focus:outline-none active:outline-none"
4444
@elseif ($component->isBootstrap4())
4545
<div>
4646
@if ($component->sortingPillsAreEnabled() && $component->hasSorts())
47-
<div class="mb-3" x-show="!currentlyReorderingStatus">
47+
<div class="mb-3" x-cloak x-show="!currentlyReorderingStatus">
4848
<small>@lang('Applied Sorting'):</small>
4949

5050
@foreach($component->getSorts() as $columnSelectName => $direction)
@@ -84,7 +84,7 @@ class="badge badge-pill badge-light"
8484
@elseif ($component->isBootstrap5())
8585
<div>
8686
@if ($component->sortingPillsAreEnabled() && $component->hasSorts())
87-
<div class="mb-3" x-show="!currentlyReorderingStatus">
87+
<div class="mb-3" x-cloak x-show="!currentlyReorderingStatus">
8888
<small>@lang('Applied Sorting'):</small>
8989

9090
@foreach($component->getSorts() as $columnSelectName => $direction)

resources/views/components/tools/toolbar.blade.php

Lines changed: 73 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,82 @@
44
@include($component->getConfigurableAreaFor('before-toolbar'), $component->getParametersForConfigurableArea('before-toolbar'))
55
@endif
66

7-
@if ($component->isTailwind())
8-
@include('livewire-tables::components.tools.toolbar.tailwind')
9-
@elseif ($component->isBootstrap())
10-
@include('livewire-tables::components.tools.toolbar.bootstrap')
7+
<div @class([
8+
'd-md-flex justify-content-between mb-3' => $component->isBootstrap(),
9+
'md:flex md:justify-between mb-4 px-4 md:p-0' => $component->isTailwind(),
10+
])
11+
>
12+
<div @class([
13+
'd-md-flex' => $component->isBootstrap(),
14+
'w-full mb-4 md:mb-0 md:w-2/4 md:flex space-y-4 md:space-y-0 md:space-x-2' => $component->isTailwind(),
15+
])
16+
>
17+
<div x-cloak x-show="!currentlyReorderingStatus">
18+
@if ($component->hasConfigurableAreaFor('toolbar-left-start'))
19+
@include($component->getConfigurableAreaFor('toolbar-left-start'), $component->getParametersForConfigurableArea('toolbar-left-start'))
20+
@endif
21+
</div>
22+
23+
@if ($component->reorderIsEnabled())
24+
<x-livewire-tables::tools.toolbar.items.reorder-buttons />
25+
@endif
26+
27+
@if ($component->searchIsEnabled() && $component->searchVisibilityIsEnabled())
28+
<x-livewire-tables::tools.toolbar.items.search-field />
29+
@endif
30+
31+
@if ($component->filtersAreEnabled() && $component->filtersVisibilityIsEnabled() && $component->hasVisibleFilters())
32+
<x-livewire-tables::tools.toolbar.items.filter-button />
33+
@endif
34+
35+
@if ($component->hasConfigurableAreaFor('toolbar-left-end'))
36+
<div x-cloak x-show="!currentlyReorderingStatus">
37+
@include($component->getConfigurableAreaFor('toolbar-left-end'), $component->getParametersForConfigurableArea('toolbar-left-end'))
38+
</div>
39+
@endif
40+
</div>
41+
42+
<div x-cloak x-show="!currentlyReorderingStatus"
43+
@class([
44+
'd-md-flex' => $component->isBootstrap(),
45+
'md:flex md:items-center space-y-4 md:space-y-0 md:space-x-2' => $component->isTailwind(),
46+
])
47+
>
48+
@if ($component->hasConfigurableAreaFor('toolbar-right-start'))
49+
@include($component->getConfigurableAreaFor('toolbar-right-start'), $component->getParametersForConfigurableArea('toolbar-right-start'))
50+
@endif
51+
52+
@if ($component->showBulkActionsDropdownAlpine())
53+
<x-livewire-tables::tools.toolbar.items.bulk-actions />
54+
@endif
55+
56+
@if ($component->columnSelectIsEnabled() && $component->isTailwind())
57+
<x-livewire-tables::tools.toolbar.items.column-select />
58+
@elseif($component->columnSelectIsEnabled() && $component->isBootstrap())
59+
<x-livewire-tables::tools.toolbar.items.column-select />
60+
@endif
61+
62+
@if ($component->paginationIsEnabled() && $component->perPageVisibilityIsEnabled())
63+
<x-livewire-tables::tools.toolbar.items.pagination-dropdown />
64+
@endif
65+
66+
@if ($component->hasConfigurableAreaFor('toolbar-right-end'))
67+
@include($component->getConfigurableAreaFor('toolbar-right-end'), $component->getParametersForConfigurableArea('toolbar-right-end'))
68+
@endif
69+
</div>
70+
</div>
71+
@if (
72+
$component->filtersAreEnabled() &&
73+
$component->filtersVisibilityIsEnabled() &&
74+
$component->hasVisibleFilters() &&
75+
$component->isFilterLayoutSlideDown()
76+
)
77+
<x-livewire-tables::tools.toolbar.items.filter-slidedown />
1178
@endif
1279

80+
1381
@if ($component->hasConfigurableAreaFor('after-toolbar'))
14-
<div x-show="!currentlyReorderingStatus" >
82+
<div x-cloak x-show="!currentlyReorderingStatus" >
1583
@include($component->getConfigurableAreaFor('after-toolbar'), $component->getParametersForConfigurableArea('after-toolbar'))
1684
</div>
1785
@endif

0 commit comments

Comments
 (0)