From e811730fcf1160976f9ff153795a15c42a64eff5 Mon Sep 17 00:00:00 2001 From: acondal Date: Wed, 19 Jun 2024 14:30:31 +0200 Subject: [PATCH] test: add to vue3 migration pkg EMP-4330 --- packages/_vue3-migration-test/src/main.ts | 6 ++++-- packages/_vue3-migration-test/src/router.ts | 8 +++++++- .../experience-controls/components/index.ts | 1 + .../components/test-experience-controls.vue | 18 ++++++++++++++++++ .../src/x-modules/experience-controls/index.ts | 2 ++ .../x-modules/experience-controls/x-module.ts | 13 +++++++++++++ .../src/x-modules/index.ts | 1 + 7 files changed, 46 insertions(+), 3 deletions(-) create mode 100644 packages/_vue3-migration-test/src/x-modules/experience-controls/components/index.ts create mode 100644 packages/_vue3-migration-test/src/x-modules/experience-controls/components/test-experience-controls.vue create mode 100644 packages/_vue3-migration-test/src/x-modules/experience-controls/index.ts create mode 100644 packages/_vue3-migration-test/src/x-modules/experience-controls/x-module.ts diff --git a/packages/_vue3-migration-test/src/main.ts b/packages/_vue3-migration-test/src/main.ts index 7e289d91e0..81f0aeac81 100644 --- a/packages/_vue3-migration-test/src/main.ts +++ b/packages/_vue3-migration-test/src/main.ts @@ -20,7 +20,8 @@ import { scrollXModule, searchXModule, semanticQueriesXModule, - identifierResultsXModule + identifierResultsXModule, + experienceControlsXModule } from './'; // Warnings that cannot be solved in Vue 2 (a.k.a. breaking changes) are suppressed @@ -95,7 +96,8 @@ createApp(App as Component) queriesPreview: queriesPreviewXModule, semanticQueries: semanticQueriesXModule, recommendations: recommendationsXModule, - identifierResults: identifierResultsXModule + identifierResults: identifierResultsXModule, + experienceControls: experienceControlsXModule } }) .mount('#app'); diff --git a/packages/_vue3-migration-test/src/router.ts b/packages/_vue3-migration-test/src/router.ts index ca88b5ca0b..de3d9f697d 100644 --- a/packages/_vue3-migration-test/src/router.ts +++ b/packages/_vue3-migration-test/src/router.ts @@ -38,7 +38,8 @@ import { TestSemanticQueries, TestRecommendations, TestNextQueries, - TestIdentifierResults + TestIdentifierResults, + TestExperienceControls } from './'; const routes = [ @@ -236,6 +237,11 @@ const routes = [ path: '/identifier-results', name: 'IdentifierResults', component: TestIdentifierResults + }, + { + path: '/experience-controls', + name: 'ExperienceControls', + component: TestExperienceControls } ]; diff --git a/packages/_vue3-migration-test/src/x-modules/experience-controls/components/index.ts b/packages/_vue3-migration-test/src/x-modules/experience-controls/components/index.ts new file mode 100644 index 0000000000..39cdeaf8d9 --- /dev/null +++ b/packages/_vue3-migration-test/src/x-modules/experience-controls/components/index.ts @@ -0,0 +1 @@ +export { default as TestExperienceControls } from './test-experience-controls.vue'; diff --git a/packages/_vue3-migration-test/src/x-modules/experience-controls/components/test-experience-controls.vue b/packages/_vue3-migration-test/src/x-modules/experience-controls/components/test-experience-controls.vue new file mode 100644 index 0000000000..e5698691f8 --- /dev/null +++ b/packages/_vue3-migration-test/src/x-modules/experience-controls/components/test-experience-controls.vue @@ -0,0 +1,18 @@ + + + diff --git a/packages/_vue3-migration-test/src/x-modules/experience-controls/index.ts b/packages/_vue3-migration-test/src/x-modules/experience-controls/index.ts new file mode 100644 index 0000000000..38da673ebb --- /dev/null +++ b/packages/_vue3-migration-test/src/x-modules/experience-controls/index.ts @@ -0,0 +1,2 @@ +export * from './components'; +export * from './x-module'; diff --git a/packages/_vue3-migration-test/src/x-modules/experience-controls/x-module.ts b/packages/_vue3-migration-test/src/x-modules/experience-controls/x-module.ts new file mode 100644 index 0000000000..2f52d85c65 --- /dev/null +++ b/packages/_vue3-migration-test/src/x-modules/experience-controls/x-module.ts @@ -0,0 +1,13 @@ +import { PrivateXModuleOptions } from '../../../../x-components/src/plugins/x-plugin.types'; +import { ExperienceControlsXModule } from '../../../../x-components/src/x-modules/experience-controls/x-module'; + +export const experienceControlsXModule: PrivateXModuleOptions = { + storeModule: { + state: { + controls: { numberOfCarousels: 10, resultsPerCarousels: 6 }, + events: { ColumnsNumberProvided: 6 }, + status: 'initial', + params: {} + } + } +} as PrivateXModuleOptions; diff --git a/packages/_vue3-migration-test/src/x-modules/index.ts b/packages/_vue3-migration-test/src/x-modules/index.ts index a78483264e..0d22f437ed 100644 --- a/packages/_vue3-migration-test/src/x-modules/index.ts +++ b/packages/_vue3-migration-test/src/x-modules/index.ts @@ -11,3 +11,4 @@ export * from './query-suggestions'; export * from './semantic-queries'; export * from './recommendations'; export * from './identifier-results'; +export * from './experience-controls';