Skip to content

Commit

Permalink
Add HasAllTraits Trait
Browse files Browse the repository at this point in the history
  • Loading branch information
lrljoe authored Nov 1, 2023
1 parent 90b8cbf commit 9cafd64
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 40 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ All notable changes to `laravel-livewire-tables` will be documented in this file

## UNRELEASED
- Split ConfigurableAreas, CollapsingColumns and TableAttributes into own Traits/Config/Helper Files for Maintainability by @lrljoe in [#1514](https://github.com/rappasoft/laravel-livewire-tables/pull/1514)
- Add "HasAllTraits" for Maintainability by @lrljoe in [#1514](https://github.com/rappasoft/laravel-livewire-tables/pull/1514)

## [v3.1.0] - 2023-10-31
- Restore wire:confirm for Bulk Actions
Expand Down
42 changes: 2 additions & 40 deletions src/DataTableComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,49 +5,11 @@
use Illuminate\Database\Eloquent\Builder;
use Livewire\Component;
use Rappasoft\LaravelLivewireTables\Exceptions\DataTableConfigurationException;
use Rappasoft\LaravelLivewireTables\Traits\ComponentUtilities;
use Rappasoft\LaravelLivewireTables\Traits\WithBulkActions;
use Rappasoft\LaravelLivewireTables\Traits\WithCollapsingColumns;
use Rappasoft\LaravelLivewireTables\Traits\WithColumns;
use Rappasoft\LaravelLivewireTables\Traits\WithColumnSelect;
use Rappasoft\LaravelLivewireTables\Traits\WithConfigurableAreas;
use Rappasoft\LaravelLivewireTables\Traits\WithData;
use Rappasoft\LaravelLivewireTables\Traits\WithDebugging;
use Rappasoft\LaravelLivewireTables\Traits\WithEvents;
use Rappasoft\LaravelLivewireTables\Traits\WithFilters;
use Rappasoft\LaravelLivewireTables\Traits\WithFooter;
use Rappasoft\LaravelLivewireTables\Traits\WithLoadingPlaceholder;
use Rappasoft\LaravelLivewireTables\Traits\WithPagination;
use Rappasoft\LaravelLivewireTables\Traits\WithQueryString;
use Rappasoft\LaravelLivewireTables\Traits\WithRefresh;
use Rappasoft\LaravelLivewireTables\Traits\WithReordering;
use Rappasoft\LaravelLivewireTables\Traits\WithSearch;
use Rappasoft\LaravelLivewireTables\Traits\WithSecondaryHeader;
use Rappasoft\LaravelLivewireTables\Traits\WithSorting;
use Rappasoft\LaravelLivewireTables\Traits\WithTableAttributes;
use Rappasoft\LaravelLivewireTables\Traits\HasAllTraits;

abstract class DataTableComponent extends Component
{
use ComponentUtilities,
WithBulkActions,
WithCollapsingColumns,
WithColumns,
WithColumnSelect,
WithConfigurableAreas,
WithData,
WithDebugging,
WithEvents,
WithFilters,
WithFooter,
WithLoadingPlaceholder,
WithPagination,
WithQueryString,
WithRefresh,
WithReordering,
WithSearch,
WithSecondaryHeader,
WithSorting,
WithTableAttributes;
use HasAllTraits;

/** @phpstan-ignore-next-line */
protected $listeners = [
Expand Down
28 changes: 28 additions & 0 deletions src/Traits/HasAllTraits.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php

namespace Rappasoft\LaravelLivewireTables\Traits;

trait HasAllTraits
{
use ComponentUtilities,
WithBulkActions,
WithCollapsingColumns,
WithColumns,
WithColumnSelect,
WithConfigurableAreas,
WithData,
WithDebugging,
WithEvents,
WithFilters,
WithFooter,
WithLoadingPlaceholder,
WithPagination,
WithQueryString,
WithRefresh,
WithReordering,
WithSearch,
WithSecondaryHeader,
WithSorting,
WithTableAttributes;

}

0 comments on commit 9cafd64

Please sign in to comment.