diff --git a/src/Sylius/Behat/Page/Admin/Order/UpdatePage.php b/src/Sylius/Behat/Page/Admin/Order/UpdatePage.php index ca723454ef6..98e6471e92e 100644 --- a/src/Sylius/Behat/Page/Admin/Order/UpdatePage.php +++ b/src/Sylius/Behat/Page/Admin/Order/UpdatePage.php @@ -104,7 +104,7 @@ protected function getDefinedElements(): array 'billing_province_name' => '#sylius_order_billingAddress_provinceName', 'billing_province_code' => '#sylius_order_billingAddress_provinceCode', 'billing_street' => '#sylius_order_billingAddress_street', - 'live_form' => '[data-live-name-value="SyliusAdmin.Order.OrderType"]', + 'live_form' => '[data-live-name-value="sylius_admin:order:form"]', 'shipping_city' => '#sylius_order_shippingAddress_city', 'shipping_country' => '#sylius_order_shippingAddress_countryCode', 'shipping_first_name' => '#sylius_order_shippingAddress_firstName', diff --git a/src/Sylius/Behat/Page/Admin/Product/FormTrait.php b/src/Sylius/Behat/Page/Admin/Product/FormTrait.php index fafc631384b..7696e6bc851 100644 --- a/src/Sylius/Behat/Page/Admin/Product/FormTrait.php +++ b/src/Sylius/Behat/Page/Admin/Product/FormTrait.php @@ -28,7 +28,7 @@ public function getDefinedFormElements(): array return [ 'attribute_value' => '[data-test-attribute-value][data-test-locale-code="%localeCode%"][data-test-attribute-name="%attributeName%"]', 'channel_tab' => '[data-test-channel-tab="%channelCode%"]', - 'form' => '[data-live-name-value="SyliusAdmin.Product.Form"]', + 'form' => '[data-live-name-value="sylius_admin:product:form"]', 'field_associations' => '[name="sylius_product[associations][%association%][]"]', 'field_name' => '[name="sylius_product[translations][%localeCode%][name]"]', 'field_slug' => '[name="sylius_product[translations][%localeCode%][slug]"]', diff --git a/src/Sylius/Bundle/AdminBundle/Resources/config/app/twig_hooks/common/component/navbar.yaml b/src/Sylius/Bundle/AdminBundle/Resources/config/app/twig_hooks/common/component/navbar.yaml index 66b858dff5f..da4c6dcf49c 100644 --- a/src/Sylius/Bundle/AdminBundle/Resources/config/app/twig_hooks/common/component/navbar.yaml +++ b/src/Sylius/Bundle/AdminBundle/Resources/config/app/twig_hooks/common/component/navbar.yaml @@ -7,7 +7,7 @@ twig_hooks: template: '@SyliusAdmin/shared/crud/common/navbar/menu.html.twig' 'sylius_admin.common.component.navbar.items': notifications: - component: 'SyliusAdminNavbarNotifications' + component: 'sylius_admin:navbar:notifications' user_dropdown: template: '@SyliusAdmin/shared/crud/common/navbar/items/user.html.twig' 'sylius_admin.common.component.navbar.menu': diff --git a/src/Sylius/Bundle/AdminBundle/Resources/config/app/twig_hooks/country/create.yaml b/src/Sylius/Bundle/AdminBundle/Resources/config/app/twig_hooks/country/create.yaml index 99e46a43f4f..df0e667f15c 100644 --- a/src/Sylius/Bundle/AdminBundle/Resources/config/app/twig_hooks/country/create.yaml +++ b/src/Sylius/Bundle/AdminBundle/Resources/config/app/twig_hooks/country/create.yaml @@ -2,7 +2,7 @@ twig_hooks: hooks: 'sylius_admin.country.create.content': form: - component: 'SyliusAdmin.Country.CountryType' + component: 'sylius_admin.country.form' props: country: '@=_context.resource' form: '@=_context.form' diff --git a/src/Sylius/Bundle/AdminBundle/Resources/config/app/twig_hooks/country/update.yaml b/src/Sylius/Bundle/AdminBundle/Resources/config/app/twig_hooks/country/update.yaml index 3ce69c62f16..732df07386d 100644 --- a/src/Sylius/Bundle/AdminBundle/Resources/config/app/twig_hooks/country/update.yaml +++ b/src/Sylius/Bundle/AdminBundle/Resources/config/app/twig_hooks/country/update.yaml @@ -2,7 +2,7 @@ twig_hooks: hooks: 'sylius_admin.country.update.content': form: - component: 'SyliusAdmin.Country.CountryType' + component: 'sylius_admin.country.form' props: country: '@=_context.resource' form: '@=_context.form' diff --git a/src/Sylius/Bundle/AdminBundle/Resources/config/app/twig_hooks/customer/show.yaml b/src/Sylius/Bundle/AdminBundle/Resources/config/app/twig_hooks/customer/show.yaml index 969d1a09148..85a367251fd 100644 --- a/src/Sylius/Bundle/AdminBundle/Resources/config/app/twig_hooks/customer/show.yaml +++ b/src/Sylius/Bundle/AdminBundle/Resources/config/app/twig_hooks/customer/show.yaml @@ -26,7 +26,7 @@ twig_hooks: 'sylius_admin.customer.show.content.sections': order_statistics: - component: 'SyliusAdmin.Customer.Show.OrderStatistics' + component: 'sylius_admin:customer:order_statistics' props: customerId: '@=_context.resource.getId()' details: diff --git a/src/Sylius/Bundle/AdminBundle/Resources/config/app/twig_hooks/dashboard/index.yaml b/src/Sylius/Bundle/AdminBundle/Resources/config/app/twig_hooks/dashboard/index.yaml index 58ae74bfbbf..c2d5c099578 100644 --- a/src/Sylius/Bundle/AdminBundle/Resources/config/app/twig_hooks/dashboard/index.yaml +++ b/src/Sylius/Bundle/AdminBundle/Resources/config/app/twig_hooks/dashboard/index.yaml @@ -14,7 +14,7 @@ twig_hooks: grid: enabled: false statistics: - component: 'SyliusAdmin.Dashboard.Statistics' + component: 'sylius_admin:dashboard:statistics' props: channelCode: '@=_context.channelCode' latest_statistics: @@ -52,6 +52,6 @@ twig_hooks: 'sylius_admin.dashboard.index.content.latest_statistics': new_customers: - component: 'SyliusAdmin.Dashboard.NewCustomers' + component: 'sylius_admin:dashboard:new_customers' new_orders: - component: 'SyliusAdmin.Dashboard.NewOrders' + component: 'sylius_admin:dashboard:new_orders' diff --git a/src/Sylius/Bundle/AdminBundle/Resources/config/app/twig_hooks/order/update.yaml b/src/Sylius/Bundle/AdminBundle/Resources/config/app/twig_hooks/order/update.yaml index 52d5cce2260..e13513ad443 100644 --- a/src/Sylius/Bundle/AdminBundle/Resources/config/app/twig_hooks/order/update.yaml +++ b/src/Sylius/Bundle/AdminBundle/Resources/config/app/twig_hooks/order/update.yaml @@ -2,7 +2,7 @@ twig_hooks: hooks: sylius_admin.order.update.content: form: - component: 'SyliusAdmin.Order.OrderType' + component: 'sylius_admin:order:form' props: order: '@=_context.resource' form: '@=_context.form' diff --git a/src/Sylius/Bundle/AdminBundle/Resources/config/app/twig_hooks/product/create.yaml b/src/Sylius/Bundle/AdminBundle/Resources/config/app/twig_hooks/product/create.yaml index 97d6d4a53a0..8bc5aecb80d 100644 --- a/src/Sylius/Bundle/AdminBundle/Resources/config/app/twig_hooks/product/create.yaml +++ b/src/Sylius/Bundle/AdminBundle/Resources/config/app/twig_hooks/product/create.yaml @@ -5,7 +5,7 @@ twig_hooks: template: '@SyliusAdmin/product/scripts.html.twig' 'sylius_admin.product.create.content': form: - component: 'SyliusAdmin.Product.Form' + component: 'sylius_admin:product:form' props: form: '@=_context.form' resource: '@=_context.resource' diff --git a/src/Sylius/Bundle/AdminBundle/Resources/config/app/twig_hooks/product/update.yaml b/src/Sylius/Bundle/AdminBundle/Resources/config/app/twig_hooks/product/update.yaml index 6eea20138bf..257437966df 100644 --- a/src/Sylius/Bundle/AdminBundle/Resources/config/app/twig_hooks/product/update.yaml +++ b/src/Sylius/Bundle/AdminBundle/Resources/config/app/twig_hooks/product/update.yaml @@ -5,7 +5,7 @@ twig_hooks: template: '@SyliusAdmin/product/scripts.html.twig' 'sylius_admin.product.update.content': form: - component: 'SyliusAdmin.Product.Form' + component: 'sylius_admin:product:form' props: form: '@=_context.form' resource: '@=_context.resource' diff --git a/src/Sylius/Bundle/AdminBundle/Resources/config/app/twig_hooks/taxon/create.yaml b/src/Sylius/Bundle/AdminBundle/Resources/config/app/twig_hooks/taxon/create.yaml index 5501a701767..78e73feb927 100644 --- a/src/Sylius/Bundle/AdminBundle/Resources/config/app/twig_hooks/taxon/create.yaml +++ b/src/Sylius/Bundle/AdminBundle/Resources/config/app/twig_hooks/taxon/create.yaml @@ -8,7 +8,7 @@ twig_hooks: 'sylius_admin.taxon.create.content.form': tree: - component: 'SyliusAdmin.Taxon.TaxonTree' + component: 'sylius_admin:taxon:tree' sections: template: '@SyliusAdmin/taxon/form/sections.html.twig' diff --git a/src/Sylius/Bundle/AdminBundle/Resources/config/app/twig_hooks/taxon/update.yaml b/src/Sylius/Bundle/AdminBundle/Resources/config/app/twig_hooks/taxon/update.yaml index a4087e59d65..58d48c5aa9c 100644 --- a/src/Sylius/Bundle/AdminBundle/Resources/config/app/twig_hooks/taxon/update.yaml +++ b/src/Sylius/Bundle/AdminBundle/Resources/config/app/twig_hooks/taxon/update.yaml @@ -8,7 +8,7 @@ twig_hooks: 'sylius_admin.taxon.update.content.form': tree: - component: 'SyliusAdmin.Taxon.TaxonTree' + component: 'sylius_admin:taxon:tree' sections: template: '@SyliusAdmin/taxon/form/sections.html.twig' diff --git a/src/Sylius/Bundle/AdminBundle/Resources/config/services/twig/component.xml b/src/Sylius/Bundle/AdminBundle/Resources/config/services/twig/component.xml index 7099a0bd7f7..66fed905277 100644 --- a/src/Sylius/Bundle/AdminBundle/Resources/config/services/twig/component.xml +++ b/src/Sylius/Bundle/AdminBundle/Resources/config/services/twig/component.xml @@ -11,71 +11,196 @@ - + + + Sylius\Bundle\PromotionBundle\Form\Type\CatalogPromotionType - - - + + + + + + Sylius\Bundle\ChannelBundle\Form\Type\ChannelType + + - + + + Sylius\Bundle\AddressingBundle\Form\Type\CountryType + + + + + - + + + - - - + + + + - - + + + + - - - - + + + - + - - - + + + + - + - Sylius\Bundle\AddressingBundle\Form\Type\CountryType + Sylius\Bundle\OrderBundle\Form\Type\OrderType + + - + - Sylius\Bundle\ShippingBundle\Form\Type\ShipmentShipType + Sylius\Bundle\PaymentBundle\Form\Type\PaymentMethodType + + - + Sylius\Bundle\ProductBundle\Form\Type\ProductType + + + + + + + + Sylius\Bundle\ProductBundle\Form\Type\ProductGenerateVariantsType + + - + + + + - + Sylius\Bundle\PromotionBundle\Form\Type\PromotionType + + @@ -83,45 +208,73 @@ Sylius\Bundle\AddressingBundle\Form\Type\ZoneType - - - Sylius\Bundle\OrderBundle\Form\Type\OrderType + + - - - - + + + + - - - Sylius\Bundle\ChannelBundle\Form\Type\ChannelType + - + Sylius\Bundle\ShippingBundle\Form\Type\ShippingMethodType - - - - Sylius\Bundle\PromotionBundle\Form\Type\CatalogPromotionType + - + - Sylius\Bundle\ProductBundle\Form\Type\ProductGenerateVariantsType - + Sylius\Bundle\ShippingBundle\Form\Type\ShipmentShipType - - - Sylius\Bundle\PaymentBundle\Form\Type\PaymentMethodType + - - + + + - + + diff --git a/src/Sylius/Bundle/AdminBundle/Twig/Component/CatalogPromotion/FormComponent.php b/src/Sylius/Bundle/AdminBundle/Twig/Component/CatalogPromotion/FormComponent.php index d838be00809..394f7905ac6 100644 --- a/src/Sylius/Bundle/AdminBundle/Twig/Component/CatalogPromotion/FormComponent.php +++ b/src/Sylius/Bundle/AdminBundle/Twig/Component/CatalogPromotion/FormComponent.php @@ -18,14 +18,12 @@ use Symfony\Component\Form\FormFactoryInterface; use Symfony\Component\Form\FormInterface; use Symfony\Component\PropertyAccess\PropertyAccessorInterface; -use Symfony\UX\LiveComponent\Attribute\AsLiveComponent; use Symfony\UX\LiveComponent\Attribute\LiveAction; use Symfony\UX\LiveComponent\Attribute\LiveArg; use Symfony\UX\LiveComponent\Attribute\LiveProp; use Symfony\UX\LiveComponent\DefaultActionTrait; use Symfony\UX\LiveComponent\LiveCollectionTrait; -#[AsLiveComponent(name: 'sylius_admin:catalog_promotion:form', template: '@SyliusAdmin/catalog_promotion/form.html.twig')] class FormComponent { use DefaultActionTrait; diff --git a/src/Sylius/Bundle/AdminBundle/Twig/Component/Channel/FormComponent.php b/src/Sylius/Bundle/AdminBundle/Twig/Component/Channel/FormComponent.php index 1bd8fff3c19..fa2bfef258b 100644 --- a/src/Sylius/Bundle/AdminBundle/Twig/Component/Channel/FormComponent.php +++ b/src/Sylius/Bundle/AdminBundle/Twig/Component/Channel/FormComponent.php @@ -17,12 +17,10 @@ use Sylius\TwigHooks\LiveComponent\HookableLiveComponentTrait; use Symfony\Component\Form\FormFactoryInterface; use Symfony\Component\Form\FormInterface; -use Symfony\UX\LiveComponent\Attribute\AsLiveComponent; use Symfony\UX\LiveComponent\Attribute\LiveProp; use Symfony\UX\LiveComponent\ComponentWithFormTrait; use Symfony\UX\LiveComponent\DefaultActionTrait; -#[AsLiveComponent(name: 'sylius_admin:channel:form', template: '@SyliusAdmin/channel/form.html.twig')] final class FormComponent { use DefaultActionTrait; diff --git a/src/Sylius/Bundle/AdminBundle/Twig/Component/Country/CountryType.php b/src/Sylius/Bundle/AdminBundle/Twig/Component/Country/FormComponent.php similarity index 86% rename from src/Sylius/Bundle/AdminBundle/Twig/Component/Country/CountryType.php rename to src/Sylius/Bundle/AdminBundle/Twig/Component/Country/FormComponent.php index b34df5cf320..136019c2753 100644 --- a/src/Sylius/Bundle/AdminBundle/Twig/Component/Country/CountryType.php +++ b/src/Sylius/Bundle/AdminBundle/Twig/Component/Country/FormComponent.php @@ -17,13 +17,11 @@ use Sylius\TwigHooks\LiveComponent\HookableLiveComponentTrait; use Symfony\Component\Form\FormFactoryInterface; use Symfony\Component\Form\FormInterface; -use Symfony\UX\LiveComponent\Attribute\AsLiveComponent; use Symfony\UX\LiveComponent\Attribute\LiveProp; use Symfony\UX\LiveComponent\DefaultActionTrait; use Symfony\UX\LiveComponent\LiveCollectionTrait; -#[AsLiveComponent(name: 'SyliusAdmin.Country.CountryType', template: '@SyliusAdmin/country/form.html.twig')] -final class CountryType +final class FormComponent { use DefaultActionTrait; use HookableLiveComponentTrait; diff --git a/src/Sylius/Bundle/AdminBundle/Twig/Component/Customer/OrderStatistics.php b/src/Sylius/Bundle/AdminBundle/Twig/Component/Customer/OrderStatisticsComponent.php similarity index 86% rename from src/Sylius/Bundle/AdminBundle/Twig/Component/Customer/OrderStatistics.php rename to src/Sylius/Bundle/AdminBundle/Twig/Component/Customer/OrderStatisticsComponent.php index d56891a899e..2f656908f4f 100644 --- a/src/Sylius/Bundle/AdminBundle/Twig/Component/Customer/OrderStatistics.php +++ b/src/Sylius/Bundle/AdminBundle/Twig/Component/Customer/OrderStatisticsComponent.php @@ -18,16 +18,11 @@ use Sylius\Component\Core\Model\CustomerInterface; use Sylius\Component\Core\Repository\CustomerRepositoryInterface; use Sylius\TwigHooks\LiveComponent\HookableLiveComponentTrait; -use Symfony\UX\LiveComponent\Attribute\AsLiveComponent; use Symfony\UX\LiveComponent\Attribute\LiveProp; use Symfony\UX\LiveComponent\DefaultActionTrait; use Symfony\UX\TwigComponent\Attribute\ExposeInTemplate; -#[AsLiveComponent( - name: 'SyliusAdmin.Customer.Show.OrderStatistics', - template: '@SyliusAdmin/customer/show/component/order_statistics.html.twig', -)] -final class OrderStatistics +final class OrderStatisticsComponent { use HookableLiveComponentTrait; use DefaultActionTrait; diff --git a/src/Sylius/Bundle/AdminBundle/Twig/Component/Dashboard/StatisticsComponent.php b/src/Sylius/Bundle/AdminBundle/Twig/Component/Dashboard/StatisticsComponent.php index 1b2b9691946..85a3518c133 100644 --- a/src/Sylius/Bundle/AdminBundle/Twig/Component/Dashboard/StatisticsComponent.php +++ b/src/Sylius/Bundle/AdminBundle/Twig/Component/Dashboard/StatisticsComponent.php @@ -17,7 +17,6 @@ use Sylius\Component\Channel\Repository\ChannelRepositoryInterface; use Sylius\Component\Core\Model\ChannelInterface; use Sylius\TwigHooks\LiveComponent\HookableLiveComponentTrait; -use Symfony\UX\LiveComponent\Attribute\AsLiveComponent; use Symfony\UX\LiveComponent\Attribute\LiveAction; use Symfony\UX\LiveComponent\Attribute\LiveArg; use Symfony\UX\LiveComponent\Attribute\LiveProp; @@ -25,7 +24,6 @@ use Symfony\UX\LiveComponent\DefaultActionTrait; use Symfony\UX\TwigComponent\Attribute\ExposeInTemplate; -#[AsLiveComponent(name: 'SyliusAdmin.Dashboard.Statistics', template: '@SyliusAdmin/dashboard/index/component/statistics.html.twig')] final class StatisticsComponent { use ComponentToolsTrait; diff --git a/src/Sylius/Bundle/AdminBundle/Twig/Component/Order/OrderType.php b/src/Sylius/Bundle/AdminBundle/Twig/Component/Order/FormComponent.php similarity index 86% rename from src/Sylius/Bundle/AdminBundle/Twig/Component/Order/OrderType.php rename to src/Sylius/Bundle/AdminBundle/Twig/Component/Order/FormComponent.php index e0b9e89e2ca..10e166ac104 100644 --- a/src/Sylius/Bundle/AdminBundle/Twig/Component/Order/OrderType.php +++ b/src/Sylius/Bundle/AdminBundle/Twig/Component/Order/FormComponent.php @@ -17,13 +17,11 @@ use Sylius\TwigHooks\LiveComponent\HookableLiveComponentTrait; use Symfony\Component\Form\FormFactoryInterface; use Symfony\Component\Form\FormInterface; -use Symfony\UX\LiveComponent\Attribute\AsLiveComponent; use Symfony\UX\LiveComponent\Attribute\LiveProp; use Symfony\UX\LiveComponent\ComponentWithFormTrait; use Symfony\UX\LiveComponent\DefaultActionTrait; -#[AsLiveComponent(name: 'SyliusAdmin.Order.OrderType', template: '@SyliusAdmin/order/form.html.twig')] -final class OrderType +final class FormComponent { use ComponentWithFormTrait; use DefaultActionTrait; diff --git a/src/Sylius/Bundle/AdminBundle/Twig/Component/PaymentMethod/FormComponent.php b/src/Sylius/Bundle/AdminBundle/Twig/Component/PaymentMethod/FormComponent.php index 747371af073..f30b423473c 100644 --- a/src/Sylius/Bundle/AdminBundle/Twig/Component/PaymentMethod/FormComponent.php +++ b/src/Sylius/Bundle/AdminBundle/Twig/Component/PaymentMethod/FormComponent.php @@ -20,9 +20,7 @@ use Symfony\UX\LiveComponent\Attribute\LiveProp; use Symfony\UX\LiveComponent\ComponentWithFormTrait; use Symfony\UX\LiveComponent\DefaultActionTrait; -use Symfony\UX\TwigComponent\Attribute\AsTwigComponent; -#[AsTwigComponent(name: 'sylius_admin:payment_method:form', template: '@SyliusAdmin/payment_method/form.html.twig')] final class FormComponent { use DefaultActionTrait; diff --git a/src/Sylius/Bundle/AdminBundle/Twig/Component/Product/FormComponent.php b/src/Sylius/Bundle/AdminBundle/Twig/Component/Product/FormComponent.php index 9a6ddec7e27..d9d593b9e78 100644 --- a/src/Sylius/Bundle/AdminBundle/Twig/Component/Product/FormComponent.php +++ b/src/Sylius/Bundle/AdminBundle/Twig/Component/Product/FormComponent.php @@ -23,7 +23,6 @@ use Symfony\Component\Form\FormFactoryInterface; use Symfony\Component\Form\FormInterface; use Symfony\Component\Form\FormView; -use Symfony\UX\LiveComponent\Attribute\AsLiveComponent; use Symfony\UX\LiveComponent\Attribute\LiveAction; use Symfony\UX\LiveComponent\Attribute\LiveArg; use Symfony\UX\LiveComponent\Attribute\LiveProp; @@ -32,7 +31,6 @@ use Symfony\UX\LiveComponent\LiveCollectionTrait; use Symfony\UX\TwigComponent\Attribute\ExposeInTemplate; -#[AsLiveComponent(name: 'SyliusAdmin.Product.Form', template: '@SyliusAdmin/product/form.html.twig')] class FormComponent { public const ATTRIBUTE_REMOVED_EVENT = 'sylius_admin:product:form:attributed_deleted'; diff --git a/src/Sylius/Bundle/AdminBundle/Twig/Component/Product/GenerateProductVariantsFormComponent.php b/src/Sylius/Bundle/AdminBundle/Twig/Component/Product/GenerateProductVariantsFormComponent.php index 16a4afe6180..4cd71608ec1 100644 --- a/src/Sylius/Bundle/AdminBundle/Twig/Component/Product/GenerateProductVariantsFormComponent.php +++ b/src/Sylius/Bundle/AdminBundle/Twig/Component/Product/GenerateProductVariantsFormComponent.php @@ -17,12 +17,10 @@ use Sylius\TwigHooks\LiveComponent\HookableLiveComponentTrait; use Symfony\Component\Form\FormFactoryInterface; use Symfony\Component\Form\FormInterface; -use Symfony\UX\LiveComponent\Attribute\AsLiveComponent; use Symfony\UX\LiveComponent\Attribute\LiveProp; use Symfony\UX\LiveComponent\DefaultActionTrait; use Symfony\UX\LiveComponent\LiveCollectionTrait; -#[AsLiveComponent(name: 'sylius_admin:product:generate_product_variants_form', template: '@SyliusAdmin/product/generate_variants/form.html.twig')] final class GenerateProductVariantsFormComponent { use DefaultActionTrait; diff --git a/src/Sylius/Bundle/AdminBundle/Twig/Component/Product/ProductAttributeAutocompleteComponent.php b/src/Sylius/Bundle/AdminBundle/Twig/Component/Product/ProductAttributeAutocompleteComponent.php index 6eaa4f70b2c..cf8aca762c0 100644 --- a/src/Sylius/Bundle/AdminBundle/Twig/Component/Product/ProductAttributeAutocompleteComponent.php +++ b/src/Sylius/Bundle/AdminBundle/Twig/Component/Product/ProductAttributeAutocompleteComponent.php @@ -14,13 +14,11 @@ namespace Sylius\Bundle\AdminBundle\Twig\Component\Product; use Symfony\UX\Autocomplete\Checksum\ChecksumCalculator; -use Symfony\UX\LiveComponent\Attribute\AsLiveComponent; use Symfony\UX\LiveComponent\Attribute\LiveProp; use Symfony\UX\LiveComponent\ComponentToolsTrait; use Symfony\UX\LiveComponent\DefaultActionTrait; use Symfony\UX\TwigComponent\Attribute\ExposeInTemplate; -#[AsLiveComponent(name: 'SyliusAdmin.Product.ProductAttributeAutocomplete', template: '@SyliusAdmin/product/product_attribute_autocomplete.html.twig')] final class ProductAttributeAutocompleteComponent { /** @var array */ diff --git a/src/Sylius/Bundle/AdminBundle/Twig/Component/Promotion/FormComponent.php b/src/Sylius/Bundle/AdminBundle/Twig/Component/Promotion/FormComponent.php index f7760d0fd98..a3f50eb0d57 100644 --- a/src/Sylius/Bundle/AdminBundle/Twig/Component/Promotion/FormComponent.php +++ b/src/Sylius/Bundle/AdminBundle/Twig/Component/Promotion/FormComponent.php @@ -18,14 +18,12 @@ use Symfony\Component\Form\FormFactoryInterface; use Symfony\Component\Form\FormInterface; use Symfony\Component\PropertyAccess\PropertyAccessorInterface; -use Symfony\UX\LiveComponent\Attribute\AsLiveComponent; use Symfony\UX\LiveComponent\Attribute\LiveAction; use Symfony\UX\LiveComponent\Attribute\LiveArg; use Symfony\UX\LiveComponent\Attribute\LiveProp; use Symfony\UX\LiveComponent\DefaultActionTrait; use Symfony\UX\LiveComponent\LiveCollectionTrait; -#[AsLiveComponent(name: 'sylius_admin:promotion:form', template: '@SyliusAdmin/promotion/form.html.twig')] final class FormComponent { use DefaultActionTrait; diff --git a/src/Sylius/Bundle/AdminBundle/Twig/Component/Shipment/ShipComponent.php b/src/Sylius/Bundle/AdminBundle/Twig/Component/Shipment/ShipComponent.php index 522409b5b6c..ce0915a76a2 100644 --- a/src/Sylius/Bundle/AdminBundle/Twig/Component/Shipment/ShipComponent.php +++ b/src/Sylius/Bundle/AdminBundle/Twig/Component/Shipment/ShipComponent.php @@ -22,7 +22,7 @@ use Symfony\UX\LiveComponent\ComponentWithFormTrait; use Symfony\UX\LiveComponent\DefaultActionTrait; -#[AsLiveComponent(name: 'sylius_admin:shipment:ship', template: '@SyliusAdmin/shipment/component/ship.html.twig')] +#[AsLiveComponent] final class ShipComponent { use DefaultActionTrait; diff --git a/src/Sylius/Bundle/AdminBundle/Twig/Component/ShippingMethod/FormComponent.php b/src/Sylius/Bundle/AdminBundle/Twig/Component/ShippingMethod/FormComponent.php index 8ec5ad28911..bb2ddd1d4f7 100644 --- a/src/Sylius/Bundle/AdminBundle/Twig/Component/ShippingMethod/FormComponent.php +++ b/src/Sylius/Bundle/AdminBundle/Twig/Component/ShippingMethod/FormComponent.php @@ -25,7 +25,7 @@ use Symfony\UX\LiveComponent\DefaultActionTrait; use Symfony\UX\LiveComponent\LiveCollectionTrait; -#[AsLiveComponent(name: 'sylius_admin:shipping_method:form', template: '@SyliusAdmin/shipping_method/form.html.twig')] +#[AsLiveComponent] final class FormComponent { use DefaultActionTrait; diff --git a/src/Sylius/Bundle/AdminBundle/Twig/Component/Taxon/TaxonTreeComponent.php b/src/Sylius/Bundle/AdminBundle/Twig/Component/Taxon/TaxonTreeComponent.php index f480ada1999..3766f4c8f2b 100644 --- a/src/Sylius/Bundle/AdminBundle/Twig/Component/Taxon/TaxonTreeComponent.php +++ b/src/Sylius/Bundle/AdminBundle/Twig/Component/Taxon/TaxonTreeComponent.php @@ -17,13 +17,11 @@ use Sylius\Component\Core\Model\TaxonInterface; use Sylius\Component\Taxonomy\Repository\TaxonRepositoryInterface; use Sylius\TwigHooks\LiveComponent\HookableLiveComponentTrait; -use Symfony\UX\LiveComponent\Attribute\AsLiveComponent; use Symfony\UX\LiveComponent\Attribute\LiveAction; use Symfony\UX\LiveComponent\Attribute\LiveArg; use Symfony\UX\LiveComponent\DefaultActionTrait; use Symfony\UX\TwigComponent\Attribute\ExposeInTemplate; -#[AsLiveComponent(name: 'SyliusAdmin.Taxon.TaxonTree', template: '@SyliusAdmin/taxon/component/taxon_tree.html.twig')] final class TaxonTreeComponent { use DefaultActionTrait; diff --git a/src/Sylius/Bundle/AdminBundle/templates/product/form/sections/attributes.html.twig b/src/Sylius/Bundle/AdminBundle/templates/product/form/sections/attributes.html.twig index 56bcaf2daca..c86846404b2 100644 --- a/src/Sylius/Bundle/AdminBundle/templates/product/form/sections/attributes.html.twig +++ b/src/Sylius/Bundle/AdminBundle/templates/product/form/sections/attributes.html.twig @@ -10,7 +10,7 @@
- + diff --git a/src/Sylius/Bundle/AdminBundle/templates/shared/crud/common/navbar/items/user.html.twig b/src/Sylius/Bundle/AdminBundle/templates/shared/crud/common/navbar/items/user.html.twig index 749ae72fe0f..07ca8eeba00 100644 --- a/src/Sylius/Bundle/AdminBundle/templates/shared/crud/common/navbar/items/user.html.twig +++ b/src/Sylius/Bundle/AdminBundle/templates/shared/crud/common/navbar/items/user.html.twig @@ -1,3 +1,3 @@ diff --git a/src/Sylius/Bundle/AdminBundle/templates/shared/crud/common/sidebar/user.html.twig b/src/Sylius/Bundle/AdminBundle/templates/shared/crud/common/sidebar/user.html.twig index e408b06f69c..62c3a6de859 100644 --- a/src/Sylius/Bundle/AdminBundle/templates/shared/crud/common/sidebar/user.html.twig +++ b/src/Sylius/Bundle/AdminBundle/templates/shared/crud/common/sidebar/user.html.twig @@ -1,3 +1,3 @@
- {{ component('SyliusAdminUserDropdown') }} + {{ component('sylius_admin:navbar:user_dropdown') }}