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
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
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
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
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
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
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
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
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
Braks
503264ae51
update(nodes): remove transform from NodeRenderer
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-20 19:29:52 +01:00
Braks
c8d701d3b4
update(pane): remove slots
...
* remove ref and set store state directly
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-20 19:29:52 +01:00
Braks
2210c59bf8
feat: add transformation pane
...
* instead of using transform on each child node, wrap them in a transformed div
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-20 19:29:52 +01:00
Braks
943479e2c7
refactor(zoom): Remove renderer and move logic to zoom pane
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-20 19:29:52 +01:00
Braks
c96f62f622
refactor(flow)!: properly nest components
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-20 19:29:52 +01:00
Braks
76ae73c2d2
refactor(nodes, edges): remove index from keys
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-20 19:29:52 +01:00
Braks
3e42948cac
chore: remove unused imports
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-20 19:29:52 +01:00
Braks
c82ca4e225
update(zoom): add getElements helper
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-20 19:29:52 +01:00
Braks
b80341467b
refactor(types)!: Remove elements and replace with nodes and edges
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-20 19:29:52 +01:00
Braks
f28e10b05a
refactor(types): Remove internal __vf field
...
* fields are merged into the GraphNode / Node interface
* Remove passing props from VueFlow container, use injected state
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-20 19:29:52 +01:00
Braks
f00f34d84b
refactor(types)!: Remove ElementId type
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-20 19:29:52 +01:00
Braks
da54bc3316
refactor(types)!: Remove Node/TranslateExtent
...
* replace with CoordinateExtent
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-20 19:29:52 +01:00
Braks
74c30376a5
refactor(types): use vite-plugin-import-types
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-20 19:29:52 +01:00
Braks
c5228065b4
refactor(zoom): remove get and invoke imports
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-05 09:03:36 +01:00
Braks
601b65a75f
update: use tryOnMounted
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-04 16:40:07 +01:00
Braks
f8cf71cfb8
refactor(store): rename param of setState
...
* newState -> opts
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-04 15:42:18 +01:00
Braks
491c83dcc8
update(flow): disable loading component if prop not passed
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-04 15:42:18 +01:00
Braks
b1f541b63d
refactore(store)!: Remove transition and loading.transition property
...
* Tranisitions break testing and are superflous
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-04 15:42:18 +01:00
Braks
9abc222c14
update(store): add test mode
...
* add key to loading slot
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-04 15:42:18 +01:00
Braks
bf9ce37b64
update(store): only inject if in current instance
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-04 15:42:18 +01:00
Braks
58a8f9d4df
refactor(store)!: remove pinia
...
* replace pinia with a reactive state object and inject/provide
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
update(store)!: inject store if possible, otherwise create a new one by id
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-04 15:42:18 +01:00
Braks
229bbb7a3c
fix(store): zoom related state to update when flow is ready
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-28 10:01:23 +01:00
Braks
043ba21a94
fix(zoom): translateExtent not set correctly
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-26 15:38:03 +01:00
Braks
512df8e42b
update(store): use setElements for addElements with force set false
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-26 11:26:37 +01:00
Braks
4630f3efc1
refactor(edges): Make edge updating optional
...
* add an option to enable edge updating globally
* pass an option to an edge to enable updating for a single edge
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-26 11:08:12 +01:00
Braks
c3f8809362
fix: import paths in components
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-25 19:29:13 +01:00
Braks
0b2764028f
update(nodes): watch nodes width for dimension update
...
* add force param to setElements, if set we clear the elements arr (default true)
* wait for store watcher until store is ready (i.e. a state has been set)
* move renderer css class to Renderer.vue
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-25 19:29:13 +01:00
Braks
5b00049a65
refactor(flow): deferr initial loading to Renderer.vue component
...
* suspend flow while async processing is going on (fallback to loading component)
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-25 19:29:13 +01:00
Braks
3855e9fe3f
update(flow): remove worker prop
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-25 15:21:36 +01:00
Braks
bb0b9049ea
fix(flow): props not being watched on time
...
* updated example for UpdateNode
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-25 15:21:36 +01:00
Braks
95fc013613
update(flow): set modelValue after initialization of elements
...
* remove extra edge parsing
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-25 15:21:36 +01:00
Braks
96d54c59dc
refactor(store): check if state variables have to be re-set
...
* instead of just pasting over the state constantly check what needs to be re-set
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-25 15:21:36 +01:00
Braks
1ce41ccd40
refactor: move init function to store as setState
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-25 15:21:36 +01:00