Braks
fec38a129a
fix!: prop typings
...
* remove wrapper exports from library
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-22 15:49:27 +01:00
Braks
2b065b4e56
update: pass store state as props to edge-renderer and edge
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-22 13:40:25 +01:00
Braks
6059b02e44
update: Pass down values as props instead of relying on store
...
* store values are passed down by main vue flow component
* store is only used to emit events or if really necessary in the component
* add keys with store id to elements
*
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-22 12:25:32 +01:00
Braks
c35673c622
refactor: pass props to edge/nodewrapper separately
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-22 01:22:27 +01:00
Braks
a55e33f91f
feat: add draghandle prop to node
...
* specify a drag handle on the node
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-21 21:50:49 +01:00
Braks
c48a0a9e2a
fix: add missing click and doubleclick events to nodes/edges
...
* ssr bug
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-21 18:19:06 +01:00
Braks
fd71e1e16e
update: Add names to components
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-21 16:54:59 +01:00
Braks
062aee45b2
update!: graphnode and node typing
...
* graphnode is a node containing internal Vue Flow data
* move util files to util directory
* move flow actions type into store file
* rename panel type file to zoom
* rename types file to flow
* Rename Node to NodeWrapper
* Rename Edge to EdgeWrapper
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-21 16:25:27 +01:00
Braks
0e9f8c5fc2
refactor: rename internal data field to __vf
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-21 12:54:04 +01:00
Braks
da29a613f0
feat(slots): Add node and edge renderer slots
...
* more flexibility by having the ability to use the node/edge-renderer and wrapper
* export renderer and wrapper from lib entry
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-21 12:34:28 +01:00
Braks
39b21faa5b
refactor(types)!: Remove elements prop, change EdgeTypes/NodeTypes prop to string[]
...
* no more elements prop - v-model instead!
* Instead of passing an object map to components just pass in an array of strings as nodeTypes/edgeTypes object
* the string name will either be resolved to a dynamic component with :is="type" or a slot with the type-name
* update all examples
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-20 22:10:25 +01:00
Braks
1b6ea1e1b5
update: make types for nodes and edges a computed prop
...
* remove nodeTypesId (was used in react to manually trigger a nodeTypes change)
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-20 03:28:46 +01:00
Braks
d25fa579e4
fix: suspension not working properly
...
* move invoke to vueflow to suspend
* await dimensions in Node/Edge-wrapper components
* await nodes/edges in renderer
* await elements in VueFlow
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-20 02:00:37 +01:00
Braks
37388ddf47
feat(types): Add NodeTypes and EdgeTypes
...
* Interface for passing an object of NodeTypes/EdgeTypes
* Object needs to be passed with components markedRaw
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-19 17:47:57 +01:00
Braks
f92c5462bf
update: a couple more perfomance related updates
...
* check for selected value inside Node instead of the wrapping renderer
* instead of "parsing" elements just return the current store.elements object
* use map funct to find index
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-19 15:41:00 +01:00
Braks
470ab3782a
update: remove useHooks usage
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-18 23:17:09 +01:00
Braks
99dbd4b2cc
feat!: Add hooks to store
...
* For easier access and to avoid context issues with injections hooks are put into the store
* hooks can be accessed and will emit events when the flow has bound its emit function to the hooks
* useHooks and useStore are not exported anymore! Instead, useVueFlow is provided, which will return an instance of the current vue flow store
* Rename NodeIdContextKey to NodeId
* Add addElements function to store to add elements without having to re-set the whole store
* use v-model for elements, re-set elements only if there's an actual change
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-18 21:24:20 +01:00
Braks
14980e38b7
feat: Add suspensions to node, noderenderer and around zoom-pane
...
* bind zoompanhelper functions to zoom-pane slot
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-18 14:08:46 +01:00
Braks
0be492b7c6
feat: bind props to slots
...
* bind props to slots in edges, handle, nodes
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-18 13:40:06 +01:00
Braks
8b82c4fb33
feat: Add slots to edges and nodes
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-18 03:19:13 +01:00
Braks
10215b4631
update: create vue.d.ts files
...
* add vue-tsc to emit d.ts files from vue components
* use absolute paths in components
* avoids conflicts with ts custom paths in vue-tsc generated vue.d.ts files
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-17 01:39:50 +01:00
Braks
677c9a8b5e
fix: properly check if node is connectable/draggable/connectable
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-17 00:45:43 +01:00
Braks
694dc7e691
fix: node dimensions not updating properly
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-16 23:20:06 +01:00
Braks
808c6b17e0
fix: remove force-update from node
...
* update dimensions directly, not on next tick
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-16 20:00:09 +01:00
Braks
a58d952e9f
fix: disable inherting attrs on nodes/edges to avoid warnings
...
* disable context warnings for non-dev environments
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-16 16:01:44 +01:00
Braks
d6ee5f8868
fix: wrong watch source in nodes
...
* causes console warnings
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-15 12:50:03 +01:00
Braks
3705a39fa8
refactor: perfomance optimisations through less dependency tracking
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-15 11:22:56 +01:00
Braks
ea7db92b6e
fix: draggable not updating on nodes
...
* remove alias for dagre
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-06 09:43:31 +01:00
Braks
aaf5f608f5
feat: add path alias for src
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-06 09:38:02 +01:00
Braks
e99dfc3dd2
update(docs): Add all examples
2021-11-06 08:54:35 +01:00
Braks
61779638ac
update(dist): Remove rollup and use vite to build lib
...
* Remove custom tsconfig paths to avoid resolving issues on published package
2021-11-06 08:54:35 +01:00
Braks
64df75d405
feat(docs): Initial commit for docs in nuxt 3
2021-11-06 08:54:35 +01:00
Braks
6ec8258f33
fix: typings
2021-10-22 14:29:27 +02:00
Braks
cb96b1ab00
fix: missing node id in node components/slots
2021-10-22 13:04:33 +02:00
Braks
26b3901bd5
fix: node not updating handlebounds when handle pos changes
...
* watch source & target pos and update node dimensions on next tick
2021-10-22 08:16:32 +02:00
Braks
cd02dd0444
fix: node type change not triggering recalculation of node dimensions
2021-10-21 16:23:23 +02:00
Braks
636eeff9fe
feat: use v-html for node labels
...
* add span tag as wrapper for node labels
feat(examples):
* Add overview example
2021-10-21 15:29:17 +02:00
Braks
5f500bca18
fix: store actions blocking main thread
...
* map function overwriting nodes causes main thread to be blocked
* instead use splice
2021-10-20 23:46:47 +02:00
Braks
2bfecf7148
update: change name to vue flow
...
* Add gif to readme
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-10-20 22:39:54 +02:00
Braks
64a4b8c418
fix: nodes as fragments
...
feat: accept vnode as edge text
2021-10-20 22:39:54 +02:00
Braks
b2b1fe822f
feat: add useStore and useHooks composables that provide default store/hooks
2021-10-20 22:39:54 +02:00
Braks
9d9a90e9a7
update: Add slots to CustomConnectionLine.vue, Edge.vue, Node.vue
2021-10-20 22:39:54 +02:00
Braks
17f2517ab4
fix: too many re-render on edges and nodes
2021-10-20 22:39:54 +02:00
Braks
c3fb3cd10a
fix: zoom pan helper
2021-10-20 22:39:54 +02:00
Braks
a895853b64
update: Add injection keys
2021-10-20 22:39:54 +02:00
Braks
a5ae6a4e48
update(deps): Add unplugin-components
...
fix: Excessive rerender of edge texts
update(script-setup): Update some examples
* Remove more jsx files
2021-10-20 22:39:54 +02:00
Braks
1ff3a8dc9c
update(script-setup): Refactor additional-components
...
* Remove jsx files
fix: ConnectionLine.vue not recalculating properly
2021-10-20 22:39:54 +02:00
Braks
560bdc203b
update(script-setup): Refactor remaining files to script setup style
2021-10-20 22:39:54 +02:00
Braks
f8728f0d6e
feat: script setup style
...
* Add Node.vue
2021-10-20 22:39:54 +02:00
Braks
77eac0c12a
chore(lint): Update eslint rules
...
* Remove semi
2021-10-20 22:39:54 +02:00