Merge branch '3.x' into 4.x

This commit is contained in:
Dan Harrin
2025-01-07 08:23:55 +00:00
9 changed files with 22 additions and 12 deletions
+1 -1
View File
@@ -14,7 +14,7 @@
"filament/support": "*",
"larastan/larastan": "^2.2",
"laravel/pint": "^1.0",
"league/csv": "^9.14",
"league/csv": "^9.16",
"league/flysystem-aws-s3-v3": "^3.0",
"nunomaduro/termwind": "^1.0|^2.0",
"openspout/openspout": "^4.23",
+1 -1
View File
@@ -233,7 +233,7 @@ Alternatively, you may pass an SVG element into the component's slot instead of
- `tables::filters.remove-all-button` - Button to remove all filters
- `tables::grouping.collapse-button` - Button to collapse a group of records
- `tables::header-cell.sort-asc-button` - Sort button of a column sorted in ascending order
- `tables::header-cell.sort-button'` - Sort button of a column when it is currently not sorted
- `tables::header-cell.sort-button` - Sort button of a column when it is currently not sorted
- `tables::header-cell.sort-desc-button` - Sort button of a column sorted in descending order
- `tables::reorder.handle` - Handle to grab in order to reorder a record with drag and drop
- `tables::search-field` - Search input
+1 -1
View File
@@ -17,7 +17,7 @@
"illuminate/contracts": "^10.45|^11.0",
"illuminate/database": "^10.45|^11.0",
"illuminate/support": "^10.45|^11.0",
"league/csv": "^9.14",
"league/csv": "^9.16",
"openspout/openspout": "^4.23",
"spatie/laravel-package-tools": "^1.9"
},
@@ -15,7 +15,7 @@ use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use Illuminate\Support\Arr;
use Illuminate\Support\Collection;
use League\Csv\ByteSequence;
use League\Csv\Bom;
use League\Csv\Writer;
use SplTempFileObject;
@@ -53,7 +53,7 @@ class PrepareCsvExport implements ShouldQueue
public function handle(): void
{
$csv = Writer::createFromFileObject(new SplTempFileObject);
$csv->setOutputBOM(ByteSequence::BOM_UTF8);
$csv->setOutputBOM(Bom::Utf8);
$csv->setDelimiter($this->exporter::getCsvDelimiter());
$csv->insertOne(array_values($this->columnMap));
@@ -69,13 +69,18 @@ class PrepareCsvExport implements ShouldQueue
if ($databaseConnection->getDriverName() === 'pgsql') {
$originalOrders = collect($query->getQuery()->orders)
->reject(fn (array $order): bool => in_array($order['column'] ?? null, [$keyName, $qualifiedKeyName]))
->reject(fn (array $order): bool => ($order['column'] ?? null) === $qualifiedKeyName)
->unique('column');
/** @var array<string, mixed> $originalBindings */
$originalBindings = $query->getRawBindings();
$query->reorder($qualifiedKeyName);
if (! empty($originalOrders->all())) {
$query->reorder($originalOrders[0]['column'], $originalOrders[0]['direction']);
$originalOrders->forget(0);
} else {
$query->reorder($qualifiedKeyName);
}
foreach ($originalOrders as $order) {
if (blank($order['column'] ?? null) || blank($order['direction'] ?? null)) {
@@ -144,7 +149,10 @@ class PrepareCsvExport implements ShouldQueue
$chunkKeySize = $this->chunkSize * 10;
$baseQuery = $query->toBase();
$baseQuery->distinct($qualifiedKeyName);
if (in_array($query->getQuery()->orders[0]['column'] ?? null, [$keyName, $qualifiedKeyName])) {
$baseQuery->distinct($qualifiedKeyName);
}
/** @phpstan-ignore-next-line */
$baseQueryOrders = $baseQuery->orders ?? [];
@@ -6,7 +6,7 @@ use Filament\Actions\Imports\Models\FailedImportRow;
use Filament\Actions\Imports\Models\Import;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Gate;
use League\Csv\ByteSequence;
use League\Csv\Bom;
use League\Csv\Writer;
use SplTempFileObject;
use Symfony\Component\HttpFoundation\StreamedResponse;
@@ -36,7 +36,7 @@ class DownloadImportFailureCsv
}
$csv = Writer::createFromFileObject(new SplTempFileObject);
$csv->setOutputBOM(ByteSequence::BOM_UTF8);
$csv->setOutputBOM(Bom::Utf8);
$firstFailedRow = $import->failedRows()->first();
+1 -1
View File
@@ -51,7 +51,7 @@ Textarea::make('description')
There are a few differences, compared to [`disabled()`](overview#disabling-a-field):
- When using `readOnly()`, the field will still be sent to the server when the form is submitted. It can be mutated with the browser console, or via JavaScript. You can use [`dehydrated(false)`](advanced#preventing-a-field-from-being-dehydrated) to prevent this.
- When using `readOnly()`, the field will still be sent to the server when the form is submitted. It can be mutated with the browser console, or via JavaScript. You can use [`dehydrated(false)`](../advanced#preventing-a-field-from-being-dehydrated) to prevent this.
- There are no styling changes, such as less opacity, when using `readOnly()`.
- The field is still focusable when using `readOnly()`.
@@ -23,6 +23,7 @@
<x-filament::input
autocomplete="off"
inline-prefix
maxlength="1000"
:placeholder="__('filament-panels::global-search.field.placeholder')"
type="search"
wire:key="global-search.field.input"
@@ -1,5 +1,5 @@
<x-filament::icon-button
:badge="$unreadNotificationsCount"
:badge="$unreadNotificationsCount ?: null"
color="gray"
icon="heroicon-o-bell"
icon-alias="panels::topbar.open-database-notifications-button"
@@ -32,6 +32,7 @@
(new ComponentAttributeBag)->merge([
'autocomplete' => 'off',
'inlinePrefix' => true,
'maxlength' => 1000,
'placeholder' => $placeholder,
'type' => 'search',
'wire:key' => $this->getId() . '.table.' . $wireModel . '.field.input',