diff --git a/packages/_vue3-migration-test/src/main.ts b/packages/_vue3-migration-test/src/main.ts index e23a9f174f..3ba06cd5e2 100644 --- a/packages/_vue3-migration-test/src/main.ts +++ b/packages/_vue3-migration-test/src/main.ts @@ -73,7 +73,25 @@ const adapter = { identifierResults: () => new Promise(resolve => resolve({ results: ['123A', '123B', '123C', '123D'].map(id => createResultStub(id)) }) - ) + ), + experienceControls: () => { + return new Promise(resolve => + resolve({ + controls: { + semanticQueries: { + numberOfCarousels: 2, + resultsPerCarousels: 2 + } + }, + events: { + SemanticQueriesConfigProvided: { + maxItemsToRequest: 'controls.semanticQueries.numberOfCarousels', + resultsPerCarousel: 'controls.semanticQueries.resultsPerCarousels' + } + } + }) + ); + } } as unknown as XComponentsAdapter; const store = createStore({}); diff --git a/packages/_vue3-migration-test/src/router.ts b/packages/_vue3-migration-test/src/router.ts index 3fa3d23554..4379c2d056 100644 --- a/packages/_vue3-migration-test/src/router.ts +++ b/packages/_vue3-migration-test/src/router.ts @@ -45,6 +45,7 @@ import { TestRedirection, TestExtraParams, TestSearch, + TestExperienceControls, TestTagging, TestRenderlessExtraParam } from './'; @@ -275,6 +276,11 @@ const routes = [ name: 'SnippetConfigExtraparams', component: TestExtraParams }, + { + path: '/experience-controls', + name: 'ExperienceControls', + component: TestExperienceControls + }, { path: '/tagging', name: 'Tagging', 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..59afdadbd7 --- /dev/null +++ b/packages/_vue3-migration-test/src/x-modules/experience-controls/components/test-experience-controls.vue @@ -0,0 +1,27 @@ + + + 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..07635cbbc8 --- /dev/null +++ b/packages/_vue3-migration-test/src/x-modules/experience-controls/index.ts @@ -0,0 +1 @@ +export * from './components'; diff --git a/packages/_vue3-migration-test/src/x-modules/index.ts b/packages/_vue3-migration-test/src/x-modules/index.ts index c935daf10c..2681f15684 100644 --- a/packages/_vue3-migration-test/src/x-modules/index.ts +++ b/packages/_vue3-migration-test/src/x-modules/index.ts @@ -12,3 +12,4 @@ export * from './semantic-queries'; export * from './recommendations'; export * from './popular-searches'; export * from './identifier-results'; +export * from './experience-controls'; diff --git a/packages/x-components/src/x-modules/experience-controls/components/experience-controls.vue b/packages/x-components/src/x-modules/experience-controls/components/experience-controls.vue index 952916008f..932d9e76c8 100644 --- a/packages/x-components/src/x-modules/experience-controls/components/experience-controls.vue +++ b/packages/x-components/src/x-modules/experience-controls/components/experience-controls.vue @@ -1,10 +1,8 @@ diff --git a/packages/x-components/src/x-modules/experience-controls/x-module.ts b/packages/x-components/src/x-modules/experience-controls/x-module.ts index 6a75f46eb1..0080f90ba5 100644 --- a/packages/x-components/src/x-modules/experience-controls/x-module.ts +++ b/packages/x-components/src/x-modules/experience-controls/x-module.ts @@ -1,4 +1,5 @@ import { XModule } from '../x-modules.types'; +import { XPlugin } from '../../plugins/index'; import { experienceControlsEmitters } from './store/emitters'; import { experienceControlsXStoreModule } from './store/module'; import { ExperienceControlsXStoreModule } from './store/types'; @@ -23,3 +24,5 @@ export const experienceControlsXModule: ExperienceControlsXModule = { storeEmitters: experienceControlsEmitters, wiring: experienceControlsWiring }; + +XPlugin.registerXModule(experienceControlsXModule);