Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Quiz and Multipage survey examples to Vue3 #13

Merged
merged 13 commits into from
Aug 22, 2023
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions get-started-library/jquery/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,7 @@
<meta charset="utf-8">
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>

<!-- Default V2 theme -->
<link href="https://unpkg.com/survey-jquery/defaultV2.min.css" type="text/css" rel="stylesheet">

<!-- Modern theme -->
<!-- <link href="https://unpkg.com/survey-jquery/modern.min.css" type="text/css" rel="stylesheet"> -->

<script type="text/javascript" src="https://unpkg.com/survey-jquery/survey.jquery.min.js"></script>
<script type="text/javascript" src="index.js"></script>
Expand Down
4 changes: 0 additions & 4 deletions get-started-library/knockout/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,8 @@
<meta charset="utf-8">
<script type="text/javascript" src="https://unpkg.com/knockout/build/output/knockout-latest.js"></script>

<!-- Default V2 theme -->
<link href="https://unpkg.com/survey-jquery/defaultV2.min.css" type="text/css" rel="stylesheet">

<!-- Modern theme -->
<!-- <link href="https://unpkg.com/survey-jquery/modern.min.css" type="text/css" rel="stylesheet"> -->

<script type="text/javascript" src="https://unpkg.com/survey-core/survey.core.min.js"></script>
<script type="text/javascript" src="https://unpkg.com/survey-knockout-ui/survey-knockout-ui.min.js"></script>
<script type="text/javascript" src="index.js"></script>
Expand Down
3 changes: 0 additions & 3 deletions get-started-library/react/src/App.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import { useCallback } from 'react';

// Default V2 theme
import 'survey-core/defaultV2.min.css';
// Modern theme
// import 'survey-core/modern.min.css';
import { Model } from 'survey-core';
import { Survey } from 'survey-react-ui';

Expand Down
10 changes: 9 additions & 1 deletion get-started-library/vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,13 @@
"> 1%",
"last 2 versions",
"not dead"
]
],
"cssnano": {
"preset": [
"default",
{
"calc": false
}
]
}
}
5 changes: 1 addition & 4 deletions get-started-library/vue/src/components/MyFirstSurvey.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@
</template>

<script>
// Default V2 theme
import 'survey-core/defaultV2.min.css';
// Modern theme
// import 'survey-core/modern.min.css';
import 'survey-core/defaultV2.css';
import { Model } from 'survey-core';
import { Survey } from 'survey-vue-ui';

Expand Down
2 changes: 1 addition & 1 deletion get-started-library/vue3/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"type-check": "vue-tsc --noEmit -p tsconfig.app.json --composite false"
},
"dependencies": {
"survey-vue3-ui": "^1.9.102",
"survey-vue3-ui": "latest",
"vue": "^3.3.4"
},
"devDependencies": {
Expand Down
5 changes: 1 addition & 4 deletions legacy-angular/form-library/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,7 @@ Open the `angular.json` file and reference a style sheet that implements the req
// ...
"styles": [
"src/styles.css",
// Default V2 theme
"node_modules/survey-angular/defaultV2.min.css",
// Modern theme
// "node_modules/survey-angular/modern.min.css"
"node_modules/survey-angular/defaultV2.min.css"
],
// ...
}
Expand Down
2 changes: 1 addition & 1 deletion multi-page-survey/vue/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Create a Multi-Page Survey (SurveyJS for Vue)
# Create a Multi-Page Survey (SurveyJS for Vue 2)

This example is used in the following help topic: [Create a Multi-Page Survey](https://surveyjs.io/Documentation/Library?id=design-survey-create-a-multi-page-survey).

Expand Down
28 changes: 28 additions & 0 deletions multi-page-survey/vue3/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
.DS_Store
dist
dist-ssr
coverage
*.local

/cypress/videos/
/cypress/screenshots/

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
15 changes: 15 additions & 0 deletions multi-page-survey/vue3/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Create a Multi-Page Survey - Vue 3

This example is used in the following help topic: [Create a Multi-Page Survey](https://surveyjs.io/form-library/documentation/design-survey/create-a-multi-page-survey).

## Project setup

```
npm install
```

## Compile and hot-reload for development

```
npm run dev
```
1 change: 1 addition & 0 deletions multi-page-survey/vue3/env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/// <reference types="vite/client" />
13 changes: 13 additions & 0 deletions multi-page-survey/vue3/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="icon" href="/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>SurveyJS for Vue - Multi-Page Survey</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>
Loading
Loading