@php use Filament\Support\Enums\Alignment; use Webkul\Support\Filament\Infolists\Components\Repeater\TableColumn; $items = $getItems(); $tableColumns = $getTableColumns(); $extraActions = $getExtraItemActions(); $hasExtraActions = ! empty($extraActions); $hasColumnManager = $hasColumnManager(); $attributes = $getExtraAttributeBag() ->class(['fi-fo-table-repeater', 'fi-compact']); $hasSummary = $hasAnySummarizers(); $hasResizableColumns = collect($tableColumns)->contains(fn (TableColumn $column) => $column->isResizable()); $resizableColumnConfig = collect($tableColumns)->mapWithKeys(function (TableColumn $column) { return [$column->getName() => [ 'isResizable' => $column->isResizable(), 'minWidth' => $column->getMinWidth(), 'maxWidth' => $column->getMaxWidth(), 'width' => $column->getWidth(), ]]; })->toArray(); @endphp @if (empty($items)) @php $tooltip = $getEmptyTooltip(); $attributes = $attributes->merge([ 'x-tooltip' => filled($tooltip) ? '{content: ' . Js::from($tooltip) . ', theme: $store.theme, allowHTML: ' . Js::from($tooltip instanceof \Illuminate\Contracts\Support\Htmlable) . '}' : null, ], escape: false); @endphp
@if (filled($placeholder = $getPlaceholder()))

{{ $placeholder }}

@endif
@else
@foreach ($tableColumns as $column) @php $columnName = $column->getName(); $columnWidth = $column->getWidth(); $columnAlignment = $column->getAlignment(); $isResizable = $column->isResizable(); $alignmentClass = $columnAlignment instanceof \Filament\Support\Enums\Alignment ? 'fi-align-' . $columnAlignment->value : $columnAlignment; @endphp @endforeach @if ($hasColumnManager) @endif @foreach ($items as $index => $item) @php $visibleColumns = collect($tableColumns) ->mapWithKeys(fn ($col) => [$col->getName() => $col]); @endphp @foreach ($item->getComponents(withHidden: true) as $component) @continue(! ($component instanceof \Filament\Schemas\Components\Component)) @continue(! $visibleColumns->has($component->getName())) @endforeach @if ($hasExtraActions) @endif @endforeach @if ($hasSummary) @foreach ($tableColumns as $tableColumn) @endforeach @if ($hasColumnManager) @endif @endif
filled($columnWidth), ]) @endif >
@if (! $column->isHeaderLabelHidden()) {{ $column->getLabel() }} @else {{ $column->getLabel() }} @endif
@if ($isResizable && $hasResizableColumns)
@endif
{!! $getColumnManagerTriggerAction()->toHtml() !!}
{!! $component->toHtml() !!}
@foreach ($extraActions as $action) @php $action = $action(['item' => $index]); @endphp
{!! $action->toHtml() !!}
@endforeach
@if ($tableColumn->hasSummarizer()) {{ $getSummaryForColumn($tableColumn->getName()) }} @endif
@endif