Skip to content

Commit

Permalink
Use local registration in Vue 3 demos (#22)
Browse files Browse the repository at this point in the history
* Use local registration in Vue 3 demos

* Commit package-lock.json's

* Commit package-lock.json

* Increase budgets
  • Loading branch information
RomanTsukanov authored Sep 19, 2024
1 parent df1cc27 commit 422d915
Show file tree
Hide file tree
Showing 19 changed files with 123 additions and 82 deletions.
4 changes: 2 additions & 2 deletions get-started-analytics/angular/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
"budgets": [
{
"type": "initial",
"maximumWarning": "5.5mb",
"maximumError": "5.5mb"
"maximumWarning": "6.5mb",
"maximumError": "6.5mb"
},
{
"type": "anyComponentStyle",
Expand Down
25 changes: 12 additions & 13 deletions get-started-analytics/angular/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

48 changes: 41 additions & 7 deletions get-started-creator/vue3/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions get-started-creator/vue3/src/components/SurveyCreator.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import "survey-creator-core/survey-creator-core.min.css";
import type { ICreatorOptions } from "survey-creator-core";
import { SurveyCreatorModel } from "survey-creator-core";
import { SurveyCreatorComponent } from 'survey-creator-vue';
const creatorOptions: ICreatorOptions = {
showLogicTab: true,
Expand Down
7 changes: 1 addition & 6 deletions get-started-creator/vue3/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,5 @@ import './assets/main.css'

import { createApp } from "vue";
import App from "./App.vue";
import { surveyPlugin } from "survey-vue3-ui";
import { surveyCreatorPlugin } from "survey-creator-vue";

createApp(App)
.use(surveyPlugin)
.use(surveyCreatorPlugin)
.mount("#app");
createApp(App).mount("#app");
16 changes: 11 additions & 5 deletions get-started-library/vue3/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions get-started-library/vue3/src/components/MyFirstSurvey.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<script setup lang="ts">
import 'survey-core/defaultV2.min.css';
import { Model } from 'survey-core';
import { SurveyComponent } from "survey-vue3-ui";
// const SURVEY_ID = 1;
Expand Down
3 changes: 1 addition & 2 deletions get-started-library/vue3/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { createApp } from 'vue'
import { surveyPlugin } from 'survey-vue3-ui'
import App from './App.vue'

createApp(App).use(surveyPlugin).mount('#app')
createApp(App).mount('#app')
2 changes: 1 addition & 1 deletion icons/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Object.keys(Survey.SvgRegistry.icons).map(name => {
const element = document.createElement("div");
element.classList.add("container")
element.innerHTML = `
<svg class="sd-detail-panel__icon">
<svg>
<use xlink:href="#icon-` + name + `\"></use>
</svg>
<span class="icon-name">icon-` + name + `</span>`;
Expand Down
36 changes: 18 additions & 18 deletions integrate-third-party-vue-components/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<script lang="ts">
import { Sketch, Compact, Slider } from "@lk77/vue3-color";
import { ElementFactory, Question, Serializer, SvgRegistry } from "survey-core";
import { PropertyGridEditorCollection, localization } from "survey-creator-core";
Expand Down Expand Up @@ -99,19 +100,19 @@ function updateValue(val: any) {
</script>

<template>
<slider-picker
<Slider
v-if="props.question.isSlider"
:modelValue="props.question.value"
@update:modelValue="updateValue"
></slider-picker>
<sketch-picker
/>
<Sketch
v-if="props.question.isSketch"
:modelValue="props.question.value"
@update:modelValue="updateValue"
></sketch-picker>
<compact-picker
/>
<Compact
v-if="props.question.isColorCompact"
:modelValue="props.question.value"
@update:modelValue="updateValue"
></compact-picker>
/>
</template>
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { Serializer } from "survey-core";
import { SurveyCreatorModel } from "survey-creator-core";
import type { SurveyModel } from "survey-core";
import type { CreatorBase } from "survey-creator-core";
import { SurveyCreatorComponent } from "survey-creator-vue";
Serializer.addProperty("survey", {
name: "backgroundColor",
Expand Down
8 changes: 0 additions & 8 deletions integrate-third-party-vue-components/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,8 @@ import './assets/main.css'

import { createApp } from "vue";
import App from "./App.vue";
import { surveyPlugin } from "survey-vue3-ui";
import { surveyCreatorPlugin } from "survey-creator-vue";
import ColorPickerComponent from "./components/ColorPicker.vue";
import { Sketch, Compact, Slider } from "@lk77/vue3-color";

createApp(App)
.use(surveyPlugin)
.use(surveyCreatorPlugin)
.component("survey-color-picker", ColorPickerComponent)
.component("slider-picker", Slider)
.component("sketch-picker", Sketch)
.component("compact-picker", Compact)
.mount("#app");
16 changes: 11 additions & 5 deletions multi-page-survey/vue3/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions multi-page-survey/vue3/src/components/MultiPageSurvey.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<script setup lang="ts">
import 'survey-core/defaultV2.min.css';
import { Model } from 'survey-core';
import { SurveyComponent } from "survey-vue3-ui";
import { ref } from 'vue';
const surveyJson = {
Expand Down
3 changes: 1 addition & 2 deletions multi-page-survey/vue3/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { createApp } from 'vue'
import { surveyPlugin } from 'survey-vue3-ui'
import App from './App.vue'

createApp(App).use(surveyPlugin).mount('#app')
createApp(App).mount('#app')
Loading

0 comments on commit 422d915

Please sign in to comment.