Skip to content

Commit 692d780

Browse files
authored
Merge pull request #2128 from rappasoft/development
v3.5.10 - Development To Master
2 parents 1c8a7fb + b2ddbb7 commit 692d780

37 files changed

+387
-214
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
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.5.10] - 2024-12-11
6+
### Tweaks
7+
- Migrate additional Styling into separate traits by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2127
8+
59
## [v3.5.9] - 2024-12-11
610
### Tweaks
711
- Optimize Imports by @edwinvdpol in https://github.com/rappasoft/laravel-livewire-tables/pull/2124

src/Traits/Configuration/ActionsConfiguration.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,6 @@
44

55
trait ActionsConfiguration
66
{
7-
public function setActionWrapperAttributes(array $actionWrapperAttributes): self
8-
{
9-
$this->actionWrapperAttributes = [...$this->actionWrapperAttributes, ...$actionWrapperAttributes];
10-
11-
return $this;
12-
}
13-
147
public function setActionsInToolbar(bool $status): self
158
{
169
$this->displayActionsInToolbar = $status;

src/Traits/Configuration/CollapsingColumnConfiguration.php

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -24,28 +24,4 @@ public function setCollapsingColumnsDisabled(): self
2424

2525
return $this;
2626
}
27-
28-
/**
29-
* Used to set attributes for the Collapsed Column Collapse Button
30-
*
31-
* @param array<mixed> $collapsingColumnButtonCollapseAttributes
32-
*/
33-
public function setCollapsingColumnButtonCollapseAttributes(array $collapsingColumnButtonCollapseAttributes): self
34-
{
35-
$this->collapsingColumnButtonCollapseAttributes = [...['default-colors' => false, 'default-styling' => false], ...$collapsingColumnButtonCollapseAttributes];
36-
37-
return $this;
38-
}
39-
40-
/**
41-
* Used to set attributes for the Collapsed Column Expand Button
42-
*
43-
* @param array<mixed> $collapsingColumnButtonExpandAttributes
44-
*/
45-
public function setCollapsingColumnButtonExpandAttributes(array $collapsingColumnButtonExpandAttributes): self
46-
{
47-
$this->collapsingColumnButtonExpandAttributes = [...['default-colors' => false, 'default-styling' => false], ...$collapsingColumnButtonExpandAttributes];
48-
49-
return $this;
50-
}
5127
}

src/Traits/Configuration/FooterConfiguration.php

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -47,18 +47,4 @@ public function setUseHeaderAsFooterDisabled(): self
4747

4848
return $this;
4949
}
50-
51-
public function setFooterTrAttributes(Closure $callback): self
52-
{
53-
$this->footerTrAttributesCallback = $callback;
54-
55-
return $this;
56-
}
57-
58-
public function setFooterTdAttributes(Closure $callback): self
59-
{
60-
$this->footerTdAttributesCallback = $callback;
61-
62-
return $this;
63-
}
6450
}

src/Traits/Configuration/PaginationConfiguration.php

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -154,13 +154,6 @@ public function setDefaultPerPage(int $defaultPerPage): self
154154
return $this;
155155
}
156156

157-
public function setPerPageFieldAttributes(array $attributes = []): self
158-
{
159-
$this->perPageFieldAttributes = [...$this->perPageFieldAttributes, ...$attributes];
160-
161-
return $this;
162-
}
163-
164157
public function setShouldRetrieveTotalItemCountStatus(bool $status): self
165158
{
166159
$this->shouldRetrieveTotalItemCount = $status;
@@ -182,11 +175,4 @@ public function setShouldRetrieveTotalItemCountDisabled(): self
182175

183176
return $this;
184177
}
185-
186-
public function setPaginationWrapperAttributes(array $paginationWrapperAttributes): self
187-
{
188-
$this->paginationWrapperAttributes = array_merge(['class' => ''], $paginationWrapperAttributes);
189-
190-
return $this;
191-
}
192178
}

