diff --git a/resources/views/components/includes/actions.blade.php b/resources/views/components/includes/actions.blade.php index db8925279..035c8397a 100644 --- a/resources/views/components/includes/actions.blade.php +++ b/resources/views/components/includes/actions.blade.php @@ -4,14 +4,14 @@ ->class(['' => $this->isTailwind && $this->getActionWrapperAttributes['default-colors'] ?? true]) ->class(['d-flex flex-cols py-2 space-x-2' => $this->isBootstrap && $this->getActionWrapperAttributes['default-styling'] ?? true]) ->class(['' => $this->isBootstrap && $this->getActionWrapperAttributes['default-colors'] ?? true]) - ->class(['justify-start' => $this->getActionsPosition == 'left']) - ->class(['justify-center' => $this->getActionsPosition == 'center']) - ->class(['justify-end' => $this->getActionsPosition == 'right']) - ->class(['pl-2' => $this->showActionsInToolbar && $this->getActionsPosition == 'left']) - ->class(['pr-2' => $this->showActionsInToolbar && $this->getActionsPosition == 'right']) + ->class(['justify-start' => $this->getActionsPosition === 'left']) + ->class(['justify-center' => $this->getActionsPosition === 'center']) + ->class(['justify-end' => $this->getActionsPosition === 'right']) + ->class(['pl-2' => $this->showActionsInToolbar && $this->getActionsPosition === 'left']) + ->class(['pr-2' => $this->showActionsInToolbar && $this->getActionsPosition === 'right']) ->except(['default','default-styling','default-colors']) }} > @foreach($this->getActions as $action) {{ $action->render() }} @endforeach - \ No newline at end of file + diff --git a/resources/views/components/includes/loading.blade.php b/resources/views/components/includes/loading.blade.php index b8c988e88..ef88b43e8 100644 --- a/resources/views/components/includes/loading.blade.php +++ b/resources/views/components/includes/loading.blade.php @@ -2,9 +2,9 @@ @props(['colCount' => 1]) @php -$loaderRow = $this->getLoadingPlaceHolderRowAttributes(); -$loaderCell = $this->getLoadingPlaceHolderCellAttributes(); -$loaderIcon = $this->getLoadingPlaceHolderIconAttributes(); + $loaderRow = $this->getLoadingPlaceHolderRowAttributes(); + $loaderCell = $this->getLoadingPlaceHolderCellAttributes(); + $loaderIcon = $this->getLoadingPlaceHolderIconAttributes(); @endphp merge($loaderIcon) ->class(['lds-hourglass' => $this->isTailwind && ($loaderIcon['default'] ?? true)]) ->class(['lds-hourglass' => $this->isBootstrap && ($loaderIcon['default'] ?? true)]) - ->except(['default','default-styling','default-colors']); + ->except(['default','default-styling','default-colors']) }}>
{!! $this->getLoadingPlaceholderContent() !!}
@endif - diff --git a/resources/views/components/table.blade.php b/resources/views/components/table.blade.php index 297548694..331c0b25f 100644 --- a/resources/views/components/table.blade.php +++ b/resources/views/components/table.blade.php @@ -21,7 +21,7 @@ {{ $attributes->merge($customAttributes['table']) ->class(['min-w-full divide-y divide-gray-200 dark:divide-none' => $customAttributes['table']['default'] ?? true]) ->except(['default','default-styling','default-colors']) }} - + > merge($customAttributes['thead']) @@ -43,11 +43,11 @@ {{ $slot }} - @if (isset($tfoot)) + @isset($tfoot) {{ $tfoot }} - @endif + @endisset @elseif ($isBootstrap) @@ -84,11 +84,11 @@ {{ $slot }} - @if (isset($tfoot)) + @isset($tfoot) {{ $tfoot }} - @endif + @endisset @endif diff --git a/resources/views/components/table/collapsed-columns.blade.php b/resources/views/components/table/collapsed-columns.blade.php index 44bb45d9f..b15e9cf20 100644 --- a/resources/views/components/table/collapsed-columns.blade.php +++ b/resources/views/components/table/collapsed-columns.blade.php @@ -50,18 +50,19 @@ colspan="{{ $colspan }}" >
+ @php /** @var \Rappasoft\LaravelLivewireTables\Views\Column $column */ @endphp @foreach($columns as $colIndex => $column) @continue($column->isHidden()) @continue($this->columnSelectIsEnabled() && ! $this->columnSelectIsEnabledForColumn($column))

