@php use Filament\Tables\Actions\Position as ActionsPosition; use Filament\Tables\Filters\Layout as FiltersLayout; use Filament\Tables\Actions\RecordCheckboxPosition; $actions = $getActions(); $actionsPosition = $getActionsPosition(); $actionsColumnLabel = $getActionsColumnLabel(); $columns = $getColumns(); $collapsibleColumnsLayout = $getCollapsibleColumnsLayout(); $content = $getContent(); $contentGrid = $getContentGrid(); $contentFooter = $getContentFooter(); $filterIndicators = collect($getFilters()) ->mapWithKeys(fn (\Filament\Tables\Filters\BaseFilter $filter): array => [$filter->getName() => $filter->getIndicators()]) ->filter(fn (array $indicators): bool => count($indicators)) ->all(); $hasColumnsLayout = $hasColumnsLayout(); $header = $getHeader(); $headerActions = $getHeaderActions(); $heading = $getHeading(); $description = $getDescription(); $isReorderable = $isReorderable(); $isReordering = $isReordering(); $isColumnSearchVisible = $isSearchableByColumn(); $isGlobalSearchVisible = $isSearchable(); $isSelectionEnabled = $isSelectionEnabled(); $recordCheckboxPosition = $getRecordCheckboxPosition(); $isStriped = $isStriped(); $hasFilters = $isFilterable(); $hasFiltersPopover = $hasFilters && ($getFiltersLayout() === FiltersLayout::Popover); $hasFiltersAboveContent = $hasFilters && ($getFiltersLayout() === FiltersLayout::AboveContent); $hasFiltersAfterContent = $hasFilters && ($getFiltersLayout() === FiltersLayout::BelowContent); $isColumnToggleFormVisible = $hasToggleableColumns(); $records = $getRecords(); $columnsCount = count($columns); if (count($actions) && (! $isReordering)) $columnsCount++; if ($isSelectionEnabled || $isReordering) $columnsCount++; $getHiddenClasses = function (\Filament\Tables\Columns\Column $column): ?string { if ($breakpoint = $column->getHiddenFrom()) { return match ($breakpoint) { 'sm' => 'sm:hidden', 'md' => 'md:hidden', 'lg' => 'lg:hidden', 'xl' => 'xl:hidden', '2xl' => '2xl:hidden', }; } if ($breakpoint = $column->getVisibleFrom()) { return match ($breakpoint) { 'sm' => 'hidden sm:table-cell', 'md' => 'hidden md:table-cell', 'lg' => 'hidden lg:table-cell', 'xl' => 'hidden xl:table-cell', '2xl' => 'hidden 2xl:table-cell', }; } return null; }; @endphp