Braks
d87388fbe6
fix: connection line position incorrectly calculated
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-23 13:00:29 +01:00
Braks
0dd5ed7836
fix(types): edge text type
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-22 21:38:31 +01:00
Braks
c7dca2cbd0
refactor: change prop types for NodeWrapper
...
* don't split node prop into smaller ones
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-22 17:33:12 +01:00
Braks
f86033c1e8
refactor: change prop types for EdgeWrapper
...
* don't split edge prop into smaller ones
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-22 17:25:25 +01:00
Braks
b9bb3cfb1a
update(types): remove null types and use undefined
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-22 17:14:57 +01:00
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
4932c64d52
update: define emittable events for EdgeWrapper
...
* add onEdgeUpdateEnd callback to useHandle
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-22 15:13:46 +01:00
Braks
1ea6e4f8da
update: pass selected elements as prop to nodesselection
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-22 14:22:35 +01:00
Braks
5c3a1fba13
update: remove useStore from handle
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-22 14:22:11 +01:00
Braks
049b701580
update: use controlledComputed for edges/nodes
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-22 14:10:49 +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
ba24f3ca62
update(edges): useAttrs on edges to use style
...
* remove class and style props, pass them as attrs
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-21 13:33:59 +01:00
Braks
e4ead738c9
update(types): Correct __vf typing
...
* fix all uses of __vf so the actual type works properly
* correct the class and style props
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-21 13:33:12 +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
668fed1dc4
feat: Add dedicated default loading component
...
* add option to pass a transition name
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-20 18:22:30 +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
6a68292f7c
feat: merge store with props
...
* if options are passed to useVueFlow, we want to merge them with possibly passed props
* renamed flowStore to stateStore
* fix examples
* add store prop to pass an already existing store to flow
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-19 23:45:39 +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
6bcd708234
fix: default value for label
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-18 15:33:36 +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
1deb41766b
chore(deps): update revue-draggable to v0.3.4
...
* fix import path of utils in NodesSelection.vue
* remove scale (bug)
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-17 16:07:56 +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
23ad66dd75
update: hide edges with v-show instead of v-if
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-17 00:46:43 +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
e1e656ccf2
update: export default nodes and edges
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-16 19:04:35 +01:00
Braks
413c7ac688
update(types!): Merge EdgeProps into Edge type
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-16 17:45:01 +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
d1dab4cda8
feat: Extend options to pass custom nodes / edges
...
* Accept either a Record<string, Component | boolean> or string[] as nodetypes option
* If bool / string is used a slot will be expected, otherwise no node/edge will be rendered
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-16 09:43:17 +01:00
Braks
dec2774145
update(edge): hide edge if source/target pos are NaN-ish
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-15 14:31:54 +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
9c3eeef5eb
fix: warnings when NaN values are passed to svg transformations
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-15 12:44:09 +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