* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* While the graph is suspended we open up a loading indicator slot
* a prop option has to be passed to enable the indicator
* add some styles for a default loading text
* move loading event to after store has been initialized *and* zoom pane dimensions are present
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
* 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>
* 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>
* Add getter for node/edge types
* change nodeTypes prop type to only Record<string, NodeType> - same for edges
* Add rgb example
* remove v-model for elements
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
* 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>
* to enable overwriting the default theme export it separately
* add rollup plugin copy for copying the css file
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>