From 91fe219465429c4e4c9eda529b8ee483d81050ae Mon Sep 17 00:00:00 2001 From: LRLJoe Date: Wed, 11 Dec 2024 01:39:16 +0000 Subject: [PATCH 1/2] Migrate Styling Configs --- .../Configuration/ActionsConfiguration.php | 5 --- .../CollapsingColumnConfiguration.php | 22 ------------- .../Configuration/FooterConfiguration.php | 14 -------- .../Configuration/PaginationConfiguration.php | 13 -------- .../Configuration/ReorderingConfiguration.php | 9 ------ .../SecondaryHeaderConfiguration.php | 16 ---------- src/Traits/Helpers/ActionsHelpers.php | 5 --- .../Helpers/CollapsingColumnHelpers.php | 22 ------------- src/Traits/Helpers/FooterHelpers.php | 17 ---------- src/Traits/Helpers/PaginationHelpers.php | 16 ---------- src/Traits/Helpers/ReorderingHelpers.php | 17 ---------- src/Traits/Helpers/SecondaryHeaderHelpers.php | 19 ----------- .../ActionsStylingConfiguration.php | 13 ++++++++ .../CollapsingColumnsStylingConfiguration.php | 31 ++++++++++++++++++ .../FooterStylingConfiguration.php | 23 +++++++++++++ .../PaginationStylingConfiguration.php | 21 ++++++++++++ .../ReorderStylingConfiguration.php | 18 +++++++++++ .../SecondaryHeaderStylingConfiguration.php | 22 +++++++++++++ src/Traits/Styling/HasActionsStyling.php | 15 +++++++++ .../Styling/HasCollapsingColumnsStyling.php | 17 ++++++++++ src/Traits/Styling/HasFooterStyling.php | 18 +++++++++++ src/Traits/Styling/HasPaginationStyling.php | 16 ++++++++++ src/Traits/Styling/HasReorderStyling.php | 15 +++++++++ .../Styling/HasSecondaryHeaderStyling.php | 18 +++++++++++ .../Styling/Helpers/ActionsStylingHelpers.php | 16 ++++++++++ .../CollapsingColumnsStylingHelpers.php | 32 +++++++++++++++++++ .../Styling/Helpers/FooterStylingHelpers.php | 27 ++++++++++++++++ .../Helpers/PaginationStylingHelpers.php | 27 ++++++++++++++++ .../Styling/Helpers/ReorderStylingHelpers.php | 27 ++++++++++++++++ .../Helpers/SecondaryHeaderStylingHelpers.php | 27 ++++++++++++++++ src/Traits/WithActions.php | 8 ++--- src/Traits/WithCollapsingColumns.php | 10 +++--- src/Traits/WithFooter.php | 8 ++--- src/Traits/WithPagination.php | 9 ++---- src/Traits/WithReordering.php | 6 ++-- src/Traits/WithSecondaryHeader.php | 8 ++--- 36 files changed, 403 insertions(+), 204 deletions(-) create mode 100644 src/Traits/Styling/Configuration/ActionsStylingConfiguration.php create mode 100644 src/Traits/Styling/Configuration/CollapsingColumnsStylingConfiguration.php create mode 100644 src/Traits/Styling/Configuration/FooterStylingConfiguration.php create mode 100644 src/Traits/Styling/Configuration/PaginationStylingConfiguration.php create mode 100644 src/Traits/Styling/Configuration/ReorderStylingConfiguration.php create mode 100644 src/Traits/Styling/Configuration/SecondaryHeaderStylingConfiguration.php create mode 100644 src/Traits/Styling/HasActionsStyling.php create mode 100644 src/Traits/Styling/HasCollapsingColumnsStyling.php create mode 100644 src/Traits/Styling/HasFooterStyling.php create mode 100644 src/Traits/Styling/HasPaginationStyling.php create mode 100644 src/Traits/Styling/HasReorderStyling.php create mode 100644 src/Traits/Styling/HasSecondaryHeaderStyling.php create mode 100644 src/Traits/Styling/Helpers/ActionsStylingHelpers.php create mode 100644 src/Traits/Styling/Helpers/CollapsingColumnsStylingHelpers.php create mode 100644 src/Traits/Styling/Helpers/FooterStylingHelpers.php create mode 100644 src/Traits/Styling/Helpers/PaginationStylingHelpers.php create mode 100644 src/Traits/Styling/Helpers/ReorderStylingHelpers.php create mode 100644 src/Traits/Styling/Helpers/SecondaryHeaderStylingHelpers.php diff --git a/src/Traits/Configuration/ActionsConfiguration.php b/src/Traits/Configuration/ActionsConfiguration.php index 89b5e08b6..31cd4f13e 100644 --- a/src/Traits/Configuration/ActionsConfiguration.php +++ b/src/Traits/Configuration/ActionsConfiguration.php @@ -4,12 +4,7 @@ trait ActionsConfiguration { - public function setActionWrapperAttributes(array $actionWrapperAttributes): self - { - $this->actionWrapperAttributes = [...$this->actionWrapperAttributes, ...$actionWrapperAttributes]; - return $this; - } public function setActionsInToolbar(bool $status): self { diff --git a/src/Traits/Configuration/CollapsingColumnConfiguration.php b/src/Traits/Configuration/CollapsingColumnConfiguration.php index d39e648a5..815209017 100644 --- a/src/Traits/Configuration/CollapsingColumnConfiguration.php +++ b/src/Traits/Configuration/CollapsingColumnConfiguration.php @@ -25,27 +25,5 @@ public function setCollapsingColumnsDisabled(): self return $this; } - /** - * Used to set attributes for the Collapsed Column Collapse Button - * - * @param array $collapsingColumnButtonCollapseAttributes - */ - public function setCollapsingColumnButtonCollapseAttributes(array $collapsingColumnButtonCollapseAttributes): self - { - $this->collapsingColumnButtonCollapseAttributes = [...['default-colors' => false, 'default-styling' => false], ...$collapsingColumnButtonCollapseAttributes]; - - return $this; - } - /** - * Used to set attributes for the Collapsed Column Expand Button - * - * @param array $collapsingColumnButtonExpandAttributes - */ - public function setCollapsingColumnButtonExpandAttributes(array $collapsingColumnButtonExpandAttributes): self - { - $this->collapsingColumnButtonExpandAttributes = [...['default-colors' => false, 'default-styling' => false], ...$collapsingColumnButtonExpandAttributes]; - - return $this; - } } diff --git a/src/Traits/Configuration/FooterConfiguration.php b/src/Traits/Configuration/FooterConfiguration.php index 2a32b6fa3..8d20480b4 100644 --- a/src/Traits/Configuration/FooterConfiguration.php +++ b/src/Traits/Configuration/FooterConfiguration.php @@ -47,18 +47,4 @@ public function setUseHeaderAsFooterDisabled(): self return $this; } - - public function setFooterTrAttributes(Closure $callback): self - { - $this->footerTrAttributesCallback = $callback; - - return $this; - } - - public function setFooterTdAttributes(Closure $callback): self - { - $this->footerTdAttributesCallback = $callback; - - return $this; - } } diff --git a/src/Traits/Configuration/PaginationConfiguration.php b/src/Traits/Configuration/PaginationConfiguration.php index a74677255..39a10ea60 100644 --- a/src/Traits/Configuration/PaginationConfiguration.php +++ b/src/Traits/Configuration/PaginationConfiguration.php @@ -154,13 +154,6 @@ public function setDefaultPerPage(int $defaultPerPage): self return $this; } - public function setPerPageFieldAttributes(array $attributes = []): self - { - $this->perPageFieldAttributes = [...$this->perPageFieldAttributes, ...$attributes]; - - return $this; - } - public function setShouldRetrieveTotalItemCountStatus(bool $status): self { $this->shouldRetrieveTotalItemCount = $status; @@ -183,10 +176,4 @@ public function setShouldRetrieveTotalItemCountDisabled(): self return $this; } - public function setPaginationWrapperAttributes(array $paginationWrapperAttributes): self - { - $this->paginationWrapperAttributes = array_merge(['class' => ''], $paginationWrapperAttributes); - - return $this; - } } diff --git a/src/Traits/Configuration/ReorderingConfiguration.php b/src/Traits/Configuration/ReorderingConfiguration.php index 8dae181ea..1c1b3ed46 100644 --- a/src/Traits/Configuration/ReorderingConfiguration.php +++ b/src/Traits/Configuration/ReorderingConfiguration.php @@ -82,13 +82,4 @@ public function setDefaultReorderSort(string $field, string $direction = 'asc'): return $this; } - /** - * Used to set attributes for the for Reorder Column - */ - public function setReorderThAttributes(array $reorderThAttributes): self - { - $this->reorderThAttributes = [...$this->reorderThAttributes, ...$reorderThAttributes]; - - return $this; - } } diff --git a/src/Traits/Configuration/SecondaryHeaderConfiguration.php b/src/Traits/Configuration/SecondaryHeaderConfiguration.php index 42ce2f574..736bf2ed9 100644 --- a/src/Traits/Configuration/SecondaryHeaderConfiguration.php +++ b/src/Traits/Configuration/SecondaryHeaderConfiguration.php @@ -2,8 +2,6 @@ namespace Rappasoft\LaravelLivewireTables\Traits\Configuration; -use Closure; - trait SecondaryHeaderConfiguration { public function setSecondaryHeaderStatus(bool $status): self @@ -26,18 +24,4 @@ public function setSecondaryHeaderDisabled(): self return $this; } - - public function setSecondaryHeaderTrAttributes(Closure $callback): self - { - $this->secondaryHeaderTrAttributesCallback = $callback; - - return $this; - } - - public function setSecondaryHeaderTdAttributes(Closure $callback): self - { - $this->secondaryHeaderTdAttributesCallback = $callback; - - return $this; - } } diff --git a/src/Traits/Helpers/ActionsHelpers.php b/src/Traits/Helpers/ActionsHelpers.php index 116ea60c9..7fc22ec70 100644 --- a/src/Traits/Helpers/ActionsHelpers.php +++ b/src/Traits/Helpers/ActionsHelpers.php @@ -20,11 +20,6 @@ public function getActionsPosition(): string return $this->actionsPosition ?? 'right'; } - #[Computed] - public function getActionWrapperAttributes(): array - { - return [...['class' => '', 'default-styling' => true, 'default-colors' => true], ...$this->actionWrapperAttributes]; - } #[Computed] public function hasActions(): bool diff --git a/src/Traits/Helpers/CollapsingColumnHelpers.php b/src/Traits/Helpers/CollapsingColumnHelpers.php index 62ec86573..131e43b65 100644 --- a/src/Traits/Helpers/CollapsingColumnHelpers.php +++ b/src/Traits/Helpers/CollapsingColumnHelpers.php @@ -26,28 +26,6 @@ public function collapsingColumnsAreDisabled(): bool return $this->getCollapsingColumnsStatus() === false; } - /** - * Retrieves attributes for the Collapsed Column Collapse Button - * - * @return array - */ - #[Computed] - public function getCollapsingColumnButtonCollapseAttributes(): array - { - return [...['default-styling' => true, 'default-colors' => true], ...$this->collapsingColumnButtonCollapseAttributes]; - } - - /** - * Retrieves attributes for the Collapsed Column Expand Button - * - * @return array - */ - #[Computed] - public function getCollapsingColumnButtonExpandAttributes(): array - { - return [...['default-styling' => true, 'default-colors' => true], ...$this->collapsingColumnButtonExpandAttributes]; - } - #[Computed] public function showCollapsingColumnSections(): bool { diff --git a/src/Traits/Helpers/FooterHelpers.php b/src/Traits/Helpers/FooterHelpers.php index df220e3c0..9b825deb0 100644 --- a/src/Traits/Helpers/FooterHelpers.php +++ b/src/Traits/Helpers/FooterHelpers.php @@ -41,21 +41,4 @@ public function useHeaderAsFooterIsDisabled(): bool return $this->getUseHeaderAsFooterStatus() === false; } - /** - * @param mixed $rows - * @return array - */ - public function getFooterTrAttributes($rows): array - { - return isset($this->footerTrAttributesCallback) ? call_user_func($this->footerTrAttributesCallback, $rows) : ['default' => true]; - } - - /** - * @param mixed $rows - * @return array - */ - public function getFooterTdAttributes(Column $column, $rows, int $index): array - { - return isset($this->footerTdAttributesCallback) ? call_user_func($this->footerTdAttributesCallback, $column, $rows, $index) : ['default' => true]; - } } diff --git a/src/Traits/Helpers/PaginationHelpers.php b/src/Traits/Helpers/PaginationHelpers.php index 07ee59f59..343a8d308 100644 --- a/src/Traits/Helpers/PaginationHelpers.php +++ b/src/Traits/Helpers/PaginationHelpers.php @@ -152,26 +152,10 @@ private function getPerPagePaginationSessionKey(): string return $this->tableName.'-perPage'; } - #[Computed] - public function getPerPageFieldAttributes(): array - { - return $this->perPageFieldAttributes; - } - #[Computed] public function getShouldRetrieveTotalItemCount(): bool { return $this->shouldRetrieveTotalItemCount; } - public function getPaginationWrapperAttributes(): array - { - return $this->paginationWrapperAttributes ?? ['class' => '']; - } - - #[Computed] - public function getPaginationWrapperAttributesBag(): ComponentAttributeBag - { - return new ComponentAttributeBag($this->getPaginationWrapperAttributes()); - } } diff --git a/src/Traits/Helpers/ReorderingHelpers.php b/src/Traits/Helpers/ReorderingHelpers.php index c6ad8bd9a..df431d21c 100644 --- a/src/Traits/Helpers/ReorderingHelpers.php +++ b/src/Traits/Helpers/ReorderingHelpers.php @@ -93,23 +93,6 @@ public function getReorderingBackupSessionKey(): string return $this->getTableName().'-reordering-backup'; } - /** - * Used to get attributes for the for Bulk Actions - * - * @return array - */ - #[Computed] - public function getReorderThAttributes(): array - { - return $this->reorderThAttributes ?? ['default' => true]; - } - - #[Computed] - public function hasReorderThAttributes(): bool - { - return $this->getReorderThAttributes() != ['default' => true]; - } - public function getReorderColumn(): Column { return Column::make('reorder')->label(fn () => null); diff --git a/src/Traits/Helpers/SecondaryHeaderHelpers.php b/src/Traits/Helpers/SecondaryHeaderHelpers.php index 6af852483..3e18d60f1 100644 --- a/src/Traits/Helpers/SecondaryHeaderHelpers.php +++ b/src/Traits/Helpers/SecondaryHeaderHelpers.php @@ -2,8 +2,6 @@ namespace Rappasoft\LaravelLivewireTables\Traits\Helpers; -use Rappasoft\LaravelLivewireTables\Views\Column; - trait SecondaryHeaderHelpers { public function hasColumnsWithSecondaryHeader(): bool @@ -26,21 +24,4 @@ public function secondaryHeaderIsDisabled(): bool return $this->getSecondaryHeaderStatus() === false; } - /** - * @param mixed $rows - * @return array - */ - public function getSecondaryHeaderTrAttributes($rows): array - { - return isset($this->secondaryHeaderTrAttributesCallback) ? call_user_func($this->secondaryHeaderTrAttributesCallback, $rows) : ['default' => true]; - } - - /** - * @param mixed $rows - * @return array - */ - public function getSecondaryHeaderTdAttributes(Column $column, $rows, int $index): array - { - return isset($this->secondaryHeaderTdAttributesCallback) ? call_user_func($this->secondaryHeaderTdAttributesCallback, $column, $rows, $index) : ['default' => true]; - } } diff --git a/src/Traits/Styling/Configuration/ActionsStylingConfiguration.php b/src/Traits/Styling/Configuration/ActionsStylingConfiguration.php new file mode 100644 index 000000000..042e0c17b --- /dev/null +++ b/src/Traits/Styling/Configuration/ActionsStylingConfiguration.php @@ -0,0 +1,13 @@ +actionWrapperAttributes = [...$this->actionWrapperAttributes, ...$actionWrapperAttributes]; + + return $this; + } +} \ No newline at end of file diff --git a/src/Traits/Styling/Configuration/CollapsingColumnsStylingConfiguration.php b/src/Traits/Styling/Configuration/CollapsingColumnsStylingConfiguration.php new file mode 100644 index 000000000..d78a413ed --- /dev/null +++ b/src/Traits/Styling/Configuration/CollapsingColumnsStylingConfiguration.php @@ -0,0 +1,31 @@ + $collapsingColumnButtonCollapseAttributes + */ + public function setCollapsingColumnButtonCollapseAttributes(array $collapsingColumnButtonCollapseAttributes): self + { + $this->collapsingColumnButtonCollapseAttributes = [...['default-colors' => false, 'default-styling' => false], ...$collapsingColumnButtonCollapseAttributes]; + + return $this; + } + + /** + * Used to set attributes for the Collapsed Column Expand Button + * + * @param array $collapsingColumnButtonExpandAttributes + */ + public function setCollapsingColumnButtonExpandAttributes(array $collapsingColumnButtonExpandAttributes): self + { + $this->collapsingColumnButtonExpandAttributes = [...['default-colors' => false, 'default-styling' => false], ...$collapsingColumnButtonExpandAttributes]; + + return $this; + } + +} \ No newline at end of file diff --git a/src/Traits/Styling/Configuration/FooterStylingConfiguration.php b/src/Traits/Styling/Configuration/FooterStylingConfiguration.php new file mode 100644 index 000000000..640e8891c --- /dev/null +++ b/src/Traits/Styling/Configuration/FooterStylingConfiguration.php @@ -0,0 +1,23 @@ +footerTrAttributesCallback = $callback; + + return $this; + } + + public function setFooterTdAttributes(Closure $callback): self + { + $this->footerTdAttributesCallback = $callback; + + return $this; + } + +} \ No newline at end of file diff --git a/src/Traits/Styling/Configuration/PaginationStylingConfiguration.php b/src/Traits/Styling/Configuration/PaginationStylingConfiguration.php new file mode 100644 index 000000000..73a25aa2e --- /dev/null +++ b/src/Traits/Styling/Configuration/PaginationStylingConfiguration.php @@ -0,0 +1,21 @@ +perPageFieldAttributes = [...$this->perPageFieldAttributes, ...$attributes]; + + return $this; + } + + public function setPaginationWrapperAttributes(array $paginationWrapperAttributes): self + { + $this->paginationWrapperAttributes = array_merge(['class' => ''], $paginationWrapperAttributes); + + return $this; + } +} \ No newline at end of file diff --git a/src/Traits/Styling/Configuration/ReorderStylingConfiguration.php b/src/Traits/Styling/Configuration/ReorderStylingConfiguration.php new file mode 100644 index 000000000..a705eeb74 --- /dev/null +++ b/src/Traits/Styling/Configuration/ReorderStylingConfiguration.php @@ -0,0 +1,18 @@ + for Reorder Column + */ + public function setReorderThAttributes(array $reorderThAttributes): self + { + $this->reorderThAttributes = [...$this->reorderThAttributes, ...$reorderThAttributes]; + + return $this; + } + +} \ No newline at end of file diff --git a/src/Traits/Styling/Configuration/SecondaryHeaderStylingConfiguration.php b/src/Traits/Styling/Configuration/SecondaryHeaderStylingConfiguration.php new file mode 100644 index 000000000..0b0c3dde3 --- /dev/null +++ b/src/Traits/Styling/Configuration/SecondaryHeaderStylingConfiguration.php @@ -0,0 +1,22 @@ +secondaryHeaderTrAttributesCallback = $callback; + + return $this; + } + + public function setSecondaryHeaderTdAttributes(Closure $callback): self + { + $this->secondaryHeaderTdAttributesCallback = $callback; + + return $this; + } +} \ No newline at end of file diff --git a/src/Traits/Styling/HasActionsStyling.php b/src/Traits/Styling/HasActionsStyling.php new file mode 100644 index 000000000..57d6a691f --- /dev/null +++ b/src/Traits/Styling/HasActionsStyling.php @@ -0,0 +1,15 @@ + '', 'default-styling' => true, 'default-colors' => true]; + +} \ No newline at end of file diff --git a/src/Traits/Styling/HasCollapsingColumnsStyling.php b/src/Traits/Styling/HasCollapsingColumnsStyling.php new file mode 100644 index 000000000..261ff3ddf --- /dev/null +++ b/src/Traits/Styling/HasCollapsingColumnsStyling.php @@ -0,0 +1,17 @@ + true, 'default-colors' => true]; + + protected array $collapsingColumnButtonExpandAttributes = ['default-styling' => true, 'default-colors' => true]; + +} \ No newline at end of file diff --git a/src/Traits/Styling/HasFooterStyling.php b/src/Traits/Styling/HasFooterStyling.php new file mode 100644 index 000000000..9d829919c --- /dev/null +++ b/src/Traits/Styling/HasFooterStyling.php @@ -0,0 +1,18 @@ + true, 'default-colors' => true, 'class' => '']; + + protected array $paginationWrapperAttributes = ['class' => '']; +} \ No newline at end of file diff --git a/src/Traits/Styling/HasReorderStyling.php b/src/Traits/Styling/HasReorderStyling.php new file mode 100644 index 000000000..ad6f168a2 --- /dev/null +++ b/src/Traits/Styling/HasReorderStyling.php @@ -0,0 +1,15 @@ + true]; + +} \ No newline at end of file diff --git a/src/Traits/Styling/HasSecondaryHeaderStyling.php b/src/Traits/Styling/HasSecondaryHeaderStyling.php new file mode 100644 index 000000000..06cc43c44 --- /dev/null +++ b/src/Traits/Styling/HasSecondaryHeaderStyling.php @@ -0,0 +1,18 @@ + '', 'default-styling' => true, 'default-colors' => true], ...$this->actionWrapperAttributes]; + } + + +} \ No newline at end of file diff --git a/src/Traits/Styling/Helpers/CollapsingColumnsStylingHelpers.php b/src/Traits/Styling/Helpers/CollapsingColumnsStylingHelpers.php new file mode 100644 index 000000000..70e7a757d --- /dev/null +++ b/src/Traits/Styling/Helpers/CollapsingColumnsStylingHelpers.php @@ -0,0 +1,32 @@ + + */ + #[Computed] + public function getCollapsingColumnButtonCollapseAttributes(): array + { + return [...['default-styling' => true, 'default-colors' => true], ...$this->collapsingColumnButtonCollapseAttributes]; + } + + /** + * Retrieves attributes for the Collapsed Column Expand Button + * + * @return array + */ + #[Computed] + public function getCollapsingColumnButtonExpandAttributes(): array + { + return [...['default-styling' => true, 'default-colors' => true], ...$this->collapsingColumnButtonExpandAttributes]; + } + + +} \ No newline at end of file diff --git a/src/Traits/Styling/Helpers/FooterStylingHelpers.php b/src/Traits/Styling/Helpers/FooterStylingHelpers.php new file mode 100644 index 000000000..fe8ba78fe --- /dev/null +++ b/src/Traits/Styling/Helpers/FooterStylingHelpers.php @@ -0,0 +1,27 @@ + + */ + public function getFooterTrAttributes($rows): array + { + return isset($this->footerTrAttributesCallback) ? call_user_func($this->footerTrAttributesCallback, $rows) : ['default' => true]; + } + + /** + * @param mixed $rows + * @return array + */ + public function getFooterTdAttributes(Column $column, $rows, int $index): array + { + return isset($this->footerTdAttributesCallback) ? call_user_func($this->footerTdAttributesCallback, $column, $rows, $index) : ['default' => true]; + } + +} \ No newline at end of file diff --git a/src/Traits/Styling/Helpers/PaginationStylingHelpers.php b/src/Traits/Styling/Helpers/PaginationStylingHelpers.php new file mode 100644 index 000000000..ee112d9ca --- /dev/null +++ b/src/Traits/Styling/Helpers/PaginationStylingHelpers.php @@ -0,0 +1,27 @@ +perPageFieldAttributes; + } + + public function getPaginationWrapperAttributes(): array + { + return $this->paginationWrapperAttributes ?? ['class' => '']; + } + + #[Computed] + public function getPaginationWrapperAttributesBag(): ComponentAttributeBag + { + return new ComponentAttributeBag($this->getPaginationWrapperAttributes()); + } + +} \ No newline at end of file diff --git a/src/Traits/Styling/Helpers/ReorderStylingHelpers.php b/src/Traits/Styling/Helpers/ReorderStylingHelpers.php new file mode 100644 index 000000000..d7d2592a4 --- /dev/null +++ b/src/Traits/Styling/Helpers/ReorderStylingHelpers.php @@ -0,0 +1,27 @@ + for Bulk Actions + * + * @return array + */ + #[Computed] + public function getReorderThAttributes(): array + { + return $this->reorderThAttributes ?? ['default' => true]; + } + + #[Computed] + public function hasReorderThAttributes(): bool + { + return $this->getReorderThAttributes() != ['default' => true]; + } + +} \ No newline at end of file diff --git a/src/Traits/Styling/Helpers/SecondaryHeaderStylingHelpers.php b/src/Traits/Styling/Helpers/SecondaryHeaderStylingHelpers.php new file mode 100644 index 000000000..5ed24a6fd --- /dev/null +++ b/src/Traits/Styling/Helpers/SecondaryHeaderStylingHelpers.php @@ -0,0 +1,27 @@ + + */ + public function getSecondaryHeaderTrAttributes($rows): array + { + return isset($this->secondaryHeaderTrAttributesCallback) ? call_user_func($this->secondaryHeaderTrAttributesCallback, $rows) : ['default' => true]; + } + + /** + * @param mixed $rows + * @return array + */ + public function getSecondaryHeaderTdAttributes(Column $column, $rows, int $index): array + { + return isset($this->secondaryHeaderTdAttributesCallback) ? call_user_func($this->secondaryHeaderTdAttributesCallback, $column, $rows, $index) : ['default' => true]; + } + +} \ No newline at end of file diff --git a/src/Traits/WithActions.php b/src/Traits/WithActions.php index b9531e755..153581f19 100644 --- a/src/Traits/WithActions.php +++ b/src/Traits/WithActions.php @@ -5,14 +5,14 @@ use Illuminate\Support\Collection; use Rappasoft\LaravelLivewireTables\Traits\Configuration\ActionsConfiguration; use Rappasoft\LaravelLivewireTables\Traits\Helpers\ActionsHelpers; +use Rappasoft\LaravelLivewireTables\Traits\Styling\HasActionsStyling; trait WithActions { use ActionsConfiguration, - ActionsHelpers; - - protected array $actionWrapperAttributes = ['class' => '', 'default-styling' => true, 'default-colors' => true]; - + ActionsHelpers, + HasActionsStyling; + protected bool $displayActionsInToolbar = false; protected string $actionsPosition = 'right'; diff --git a/src/Traits/WithCollapsingColumns.php b/src/Traits/WithCollapsingColumns.php index 60e454970..37fef32d1 100644 --- a/src/Traits/WithCollapsingColumns.php +++ b/src/Traits/WithCollapsingColumns.php @@ -4,15 +4,13 @@ use Rappasoft\LaravelLivewireTables\Traits\Configuration\CollapsingColumnConfiguration; use Rappasoft\LaravelLivewireTables\Traits\Helpers\CollapsingColumnHelpers; +use Rappasoft\LaravelLivewireTables\Traits\Styling\HasCollapsingColumnsStyling; trait WithCollapsingColumns { - use CollapsingColumnConfiguration; - use CollapsingColumnHelpers; + use CollapsingColumnConfiguration, + CollapsingColumnHelpers, + HasCollapsingColumnsStyling; protected bool $collapsingColumnsStatus = true; - - protected array $collapsingColumnButtonCollapseAttributes = ['default-styling' => true, 'default-colors' => true]; - - protected array $collapsingColumnButtonExpandAttributes = ['default-styling' => true, 'default-colors' => true]; } diff --git a/src/Traits/WithFooter.php b/src/Traits/WithFooter.php index 8f163dc93..44b9f7dc0 100644 --- a/src/Traits/WithFooter.php +++ b/src/Traits/WithFooter.php @@ -5,11 +5,13 @@ use Closure; use Rappasoft\LaravelLivewireTables\Traits\Configuration\FooterConfiguration; use Rappasoft\LaravelLivewireTables\Traits\Helpers\FooterHelpers; +use Rappasoft\LaravelLivewireTables\Traits\Styling\HasFooterStyling; trait WithFooter { use FooterConfiguration, - FooterHelpers; + FooterHelpers, + HasFooterStyling; protected bool $footerStatus = true; @@ -17,10 +19,6 @@ trait WithFooter protected bool $columnsWithFooter = false; - protected ?Closure $footerTrAttributesCallback; - - protected ?Closure $footerTdAttributesCallback; - public function setupFooter(): void { foreach ($this->getColumns() as $column) { diff --git a/src/Traits/WithPagination.php b/src/Traits/WithPagination.php index 70e9d508e..264e1d806 100644 --- a/src/Traits/WithPagination.php +++ b/src/Traits/WithPagination.php @@ -6,12 +6,14 @@ use Livewire\WithPagination as LivewirePagination; use Rappasoft\LaravelLivewireTables\Traits\Configuration\PaginationConfiguration; use Rappasoft\LaravelLivewireTables\Traits\Helpers\PaginationHelpers; +use Rappasoft\LaravelLivewireTables\Traits\Styling\HasPaginationStyling; trait WithPagination { use LivewirePagination, PaginationConfiguration, - PaginationHelpers; + PaginationHelpers, + HasPaginationStyling; public ?string $pageName = null; @@ -51,13 +53,8 @@ trait WithPagination protected bool $shouldShowPaginationDetails = true; - protected array $perPageFieldAttributes = ['default-styling' => true, 'default-colors' => true, 'class' => '']; - protected bool $shouldRetrieveTotalItemCount = true; - // Used In Frontend - protected array $paginationWrapperAttributes = ['class' => '']; - public function mountWithPagination(): void { $sessionPerPage = session()->get($this->getPerPagePaginationSessionKey(), $this->getPerPage()); diff --git a/src/Traits/WithReordering.php b/src/Traits/WithReordering.php index 006e7a715..49d36f78f 100644 --- a/src/Traits/WithReordering.php +++ b/src/Traits/WithReordering.php @@ -4,11 +4,13 @@ use Rappasoft\LaravelLivewireTables\Traits\Configuration\ReorderingConfiguration; use Rappasoft\LaravelLivewireTables\Traits\Helpers\ReorderingHelpers; +use Rappasoft\LaravelLivewireTables\Traits\Styling\HasReorderStyling; trait WithReordering { use ReorderingConfiguration, - ReorderingHelpers; + ReorderingHelpers, + HasReorderStyling; // Entangled in JS public bool $reorderStatus = false; @@ -31,8 +33,6 @@ trait WithReordering protected string $defaultReorderDirection = 'asc'; - protected array $reorderThAttributes = ['default' => true]; - public function setupReordering(): void { if ($this->reorderIsDisabled()) { diff --git a/src/Traits/WithSecondaryHeader.php b/src/Traits/WithSecondaryHeader.php index d3fe2f459..1d4b40f16 100644 --- a/src/Traits/WithSecondaryHeader.php +++ b/src/Traits/WithSecondaryHeader.php @@ -2,22 +2,20 @@ namespace Rappasoft\LaravelLivewireTables\Traits; -use Closure; use Rappasoft\LaravelLivewireTables\Traits\Configuration\SecondaryHeaderConfiguration; use Rappasoft\LaravelLivewireTables\Traits\Helpers\SecondaryHeaderHelpers; +use Rappasoft\LaravelLivewireTables\Traits\Styling\HasSecondaryHeaderStyling; trait WithSecondaryHeader { use SecondaryHeaderConfiguration, - SecondaryHeaderHelpers; + SecondaryHeaderHelpers, + HasSecondaryHeaderStyling; protected bool $secondaryHeaderStatus = true; protected bool $columnsWithSecondaryHeader = false; - protected ?Closure $secondaryHeaderTrAttributesCallback; - - protected ?Closure $secondaryHeaderTdAttributesCallback; public function bootedWithSecondaryHeader(): void { From 8f3b192fa688f38df6a42f1526f8a69bf864bdfd Mon Sep 17 00:00:00 2001 From: lrljoe Date: Wed, 11 Dec 2024 01:39:47 +0000 Subject: [PATCH 2/2] Fix styling --- src/Traits/Configuration/ActionsConfiguration.php | 2 -- .../Configuration/CollapsingColumnConfiguration.php | 2 -- src/Traits/Configuration/PaginationConfiguration.php | 1 - src/Traits/Configuration/ReorderingConfiguration.php | 1 - src/Traits/Helpers/ActionsHelpers.php | 1 - src/Traits/Helpers/FooterHelpers.php | 1 - src/Traits/Helpers/PaginationHelpers.php | 1 - src/Traits/Helpers/SecondaryHeaderHelpers.php | 1 - .../Configuration/ActionsStylingConfiguration.php | 2 +- .../CollapsingColumnsStylingConfiguration.php | 3 +-- .../Styling/Configuration/FooterStylingConfiguration.php | 3 +-- .../Configuration/PaginationStylingConfiguration.php | 3 +-- .../Configuration/ReorderStylingConfiguration.php | 4 +--- .../SecondaryHeaderStylingConfiguration.php | 2 +- src/Traits/Styling/HasActionsStyling.php | 3 +-- src/Traits/Styling/HasCollapsingColumnsStyling.php | 7 +++---- src/Traits/Styling/HasFooterStyling.php | 3 +-- src/Traits/Styling/HasPaginationStyling.php | 2 +- src/Traits/Styling/HasReorderStyling.php | 3 +-- src/Traits/Styling/HasSecondaryHeaderStyling.php | 9 ++++----- src/Traits/Styling/Helpers/ActionsStylingHelpers.php | 4 +--- .../Styling/Helpers/CollapsingColumnsStylingHelpers.php | 8 +++----- src/Traits/Styling/Helpers/FooterStylingHelpers.php | 3 +-- src/Traits/Styling/Helpers/PaginationStylingHelpers.php | 3 +-- src/Traits/Styling/Helpers/ReorderStylingHelpers.php | 4 +--- .../Styling/Helpers/SecondaryHeaderStylingHelpers.php | 3 +-- src/Traits/WithActions.php | 2 +- src/Traits/WithSecondaryHeader.php | 1 - 28 files changed, 26 insertions(+), 56 deletions(-) diff --git a/src/Traits/Configuration/ActionsConfiguration.php b/src/Traits/Configuration/ActionsConfiguration.php index 31cd4f13e..4c9e76ce5 100644 --- a/src/Traits/Configuration/ActionsConfiguration.php +++ b/src/Traits/Configuration/ActionsConfiguration.php @@ -4,8 +4,6 @@ trait ActionsConfiguration { - - public function setActionsInToolbar(bool $status): self { $this->displayActionsInToolbar = $status; diff --git a/src/Traits/Configuration/CollapsingColumnConfiguration.php b/src/Traits/Configuration/CollapsingColumnConfiguration.php index 815209017..88e883e7d 100644 --- a/src/Traits/Configuration/CollapsingColumnConfiguration.php +++ b/src/Traits/Configuration/CollapsingColumnConfiguration.php @@ -24,6 +24,4 @@ public function setCollapsingColumnsDisabled(): self return $this; } - - } diff --git a/src/Traits/Configuration/PaginationConfiguration.php b/src/Traits/Configuration/PaginationConfiguration.php index 39a10ea60..4f43c688b 100644 --- a/src/Traits/Configuration/PaginationConfiguration.php +++ b/src/Traits/Configuration/PaginationConfiguration.php @@ -175,5 +175,4 @@ public function setShouldRetrieveTotalItemCountDisabled(): self return $this; } - } diff --git a/src/Traits/Configuration/ReorderingConfiguration.php b/src/Traits/Configuration/ReorderingConfiguration.php index 1c1b3ed46..f926b0227 100644 --- a/src/Traits/Configuration/ReorderingConfiguration.php +++ b/src/Traits/Configuration/ReorderingConfiguration.php @@ -81,5 +81,4 @@ public function setDefaultReorderSort(string $field, string $direction = 'asc'): return $this; } - } diff --git a/src/Traits/Helpers/ActionsHelpers.php b/src/Traits/Helpers/ActionsHelpers.php index 7fc22ec70..47b3880c1 100644 --- a/src/Traits/Helpers/ActionsHelpers.php +++ b/src/Traits/Helpers/ActionsHelpers.php @@ -20,7 +20,6 @@ public function getActionsPosition(): string return $this->actionsPosition ?? 'right'; } - #[Computed] public function hasActions(): bool { diff --git a/src/Traits/Helpers/FooterHelpers.php b/src/Traits/Helpers/FooterHelpers.php index 9b825deb0..655a38cf5 100644 --- a/src/Traits/Helpers/FooterHelpers.php +++ b/src/Traits/Helpers/FooterHelpers.php @@ -40,5 +40,4 @@ public function useHeaderAsFooterIsDisabled(): bool { return $this->getUseHeaderAsFooterStatus() === false; } - } diff --git a/src/Traits/Helpers/PaginationHelpers.php b/src/Traits/Helpers/PaginationHelpers.php index 343a8d308..801ee7a49 100644 --- a/src/Traits/Helpers/PaginationHelpers.php +++ b/src/Traits/Helpers/PaginationHelpers.php @@ -157,5 +157,4 @@ public function getShouldRetrieveTotalItemCount(): bool { return $this->shouldRetrieveTotalItemCount; } - } diff --git a/src/Traits/Helpers/SecondaryHeaderHelpers.php b/src/Traits/Helpers/SecondaryHeaderHelpers.php index 3e18d60f1..7abc4c1b1 100644 --- a/src/Traits/Helpers/SecondaryHeaderHelpers.php +++ b/src/Traits/Helpers/SecondaryHeaderHelpers.php @@ -23,5 +23,4 @@ public function secondaryHeaderIsDisabled(): bool { return $this->getSecondaryHeaderStatus() === false; } - } diff --git a/src/Traits/Styling/Configuration/ActionsStylingConfiguration.php b/src/Traits/Styling/Configuration/ActionsStylingConfiguration.php index 042e0c17b..51b3a3f99 100644 --- a/src/Traits/Styling/Configuration/ActionsStylingConfiguration.php +++ b/src/Traits/Styling/Configuration/ActionsStylingConfiguration.php @@ -10,4 +10,4 @@ public function setActionWrapperAttributes(array $actionWrapperAttributes): self return $this; } -} \ No newline at end of file +} diff --git a/src/Traits/Styling/Configuration/CollapsingColumnsStylingConfiguration.php b/src/Traits/Styling/Configuration/CollapsingColumnsStylingConfiguration.php index d78a413ed..9ab487907 100644 --- a/src/Traits/Styling/Configuration/CollapsingColumnsStylingConfiguration.php +++ b/src/Traits/Styling/Configuration/CollapsingColumnsStylingConfiguration.php @@ -27,5 +27,4 @@ public function setCollapsingColumnButtonExpandAttributes(array $collapsingColum return $this; } - -} \ No newline at end of file +} diff --git a/src/Traits/Styling/Configuration/FooterStylingConfiguration.php b/src/Traits/Styling/Configuration/FooterStylingConfiguration.php index 640e8891c..cd1348520 100644 --- a/src/Traits/Styling/Configuration/FooterStylingConfiguration.php +++ b/src/Traits/Styling/Configuration/FooterStylingConfiguration.php @@ -19,5 +19,4 @@ public function setFooterTdAttributes(Closure $callback): self return $this; } - -} \ No newline at end of file +} diff --git a/src/Traits/Styling/Configuration/PaginationStylingConfiguration.php b/src/Traits/Styling/Configuration/PaginationStylingConfiguration.php index 73a25aa2e..20b3cb898 100644 --- a/src/Traits/Styling/Configuration/PaginationStylingConfiguration.php +++ b/src/Traits/Styling/Configuration/PaginationStylingConfiguration.php @@ -4,7 +4,6 @@ trait PaginationStylingConfiguration { - public function setPerPageFieldAttributes(array $attributes = []): self { $this->perPageFieldAttributes = [...$this->perPageFieldAttributes, ...$attributes]; @@ -18,4 +17,4 @@ public function setPaginationWrapperAttributes(array $paginationWrapperAttribute return $this; } -} \ No newline at end of file +} diff --git a/src/Traits/Styling/Configuration/ReorderStylingConfiguration.php b/src/Traits/Styling/Configuration/ReorderStylingConfiguration.php index a705eeb74..893d249b4 100644 --- a/src/Traits/Styling/Configuration/ReorderStylingConfiguration.php +++ b/src/Traits/Styling/Configuration/ReorderStylingConfiguration.php @@ -4,7 +4,6 @@ trait ReorderStylingConfiguration { - /** * Used to set attributes for the for Reorder Column */ @@ -14,5 +13,4 @@ public function setReorderThAttributes(array $reorderThAttributes): self return $this; } - -} \ No newline at end of file +} diff --git a/src/Traits/Styling/Configuration/SecondaryHeaderStylingConfiguration.php b/src/Traits/Styling/Configuration/SecondaryHeaderStylingConfiguration.php index 0b0c3dde3..b01c1d008 100644 --- a/src/Traits/Styling/Configuration/SecondaryHeaderStylingConfiguration.php +++ b/src/Traits/Styling/Configuration/SecondaryHeaderStylingConfiguration.php @@ -19,4 +19,4 @@ public function setSecondaryHeaderTdAttributes(Closure $callback): self return $this; } -} \ No newline at end of file +} diff --git a/src/Traits/Styling/HasActionsStyling.php b/src/Traits/Styling/HasActionsStyling.php index 57d6a691f..9e32c1dac 100644 --- a/src/Traits/Styling/HasActionsStyling.php +++ b/src/Traits/Styling/HasActionsStyling.php @@ -11,5 +11,4 @@ trait HasActionsStyling ActionsStylingHelpers; protected array $actionWrapperAttributes = ['class' => '', 'default-styling' => true, 'default-colors' => true]; - -} \ No newline at end of file +} diff --git a/src/Traits/Styling/HasCollapsingColumnsStyling.php b/src/Traits/Styling/HasCollapsingColumnsStyling.php index 261ff3ddf..080130f78 100644 --- a/src/Traits/Styling/HasCollapsingColumnsStyling.php +++ b/src/Traits/Styling/HasCollapsingColumnsStyling.php @@ -8,10 +8,9 @@ trait HasCollapsingColumnsStyling { use CollapsingColumnsStylingConfiguration, - CollapsingColumnsStylingHelpers; - + CollapsingColumnsStylingHelpers; + protected array $collapsingColumnButtonCollapseAttributes = ['default-styling' => true, 'default-colors' => true]; protected array $collapsingColumnButtonExpandAttributes = ['default-styling' => true, 'default-colors' => true]; - -} \ No newline at end of file +} diff --git a/src/Traits/Styling/HasFooterStyling.php b/src/Traits/Styling/HasFooterStyling.php index 9d829919c..1ef3dc394 100644 --- a/src/Traits/Styling/HasFooterStyling.php +++ b/src/Traits/Styling/HasFooterStyling.php @@ -14,5 +14,4 @@ trait HasFooterStyling protected ?Closure $footerTrAttributesCallback; protected ?Closure $footerTdAttributesCallback; - -} \ No newline at end of file +} diff --git a/src/Traits/Styling/HasPaginationStyling.php b/src/Traits/Styling/HasPaginationStyling.php index 5f6315065..907758656 100644 --- a/src/Traits/Styling/HasPaginationStyling.php +++ b/src/Traits/Styling/HasPaginationStyling.php @@ -13,4 +13,4 @@ trait HasPaginationStyling protected array $perPageFieldAttributes = ['default-styling' => true, 'default-colors' => true, 'class' => '']; protected array $paginationWrapperAttributes = ['class' => '']; -} \ No newline at end of file +} diff --git a/src/Traits/Styling/HasReorderStyling.php b/src/Traits/Styling/HasReorderStyling.php index ad6f168a2..cc946cd61 100644 --- a/src/Traits/Styling/HasReorderStyling.php +++ b/src/Traits/Styling/HasReorderStyling.php @@ -11,5 +11,4 @@ trait HasReorderStyling ReorderStylingHelpers; protected array $reorderThAttributes = ['default' => true]; - -} \ No newline at end of file +} diff --git a/src/Traits/Styling/HasSecondaryHeaderStyling.php b/src/Traits/Styling/HasSecondaryHeaderStyling.php index 06cc43c44..036084bbd 100644 --- a/src/Traits/Styling/HasSecondaryHeaderStyling.php +++ b/src/Traits/Styling/HasSecondaryHeaderStyling.php @@ -2,17 +2,16 @@ namespace Rappasoft\LaravelLivewireTables\Traits\Styling; +use Closure; use Rappasoft\LaravelLivewireTables\Traits\Styling\Configuration\SecondaryHeaderStylingConfiguration; use Rappasoft\LaravelLivewireTables\Traits\Styling\Helpers\SecondaryHeaderStylingHelpers; -use Closure; trait HasSecondaryHeaderStyling { use SecondaryHeaderStylingConfiguration, SecondaryHeaderStylingHelpers; - protected ?Closure $secondaryHeaderTrAttributesCallback; + protected ?Closure $secondaryHeaderTrAttributesCallback; - protected ?Closure $secondaryHeaderTdAttributesCallback; - -} \ No newline at end of file + protected ?Closure $secondaryHeaderTdAttributesCallback; +} diff --git a/src/Traits/Styling/Helpers/ActionsStylingHelpers.php b/src/Traits/Styling/Helpers/ActionsStylingHelpers.php index ddbe043b0..b2476f647 100644 --- a/src/Traits/Styling/Helpers/ActionsStylingHelpers.php +++ b/src/Traits/Styling/Helpers/ActionsStylingHelpers.php @@ -11,6 +11,4 @@ public function getActionWrapperAttributes(): array { return [...['class' => '', 'default-styling' => true, 'default-colors' => true], ...$this->actionWrapperAttributes]; } - - -} \ No newline at end of file +} diff --git a/src/Traits/Styling/Helpers/CollapsingColumnsStylingHelpers.php b/src/Traits/Styling/Helpers/CollapsingColumnsStylingHelpers.php index 70e7a757d..416c79444 100644 --- a/src/Traits/Styling/Helpers/CollapsingColumnsStylingHelpers.php +++ b/src/Traits/Styling/Helpers/CollapsingColumnsStylingHelpers.php @@ -4,8 +4,8 @@ use Livewire\Attributes\Computed; -trait CollapsingColumnsStylingHelpers { - +trait CollapsingColumnsStylingHelpers +{ /** * Retrieves attributes for the Collapsed Column Collapse Button * @@ -27,6 +27,4 @@ public function getCollapsingColumnButtonExpandAttributes(): array { return [...['default-styling' => true, 'default-colors' => true], ...$this->collapsingColumnButtonExpandAttributes]; } - - -} \ No newline at end of file +} diff --git a/src/Traits/Styling/Helpers/FooterStylingHelpers.php b/src/Traits/Styling/Helpers/FooterStylingHelpers.php index fe8ba78fe..8fc76e056 100644 --- a/src/Traits/Styling/Helpers/FooterStylingHelpers.php +++ b/src/Traits/Styling/Helpers/FooterStylingHelpers.php @@ -23,5 +23,4 @@ public function getFooterTdAttributes(Column $column, $rows, int $index): array { return isset($this->footerTdAttributesCallback) ? call_user_func($this->footerTdAttributesCallback, $column, $rows, $index) : ['default' => true]; } - -} \ No newline at end of file +} diff --git a/src/Traits/Styling/Helpers/PaginationStylingHelpers.php b/src/Traits/Styling/Helpers/PaginationStylingHelpers.php index ee112d9ca..064db4cdf 100644 --- a/src/Traits/Styling/Helpers/PaginationStylingHelpers.php +++ b/src/Traits/Styling/Helpers/PaginationStylingHelpers.php @@ -23,5 +23,4 @@ public function getPaginationWrapperAttributesBag(): ComponentAttributeBag { return new ComponentAttributeBag($this->getPaginationWrapperAttributes()); } - -} \ No newline at end of file +} diff --git a/src/Traits/Styling/Helpers/ReorderStylingHelpers.php b/src/Traits/Styling/Helpers/ReorderStylingHelpers.php index d7d2592a4..2f6020d55 100644 --- a/src/Traits/Styling/Helpers/ReorderStylingHelpers.php +++ b/src/Traits/Styling/Helpers/ReorderStylingHelpers.php @@ -6,7 +6,6 @@ trait ReorderStylingHelpers { - /** * Used to get attributes for the for Bulk Actions * @@ -23,5 +22,4 @@ public function hasReorderThAttributes(): bool { return $this->getReorderThAttributes() != ['default' => true]; } - -} \ No newline at end of file +} diff --git a/src/Traits/Styling/Helpers/SecondaryHeaderStylingHelpers.php b/src/Traits/Styling/Helpers/SecondaryHeaderStylingHelpers.php index 5ed24a6fd..785acc107 100644 --- a/src/Traits/Styling/Helpers/SecondaryHeaderStylingHelpers.php +++ b/src/Traits/Styling/Helpers/SecondaryHeaderStylingHelpers.php @@ -23,5 +23,4 @@ public function getSecondaryHeaderTdAttributes(Column $column, $rows, int $index { return isset($this->secondaryHeaderTdAttributesCallback) ? call_user_func($this->secondaryHeaderTdAttributesCallback, $column, $rows, $index) : ['default' => true]; } - -} \ No newline at end of file +} diff --git a/src/Traits/WithActions.php b/src/Traits/WithActions.php index 153581f19..d8bd5dea2 100644 --- a/src/Traits/WithActions.php +++ b/src/Traits/WithActions.php @@ -12,7 +12,7 @@ trait WithActions use ActionsConfiguration, ActionsHelpers, HasActionsStyling; - + protected bool $displayActionsInToolbar = false; protected string $actionsPosition = 'right'; diff --git a/src/Traits/WithSecondaryHeader.php b/src/Traits/WithSecondaryHeader.php index 1d4b40f16..11b08d51a 100644 --- a/src/Traits/WithSecondaryHeader.php +++ b/src/Traits/WithSecondaryHeader.php @@ -16,7 +16,6 @@ trait WithSecondaryHeader protected bool $columnsWithSecondaryHeader = false; - public function bootedWithSecondaryHeader(): void { $this->setupSecondaryHeader();