Braks
600e3866c4
fix: replace store id with flow id
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-20 19:29:52 +01:00
Braks
f8a23c59ec
refactor(flow)!: Use watcher to change every prop as a single item
...
* instead of replacing the whole state on each watch trigger, split into multiple watchers that set a single state
* improve reacitivty and two-way binding for v-models
* remove elements option -> only modelValue (old api) or nodes/edges
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-20 19:29:52 +01:00
Braks
cc7cedfda0
chore(deps-dev): Update vite-plugin-vue-type-imports to ^0.1.3
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-20 19:29:52 +01:00
Braks
91009e1dca
feat(store): add store as refs to useVueFlow
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-20 19:29:52 +01:00
Braks
be725c6d2d
feat(flow): use vModel for elements, nodes and edges
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-20 19:29:52 +01:00
Braks
758f4f23ff
refactor(store): Rename isReady to paneReady
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-20 19:29:52 +01:00
Braks
9f957492fe
refactor(flow): apply default change handlers by default
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-20 19:29:52 +01:00
Braks
ca33de0556
fix(edges): add props to smoothstep edge explicitly
...
* plugin doesn't allow for nested/extended types currently
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-20 19:29:52 +01:00
Braks
fe4798ea5b
refactor(components): Use plugin to import prop types
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-20 19:29:52 +01:00
Braks
d9e0675385
refactor(nodes, edges): Add slots to node/edge labels
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-20 19:29:52 +01:00
Braks
518d12d381
feat(flow): add utilities to useState functions
2021-12-20 19:29:52 +01:00
Braks
65b2e0d148
feat(flow): Add setNodes and OnNodesChange / setEdges OnEdgesChange utils to useNode/Edge-state
...
* add option to apply default change handler
2021-12-20 19:29:52 +01:00
Braks
17a1b08ee0
refactor(store)!: replace store injection with VueFlow injection
2021-12-20 19:29:52 +01:00
Braks
c80ab8fe50
feat(store, flow)!: Add useNode/useEdge-state helpers
...
* for two way binding use the helpers
2021-12-20 19:29:52 +01:00
Braks
81c8145f3a
feat(store, flow)!: Add apply changes handlers
...
* flow will not update changes unless a handler to apply changes is passed
* a default handler is available in the useVueFlow composable
* removeElements export removed
2021-12-20 19:29:52 +01:00
Braks
f6007d026c
fix(tests): replace useStore with useVueFlow
2021-12-20 19:29:52 +01:00
Braks
c1da504fa9
refactor(store): move hooks to store dir
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-20 19:29:52 +01:00
Braks
d875cfede3
feat(flow): Add event listener to vueflow object
...
* event listener also exist in store state (hooksOn)
* add applyChangesHandlers to vueflow object, can be used to apply changes i.e. deleting etc.
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-20 19:29:52 +01:00
Braks
a604dd8ab1
refactor: replace useStore with useVueFlow
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-20 19:29:52 +01:00
Braks
46a76b783e
feat(types): add handlebounds type
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-20 19:29:52 +01:00
Braks
02911b4177
refactor(store): when adding elements as selected disable emit
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-20 19:29:52 +01:00
Braks
ca2eca4265
refactor(store): add getters for selected nodes/edges
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-20 19:29:52 +01:00
Braks
a80d475216
refactor(store): remove useStore.ts and move logic to store.ts
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-20 19:29:52 +01:00
Braks
97f4c0e847
fix(test): correct test for testing custom node/edge types
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-20 19:29:52 +01:00
Braks
6dcf5d8434
fix(nodes): improper style encapsulation
...
* import path in hooks.ts
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-20 19:29:52 +01:00
Braks
a983858acf
update(examples): use computedPosition in GroupNode.vue
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-20 19:29:52 +01:00
Braks
d2961dec9f
fix(tests): correct tests
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-20 19:29:52 +01:00
Braks
60fcbc2d06
refactor(nodes): use watcher to calc xyzpos
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-20 19:29:52 +01:00
Braks
774cb2e644
feat(flow)!: Remove node/edge-types prop
...
* infer node/edge types from types used in elements
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-20 19:29:52 +01:00
Braks
aaf216a31e
update!: Remove LoadingIndicator.vue
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-20 19:29:52 +01:00
Braks
97c025478d
update(node): defer update pos to nexttick
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-20 19:29:52 +01:00
Braks
cd41090575
update(flow): Add slot for zoom-pane
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-20 19:29:52 +01:00
Braks
55b843482b
update(zoom): Add new zoom pan helper functions to instance
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-20 19:29:52 +01:00
Braks
4065354c10
refactor(store): add selectednodesbbox back to state
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-20 19:29:52 +01:00
Braks
b365e947e1
refactor(flow): use computedPosition when checking inner bounds
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-20 19:29:52 +01:00
Braks
7cb6192591
feat(zoom): Add new zoom pan helper functions + transition for all helpers
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-20 19:29:52 +01:00
Braks
d1809a58ee
update(workflow): use node 14
...
* add max space size
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-20 19:29:52 +01:00
Braks
db726d14a8
fix(nodes): duplicate prop binding
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-20 19:29:52 +01:00
Braks
0eb162f622
fix(types): marker types & flowstate id removed from state
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-20 19:29:52 +01:00
Braks
9dea4bcd61
fix: move replace & copy plugin
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-20 19:29:52 +01:00
Braks
9abd768bce
fix(edges): connection line not showing up when no edges are defined
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-20 19:29:52 +01:00
Braks
d730869443
update(examples): adapt examples
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-20 19:29:52 +01:00
Braks
44f8eb1fe7
fix(test): correct usage of store in testing
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-20 19:29:52 +01:00
Braks
a7bacb754a
refactor(edges)!: use markerEnd and markerStart
...
* remove markerEndId
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-20 19:29:52 +01:00
Braks
d54c981aad
update(components): add container class to background
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-20 19:29:52 +01:00
Braks
c9ff178d38
update(edges): clean up edgewrapper props
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-20 19:29:52 +01:00
Braks
eead00a255
feat(nodes): calculate xyz pos if nested
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-20 19:29:52 +01:00
Braks
7a8aed4ec4
refactor(selection)!: Move user selection rect drawing into component
...
* remove corresponding store state
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-20 19:29:52 +01:00
Braks
3dae06c936
feat(edges): group edges by z-index level
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-20 19:29:52 +01:00
Braks
2b34b124b0
update(edges): implement new marker props
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-20 19:29:52 +01:00