Commit Graph
22 Commits
Author SHA1 Message Date
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 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 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
Braks e4ead738c9 update(types): Correct __vf typing
* fix all uses of __vf so the actual type works properly
* correct the class and style props

Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
2021-11-21 13:33:12 +01:00
Braks 0e9f8c5fc2 refactor: rename internal data field to __vf
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
2021-11-21 12:54:04 +01:00
Braks 39b21faa5b refactor(types)!: Remove elements prop, change EdgeTypes/NodeTypes prop to string[]
* 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>
2021-11-20 22:10:25 +01:00
Braks 37388ddf47 feat(types): Add NodeTypes and EdgeTypes
* Interface for passing an object of NodeTypes/EdgeTypes
* Object needs to be passed with components markedRaw

Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
2021-11-19 17:47:57 +01:00
Braks d1dab4cda8 feat: Extend options to pass custom nodes / edges
* 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>
2021-11-16 09:43:17 +01:00
Braks 61779638ac update(dist): Remove rollup and use vite to build lib
* Remove custom tsconfig paths to avoid resolving issues on published package
2021-11-06 08:54:35 +01:00
Braks 64df75d405 feat(docs): Initial commit for docs in nuxt 3 2021-11-06 08:54:35 +01:00
Braks 6ec8258f33 fix: typings 2021-10-22 14:29:27 +02:00
Braks 560bdc203b update(script-setup): Refactor remaining files to script setup style 2021-10-20 22:39:54 +02:00
Braks 9307c9066a feat: script setup style
* Replace jsx with script setup syntax
* Simplify logic and make it more "composable"
    * Move Zoom functions to useZoom composable
* Update eslint config & tsconfig
2021-10-20 22:39:54 +02:00
Braks 3557284a40 refactor(types): Split types into separate files
* for better organization split typings into separate files
* use index as barrel file
2021-10-20 22:39:54 +02:00