Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Typehinting from Blades #2097

Merged
merged 1 commit into from
Nov 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
colspan="{{ $colspan }}"
>
<div>
@php /** @var \Rappasoft\LaravelLivewireTables\Views\Column $column */ @endphp
@foreach($columns as $colIndex => $column)
@continue($column->isHidden())
@continue($this->columnSelectIsEnabled() && ! $this->columnSelectIsEnabledForColumn($column))
Expand Down
1 change: 0 additions & 1 deletion resources/views/components/table/td.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
@props(['column', 'colIndex'])

@php
/** @var \Rappasoft\LaravelLivewireTables\Views\Column $column */
$customAttributes = $this->getTdAttributes($column, $row, $colIndex, $rowIndex)
@endphp

Expand Down
1 change: 0 additions & 1 deletion resources/views/components/table/td/plain.blade.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
@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)
<td x-cloak {{ $attributes
Expand Down
1 change: 0 additions & 1 deletion resources/views/components/table/th.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
@props(['column', 'index'])

@php
/** @var \Rappasoft\LaravelLivewireTables\Views\Column $column */
$attributes = $attributes->merge(['wire:key' => $tableName . '-header-col-'.$column->getSlug()]);
$allThAttributes = $this->getAllThAttributes($column);

Expand Down
1 change: 0 additions & 1 deletion resources/views/components/tools/filter-label.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
@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
Expand Down
1 change: 0 additions & 1 deletion resources/views/components/tools/filter-pills.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
</small>

@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())
Expand Down
1 change: 0 additions & 1 deletion resources/views/components/tools/filters/boolean.blade.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
@php
/** @var \Rappasoft\LaravelLivewireTables\Views\Filters\BooleanFilter $filter */
$defaultValue = ($filter->hasFilterDefaultValue() ? (bool) $filter->getFilterDefaultValue() : false)
@endphp
<div class="flex flex-cols"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
@php
/** @var \Rappasoft\LaravelLivewireTables\Views\Filters\DateRangeFilter $filter */
$filterKey = $filter->getKey();
@endphp

Expand Down
1 change: 0 additions & 1 deletion resources/views/components/tools/filters/date.blade.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
@php /** @var \Rappasoft\LaravelLivewireTables\Views\Filters\DateFilter $filter */ @endphp
<div>
<x-livewire-tables::tools.filter-label :$filter :$filterLayout :$tableName :$isTailwind :$isBootstrap4 :$isBootstrap5 :$isBootstrap />
<div @class([
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
@php /** @var \Rappasoft\LaravelLivewireTables\Views\Filters\DateTimeFilter $filter */ @endphp
<div>
<x-livewire-tables::tools.filter-label :$filter :$filterLayout :$tableName :$isTailwind :$isBootstrap4 :$isBootstrap5 :$isBootstrap />

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
@php /** @var \Rappasoft\LaravelLivewireTables\Views\Filters\LivewireComponentArrayFilter $filter */ @endphp

<div wire:key="filterComponents.{{ $filter->getKey() }}-wrapper">
<x-livewire-tables::tools.filter-label :$filter :$filterLayout :$tableName :$isTailwind :$isBootstrap4 :$isBootstrap5 :$isBootstrap />
<livewire:dynamic-component :is="$livewireComponent" :tableComponent="get_class($this)" :filterKey="$filter->getKey()" :$tableName :key="'filterComponents-'.$filter->getKey()" wire:model="filterComponents.{{ $filter->getKey() }}" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
@php /** @var \Rappasoft\LaravelLivewireTables\Views\Filters\LivewireComponentFilter $filter */ @endphp

<div wire:key="filterComponents.{{ $filter->getKey() }}-wrapper">
<x-livewire-tables::tools.filter-label :$filter :$filterLayout :$tableName :$isTailwind :$isBootstrap4 :$isBootstrap5 :$isBootstrap />
<livewire:dynamic-component :is="$livewireComponent" :tableComponent="get_class($this)" :filterKey="$filter->getKey()" :$tableName :key="'filterComponents-'.$filter->getKey()" wire:model.live="filterComponents.{{ $filter->getKey() }}" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
@php /** @var \Rappasoft\LaravelLivewireTables\Views\Filters\MultiSelectDropdownFilter $filter */ @endphp
<div>
<x-livewire-tables::tools.filter-label :$filter :$filterLayout :$tableName :$isTailwind :$isBootstrap4 :$isBootstrap5 :$isBootstrap />

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
@php /** @var \Rappasoft\LaravelLivewireTables\Views\Filters\MultiSelectFilter $filter */ @endphp
<div>
<x-livewire-tables::tools.filter-label :$filter :$filterLayout :$tableName :$isTailwind :$isBootstrap4 :$isBootstrap5 :$isBootstrap />

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
@php
/** @var \Rappasoft\LaravelLivewireTables\Views\Filters\NumberRangeFilter $filter */
$filterKey = $filter->getKey();
$currentMin = $minRange = $filter->getConfig('minRange');
$currentMax = $maxRange = $filter->getConfig('maxRange');
Expand Down
2 changes: 0 additions & 2 deletions resources/views/components/tools/filters/number.blade.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
@php /** @var \Rappasoft\LaravelLivewireTables\Views\Filters\NumberFilter $filter */ @endphp

<div>
<x-livewire-tables::tools.filter-label :$filter :$filterLayout :$tableName :$isTailwind :$isBootstrap4 :$isBootstrap5 :$isBootstrap />

Expand Down
2 changes: 0 additions & 2 deletions resources/views/components/tools/filters/select.blade.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
@php /** @var \Rappasoft\LaravelLivewireTables\Views\Filters\SelectFilter $filter */ @endphp

<div>
<x-livewire-tables::tools.filter-label :$filter :$filterLayout :$tableName :$isTailwind :$isBootstrap4 :$isBootstrap5 :$isBootstrap />

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
@php /** @var \Rappasoft\LaravelLivewireTables\Views\Filters\TextFilter $filter */ @endphp
<div>
<x-livewire-tables::tools.filter-label :$filter :$filterLayout :$tableName :$isTailwind :$isBootstrap4 :$isBootstrap5 :$isBootstrap />

Expand Down
3 changes: 0 additions & 3 deletions resources/views/components/tools/sorting-pills.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
<small class="text-gray-700 dark:text-white">{{ __($this->getLocalisationPath.'Applied Sorting') }}:</small>

@foreach($this->getSorts() as $columnSelectName => $direction)
@php /** @var \Rappasoft\LaravelLivewireTables\Views\Column|null $column */ @endphp
@php($column = $this->getColumnBySelectName($columnSelectName) ?? $this->getColumnBySlug($columnSelectName))

@continue(is_null($column))
Expand Down Expand Up @@ -49,7 +48,6 @@ class="focus:outline-none active:outline-none"
<small>{{ __($this->getLocalisationPath.'Applied Sorting') }}:</small>

@foreach($this->getSorts() as $columnSelectName => $direction)
@php /** @var \Rappasoft\LaravelLivewireTables\Views\Column|null $column */ @endphp
@php($column = $this->getColumnBySelectName($columnSelectName) ?? $this->getColumnBySlug($columnSelectName))

@continue(is_null($column))
Expand Down Expand Up @@ -90,7 +88,6 @@ class="badge badge-pill badge-light"
<small>{{ __($this->getLocalisationPath.'Applied Sorting') }}:</small>

@foreach($this->getSorts() as $columnSelectName => $direction)
@php /** @var \Rappasoft\LaravelLivewireTables\Views\Column|null $column */ @endphp
@php($column = $this->getColumnBySelectName($columnSelectName) ?? $this->getColumnBySlug($columnSelectName))

@continue(is_null($column))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
x-bind:class="{ 'show': filterPopoverOpen }"
role="menu"
>
@php /** @var \Rappasoft\LaravelLivewireTables\Views\Filter $filter */ @endphp
@foreach ($this->getVisibleFilters() as $filter)
<div
wire:key="{{ $tableName }}-filter-{{ $filter->getKey() }}-toolbar"
Expand Down Expand Up @@ -55,7 +54,6 @@ class="origin-top-left absolute left-0 mt-2 w-full md:w-56 rounded-md shadow-lg
aria-orientation="vertical"
aria-labelledby="filters-menu"
>
@php /** @var \Rappasoft\LaravelLivewireTables\Views\Filter $filter */ @endphp
@foreach ($this->getVisibleFilters() as $filter)
<div class="py-1" role="none">
<div
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
])
row="{{ $filterRowIndex }}"
>
@php /** @var \Rappasoft\LaravelLivewireTables\Views\Filter $filter */ @endphp
@foreach ($filterRow as $filter)
<div
@class([
Expand Down
1 change: 0 additions & 1 deletion resources/views/includes/actions/button.blade.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
@php /** @var \Rappasoft\LaravelLivewireTables\Views\Action $action */ @endphp
<a {{ $attributes->merge()
->class(['justify-center text-center items-center inline-flex space-x-2 rounded-md border shadow-sm px-4 py-2 text-sm font-medium focus:ring focus:ring-opacity-50' => $isTailwind && $attributes['default-styling'] ?? true])
->class(['focus:border-indigo-300 focus:ring-indigo-200' => $isTailwind && $attributes['default-colors'] ?? true])
Expand Down
2 changes: 0 additions & 2 deletions resources/views/includes/columns/link.blade.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
@php /** @var \Rappasoft\LaravelLivewireTables\Views\Columns\LinkColumn $column */ @endphp

<a href="{{ $path }}" {!! count($attributes) ? $column->arrayToAttributes($attributes) : '' !!}>
@if($column->isHtml())
{!! $title !!}
Expand Down
1 change: 0 additions & 1 deletion resources/views/includes/columns/wire-link.blade.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
@php /** @var \Rappasoft\LaravelLivewireTables\Views\Columns\WireLinkColumn $column */ @endphp
<button
{!! count($attributes) ? $column->arrayToAttributes($attributes) : '' !!}
@if($column->hasConfirmMessage())
Expand Down
Loading