update lock clucknut
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 14s
Build, Push and Deploy / build-and-push (push) Successful in 3m14s
Build, Push and Deploy / deploy-staging (push) Successful in 25s
Build, Push and Deploy / deploy-production (push) Has been skipped

This commit is contained in:
2026-04-18 20:32:18 +07:00
parent 4554035227
commit dcaf267458
3359 changed files with 153185 additions and 205489 deletions

0
vendor/maatwebsite/excel/src/Console/ExportMakeCommand.php vendored Normal file → Executable file
View File

0
vendor/maatwebsite/excel/src/Console/ImportMakeCommand.php vendored Normal file → Executable file
View File

View File

@@ -27,7 +27,7 @@ public function download($export, string $fileName, ?string $writerType = null,
* @throws \PhpOffice\PhpSpreadsheet\Exception
* @throws \PhpOffice\PhpSpreadsheet\Writer\Exception
*/
public function store($export, string $filePath, ?string $disk = null, ?string $writerType = null, $diskOptions = []);
public function store($export, string $filePath, ?string $diskName = null, ?string $writerType = null, $diskOptions = []);
/**
* @param object $export

View File

@@ -22,11 +22,12 @@ class WriterFactory
* @param string $writerType
* @param Spreadsheet $spreadsheet
* @param object $export
* @param string|null $filePath
* @return IWriter
*
* @throws \PhpOffice\PhpSpreadsheet\Writer\Exception
*/
public static function make(string $writerType, Spreadsheet $spreadsheet, $export): IWriter
public static function make(string $writerType, Spreadsheet $spreadsheet, $export, ?string $filePath = null): IWriter
{
$writer = IOFactory::createWriter($spreadsheet, $writerType);
@@ -45,6 +46,11 @@ public static function make(string $writerType, Spreadsheet $spreadsheet, $expor
if ($writer instanceof Csv) {
static::applyCsvSettings(config('excel.exports.csv', []));
// Auto-detect TSV files and apply tab delimiter
if ($filePath && static::isTsvFile($filePath) && !($export instanceof WithCustomCsvSettings)) {
static::applyCsvSettings(['delimiter' => "\t"]);
}
if ($export instanceof WithCustomCsvSettings) {
static::applyCsvSettings($export->getCsvSettings());
}
@@ -89,4 +95,16 @@ private static function includesCharts($export): bool
return false;
}
/**
* @param string $filePath
* @return bool
*/
private static function isTsvFile(string $filePath): bool
{
$pathInfo = pathinfo($filePath);
$extension = strtolower($pathInfo['extension'] ?? '');
return $extension === 'tsv';
}
}

View File

@@ -79,7 +79,7 @@ public function handle(Writer $writer)
}
// Write to temp file with empty sheets.
$writer->write($sheetExport, $this->temporaryFile, $this->writerType);
$writer->write($this->export, $this->temporaryFile, $this->writerType);
});
}

View File

@@ -172,7 +172,8 @@ public function write($export, TemporaryFile $temporaryFile, string $writerType)
$writer = WriterFactory::make(
$writerType,
$this->spreadsheet,
$export
$export,
$temporaryFile->getLocalPath()
);
if ($temporaryFile instanceof RemoteTemporaryFile && !$temporaryFile->existsLocally() && !$this->isRunningServerless()) {