Commit Graph
471 Commits
Author SHA1 Message Date
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 0816bf0c75 update(examples): remove pinia
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
2021-12-04 15:42:18 +01:00
Braks 55122ed187 update(store, deps): remove microdiff
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
2021-12-04 15:42:18 +01:00
Braks 55e738f6bf update(test): remove pinia from tests
* update tests to succeed with new "store"

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 70b44dbc03 update: add cjs to build
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 58f5c2568c update(store): try to get active pinia before using new one
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
2021-12-04 15:42:18 +01:00
Braks a66425294c update: exclude cypress dir from build
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
BraksandGitHub 796c60431f feat(test): Add cypress for testing 2021-11-27 16:53:24 +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 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 27e39796a0 fix(nodes): nodeExtent not set on position update
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
2021-11-26 15:33:56 +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 b88f2105fb update(edges): add updatable as prop to edges
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
2021-11-26 11:30:23 +01:00
Braks f0ca05f0c4 v0.2.2 2021-11-26 11:28:35 +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 98b6fdb717 update: watch node height too for updating dimensions
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
2021-11-25 20:38:52 +01:00
Braks 166d83725b v0.2.1 2021-11-25 19:30:40 +01:00
Braks 01f5456407 fix: setState syntax error
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
2021-11-25 19:30:19 +01:00
Braks e73a55af62 update: zoom-pane style
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
2021-11-25 19:29:13 +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 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 50fc0f2fd8 v0.2.0 2021-11-25 15:26:22 +01:00
Braks 6c3bce88a7 update(graph): mutate elements arr on updateEdge
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
2021-11-25 15:21:36 +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 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 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 fd83a6d365 fix(store): parsing overwriting __vf fields or not writing them at all
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
2021-11-25 15:21:36 +01:00
Braks 5ceee98e9b fix(store): check if state option is typeof undefined before setting (not just false-ish)
update: export useWindow
update: remove logs from useHandle
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 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 7b4dde4411 update(store): typing of edges
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 74cc61ad8d feat(utils): make addEdge and removeElement mutate the array passed in
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 5ffeb928ae refactor: move parseElements to graph utils
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 729d3d5ca2 update(examples): remove watchEffect from UpdateNodeExample.vue
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>

update(examples): fix style calculation in CustomNode.vue

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