$isTailwind && $column->shouldCollapseAlways(), 'block mb-2 sm:hidden' => $isTailwind && !$column->shouldCollapseAlways() && !$column->shouldCollapseOnTablet() && !$column->shouldCollapseOnMobile(), 'block mb-2 md:hidden' => $isTailwind && !$column->shouldCollapseAlways() && !$column->shouldCollapseOnTablet() && $column->shouldCollapseOnMobile(), 'block mb-2 lg:hidden' => $isTailwind && !$column->shouldCollapseAlways() && ($column->shouldCollapseOnTablet() || $column->shouldCollapseOnMobile()), - + 'd-block mb-2' => $isBootstrap && $column->shouldCollapseAlways(), 'd-block mb-2 d-sm-none' => $isBootstrap && !$column->shouldCollapseAlways() && !$column->shouldCollapseOnTablet() && !$column->shouldCollapseOnMobile(), 'd-block mb-2 d-md-none' => $isBootstrap && !$column->shouldCollapseAlways() && !$column->shouldCollapseOnTablet() && $column->shouldCollapseOnMobile(), diff --git a/resources/views/components/table/td.blade.php b/resources/views/components/table/td.blade.php index 0ba2f050d..8320d2d9f 100644 --- a/resources/views/components/table/td.blade.php +++ b/resources/views/components/table/td.blade.php @@ -2,12 +2,13 @@ @props(['column', 'colIndex']) @php + /** @var \Rappasoft\LaravelLivewireTables\Views\Column $column */ $customAttributes = $this->getTdAttributes($column, $row, $colIndex, $rowIndex) @endphp isClickable()) - @if($this->getTableRowUrlTarget($row) === "navigate") wire:navigate href="{{ $this->getTableRowUrl($row) }}" + @if($this->getTableRowUrlTarget($row) === 'navigate') wire:navigate href="{{ $this->getTableRowUrl($row) }}" @else onclick="window.open('{{ $this->getTableRowUrl($row) }}', '{{ $this->getTableRowUrlTarget($row) ?? '_self' }}')" @endif @endif diff --git a/resources/views/components/table/td/plain.blade.php b/resources/views/components/table/td/plain.blade.php index d2e9ffb6f..824bcf2af 100644 --- a/resources/views/components/table/td/plain.blade.php +++ b/resources/views/components/table/td/plain.blade.php @@ -1,6 +1,8 @@ @aware(['component', 'rowIndex', 'rowID','isTailwind','isBootstrap']) @props(['column' => null, 'customAttributes' => [], 'displayMinimisedOnReorder' => false, 'hideUntilReorder' => false]) +@php /** @var \Rappasoft\LaravelLivewireTables\Views\Column|null $column */ @endphp + @if ($isTailwind) merge($customAttributes) diff --git a/resources/views/components/table/th.blade.php b/resources/views/components/table/th.blade.php index 3afee536c..ee837bf28 100644 --- a/resources/views/components/table/th.blade.php +++ b/resources/views/components/table/th.blade.php @@ -2,6 +2,7 @@ @props(['column', 'index']) @php + /** @var \Rappasoft\LaravelLivewireTables\Views\Column $column */ $attributes = $attributes->merge(['wire:key' => $tableName . '-header-col-'.$column->getSlug()]); $allThAttributes = $this->getAllThAttributes($column); @@ -41,7 +42,7 @@ }} > except(['default', 'default-colors', 'default-styling']) }}>{{ $column->getTitle() }} - merge($customSortIconAttributes) ->except(['default', 'default-colors', 'default-styling', 'wire:key']) diff --git a/resources/views/components/tools.blade.php b/resources/views/components/tools.blade.php index bdb31a745..d40efaed3 100644 --- a/resources/views/components/tools.blade.php +++ b/resources/views/components/tools.blade.php @@ -1,11 +1,11 @@ @aware(['component','isTailwind','isBootstrap']) @php($toolsAttributes = $this->getToolsAttributesBag()) -

