jqtree 1.8.2 → 1.8.4

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.
Files changed (222) hide show
  1. package/bower.json +1 -1
  2. package/package.json +31 -29
  3. package/src/dragAndDropHandler/generateHitAreas.ts +47 -43
  4. package/src/nodeElement/ghostDropHint.ts +3 -37
  5. package/src/nodeElement/index.ts +1 -1
  6. package/src/saveStateHandler.ts +43 -59
  7. package/src/version.ts +1 -1
  8. package/tree.jquery.debug.js +69 -106
  9. package/tree.jquery.debug.js.map +1 -1
  10. package/tree.jquery.js +2 -2
  11. package/tree.jquery.js.map +1 -1
  12. package/.editorconfig +0 -12
  13. package/.eslintrc +0 -48
  14. package/.github/workflows/ci.yml +0 -68
  15. package/.github/workflows/codeql-analysis.yml +0 -32
  16. package/.github/workflows/size.yml +0 -24
  17. package/.github/workflows/static.yml +0 -57
  18. package/.prettier +0 -3
  19. package/config/.postcssrc +0 -6
  20. package/config/babel.config.json +0 -11
  21. package/config/babel.coverage.config.json +0 -4
  22. package/config/jest.config.js +0 -24
  23. package/config/jest.polyfills.js +0 -14
  24. package/config/playwright.config.js +0 -18
  25. package/config/production +0 -6
  26. package/config/rollup.config.mjs +0 -71
  27. package/css/jqtree.postcss +0 -193
  28. package/devserver/devserver.js +0 -7
  29. package/devserver/devserver_scroll.js +0 -8
  30. package/devserver/index.html +0 -22
  31. package/devserver/test_index.html +0 -22
  32. package/devserver/test_scroll.html +0 -28
  33. package/devserver/test_scroll_container.html +0 -39
  34. package/docs/.ruby-version +0 -1
  35. package/docs/Gemfile +0 -5
  36. package/docs/Gemfile.lock +0 -82
  37. package/docs/_config.yml +0 -126
  38. package/docs/_entries/events/index.md +0 -6
  39. package/docs/_entries/events/tree-click.md +0 -37
  40. package/docs/_entries/events/tree-close.md +0 -15
  41. package/docs/_entries/events/tree-contextmenu.md +0 -21
  42. package/docs/_entries/events/tree-dblclick.md +0 -19
  43. package/docs/_entries/events/tree-init.md +0 -15
  44. package/docs/_entries/events/tree-load-data.md +0 -15
  45. package/docs/_entries/events/tree-loading-data.md +0 -27
  46. package/docs/_entries/events/tree-move.md +0 -73
  47. package/docs/_entries/events/tree-open.md +0 -15
  48. package/docs/_entries/events/tree-refresh.md +0 -12
  49. package/docs/_entries/events/tree-select.md +0 -28
  50. package/docs/_entries/functions/addnodeafter.md +0 -20
  51. package/docs/_entries/functions/addnodebefore.md +0 -8
  52. package/docs/_entries/functions/addparentnode.md +0 -20
  53. package/docs/_entries/functions/appendnode.md +0 -50
  54. package/docs/_entries/functions/closenode.md +0 -23
  55. package/docs/_entries/functions/destroy.md +0 -12
  56. package/docs/_entries/functions/getnodebycallback.md +0 -24
  57. package/docs/_entries/functions/getnodebyhtmlelement.md +0 -29
  58. package/docs/_entries/functions/getnodebyid.md +0 -21
  59. package/docs/_entries/functions/getselectednode.md +0 -10
  60. package/docs/_entries/functions/getstate.md +0 -19
  61. package/docs/_entries/functions/gettree.md +0 -12
  62. package/docs/_entries/functions/index.md +0 -6
  63. package/docs/_entries/functions/is-node-selected.md +0 -11
  64. package/docs/_entries/functions/isdragging.md +0 -12
  65. package/docs/_entries/functions/loaddata.md +0 -46
  66. package/docs/_entries/functions/loaddatafromurl.md +0 -55
  67. package/docs/_entries/functions/movedown.md +0 -8
  68. package/docs/_entries/functions/movenode.md +0 -15
  69. package/docs/_entries/functions/moveup.md +0 -8
  70. package/docs/_entries/functions/opennode.md +0 -44
  71. package/docs/_entries/functions/prependnode.md +0 -21
  72. package/docs/_entries/functions/refresh.md +0 -12
  73. package/docs/_entries/functions/reload.md +0 -22
  74. package/docs/_entries/functions/removenode.md +0 -12
  75. package/docs/_entries/functions/scrolltonode.md +0 -13
  76. package/docs/_entries/functions/selectnode.md +0 -45
  77. package/docs/_entries/functions/setoption.md +0 -12
  78. package/docs/_entries/functions/setstate.md +0 -8
  79. package/docs/_entries/functions/toggle.md +0 -25
  80. package/docs/_entries/functions/tojson.md +0 -13
  81. package/docs/_entries/functions/updatenode.md +0 -50
  82. package/docs/_entries/general/changelog.md +0 -434
  83. package/docs/_entries/general/demo.html +0 -28
  84. package/docs/_entries/general/downloads.md +0 -9
  85. package/docs/_entries/general/examples.md +0 -8
  86. package/docs/_entries/general/features.md +0 -15
  87. package/docs/_entries/general/index.md +0 -7
  88. package/docs/_entries/general/introduction.md +0 -9
  89. package/docs/_entries/general/requirements.md +0 -6
  90. package/docs/_entries/general/tutorial.md +0 -71
  91. package/docs/_entries/general/usecases.md +0 -15
  92. package/docs/_entries/multiple_selection/add-to-selection.md +0 -21
  93. package/docs/_entries/multiple_selection/get-selected-nodes.md +0 -10
  94. package/docs/_entries/multiple_selection/index.md +0 -9
  95. package/docs/_entries/multiple_selection/remove-from-selection.md +0 -11
  96. package/docs/_entries/node/children.md +0 -12
  97. package/docs/_entries/node/getdata.md +0 -17
  98. package/docs/_entries/node/getlevel.md +0 -13
  99. package/docs/_entries/node/getnextnode.md +0 -12
  100. package/docs/_entries/node/getnextsibling.md +0 -10
  101. package/docs/_entries/node/getnextvisiblenode.md +0 -15
  102. package/docs/_entries/node/getpreviousnode.md +0 -12
  103. package/docs/_entries/node/getprevioussibling.md +0 -10
  104. package/docs/_entries/node/getpreviousvisiblenode.md +0 -15
  105. package/docs/_entries/node/index.md +0 -13
  106. package/docs/_entries/node/parent.md +0 -10
  107. package/docs/_entries/options/animationspeed.md +0 -7
  108. package/docs/_entries/options/autoescape.md +0 -6
  109. package/docs/_entries/options/autoopen.md +0 -28
  110. package/docs/_entries/options/buttonleft.md +0 -12
  111. package/docs/_entries/options/closedicon.md +0 -26
  112. package/docs/_entries/options/data-url.md +0 -45
  113. package/docs/_entries/options/data.md +0 -46
  114. package/docs/_entries/options/datafilter.md +0 -17
  115. package/docs/_entries/options/draganddrop.md +0 -18
  116. package/docs/_entries/options/index.md +0 -6
  117. package/docs/_entries/options/keyboardsupport.md +0 -14
  118. package/docs/_entries/options/oncanmove.md +0 -22
  119. package/docs/_entries/options/oncanmoveto.md +0 -22
  120. package/docs/_entries/options/oncanselectnode.md +0 -26
  121. package/docs/_entries/options/oncreateli.md +0 -22
  122. package/docs/_entries/options/ondragmove.md +0 -20
  123. package/docs/_entries/options/ondragstop.md +0 -20
  124. package/docs/_entries/options/onismovehandle.md +0 -17
  125. package/docs/_entries/options/onloadfailed.md +0 -15
  126. package/docs/_entries/options/onloading.md +0 -22
  127. package/docs/_entries/options/openedicon.md +0 -26
  128. package/docs/_entries/options/openfolderdelay.md +0 -15
  129. package/docs/_entries/options/rtl.md +0 -18
  130. package/docs/_entries/options/savestate.md +0 -39
  131. package/docs/_entries/options/selectable.md +0 -18
  132. package/docs/_entries/options/showemptyfolder.md +0 -26
  133. package/docs/_entries/options/slide.md +0 -12
  134. package/docs/_entries/options/start_dnd_delay.md +0 -13
  135. package/docs/_entries/options/tabindex.md +0 -14
  136. package/docs/_entries/options/usecontextmenu.md +0 -14
  137. package/docs/_examples/01_load_json_data.html +0 -45
  138. package/docs/_examples/02_load_json_data_from_server.html +0 -29
  139. package/docs/_examples/03_drag_and_drop.html +0 -42
  140. package/docs/_examples/04_save_state.html +0 -46
  141. package/docs/_examples/05_load_on_demand.html +0 -68
  142. package/docs/_examples/06_autoescape.html +0 -45
  143. package/docs/_examples/07_autoscroll.html +0 -42
  144. package/docs/_examples/08_multiple_select.html +0 -60
  145. package/docs/_examples/09_custom_html.html +0 -61
  146. package/docs/_examples/10_icon_buttons.html +0 -26
  147. package/docs/_examples/11_right-to-left.html +0 -25
  148. package/docs/_examples/12_button_on_right.html +0 -26
  149. package/docs/_examples/13_drag_outside.html +0 -48
  150. package/docs/_examples/14_filter.html +0 -111
  151. package/docs/_layouts/example.html +0 -7
  152. package/docs/_layouts/page.html +0 -26
  153. package/docs/documentation.css +0 -3
  154. package/docs/index.html +0 -65
  155. package/docs/package.json +0 -22
  156. package/docs/pnpm-lock.yaml +0 -892
  157. package/docs/postcss.config.js +0 -7
  158. package/docs/static/bower.json +0 -8
  159. package/docs/static/bower_components/fontawesome/css/all.min.css +0 -9
  160. package/docs/static/bower_components/fontawesome/webfonts/fa-brands-400.ttf +0 -0
  161. package/docs/static/bower_components/fontawesome/webfonts/fa-brands-400.woff2 +0 -0
  162. package/docs/static/bower_components/fontawesome/webfonts/fa-regular-400.ttf +0 -0
  163. package/docs/static/bower_components/fontawesome/webfonts/fa-regular-400.woff2 +0 -0
  164. package/docs/static/bower_components/fontawesome/webfonts/fa-solid-900.ttf +0 -0
  165. package/docs/static/bower_components/fontawesome/webfonts/fa-solid-900.woff2 +0 -0
  166. package/docs/static/bower_components/fontawesome/webfonts/fa-v4compatibility.ttf +0 -0
  167. package/docs/static/bower_components/fontawesome/webfonts/fa-v4compatibility.woff2 +0 -0
  168. package/docs/static/bower_components/jquery/dist/jquery.js +0 -10704
  169. package/docs/static/bower_components/jquery/dist/jquery.min.js +0 -2
  170. package/docs/static/bower_components/jquery-mockjax/dist/jquery.mockjax.js +0 -1061
  171. package/docs/static/documentation.js +0 -26
  172. package/docs/static/example.postcss +0 -68
  173. package/docs/static/example_data.js +0 -122
  174. package/docs/static/examples/autoescape.js +0 -17
  175. package/docs/static/examples/autoscroll.js +0 -6
  176. package/docs/static/examples/button-on-right.js +0 -13
  177. package/docs/static/examples/custom_html.js +0 -27
  178. package/docs/static/examples/drag-outside.js +0 -37
  179. package/docs/static/examples/drag_and_drop.js +0 -13
  180. package/docs/static/examples/filter.js +0 -63
  181. package/docs/static/examples/icon_buttons.js +0 -12
  182. package/docs/static/examples/load_json_data.js +0 -16
  183. package/docs/static/examples/load_json_data_from_server.js +0 -9
  184. package/docs/static/examples/load_on_demand.js +0 -19
  185. package/docs/static/examples/multiple_select.js +0 -23
  186. package/docs/static/examples/right-to-left.js +0 -11
  187. package/docs/static/examples/save_state.js +0 -11
  188. package/docs/static/monokai.css +0 -70
  189. package/docs/static/spinner.gif +0 -0
  190. package/docs/tailwind.config.js +0 -16
  191. package/sitemap.txt +0 -14
  192. package/src/playwright/.eslintrc +0 -5
  193. package/src/playwright/coverage.ts +0 -38
  194. package/src/playwright/playwright.test.ts +0 -401
  195. package/src/playwright/playwright.test.ts-snapshots/with-dragAndDrop-moves-a-node-1-Chromium-darwin.png +0 -0
  196. package/src/playwright/playwright.test.ts-snapshots/with-dragAndDrop-moves-a-node-1-Chromium-linux.png +0 -0
  197. package/src/playwright/playwright.test.ts-snapshots/without-dragAndDrop-displays-a-tree-1-Chromium-darwin.png +0 -0
  198. package/src/playwright/playwright.test.ts-snapshots/without-dragAndDrop-displays-a-tree-1-Chromium-linux.png +0 -0
  199. package/src/playwright/playwright.test.ts-snapshots/without-dragAndDrop-selects-a-node-1-Chromium-darwin.png +0 -0
  200. package/src/playwright/playwright.test.ts-snapshots/without-dragAndDrop-selects-a-node-1-Chromium-linux.png +0 -0
  201. package/src/playwright/testUtils.ts +0 -153
  202. package/src/test/.eslintrc +0 -17
  203. package/src/test/global.d.ts +0 -1
  204. package/src/test/jqTree/accessibility.test.ts +0 -25
  205. package/src/test/jqTree/create.test.ts +0 -54
  206. package/src/test/jqTree/events.test.ts +0 -290
  207. package/src/test/jqTree/keyboard.test.ts +0 -247
  208. package/src/test/jqTree/loadOnDemand.test.ts +0 -198
  209. package/src/test/jqTree/methods.test.ts +0 -1491
  210. package/src/test/jqTree/mouse.test.ts +0 -82
  211. package/src/test/jqTree/options.test.ts +0 -595
  212. package/src/test/node.test.ts +0 -1396
  213. package/src/test/nodeUtils.test.ts +0 -21
  214. package/src/test/position.test.ts +0 -30
  215. package/src/test/support/exampleData.ts +0 -23
  216. package/src/test/support/jqTreeMatchers.ts +0 -68
  217. package/src/test/support/matchers.d.ts +0 -31
  218. package/src/test/support/setupTests.ts +0 -5
  219. package/src/test/support/testUtil.ts +0 -30
  220. package/src/test/support/treeStructure.ts +0 -39
  221. package/src/test/util.test.ts +0 -27
  222. package/tsconfig.json +0 -24
