diff --git a/.phpunit.cache/test-results b/.phpunit.cache/test-results index 9b4c43fa..0159b48e 100644 --- a/.phpunit.cache/test-results +++ b/.phpunit.cache/test-results @@ -1 +1 @@ -{"version":"pest_2.34.5","defects":[],"times":{"P\\Tests\\ArchTest::__pest_evaluable_it_will_not_use_debugging_functions":0.195,"P\\Tests\\ResourcesTest::__pest_evaluable_it_can_test":0.003,"P\\Tests\\ResourcesTest::__pest_evaluable_it_can_render_collection_list":0.06,"P\\Tests\\ResourcesTest::__pest_evaluable_it_can_render_form_list":0.046,"P\\Tests\\ResourcesTest::__pest_evaluable_it_can_render_category_list":0.073,"P\\Tests\\FormsTest::__pest_evaluable_it_can_retrieve_data":0.049,"P\\Tests\\FormsTest::__pest_evaluable_it_see_form_require_login_for_logged_in_user":0.007,"P\\Tests\\FormsTest::__pest_evaluable_it_can_render_Form_List":0.118,"P\\Tests\\FormsTest::__pest_evaluable_it_see_form_when_not_require_login_for_guest":0.014,"P\\Tests\\FormsTest::__pest_evaluable_it_can_save":1.339,"P\\Tests\\FormsTest::__pest_evaluable_it_the_form_can_be_rendered":0.008,"P\\Tests\\FormsTest::__pest_evaluable_it_can_not_edit":0.045,"P\\Tests\\FormsTest::__pest_evaluable_it_see_form_require_login_for_guest_user":0.008,"P\\Tests\\FormsTest::__pest_evaluable_it_can_create":0.007,"P\\Tests\\FormsTest::__pest_evaluable_it_see_form_date_is_valid":0.059,"P\\Tests\\FormsTest::__pest_evaluable_it_see_form_when_not_require_login":0.007,"P\\Tests\\FormsTest::__pest_evaluable_it_can_render_list_Forms":0.008,"P\\Tests\\FormsTest::__pest_evaluable_it_can_render_create_form_page":0.128,"P\\Tests\\FormsTest::__pest_evaluable_it_see_ended_form_date":0.008,"P\\Tests\\FormsTest::__pest_evaluable_it_can_list_Form":0.006,"P\\Tests\\FormsTest::__pest_evaluable_it_can_render_show_Form":0.01}} \ No newline at end of file +{"version":"pest_2.34.6","defects":[],"times":{"P\\Tests\\ArchTest::__pest_evaluable_it_will_not_use_debugging_functions":0.208,"P\\Tests\\FormsTest::__pest_evaluable_it_can_save":1.38,"P\\Tests\\FormsTest::__pest_evaluable_it_can_render_Form_List":0.153,"P\\Tests\\FormsTest::__pest_evaluable_it_can_retrieve_data":0.051,"P\\Tests\\FormsTest::__pest_evaluable_it_can_render_create_form_page":0.083,"P\\Tests\\FormsTest::__pest_evaluable_it_can_render_list_Forms":0.012,"P\\Tests\\FormsTest::__pest_evaluable_it_can_not_edit":0.045,"P\\Tests\\FormsTest::__pest_evaluable_it_the_form_can_be_rendered":0.01,"P\\Tests\\FormsTest::__pest_evaluable_it_see_ended_form_date":0.007,"P\\Tests\\FormsTest::__pest_evaluable_it_see_form_when_not_require_login":0.007,"P\\Tests\\FormsTest::__pest_evaluable_it_see_form_require_login_for_guest_user":0.009,"P\\Tests\\FormsTest::__pest_evaluable_it_see_form_require_login_for_logged_in_user":0.007,"P\\Tests\\FormsTest::__pest_evaluable_it_can_render_show_Form":0.009,"P\\Tests\\FormsTest::__pest_evaluable_it_see_form_when_not_require_login_for_guest":0.007,"P\\Tests\\FormsTest::__pest_evaluable_it_can_list_Form":0.005,"P\\Tests\\FormsTest::__pest_evaluable_it_can_create":0.006,"P\\Tests\\FormsTest::__pest_evaluable_it_see_form_date_is_valid":0.012,"P\\Tests\\ResourcesTest::__pest_evaluable_it_can_test":0.002,"P\\Tests\\ResourcesTest::__pest_evaluable_it_can_render_category_list":0.074,"P\\Tests\\ResourcesTest::__pest_evaluable_it_can_render_collection_list":0.027,"P\\Tests\\ResourcesTest::__pest_evaluable_it_can_render_form_list":0.045}} \ No newline at end of file diff --git a/composer.lock b/composer.lock index f7a80619..af9e14a9 100644 --- a/composer.lock +++ b/composer.lock @@ -1422,16 +1422,16 @@ }, { "name": "filament/actions", - "version": "v3.2.61", + "version": "v3.2.62", "source": { "type": "git", "url": "https://github.com/filamentphp/actions.git", - "reference": "95c8842023399cdf2508a86c2af3db579b125cc7" + "reference": "1a177564e1f707315ac9aee7cc4d345fbc1ea37e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/actions/zipball/95c8842023399cdf2508a86c2af3db579b125cc7", - "reference": "95c8842023399cdf2508a86c2af3db579b125cc7", + "url": "https://api.github.com/repos/filamentphp/actions/zipball/1a177564e1f707315ac9aee7cc4d345fbc1ea37e", + "reference": "1a177564e1f707315ac9aee7cc4d345fbc1ea37e", "shasum": "" }, "require": { @@ -1471,20 +1471,20 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2024-03-27T12:36:15+00:00" + "time": "2024-04-01T18:41:00+00:00" }, { "name": "filament/filament", - "version": "v3.2.61", + "version": "v3.2.62", "source": { "type": "git", "url": "https://github.com/filamentphp/panels.git", - "reference": "6aa99147005785e0528e9eca77ee029c7c57d620" + "reference": "2dba8d47a87f9fadb65fb6422e813bcb845e60fc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/panels/zipball/6aa99147005785e0528e9eca77ee029c7c57d620", - "reference": "6aa99147005785e0528e9eca77ee029c7c57d620", + "url": "https://api.github.com/repos/filamentphp/panels/zipball/2dba8d47a87f9fadb65fb6422e813bcb845e60fc", + "reference": "2dba8d47a87f9fadb65fb6422e813bcb845e60fc", "shasum": "" }, "require": { @@ -1536,20 +1536,20 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2024-03-27T12:36:01+00:00" + "time": "2024-04-01T18:41:06+00:00" }, { "name": "filament/forms", - "version": "v3.2.61", + "version": "v3.2.62", "source": { "type": "git", "url": "https://github.com/filamentphp/forms.git", - "reference": "1237e83354fd28a1a4cf5d6585f57adc56954e6c" + "reference": "25a1f9b93f27865608e727c47d677ce0b44ad043" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/forms/zipball/1237e83354fd28a1a4cf5d6585f57adc56954e6c", - "reference": "1237e83354fd28a1a4cf5d6585f57adc56954e6c", + "url": "https://api.github.com/repos/filamentphp/forms/zipball/25a1f9b93f27865608e727c47d677ce0b44ad043", + "reference": "25a1f9b93f27865608e727c47d677ce0b44ad043", "shasum": "" }, "require": { @@ -1592,20 +1592,20 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2024-03-27T12:35:57+00:00" + "time": "2024-04-01T18:40:59+00:00" }, { "name": "filament/infolists", - "version": "v3.2.61", + "version": "v3.2.62", "source": { "type": "git", "url": "https://github.com/filamentphp/infolists.git", - "reference": "aa2f266ce113b13cf24e8752970bed9d2fb62b4f" + "reference": "cf5a23020b219bd5e3d930c24e9b380a004206c8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/infolists/zipball/aa2f266ce113b13cf24e8752970bed9d2fb62b4f", - "reference": "aa2f266ce113b13cf24e8752970bed9d2fb62b4f", + "url": "https://api.github.com/repos/filamentphp/infolists/zipball/cf5a23020b219bd5e3d930c24e9b380a004206c8", + "reference": "cf5a23020b219bd5e3d930c24e9b380a004206c8", "shasum": "" }, "require": { @@ -1643,20 +1643,20 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2024-03-27T12:36:20+00:00" + "time": "2024-04-01T18:41:04+00:00" }, { "name": "filament/notifications", - "version": "v3.2.61", + "version": "v3.2.62", "source": { "type": "git", "url": "https://github.com/filamentphp/notifications.git", - "reference": "069a37c9f260918741fd80167859d7578ea18887" + "reference": "0739152934bd238b838e1abd1d3c9b037f9e6da3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/notifications/zipball/069a37c9f260918741fd80167859d7578ea18887", - "reference": "069a37c9f260918741fd80167859d7578ea18887", + "url": "https://api.github.com/repos/filamentphp/notifications/zipball/0739152934bd238b838e1abd1d3c9b037f9e6da3", + "reference": "0739152934bd238b838e1abd1d3c9b037f9e6da3", "shasum": "" }, "require": { @@ -1695,11 +1695,11 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2024-03-27T12:36:01+00:00" + "time": "2024-04-01T18:40:59+00:00" }, { "name": "filament/spatie-laravel-translatable-plugin", - "version": "v3.2.61", + "version": "v3.2.62", "source": { "type": "git", "url": "https://github.com/filamentphp/spatie-laravel-translatable-plugin.git", @@ -1744,16 +1744,16 @@ }, { "name": "filament/support", - "version": "v3.2.61", + "version": "v3.2.62", "source": { "type": "git", "url": "https://github.com/filamentphp/support.git", - "reference": "6f7f6fe72f8c206bd28297fbf41f863358c95c07" + "reference": "7b156b35791a7ff990621ec59fc8ec8cfdbb0782" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/support/zipball/6f7f6fe72f8c206bd28297fbf41f863358c95c07", - "reference": "6f7f6fe72f8c206bd28297fbf41f863358c95c07", + "url": "https://api.github.com/repos/filamentphp/support/zipball/7b156b35791a7ff990621ec59fc8ec8cfdbb0782", + "reference": "7b156b35791a7ff990621ec59fc8ec8cfdbb0782", "shasum": "" }, "require": { @@ -1769,6 +1769,7 @@ "spatie/color": "^1.5", "spatie/invade": "^1.0|^2.0", "spatie/laravel-package-tools": "^1.9", + "symfony/console": "^6.0|^7.0", "symfony/html-sanitizer": "^6.1|^7.0" }, "type": "library", @@ -1797,20 +1798,20 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2024-03-27T12:36:25+00:00" + "time": "2024-04-01T18:41:17+00:00" }, { "name": "filament/tables", - "version": "v3.2.61", + "version": "v3.2.62", "source": { "type": "git", "url": "https://github.com/filamentphp/tables.git", - "reference": "38e01c5d5e841d36365d2acf581ed60095b0f768" + "reference": "38bf31ffed24ca98647879eb99bdb1efc788b4ec" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/tables/zipball/38e01c5d5e841d36365d2acf581ed60095b0f768", - "reference": "38e01c5d5e841d36365d2acf581ed60095b0f768", + "url": "https://api.github.com/repos/filamentphp/tables/zipball/38bf31ffed24ca98647879eb99bdb1efc788b4ec", + "reference": "38bf31ffed24ca98647879eb99bdb1efc788b4ec", "shasum": "" }, "require": { @@ -1850,20 +1851,20 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2024-03-27T12:36:41+00:00" + "time": "2024-04-01T18:41:19+00:00" }, { "name": "filament/widgets", - "version": "v3.2.61", + "version": "v3.2.62", "source": { "type": "git", "url": "https://github.com/filamentphp/widgets.git", - "reference": "38a011b9a556a2786028eb80aa135e171569d2af" + "reference": "23c69ba79ba9f39429e48327676db3117585a5f8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/widgets/zipball/38a011b9a556a2786028eb80aa135e171569d2af", - "reference": "38a011b9a556a2786028eb80aa135e171569d2af", + "url": "https://api.github.com/repos/filamentphp/widgets/zipball/23c69ba79ba9f39429e48327676db3117585a5f8", + "reference": "23c69ba79ba9f39429e48327676db3117585a5f8", "shasum": "" }, "require": { @@ -1894,7 +1895,7 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2024-03-14T10:54:33+00:00" + "time": "2024-04-01T18:41:27+00:00" }, { "name": "flowframe/laravel-trend", @@ -2482,16 +2483,16 @@ }, { "name": "lara-zeus/list-group", - "version": "1.0.1", + "version": "1.0.2", "source": { "type": "git", "url": "https://github.com/lara-zeus/list-group.git", - "reference": "0832212eb3207866bf1e8a1b879513753c2422ab" + "reference": "1ac6be32597167c62770016423af23e171f94d2b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/lara-zeus/list-group/zipball/0832212eb3207866bf1e8a1b879513753c2422ab", - "reference": "0832212eb3207866bf1e8a1b879513753c2422ab", + "url": "https://api.github.com/repos/lara-zeus/list-group/zipball/1ac6be32597167c62770016423af23e171f94d2b", + "reference": "1ac6be32597167c62770016423af23e171f94d2b", "shasum": "" }, "require": { @@ -2565,7 +2566,7 @@ "type": "github" } ], - "time": "2024-02-12T23:03:41+00:00" + "time": "2024-04-01T01:47:48+00:00" }, { "name": "laravel/framework", @@ -9982,16 +9983,16 @@ }, { "name": "pestphp/pest", - "version": "v2.34.5", + "version": "v2.34.6", "source": { "type": "git", "url": "https://github.com/pestphp/pest.git", - "reference": "863a0cc83744c677ffdb28a6a2b841dd049e57ce" + "reference": "680111fb1e7175a5010b73c115edef58ceef303e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pestphp/pest/zipball/863a0cc83744c677ffdb28a6a2b841dd049e57ce", - "reference": "863a0cc83744c677ffdb28a6a2b841dd049e57ce", + "url": "https://api.github.com/repos/pestphp/pest/zipball/680111fb1e7175a5010b73c115edef58ceef303e", + "reference": "680111fb1e7175a5010b73c115edef58ceef303e", "shasum": "" }, "require": { @@ -10001,10 +10002,10 @@ "pestphp/pest-plugin": "^2.1.1", "pestphp/pest-plugin-arch": "^2.7.0", "php": "^8.1.0", - "phpunit/phpunit": "^10.5.15" + "phpunit/phpunit": "^10.5.16" }, "conflict": { - "phpunit/phpunit": ">10.5.15", + "phpunit/phpunit": ">10.5.16", "sebastian/exporter": "<5.1.0", "webmozart/assert": "<1.11.0" }, @@ -10074,7 +10075,7 @@ ], "support": { "issues": "https://github.com/pestphp/pest/issues", - "source": "https://github.com/pestphp/pest/tree/v2.34.5" + "source": "https://github.com/pestphp/pest/tree/v2.34.6" }, "funding": [ { @@ -10086,7 +10087,7 @@ "type": "github" } ], - "time": "2024-03-22T08:44:19+00:00" + "time": "2024-03-28T11:36:46+00:00" }, { "name": "pestphp/pest-plugin", @@ -10897,16 +10898,16 @@ }, { "name": "phpstan/phpstan", - "version": "1.10.65", + "version": "1.10.66", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "3c657d057a0b7ecae19cb12db446bbc99d8839c6" + "reference": "94779c987e4ebd620025d9e5fdd23323903950bd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/3c657d057a0b7ecae19cb12db446bbc99d8839c6", - "reference": "3c657d057a0b7ecae19cb12db446bbc99d8839c6", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/94779c987e4ebd620025d9e5fdd23323903950bd", + "reference": "94779c987e4ebd620025d9e5fdd23323903950bd", "shasum": "" }, "require": { @@ -10955,7 +10956,7 @@ "type": "tidelift" } ], - "time": "2024-03-23T10:30:26+00:00" + "time": "2024-03-28T16:17:31+00:00" }, { "name": "phpunit/php-code-coverage", @@ -11280,16 +11281,16 @@ }, { "name": "phpunit/phpunit", - "version": "10.5.15", + "version": "10.5.16", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "86376e05e8745ed81d88232ff92fee868247b07b" + "reference": "18f8d4a5f52b61fdd9370aaae3167daa0eeb69cd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/86376e05e8745ed81d88232ff92fee868247b07b", - "reference": "86376e05e8745ed81d88232ff92fee868247b07b", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/18f8d4a5f52b61fdd9370aaae3167daa0eeb69cd", + "reference": "18f8d4a5f52b61fdd9370aaae3167daa0eeb69cd", "shasum": "" }, "require": { @@ -11361,7 +11362,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.15" + "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.16" }, "funding": [ { @@ -11377,7 +11378,7 @@ "type": "tidelift" } ], - "time": "2024-03-22T04:17:47+00:00" + "time": "2024-03-28T10:08:10+00:00" }, { "name": "pimple/pimple", @@ -12656,16 +12657,16 @@ }, { "name": "spatie/laravel-ray", - "version": "1.35.1", + "version": "1.36.0", "source": { "type": "git", "url": "https://github.com/spatie/laravel-ray.git", - "reference": "f504d3787d88c7e5de7a4290658f7ad9b1352f22" + "reference": "f15936b5d308ae391ee67370a5628f0712537c34" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/laravel-ray/zipball/f504d3787d88c7e5de7a4290658f7ad9b1352f22", - "reference": "f504d3787d88c7e5de7a4290658f7ad9b1352f22", + "url": "https://api.github.com/repos/spatie/laravel-ray/zipball/f15936b5d308ae391ee67370a5628f0712537c34", + "reference": "f15936b5d308ae391ee67370a5628f0712537c34", "shasum": "" }, "require": { @@ -12727,7 +12728,7 @@ ], "support": { "issues": "https://github.com/spatie/laravel-ray/issues", - "source": "https://github.com/spatie/laravel-ray/tree/1.35.1" + "source": "https://github.com/spatie/laravel-ray/tree/1.36.0" }, "funding": [ { @@ -12739,7 +12740,7 @@ "type": "other" } ], - "time": "2024-02-13T14:19:41+00:00" + "time": "2024-03-29T09:10:11+00:00" }, { "name": "spatie/macroable", @@ -12873,16 +12874,16 @@ }, { "name": "squizlabs/php_codesniffer", - "version": "3.9.0", + "version": "3.9.1", "source": { "type": "git", "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", - "reference": "d63cee4890a8afaf86a22e51ad4d97c91dd4579b" + "reference": "267a4405fff1d9c847134db3a3c92f1ab7f77909" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/d63cee4890a8afaf86a22e51ad4d97c91dd4579b", - "reference": "d63cee4890a8afaf86a22e51ad4d97c91dd4579b", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/267a4405fff1d9c847134db3a3c92f1ab7f77909", + "reference": "267a4405fff1d9c847134db3a3c92f1ab7f77909", "shasum": "" }, "require": { @@ -12949,7 +12950,7 @@ "type": "open_collective" } ], - "time": "2024-02-16T15:06:51+00:00" + "time": "2024-03-31T21:03:09+00:00" }, { "name": "symfony/cache", diff --git a/src/Concerns/Designer.php b/src/Concerns/Designer.php index 0b29cb7a..ba2e26ee 100644 --- a/src/Concerns/Designer.php +++ b/src/Concerns/Designer.php @@ -113,7 +113,6 @@ private static function drawSections(Form $zeusForm, ZeusSection $section, array if (optional($zeusForm->options)['show-as'] === 'wizard') { $component = Step::make($section->name) - ->live() ->description($section->description) ->icon($section->icon ?? null); } @@ -135,7 +134,7 @@ private static function drawSections(Form $zeusForm, ZeusSection $section, array return in_array($relatedFieldValues, $get('zeusData.' . $relatedField)); } - return $relatedFieldValues === $get('zeusData.' . $relatedField); + return $relatedFieldValues == $get('zeusData.' . $relatedField); }); return $component diff --git a/src/Fields/Classes/Toggle.php b/src/Fields/Classes/Toggle.php index 2d573de5..93b6c7ae 100644 --- a/src/Fields/Classes/Toggle.php +++ b/src/Fields/Classes/Toggle.php @@ -2,8 +2,10 @@ namespace LaraZeus\Bolt\Fields\Classes; +use Filament\Forms\Components\ColorPicker; use Filament\Forms\Components\Grid; use Filament\Forms\Components\Hidden; +use Filament\Support\Colors\Color; use Filament\Tables\Columns\Column; use Filament\Tables\Columns\IconColumn; use Guava\FilamentIconPicker\Forms\IconPicker; @@ -62,6 +64,11 @@ public static function getOptions(?array $sections = null): array '2xl' => 5, ]) ->label(__('Off Icon')), + + ColorPicker::make('options.on-color')->hex(), + ColorPicker::make('options.off-color')->hex(), + + \Filament\Forms\Components\Toggle::make('options.is-inline'), ]), self::required(), self::columnSpanFull(), @@ -83,6 +90,9 @@ public static function getOptionsHidden(): array self::hiddenColumnSpanFull(), Hidden::make('options.on-icon'), Hidden::make('options.off-icon'), + Hidden::make('options.on-color'), + Hidden::make('options.off-color'), + Hidden::make('options.is-inline'), ]; } @@ -99,6 +109,18 @@ public function appendFilamentComponentsOptions($component, $zeusField, bool $ha $component = $component->offIcon($zeusField->options['off-icon']); } + if (optional($zeusField->options)['on-color']) { + $component = $component->onColor(Color::hex($zeusField->options['on-color'])); + } + + if (optional($zeusField->options)['off-color']) { + $component = $component->offColor(Color::hex($zeusField->options['off-color'])); + } + + if (optional($zeusField->options)['is-inline']) { + $component = $component->inline($zeusField->options['is-inline']); + } + return $component->live(); }