merge() ->class(['flex-col' => $isTailwind && ($toolsAttributes['default-styling'] ?? true)]) ->class(['d-flex flex-column' => $isBootstrap && ($toolsAttributes['default-styling'] ?? true)]) - ->except(['default','default-styling','default-colors']) + ->except(['default','default-styling','default-colors']) }} > {{ $slot }} diff --git a/resources/views/components/tools/filter-label.blade.php b/resources/views/components/tools/filter-label.blade.php index 6fc9022dc..eb81b92d3 100644 --- a/resources/views/components/tools/filter-label.blade.php +++ b/resources/views/components/tools/filter-label.blade.php @@ -2,10 +2,11 @@ @props(['filter', 'filterLayout' => 'popover', 'tableName' => 'table', 'isTailwind' => false, 'isBootstrap' => false, 'isBootstrap4' => false, 'isBootstrap5' => false, 'for' => null]) @php + /** @var \Rappasoft\LaravelLivewireTables\Views\Filter $filter */ $filterLabelAttributes = $filter->getFilterLabelAttributes(); $customLabelAttributes = $filter->getLabelAttributes(); - @endphp + @if($filter->hasCustomFilterLabel() && !$filter->hasCustomPosition()) @include($filter->getCustomFilterLabel(),['filter' => $filter, 'filterLayout' => $filterLayout, 'tableName' => $tableName, 'isTailwind' => $isTailwind, 'isBootstrap' => $isBootstrap, 'isBootstrap4' => $isBootstrap4, 'isBootstrap5' => $isBootstrap5, 'customLabelAttributes' => $customLabelAttributes]) @elseif(!$filter->hasCustomPosition()) @@ -14,13 +15,12 @@ {{ $attributes->merge($customLabelAttributes)->merge($filterLabelAttributes) ->class(['block text-sm font-medium leading-5 text-gray-700 dark:text-white' => $isTailwind && ($filterLabelAttributes['default'] ?? true)]) - ->class(['d-block' => $isBootstrap && $filterLayout == 'slide-down' && ($filterLabelAttributes['default'] ?? true)]) - ->class(['mb-2' => $isBootstrap && $filterLayout == 'popover' && ($filterLabelAttributes['default'] ?? true)]) + ->class(['d-block' => $isBootstrap && $filterLayout === 'slide-down' && ($filterLabelAttributes['default'] ?? true)]) + ->class(['mb-2' => $isBootstrap && $filterLayout === 'popover' && ($filterLabelAttributes['default'] ?? true)]) ->except(['default', 'default-colors', 'default-styling']) }} > {{ $filter->getName() }} - @endif diff --git a/resources/views/components/tools/filter-pills.blade.php b/resources/views/components/tools/filter-pills.blade.php index ba84a9b74..400de52b9 100644 --- a/resources/views/components/tools/filter-pills.blade.php +++ b/resources/views/components/tools/filter-pills.blade.php @@ -14,6 +14,7 @@ @foreach($this->getAppliedFiltersWithValues() as $filterSelectName => $value) + @php /** @var \Rappasoft\LaravelLivewireTables\Views\Filter $filter */ @endphp @php($filter = $this->getFilterByKey($filterSelectName)) @continue(is_null($filter) || $filter->isHiddenFromPills()) @php( $filterPillTitle = $filter->getFilterPillTitle()) @@ -31,4 +32,3 @@
@endif - diff --git a/resources/views/components/tools/filter-pills/buttons/reset-all.blade.php b/resources/views/components/tools/filter-pills/buttons/reset-all.blade.php index 78a42dc21..508c3e201 100644 --- a/resources/views/components/tools/filter-pills/buttons/reset-all.blade.php +++ b/resources/views/components/tools/filter-pills/buttons/reset-all.blade.php @@ -3,11 +3,11 @@ - - - +