Skip to content

Commit 9b05c64

Browse files
authored
Merge branch 'develop' into master
2 parents 2c0d9c9 + b114094 commit 9b05c64

File tree

73 files changed

+1370
-1106
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+1370
-1106
lines changed

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

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

5+
## [v3.2.0] - 2023-01-04
6+
### Tweaks
7+
- Migration to new Core Traits, and de-duplication of code by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/1623
8+
59
## [v3.1.9] - 2023-12-29
610
### Bug Fixes
711
- Fix CHANGELOG.md missing release
@@ -1133,4 +1137,4 @@ Ground Up Rebuild
11331137
[0.1.4]: https://github.com/rappasoft/laravel-livewire-tables/compare/v0.1.3...v0.1.4
11341138
[0.1.3]: https://github.com/rappasoft/laravel-livewire-tables/compare/v0.1.2...v0.1.3
11351139
[0.1.2]: https://github.com/rappasoft/laravel-livewire-tables/compare/v0.1.1...v0.1.2
1136-
[0.1.1]: https://github.com/rappasoft/laravel-livewire-tables/compare/v0.1.0...v0.1.1
1140+
[0.1.1]: https://github.com/rappasoft/laravel-livewire-tables/compare/v0.1.0...v0.1.1

config/livewire-tables.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,5 +89,27 @@
8989
'suffix' => '', // A suffix to append to the values when displayed
9090
],
9191
],
92+
/**
93+
* Configuration options for SelectFilter
94+
*/
95+
'selectFilter' => [
96+
'defaultOptions' => [],
97+
'defaultConfig' => [],
98+
],
99+
/**
100+
* Configuration options for MultiSelectFilter
101+
*/
102+
'multiSelectFilter' => [
103+
'defaultOptions' => [],
104+
'defaultConfig' => [],
105+
],
106+
107+
/**
108+
* Configuration options for MultiSelectFilter
109+
*/
110+
'multiSelectDropdownFilter' => [
111+
'defaultOptions' => [],
112+
'defaultConfig' => [],
113+
],
92114

93115
];

phpstan.neon

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ parameters:
1515
reportUnmatchedIgnoredErrors: false
1616
checkGenericClassInNonGenericObjectType: false
1717
ignoreErrors:
18+
- '#Access to an undefined property Rappasoft\\LaravelLivewireTables\\Views\\Column\:\:\$view#'
1819
- "#Unsafe usage of new static#"
1920
- '#on array\<string, non-empty-array\<int\<0, max\>, mixed\>\> in empty\(\) does not exist.#'
2021
- '#on array<string, non-empty-array<int<0, max>, mixed>> in isset\(\) does not exist#'

pint.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
{
22
"preset": "laravel",
33
"rules": {
4+
"single_import_per_statement": false,
5+
"no_unused_imports": false,
46
"ordered_traits": false
57
}
68
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
@php
66
$colspan = $component->getColspanCount();
77
$selectAll = $component->selectAllIsEnabled();
8-
$simplePagination = $component->paginationMethod === 'simple';
8+
$simplePagination = $component->isPaginationMethod('simple');
99
@endphp
1010

1111
@if ($component->isTailwind())

src/Traits/Helpers/CustomisationsHelpers.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public function hasExtends(): bool
1212
return isset($this->extends) && $this->extends !== null;
1313
}
1414

15-
public function getExtends()
15+
public function getExtends(): ?string
1616
{
1717
return $this->extends;
1818
}
@@ -25,7 +25,7 @@ public function hasSection(): bool
2525
return isset($this->section) && $this->section !== null;
2626
}
2727

28-
public function getSection()
28+
public function getSection(): ?string
2929
{
3030
return $this->section;
3131
}
@@ -38,7 +38,7 @@ public function hasSlot(): bool
3838
return isset($this->slot) && $this->slot !== null;
3939
}
4040

41-
public function getSlot()
41+
public function getSlot(): ?string
4242
{
4343
return $this->slot;
4444
}
@@ -51,7 +51,7 @@ public function hasLayout(): bool
5151
return isset($this->layout) && $this->layout !== null;
5252
}
5353

54-
public function getLayout()
54+
public function getLayout(): ?string
5555
{
5656
return $this->layout;
5757
}

src/Traits/Helpers/FilterHelpers.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ public function getFiltersByRow(): array
307307
return $orderedFilters;
308308
}
309309

310-
public function hasFilterGenericData()
310+
public function hasFilterGenericData(): bool
311311
{
312312
return ! empty($this->filterGenericData);
313313
}

src/Traits/WithPagination.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ trait WithPagination
2727
public bool $perPageVisibilityStatus = true;
2828

2929
// standard, simple, cursor
30-
public string $paginationMethod = 'standard';
30+
protected string $paginationMethod = 'standard';
3131

3232
public array $paginationCurrentItems = [];
3333

src/Traits/WithTableAttributes.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace Rappasoft\LaravelLivewireTables\Traits;
44

5+
use Closure;
56
use Rappasoft\LaravelLivewireTables\Traits\Configuration\TableAttributeConfiguration;
67
use Rappasoft\LaravelLivewireTables\Traits\Helpers\TableAttributeHelpers;
78

src/Views/Column.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ class Column
1111

1212
protected bool $displayColumnLabel = true;
1313

14+
protected string $view = '';
15+
1416
public function __construct(string $title, ?string $from = null)
1517
{
1618
$this->title = trim($title);

0 commit comments

Comments
 (0)