Skip to content

Commit

Permalink
feat: add semantic queries to playground
Browse files Browse the repository at this point in the history
  • Loading branch information
andreadlgdo committed Jun 6, 2024
1 parent 45bb5c2 commit 197da13
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/_vue3-migration-test/src/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ import {
TestBasePanel,
TestBaseKeyboardNavigation,
TestBaseEventsModal,
TestBaseIdModal
TestBaseIdModal,
TestSemanticQueries
} from './';

const routes = [
Expand Down Expand Up @@ -176,6 +177,11 @@ const routes = [
path: '/test-base-id-modal',
name: 'TestBaseIdModal',
component: TestBaseIdModal
},
{
path: '/test-semantic-queries',
name: 'TestSemanticQueries',
component: TestSemanticQueries
}
];

Expand Down
1 change: 1 addition & 0 deletions packages/_vue3-migration-test/src/x-modules/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ export * from './facets';
export * from './next-queries';
export * from './search';
export * from './search-box';
export * from './semantic-queries';
export { default as TestElementsList } from './test-elements-list.vue';
export * from './scroll';
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<template>
<SemanticQueries />
</template>

<script setup>
import SemanticQueries from '../../../../../x-components/src/x-modules/semantic-queries/components/semantic-queries.vue';
</script>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export { default as TestSemanticQueries } from './components/test-semantic-queries.vue';
export * from './x-module';
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { PrivateXModuleOptions } from '../../../../x-components/src/plugins/x-plugin.types';
import { SemanticQueriesXModule } from '../../../../x-components/src/x-modules/semantic-queries/x-module';

export const semanticQueriesXModule: PrivateXModuleOptions<SemanticQueriesXModule> = {
storeModule: {
state: {
config: {
threshold: 5,
maxItemsToRequest: 3
},
semanticQueries: [{ query: 'test', distance: 0 }],
params: {},
query: 'jeans',
totalResults: 2
}
}
};

0 comments on commit 197da13

Please sign in to comment.