Skip to content

Commit d31459a

Browse files
committed
Update for yFiles for HTML 3.0
1 parent 536c276 commit d31459a

File tree

9 files changed

+32
-39
lines changed

9 files changed

+32
-39
lines changed

.eslintrc.cjs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,8 @@ require('@rushstack/eslint-patch/modern-module-resolution')
33

44
module.exports = {
55
root: true,
6-
'extends': [
7-
'plugin:vue/vue3-essential',
8-
'eslint:recommended',
9-
'@vue/eslint-config-typescript'
10-
],
6+
extends: ['plugin:vue/vue3-essential', 'eslint:recommended', '@vue/eslint-config-typescript'],
117
parserOptions: {
12-
ecmaVersion: 'latest'
13-
}
8+
ecmaVersion: 'latest',
9+
},
1410
}

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ This sample application serves as a basic scaffold of how to integrate [yFiles f
99
## Version Information
1010

1111
- create-vue v3.3
12-
- yFiles for HTML 2.6
12+
- yFiles for HTML 3.0
1313

1414
## Getting Started
1515

@@ -19,7 +19,7 @@ Just clone this repository with
1919
git clone https://github.com/yWorks/yfiles-vue-integration-basic
2020
```
2121

22-
Then, extract a yFiles Evaluation package beside it and run
22+
Then, extract a yFiles Evaluation package besides it and run
2323

2424
```
2525
npm install

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en">
33
<head>
44
<meta charset="utf-8" />

integration-howto.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Adding yFiles as a dependency is almost as easy as installing an external librar
3030
```
3131
"dependencies": {
3232
...
33-
"yfiles": "../yFiles-for-HTML-Complete-2.6.0.4-Evaluation/lib-dev/yfiles-26.0.4+eval-dev.tgz"
33+
"@yfiles/yfiles": "../yFiles-for-HTML-Complete-3.0-Evaluation/lib-dev/yfiles-30.0.0+eval-dev.tgz"
3434
},
3535
```
3636

package.json

Lines changed: 14 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,27 @@
11
{
2-
"name": "yfiles-vue-integration-basic",
3-
"version": "26.0.4",
2+
"name": "@yfiles/yfiles-vue-integration-basic",
3+
"version": "30.0.0",
44
"author": "yWorks GmbH <[email protected]>",
55
"private": true,
66
"scripts": {
77
"dev": "vite",
8-
"build": "run-p type-check build-only",
98
"preview": "vite preview",
10-
"build-only": "vite build",
11-
"type-check": "vue-tsc --noEmit -p tsconfig.app.json --composite false",
12-
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
9+
"build": "vite build",
1310
"postinstall": "npm run copy-eval-license",
14-
"copy-eval-license": "node -e \"require('fs').copyFileSync('../yFiles-for-HTML-Complete-2.6.0.4-Evaluation/lib/license.json','./src/license.json')\""
11+
"copy-eval-license": "node -e \"require('fs').copyFileSync('../yFiles-for-HTML-Complete-3.0-Evaluation/lib/license.json','./src/license.json')\""
1512
},
1613
"dependencies": {
17-
"vue": "^3.3.8",
18-
"yfiles": "../yFiles-for-HTML-Complete-2.6.0.4-Evaluation/lib-dev/yfiles-26.0.4+eval-dev.tgz"
14+
"vue": "^3.5.13",
15+
"@yfiles/yfiles": "../yFiles-for-HTML-Complete-3.0-Evaluation/lib-dev/yfiles-30.0.0+eval-dev.tgz"
1916
},
2017
"devDependencies": {
21-
"@rushstack/eslint-patch": "^1.2.0",
22-
"@tsconfig/node18": "^18.2.2",
23-
"@types/node": "^20.9.4",
24-
"@vitejs/plugin-vue": "^4.5.0",
25-
"@vue/eslint-config-typescript": "^12.0.0",
26-
"@vue/tsconfig": "^0.4.0",
27-
"eslint": "^8.54.0",
28-
"eslint-plugin-vue": "^9.18.1",
29-
"npm-run-all": "^4.1.5",
30-
"typescript": "~5.3.2",
31-
"vite": "^5.0.4",
32-
"vue-tsc": "^1.8.22"
18+
"@vitejs/plugin-vue": "^5.2.1",
19+
"@vue/eslint-config-prettier": "^10.2.0",
20+
"@vue/tsconfig": "^0.7.0",
21+
"eslint": "^9.20.0",
22+
"eslint-plugin-vue": "^9.32.0",
23+
"typescript": "~5.7.3",
24+
"vite": "^6.1.0",
25+
"vue-tsc": "^2.2.0"
3326
}
3427
}

src/App.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,12 @@ import GraphComponent from './components/GraphComponent.vue'
2323
flex-direction: column;
2424
align-items: center;
2525
}
26+
2627
.header {
2728
width: 100%;
2829
text-align: center;
2930
}
31+
3032
.header img {
3133
height: 100px;
3234
}

src/components/GraphComponent.vue

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script setup lang="ts">
22
import { onMounted, onUnmounted, ref } from 'vue'
3-
import { GraphComponent, GraphEditorInputMode, IGraph, License, Point, Rect } from 'yfiles'
3+
import { GraphComponent, GraphEditorInputMode, IGraph, License, Point, Rect } from '@yfiles/yfiles'
44
import licenseData from '../license.json'
55
66
License.value = licenseData
@@ -11,12 +11,14 @@ const graphComponent = initializeGraphComponent()
1111
graphComponent.inputMode = new GraphEditorInputMode()
1212
1313
onMounted(() => {
14-
;(gcContainer.value as unknown as HTMLDivElement).appendChild(graphComponent.div)
14+
;(gcContainer.value as unknown as HTMLDivElement).appendChild(graphComponent.htmlElement)
1515
graphComponent.fitGraphBounds()
1616
})
1717
1818
onUnmounted(() => {
19-
;(graphComponent.div.parentElement as HTMLDivElement).removeChild(graphComponent.div)
19+
;(graphComponent.htmlElement.parentElement as HTMLDivElement).removeChild(
20+
graphComponent.htmlElement,
21+
)
2022
})
2123
2224
function initializeGraphComponent(): GraphComponent {

tsconfig.node.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"extends": "@tsconfig/node18/tsconfig.json",
2+
"extends": "@vue/tsconfig/tsconfig.dom.json",
33
"include": [
44
"vite.config.*",
55
"vitest.config.*",

vite.config.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export default defineConfig({
88
plugins: [vue()],
99
resolve: {
1010
alias: {
11-
'@': fileURLToPath(new URL('./src', import.meta.url)),
12-
},
13-
},
11+
'@': fileURLToPath(new URL('./src', import.meta.url))
12+
}
13+
}
1414
})

0 commit comments

Comments
 (0)