src/Traits/Configuration/ReorderingConfiguration.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -81,14 +81,4 @@ public function setDefaultReorderSort(string $field, string $direction = 'asc'):
8181

8282
return $this;
8383
}
84-
85-
/**
86-
* Used to set attributes for the <th> for Reorder Column
87-
*/
88-
public function setReorderThAttributes(array $reorderThAttributes): self
89-
{
90-
$this->reorderThAttributes = [...$this->reorderThAttributes, ...$reorderThAttributes];
91-
92-
return $this;
93-
}
9484
}

src/Traits/Configuration/SecondaryHeaderConfiguration.php

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

33
namespace Rappasoft\LaravelLivewireTables\Traits\Configuration;
44

5-
use Closure;
6-
75
trait SecondaryHeaderConfiguration
86
{
97
public function setSecondaryHeaderStatus(bool $status): self
@@ -26,18 +24,4 @@ public function setSecondaryHeaderDisabled(): self
2624

2725
return $this;
2826
}
29-
30-
public function setSecondaryHeaderTrAttributes(Closure $callback): self
31-
{
32-
$this->secondaryHeaderTrAttributesCallback = $callback;
33-
34-
return $this;
35-
}
36-
37-
public function setSecondaryHeaderTdAttributes(Closure $callback): self
38-
{
39-
$this->secondaryHeaderTdAttributesCallback = $callback;
40-
41-
return $this;
42-
}
4327
}

src/Traits/Helpers/ActionsHelpers.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,6 @@ public function getActionsPosition(): string
2020
return $this->actionsPosition ?? 'right';
2121
}
2222

23-
#[Computed]
24-
public function getActionWrapperAttributes(): array
25-
{
26-
return [...['class' => '', 'default-styling' => true, 'default-colors' => true], ...$this->actionWrapperAttributes];
27-
}
28-
2923
#[Computed]
3024
public function hasActions(): bool
3125
{

src/Traits/Helpers/CollapsingColumnHelpers.php

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -26,28 +26,6 @@ public function collapsingColumnsAreDisabled(): bool
2626
return $this->getCollapsingColumnsStatus() === false;
2727
}
2828

29-
/**
30-
* Retrieves attributes for the Collapsed Column Collapse Button
31-
*
32-
* @return array<mixed>
33-
*/
34-
#[Computed]
35-
public function getCollapsingColumnButtonCollapseAttributes(): array
36-
{
37-
return [...['default-styling' => true, 'default-colors' => true], ...$this->collapsingColumnButtonCollapseAttributes];
38-
}
39-
40-
/**
41-
* Retrieves attributes for the Collapsed Column Expand Button
42-
*
43-
* @return array<mixed>
44-
*/
45-
#[Computed]
46-
public function getCollapsingColumnButtonExpandAttributes(): array
47-
{
48-
return [...['default-styling' => true, 'default-colors' => true], ...$this->collapsingColumnButtonExpandAttributes];
49-
}
50-
5129
#[Computed]
5230
public function showCollapsingColumnSections(): bool
5331
{

src/Traits/Helpers/FooterHelpers.php

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -40,22 +40,4 @@ public function useHeaderAsFooterIsDisabled(): bool
4040
{
4141
return $this->getUseHeaderAsFooterStatus() === false;
4242
}
43-
44-
/**
45-
* @param mixed $rows
46-
* @return array<mixed>
47-
*/
48-
public function getFooterTrAttributes($rows): array
49-
{
50-
return isset($this->footerTrAttributesCallback) ? call_user_func($this->footerTrAttributesCallback, $rows) : ['default' => true];
51-
}
52-
53-
/**
54-
* @param mixed $rows
55-
* @return array<mixed>
56-
*/
57-
public function getFooterTdAttributes(Column $column, $rows, int $index): array
58-
{
59-
return isset($this->footerTdAttributesCallback) ? call_user_func($this->footerTdAttributesCallback, $column, $rows, $index) : ['default' => true];
60-
}
6143
}

0 commit comments

Comments
 (0)