@keenmate/svelte-treeview 1.0.0-beta.3 → 1.0.0-beta.5
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/dist/Branch.svelte +1 -1
- package/dist/TreeView.svelte +2 -2
- package/dist/TreeView.svelte.d.ts +1 -1
- package/package.json +2 -2
package/dist/Branch.svelte
CHANGED
|
@@ -78,7 +78,7 @@ let liElements = {};
|
|
|
78
78
|
class:is-child={helper.nodePathIsChild(node.path)}
|
|
79
79
|
class:has-children={node.hasChildren}
|
|
80
80
|
on:contextmenu|stopPropagation={(e) => {
|
|
81
|
-
dispatch('open-ctxmenu', { e
|
|
81
|
+
dispatch('open-ctxmenu', { e, node });
|
|
82
82
|
}}
|
|
83
83
|
on:drop|stopPropagation={(e) => handleDragDrop(e, node, liElements[getNodeId(node)])}
|
|
84
84
|
on:dragover|stopPropagation={(e) =>
|
package/dist/TreeView.svelte
CHANGED
|
@@ -67,7 +67,7 @@ export let loadChildrenAsync = null;
|
|
|
67
67
|
* Show context menu on right click.
|
|
68
68
|
* Its defined in slot context-menu
|
|
69
69
|
*/
|
|
70
|
-
export let
|
|
70
|
+
export let showContextMenu = false;
|
|
71
71
|
/**
|
|
72
72
|
* Automaticaly expand nodes to this level,
|
|
73
73
|
* any user made expansion will override this.
|
|
@@ -194,7 +194,7 @@ function onSelectionChanged(event) {
|
|
|
194
194
|
}
|
|
195
195
|
function openContextMenu(ce) {
|
|
196
196
|
const { e, node } = ce.detail;
|
|
197
|
-
if (!
|
|
197
|
+
if (!showContextMenu)
|
|
198
198
|
return;
|
|
199
199
|
e.preventDefault();
|
|
200
200
|
ctxMenu.onRightClick(e, node);
|
|
@@ -50,7 +50,7 @@ declare const __propDef: {
|
|
|
50
50
|
/**
|
|
51
51
|
* Show context menu on right click.
|
|
52
52
|
* Its defined in slot context-menu
|
|
53
|
-
*/
|
|
53
|
+
*/ showContextMenu?: boolean | undefined;
|
|
54
54
|
/**
|
|
55
55
|
* Automaticaly expand nodes to this level,
|
|
56
56
|
* any user made expansion will override this.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@keenmate/svelte-treeview",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.5",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"dev": "vite dev",
|
|
6
6
|
"build": "vite build && npm run package",
|
|
@@ -69,4 +69,4 @@
|
|
|
69
69
|
"lodash.uniq": "^4.5.0",
|
|
70
70
|
"lodash.uniqby": "^4.7.0"
|
|
71
71
|
}
|
|
72
|
-
}
|
|
72
|
+
}
|