diff --git a/.php-cs-fixer.cache b/.php-cs-fixer.cache index 4332d15..8b0c236 100644 --- a/.php-cs-fixer.cache +++ b/.php-cs-fixer.cache @@ -1 +1 @@ -{"php":"8.2.8","version":"3.22.0","indent":" ","lineEnding":"\n","rules":{"blank_line_after_opening_tag":true,"blank_line_between_import_groups":true,"blank_lines_before_namespace":true,"class_definition":{"inline_constructor_arguments":false,"space_before_parenthesis":true},"compact_nullable_typehint":true,"curly_braces_position":{"allow_single_line_empty_anonymous_classes":true},"declare_equal_normalize":true,"lowercase_cast":true,"lowercase_static_reference":true,"new_with_braces":true,"no_blank_lines_after_class_opening":true,"no_leading_import_slash":true,"no_whitespace_in_blank_line":true,"ordered_class_elements":{"order":["use_trait"]},"ordered_imports":{"sort_algorithm":"alpha"},"return_type_declaration":true,"short_scalar_cast":true,"single_import_per_statement":{"group_to_single_imports":false},"single_trait_insert_per_statement":true,"ternary_operator_spaces":true,"visibility_required":true,"blank_line_after_namespace":true,"constant_case":true,"control_structure_braces":true,"control_structure_continuation_position":true,"elseif":true,"function_declaration":true,"indentation_type":true,"line_ending":true,"lowercase_keywords":true,"method_argument_space":{"on_multiline":"ensure_fully_multiline","keep_multiple_spaces_after_comma":true},"no_break_comment":true,"no_closing_tag":true,"no_multiple_statements_per_line":true,"no_space_around_double_colon":true,"no_spaces_after_function_name":true,"no_spaces_inside_parenthesis":true,"no_trailing_whitespace":true,"no_trailing_whitespace_in_comment":true,"single_blank_line_at_eof":true,"single_class_element_per_statement":{"elements":["property"]},"single_line_after_imports":true,"statement_indentation":true,"switch_case_semicolon_to_colon":true,"switch_case_space":true,"encoding":true,"full_opening_tag":true,"array_syntax":{"syntax":"short"},"no_unused_imports":true,"not_operator_with_successor_space":true,"trailing_comma_in_multiline":true,"phpdoc_scalar":true,"unary_operator_spaces":true,"binary_operator_spaces":true,"blank_line_before_statement":{"statements":["break","continue","declare","return","throw","try"]},"phpdoc_single_line_var_spacing":true,"phpdoc_var_without_name":true,"class_attributes_separation":{"elements":{"method":"one"}}},"hashes":{"src\/Models\/EmailTemplate.php":"a5f3dfe87bc5a9ed9895e343160b4dce","src\/EmailTemplates.php":"97042a283775026268c450b7deecacec","src\/Notifications\/UserLoginNotification.php":"b98d444c275a5dd81ca988b02c5f6ba7","src\/Notifications\/UserResetPasswordRequestNotification.php":"50a5de5d9d76e3b7c74687d7b69c8660","src\/Notifications\/UserPasswordResetNotification.php":"ed76d4a73258f9a12580f615937bf425","src\/Notifications\/UserLockoutNotification.php":"f02d74be244f4e21c3b14f591627c79f","src\/Notifications\/UserVerifiedNotification.php":"b6a2cabc8838bd894b8fb32118606d6a","src\/Notifications\/UserRegisteredNotification.php":"853bb60f5c70587e2c9cd0e7300f06d6","src\/Mail\/UserVerifyEmail.php":"0a7307753eae99b4ba2d7e028898d216","src\/Mail\/UserPasswordResetSuccessEmail.php":"424196536f4b5c1e732f0af0e4e20508","src\/Mail\/UserRequestPasswordResetEmail.php":"34697e6c43ac925f55457164ca3e824b","src\/Mail\/UserVerifiedEmail.php":"28ad9585096c73d6c3229120ea9aaca3","src\/Mail\/UserLoginEmail.php":"329a82853b7d999ca83727ae4cfe4ad7","src\/Mail\/UserRegisteredEmail.php":"1c340bc2c746d72b6bc467a531c4d88c","src\/Mail\/UserLockedOutEmail.php":"2d3829e487caa7b17115f95d6639a1e3","src\/Commands\/InstallCommand.php":"e85db2a41f655ac49045048ab5c93bb6","src\/Commands\/MakeEmailTemplateResource.php":"965c44cb4d3fb738bd0e1169226fcf89","src\/Components\/Iframe.php":"9f0ced5dd4f7d11a7d27624fcfd819d0","src\/Components\/SelectLanguage.php":"07ede30ca8e65ae046f5556c95fc44a5","src\/Contracts\/CreateMailableInterface.php":"50b4ae28613f07fc8c1b340db7319494","src\/Contracts\/TokenHelperInterface.php":"abde3efddf3c32765a95912bca424b7e","src\/EmailTemplatesAuthServiceProvider.php":"3c25a71676aa2690bfac0e1659ed6374","src\/EmailTemplatesEventServiceProvider.php":"e3b0e4919fdb2b75f52385234169afcd","src\/Http\/Controllers\/EmailTemplateController.php":"6ad4941a35bbc3144d2d9e4c5a2863d5","src\/Helpers\/CreateMailableHelper.php":"fe7f2c617c86c70c83e95311d7c8a4da","src\/Helpers\/TokenHelper.php":"7cd13ec47aa4cc7532c1a3ff2a22e35c","src\/EmailTemplatesFacade.php":"b6b04b23d3bce0ef20dab85bb7bc5a10","src\/EmailTemplatesServiceProvider.php":"24b920e44bc1ef1d04d51ad3704fb243","src\/Traits\/BuildGenericEmail.php":"5bb5e10f82492a715a3cace242e9cb14","src\/Resources\/EmailTemplateResource.php":"c386da37c5fe00fd219ee43929cde133","src\/Resources\/EmailTemplateResource\/Pages\/EditEmailTemplate.php":"f2dc1f1e8b549000b1db5beca734eafb","src\/Resources\/EmailTemplateResource\/Pages\/PreviewEmailTemplate.php":"5058b86a5963532e4ac31834d8bb199d","src\/Resources\/EmailTemplateResource\/Pages\/ListEmailTemplates.php":"bd8aaa128bbfe51abc9b2161440be23b","src\/Resources\/EmailTemplateResource\/Pages\/CreateEmailTemplate.php":"33c696e1aaba8d38b93f204ea63b3994","src\/Listeners\/UserRegisteredListener.php":"642372800010a71b7d294ad2c516afde","src\/Listeners\/UserLoginListener.php":"03e01dafc269e0296e243299bc02b2b7","src\/Listeners\/UserVerifiedListener.php":"c31c7a93b6f384b38524f965528b7893","src\/Listeners\/PasswordResetListener.php":"c834264e4c49a4ab9aaedfff3566e95b","src\/Listeners\/UserLockoutListener.php":"e48c86c86ea131c8dfc3e28585a5c20a","tests\/Models\/User.php":"972aff9c0adb682d0e22bba4b7914492","tests\/ExampleTest.php":"9c85d3fc3571920ba5e59e6d460c5220","tests\/Pest.php":"b13737ea8aab41b228111a9702e70e94","tests\/TestCase.php":"f6ba91847024b037444f7c877794ae93","tests\/migrations\/create_email_templates_table.php":"95e3a38f1a7a360e7af2a46d54c7c460","tests\/migrations\/create_users_table.php":"a32112307e67b99b284af7038656af62","tests\/MailableTest.php":"23b2ce77c17d0a3f033b9653cfce2d03","tests\/ResourcesTest.php":"c30e8cf914f6c0b43fb5e7d88d7c44f2","tests\/factories\/EmailTemplateFactory.php":"79137d76f9b6fa23981c8c1d304989cc","src\/Commands\/PublishEmailTemplateResource.php":"91a6e1af452149c302911e9191967b32","src\/EmailTemplatesPlugin.php":"ec2d405d6b2efa562349ffe4f82fd6c0"}} \ No newline at end of file +{"php":"8.2.8","version":"3.22.0","indent":" ","lineEnding":"\n","rules":{"blank_line_after_opening_tag":true,"blank_line_between_import_groups":true,"blank_lines_before_namespace":true,"class_definition":{"inline_constructor_arguments":false,"space_before_parenthesis":true},"compact_nullable_typehint":true,"curly_braces_position":{"allow_single_line_empty_anonymous_classes":true},"declare_equal_normalize":true,"lowercase_cast":true,"lowercase_static_reference":true,"new_with_braces":true,"no_blank_lines_after_class_opening":true,"no_leading_import_slash":true,"no_whitespace_in_blank_line":true,"ordered_class_elements":{"order":["use_trait"]},"ordered_imports":{"sort_algorithm":"alpha"},"return_type_declaration":true,"short_scalar_cast":true,"single_import_per_statement":{"group_to_single_imports":false},"single_trait_insert_per_statement":true,"ternary_operator_spaces":true,"visibility_required":true,"blank_line_after_namespace":true,"constant_case":true,"control_structure_braces":true,"control_structure_continuation_position":true,"elseif":true,"function_declaration":true,"indentation_type":true,"line_ending":true,"lowercase_keywords":true,"method_argument_space":{"on_multiline":"ensure_fully_multiline","keep_multiple_spaces_after_comma":true},"no_break_comment":true,"no_closing_tag":true,"no_multiple_statements_per_line":true,"no_space_around_double_colon":true,"no_spaces_after_function_name":true,"no_spaces_inside_parenthesis":true,"no_trailing_whitespace":true,"no_trailing_whitespace_in_comment":true,"single_blank_line_at_eof":true,"single_class_element_per_statement":{"elements":["property"]},"single_line_after_imports":true,"statement_indentation":true,"switch_case_semicolon_to_colon":true,"switch_case_space":true,"encoding":true,"full_opening_tag":true,"array_syntax":{"syntax":"short"},"no_unused_imports":true,"not_operator_with_successor_space":true,"trailing_comma_in_multiline":true,"phpdoc_scalar":true,"unary_operator_spaces":true,"binary_operator_spaces":true,"blank_line_before_statement":{"statements":["break","continue","declare","return","throw","try"]},"phpdoc_single_line_var_spacing":true,"phpdoc_var_without_name":true,"class_attributes_separation":{"elements":{"method":"one"}}},"hashes":{"src\/Models\/EmailTemplate.php":"a5f3dfe87bc5a9ed9895e343160b4dce","src\/EmailTemplates.php":"97042a283775026268c450b7deecacec","src\/Notifications\/UserLoginNotification.php":"b98d444c275a5dd81ca988b02c5f6ba7","src\/Notifications\/UserResetPasswordRequestNotification.php":"50a5de5d9d76e3b7c74687d7b69c8660","src\/Notifications\/UserPasswordResetNotification.php":"ed76d4a73258f9a12580f615937bf425","src\/Notifications\/UserLockoutNotification.php":"f02d74be244f4e21c3b14f591627c79f","src\/Notifications\/UserVerifiedNotification.php":"b6a2cabc8838bd894b8fb32118606d6a","src\/Notifications\/UserRegisteredNotification.php":"853bb60f5c70587e2c9cd0e7300f06d6","src\/Mail\/UserVerifyEmail.php":"0a7307753eae99b4ba2d7e028898d216","src\/Mail\/UserPasswordResetSuccessEmail.php":"424196536f4b5c1e732f0af0e4e20508","src\/Mail\/UserRequestPasswordResetEmail.php":"34697e6c43ac925f55457164ca3e824b","src\/Mail\/UserVerifiedEmail.php":"28ad9585096c73d6c3229120ea9aaca3","src\/Mail\/UserLoginEmail.php":"329a82853b7d999ca83727ae4cfe4ad7","src\/Mail\/UserRegisteredEmail.php":"1c340bc2c746d72b6bc467a531c4d88c","src\/Mail\/UserLockedOutEmail.php":"2d3829e487caa7b17115f95d6639a1e3","src\/Commands\/InstallCommand.php":"e85db2a41f655ac49045048ab5c93bb6","src\/Commands\/MakeEmailTemplateResource.php":"965c44cb4d3fb738bd0e1169226fcf89","src\/Components\/Iframe.php":"9f0ced5dd4f7d11a7d27624fcfd819d0","src\/Components\/SelectLanguage.php":"07ede30ca8e65ae046f5556c95fc44a5","src\/Contracts\/CreateMailableInterface.php":"50b4ae28613f07fc8c1b340db7319494","src\/Contracts\/TokenHelperInterface.php":"abde3efddf3c32765a95912bca424b7e","src\/EmailTemplatesAuthServiceProvider.php":"3c25a71676aa2690bfac0e1659ed6374","src\/EmailTemplatesEventServiceProvider.php":"e3b0e4919fdb2b75f52385234169afcd","src\/Http\/Controllers\/EmailTemplateController.php":"6ad4941a35bbc3144d2d9e4c5a2863d5","src\/Helpers\/CreateMailableHelper.php":"fe7f2c617c86c70c83e95311d7c8a4da","src\/Helpers\/TokenHelper.php":"7cd13ec47aa4cc7532c1a3ff2a22e35c","src\/EmailTemplatesFacade.php":"b6b04b23d3bce0ef20dab85bb7bc5a10","src\/EmailTemplatesServiceProvider.php":"24b920e44bc1ef1d04d51ad3704fb243","src\/Traits\/BuildGenericEmail.php":"5bb5e10f82492a715a3cace242e9cb14","src\/Resources\/EmailTemplateResource.php":"c386da37c5fe00fd219ee43929cde133","src\/Resources\/EmailTemplateResource\/Pages\/EditEmailTemplate.php":"f2dc1f1e8b549000b1db5beca734eafb","src\/Resources\/EmailTemplateResource\/Pages\/PreviewEmailTemplate.php":"2faff11cd74268916128cbcf7c0db151","src\/Resources\/EmailTemplateResource\/Pages\/ListEmailTemplates.php":"bd8aaa128bbfe51abc9b2161440be23b","src\/Resources\/EmailTemplateResource\/Pages\/CreateEmailTemplate.php":"33c696e1aaba8d38b93f204ea63b3994","src\/Listeners\/UserRegisteredListener.php":"642372800010a71b7d294ad2c516afde","src\/Listeners\/UserLoginListener.php":"03e01dafc269e0296e243299bc02b2b7","src\/Listeners\/UserVerifiedListener.php":"c31c7a93b6f384b38524f965528b7893","src\/Listeners\/PasswordResetListener.php":"c834264e4c49a4ab9aaedfff3566e95b","src\/Listeners\/UserLockoutListener.php":"e48c86c86ea131c8dfc3e28585a5c20a","tests\/Models\/User.php":"972aff9c0adb682d0e22bba4b7914492","tests\/ExampleTest.php":"9c85d3fc3571920ba5e59e6d460c5220","tests\/Pest.php":"b13737ea8aab41b228111a9702e70e94","tests\/TestCase.php":"f6ba91847024b037444f7c877794ae93","tests\/migrations\/create_email_templates_table.php":"95e3a38f1a7a360e7af2a46d54c7c460","tests\/migrations\/create_users_table.php":"a32112307e67b99b284af7038656af62","tests\/MailableTest.php":"23b2ce77c17d0a3f033b9653cfce2d03","tests\/ResourcesTest.php":"c30e8cf914f6c0b43fb5e7d88d7c44f2","tests\/factories\/EmailTemplateFactory.php":"79137d76f9b6fa23981c8c1d304989cc","src\/Commands\/PublishEmailTemplateResource.php":"91a6e1af452149c302911e9191967b32","src\/EmailTemplatesPlugin.php":"ec2d405d6b2efa562349ffe4f82fd6c0","src\/Resources\/EmailTemplateResource\/Pages\/preview-bak.php":"8763c572e9150fb01d24e73c080c3732"}} \ No newline at end of file diff --git a/src/Resources/EmailTemplateResource/Pages/PreviewEmailTemplate.php b/src/Resources/EmailTemplateResource/Pages/PreviewEmailTemplate.php index 6495905..5021477 100644 --- a/src/Resources/EmailTemplateResource/Pages/PreviewEmailTemplate.php +++ b/src/Resources/EmailTemplateResource/Pages/PreviewEmailTemplate.php @@ -2,20 +2,20 @@ namespace Visualbuilder\EmailTemplates\Resources\EmailTemplateResource\Pages; -use Filament\Forms\Form; use Filament\Forms\Components\Grid; -use Filament\Forms\Components\Select; - use Filament\Forms\Components\Section; +use Filament\Forms\Components\Select; use Filament\Forms\Components\TextInput; + +use Filament\Forms\Form; use Filament\Resources\Pages\ViewRecord; use Visualbuilder\EmailTemplates\Components\Iframe; use Visualbuilder\EmailTemplates\Models\EmailTemplate; use Visualbuilder\EmailTemplates\Resources\EmailTemplateResource; class PreviewEmailTemplate extends ViewRecord -{ +{ protected static string $resource = EmailTemplateResource::class; // protected static string $view = 'filament-panels::resources.pages.view-record'; @@ -61,51 +61,51 @@ public function form(Form $form): Form ->statePath($this->getFormStatePath()) ->columns($this->hasInlineLabels() ? 1 : 2) ->inlineLabel($this->hasInlineLabels()) - // ->schema( - // [ - // Section::make() - // ->schema( - // [ - // Grid::make(['default' => 1, 'sm' => 1, 'md' => 2]) - // ->schema( - // [ - // Select::make('id') - // ->options($emailTemplates) - // ->searchable() - // ->label(__('vb-email-templates::email-templates.general-labels.template-name')) - // ->reactive() - // ->afterStateUpdated(function ($state) { - // $this->redirectRoute('filament.resources.email-templates.view', $state); - // }), - - // TextInput::make('from') - // ->label(__('vb-email-templates::email-templates.form-fields-labels.email-from')) - // ->disabled(), - // ] - // ), - // Grid::make(['default' => 1]) - // ->schema( - // [ - // TextInput::make('subject') - // ->label(__('vb-email-templates::email-templates.form-fields-labels.subject')) - // ->disabled(), - // TextInput::make('preheader') - // ->label(__('vb-email-templates::email-templates.form-fields-labels.header')) - // ->hint(__('vb-email-templates::email-templates.form-fields-labels.header-hint')) - // ->disabled(), - // ] - // ), - // Grid::make(['default' => 1]) - // ->schema( - // [ - // Iframe::make('iframe'), - // ] - // ), - - // ] - // ), - // ] - // ) + // ->schema( + // [ + // Section::make() + // ->schema( + // [ + // Grid::make(['default' => 1, 'sm' => 1, 'md' => 2]) + // ->schema( + // [ + // Select::make('id') + // ->options($emailTemplates) + // ->searchable() + // ->label(__('vb-email-templates::email-templates.general-labels.template-name')) + // ->reactive() + // ->afterStateUpdated(function ($state) { + // $this->redirectRoute('filament.resources.email-templates.view', $state); + // }), + + // TextInput::make('from') + // ->label(__('vb-email-templates::email-templates.form-fields-labels.email-from')) + // ->disabled(), + // ] + // ), + // Grid::make(['default' => 1]) + // ->schema( + // [ + // TextInput::make('subject') + // ->label(__('vb-email-templates::email-templates.form-fields-labels.subject')) + // ->disabled(), + // TextInput::make('preheader') + // ->label(__('vb-email-templates::email-templates.form-fields-labels.header')) + // ->hint(__('vb-email-templates::email-templates.form-fields-labels.header-hint')) + // ->disabled(), + // ] + // ), + // Grid::make(['default' => 1]) + // ->schema( + // [ + // Iframe::make('iframe'), + // ] + // ), + + // ] + // ), + // ] + // ) ); } diff --git a/src/Resources/EmailTemplateResource/Pages/preview-bak.php b/src/Resources/EmailTemplateResource/Pages/preview-bak.php index d7da532..36b6b10 100644 --- a/src/Resources/EmailTemplateResource/Pages/preview-bak.php +++ b/src/Resources/EmailTemplateResource/Pages/preview-bak.php @@ -3,19 +3,18 @@ namespace Visualbuilder\EmailTemplates\Resources\EmailTemplateResource\Pages; use Filament\Forms; -use Filament\Forms\Form; -use Filament\Resources\Pages\Page; use Filament\Forms\Components\Grid; use Filament\Forms\Components\Select; +use Filament\Forms\Components\TextInput; +use Filament\Forms\Concerns\InteractsWithForms; -use Filament\Forms\Contracts\HasForms; // use Filament\Resources\Pages\ViewRecord; -use Filament\Resources\Pages\Concerns; -use Filament\Forms\Components\TextInput; +use Filament\Forms\Form; use Filament\Infolists\Components\Section; -use Filament\Forms\Concerns\InteractsWithForms; -use Visualbuilder\EmailTemplates\Components\Iframe; use Filament\Pages\Concerns\InteractsWithFormActions; +use Filament\Resources\Pages\Concerns; +use Filament\Resources\Pages\Page; +use Visualbuilder\EmailTemplates\Components\Iframe; use Visualbuilder\EmailTemplates\Models\EmailTemplate; use Visualbuilder\EmailTemplates\Resources\EmailTemplateResource; @@ -25,7 +24,7 @@ class PreviewEmailTemplate extends Page use Concerns\InteractsWithRecord; use InteractsWithFormActions; use InteractsWithForms; - + protected static string $resource = EmailTemplateResource::class; protected static string $view = 'filament-panels::resources.pages.view-record'; @@ -75,7 +74,7 @@ public function form(Form $form): Form ->afterStateUpdated(function ($state) { $this->redirectRoute('filament.resources.email-templates.view', $state); }), - + TextInput::make('from') ->label(__('vb-email-templates::email-templates.form-fields-labels.email-from')) ->disabled(), @@ -99,7 +98,7 @@ public function form(Form $form): Form Iframe::make('iframe'), ] ), - + ] ), ] @@ -212,5 +211,4 @@ protected function hasInfolist(): bool { return false; } - }