From f44784b1d01fbd82f834ae671bceb80e58e614f7 Mon Sep 17 00:00:00 2001
From: bcakmakoglu <78412429+bcakmakoglu@users.noreply.github.com>
Date: Tue, 8 Feb 2022 00:13:40 +0100
Subject: [PATCH] chore: fix examples
Signed-off-by: bcakmakoglu <78412429+bcakmakoglu@users.noreply.github.com>
---
examples/Basic/Basic.vue | 10 +-
.../CustomConnectionLine/ConnectionLine.vue | 4 +-
examples/CustomNode/CustomNode.vue | 2 -
examples/DragNDrop/DnD.vue | 5 +-
examples/EdgeTypes/EdgeTypesExample.vue | 2 +-
examples/Edges/CustomEdge.vue | 2 +-
examples/Edges/EdgesExample.vue | 4 +-
examples/Empty/EmptyExample.vue | 9 +-
examples/Hidden/HiddenExample.vue | 8 +-
examples/Interaction/InteractionExample.vue | 6 +-
examples/Nesting/Nesting.vue | 6 +-
examples/Overview/Overview.vue | 6 -
examples/RGBFlow/RGBFlow.vue | 2 +-
examples/SaveRestore/Controls.vue | 11 +-
examples/Switch/SwitchExample.vue | 2 +-
examples/Validation/ValidationExample.vue | 5 +-
package.json | 13 +-
src/assets/vue-flow.gif | Bin
src/auto-imports.d.ts | 20 +
src/composables/useVueFlow.ts | 6 +-
src/container/VueFlow/VueFlow.vue | 10 +-
src/container/VueFlow/watch.ts | 6 +-
src/store/actions.ts | 6 +-
src/types/store.ts | 6 +-
src/utils/graph.ts | 6 +-
tsconfig.json | 2 +-
vite.config.ts | 3 +-
yarn.lock | 495 +++++++++++-------
28 files changed, 382 insertions(+), 275 deletions(-)
mode change 100644 => 100755 src/assets/vue-flow.gif
diff --git a/examples/Basic/Basic.vue b/examples/Basic/Basic.vue
index 9308d057..7f392d64 100644
--- a/examples/Basic/Basic.vue
+++ b/examples/Basic/Basic.vue
@@ -1,7 +1,7 @@
diff --git a/examples/CustomConnectionLine/ConnectionLine.vue b/examples/CustomConnectionLine/ConnectionLine.vue
index 7efe2978..cb25182e 100644
--- a/examples/CustomConnectionLine/ConnectionLine.vue
+++ b/examples/CustomConnectionLine/ConnectionLine.vue
@@ -1,7 +1,5 @@
diff --git a/examples/Interaction/InteractionExample.vue b/examples/Interaction/InteractionExample.vue
index 38b7a9bb..652fda60 100644
--- a/examples/Interaction/InteractionExample.vue
+++ b/examples/Interaction/InteractionExample.vue
@@ -1,5 +1,5 @@
): UseVueFlow => {
const currentInstance: any = getCurrentInstance()
- let vueFlow: UseVueFlow | false | undefined = currentInstance
- ? inject(VueFlow, undefined) ?? (currentInstance.vueFlow as UseVueFlow)
- : false
+ let vueFlow = currentInstance ? inject(VueFlow) ?? (currentInstance.vueFlow as UseVueFlow) : false
if (!vueFlow || (vueFlow && options?.id && options.id !== vueFlow.id)) {
const name = options?.id ?? `vue-flow-${id++}`
const store = useStore(options)
@@ -26,5 +24,5 @@ export default (options?: Partial): UseVueFlow => {
currentInstance.vueFlow = vueFlow
}
- return vueFlow
+ return vueFlow as UseVueFlow
}
diff --git a/src/container/VueFlow/VueFlow.vue b/src/container/VueFlow/VueFlow.vue
index 24a282fb..e6472545 100644
--- a/src/container/VueFlow/VueFlow.vue
+++ b/src/container/VueFlow/VueFlow.vue
@@ -1,7 +1,7 @@