jqtree 1.9.0 → 1.9.1
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/bower.json +1 -1
- package/package.json +22 -22
- package/pnpm-workspace.yaml +4 -3
- package/src/nodeElement/folderElement.ts +5 -5
- package/src/nodeElement/index.ts +6 -6
- package/src/scrollHandler/containerScrollParent.ts +8 -8
- package/src/scrollHandler/documentScrollParent.ts +8 -8
- package/src/scrollHandler/scrollParent.ts +41 -41
- package/src/tree.jquery.d.ts +3 -2
- package/src/tree.jquery.ts +224 -118
- package/src/version.ts +1 -1
- package/tree.jquery.debug.js +263 -281
- package/tree.jquery.debug.js.map +1 -1
- package/tree.jquery.js +2 -2
- package/tree.jquery.js.map +1 -1
- package/eslint.config.mjs +0 -112
- package/src/simple.widget.ts +0 -134
package/bower.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jqtree",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.1",
|
|
4
4
|
"description": "Tree widget for jQuery",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jquery-plugin",
|
|
@@ -36,48 +36,48 @@
|
|
|
36
36
|
"@babel/core": "^8.0.1",
|
|
37
37
|
"@babel/preset-env": "^8.0.2",
|
|
38
38
|
"@babel/preset-typescript": "^8.0.1",
|
|
39
|
-
"@cspell/eslint-plugin": "^10.
|
|
40
|
-
"@eslint/js": "^
|
|
41
|
-
"@playwright/test": "^1.62.
|
|
39
|
+
"@cspell/eslint-plugin": "^10.2.1",
|
|
40
|
+
"@eslint/js": "^10.0.1",
|
|
41
|
+
"@playwright/test": "^1.62.1",
|
|
42
42
|
"@rollup/plugin-babel": "^7.1.0",
|
|
43
43
|
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
44
44
|
"@rollup/plugin-terser": "^1.0.0",
|
|
45
45
|
"@testing-library/dom": "^10.4.1",
|
|
46
|
-
"@testing-library/jest-dom": "^7.0.
|
|
47
|
-
"@testing-library/user-event": "^14.6.
|
|
46
|
+
"@testing-library/jest-dom": "^7.0.1",
|
|
47
|
+
"@testing-library/user-event": "^14.6.7",
|
|
48
48
|
"@types/debug": "^4.1.13",
|
|
49
49
|
"@types/jquery": "^4.0.1",
|
|
50
|
-
"@types/node": "^26.
|
|
51
|
-
"@vitest/coverage-istanbul": "^4.1.
|
|
52
|
-
"@vitest/eslint-plugin": "^1.6.
|
|
50
|
+
"@types/node": "^26.4.1",
|
|
51
|
+
"@vitest/coverage-istanbul": "^4.1.11",
|
|
52
|
+
"@vitest/eslint-plugin": "^1.6.27",
|
|
53
53
|
"autoprefixer": "^10.5.4",
|
|
54
|
-
"axe-core": "^4.
|
|
54
|
+
"axe-core": "^4.13.0",
|
|
55
55
|
"babel-plugin-istanbul": "^8.0.0",
|
|
56
|
-
"eslint": "^9.
|
|
56
|
+
"eslint": "^10.9.1",
|
|
57
57
|
"eslint-import-resolver-typescript": "^4.4.5",
|
|
58
58
|
"eslint-plugin-import-x": "^4.17.1",
|
|
59
|
-
"eslint-plugin-jest-dom": "^5.
|
|
60
|
-
"eslint-plugin-jest-extended": "
|
|
61
|
-
"eslint-plugin-perfectionist": "^5.
|
|
62
|
-
"eslint-plugin-playwright": "^2.
|
|
59
|
+
"eslint-plugin-jest-dom": "^5.10.1",
|
|
60
|
+
"eslint-plugin-jest-extended": "github:Aesthermortis/eslint-plugin-jest-extended#v4.0.0",
|
|
61
|
+
"eslint-plugin-perfectionist": "^5.11.0",
|
|
62
|
+
"eslint-plugin-playwright": "^2.11.0",
|
|
63
63
|
"eslint-plugin-testing-library": "^7.16.2",
|
|
64
64
|
"jest-extended": "^7.0.0",
|
|
65
|
-
"jsdom": "^
|
|
65
|
+
"jsdom": "^30.0.1",
|
|
66
66
|
"jsdom-testing-mocks": "^1.16.0",
|
|
67
67
|
"jsonfile": "^6.2.1",
|
|
68
68
|
"lodash": "^4.18.1",
|
|
69
69
|
"msw": "^2.15.0",
|
|
70
|
-
"postcss": "^8.5.
|
|
70
|
+
"postcss": "^8.5.28",
|
|
71
71
|
"postcss-cli": "^11.0.1",
|
|
72
|
-
"postcss-import": "^
|
|
72
|
+
"postcss-import": "^17.0.0",
|
|
73
73
|
"postcss-load-config": "^6.0.1",
|
|
74
|
-
"postcss-nested": "^
|
|
74
|
+
"postcss-nested": "^8.0.1",
|
|
75
75
|
"prettier": "^3.9.6",
|
|
76
|
-
"rollup": "^4.
|
|
76
|
+
"rollup": "^4.63.1",
|
|
77
77
|
"rollup-plugin-serve": "^3.0.0",
|
|
78
78
|
"tslib": "^2.8.1",
|
|
79
79
|
"typescript": "^6.0.3",
|
|
80
|
-
"typescript-eslint": "^8.
|
|
81
|
-
"vitest": "^4.1.
|
|
80
|
+
"typescript-eslint": "^8.69.0",
|
|
81
|
+
"vitest": "^4.1.11"
|
|
82
82
|
}
|
|
83
83
|
}
|
package/pnpm-workspace.yaml
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
allowBuilds:
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
esbuild: true
|
|
3
|
+
msw: true
|
|
4
|
+
unrs-resolver: true
|
|
5
|
+
eslint-plugin-jest-extended@https://codeload.github.com/Aesthermortis/eslint-plugin-jest-extended/tar.gz/0b24376411f45e9f3f11f9104cc9966ebc80dd8c: true
|
|
@@ -59,7 +59,7 @@ class FolderElement extends NodeElement {
|
|
|
59
59
|
const doClose = (): void => {
|
|
60
60
|
this.element.classList.add("jqtree-closed");
|
|
61
61
|
|
|
62
|
-
const titleSpan = this.
|
|
62
|
+
const titleSpan = this._getTitleSpan();
|
|
63
63
|
titleSpan.setAttribute("aria-expanded", "false");
|
|
64
64
|
|
|
65
65
|
this._triggerEvent("tree.close", {
|
|
@@ -67,7 +67,7 @@ class FolderElement extends NodeElement {
|
|
|
67
67
|
});
|
|
68
68
|
};
|
|
69
69
|
|
|
70
|
-
const ul = this.
|
|
70
|
+
const ul = this._getUl();
|
|
71
71
|
|
|
72
72
|
if (slide) {
|
|
73
73
|
slideUp(ul, animationSpeed, doClose);
|
|
@@ -102,7 +102,7 @@ class FolderElement extends NodeElement {
|
|
|
102
102
|
const doOpen = (): void => {
|
|
103
103
|
this.element.classList.remove("jqtree-closed");
|
|
104
104
|
|
|
105
|
-
const titleSpan = this.
|
|
105
|
+
const titleSpan = this._getTitleSpan();
|
|
106
106
|
titleSpan.setAttribute("aria-expanded", "true");
|
|
107
107
|
|
|
108
108
|
if (onFinished) {
|
|
@@ -114,7 +114,7 @@ class FolderElement extends NodeElement {
|
|
|
114
114
|
});
|
|
115
115
|
};
|
|
116
116
|
|
|
117
|
-
const ul = this.
|
|
117
|
+
const ul = this._getUl();
|
|
118
118
|
|
|
119
119
|
if (slide) {
|
|
120
120
|
slideDown(ul, animationSpeed, doOpen);
|
|
@@ -124,7 +124,7 @@ class FolderElement extends NodeElement {
|
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
126
|
|
|
127
|
-
protected
|
|
127
|
+
protected _mustShowBorderDropHint(position: Position): boolean {
|
|
128
128
|
return !this.node.is_open && position === "inside";
|
|
129
129
|
}
|
|
130
130
|
|
package/src/nodeElement/index.ts
CHANGED
|
@@ -33,7 +33,7 @@ class NodeElement {
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
public addDropHint(position: Position): DropHint {
|
|
36
|
-
if (this.
|
|
36
|
+
if (this._mustShowBorderDropHint(position)) {
|
|
37
37
|
return new BorderDropHint(this.element, this._getScrollLeft());
|
|
38
38
|
} else {
|
|
39
39
|
return new GhostDropHint(this.node, this.element, position);
|
|
@@ -43,7 +43,7 @@ class NodeElement {
|
|
|
43
43
|
public deselect(): void {
|
|
44
44
|
this.element.classList.remove("jqtree-selected");
|
|
45
45
|
|
|
46
|
-
const titleSpan = this.
|
|
46
|
+
const titleSpan = this._getTitleSpan();
|
|
47
47
|
titleSpan.removeAttribute("tabindex");
|
|
48
48
|
titleSpan.setAttribute("aria-selected", "false");
|
|
49
49
|
|
|
@@ -61,7 +61,7 @@ class NodeElement {
|
|
|
61
61
|
public select(mustSetFocus: boolean): void {
|
|
62
62
|
this.element.classList.add("jqtree-selected");
|
|
63
63
|
|
|
64
|
-
const titleSpan = this.
|
|
64
|
+
const titleSpan = this._getTitleSpan();
|
|
65
65
|
const tabIndex = this._tabIndex;
|
|
66
66
|
|
|
67
67
|
// Check for null or undefined
|
|
@@ -76,17 +76,17 @@ class NodeElement {
|
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
-
protected
|
|
79
|
+
protected _getTitleSpan(): HTMLSpanElement {
|
|
80
80
|
return this.element.querySelector(
|
|
81
81
|
":scope > .jqtree-element > span.jqtree-title",
|
|
82
82
|
) as HTMLSpanElement;
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
-
protected
|
|
85
|
+
protected _getUl(): HTMLUListElement {
|
|
86
86
|
return this.element.querySelector(":scope > ul") as HTMLUListElement;
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
-
protected
|
|
89
|
+
protected _mustShowBorderDropHint(position: Position): boolean {
|
|
90
90
|
return position === "inside";
|
|
91
91
|
}
|
|
92
92
|
}
|
|
@@ -14,15 +14,15 @@ export default class ContainerScrollParent extends ScrollParent {
|
|
|
14
14
|
public stopScrolling() {
|
|
15
15
|
super.stopScrolling();
|
|
16
16
|
|
|
17
|
-
this.
|
|
18
|
-
this.
|
|
17
|
+
this._horizontalScrollDirection = undefined;
|
|
18
|
+
this._verticalScrollDirection = undefined;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
protected
|
|
21
|
+
protected _getNewHorizontalScrollDirection(
|
|
22
22
|
pageX: number,
|
|
23
23
|
): HorizontalScrollDirection | undefined {
|
|
24
|
-
const scrollParentOffset = getElementPosition(this.
|
|
25
|
-
const containerWidth = this.
|
|
24
|
+
const scrollParentOffset = getElementPosition(this._container);
|
|
25
|
+
const containerWidth = this._container.getBoundingClientRect().width;
|
|
26
26
|
|
|
27
27
|
const rightEdge = scrollParentOffset.left + containerWidth;
|
|
28
28
|
const leftEdge = scrollParentOffset.left;
|
|
@@ -38,7 +38,7 @@ export default class ContainerScrollParent extends ScrollParent {
|
|
|
38
38
|
return undefined;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
protected
|
|
41
|
+
protected _getNewVerticalScrollDirection(
|
|
42
42
|
pageY: number,
|
|
43
43
|
): undefined | VerticalScrollDirection {
|
|
44
44
|
if (pageY < this._getScrollParentTop()) {
|
|
@@ -55,7 +55,7 @@ export default class ContainerScrollParent extends ScrollParent {
|
|
|
55
55
|
private _getScrollParentBottom() {
|
|
56
56
|
if (this._scrollParentBottom == null) {
|
|
57
57
|
const containerHeight =
|
|
58
|
-
this.
|
|
58
|
+
this._container.getBoundingClientRect().height;
|
|
59
59
|
this._scrollParentBottom =
|
|
60
60
|
this._getScrollParentTop() + containerHeight;
|
|
61
61
|
}
|
|
@@ -64,7 +64,7 @@ export default class ContainerScrollParent extends ScrollParent {
|
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
private _getScrollParentTop() {
|
|
67
|
-
this._scrollParentTop ??= getOffsetTop(this.
|
|
67
|
+
this._scrollParentTop ??= getOffsetTop(this._container);
|
|
68
68
|
|
|
69
69
|
return this._scrollParentTop;
|
|
70
70
|
}
|
|
@@ -35,10 +35,10 @@ export default class DocumentScrollParent extends ScrollParent {
|
|
|
35
35
|
this._documentScrollWidth = undefined;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
protected
|
|
38
|
+
protected _getNewHorizontalScrollDirection(
|
|
39
39
|
pageX: number,
|
|
40
40
|
): HorizontalScrollDirection | undefined {
|
|
41
|
-
const scrollLeft = this.
|
|
41
|
+
const scrollLeft = this._container.scrollLeft;
|
|
42
42
|
const windowWidth = window.innerWidth;
|
|
43
43
|
|
|
44
44
|
const isNearRightEdge = pageX > windowWidth - 20;
|
|
@@ -55,10 +55,10 @@ export default class DocumentScrollParent extends ScrollParent {
|
|
|
55
55
|
return undefined;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
protected
|
|
58
|
+
protected _getNewVerticalScrollDirection(
|
|
59
59
|
pageY: number,
|
|
60
60
|
): undefined | VerticalScrollDirection {
|
|
61
|
-
const scrollTop = this.
|
|
61
|
+
const scrollTop = this._container.scrollTop;
|
|
62
62
|
const distanceTop = pageY - scrollTop;
|
|
63
63
|
|
|
64
64
|
if (distanceTop < 20) {
|
|
@@ -76,28 +76,28 @@ export default class DocumentScrollParent extends ScrollParent {
|
|
|
76
76
|
|
|
77
77
|
private _canScrollDown() {
|
|
78
78
|
return (
|
|
79
|
-
this.
|
|
79
|
+
this._container.scrollTop + this._container.clientHeight <
|
|
80
80
|
this._getDocumentScrollHeight()
|
|
81
81
|
);
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
private _canScrollRight() {
|
|
85
85
|
return (
|
|
86
|
-
this.
|
|
86
|
+
this._container.scrollLeft + this._container.clientWidth <
|
|
87
87
|
this._getDocumentScrollWidth()
|
|
88
88
|
);
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
private _getDocumentScrollHeight() {
|
|
92
92
|
// Store the original scroll height because the scroll height can increase when the drag element is moved beyond the scroll height.
|
|
93
|
-
this._documentScrollHeight ??= this.
|
|
93
|
+
this._documentScrollHeight ??= this._container.scrollHeight;
|
|
94
94
|
|
|
95
95
|
return this._documentScrollHeight;
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
private _getDocumentScrollWidth() {
|
|
99
99
|
// Store the original scroll width because the scroll width can increase when the drag element is moved beyond the scroll width.
|
|
100
|
-
this._documentScrollWidth ??= this.
|
|
100
|
+
this._documentScrollWidth ??= this._container.scrollWidth;
|
|
101
101
|
|
|
102
102
|
return this._documentScrollWidth;
|
|
103
103
|
}
|
|
@@ -7,33 +7,33 @@ interface ConstructorParams {
|
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
export abstract class ScrollParent {
|
|
10
|
-
protected
|
|
11
|
-
protected
|
|
12
|
-
protected
|
|
10
|
+
protected _container: HTMLElement;
|
|
11
|
+
protected _horizontalScrollDirection?: HorizontalScrollDirection;
|
|
12
|
+
protected _horizontalScrollTimeout?: number;
|
|
13
13
|
|
|
14
|
-
protected
|
|
15
|
-
protected
|
|
16
|
-
protected
|
|
14
|
+
protected _refreshHitAreas: () => void;
|
|
15
|
+
protected _verticalScrollDirection?: VerticalScrollDirection;
|
|
16
|
+
protected _verticalScrollTimeout?: number;
|
|
17
17
|
|
|
18
18
|
constructor({ container, refreshHitAreas }: ConstructorParams) {
|
|
19
|
-
this.
|
|
20
|
-
this.
|
|
19
|
+
this._container = container;
|
|
20
|
+
this._refreshHitAreas = refreshHitAreas;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
public checkHorizontalScrolling(pageX: number): void {
|
|
24
24
|
const newHorizontalScrollDirection =
|
|
25
|
-
this.
|
|
25
|
+
this._getNewHorizontalScrollDirection(pageX);
|
|
26
26
|
|
|
27
|
-
if (this.
|
|
28
|
-
this.
|
|
27
|
+
if (this._horizontalScrollDirection !== newHorizontalScrollDirection) {
|
|
28
|
+
this._horizontalScrollDirection = newHorizontalScrollDirection;
|
|
29
29
|
|
|
30
|
-
if (this.
|
|
31
|
-
window.clearTimeout(this.
|
|
30
|
+
if (this._horizontalScrollTimeout != null) {
|
|
31
|
+
window.clearTimeout(this._horizontalScrollTimeout);
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
if (newHorizontalScrollDirection) {
|
|
35
|
-
this.
|
|
36
|
-
this.
|
|
35
|
+
this._horizontalScrollTimeout = window.setTimeout(
|
|
36
|
+
this._scrollHorizontally.bind(this),
|
|
37
37
|
40,
|
|
38
38
|
);
|
|
39
39
|
}
|
|
@@ -42,19 +42,19 @@ export abstract class ScrollParent {
|
|
|
42
42
|
|
|
43
43
|
public checkVerticalScrolling(pageY: number) {
|
|
44
44
|
const newVerticalScrollDirection =
|
|
45
|
-
this.
|
|
45
|
+
this._getNewVerticalScrollDirection(pageY);
|
|
46
46
|
|
|
47
|
-
if (this.
|
|
48
|
-
this.
|
|
47
|
+
if (this._verticalScrollDirection !== newVerticalScrollDirection) {
|
|
48
|
+
this._verticalScrollDirection = newVerticalScrollDirection;
|
|
49
49
|
|
|
50
|
-
if (this.
|
|
51
|
-
window.clearTimeout(this.
|
|
52
|
-
this.
|
|
50
|
+
if (this._verticalScrollTimeout != null) {
|
|
51
|
+
window.clearTimeout(this._verticalScrollTimeout);
|
|
52
|
+
this._verticalScrollTimeout = undefined;
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
if (newVerticalScrollDirection) {
|
|
56
|
-
this.
|
|
57
|
-
this.
|
|
56
|
+
this._verticalScrollTimeout = window.setTimeout(
|
|
57
|
+
this._scrollVertically.bind(this),
|
|
58
58
|
40,
|
|
59
59
|
);
|
|
60
60
|
}
|
|
@@ -62,56 +62,56 @@ export abstract class ScrollParent {
|
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
public getScrollLeft(): number {
|
|
65
|
-
return this.
|
|
65
|
+
return this._container.scrollLeft;
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
public scrollToY(top: number): void {
|
|
69
|
-
this.
|
|
69
|
+
this._container.scrollTop = top;
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
public stopScrolling() {
|
|
73
|
-
this.
|
|
74
|
-
this.
|
|
73
|
+
this._horizontalScrollDirection = undefined;
|
|
74
|
+
this._verticalScrollDirection = undefined;
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
protected abstract
|
|
77
|
+
protected abstract _getNewHorizontalScrollDirection(
|
|
78
78
|
pageX: number,
|
|
79
79
|
): HorizontalScrollDirection | undefined;
|
|
80
|
-
protected abstract
|
|
80
|
+
protected abstract _getNewVerticalScrollDirection(
|
|
81
81
|
pageY: number,
|
|
82
82
|
): undefined | VerticalScrollDirection;
|
|
83
83
|
|
|
84
|
-
protected
|
|
85
|
-
if (!this.
|
|
84
|
+
protected _scrollHorizontally() {
|
|
85
|
+
if (!this._horizontalScrollDirection) {
|
|
86
86
|
return;
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
-
const distance = this.
|
|
90
|
-
this.
|
|
89
|
+
const distance = this._horizontalScrollDirection === "left" ? -20 : 20;
|
|
90
|
+
this._container.scrollBy({
|
|
91
91
|
behavior: "instant",
|
|
92
92
|
left: distance,
|
|
93
93
|
top: 0,
|
|
94
94
|
});
|
|
95
95
|
|
|
96
|
-
this.
|
|
96
|
+
this._refreshHitAreas();
|
|
97
97
|
|
|
98
|
-
setTimeout(this.
|
|
98
|
+
setTimeout(this._scrollHorizontally.bind(this), 40);
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
-
protected
|
|
102
|
-
if (!this.
|
|
101
|
+
protected _scrollVertically() {
|
|
102
|
+
if (!this._verticalScrollDirection) {
|
|
103
103
|
return;
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
-
const distance = this.
|
|
107
|
-
this.
|
|
106
|
+
const distance = this._verticalScrollDirection === "top" ? -20 : 20;
|
|
107
|
+
this._container.scrollBy({
|
|
108
108
|
behavior: "instant",
|
|
109
109
|
left: 0,
|
|
110
110
|
top: distance,
|
|
111
111
|
});
|
|
112
112
|
|
|
113
|
-
this.
|
|
113
|
+
this._refreshHitAreas();
|
|
114
114
|
|
|
115
|
-
setTimeout(this.
|
|
115
|
+
setTimeout(this._scrollVertically.bind(this), 40);
|
|
116
116
|
}
|
|
117
117
|
}
|
package/src/tree.jquery.d.ts
CHANGED
|
@@ -24,8 +24,8 @@ interface IJQTreeOptions {
|
|
|
24
24
|
onCanMove?: (node: INode) => boolean;
|
|
25
25
|
onCanSelectNode?: (node: INode) => boolean;
|
|
26
26
|
onCreateLi?: (node: INode, el: JQuery, isSelected: boolean) => void;
|
|
27
|
-
onDragMove?: (node: INode, event:
|
|
28
|
-
onDragStop?: (node: INode, event:
|
|
27
|
+
onDragMove?: (node: INode, event: Event | Touch) => void;
|
|
28
|
+
onDragStop?: (node: INode, event: Event | Touch) => void;
|
|
29
29
|
onGetStateFromStorage?: () => string;
|
|
30
30
|
onIsMoveHandle?: (el: JQuery) => boolean;
|
|
31
31
|
onLoadFailed?: (response: JQuery.jqXHR) => void;
|
|
@@ -79,6 +79,7 @@ interface IJQTreePlugin {
|
|
|
79
79
|
(behavior: "getStateFromStorage"): INode | null;
|
|
80
80
|
(behavior: "getTree"): INode;
|
|
81
81
|
(behavior: "getVersion"): string;
|
|
82
|
+
(behavior: "isDragging"): boolean;
|
|
82
83
|
(behavior: "isNodeSelected", node: INode): boolean;
|
|
83
84
|
(behavior: "loadData", data: NodeData[], parentNode?: INode): JQuery;
|
|
84
85
|
(
|