Skip to content

Commit 7d265a3

Browse files
lrljoematzeschmittkhwadj
authored
v3.4.22 Master Release (rappasoft#1972)
* Add explanation of setRefreshMethod (rappasoft#1857) * Unlocking Entangled Items (rappasoft#1859) * Unlock properties locked in error --------- Co-authored-by: lrljoe <[email protected]> * Add dispatch on updated filter components (rappasoft#1861) * Add additional dispatch * Add FilterApplied Event * Add Filter Event Dispatch Tests --------- Co-authored-by: lrljoe <[email protected]> * v3.4.8 * Fix superfluous bulk actions tr < (rappasoft#1868) * Default useComputedProperties to False (rappasoft#1869) * Update ChangeLog * Add Action Buttons (rappasoft#1864) * Make ActionButtons An Optional Feature in Beta --------- Co-authored-by: lrljoe <[email protected]> * FixDateRangeFilter (rappasoft#1872) * Adjust Methods - useComputedProperties (rappasoft#1873) * Adjust Methods - useComputedProperties * Adjust ActionTest * Update ChangeLog * AllowDeleteDateRangeFilter (rappasoft#1875) * Fix ChangeLog * Update Docs (rappasoft#1876) * Update ChangeLog - Add Docs Update * Add setIconLeft/setIconRight (rappasoft#1877) * Add setIconLeft/setIconRight * Fix styling * Adjust Test * Adjust ActionTest --------- Co-authored-by: lrljoe <[email protected]> * Adjust ChangeLog * Adjust Action Button Icon Margin (rappasoft#1880) * Adjust Action Button Icon Margin * Adjust ChangeLog * Change Order of "Getting Started" section (rappasoft#1883) * Change Order of "Getting Started" section * Change to "UsersTable" * Add Button with No Icon (rappasoft#1887) * Add a "Recommended" approach (rappasoft#1886) * Add a "Recommended" approach * Add blurb to Recommended * v3.4.13 * Set actions position (rappasoft#1889) * Add displayActionsInToolbar and actionsPosition * Add docs and tests for setActionsInToolbar * Fix styling --------- Co-authored-by: lrljoe <[email protected]> * Update ChangeLog * Doc Type Fixes (rappasoft#1891) * Update NumberFilter and TypeHints * Update DateFilter/DateTimeFilter and ConfigurableAreasHelpers for typehints and array key exists * Add Float Test for NumberFilter * Add ColorColumn View Test * Adjust ColumnSelectConfigurationTest --------- Co-authored-by: lrljoe <[email protected]> * BooleanColumn - Toggleable Callback (rappasoft#1892) * Add Docs, Code for Toggleable Columns * Add Confirmation Option * Tweak Blade - Standardise * Add Tests for Toggleable --------- Co-authored-by: lrljoe <[email protected]> * Update ChangeLog * Enable/Disable Tools/Toolbar (rappasoft#1896) * Customised Toolbar Approach --------- Co-authored-by: lrljoe <[email protected]> * Use Computed Properties By Default (rappasoft#1898) * Fix has actions (rappasoft#1901) * Fix Action Repetitive Calling * Fix validActionsCount --------- Co-authored-by: lrljoe <[email protected]> * Add icon column (rappasoft#1902) * Initial Commit - Awaiting Docs & Tests * Tweak to IconColumn label behaviour * Adding IconColumn documentation * Add Additional Tests - Replace Test Database * Add Visuals Test for IconColumn * Add Icon Columns to Other Column Types * Undo FrontendAssetsTest Changes --------- Co-authored-by: lrljoe <[email protected]> * Add Baseline - Convert phpstan.neon to tabs (rappasoft#1903) * Update ChangeLog * Save filter selection to session (BETA) (rappasoft#1910) * Initial Commit * Fix styling * Initial Commit * Fix styling * Fix nullable return * Add Initial Tests - Remove Non-Required Method * Fix styling * Swap methods * Add default docs * Remove errant note * Adjust docs * Adjust Docs for storeFiltersInSessionEnabled --------- Co-authored-by: lrljoe <[email protected]> * Add hide table option (rappasoft#1914) * Initial Commit * Fix styling * Further adjustments * Fix styling * Improve Tests - Extend PetsTable * Fix styling --------- Co-authored-by: lrljoe <[email protected]> * Add column select session methods (rappasoft#1913) * Initial Commit * Fix styling * Minor Tweaks * Fix styling * Fix Tests * Add Tests for StoredColumnSelect * Fix styling * Add Missing Tests * Fix styling --------- Co-authored-by: lrljoe <[email protected]> * Use Core HasTheme Methods (rappasoft#1915) * Centralise Theme Methods * Fix styling * Fix for broken tests * Fix styling * Remove persisted computed properties --------- Co-authored-by: lrljoe <[email protected]> * Use Core Attribute Bag (rappasoft#1916) * Initial Commit * Fix styling * Add Missing Test * Fix styling * Adjustments * Fix styling * Adjust Test * Fix styling * Fix Sorting Visual Test --------- Co-authored-by: lrljoe <[email protected]> * Fix ChangeLog * Add Polish translation by @meavric (rappasoft#1925) * Add Polish translation by @meavric * Update ChangeLog to reflect translation * Add Vertical Scrolling Example (rappasoft#1926) * Adjusting contributing * Fix missing variable in workflow (rappasoft#1933) * Fix missing variable name * Remove phpunit failOnWarning * Tests * PCOV Use Laravel 11 * Fixes for ButtonGroupColumn, ImageColumn, LinkColumn - to not default as label if has a "from" property. (rappasoft#1932) * Initial Commit - Allowing Labels with "From" to be included in queries * Fix styling * Fixes for ButtonGroupColumn, ImageColumn, LinkColumn - to not default as label if has a "from" property. --------- Co-authored-by: lrljoe <[email protected]> * Add button type to tailwind pagination blade template (rappasoft#1928) * v3.4.19 ChangeLog * Revert tableName to be public (rappasoft#1937) * v3.4.20 ChangeLog * Migration to Core attribute management (rappasoft#1943) * Migration to Core attribute management * Fix styling * Fix missing type hint, update tests * Fix styling * Remove defaults from being output * Fix styling * Adjust defaults * Adjust behaviour for Bulk Actions TH * Add "styling" to Columns docs * Docs Adjust, add missing test * Fix styling * Adjust workflows - use L11 for PHPStan, use PHPUnit for L10 * Add missing test for thSortIconAttributes * Fix styling * Add CustomAttributesTest * Fix styling * Add missing tests - correct attribute to respect defaults * Fix styling * Remove defined processes in workflows * Add test for setShouldBeHidden and setShouldBeDisplayed * Fix styling --------- Co-authored-by: lrljoe <[email protected]> * Update docs - add Action setLabelAttributes method (rappasoft#1952) * Reset Page on "Per Page" changing (rappasoft#1953) * Localisation - Avoid Conflicts With Other Packages (rappasoft#1955) * Merging Localisation Tweaks * Fix styling * Tweak localisations * Fix styling * Tweaks to sorting pill direction label * Fix styling * Fixes for Sorting Pill Labels --------- Co-authored-by: lrljoe <[email protected]> * Add filterComponents into queryString (rappasoft#1957) * Fix syntax for DateColumn outputFormat in docs (rappasoft#1960) * Fix Filter Pills Icon - Tailwind (rappasoft#1961) * Add original translation strings - for use in published views (rappasoft#1959) * Fix for Search Field Attribute Defaults (rappasoft#1962) * Fix for Search Field Attribute Defaults * SearchFieldAttributes -> Defaults To False * Change the type of LaravelLivewireTablesEvent::$user from Illuminate\Foundation\Auth\User to Illuminate\Contracts\Auth\Authenticatable (rappasoft#1963) * Remove persist from getFilterGenericData (rappasoft#1966) * Update ChangeLog * Update Pint Workflow (rappasoft#1967) * Update Pint Workflow * Update ChangeLog * Test Styling Workflow * Fix styling * Test Workflow * Fix styling --------- Co-authored-by: lrljoe <[email protected]> * Update Discord Releases Workflow (rappasoft#1968) * Update ChangeLog * Fix Loading Placeholder Bug - Breaking Table (rappasoft#1969) * FixLoadingPlaceholderBug * Adjust tests for new Loading blade * v3.4.22 ChangeLog * Update ChangeLog * Add comment on getTitle (rappasoft#1976) * Add before-wrapper and after-wrapper configurable areas (rappasoft#1977) * Add initial commit for setPaginationWrapperAttributes (rappasoft#1978) * Add initial commit for setPaginationWrapperAttributes * Fix styling * Update ChangeLog * Adjust Tests & Methods * Fix styling --------- Co-authored-by: lrljoe <[email protected]> * Update ChangeLog * Update ChangeLog * Adjust ChangeLog Date * Add ToolsAttributes and ToolbarAttributes (rappasoft#1982) * Initial Commit * Fix styling * Add getCustomAttributesBagFromArray * Fix styling * Reorder Array * Reorder Initial Array - Add Additional Test * Fix styling * Add More Tests --------- Co-authored-by: lrljoe <[email protected]> * Add docs for the ColumnSelect lifecycle hooks (rappasoft#1983) * Add setToolsAttributes and setToolBarAttributes docs (rappasoft#1984) * Update ChangeLog --------- Co-authored-by: lrljoe <[email protected]> Co-authored-by: Matthias Schmitt <[email protected]> Co-authored-by: Paoulo Riveros <[email protected]>
1 parent 15e7f9b commit 7d265a3

24 files changed

+342
-38
lines changed

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,20 @@
22

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

5+
## [v3.4.22] - 2024-09-29
6+
### Bug Fixes
7+
- Fix Loading Placeholder Bug - Breaking Table by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/1969
8+
9+
### New Features
10+
- Add setPaginationWrapperAttributes by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/1978
11+
- Add configurable areas - before-wrapper and after-wrapper by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/1977
12+
- Add ToolsAttributes and ToolbarAttributes by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/1982
13+
14+
### Docs
15+
- Add getTitle reference for setTdAttributes/setTrAttributes by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/1976
16+
- Add setToolsAttributes and setToolBarAttributes docs by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/1984
17+
- Add docs for the ColumnSelect lifecycle hooks by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/1983
18+
519
## [v3.4.21] - 2024-09-25
620
### Bug Fixes
721
- Remove persist from getFilterGenericData by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/1966

docs/columns/styling.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ Below is a copy of the relevant sections from [datatable styling](../datatable/s
4545

4646
Set a list of attributes to override on the th elements.
4747

48+
If your Column does not have a field (e.g. a label column), then you may use the following, which will utilise the first parameter in Column::make()
49+
```php
50+
$column->getTitle()
51+
```
52+
4853
```php
4954
public function configure(): void
5055
{
@@ -204,6 +209,11 @@ public function configure(): void
204209

205210
Set a list of attributes to override on the td elements. For example, changing the background color between red/green based on whether the "total" field is over or under 1000.
206211

212+
If your Column does not have a field (e.g. a label column), then you may use the following, which will utilise the first parameter in Column::make()
213+
```php
214+
$column->getTitle()
215+
```
216+
207217
```php
208218
public function configure(): void
209219
{

docs/datatable/configurable-areas.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ You can use the `setConfigurableAreas` method to set multiple areas that you wan
2626
public function configure(): void
2727
{
2828
$this->setConfigurableAreas([
29+
'before-wrapper' => 'path.to.my.view',
2930
'before-tools' => 'path.to.my.view',
3031
'toolbar-left-start' => 'path.to.my.view',
3132
'toolbar-left-end' => 'path.to.my.view',
@@ -35,6 +36,7 @@ public function configure(): void
3536
'after-toolbar' => 'path.to.my.view',
3637
'before-pagination' => 'path.to.my.view',
3738
'after-pagination' => 'path.to.my.view',
39+
'after-wrapper' => 'path.to.my.view',
3840
]);
3941
}
4042
```

docs/datatable/styling.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,11 @@ public function configure(): void
150150

151151
Set a list of attributes to override on the th elements.
152152

153+
If your Column does not have a field (e.g. a label column), then you may use the following, which will utilise the first parameter in Column::make()
154+
```php
155+
$column->getTitle()
156+
```
157+
153158
```php
154159
public function configure(): void
155160
{
@@ -311,6 +316,11 @@ public function configure(): void
311316

312317
Set a list of attributes to override on the td elements
313318

319+
If your Column does not have a field (e.g. a label column), then you may use the following, which will utilise the first parameter in Column::make()
320+
```php
321+
$column->getTitle()
322+
```
323+
314324
```php
315325
public function configure(): void
316326
{

docs/misc/lifecycle-hooks.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ This is called prior to setting up the available Columns via the columns() metho
1919
## columnsSet
2020
This is called immediately after the Columns are set up
2121

22+
## configuringColumnSelect
23+
This is called immediately prior to setting up Column Select
24+
25+
## configuredColumnSelect
26+
This is called immediately after setting up Column Select
27+
2228
## rowsRetrieved
2329
This is called immediately after the query is executed, and is passed the result from the executed query.
2430

docs/misc/tools.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,28 @@ Disables the Toolbar, which contains the Reorder, Filters, Search, Column Select
5656
{
5757
$this->setToolBarDisabled();
5858
}
59-
```
59+
```
60+
61+
### setToolsAttributes
62+
Allows setting of attributes for the parent element in the tools blade
63+
64+
By default, this replaces the default classes on the tools blade, if you would like to keep them, set the default-colors/default-styling flags to true as appropriate
65+
66+
```php
67+
public function configure(): void
68+
{
69+
$this->setToolsAttributes(['class' => ' bg-green-500', 'default-colors' => false, 'default-styling' => true]);
70+
}
71+
```
72+
73+
### setToolBarAttributes
74+
Allows setting of attributes for the parent element in the toolbar blade.
75+
76+
By default, this replaces the default classes on the toolbar blade, if you would like to keep them, set the default-colors/default-styling flags to true as appropriate
77+
78+
```php
79+
public function configure(): void
80+
{
81+
$this->setToolBarAttributes(['class' => ' bg-red-500', 'default-colors' => false, 'default-styling' => true]);
82+
}
83+
```

docs/pagination/available-methods.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,3 +296,14 @@ public function configure(): void
296296
$this->setShouldRetrieveTotalItemCountDisabled();
297297
}
298298
```
299+
300+
## setPaginationWrapperAttributes
301+
302+
Used to set attributes for the "div" that wraps the pagination section
303+
304+
```php
305+
public function configure(): void
306+
{
307+
$this->setPaginationWrapperAttributes(['class' => 'text-lg']);
308+
}
309+
```

resources/views/components/includes/loading.blade.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@
99
@include($this->getLoadingPlaceHolderBlade(), ['colCount' => $colCount])
1010
@else
1111

12-
<tr wire:key="{{ $tableName }}-loader" class="hidden d-none"
12+
<tr wire:key="{{ $tableName }}-loader"
1313
{{
1414
$attributes->merge($customAttributes['loader-wrapper'])
15-
->class(['w-full text-center h-screen place-items-center align-middle' => $isTailwind && ($customAttributes['loader-wrapper']['default'] ?? true)])
16-
->class(['w-100 text-center h-100 align-items-center' => $isBootstrap && ($customAttributes['loader-wrapper']['default'] ?? true)]);
15+
->class(['hidden w-full text-center h-screen place-items-center align-middle' => $isTailwind && ($customAttributes['loader-wrapper']['default'] ?? true)])
16+
->class(['d-none w-100 text-center h-100 align-items-center' => $isBootstrap && ($customAttributes['loader-wrapper']['default'] ?? true)]);
1717
}}
1818
wire:loading.class.remove="hidden d-none"
1919
>
20-
<td colspan="{{ $colCount }}">
20+
<td colspan="{{ $colCount }}" wire:key="{{ $tableName }}-loader-column" >
2121
<div class="h-min self-center align-middle text-center">
2222
<div class="lds-hourglass"
2323
{{

resources/views/components/pagination.blade.php

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
@aware(['component','isTailwind','isBootstrap','isBootstrap4','isBootstrap5'])
22

3-
@if ($this->hasConfigurableAreaFor('before-pagination'))
4-
@include($this->getConfigurableAreaFor('before-pagination'), $this->getParametersForConfigurableArea('before-pagination'))
5-
@endif
3+
@includeWhen(
4+
$this->hasConfigurableAreaFor('before-pagination'),
5+
$this->getConfigurableAreaFor('before-pagination'),
6+
$this->getParametersForConfigurableArea('before-pagination')
7+
)
68

79
@if ($this->isTailwind)
8-
<div>
10+
<div {{ $this->getPaginationWrapperAttributesBag() }}>
911
@if ($this->paginationVisibilityIsEnabled())
1012
<div class="mt-4 px-4 md:p-0 sm:flex justify-between items-center space-y-4 sm:space-y-0">
1113
<div>
@@ -47,7 +49,7 @@
4749
@endif
4850
</div>
4951
@elseif ($this->isBootstrap4)
50-
<div >
52+
<div {{ $this->getPaginationWrapperAttributesBag() }}>
5153
@if ($this->paginationVisibilityIsEnabled())
5254
@if ($this->paginationIsEnabled() && $this->isPaginationMethod('standard') && $this->getRows->lastPage() > 1)
5355
<div class="row mt-3">
@@ -100,7 +102,7 @@
100102
@endif
101103
</div>
102104
@elseif ($this->isBootstrap5)
103-
<div >
105+
<div {{ $this->getPaginationWrapperAttributesBag() }} >
104106
@if ($this->paginationVisibilityIsEnabled())
105107
@if ($this->paginationIsEnabled() && $this->isPaginationMethod('standard') && $this->getRows->lastPage() > 1)
106108
<div class="row mt-3">
@@ -152,6 +154,8 @@
152154
</div>
153155
@endif
154156

155-
@if ($this->hasConfigurableAreaFor('after-pagination'))
156-
@include($this->getConfigurableAreaFor('after-pagination'), $this->getParametersForConfigurableArea('after-pagination'))
157-
@endif
157+
@includeWhen(
158+
$this->hasConfigurableAreaFor('after-pagination'),
159+
$this->getConfigurableAreaFor('after-pagination'),
160+
$this->getParametersForConfigurableArea('after-pagination')
161+
)

resources/views/components/table/tr.blade.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
x-on:dragover.prevent.throttle.500ms="currentlyReorderingStatus && dragOverEvent(event)"
1313
x-on:dragleave.prevent.throttle.500ms="currentlyReorderingStatus && dragLeaveEvent(event)"
1414
@if($this->hasDisplayLoadingPlaceholder())
15-
wire:loading.remove
15+
wire:loading.class.add="hidden d-none"
1616
@else
17-
wire:loading.class.delay="opacity-50 dark:bg-gray-900 dark:opacity-60"
17+
wire:loading.class.delay="opacity-50 dark:bg-gray-900 dark:opacity-60"
1818
@endif
1919
id="{{ $tableName }}-row-{{ $row->{$primaryKey} }}"
2020
:draggable="currentlyReorderingStatus"

0 commit comments

Comments
 (0)