Braks
368b0de1b6
feat(types)!: extend Element generics to DataNode and DataEdge
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-20 19:29:52 +01:00
Braks
4ef58e9e99
refactor(nodes)!: change xPos yPos props to position
...
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
8cf22797f5
update(types): use MouseTouchEvent type for drag events
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-07 16:20:19 +01:00
Braks
1a3b68373e
update(store, types): overload flowoptions typings with non-nullables in flowstate
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-04 15:42:18 +01:00
Braks
0fcf8bbeaa
update(store): static id for store state
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-04 15:42:18 +01:00
Braks
eab715b13a
update(types): remove Loading type from components.ts
...
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
0816bf0c75
update(examples): remove pinia
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-04 15:42:18 +01:00
Braks
3c9840cc50
update(types): Rename FlowStore to Store and ReactiveFlowStore to FlowStore
...
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
43b68c1699
feat(zoom): Add option to zoom to specific node ids and transitionDuration for smooth transitions on fitView
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-26 15:59:01 +01:00
Braks
4740a2c8fe
update(hooks): add elementsProcessed event hook
...
* triggered after elements have been processed and updated in store
* add missing selection change trigger to store
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-26 13:54:49 +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
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
4408ca1eb7
refactor(graph): async process elements
...
* process elements in chunks of 50 per ms to avoid blocking main thread
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
refactor(flow): deferr initial loading to Renderer.vue component
2021-11-25 19:29:13 +01:00
Braks
bd140f1549
update(flow): remove store, worker props
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-25 15:21:36 +01:00
Braks
f2e38ca7ac
update(nodes): add __vf to node props
...
* move edge/node component-types to components file
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-25 15:21:36 +01:00
Braks
233e915376
update(store): remove promise from setState
...
* add default values for nodeTypes/edgeTypes - empty array for customs
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-25 15:21:36 +01:00
Braks
9e941966a4
feat(nodes): add option to pass a valid target pos / valid source pos func to nodes
...
* edge updater cannot discern a valid connection by itself so we allow an option to pass a valid connection func to nodes which will then be used to determine if updating connection is valid
* it is optional, by default all connections are valid
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-25 15:21:36 +01:00
Braks
9c7c2368a0
update(types): remove promise from addelements
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
update(store): remove promise from setElements
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-25 15:21:36 +01:00
Braks
929a6e637b
update(edges): Add edge as param to edgeupdateend event
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-25 15:21:36 +01:00
Braks
7916b20a99
fix(types): edge-text typing
...
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
Braks
cf2ded4fc8
update: types in SelectionPane.vue
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-25 15:21:36 +01:00
Braks
8b0ddc9be9
refactor(types): Remove SourceTargetNode-type
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-25 15:21:36 +01:00
Braks
708fa1f970
refactor(options)!: remove worker and store option
...
* either unnecessary, broken or needs more work
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-25 15:21:36 +01:00
Braks
725dc8acb7
refactor(store): remove nodes/edges field
...
* nodes/edges are accessed via getter - that retains reactivity on elements
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-25 15:21:36 +01:00
Braks
fa63dee37a
refactor: remove node-pos actions
...
* add getSelectedNodes getter
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-25 15:21:36 +01:00
Braks
84bad861ea
refactor(nodes): remove __vf.position
...
* duplicate position values as __vf.position and position save the same values
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-25 15:21:36 +01:00
Braks
da4fd4f7ce
feat(nodes): Allow nodes to pass all draggable options
...
* omits scale, grid, enableuserselecthack and enabletransformfix as valid options for draggable
* remove event interface and emits from nodewrapper
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-24 00:02:30 +01:00
Braks
71a10b2536
feat(nodes): Allow nodes to have their own snapGrid option
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-23 23:58:11 +01:00
Braks
1eac951055
feat(types): add DefaultEdgeTypes-type
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
feat(types): Add DefaultNodeTypes-type
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
feat(types): Add DefaultNodeTypes and DefaultEdgeTypes to the exports object
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-23 23:58:11 +01:00
Braks
073b25ec60
feat(zoom): Add offset to fitview-params
...
* Allow for offsetting fit view by x or y values
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-23 23:58:11 +01:00
Braks
db70409337
fix(types): hooks to return a graph-node type
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-23 23:20:49 +01:00
Braks
d22e21041d
fix(edges): edges not reacting to hidden nodes
...
* Change getEdges to parse edges with source & target nodes and filter if one of them is missing
* add new type for Edges w sourceTargetNode called GraphEdge which is the return type of getEdges
*
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-23 18:25:08 +01:00
Braks
cddf875b6d
feat(types): Add GraphEdge type
...
* GraphEdges are edges that have been parsed and have a sourceTargetNode property
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-23 17:46:55 +01:00
Braks
091f3f82c2
update(types): export flowprops and custom connection line props type
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-23 17:46:28 +01:00
Braks
67634fd72e
feat(connection): Extend connection line props for more advanced usage
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-23 14:38:49 +01:00
Braks
46ecec5366
feat(options): add preventScrolling option
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-23 14:12:43 +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
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
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
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
b10207021f
refactor(types)!: Change ConnectionLineComponentProps to ConnectionLineProps
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-21 19:05:24 +01:00
Braks
a67e6c4430
fix: minimap prop type missing
...
* cant import stringfunc type (string literal and all...)
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-21 18:19:43 +01:00
Braks
d24de0c0c2
update: move component related types to component-type file
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-21 16:54:24 +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