@@ -1,26 +0,0 @@
1
- $(function () {
2
- // demo tree
3
- var data = [
4
- {
5
- label: "node1",
6
- id: 1,
7
- children: [
8
- { label: "child1", id: 2 },
9
- { label: "child2", id: 3 },
10
- ],
11
- },
12
- {
13
- label: "node2",
14
- id: 4,
15
- children: [{ label: "child3", id: 5 }],
16
- },
17
- ];
18
-
19
- var $tree1 = $("#tree1");
20
-
21
- $tree1.tree({
22
- data: data,
23
- autoOpen: true,
24
- dragAndDrop: true,
25
- });
26
- });
@@ -1,68 +0,0 @@
1
- #tree1 {
2
- background-color: #ccc;
3
- padding: 8px 16px;
4
- margin-bottom: 16px;
5
-
6
- &.block-style {
7
- background-color: #fafafa;
8
- }
9
- }
10
-
11
- .jqtree-tree .jqtree-loading > div .jqtree-title:after {
12
- content: url(spinner.gif);
13
- margin-left: 8px;
14
- }
15
-
16
- #tree1.jqtree-loading:after {
17
- content: url(spinner.gif);
18
- }
19
-
20
- #scroll-container {
21
- height: 200px;
22
- overflow-y: scroll;
23
- -ms-user-select: none;
24
- user-select: none;
25
- margin-bottom: 16px;
26
- }
27
-
28
- .block-style {
29
- ul.jqtree-tree {
30
- margin-left: 0;
31
-
32
- ul.jqtree_common {
33
- margin-left: 2em;
34
- }
35
-
36
- .jqtree-element {
37
- margin-bottom: 8px;
38
- background-color: #ddd;
39
- padding: 8px;
40
-
41
- .jqtree-title {
42
- margin-left: 0;
43
- }
44
- }
45
-
46
- li.jqtree-selected {
47
- > .jqtree-element,
48
- > .jqtree-element:hover {
49
- background-color: #97bdd6;
50
- text-shadow: none;
51
- }
52
- }
53
- }
54
- }
55
-
56
- .hidden-node {
57
- display: none;
58
- }
59
-
60
- .highlight-node > .jqtree-element > .jqtree-title {
61
- font-weight: bold;
62
- }
63
-
64
- .jqtree-tree {
65
- .jqtree-toggler {
66
- font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
67
- }
68
- }
@@ -1,122 +0,0 @@
1
- const ExampleData = {};
2
-
3
- ExampleData.exampleData = [
4
- {
5
- name: "Saurischia",
6
- id: 1,
7
- children: [
8
- { name: "Herrerasaurians", id: 2 },
9
- {
10
- name: "Theropods",
11
- id: 3,
12
- children: [
13
- { name: "Coelophysoids", id: 4 },
14
- { name: "Ceratosaurians", id: 5 },
15
- { name: "Spinosauroids", id: 6 },
16
- { name: "Carnosaurians", id: 7 },
17
- {
18
- name: "Coelurosaurians",
19
- id: 8,
20
- children: [
21
- { name: "Tyrannosauroids", id: 9 },
22
- { name: "Ornithomimosaurians", id: 10 },
23
- { name: "Therizinosauroids", id: 11 },
24
- { name: "Oviraptorosaurians", id: 12 },
25
- { name: "Dromaeosaurids", id: 13 },
26
- { name: "Troodontids", id: 14 },
27
- { name: "Avialans", id: 15 },
28
- ],
29
- },
30
- ],
31
- },
32
- {
33
- name: "Sauropodomorphs",
34
- id: 16,
35
- children: [
36
- { name: "Prosauropods", id: 17 },
37
- {
38
- name: "Sauropods",
39
- id: 18,
40
- children: [
41
- { name: "Diplodocoids", id: 19 },
42
- {
43
- name: "Macronarians",
44
- id: 20,
45
- children: [
46
- { name: "Brachiosaurids", id: 21 },
47
- { name: "Titanosaurians", id: 22 },
48
- ],
49
- },
50
- ],
51
- },
52
- ],
53
- },
54
- ],
55
- },
56
- {
57
- name: "Ornithischians",
58
- id: 23,
59
- children: [
60
- { name: "Heterodontosaurids", id: 24 },
61
- {
62
- name: "Thyreophorans",
63
- id: 25,
64
- children: [
65
- { name: "Ankylosaurians", id: 26 },
66
- { name: "Stegosaurians", id: 27 },
67
- ],
68
- },
69
- {
70
- name: "Ornithopods",
71
- id: 28,
72
- children: [{ name: "Hadrosaurids", id: 29 }],
73
- },
74
- { name: "Pachycephalosaurians", id: 30 },
75
- { name: "Ceratopsians", id: 31 },
76
- ],
77
- },
78
- ];
79
-
80
- ExampleData.getFirstLevelData = function (nodes) {
81
- if (!nodes) {
82
- nodes = ExampleData.exampleData;
83
- }
84
-
85
- const data = [];
86
-
87
- nodes.forEach(function (node) {
88
- const newNode = { id: node.id, name: node.name };
89
-
90
- if (node.children) {
91
- newNode.load_on_demand = true;
92
- }
93
-
94
- data.push(newNode);
95
- });
96
-
97
- return data;
98
- };
99
-
100
- ExampleData.getChildrenOfNode = function (nodeId) {
101
- let result = null;
102
-
103
- function iterate(nodes) {
104
- nodes.forEach(function (node) {
105
- if (result) {
106
- return;
107
- } else {
108
- if (node.id == nodeId) {
109
- result = node;
110
- }
111
-
112
- if (node.children) {
113
- iterate(node.children);
114
- }
115
- }
116
- });
117
- }
118
-
119
- iterate(ExampleData.exampleData);
120
-
121
- return ExampleData.getFirstLevelData(result.children);
122
- };
@@ -1,17 +0,0 @@
1
- var data = [
2
- {
3
- name: "examples",
4
- children: [
5
- { name: '<a href="example1.html">Example 1</a>' },
6
- { name: '<a href="example2.html">Example 2</a>' },
7
- '<a href="example3.html">Example 3</a>'
8
- ]
9
- }
10
- ];
11
-
12
- // set autoEscape to false
13
- $("#tree1").tree({
14
- data: data,
15
- autoEscape: false,
16
- autoOpen: true
17
- });
@@ -1,6 +0,0 @@
1
- var $tree = $("#tree1");
2
- $tree.tree({
3
- data: ExampleData.exampleData,
4
- dragAndDrop: true,
5
- autoOpen: true
6
- });
@@ -1,13 +0,0 @@
1
- $.mockjax({
2
- url: "*",
3
- response: function(options) {
4
- this.responseText = ExampleData.exampleData;
5
- },
6
- responseTime: 0
7
- });
8
-
9
- $("#tree1").tree({
10
- buttonLeft: false,
11
- autoOpen: 0,
12
- slide: true
13
- });
@@ -1,27 +0,0 @@
1
- var $tree = $("#tree1");
2
-
3
- $tree.tree({
4
- data: ExampleData.exampleData,
5
- autoOpen: 1,
6
- onCreateLi: function (node, $li) {
7
- // Append a link to the jqtree-element div.
8
- // The link has an url '#node-[id]' and a data property 'node-id'.
9
- $li.find(".jqtree-element").append(
10
- `<a href="#node-${node.id}" class="edit underline font-medium ml-2 hover:text-slate-900" data-node-id="${node.id}">edit</a>`
11
- );
12
- },
13
- });
14
-
15
- // Handle a click on the edit link
16
- $tree.on("click", ".edit", function (e) {
17
- // Get the id from the 'node-id' data property
18
- var node_id = $(e.target).data("node-id");
19
-
20
- // Get the node from the tree
21
- var node = $tree.tree("getNodeById", node_id);
22
-
23
- if (node) {
24
- // Display the node name
25
- alert(node.name);
26
- }
27
- });
@@ -1,37 +0,0 @@
1
- $.mockjax({
2
- url: "*",
3
- response: function(options) {
4
- this.responseText = ExampleData.exampleData;
5
- },
6
- responseTime: 0
7
- });
8
-
9
- var targetCollisionDiv = $("#targetDiv");
10
-
11
- function isOverTarget(e) {
12
- return (
13
- e.clientX > targetCollisionDiv.position().left &&
14
- e.clientX <
15
- targetCollisionDiv.position().left +
16
- targetCollisionDiv.width() &&
17
- e.clientY > targetCollisionDiv.position().top &&
18
- e.clientY <
19
- targetCollisionDiv.position().top + targetCollisionDiv.height()
20
- );
21
- }
22
-
23
- function handleMove(node, e) {
24
- if (isOverTarget(e)) {
25
- console.log("the node is over the target div");
26
- }
27
- }
28
-
29
- function handleStop(node, e) {
30
- console.log("stopped over target: ", isOverTarget(e));
31
- }
32
-
33
- $("#tree1").tree({
34
- dragAndDrop: true,
35
- onDragMove: handleMove,
36
- onDragStop: handleStop
37
- });
@@ -1,13 +0,0 @@
1
- $.mockjax({
2
- url: "*",
3
- response: function(options) {
4
- this.responseText = ExampleData.exampleData;
5
- },
6
- responseTime: 0
7
- });
8
-
9
- var $tree = $("#tree1");
10
- $tree.tree({
11
- dragAndDrop: true,
12
- autoOpen: 0
13
- });
@@ -1,63 +0,0 @@
1
- const $tree = $("#tree1");
2
-
3
- let foundMatch = false;
4
-
5
- $tree.tree({
6
- autoOpen: false,
7
- data: ExampleData.exampleData,
8
- useContextMenu: false,
9
- onCreateLi: (node, $el) => {
10
- if (foundMatch && !node.openForMatch && !node.parent.matches) {
11
- $el.addClass("hidden-node");
12
- }
13
-
14
- if (node.matches) {
15
- $el.addClass("highlight-node");
16
- }
17
- },
18
- });
19
-
20
- $("#search").on("click", () => {
21
- const searchTerm = $("#search-term").val().toLowerCase();
22
- const tree = $tree.tree("getTree");
23
-
24
- if (!searchTerm) {
25
- foundMatch = false;
26
-
27
- tree.iterate((node) => {
28
- node["openForMatch"] = false;
29
- node["matches"] = false;
30
- return true;
31
- });
32
-
33
- $tree.tree("refresh");
34
- return;
35
- }
36
-
37
- foundMatch = false;
38
-
39
- tree.iterate((node) => {
40
- const matches = node.name.toLowerCase().includes(searchTerm);
41
- node["openForMatch"] = matches;
42
- node["matches"] = matches;
43
-
44
- if (matches) {
45
- foundMatch = true;
46
-
47
- if (node.isFolder()) {
48
- node.is_open = true;
49
- }
50
-
51
- let parent = node.parent;
52
- while (parent) {
53
- parent["openForMatch"] = true;
54
- parent.is_open = true;
55
- parent = parent.parent;
56
- }
57
- }
58
-
59
- return true;
60
- });
61
-
62
- $tree.tree("refresh");
63
- });
@@ -1,12 +0,0 @@
1
- $.mockjax({
2
- url: "*",
3
- response: function(options) {
4
- this.responseText = ExampleData.exampleData;
5
- },
6
- responseTime: 0
7
- });
8
-
9
- $("#tree1").tree({
10
- closedIcon: $('<i class="fas fa-arrow-circle-right"></i>'),
11
- openedIcon: $('<i class="fas fa-arrow-circle-down"></i>')
12
- });
@@ -1,16 +0,0 @@
1
- var data = [
2
- {
3
- name: "node1",
4
- id: 1,
5
- children: [{ name: "child1", id: 2 }, { name: "child2", id: 3 }]
6
- },
7
- {
8
- name: "node2",
9
- id: 4,
10
- children: [{ name: "child3", id: 5 }]
11
- }
12
- ];
13
-
14
- $("#tree1").tree({
15
- data: data
16
- });
@@ -1,9 +0,0 @@
1
- $.mockjax({
2
- url: "*",
3
- response: function(options) {
4
- this.responseText = ExampleData.exampleData;
5
- },
6
- responseTime: 0
7
- });
8
-
9
- $("#tree1").tree();
@@ -1,19 +0,0 @@
1
- $.mockjax({
2
- url: "*",
3
- responseTime: 1000,
4
- response: function(options) {
5
- if (options.data && options.data.node) {
6
- this.responseText = ExampleData.getChildrenOfNode(
7
- options.data.node
8
- );
9
- } else {
10
- this.responseText = ExampleData.getFirstLevelData();
11
- }
12
- }
13
- });
14
-
15
- var $tree = $("#tree1");
16
-
17
- $tree.tree({
18
- saveState: true
19
- });
@@ -1,23 +0,0 @@
1
- var $tree = $("#tree1");
2
- $tree.tree({
3
- data: ExampleData.exampleData,
4
- autoOpen: true
5
- });
6
- $tree.on("tree.click", function(e) {
7
- // Disable single selection
8
- e.preventDefault();
9
-
10
- var selected_node = e.node;
11
-
12
- if (selected_node.id == undefined) {
13
- console.log(
14
- "The multiple selection functions require that nodes have an id"
15
- );
16
- }
17
-
18
- if ($tree.tree("isNodeSelected", selected_node)) {
19
- $tree.tree("removeFromSelection", selected_node);
20
- } else {
21
- $tree.tree("addToSelection", selected_node);
22
- }
23
- });
@@ -1,11 +0,0 @@
1
- $.mockjax({
2
- url: "*",
3
- response: function(options) {
4
- this.responseText = ExampleData.exampleData;
5
- },
6
- responseTime: 0
7
- });
8
-
9
- $("#tree1").tree({
10
- rtl: true
11
- });
@@ -1,11 +0,0 @@
1
- $.mockjax({
2
- url: "*",
3
- response: function(options) {
4
- this.responseText = ExampleData.exampleData;
5
- },
6
- responseTime: 0
7
- });
8
-
9
- $("#tree1").tree({
10
- saveState: true
11
- });
@@ -1,70 +0,0 @@
1
- .highlight .hll { background-color: #49483e }
2
- .highlight { background: #272822; color: #f8f8f2 }
3
- .highlight .c { color: #75715e } /* Comment */
4
- .highlight .err { color: #960050; background-color: #1e0010 } /* Error */
5
- .highlight .k { color: #66d9ef } /* Keyword */
6
- .highlight .l { color: #ae81ff } /* Literal */
7
- .highlight .n { color: #f8f8f2 } /* Name */
8
- .highlight .o { color: #f92672 } /* Operator */
9
- .highlight .p { color: #f8f8f2 } /* Punctuation */
10
- .highlight .ch { color: #75715e } /* Comment.Hashbang */
11
- .highlight .cm { color: #75715e } /* Comment.Multiline */
12
- .highlight .cp { color: #75715e } /* Comment.Preproc */
13
- .highlight .cpf { color: #75715e } /* Comment.PreprocFile */
14
- .highlight .c1 { color: #75715e } /* Comment.Single */
15
- .highlight .cs { color: #75715e } /* Comment.Special */
16
- .highlight .gd { color: #f92672 } /* Generic.Deleted */
17
- .highlight .ge { font-style: italic } /* Generic.Emph */
18
- .highlight .gi { color: #a6e22e } /* Generic.Inserted */
19
- .highlight .gs { font-weight: bold } /* Generic.Strong */
20
- .highlight .gu { color: #75715e } /* Generic.Subheading */
21
- .highlight .kc { color: #66d9ef } /* Keyword.Constant */
22
- .highlight .kd { color: #66d9ef } /* Keyword.Declaration */
23
- .highlight .kn { color: #f92672 } /* Keyword.Namespace */
24
- .highlight .kp { color: #66d9ef } /* Keyword.Pseudo */
25
- .highlight .kr { color: #66d9ef } /* Keyword.Reserved */
26
- .highlight .kt { color: #66d9ef } /* Keyword.Type */
27
- .highlight .ld { color: #e6db74 } /* Literal.Date */
28
- .highlight .m { color: #ae81ff } /* Literal.Number */
29
- .highlight .s { color: #e6db74 } /* Literal.String */
30
- .highlight .na { color: #a6e22e } /* Name.Attribute */
31
- .highlight .nb { color: #f8f8f2 } /* Name.Builtin */
32
- .highlight .nc { color: #a6e22e } /* Name.Class */
33
- .highlight .no { color: #66d9ef } /* Name.Constant */
34
- .highlight .nd { color: #a6e22e } /* Name.Decorator */
35
- .highlight .ni { color: #f8f8f2 } /* Name.Entity */
36
- .highlight .ne { color: #a6e22e } /* Name.Exception */
37
- .highlight .nf { color: #a6e22e } /* Name.Function */
38
- .highlight .nl { color: #f8f8f2 } /* Name.Label */
39
- .highlight .nn { color: #f8f8f2 } /* Name.Namespace */
40
- .highlight .nx { color: #a6e22e } /* Name.Other */
41
- .highlight .py { color: #f8f8f2 } /* Name.Property */
42
- .highlight .nt { color: #f92672 } /* Name.Tag */
43
- .highlight .nv { color: #f8f8f2 } /* Name.Variable */
44
- .highlight .ow { color: #f92672 } /* Operator.Word */
45
- .highlight .w { color: #f8f8f2 } /* Text.Whitespace */
46
- .highlight .mb { color: #ae81ff } /* Literal.Number.Bin */
47
- .highlight .mf { color: #ae81ff } /* Literal.Number.Float */
48
- .highlight .mh { color: #ae81ff } /* Literal.Number.Hex */
49
- .highlight .mi { color: #ae81ff } /* Literal.Number.Integer */
50
- .highlight .mo { color: #ae81ff } /* Literal.Number.Oct */
51
- .highlight .sa { color: #e6db74 } /* Literal.String.Affix */
52
- .highlight .sb { color: #e6db74 } /* Literal.String.Backtick */
53
- .highlight .sc { color: #e6db74 } /* Literal.String.Char */
54
- .highlight .dl { color: #e6db74 } /* Literal.String.Delimiter */
55
- .highlight .sd { color: #e6db74 } /* Literal.String.Doc */
56
- .highlight .s2 { color: #e6db74 } /* Literal.String.Double */
57
- .highlight .se { color: #ae81ff } /* Literal.String.Escape */
58
- .highlight .sh { color: #e6db74 } /* Literal.String.Heredoc */
59
- .highlight .si { color: #e6db74 } /* Literal.String.Interpol */
60
- .highlight .sx { color: #e6db74 } /* Literal.String.Other */
61
- .highlight .sr { color: #e6db74 } /* Literal.String.Regex */
62
- .highlight .s1 { color: #e6db74 } /* Literal.String.Single */
63
- .highlight .ss { color: #e6db74 } /* Literal.String.Symbol */
64
- .highlight .bp { color: #f8f8f2 } /* Name.Builtin.Pseudo */
65
- .highlight .fm { color: #a6e22e } /* Name.Function.Magic */
66
- .highlight .vc { color: #f8f8f2 } /* Name.Variable.Class */
67
- .highlight .vg { color: #f8f8f2 } /* Name.Variable.Global */
68
- .highlight .vi { color: #f8f8f2 } /* Name.Variable.Instance */
69
- .highlight .vm { color: #f8f8f2 } /* Name.Variable.Magic */
70
- .highlight .il { color: #ae81ff } /* Literal.Number.Integer.Long */
Binary file
@@ -1,16 +0,0 @@
1
- module.exports = {
2
- content: [
3
- "./_layouts/**/*.html",
4
- "./index.html",
5
- "./_examples/**/*.html",
6
- "./static/examples/*.js",
7
- ],
8
- theme: {
9
- extend: {
10
- maxWidth: {
11
- "8xl": "90rem",
12
- },
13
- },
14
- },
15
- plugins: [require("@tailwindcss/typography")],
16
- };
package/sitemap.txt DELETED
@@ -1,14 +0,0 @@
1
- https://mbraak.github.io/jqTree/
2
- https://mbraak.github.io/jqTree/examples/01_load_json_data/
3
- https://mbraak.github.io/jqTree/examples/02_load_json_data_from_server/
4
- https://mbraak.github.io/jqTree/examples/03_drag_and_drop/
5
- https://mbraak.github.io/jqTree/examples/04_save_state/
6
- https://mbraak.github.io/jqTree/examples/05_load_on_demand/
7
- https://mbraak.github.io/jqTree/examples/06_autoescape/
8
- https://mbraak.github.io/jqTree/examples/07_autoscroll/
9
- https://mbraak.github.io/jqTree/examples/08_multiple_select/
10
- https://mbraak.github.io/jqTree/examples/09_custom_html/
11
- https://mbraak.github.io/jqTree/examples/10_icon_buttons/
12
- https://mbraak.github.io/jqTree/examples/11_right-to-left/
13
- https://mbraak.github.io/jqTree/examples/12_button_on_right/
14
- https://mbraak.github.io/jqTree/examples/13_drag_outside/
@@ -1,5 +0,0 @@
1
- {
2
- "extends": [
3
- "plugin:playwright/playwright-test"
4
- ]
5
- }
@@ -1,38 +0,0 @@
1
- import fs from "fs";
2
- import path from "path";
3
- import crypto from "crypto";
4
- import { BrowserContext } from "@playwright/test";
5
-
6
- const istanbulCLIOutput = path.join(process.cwd(), ".nyc_output");
7
-
8
- const generateUUID = () => crypto.randomBytes(16).toString("hex");
9
-
10
- export const initCoverage = async (context: BrowserContext) => {
11
- await fs.promises.mkdir(istanbulCLIOutput, { recursive: true });
12
-
13
- await context.exposeFunction(
14
- "collectIstanbulCoverage",
15
- (coverageJSON: string) => {
16
- if (coverageJSON) {
17
- const filename = path.join(
18
- istanbulCLIOutput,
19
- `playwright_coverage_${generateUUID()}.json`,
20
- );
21
- fs.writeFileSync(filename, coverageJSON);
22
- }
23
- },
24
- );
25
- };
26
-
27
- export const saveCoverage = async (context: BrowserContext) => {
28
- for (const page of context.pages()) {
29
- await page.evaluate(() => {
30
- // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
31
- const anyWindow = window as any;
32
- // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
33
- const coverageData = anyWindow.__coverage__;
34
- // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access, playwright/no-unsafe-references
35
- anyWindow.collectIstanbulCoverage(JSON.stringify(coverageData));
36
- });
37
- }
38
- };