diff --git a/.phpunit.cache/test-results b/.phpunit.cache/test-results index cb889529..ba0ea1aa 100644 --- a/.phpunit.cache/test-results +++ b/.phpunit.cache/test-results @@ -1 +1 @@ -{"version":"pest_2.33.4","defects":[],"times":{"P\\Tests\\ArchTest::__pest_evaluable_it_will_not_use_debugging_functions":0.187,"P\\Tests\\FormsTest::__pest_evaluable_it_can_list_Form":0.006,"P\\Tests\\FormsTest::__pest_evaluable_it_can_render_Form_List":0.045,"P\\Tests\\FormsTest::__pest_evaluable_it_can_not_edit":0.032,"P\\Tests\\FormsTest::__pest_evaluable_it_can_render_create_form_page":0.085,"P\\Tests\\FormsTest::__pest_evaluable_it_can_create":0.007,"P\\Tests\\FormsTest::__pest_evaluable_it_see_form_when_not_require_login":0.008,"P\\Tests\\FormsTest::__pest_evaluable_it_see_form_when_not_require_login_for_guest":0.008,"P\\Tests\\FormsTest::__pest_evaluable_it_see_form_require_login_for_guest_user":0.009,"P\\Tests\\FormsTest::__pest_evaluable_it_can_retrieve_data":0.049,"P\\Tests\\FormsTest::__pest_evaluable_it_can_render_list_Forms":0.008,"P\\Tests\\FormsTest::__pest_evaluable_it_the_form_can_be_rendered":0.008,"P\\Tests\\FormsTest::__pest_evaluable_it_can_render_show_Form":0.013,"P\\Tests\\FormsTest::__pest_evaluable_it_see_form_require_login_for_logged_in_user":0.008,"P\\Tests\\FormsTest::__pest_evaluable_it_can_save":1.199,"P\\Tests\\FormsTest::__pest_evaluable_it_see_form_date_is_valid":0.01,"P\\Tests\\FormsTest::__pest_evaluable_it_see_ended_form_date":0.027,"P\\Tests\\ResourcesTest::__pest_evaluable_it_can_render_Form_List":0.049,"P\\Tests\\ResourcesTest::__pest_evaluable_it_can_render_Category_List":0.126,"P\\Tests\\ResourcesTest::__pest_evaluable_it_can_render_Collection_List":0.027,"P\\Tests\\ResourcesTest::__pest_evaluable_it_can_test":0.004}} \ No newline at end of file +{"version":"pest_2.33.4","defects":[],"times":{"P\\Tests\\ArchTest::__pest_evaluable_it_will_not_use_debugging_functions":0.193,"P\\Tests\\FormsTest::__pest_evaluable_it_can_list_Form":0.006,"P\\Tests\\FormsTest::__pest_evaluable_it_can_render_Form_List":0.047,"P\\Tests\\FormsTest::__pest_evaluable_it_can_not_edit":0.04,"P\\Tests\\FormsTest::__pest_evaluable_it_can_render_create_form_page":0.086,"P\\Tests\\FormsTest::__pest_evaluable_it_can_create":0.007,"P\\Tests\\FormsTest::__pest_evaluable_it_see_form_when_not_require_login":0.008,"P\\Tests\\FormsTest::__pest_evaluable_it_see_form_when_not_require_login_for_guest":0.008,"P\\Tests\\FormsTest::__pest_evaluable_it_see_form_require_login_for_guest_user":0.014,"P\\Tests\\FormsTest::__pest_evaluable_it_can_retrieve_data":0.051,"P\\Tests\\FormsTest::__pest_evaluable_it_can_render_list_Forms":0.01,"P\\Tests\\FormsTest::__pest_evaluable_it_the_form_can_be_rendered":0.008,"P\\Tests\\FormsTest::__pest_evaluable_it_can_render_show_Form":0.014,"P\\Tests\\FormsTest::__pest_evaluable_it_see_form_require_login_for_logged_in_user":0.009,"P\\Tests\\FormsTest::__pest_evaluable_it_can_save":1.257,"P\\Tests\\FormsTest::__pest_evaluable_it_see_form_date_is_valid":0.014,"P\\Tests\\FormsTest::__pest_evaluable_it_see_ended_form_date":0.008,"P\\Tests\\ResourcesTest::__pest_evaluable_it_can_render_Form_List":0.217,"P\\Tests\\ResourcesTest::__pest_evaluable_it_can_render_Category_List":0.077,"P\\Tests\\ResourcesTest::__pest_evaluable_it_can_render_Collection_List":0.03,"P\\Tests\\ResourcesTest::__pest_evaluable_it_can_test":0.005}} \ No newline at end of file diff --git a/composer.json b/composer.json index 10ed81dc..84970430 100644 --- a/composer.json +++ b/composer.json @@ -29,7 +29,6 @@ ], "require": { "php": "^8.1", - "alperenersoy/filament-export": "dev-fix-there", "codeat3/blade-clarity-icons": "^1.7", "flowframe/laravel-trend": "^0.1.5", "guava/filament-icon-picker": "^2.0", @@ -88,11 +87,5 @@ } }, "minimum-stability": "dev", - "prefer-stable": true, - "repositories": [ - { - "type": "github", - "url": "https://github.com/lara-zeus/filament-export" - } - ] + "prefer-stable": true } diff --git a/composer.lock b/composer.lock index 6316a7b4..1966974b 100644 --- a/composer.lock +++ b/composer.lock @@ -4,68 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "1f0bed2ff6f97197f36ce58d2fb08c21", + "content-hash": "85fba0c589d43d6197ef06d8f4bef069", "packages": [ - { - "name": "alperenersoy/filament-export", - "version": "dev-fix-there", - "source": { - "type": "git", - "url": "https://github.com/lara-zeus/filament-export.git", - "reference": "7e4fc784e2326eb63dc56c62d2de02e274185910" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/lara-zeus/filament-export/zipball/7e4fc784e2326eb63dc56c62d2de02e274185910", - "reference": "7e4fc784e2326eb63dc56c62d2de02e274185910", - "shasum": "" - }, - "require": { - "barryvdh/laravel-dompdf": "^2.0", - "filament/tables": "^3.0", - "php": "^8.0", - "spatie/simple-excel": ">=3.2.0" - }, - "require-dev": { - "filament/filament": "^3.0", - "orchestra/testbench": "^8.5", - "pestphp/pest": "^2.1", - "pestphp/pest-plugin-livewire": "^2.1" - }, - "type": "library", - "extra": { - "laravel": { - "providers": [ - "AlperenErsoy\\FilamentExport\\FilamentExportServiceProvider" - ] - } - }, - "autoload": { - "psr-4": { - "AlperenErsoy\\FilamentExport\\": "src/" - } - }, - "autoload-dev": { - "psr-4": { - "AlperenErsoy\\FilamentExport\\Tests\\": "tests/src/", - "AlperenErsoy\\FilamentExport\\Tests\\Database\\Factories\\": "tests/database/factories/" - } - }, - "license": [ - "MIT" - ], - "authors": [ - { - "name": "alperen ersoy", - "email": "ersoyalperen@gmail.com" - } - ], - "description": "Customizable export and print functionality for Filament Admin Panel", - "support": { - "source": "https://github.com/lara-zeus/filament-export/tree/fix-there" - }, - "time": "2023-11-12T22:21:30+00:00" - }, { "name": "anourvalar/eloquent-serialize", "version": "1.2.17", @@ -190,105 +130,28 @@ }, "time": "2023-03-03T13:19:18+00:00" }, - { - "name": "barryvdh/laravel-dompdf", - "version": "v2.0.1", - "source": { - "type": "git", - "url": "https://github.com/barryvdh/laravel-dompdf.git", - "reference": "9843d2be423670fb434f4c978b3c0f4dd92c87a6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/barryvdh/laravel-dompdf/zipball/9843d2be423670fb434f4c978b3c0f4dd92c87a6", - "reference": "9843d2be423670fb434f4c978b3c0f4dd92c87a6", - "shasum": "" - }, - "require": { - "dompdf/dompdf": "^2.0.1", - "illuminate/support": "^6|^7|^8|^9|^10", - "php": "^7.2 || ^8.0" - }, - "require-dev": { - "nunomaduro/larastan": "^1|^2", - "orchestra/testbench": "^4|^5|^6|^7|^8", - "phpro/grumphp": "^1", - "squizlabs/php_codesniffer": "^3.5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - }, - "laravel": { - "providers": [ - "Barryvdh\\DomPDF\\ServiceProvider" - ], - "aliases": { - "Pdf": "Barryvdh\\DomPDF\\Facade\\Pdf", - "PDF": "Barryvdh\\DomPDF\\Facade\\Pdf" - } - } - }, - "autoload": { - "psr-4": { - "Barryvdh\\DomPDF\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Barry vd. Heuvel", - "email": "barryvdh@gmail.com" - } - ], - "description": "A DOMPDF Wrapper for Laravel", - "keywords": [ - "dompdf", - "laravel", - "pdf" - ], - "support": { - "issues": "https://github.com/barryvdh/laravel-dompdf/issues", - "source": "https://github.com/barryvdh/laravel-dompdf/tree/v2.0.1" - }, - "funding": [ - { - "url": "https://fruitcake.nl", - "type": "custom" - }, - { - "url": "https://github.com/barryvdh", - "type": "github" - } - ], - "time": "2023-01-12T15:12:49+00:00" - }, { "name": "blade-ui-kit/blade-heroicons", - "version": "2.2.1", + "version": "2.3.0", "source": { "type": "git", "url": "https://github.com/blade-ui-kit/blade-heroicons.git", - "reference": "bcf4be8f6bbde0bb4c23f2e3fb189b88dec1580a" + "reference": "a265dbcf2a098121aad05752d0bba9f59022e4ba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/blade-ui-kit/blade-heroicons/zipball/bcf4be8f6bbde0bb4c23f2e3fb189b88dec1580a", - "reference": "bcf4be8f6bbde0bb4c23f2e3fb189b88dec1580a", + "url": "https://api.github.com/repos/blade-ui-kit/blade-heroicons/zipball/a265dbcf2a098121aad05752d0bba9f59022e4ba", + "reference": "a265dbcf2a098121aad05752d0bba9f59022e4ba", "shasum": "" }, "require": { - "blade-ui-kit/blade-icons": "^1.1", - "illuminate/support": "^9.0|^10.0", + "blade-ui-kit/blade-icons": "^1.6", + "illuminate/support": "^9.0|^10.0|^11.0", "php": "^8.0" }, "require-dev": { - "orchestra/testbench": "^7.0|^8.0", - "phpunit/phpunit": "^9.0" + "orchestra/testbench": "^7.0|^8.0|^9.0", + "phpunit/phpunit": "^9.0|^10.5|^11.0" }, "type": "library", "extra": { @@ -322,7 +185,7 @@ ], "support": { "issues": "https://github.com/blade-ui-kit/blade-heroicons/issues", - "source": "https://github.com/blade-ui-kit/blade-heroicons/tree/2.2.1" + "source": "https://github.com/blade-ui-kit/blade-heroicons/tree/2.3.0" }, "funding": [ { @@ -334,35 +197,35 @@ "type": "paypal" } ], - "time": "2023-12-18T20:44:03+00:00" + "time": "2024-02-07T16:33:46+00:00" }, { "name": "blade-ui-kit/blade-icons", - "version": "1.5.3", + "version": "1.6.0", "source": { "type": "git", "url": "https://github.com/blade-ui-kit/blade-icons.git", - "reference": "b5e6603218e2347ac81cb780bc6f71c8c3b31f5b" + "reference": "89660d93f9897d231e9113ba203cd17f4c5efade" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/blade-ui-kit/blade-icons/zipball/b5e6603218e2347ac81cb780bc6f71c8c3b31f5b", - "reference": "b5e6603218e2347ac81cb780bc6f71c8c3b31f5b", + "url": "https://api.github.com/repos/blade-ui-kit/blade-icons/zipball/89660d93f9897d231e9113ba203cd17f4c5efade", + "reference": "89660d93f9897d231e9113ba203cd17f4c5efade", "shasum": "" }, "require": { - "illuminate/contracts": "^8.0|^9.0|^10.0", - "illuminate/filesystem": "^8.0|^9.0|^10.0", - "illuminate/support": "^8.0|^9.0|^10.0", - "illuminate/view": "^8.0|^9.0|^10.0", + "illuminate/contracts": "^8.0|^9.0|^10.0|^11.0", + "illuminate/filesystem": "^8.0|^9.0|^10.0|^11.0", + "illuminate/support": "^8.0|^9.0|^10.0|^11.0", + "illuminate/view": "^8.0|^9.0|^10.0|^11.0", "php": "^7.4|^8.0", - "symfony/console": "^5.3|^6.0", - "symfony/finder": "^5.3|^6.0" + "symfony/console": "^5.3|^6.0|^7.0", + "symfony/finder": "^5.3|^6.0|^7.0" }, "require-dev": { - "mockery/mockery": "^1.3", - "orchestra/testbench": "^6.0|^7.0|^8.0", - "phpunit/phpunit": "^9.0" + "mockery/mockery": "^1.5.1", + "orchestra/testbench": "^6.0|^7.0|^8.0|^9.0", + "phpunit/phpunit": "^9.0|^10.5|^11.0" }, "bin": [ "bin/blade-icons-generate" @@ -415,7 +278,7 @@ "type": "paypal" } ], - "time": "2023-10-18T10:50:13+00:00" + "time": "2024-02-07T16:09:20+00:00" }, { "name": "brick/math", @@ -1429,68 +1292,6 @@ ], "time": "2024-02-05T11:56:58+00:00" }, - { - "name": "dompdf/dompdf", - "version": "v2.0.4", - "source": { - "type": "git", - "url": "https://github.com/dompdf/dompdf.git", - "reference": "093f2d9739cec57428e39ddadedfd4f3ae862c0f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/dompdf/dompdf/zipball/093f2d9739cec57428e39ddadedfd4f3ae862c0f", - "reference": "093f2d9739cec57428e39ddadedfd4f3ae862c0f", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-mbstring": "*", - "masterminds/html5": "^2.0", - "phenx/php-font-lib": ">=0.5.4 <1.0.0", - "phenx/php-svg-lib": ">=0.3.3 <1.0.0", - "php": "^7.1 || ^8.0" - }, - "require-dev": { - "ext-json": "*", - "ext-zip": "*", - "mockery/mockery": "^1.3", - "phpunit/phpunit": "^7.5 || ^8 || ^9", - "squizlabs/php_codesniffer": "^3.5" - }, - "suggest": { - "ext-gd": "Needed to process images", - "ext-gmagick": "Improves image processing performance", - "ext-imagick": "Improves image processing performance", - "ext-zlib": "Needed for pdf stream compression" - }, - "type": "library", - "autoload": { - "psr-4": { - "Dompdf\\": "src/" - }, - "classmap": [ - "lib/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "LGPL-2.1" - ], - "authors": [ - { - "name": "The Dompdf Community", - "homepage": "https://github.com/dompdf/dompdf/blob/master/AUTHORS.md" - } - ], - "description": "DOMPDF is a CSS 2.1 compliant HTML to PDF converter", - "homepage": "https://github.com/dompdf/dompdf", - "support": { - "issues": "https://github.com/dompdf/dompdf/issues", - "source": "https://github.com/dompdf/dompdf/tree/v2.0.4" - }, - "time": "2023-12-12T20:19:39+00:00" - }, { "name": "dragonmantank/cron-expression", "version": "v3.3.3", @@ -1621,16 +1422,16 @@ }, { "name": "filament/actions", - "version": "v3.2.25", + "version": "v3.2.29", "source": { "type": "git", "url": "https://github.com/filamentphp/actions.git", - "reference": "2cf7cc7ba44ae19ee4495fb6bba8265560a3e4ce" + "reference": "8991687ac911dffbf78387ebd2857a9957ec9284" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/actions/zipball/2cf7cc7ba44ae19ee4495fb6bba8265560a3e4ce", - "reference": "2cf7cc7ba44ae19ee4495fb6bba8265560a3e4ce", + "url": "https://api.github.com/repos/filamentphp/actions/zipball/8991687ac911dffbf78387ebd2857a9957ec9284", + "reference": "8991687ac911dffbf78387ebd2857a9957ec9284", "shasum": "" }, "require": { @@ -1670,20 +1471,20 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2024-02-07T11:09:26+00:00" + "time": "2024-02-09T17:41:01+00:00" }, { "name": "filament/filament", - "version": "v3.2.25", + "version": "v3.2.29", "source": { "type": "git", "url": "https://github.com/filamentphp/panels.git", - "reference": "b5645a82bee373219ca52c3d18bbdc55c2450a7f" + "reference": "17d7a92008e6913b6c16e1e636c8e1c6bb7954da" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/panels/zipball/b5645a82bee373219ca52c3d18bbdc55c2450a7f", - "reference": "b5645a82bee373219ca52c3d18bbdc55c2450a7f", + "url": "https://api.github.com/repos/filamentphp/panels/zipball/17d7a92008e6913b6c16e1e636c8e1c6bb7954da", + "reference": "17d7a92008e6913b6c16e1e636c8e1c6bb7954da", "shasum": "" }, "require": { @@ -1735,20 +1536,20 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2024-02-07T11:09:30+00:00" + "time": "2024-02-09T17:40:56+00:00" }, { "name": "filament/forms", - "version": "v3.2.25", + "version": "v3.2.29", "source": { "type": "git", "url": "https://github.com/filamentphp/forms.git", - "reference": "a094ac3d81a336fc8313573dce72d5efe5ebe33e" + "reference": "581bb9faba63f09e7f1dbde67336db73776a6360" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/forms/zipball/a094ac3d81a336fc8313573dce72d5efe5ebe33e", - "reference": "a094ac3d81a336fc8313573dce72d5efe5ebe33e", + "url": "https://api.github.com/repos/filamentphp/forms/zipball/581bb9faba63f09e7f1dbde67336db73776a6360", + "reference": "581bb9faba63f09e7f1dbde67336db73776a6360", "shasum": "" }, "require": { @@ -1791,20 +1592,20 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2024-02-07T11:09:29+00:00" + "time": "2024-02-09T17:40:54+00:00" }, { "name": "filament/infolists", - "version": "v3.2.25", + "version": "v3.2.29", "source": { "type": "git", "url": "https://github.com/filamentphp/infolists.git", - "reference": "f5dc656208a44015abbb48cf7668ea29299a7a63" + "reference": "0af24d86945ed91dbd9cb48cff67b61e06d5913e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/infolists/zipball/f5dc656208a44015abbb48cf7668ea29299a7a63", - "reference": "f5dc656208a44015abbb48cf7668ea29299a7a63", + "url": "https://api.github.com/repos/filamentphp/infolists/zipball/0af24d86945ed91dbd9cb48cff67b61e06d5913e", + "reference": "0af24d86945ed91dbd9cb48cff67b61e06d5913e", "shasum": "" }, "require": { @@ -1842,20 +1643,20 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2024-02-07T11:09:28+00:00" + "time": "2024-02-09T17:40:48+00:00" }, { "name": "filament/notifications", - "version": "v3.2.25", + "version": "v3.2.29", "source": { "type": "git", "url": "https://github.com/filamentphp/notifications.git", - "reference": "c5f4f51d949fafc52643f2be654a4da92422836c" + "reference": "4786bb652bf6d64a9e68cf8302cf761f8dff3c4b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/notifications/zipball/c5f4f51d949fafc52643f2be654a4da92422836c", - "reference": "c5f4f51d949fafc52643f2be654a4da92422836c", + "url": "https://api.github.com/repos/filamentphp/notifications/zipball/4786bb652bf6d64a9e68cf8302cf761f8dff3c4b", + "reference": "4786bb652bf6d64a9e68cf8302cf761f8dff3c4b", "shasum": "" }, "require": { @@ -1894,11 +1695,11 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2024-01-19T14:01:21+00:00" + "time": "2024-02-07T18:46:44+00:00" }, { "name": "filament/spatie-laravel-translatable-plugin", - "version": "v3.2.25", + "version": "v3.2.29", "source": { "type": "git", "url": "https://github.com/filamentphp/spatie-laravel-translatable-plugin.git", @@ -1943,16 +1744,16 @@ }, { "name": "filament/support", - "version": "v3.2.25", + "version": "v3.2.29", "source": { "type": "git", "url": "https://github.com/filamentphp/support.git", - "reference": "afee888de911565926e01ce69df9947835433ba2" + "reference": "351a781d00aa5a5c4791bbe836df0408b5ace1b3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/support/zipball/afee888de911565926e01ce69df9947835433ba2", - "reference": "afee888de911565926e01ce69df9947835433ba2", + "url": "https://api.github.com/repos/filamentphp/support/zipball/351a781d00aa5a5c4791bbe836df0408b5ace1b3", + "reference": "351a781d00aa5a5c4791bbe836df0408b5ace1b3", "shasum": "" }, "require": { @@ -1996,20 +1797,20 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2024-02-07T11:09:30+00:00" + "time": "2024-02-09T17:41:28+00:00" }, { "name": "filament/tables", - "version": "v3.2.25", + "version": "v3.2.29", "source": { "type": "git", "url": "https://github.com/filamentphp/tables.git", - "reference": "93dbfee89042f846ea1d7fbe9c004a658b8643f1" + "reference": "9c70a5faed421840bbab79f94226bff00fe6232a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/tables/zipball/93dbfee89042f846ea1d7fbe9c004a658b8643f1", - "reference": "93dbfee89042f846ea1d7fbe9c004a658b8643f1", + "url": "https://api.github.com/repos/filamentphp/tables/zipball/9c70a5faed421840bbab79f94226bff00fe6232a", + "reference": "9c70a5faed421840bbab79f94226bff00fe6232a", "shasum": "" }, "require": { @@ -2049,11 +1850,11 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2024-02-07T11:09:41+00:00" + "time": "2024-02-09T17:41:27+00:00" }, { "name": "filament/widgets", - "version": "v3.2.25", + "version": "v3.2.29", "source": { "type": "git", "url": "https://github.com/filamentphp/widgets.git", @@ -4335,96 +4136,6 @@ ], "time": "2024-01-09T09:30:37+00:00" }, - { - "name": "phenx/php-font-lib", - "version": "0.5.6", - "source": { - "type": "git", - "url": "https://github.com/dompdf/php-font-lib.git", - "reference": "a1681e9793040740a405ac5b189275059e2a9863" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/dompdf/php-font-lib/zipball/a1681e9793040740a405ac5b189275059e2a9863", - "reference": "a1681e9793040740a405ac5b189275059e2a9863", - "shasum": "" - }, - "require": { - "ext-mbstring": "*" - }, - "require-dev": { - "symfony/phpunit-bridge": "^3 || ^4 || ^5 || ^6" - }, - "type": "library", - "autoload": { - "psr-4": { - "FontLib\\": "src/FontLib" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "LGPL-2.1-or-later" - ], - "authors": [ - { - "name": "Fabien Ménager", - "email": "fabien.menager@gmail.com" - } - ], - "description": "A library to read, parse, export and make subsets of different types of font files.", - "homepage": "https://github.com/PhenX/php-font-lib", - "support": { - "issues": "https://github.com/dompdf/php-font-lib/issues", - "source": "https://github.com/dompdf/php-font-lib/tree/0.5.6" - }, - "time": "2024-01-29T14:45:26+00:00" - }, - { - "name": "phenx/php-svg-lib", - "version": "0.5.1", - "source": { - "type": "git", - "url": "https://github.com/dompdf/php-svg-lib.git", - "reference": "8a8a1ebcf6aea861ef30197999f096f7bd4b4456" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/dompdf/php-svg-lib/zipball/8a8a1ebcf6aea861ef30197999f096f7bd4b4456", - "reference": "8a8a1ebcf6aea861ef30197999f096f7bd4b4456", - "shasum": "" - }, - "require": { - "ext-mbstring": "*", - "php": "^7.1 || ^8.0", - "sabberworm/php-css-parser": "^8.4" - }, - "require-dev": { - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5" - }, - "type": "library", - "autoload": { - "psr-4": { - "Svg\\": "src/Svg" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "LGPL-3.0" - ], - "authors": [ - { - "name": "Fabien Ménager", - "email": "fabien.menager@gmail.com" - } - ], - "description": "A library to read, parse and export to PDF SVG files.", - "homepage": "https://github.com/PhenX/php-svg-lib", - "support": { - "issues": "https://github.com/dompdf/php-svg-lib/issues", - "source": "https://github.com/dompdf/php-svg-lib/tree/0.5.1" - }, - "time": "2023-12-11T20:56:08+00:00" - }, { "name": "phpoption/phpoption", "version": "1.9.2", @@ -5230,64 +4941,6 @@ }, "time": "2024-01-07T23:33:22+00:00" }, - { - "name": "sabberworm/php-css-parser", - "version": "8.5.0", - "source": { - "type": "git", - "url": "https://github.com/sabberworm/PHP-CSS-Parser.git", - "reference": "4e9a54c2a368fcd73ecc6b45f98c7714b54a7db0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sabberworm/PHP-CSS-Parser/zipball/4e9a54c2a368fcd73ecc6b45f98c7714b54a7db0", - "reference": "4e9a54c2a368fcd73ecc6b45f98c7714b54a7db0", - "shasum": "" - }, - "require": { - "ext-iconv": "*", - "php": ">=5.6.20" - }, - "require-dev": { - "codacy/coverage": "^1.4.3", - "phpunit/phpunit": "^5.7.27" - }, - "suggest": { - "ext-mbstring": "for parsing UTF-8 CSS" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "9.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Sabberworm\\CSS\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Raphael Schweikert" - } - ], - "description": "Parser for CSS Files written in PHP", - "homepage": "https://www.sabberworm.com/blog/2010/6/10/php-css-parser", - "keywords": [ - "css", - "parser", - "stylesheet" - ], - "support": { - "issues": "https://github.com/sabberworm/PHP-CSS-Parser/issues", - "source": "https://github.com/sabberworm/PHP-CSS-Parser/tree/8.5.0" - }, - "time": "2024-02-01T00:40:08+00:00" - }, { "name": "spatie/color", "version": "1.5.3", @@ -5548,67 +5201,6 @@ ], "time": "2023-12-06T10:56:22+00:00" }, - { - "name": "spatie/simple-excel", - "version": "3.3.0", - "source": { - "type": "git", - "url": "https://github.com/spatie/simple-excel.git", - "reference": "a3d65a33a482ef57ffb7ee981b9fcf929f87fb36" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/spatie/simple-excel/zipball/a3d65a33a482ef57ffb7ee981b9fcf929f87fb36", - "reference": "a3d65a33a482ef57ffb7ee981b9fcf929f87fb36", - "shasum": "" - }, - "require": { - "illuminate/support": "^9.0|^10.0", - "openspout/openspout": "^4.19", - "php": "^8.1" - }, - "require-dev": { - "pestphp/pest-plugin-laravel": "^1.3", - "phpunit/phpunit": "^9.4", - "spatie/pest-plugin-snapshots": "^1.1", - "spatie/phpunit-snapshot-assertions": "^4.0", - "spatie/temporary-directory": "^1.2" - }, - "type": "library", - "autoload": { - "psr-4": { - "Spatie\\SimpleExcel\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Freek Van der Herten", - "email": "freek@spatie.be", - "homepage": "https://spatie.be", - "role": "Developer" - } - ], - "description": "Read and write simple Excel and CSV files", - "homepage": "https://github.com/spatie/simple-excel", - "keywords": [ - "simple-excel", - "spatie" - ], - "support": { - "source": "https://github.com/spatie/simple-excel/tree/3.3.0" - }, - "funding": [ - { - "url": "https://github.com/spatie", - "type": "github" - } - ], - "time": "2023-12-05T17:15:27+00:00" - }, { "name": "symfony/console", "version": "v6.4.3", @@ -14407,9 +13999,7 @@ ], "aliases": [], "minimum-stability": "dev", - "stability-flags": { - "alperenersoy/filament-export": 20 - }, + "stability-flags": [], "prefer-stable": true, "prefer-lowest": false, "platform": { diff --git a/docs/getting-started/installation.md b/docs/getting-started/installation.md index 733791f1..c06a8ef3 100644 --- a/docs/getting-started/installation.md +++ b/docs/getting-started/installation.md @@ -40,35 +40,6 @@ To set up the plugin with filament, you need to add it to your panel provider; T ]) ``` -### Note about Filament Export -currently I am using a fork of the package so you must add the following to your composer.json file: - -```json -require": { - ... - "alperenersoy/filament-export": "dev-fix-there", -}, -``` - -And: - -```json -"minimum-stability": "dev", -"prefer-stable": true, -"repositories": [ - { - "type": "github", - "url": "https://github.com/lara-zeus/filament-export" - } -] -``` - -then run: - -```bash -composer update -``` - ## Usage To access the forms, visit the URL `/admin` , and `/bolt`. diff --git a/src/Fields/FieldsContract.php b/src/Fields/FieldsContract.php index f179bae0..4eca90b1 100644 --- a/src/Fields/FieldsContract.php +++ b/src/Fields/FieldsContract.php @@ -2,6 +2,7 @@ namespace LaraZeus\Bolt\Fields; +use Filament\Actions\Exports\ExportColumn; use Filament\Forms\Get; use Filament\Support\Colors\Color; use Filament\Tables\Columns\Column; @@ -241,6 +242,24 @@ public function TableColumn(Field $field): ?Column ->toggleable(); } + public function ExportColumn(Field $field): ?ExportColumn + { + return ExportColumn::make('zeusData.' . $field->options['htmlId']) + ->label($field->name) + ->state(function (Response $record) use ($field) { + + $response = $record->fieldsResponses()->where('field_id', $field->id)->first(); + if ($response === null) { + return '-'; + } + if (Bolt::isJson($response->response)) { + return json_decode($response->response, true); + } + + return $response->response; + }); + } + public function getFieldResponseValue(Response $record, Field $field): string { $fieldResponse = $record->fieldsResponses->where('field_id', $field->id)->first(); diff --git a/src/Filament/Exports/ResponseExporter.php b/src/Filament/Exports/ResponseExporter.php new file mode 100644 index 00000000..cc4bf13f --- /dev/null +++ b/src/Filament/Exports/ResponseExporter.php @@ -0,0 +1,70 @@ +getRecord(); + $getUserModel = config('auth.providers.users.model')::getUserFullNameAttribute(); + $mainColumns = [ + ExportColumn::make('user.' . $getUserModel) + ->label(__('Name')) + ->default(__('guest')), + + ExportColumn::make('status') + ->label(__('status')), + + ExportColumn::make('notes') + ->label(__('notes')), + ]; + + /** + * @var Field $field. + */ + foreach ($record->fields->sortBy('ordering') as $field) { + $getFieldTableColumn = (new $field->type)->ExportColumn($field); + + if ($getFieldTableColumn !== null) { + $mainColumns[] = $getFieldTableColumn; + } + } + + $mainColumns[] = ExportColumn::make('created_at') + ->label(__('created at')); + + return $mainColumns; + } + + /*public static function getOptionsFormComponents(): array + { + return [ + TextInput::make('descriptionLimit') + ->label('Limit the length of the description column content') + ->integer(), + ]; + }*/ + + public static function getCompletedNotificationBody(Export $export): string + { + $body = 'Your response export has completed and ' . number_format($export->successful_rows) . ' ' . str('row')->plural($export->successful_rows) . ' exported.'; + + if ($failedRowsCount = $export->getFailedRowsCount()) { + $body .= ' ' . number_format($failedRowsCount) . ' ' . str('row')->plural($failedRowsCount) . ' failed to export.'; + } + + return $body; + } +} diff --git a/src/Filament/Resources/FormResource/Pages/ManageResponses.php b/src/Filament/Resources/FormResource/Pages/ManageResponses.php index 5c0b5557..1133c7e3 100644 --- a/src/Filament/Resources/FormResource/Pages/ManageResponses.php +++ b/src/Filament/Resources/FormResource/Pages/ManageResponses.php @@ -2,7 +2,6 @@ namespace LaraZeus\Bolt\Filament\Resources\FormResource\Pages; -use AlperenErsoy\FilamentExport\Actions\FilamentExportBulkAction; use Filament\Resources\Pages\ManageRelatedRecords; use Filament\Tables; use Filament\Tables\Columns\ImageColumn; @@ -12,6 +11,7 @@ use Illuminate\Database\Eloquent\SoftDeletingScope; use LaraZeus\Bolt\BoltPlugin; use LaraZeus\Bolt\Filament\Actions\SetResponseStatus; +use LaraZeus\Bolt\Filament\Exports\ResponseExporter; use LaraZeus\Bolt\Filament\Resources\FormResource; use LaraZeus\Bolt\Models\Field; use LaraZeus\Bolt\Models\Form; @@ -107,9 +107,8 @@ public function table(Table $table): Table Tables\Actions\RestoreBulkAction::make(), Tables\Actions\ForceDeleteBulkAction::make(), - FilamentExportBulkAction::make('export') - ->icon('heroicon-o-document-arrow-down') - ->label(__('Export')), + Tables\Actions\ExportBulkAction::make() + ->exporter(ResponseExporter::class), ]) ->recordUrl( fn (Response $record): string => FormResource::getUrl('viewResponse', [