From f1f7112b1295e8deb1951cf4dca75bd71a5d219a Mon Sep 17 00:00:00 2001 From: Diego Pascual Date: Tue, 23 Jul 2024 17:11:34 +0200 Subject: [PATCH 1/6] refactor: use listeners prop for GlobalXBus --- .../src/components/global-x-bus.vue | 19 ++++++++++++------- .../src/components/snippet-callbacks.vue | 2 +- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/packages/x-components/src/components/global-x-bus.vue b/packages/x-components/src/components/global-x-bus.vue index b816054fb5..836a7ab31e 100644 --- a/packages/x-components/src/components/global-x-bus.vue +++ b/packages/x-components/src/components/global-x-bus.vue @@ -1,8 +1,7 @@ @@ -39,11 +44,11 @@ This component emits no own events, but you can subscribe to any X Event using V ## See it in action This component does not render anything. Its only responsibility is to facilitate listening to any X -Event by using Vue component listeners. +Event by using the prop `listeners` ```vue - - diff --git a/packages/_vue3-migration-test/src/router.ts b/packages/_vue3-migration-test/src/router.ts index c040f9f98c..c188737156 100644 --- a/packages/_vue3-migration-test/src/router.ts +++ b/packages/_vue3-migration-test/src/router.ts @@ -22,7 +22,6 @@ import { TestSearchBox, TestBaseVariableColumnGrid, TestEmpathize, - TestUseLayouts, TestSlidingPanel, TestBaseSuggestions, TestHighlight, @@ -174,11 +173,6 @@ const routes = [ name: 'BaseVariableColumnGrid', component: TestBaseVariableColumnGrid }, - { - path: '/test-use-layouts', - name: 'UseLayouts', - component: TestUseLayouts - }, { path: '/base-suggestions', name: 'BaseSuggestions', diff --git a/packages/x-components/src/components/items-list.vue b/packages/x-components/src/components/items-list.vue index 4634c4cdd3..206beb7fa2 100644 --- a/packages/x-components/src/components/items-list.vue +++ b/packages/x-components/src/components/items-list.vue @@ -37,58 +37,35 @@ export default defineComponent({ name: 'ItemsList', props: { - /** - * Animation component that will be used to animate the list. - * - * @public - */ + /** Animation component that will be used to animate the list. */ animation: { type: animationProp, default: 'ul' }, - - /** - * List of items. - * - * @public - */ + /** List of items. */ items: { type: Array as PropType, required: true }, - - /** - * Item's classes. - * - * @public - */ - itemClass: { - type: String - } + /** Item's classes. */ + itemClass: String }, setup(props) { /** * The list of the items with additional properties. * * @returns A list of items with `dataTest`, `class` and the `slotName` for each item. - * - * @internal */ - const computedItems = computed( - (): { - dataTest: string; - class: Array; - }[] => { - return props.items.map(item => { - const modelName = toKebabCase(item.modelName); - return { - ...item, - dataTest: `${modelName}s-list-item`, - class: [`x-${modelName}s-list-item`, props.itemClass], - slotName: modelName - }; - }); - } + const computedItems = computed(() => + props.items.map(item => { + const modelName = toKebabCase(item.modelName); + return { + ...item, + dataTest: `${modelName}s-list-item`, + class: [`x-${modelName}s-list-item`, props.itemClass], + slotName: modelName + }; + }) ); return { computedItems }; diff --git a/packages/x-components/src/components/layouts/fixed-header-and-asides-layout.vue b/packages/x-components/src/components/layouts/fixed-header-and-asides-layout.vue index 18737d8819..dcec318d3a 100644 --- a/packages/x-components/src/components/layouts/fixed-header-and-asides-layout.vue +++ b/packages/x-components/src/components/layouts/fixed-header-and-asides-layout.vue @@ -13,7 +13,7 @@ />
@@ -23,7 +23,7 @@
-
+
@@ -32,14 +32,18 @@
-
+
TOOLBAR
-
+
MAIN @@ -47,7 +51,7 @@
EXTRA ASIDE -
+
SCROLL TO TOP @@ -86,13 +94,11 @@ diff --git a/packages/x-components/src/components/layouts/single-column-layout.vue b/packages/x-components/src/components/layouts/single-column-layout.vue index b974f7dbf6..4fdf4d5b7a 100644 --- a/packages/x-components/src/components/layouts/single-column-layout.vue +++ b/packages/x-components/src/components/layouts/single-column-layout.vue @@ -1,27 +1,33 @@ - + @@ -155,7 +155,7 @@