jqtree 1.7.0 → 1.7.2
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/.github/workflows/ci.yml +2 -15
- package/.github/workflows/codeql-analysis.yml +2 -2
- package/.github/workflows/size.yml +24 -0
- package/README.md +1 -1
- package/bower.json +1 -1
- package/docs/Gemfile.lock +39 -40
- package/docs/_config.yml +1 -1
- package/docs/_entries/03_features.md +1 -1
- package/docs/_entries/10_changelog.md +9 -0
- package/docs/_entries/16_closedicon.md +17 -3
- package/docs/_entries/31_openedicon.md +17 -3
- package/docs/package.json +7 -7
- package/docs/pnpm-lock.yaml +378 -284
- package/docs/static/bower.json +2 -2
- package/docs/static/bower_components/fontawesome/css/all.min.css +6 -2
- package/docs/static/bower_components/fontawesome/webfonts/fa-brands-400.ttf +0 -0
- package/docs/static/bower_components/fontawesome/webfonts/fa-brands-400.woff2 +0 -0
- package/docs/static/bower_components/fontawesome/webfonts/fa-regular-400.ttf +0 -0
- package/docs/static/bower_components/fontawesome/webfonts/fa-regular-400.woff2 +0 -0
- package/docs/static/bower_components/fontawesome/webfonts/fa-solid-900.ttf +0 -0
- package/docs/static/bower_components/fontawesome/webfonts/fa-solid-900.woff2 +0 -0
- package/docs/static/bower_components/fontawesome/webfonts/fa-v4compatibility.ttf +0 -0
- package/docs/static/bower_components/fontawesome/webfonts/fa-v4compatibility.woff2 +0 -0
- package/docs/static/bower_components/jquery/dist/jquery.js +813 -1102
- package/docs/static/bower_components/jquery/dist/jquery.min.js +2 -2
- package/docs/static/documentation.css +104 -222
- package/docs/static/examples/autoescape.js +15 -17
- package/docs/static/examples/autoscroll.js +5 -7
- package/docs/static/examples/button-on-right.js +4 -6
- package/docs/static/examples/custom_html.js +22 -24
- package/docs/static/examples/drag-outside.js +23 -25
- package/docs/static/examples/drag_and_drop.js +4 -6
- package/docs/static/examples/icon_buttons.js +3 -5
- package/docs/static/examples/load_json_data.js +14 -16
- package/docs/static/examples/load_json_data_from_server.js +1 -3
- package/docs/static/examples/load_on_demand.js +3 -5
- package/docs/static/examples/multiple_select.js +19 -21
- package/docs/static/examples/right-to-left.js +2 -4
- package/docs/static/examples/save_state.js +2 -4
- package/docs/tree.jquery.js +3 -3
- package/lib/dataLoader.js +3 -3
- package/lib/dragAndDropHandler.js +22 -11
- package/lib/elementsRenderer.js +26 -16
- package/lib/keyHandler.js +1 -1
- package/lib/mouse.widget.js +13 -2
- package/lib/node.js +17 -14
- package/lib/nodeElement.js +20 -13
- package/lib/playwright/coverage.js +11 -16
- package/lib/playwright/playwright.test.js +37 -58
- package/lib/playwright/testUtils.js +27 -44
- package/lib/saveStateHandler.js +2 -2
- package/lib/scrollHandler.js +8 -4
- package/lib/selectNodeHandler.js +2 -2
- package/lib/simple.widget.js +5 -3
- package/lib/test/jqTree/accessibility.test.js +37 -0
- package/lib/test/jqTree/events.test.js +73 -77
- package/lib/test/jqTree/loadOnDemand.test.js +5 -4
- package/lib/test/jqTree/methods.test.js +2 -2
- package/lib/test/jqTree/options.test.js +43 -2
- package/lib/test/node.test.js +7 -4
- package/lib/tree.jquery.js +5 -5
- package/lib/version.js +1 -1
- package/package.json +37 -41
- package/src/dragAndDropHandler.ts +24 -10
- package/src/elementsRenderer.ts +57 -50
- package/src/jqtreeOptions.ts +5 -5
- package/src/mouse.widget.ts +12 -0
- package/src/node.ts +10 -5
- package/src/nodeElement.ts +27 -21
- package/src/saveStateHandler.ts +1 -1
- package/src/scrollHandler.ts +6 -2
- package/src/selectNodeHandler.ts +1 -1
- package/src/simple.widget.ts +2 -0
- package/src/test/.eslintrc +2 -1
- package/src/test/jqTree/accessibility.test.ts +25 -0
- package/src/test/jqTree/events.test.ts +79 -93
- package/src/test/jqTree/loadOnDemand.test.ts +6 -5
- package/src/test/jqTree/methods.test.ts +27 -27
- package/src/test/jqTree/options.test.ts +61 -8
- package/src/test/node.test.ts +6 -4
- package/src/test/nodeUtil.test.ts +1 -1
- package/src/tree.jquery.d.ts +20 -11
- package/src/tree.jquery.ts +1 -1
- package/src/version.ts +1 -1
- package/tree.jquery.debug.js +143 -97
- package/tree.jquery.debug.js.map +1 -1
- package/tree.jquery.js +3 -3
- package/tree.jquery.js.map +1 -1
- package/tsconfig.json +1 -0
- package/.tool-versions +0 -1
- package/docs/static/bower_components/fontawesome/webfonts/fa-brands-400.eot +0 -0
- package/docs/static/bower_components/fontawesome/webfonts/fa-brands-400.svg +0 -3717
- package/docs/static/bower_components/fontawesome/webfonts/fa-brands-400.woff +0 -0
- package/docs/static/bower_components/fontawesome/webfonts/fa-regular-400.eot +0 -0
- package/docs/static/bower_components/fontawesome/webfonts/fa-regular-400.svg +0 -801
- package/docs/static/bower_components/fontawesome/webfonts/fa-regular-400.woff +0 -0
- package/docs/static/bower_components/fontawesome/webfonts/fa-solid-900.eot +0 -0
- package/docs/static/bower_components/fontawesome/webfonts/fa-solid-900.svg +0 -5028
- package/docs/static/bower_components/fontawesome/webfonts/fa-solid-900.woff +0 -0
package/.github/workflows/ci.yml
CHANGED
|
@@ -46,7 +46,7 @@ jobs:
|
|
|
46
46
|
run: |
|
|
47
47
|
pnpm run tsc
|
|
48
48
|
- name: Clean coverage
|
|
49
|
-
run:
|
|
49
|
+
run: rm -rf .nyc_output && npx jest --clearCache
|
|
50
50
|
- name: Run jest tests
|
|
51
51
|
run: pnpm run jest
|
|
52
52
|
- name: Playwright install
|
|
@@ -60,20 +60,7 @@ jobs:
|
|
|
60
60
|
name: screenshots
|
|
61
61
|
path: src/playwright/playwright.test.ts-snapshots/
|
|
62
62
|
- name: Merge coverage
|
|
63
|
-
run:
|
|
64
|
-
pnpm run merge-coverage
|
|
65
|
-
pnpm run print-coverage
|
|
66
|
-
pnpm run write-coverage
|
|
67
|
-
- name: Coverage artifact
|
|
68
|
-
uses: actions/upload-artifact@v3
|
|
69
|
-
with:
|
|
70
|
-
name: coverage
|
|
71
|
-
path: .nyc_output
|
|
72
|
-
- name: Coveralls
|
|
73
|
-
uses: coverallsapp/github-action@master
|
|
74
|
-
with:
|
|
75
|
-
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
76
|
-
path-to-lcov: ./lcov.info
|
|
63
|
+
run: cp jest-coverage/coverage-final.json .nyc_output/coverage_jsdom.json
|
|
77
64
|
- name: Codecov
|
|
78
65
|
uses: codecov/codecov-action@v3
|
|
79
66
|
with:
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
name: Compressed Size
|
|
2
|
+
on: [pull_request]
|
|
3
|
+
|
|
4
|
+
jobs:
|
|
5
|
+
runner-job:
|
|
6
|
+
runs-on: ubuntu-latest
|
|
7
|
+
|
|
8
|
+
steps:
|
|
9
|
+
- name: Check out repository code
|
|
10
|
+
uses: actions/checkout@v3
|
|
11
|
+
- name: Setup node
|
|
12
|
+
uses: actions/setup-node@v3
|
|
13
|
+
with:
|
|
14
|
+
node-version: 16
|
|
15
|
+
- name: Install pnpm
|
|
16
|
+
run: npm install -g pnpm
|
|
17
|
+
- name: Install packages
|
|
18
|
+
run: pnpm install
|
|
19
|
+
- name: Check compressed size
|
|
20
|
+
uses: preactjs/compressed-size-action@v2
|
|
21
|
+
with:
|
|
22
|
+
build-script: "production"
|
|
23
|
+
pattern: "./lib/**/*.js"
|
|
24
|
+
exclude: "{./lib/**/*.d.js,./lib/playwright/**,./lib/test/**}"
|
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@ JqTree is a tree widget. Read more in the [documentation](https://mbraak.github.
|
|
|
12
12
|
|
|
13
13
|
- Create a tree from JSON data
|
|
14
14
|
- Drag and drop
|
|
15
|
-
- Works on
|
|
15
|
+
- Works on all modern browsers
|
|
16
16
|
- Written in Typescript
|
|
17
17
|
|
|
18
18
|
The project is hosted on [github](https://github.com/mbraak/jqTree), has a [test suite](http://mbraak.github.io/jqTree/test/test.html).
|
package/bower.json
CHANGED
package/docs/Gemfile.lock
CHANGED
|
@@ -1,43 +1,43 @@
|
|
|
1
1
|
GEM
|
|
2
2
|
remote: https://rubygems.org/
|
|
3
3
|
specs:
|
|
4
|
-
activesupport (6.
|
|
4
|
+
activesupport (6.1.7.6)
|
|
5
5
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
6
|
-
i18n (>=
|
|
7
|
-
minitest (
|
|
8
|
-
tzinfo (~>
|
|
9
|
-
zeitwerk (~> 2.
|
|
10
|
-
addressable (2.8.
|
|
11
|
-
public_suffix (>= 2.0.2, <
|
|
6
|
+
i18n (>= 1.6, < 2)
|
|
7
|
+
minitest (>= 5.1)
|
|
8
|
+
tzinfo (~> 2.0)
|
|
9
|
+
zeitwerk (~> 2.3)
|
|
10
|
+
addressable (2.8.5)
|
|
11
|
+
public_suffix (>= 2.0.2, < 6.0)
|
|
12
12
|
coffee-script (2.4.1)
|
|
13
13
|
coffee-script-source
|
|
14
14
|
execjs
|
|
15
15
|
coffee-script-source (1.11.1)
|
|
16
16
|
colorator (1.1.0)
|
|
17
|
-
commonmarker (0.23.
|
|
18
|
-
concurrent-ruby (1.
|
|
19
|
-
dnsruby (1.
|
|
20
|
-
simpleidn (~> 0.1)
|
|
17
|
+
commonmarker (0.23.10)
|
|
18
|
+
concurrent-ruby (1.2.2)
|
|
19
|
+
dnsruby (1.70.0)
|
|
20
|
+
simpleidn (~> 0.2.1)
|
|
21
21
|
em-websocket (0.5.3)
|
|
22
22
|
eventmachine (>= 0.12.9)
|
|
23
23
|
http_parser.rb (~> 0)
|
|
24
|
-
ethon (0.
|
|
24
|
+
ethon (0.16.0)
|
|
25
25
|
ffi (>= 1.15.0)
|
|
26
26
|
eventmachine (1.2.7)
|
|
27
27
|
execjs (2.8.1)
|
|
28
|
-
faraday (2.
|
|
29
|
-
faraday-net_http (
|
|
28
|
+
faraday (2.7.10)
|
|
29
|
+
faraday-net_http (>= 2.0, < 3.1)
|
|
30
30
|
ruby2_keywords (>= 0.0.4)
|
|
31
|
-
faraday-net_http (
|
|
31
|
+
faraday-net_http (3.0.2)
|
|
32
32
|
ffi (1.15.5)
|
|
33
33
|
forwardable-extended (2.6.0)
|
|
34
34
|
gemoji (3.0.1)
|
|
35
|
-
github-pages (
|
|
35
|
+
github-pages (228)
|
|
36
36
|
github-pages-health-check (= 1.17.9)
|
|
37
|
-
jekyll (= 3.9.
|
|
37
|
+
jekyll (= 3.9.3)
|
|
38
38
|
jekyll-avatar (= 0.7.0)
|
|
39
39
|
jekyll-coffeescript (= 1.1.1)
|
|
40
|
-
jekyll-commonmark-ghpages (= 0.
|
|
40
|
+
jekyll-commonmark-ghpages (= 0.4.0)
|
|
41
41
|
jekyll-default-layout (= 0.1.4)
|
|
42
42
|
jekyll-feed (= 0.15.1)
|
|
43
43
|
jekyll-gist (= 1.5.0)
|
|
@@ -71,10 +71,10 @@ GEM
|
|
|
71
71
|
jemoji (= 0.12.0)
|
|
72
72
|
kramdown (= 2.3.2)
|
|
73
73
|
kramdown-parser-gfm (= 1.1.0)
|
|
74
|
-
liquid (= 4.0.
|
|
74
|
+
liquid (= 4.0.4)
|
|
75
75
|
mercenary (~> 0.3)
|
|
76
76
|
minima (= 2.5.1)
|
|
77
|
-
nokogiri (>= 1.13.
|
|
77
|
+
nokogiri (>= 1.13.6, < 2.0)
|
|
78
78
|
rouge (= 3.26.0)
|
|
79
79
|
terminal-table (~> 1.4)
|
|
80
80
|
github-pages-health-check (1.17.9)
|
|
@@ -83,17 +83,17 @@ GEM
|
|
|
83
83
|
octokit (~> 4.0)
|
|
84
84
|
public_suffix (>= 3.0, < 5.0)
|
|
85
85
|
typhoeus (~> 1.3)
|
|
86
|
-
html-pipeline (2.14.
|
|
86
|
+
html-pipeline (2.14.3)
|
|
87
87
|
activesupport (>= 2)
|
|
88
88
|
nokogiri (>= 1.4)
|
|
89
89
|
http_parser.rb (0.8.0)
|
|
90
|
-
i18n (
|
|
90
|
+
i18n (1.14.1)
|
|
91
91
|
concurrent-ruby (~> 1.0)
|
|
92
|
-
jekyll (3.9.
|
|
92
|
+
jekyll (3.9.3)
|
|
93
93
|
addressable (~> 2.4)
|
|
94
94
|
colorator (~> 1.0)
|
|
95
95
|
em-websocket (~> 0.5)
|
|
96
|
-
i18n (
|
|
96
|
+
i18n (>= 0.7, < 2)
|
|
97
97
|
jekyll-sass-converter (~> 1.0)
|
|
98
98
|
jekyll-watch (~> 2.0)
|
|
99
99
|
kramdown (>= 1.17, < 3)
|
|
@@ -109,11 +109,11 @@ GEM
|
|
|
109
109
|
coffee-script-source (~> 1.11.1)
|
|
110
110
|
jekyll-commonmark (1.4.0)
|
|
111
111
|
commonmarker (~> 0.22)
|
|
112
|
-
jekyll-commonmark-ghpages (0.
|
|
113
|
-
commonmarker (~> 0.23.
|
|
112
|
+
jekyll-commonmark-ghpages (0.4.0)
|
|
113
|
+
commonmarker (~> 0.23.7)
|
|
114
114
|
jekyll (~> 3.9.0)
|
|
115
115
|
jekyll-commonmark (~> 1.4.0)
|
|
116
|
-
rouge (>= 2.0, <
|
|
116
|
+
rouge (>= 2.0, < 5.0)
|
|
117
117
|
jekyll-default-layout (0.1.4)
|
|
118
118
|
jekyll (~> 3.0)
|
|
119
119
|
jekyll-feed (0.15.1)
|
|
@@ -201,31 +201,31 @@ GEM
|
|
|
201
201
|
rexml
|
|
202
202
|
kramdown-parser-gfm (1.1.0)
|
|
203
203
|
kramdown (~> 2.0)
|
|
204
|
-
liquid (4.0.
|
|
205
|
-
listen (3.
|
|
204
|
+
liquid (4.0.4)
|
|
205
|
+
listen (3.8.0)
|
|
206
206
|
rb-fsevent (~> 0.10, >= 0.10.3)
|
|
207
207
|
rb-inotify (~> 0.9, >= 0.9.10)
|
|
208
208
|
mercenary (0.3.6)
|
|
209
|
-
mini_portile2 (2.8.
|
|
209
|
+
mini_portile2 (2.8.4)
|
|
210
210
|
minima (2.5.1)
|
|
211
211
|
jekyll (>= 3.5, < 5.0)
|
|
212
212
|
jekyll-feed (~> 0.9)
|
|
213
213
|
jekyll-seo-tag (~> 2.1)
|
|
214
|
-
minitest (5.
|
|
214
|
+
minitest (5.20.0)
|
|
215
215
|
nokogiri (1.13.10)
|
|
216
216
|
mini_portile2 (~> 2.8.0)
|
|
217
217
|
racc (~> 1.4)
|
|
218
|
-
octokit (4.25.
|
|
218
|
+
octokit (4.25.1)
|
|
219
219
|
faraday (>= 1, < 3)
|
|
220
220
|
sawyer (~> 0.9)
|
|
221
221
|
pathutil (0.16.2)
|
|
222
222
|
forwardable-extended (~> 2.6)
|
|
223
223
|
public_suffix (4.0.7)
|
|
224
|
-
racc (1.
|
|
225
|
-
rb-fsevent (0.11.
|
|
224
|
+
racc (1.7.1)
|
|
225
|
+
rb-fsevent (0.11.2)
|
|
226
226
|
rb-inotify (0.10.1)
|
|
227
227
|
ffi (~> 1.0)
|
|
228
|
-
rexml (3.2.
|
|
228
|
+
rexml (3.2.6)
|
|
229
229
|
rouge (3.26.0)
|
|
230
230
|
ruby2_keywords (0.0.5)
|
|
231
231
|
rubyzip (2.3.2)
|
|
@@ -242,16 +242,15 @@ GEM
|
|
|
242
242
|
unf (~> 0.1.4)
|
|
243
243
|
terminal-table (1.8.0)
|
|
244
244
|
unicode-display_width (~> 1.1, >= 1.1.1)
|
|
245
|
-
thread_safe (0.3.6)
|
|
246
245
|
typhoeus (1.4.0)
|
|
247
246
|
ethon (>= 0.9.0)
|
|
248
|
-
tzinfo (
|
|
249
|
-
|
|
247
|
+
tzinfo (2.0.6)
|
|
248
|
+
concurrent-ruby (~> 1.0)
|
|
250
249
|
unf (0.1.4)
|
|
251
250
|
unf_ext
|
|
252
251
|
unf_ext (0.0.8.2)
|
|
253
252
|
unicode-display_width (1.8.0)
|
|
254
|
-
zeitwerk (2.
|
|
253
|
+
zeitwerk (2.6.11)
|
|
255
254
|
|
|
256
255
|
PLATFORMS
|
|
257
256
|
ruby
|
|
@@ -260,4 +259,4 @@ DEPENDENCIES
|
|
|
260
259
|
github-pages
|
|
261
260
|
|
|
262
261
|
BUNDLED WITH
|
|
263
|
-
|
|
262
|
+
1.17.2
|
package/docs/_config.yml
CHANGED
|
@@ -3,6 +3,15 @@ title: Changelog
|
|
|
3
3
|
name: changelog
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
+
#### 1.7.2 (september 14 2023)
|
|
7
|
+
|
|
8
|
+
- Issue #732: improve types of closedIcon and openedIcon
|
|
9
|
+
- Issue #736: use the bundle in the package.json
|
|
10
|
+
|
|
11
|
+
#### 1.7.1 (august 6 2023)
|
|
12
|
+
|
|
13
|
+
- Issue #724: improve accessibility
|
|
14
|
+
|
|
6
15
|
#### 1.7.0 (december 23 2022)
|
|
7
16
|
|
|
8
17
|
Small breaking change: this release changes the definition of getPreviousNode and getNextNode.
|
|
@@ -5,8 +5,22 @@ name: options-closedicon
|
|
|
5
5
|
|
|
6
6
|
A character or symbol to display on closed nodes. The default is '&#x25ba;' (►)
|
|
7
7
|
|
|
8
|
+
The value can be a:
|
|
9
|
+
|
|
10
|
+
- **string**. E.g. a unicode character or a text.
|
|
11
|
+
- The text is escaped.
|
|
12
|
+
- **html element**. E.g. for an icon
|
|
13
|
+
- **JQuery element**. Also for an icon
|
|
14
|
+
|
|
8
15
|
{% highlight js %}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
16
|
+
// String
|
|
17
|
+
$('#tree1').tree({ closedIcon: '+' });
|
|
18
|
+
|
|
19
|
+
// Html element
|
|
20
|
+
const icon = document.createElement("span");
|
|
21
|
+
icon.className = "icon test";
|
|
22
|
+
$('#tree1').tree({ closedIcon: icon });
|
|
23
|
+
|
|
24
|
+
// JQuery element
|
|
25
|
+
$('#tree1').tree({ closedIcon: $('<span class="icon test" />') });
|
|
12
26
|
{% endhighlight %}
|
|
@@ -5,8 +5,22 @@ name: options-openedicon
|
|
|
5
5
|
|
|
6
6
|
A character or symbol to display on opened nodes. The default is '&#x25bc;' (▼)
|
|
7
7
|
|
|
8
|
+
The value can be a:
|
|
9
|
+
|
|
10
|
+
- **string**. E.g. a unicode character or a text.
|
|
11
|
+
- The text is escaped.
|
|
12
|
+
- **html element**. E.g. for an icon
|
|
13
|
+
- **JQuery element**. Also for an icon
|
|
14
|
+
|
|
8
15
|
{% highlight js %}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
16
|
+
// String
|
|
17
|
+
$('#tree1').tree({ openedIcon: '-' });
|
|
18
|
+
|
|
19
|
+
// Html element
|
|
20
|
+
const icon = document.createElement("span");
|
|
21
|
+
icon.className = "icon test";
|
|
22
|
+
$('#tree1').tree({ openedIcon: icon });
|
|
23
|
+
|
|
24
|
+
// JQuery element
|
|
25
|
+
$('#tree1').tree({ openedIcon: $('<span class="icon test" />') });
|
|
12
26
|
{% endhighlight %}
|
package/docs/package.json
CHANGED
|
@@ -10,13 +10,13 @@
|
|
|
10
10
|
"copy_static": "cp ../tree.jquery.js . && cp ../jqtree.css ."
|
|
11
11
|
},
|
|
12
12
|
"devDependencies": {
|
|
13
|
-
"@tailwindcss/typography": "^0.5.
|
|
14
|
-
"autoprefixer": "^10.4.
|
|
15
|
-
"postcss": "^8.4.
|
|
16
|
-
"postcss-cli": "^10",
|
|
17
|
-
"postcss-import": "^15",
|
|
13
|
+
"@tailwindcss/typography": "^0.5.9",
|
|
14
|
+
"autoprefixer": "^10.4.15",
|
|
15
|
+
"postcss": "^8.4.28",
|
|
16
|
+
"postcss-cli": "^10.1.0",
|
|
17
|
+
"postcss-import": "^15.1.0",
|
|
18
18
|
"postcss-load-config": "^4.0.1",
|
|
19
|
-
"postcss-nested": "^6",
|
|
20
|
-
"tailwindcss": "^3.
|
|
19
|
+
"postcss-nested": "^6.0.1",
|
|
20
|
+
"tailwindcss": "^3.3.3"
|
|
21
21
|
}
|
|
22
22
|
}
|