-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: migrate experience controls (#1530)
- Loading branch information
Showing
8 changed files
with
82 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
packages/_vue3-migration-test/src/x-modules/experience-controls/components/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default as TestExperienceControls } from './test-experience-controls.vue'; |
27 changes: 27 additions & 0 deletions
27
...-migration-test/src/x-modules/experience-controls/components/test-experience-controls.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<template> | ||
<span style="display: block"> | ||
Controls: | ||
<b>{{ controls }}</b> | ||
</span> | ||
<SnippetConfigExtraParams :values="{ catalog: 'empathy' }" /> | ||
<ExperienceControls /> | ||
SemanticQueriesConfigProvided with {{ message }} | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { ref } from 'vue'; | ||
import ExperienceControls from '../../../../../x-components/src/x-modules/experience-controls/components/experience-controls.vue'; | ||
import { useState } from '../../../../../x-components/src/composables/use-state'; | ||
import { useXBus } from '../../../../../x-components/src/composables/use-x-bus'; | ||
import SnippetConfigExtraParams from '../../../../../x-components/src/x-modules/extra-params/components/snippet-config-extra-params.vue'; | ||
import { XEvent } from '../../../../../x-components/src/wiring/events.types'; | ||
const xBus = useXBus(); | ||
const message = ref(''); | ||
xBus | ||
.on('SemanticQueriesConfigProvided' as XEvent, true) | ||
.subscribe(event => (message.value = event.eventPayload as string)); | ||
const { controls } = useState('experienceControls', ['controls']); | ||
</script> |
1 change: 1 addition & 0 deletions
1
packages/_vue3-migration-test/src/x-modules/experience-controls/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './components'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 24 additions & 22 deletions
46
packages/x-components/src/x-modules/experience-controls/components/experience-controls.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters