From d614d66a720d197928471548b295facda6653368 Mon Sep 17 00:00:00 2001 From: Ash Monsh Date: Fri, 24 Nov 2023 16:44:56 +0300 Subject: [PATCH] small fixes in extensions --- composer.lock | 156 ++++++++++++------------ src/Filament/Resources/FormResource.php | 3 +- src/Livewire/FillForms.php | 7 +- 3 files changed, 84 insertions(+), 82 deletions(-) diff --git a/composer.lock b/composer.lock index 343ddf16..35b0842e 100644 --- a/composer.lock +++ b/composer.lock @@ -1485,16 +1485,16 @@ }, { "name": "filament/actions", - "version": "v3.0.99", + "version": "v3.0.101", "source": { "type": "git", "url": "https://github.com/filamentphp/actions.git", - "reference": "7fc130d8eafcd231f4ff19ffda4aacca0423e22e" + "reference": "9d233cd7ab0353bdd293178d3ecd72adfedf9b58" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/actions/zipball/7fc130d8eafcd231f4ff19ffda4aacca0423e22e", - "reference": "7fc130d8eafcd231f4ff19ffda4aacca0423e22e", + "url": "https://api.github.com/repos/filamentphp/actions/zipball/9d233cd7ab0353bdd293178d3ecd72adfedf9b58", + "reference": "9d233cd7ab0353bdd293178d3ecd72adfedf9b58", "shasum": "" }, "require": { @@ -1531,20 +1531,20 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2023-11-14T12:07:19+00:00" + "time": "2023-11-21T10:53:03+00:00" }, { "name": "filament/filament", - "version": "v3.0.99", + "version": "v3.0.101", "source": { "type": "git", "url": "https://github.com/filamentphp/panels.git", - "reference": "82d9fd9a41e41f547dddc735a2603dd56584f46b" + "reference": "5a2f300db927972cd14c613496f412672a83eef6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/panels/zipball/82d9fd9a41e41f547dddc735a2603dd56584f46b", - "reference": "82d9fd9a41e41f547dddc735a2603dd56584f46b", + "url": "https://api.github.com/repos/filamentphp/panels/zipball/5a2f300db927972cd14c613496f412672a83eef6", + "reference": "5a2f300db927972cd14c613496f412672a83eef6", "shasum": "" }, "require": { @@ -1596,20 +1596,20 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2023-11-20T15:18:43+00:00" + "time": "2023-11-22T10:40:13+00:00" }, { "name": "filament/forms", - "version": "v3.0.99", + "version": "v3.0.101", "source": { "type": "git", "url": "https://github.com/filamentphp/forms.git", - "reference": "bbe1bb5145c8668c19cb07ef58227f54e79a4892" + "reference": "927e53280d5d2cad493a0a9e486fd86b5252492a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/forms/zipball/bbe1bb5145c8668c19cb07ef58227f54e79a4892", - "reference": "bbe1bb5145c8668c19cb07ef58227f54e79a4892", + "url": "https://api.github.com/repos/filamentphp/forms/zipball/927e53280d5d2cad493a0a9e486fd86b5252492a", + "reference": "927e53280d5d2cad493a0a9e486fd86b5252492a", "shasum": "" }, "require": { @@ -1652,20 +1652,20 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2023-11-20T15:18:17+00:00" + "time": "2023-11-22T10:39:50+00:00" }, { "name": "filament/infolists", - "version": "v3.0.99", + "version": "v3.0.101", "source": { "type": "git", "url": "https://github.com/filamentphp/infolists.git", - "reference": "c9ab7f2f069919b3b43a917e510daac77146246d" + "reference": "3a2d085af84d97c5861cd23f6c553f1600c2de4b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/infolists/zipball/c9ab7f2f069919b3b43a917e510daac77146246d", - "reference": "c9ab7f2f069919b3b43a917e510daac77146246d", + "url": "https://api.github.com/repos/filamentphp/infolists/zipball/3a2d085af84d97c5861cd23f6c553f1600c2de4b", + "reference": "3a2d085af84d97c5861cd23f6c553f1600c2de4b", "shasum": "" }, "require": { @@ -1703,20 +1703,20 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2023-11-20T15:18:25+00:00" + "time": "2023-11-22T10:39:48+00:00" }, { "name": "filament/notifications", - "version": "v3.0.99", + "version": "v3.0.101", "source": { "type": "git", "url": "https://github.com/filamentphp/notifications.git", - "reference": "65ac499a30fe00e9e2b21cd873e7a10e28f9efb8" + "reference": "88324fa22de9d3b9cc94e3feebb786fe00a35b31" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/notifications/zipball/65ac499a30fe00e9e2b21cd873e7a10e28f9efb8", - "reference": "65ac499a30fe00e9e2b21cd873e7a10e28f9efb8", + "url": "https://api.github.com/repos/filamentphp/notifications/zipball/88324fa22de9d3b9cc94e3feebb786fe00a35b31", + "reference": "88324fa22de9d3b9cc94e3feebb786fe00a35b31", "shasum": "" }, "require": { @@ -1755,20 +1755,20 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2023-11-14T12:07:17+00:00" + "time": "2023-11-21T10:52:57+00:00" }, { "name": "filament/spatie-laravel-translatable-plugin", - "version": "v3.0.99", + "version": "v3.0.101", "source": { "type": "git", "url": "https://github.com/filamentphp/spatie-laravel-translatable-plugin.git", - "reference": "86f0b8f54e9b7bb63243de5d6a483b7602f81657" + "reference": "1d24ef15dd92970ea21fe58c80598579ed3f0cc0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/spatie-laravel-translatable-plugin/zipball/86f0b8f54e9b7bb63243de5d6a483b7602f81657", - "reference": "86f0b8f54e9b7bb63243de5d6a483b7602f81657", + "url": "https://api.github.com/repos/filamentphp/spatie-laravel-translatable-plugin/zipball/1d24ef15dd92970ea21fe58c80598579ed3f0cc0", + "reference": "1d24ef15dd92970ea21fe58c80598579ed3f0cc0", "shasum": "" }, "require": { @@ -1800,20 +1800,20 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2023-11-15T11:34:50+00:00" + "time": "2023-11-22T10:40:17+00:00" }, { "name": "filament/support", - "version": "v3.0.99", + "version": "v3.0.101", "source": { "type": "git", "url": "https://github.com/filamentphp/support.git", - "reference": "98dc3082665bc2396b80dd6acd54b35a9cd68b4c" + "reference": "c84e267ab68bea6899a46330f69f88b4d449171a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/support/zipball/98dc3082665bc2396b80dd6acd54b35a9cd68b4c", - "reference": "98dc3082665bc2396b80dd6acd54b35a9cd68b4c", + "url": "https://api.github.com/repos/filamentphp/support/zipball/c84e267ab68bea6899a46330f69f88b4d449171a", + "reference": "c84e267ab68bea6899a46330f69f88b4d449171a", "shasum": "" }, "require": { @@ -1857,20 +1857,20 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2023-11-20T15:19:03+00:00" + "time": "2023-11-22T10:40:22+00:00" }, { "name": "filament/tables", - "version": "v3.0.99", + "version": "v3.0.101", "source": { "type": "git", "url": "https://github.com/filamentphp/tables.git", - "reference": "4415e4f560a2a65b41c4364a3c3ab876fc5b4346" + "reference": "e57a670396f564f7aa840fe3f81705777d94a2b5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/tables/zipball/4415e4f560a2a65b41c4364a3c3ab876fc5b4346", - "reference": "4415e4f560a2a65b41c4364a3c3ab876fc5b4346", + "url": "https://api.github.com/repos/filamentphp/tables/zipball/e57a670396f564f7aa840fe3f81705777d94a2b5", + "reference": "e57a670396f564f7aa840fe3f81705777d94a2b5", "shasum": "" }, "require": { @@ -1910,11 +1910,11 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2023-11-20T15:19:03+00:00" + "time": "2023-11-22T10:40:18+00:00" }, { "name": "filament/widgets", - "version": "v3.0.99", + "version": "v3.0.101", "source": { "type": "git", "url": "https://github.com/filamentphp/widgets.git", @@ -3920,16 +3920,16 @@ }, { "name": "openspout/openspout", - "version": "v4.21.0", + "version": "v4.22.0", "source": { "type": "git", "url": "https://github.com/openspout/openspout.git", - "reference": "8c37a03ce8f7a60be3cc0c7317b130c0b74fea3d" + "reference": "ad3dd535cf01623551da401fe170355f56f4f929" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/openspout/openspout/zipball/8c37a03ce8f7a60be3cc0c7317b130c0b74fea3d", - "reference": "8c37a03ce8f7a60be3cc0c7317b130c0b74fea3d", + "url": "https://api.github.com/repos/openspout/openspout/zipball/ad3dd535cf01623551da401fe170355f56f4f929", + "reference": "ad3dd535cf01623551da401fe170355f56f4f929", "shasum": "" }, "require": { @@ -3939,14 +3939,14 @@ "ext-libxml": "*", "ext-xmlreader": "*", "ext-zip": "*", - "php": "~8.2.0 || ~8.3.0" + "php": "~8.1.0 || ~8.2.0 || ~8.3.0" }, "require-dev": { "ext-zlib": "*", - "friendsofphp/php-cs-fixer": "^3.38.2", + "friendsofphp/php-cs-fixer": "^3.39.0", "infection/infection": "^0.27.8", "phpbench/phpbench": "^1.2.14", - "phpstan/phpstan": "^1.10.43", + "phpstan/phpstan": "^1.10.44", "phpstan/phpstan-phpunit": "^1.3.15", "phpstan/phpstan-strict-rules": "^1.5.2", "phpunit/phpunit": "^10.4.2" @@ -3997,7 +3997,7 @@ ], "support": { "issues": "https://github.com/openspout/openspout/issues", - "source": "https://github.com/openspout/openspout/tree/v4.21.0" + "source": "https://github.com/openspout/openspout/tree/v4.22.0" }, "funding": [ { @@ -4009,7 +4009,7 @@ "type": "github" } ], - "time": "2023-11-20T14:32:29+00:00" + "time": "2023-11-22T15:34:18+00:00" }, { "name": "phenx/php-font-lib", @@ -8467,16 +8467,16 @@ }, { "name": "friendsofphp/php-cs-fixer", - "version": "v3.38.2", + "version": "v3.39.0", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", - "reference": "d872cdd543797ade030aaa307c0a4954a712e081" + "reference": "04bf7b28fc847185b247d112cab617da941e3cca" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/d872cdd543797ade030aaa307c0a4954a712e081", - "reference": "d872cdd543797ade030aaa307c0a4954a712e081", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/04bf7b28fc847185b247d112cab617da941e3cca", + "reference": "04bf7b28fc847185b247d112cab617da941e3cca", "shasum": "" }, "require": { @@ -8486,16 +8486,16 @@ "ext-tokenizer": "*", "php": "^7.4 || ^8.0", "sebastian/diff": "^4.0 || ^5.0", - "symfony/console": "^5.4 || ^6.0", - "symfony/event-dispatcher": "^5.4 || ^6.0", - "symfony/filesystem": "^5.4 || ^6.0", - "symfony/finder": "^5.4 || ^6.0", - "symfony/options-resolver": "^5.4 || ^6.0", + "symfony/console": "^5.4 || ^6.0 || ^7.0", + "symfony/event-dispatcher": "^5.4 || ^6.0 || ^7.0", + "symfony/filesystem": "^5.4 || ^6.0 || ^7.0", + "symfony/finder": "^5.4 || ^6.0 || ^7.0", + "symfony/options-resolver": "^5.4 || ^6.0 || ^7.0", "symfony/polyfill-mbstring": "^1.27", "symfony/polyfill-php80": "^1.27", "symfony/polyfill-php81": "^1.27", - "symfony/process": "^5.4 || ^6.0", - "symfony/stopwatch": "^5.4 || ^6.0" + "symfony/process": "^5.4 || ^6.0 || ^7.0", + "symfony/stopwatch": "^5.4 || ^6.0 || ^7.0" }, "require-dev": { "facile-it/paraunit": "^1.3 || ^2.0", @@ -8509,8 +8509,8 @@ "phpspec/prophecy": "^1.16", "phpspec/prophecy-phpunit": "^2.0", "phpunit/phpunit": "^9.5", - "symfony/phpunit-bridge": "^6.2.3", - "symfony/yaml": "^5.4 || ^6.0" + "symfony/phpunit-bridge": "^6.2.3 || ^7.0", + "symfony/yaml": "^5.4 || ^6.0 || ^7.0" }, "suggest": { "ext-dom": "For handling output formats in XML", @@ -8548,7 +8548,7 @@ ], "support": { "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", - "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.38.2" + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.39.0" }, "funding": [ { @@ -8556,7 +8556,7 @@ "type": "github" } ], - "time": "2023-11-14T00:19:22+00:00" + "time": "2023-11-22T11:20:09+00:00" }, { "name": "guzzlehttp/psr7", @@ -9922,16 +9922,16 @@ }, { "name": "pestphp/pest", - "version": "v2.24.3", + "version": "v2.25.0", "source": { "type": "git", "url": "https://github.com/pestphp/pest.git", - "reference": "f235d84d95aca83425d83e64792352a7424a89d5" + "reference": "83f8de17c8e9f318052027938577fedd567b09a4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pestphp/pest/zipball/f235d84d95aca83425d83e64792352a7424a89d5", - "reference": "f235d84d95aca83425d83e64792352a7424a89d5", + "url": "https://api.github.com/repos/pestphp/pest/zipball/83f8de17c8e9f318052027938577fedd567b09a4", + "reference": "83f8de17c8e9f318052027938577fedd567b09a4", "shasum": "" }, "require": { @@ -9950,7 +9950,7 @@ }, "require-dev": { "pestphp/pest-dev-tools": "^2.16.0", - "pestphp/pest-plugin-type-coverage": "^2.4.0", + "pestphp/pest-plugin-type-coverage": "^2.5.0", "symfony/process": "^6.3.4" }, "bin": [ @@ -10014,7 +10014,7 @@ ], "support": { "issues": "https://github.com/pestphp/pest/issues", - "source": "https://github.com/pestphp/pest/tree/v2.24.3" + "source": "https://github.com/pestphp/pest/tree/v2.25.0" }, "funding": [ { @@ -10026,7 +10026,7 @@ "type": "github" } ], - "time": "2023-11-08T09:47:14+00:00" + "time": "2023-11-22T07:17:30+00:00" }, { "name": "pestphp/pest-plugin", @@ -10875,16 +10875,16 @@ }, { "name": "phpunit/php-code-coverage", - "version": "10.1.8", + "version": "10.1.9", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "84838eed9ded511f61dc3e8b5944a52d9017b297" + "reference": "a56a9ab2f680246adcf3db43f38ddf1765774735" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/84838eed9ded511f61dc3e8b5944a52d9017b297", - "reference": "84838eed9ded511f61dc3e8b5944a52d9017b297", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/a56a9ab2f680246adcf3db43f38ddf1765774735", + "reference": "a56a9ab2f680246adcf3db43f38ddf1765774735", "shasum": "" }, "require": { @@ -10941,7 +10941,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.1.8" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.1.9" }, "funding": [ { @@ -10949,7 +10949,7 @@ "type": "github" } ], - "time": "2023-11-15T13:31:15+00:00" + "time": "2023-11-23T12:23:20+00:00" }, { "name": "phpunit/php-file-iterator", diff --git a/src/Filament/Resources/FormResource.php b/src/Filament/Resources/FormResource.php index b2e3b110..e6ed9b29 100644 --- a/src/Filament/Resources/FormResource.php +++ b/src/Filament/Resources/FormResource.php @@ -32,7 +32,6 @@ use LaraZeus\Bolt\Filament\Actions\ReplicateFormAction; use LaraZeus\Bolt\Filament\Resources\FormResource\Pages; use LaraZeus\Bolt\Models\Form as ZeusForm; -use LaraZeus\BoltPro\Livewire\PrefilledForm; class FormResource extends BoltResource { @@ -199,7 +198,7 @@ public static function getPages(): array if (class_exists(\LaraZeus\BoltPro\BoltProServiceProvider::class)) { //@phpstan-ignore-next-line - $pages['prefilled'] = PrefilledForm::route('/{record}/prefilled'); + $pages['prefilled'] = \LaraZeus\BoltPro\Livewire\PrefilledForm::route('/{record}/prefilled'); } return $pages; diff --git a/src/Livewire/FillForms.php b/src/Livewire/FillForms.php index 82bcbccd..4ba69bc3 100644 --- a/src/Livewire/FillForms.php +++ b/src/Livewire/FillForms.php @@ -4,6 +4,7 @@ use Filament\Forms; use Filament\Forms\Concerns\InteractsWithForms; +use Illuminate\Support\Arr; use Illuminate\Support\Facades\Mail; use Illuminate\View\View; use LaraZeus\Bolt\BoltPlugin; @@ -91,7 +92,9 @@ public function store(): void 'notes' => '', ]); - foreach ($this->form->getState()['zeusData'] as $field => $value) { + $fieldsData = Arr::except($this->form->getState()['zeusData'], 'extensions'); + + foreach ($fieldsData as $field => $value) { $setValue = $value; if (! empty($setValue) && is_array($setValue)) { @@ -108,7 +111,7 @@ public function store(): void event(new FormSent($response)); $this->extensionData['response'] = $response; - $this->extensionData['extensionsComponent'] = $this->form->getState()['extensions'] ?? []; + $this->extensionData['extensionsComponent'] = $this->form->getState()['zeusData']['extensions'] ?? []; $extensionItemId = Extensions::init($this->zeusForm, 'store', $this->extensionData) ?? []; $this->extensionData['extInfo'] = $extensionItemId;