From 324d5d866167352b9ad5e1b2858853ce197fe7fe Mon Sep 17 00:00:00 2001 From: Laura Martinez Garcia Date: Mon, 17 Jun 2024 14:55:17 +0200 Subject: [PATCH] feat: migrate `next-queries` module to composition API --- .../components/next-queries-list.vue | 5 +- .../next-queries/components/next-queries.vue | 84 +++++++------- .../components/next-query-preview.vue | 104 +++++++++--------- .../next-queries/components/next-query.vue | 92 ++++++++-------- .../src/x-modules/next-queries/x-module.ts | 3 + 5 files changed, 147 insertions(+), 141 deletions(-) diff --git a/packages/x-components/src/x-modules/next-queries/components/next-queries-list.vue b/packages/x-components/src/x-modules/next-queries/components/next-queries-list.vue index 286096cc94..a1bb457fc4 100644 --- a/packages/x-components/src/x-modules/next-queries/components/next-queries-list.vue +++ b/packages/x-components/src/x-modules/next-queries/components/next-queries-list.vue @@ -29,10 +29,9 @@ LIST_ITEMS_KEY, QUERY_KEY } from '../../../components/decorators/injection.consts'; - import { AnimationProp } from '../../../types/index'; + import { AnimationProp } from '../../../types/animation-prop'; import { use$x } from '../../../composables/use-$x'; import { useGetter } from '../../../composables/use-getter'; - import { useRegisterXModule } from '../../../composables/use-register-x-module'; import { NoElement } from '../../../components/no-element'; /** @@ -103,8 +102,6 @@ } }, setup(props, { slots }) { - useRegisterXModule(nextQueriesXModule); - const $x = use$x(); /** diff --git a/packages/x-components/src/x-modules/next-queries/components/next-queries.vue b/packages/x-components/src/x-modules/next-queries/components/next-queries.vue index 8dbe418e4a..a092cd1a18 100644 --- a/packages/x-components/src/x-modules/next-queries/components/next-queries.vue +++ b/packages/x-components/src/x-modules/next-queries/components/next-queries.vue @@ -36,12 +36,10 @@ diff --git a/packages/x-components/src/x-modules/next-queries/components/next-query-preview.vue b/packages/x-components/src/x-modules/next-queries/components/next-query-preview.vue index 013adef3e5..d95f44bb69 100644 --- a/packages/x-components/src/x-modules/next-queries/components/next-query-preview.vue +++ b/packages/x-components/src/x-modules/next-queries/components/next-query-preview.vue @@ -30,13 +30,11 @@ diff --git a/packages/x-components/src/x-modules/next-queries/components/next-query.vue b/packages/x-components/src/x-modules/next-queries/components/next-query.vue index 58e43f4177..940407a427 100644 --- a/packages/x-components/src/x-modules/next-queries/components/next-query.vue +++ b/packages/x-components/src/x-modules/next-queries/components/next-query.vue @@ -21,10 +21,8 @@ diff --git a/packages/x-components/src/x-modules/next-queries/x-module.ts b/packages/x-components/src/x-modules/next-queries/x-module.ts index f75131dc6a..05493509bf 100644 --- a/packages/x-components/src/x-modules/next-queries/x-module.ts +++ b/packages/x-components/src/x-modules/next-queries/x-module.ts @@ -1,4 +1,5 @@ import { XModule } from '../x-modules.types'; +import { XPlugin } from '../../plugins/x-plugin'; import { nextQueriesEmitters } from './store/emitters'; import { nextQueriesXStoreModule } from './store/module'; import { NextQueriesXStoreModule } from './store/types'; @@ -23,3 +24,5 @@ export const nextQueriesXModule: NextQueriesXModule = { storeEmitters: nextQueriesEmitters, wiring: nextQueriesWiring }; + +XPlugin.registerXModule(nextQueriesXModule);