-
Notifications
You must be signed in to change notification settings - Fork 808
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement vue component factory (#8690)
* Add serve example commands * Implement SurveyComponent component * Use SurveyVueComponent in in all components * Do not register custom directive in global. Rename VueComponentFactory -> ComponentFactory and SurveyComponent -> SvComponent. * Remove usage surveyPlugin from example * Fix lint warnings * Small refactor * Fix lint command * Register survey component in component factory * Export PopupSurveyComponent * Fix custom components in example * Small refactor component factory * Refactor to avoid breaking change * Use global components if plugin is registered * Refactor * Fix popup survey component
- Loading branch information
Showing
111 changed files
with
1,248 additions
and
687 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
17 changes: 10 additions & 7 deletions
17
packages/survey-vue3-ui/example/src/components/example/Example.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
3 changes: 2 additions & 1 deletion
3
packages/survey-vue3-ui/example/src/components/test/test-custom-components/Item.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 |
---|---|---|
@@ -1,11 +1,12 @@ | ||
<template> | ||
<div class="my-list-item" style="display:flex;" :title="item.hint"> | ||
<span> | ||
<sv-svg-icon :iconName="item.iconName" :size="item.iconSize"></sv-svg-icon> | ||
<SvComponent :is="'sv-svg-icon'" :iconName="item.iconName" :size="item.iconSize"></SvComponent> | ||
</span> | ||
<span :class="item.getActionBarItemTitleCss()">{{ item.title }}</span> | ||
</div> | ||
</template> | ||
<script lang="ts" setup> | ||
import { SvComponent } from 'survey-vue3-ui'; | ||
defineProps<{ item: any }>() | ||
</script> |
5 changes: 3 additions & 2 deletions
5
packages/survey-vue3-ui/example/src/components/test/test-custom-components/ItemContent.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 |
---|---|---|
@@ -1,10 +1,11 @@ | ||
<template> | ||
<div class="sv-ranking-item__text" :style="{display: 'flex', alignItems: 'center', gap: '8px'}"> | ||
<sv-svg-icon iconName="icon-next_16x16" size = "16"></sv-svg-icon> | ||
<survey-string :locString="item.locText" /> | ||
<SvComponent :is="'sv-svg-icon'" iconName="icon-next_16x16" size = "16"/> | ||
<SvComponent :is="'survey-string'" :locString="item.locText" /> | ||
</div> | ||
</template> | ||
<script lang="ts" setup> | ||
import { SvComponent } from 'survey-vue3-ui'; | ||
import type { ItemValue } from 'survey-core'; | ||
defineProps<{ item: ItemValue, cssClasses: any }>() | ||
</script> |
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
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
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
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
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
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
Oops, something went wrong.