@splicetree/plugin-dnd 0.1.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # @splicetree/plugin-dnd
2
2
 
3
+ ## 0.2.0
4
+
3
5
  ## 0.1.1
4
6
 
5
7
  ### Patch Changes
package/dist/index.js CHANGED
@@ -15,7 +15,7 @@ const dnd = {
15
15
  name: "dnd",
16
16
  setup(ctx) {
17
17
  const { autoUpdateParent = true, autoExpandOnDrop = true } = ctx.options?.configuration?.dnd ?? {};
18
- const parentField = ctx.tree.options?.parentField ?? "parent";
18
+ const parentField = ctx.tree.options?.configuration?.parentField ?? ctx.tree.options?.parentField ?? "parent";
19
19
  let draggingId;
20
20
  const hoverPositions = /* @__PURE__ */ new Map();
21
21
  /**
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@splicetree/plugin-dnd",
3
3
  "type": "module",
4
- "version": "0.1.1",
4
+ "version": "0.2.0",
5
5
  "author": {
6
6
  "email": "michael.cocova@gmail.com",
7
7
  "name": "Michael Cocova"
@@ -23,7 +23,7 @@
23
23
  "access": "public"
24
24
  },
25
25
  "devDependencies": {
26
- "@splicetree/core": "0.1.1"
26
+ "@splicetree/core": "0.2.0"
27
27
  },
28
28
  "scripts": {
29
29
  "dev": "tsdown --watch",
package/src/index.ts CHANGED
@@ -118,7 +118,7 @@ export const dnd: SpliceTreePlugin = {
118
118
  autoExpandOnDrop?: boolean
119
119
  }
120
120
  const { autoUpdateParent = true, autoExpandOnDrop = true } = cfg
121
- const parentField = ctx.tree.options?.parentField ?? 'parent'
121
+ const parentField = ctx.tree.options?.configuration?.parentField ?? 'parent'
122
122
  let draggingId: string | undefined
123
123
  const hoverPositions = new Map<string, DropPosition>()
124
124