jqtree 1.7.1 → 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.
Files changed (61) hide show
  1. package/.github/workflows/ci.yml +0 -5
  2. package/.github/workflows/size.yml +24 -0
  3. package/README.md +1 -1
  4. package/bower.json +1 -1
  5. package/docs/Gemfile.lock +15 -13
  6. package/docs/_config.yml +1 -1
  7. package/docs/_entries/03_features.md +1 -1
  8. package/docs/_entries/10_changelog.md +5 -0
  9. package/docs/_entries/16_closedicon.md +17 -3
  10. package/docs/_entries/31_openedicon.md +17 -3
  11. package/docs/package.json +2 -2
  12. package/docs/pnpm-lock.yaml +106 -130
  13. package/docs/static/examples/autoescape.js +15 -17
  14. package/docs/static/examples/autoscroll.js +5 -7
  15. package/docs/static/examples/button-on-right.js +4 -6
  16. package/docs/static/examples/custom_html.js +22 -24
  17. package/docs/static/examples/drag-outside.js +23 -25
  18. package/docs/static/examples/drag_and_drop.js +4 -6
  19. package/docs/static/examples/icon_buttons.js +3 -5
  20. package/docs/static/examples/load_json_data.js +14 -16
  21. package/docs/static/examples/load_json_data_from_server.js +1 -3
  22. package/docs/static/examples/load_on_demand.js +3 -5
  23. package/docs/static/examples/multiple_select.js +19 -21
  24. package/docs/static/examples/right-to-left.js +2 -4
  25. package/docs/static/examples/save_state.js +2 -4
  26. package/docs/tree.jquery.js +2 -2
  27. package/lib/dataLoader.js +3 -3
  28. package/lib/dragAndDropHandler.js +1 -1
  29. package/lib/elementsRenderer.js +1 -1
  30. package/lib/keyHandler.js +1 -1
  31. package/lib/mouse.widget.js +1 -1
  32. package/lib/node.js +4 -4
  33. package/lib/nodeElement.js +1 -1
  34. package/lib/playwright/coverage.js +11 -16
  35. package/lib/playwright/playwright.test.js +37 -58
  36. package/lib/playwright/testUtils.js +27 -44
  37. package/lib/saveStateHandler.js +1 -1
  38. package/lib/scrollHandler.js +1 -1
  39. package/lib/selectNodeHandler.js +1 -1
  40. package/lib/simple.widget.js +3 -3
  41. package/lib/test/jqTree/accessibility.test.js +2 -2
  42. package/lib/test/jqTree/events.test.js +2 -2
  43. package/lib/test/jqTree/loadOnDemand.test.js +5 -4
  44. package/lib/test/jqTree/methods.test.js +2 -2
  45. package/lib/test/jqTree/options.test.js +43 -2
  46. package/lib/test/node.test.js +2 -2
  47. package/lib/tree.jquery.js +5 -5
  48. package/lib/version.js +1 -1
  49. package/package.json +29 -29
  50. package/src/elementsRenderer.ts +17 -17
  51. package/src/jqtreeOptions.ts +2 -2
  52. package/src/test/.eslintrc +2 -1
  53. package/src/test/jqTree/loadOnDemand.test.ts +6 -5
  54. package/src/test/jqTree/methods.test.ts +26 -26
  55. package/src/test/jqTree/options.test.ts +61 -8
  56. package/src/tree.jquery.d.ts +20 -11
  57. package/src/version.ts +1 -1
  58. package/tree.jquery.debug.js +45 -45
  59. package/tree.jquery.debug.js.map +1 -1
  60. package/tree.jquery.js +2 -2
  61. package/tree.jquery.js.map +1 -1
@@ -61,11 +61,6 @@ jobs:
61
61
  path: src/playwright/playwright.test.ts-snapshots/
62
62
  - name: Merge coverage
63
63
  run: cp jest-coverage/coverage-final.json .nyc_output/coverage_jsdom.json
64
- - name: Coverage artifact
65
- uses: actions/upload-artifact@v3
66
- with:
67
- name: coverage
68
- path: .nyc_output
69
64
  - name: Codecov
70
65
  uses: codecov/codecov-action@v3
71
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 ie11+, firefox, chrome and safari
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jqTree",
3
- "version": "1.7.1",
3
+ "version": "1.7.2",
4
4
  "main": [
5
5
  "jqtree.css",
6
6
  "jqtree-circle.png",
package/docs/Gemfile.lock CHANGED
@@ -1,22 +1,23 @@
1
1
  GEM
2
2
  remote: https://rubygems.org/
3
3
  specs:
4
- activesupport (7.0.4.3)
4
+ activesupport (6.1.7.6)
5
5
  concurrent-ruby (~> 1.0, >= 1.0.2)
6
6
  i18n (>= 1.6, < 2)
7
7
  minitest (>= 5.1)
8
8
  tzinfo (~> 2.0)
9
- addressable (2.8.1)
9
+ zeitwerk (~> 2.3)
10
+ addressable (2.8.5)
10
11
  public_suffix (>= 2.0.2, < 6.0)
11
12
  coffee-script (2.4.1)
12
13
  coffee-script-source
13
14
  execjs
14
15
  coffee-script-source (1.11.1)
15
16
  colorator (1.1.0)
16
- commonmarker (0.23.9)
17
+ commonmarker (0.23.10)
17
18
  concurrent-ruby (1.2.2)
18
- dnsruby (1.61.9)
19
- simpleidn (~> 0.1)
19
+ dnsruby (1.70.0)
20
+ simpleidn (~> 0.2.1)
20
21
  em-websocket (0.5.3)
21
22
  eventmachine (>= 0.12.9)
22
23
  http_parser.rb (~> 0)
@@ -24,7 +25,7 @@ GEM
24
25
  ffi (>= 1.15.0)
25
26
  eventmachine (1.2.7)
26
27
  execjs (2.8.1)
27
- faraday (2.7.4)
28
+ faraday (2.7.10)
28
29
  faraday-net_http (>= 2.0, < 3.1)
29
30
  ruby2_keywords (>= 0.0.4)
30
31
  faraday-net_http (3.0.2)
@@ -86,7 +87,7 @@ GEM
86
87
  activesupport (>= 2)
87
88
  nokogiri (>= 1.4)
88
89
  http_parser.rb (0.8.0)
89
- i18n (1.12.0)
90
+ i18n (1.14.1)
90
91
  concurrent-ruby (~> 1.0)
91
92
  jekyll (3.9.3)
92
93
  addressable (~> 2.4)
@@ -205,13 +206,13 @@ GEM
205
206
  rb-fsevent (~> 0.10, >= 0.10.3)
206
207
  rb-inotify (~> 0.9, >= 0.9.10)
207
208
  mercenary (0.3.6)
208
- mini_portile2 (2.8.1)
209
+ mini_portile2 (2.8.4)
209
210
  minima (2.5.1)
210
211
  jekyll (>= 3.5, < 5.0)
211
212
  jekyll-feed (~> 0.9)
212
213
  jekyll-seo-tag (~> 2.1)
213
- minitest (5.18.0)
214
- nokogiri (1.14.3)
214
+ minitest (5.20.0)
215
+ nokogiri (1.13.10)
215
216
  mini_portile2 (~> 2.8.0)
216
217
  racc (~> 1.4)
217
218
  octokit (4.25.1)
@@ -220,11 +221,11 @@ GEM
220
221
  pathutil (0.16.2)
221
222
  forwardable-extended (~> 2.6)
222
223
  public_suffix (4.0.7)
223
- racc (1.6.2)
224
+ racc (1.7.1)
224
225
  rb-fsevent (0.11.2)
225
226
  rb-inotify (0.10.1)
226
227
  ffi (~> 1.0)
227
- rexml (3.2.5)
228
+ rexml (3.2.6)
228
229
  rouge (3.26.0)
229
230
  ruby2_keywords (0.0.5)
230
231
  rubyzip (2.3.2)
@@ -249,6 +250,7 @@ GEM
249
250
  unf_ext
250
251
  unf_ext (0.0.8.2)
251
252
  unicode-display_width (1.8.0)
253
+ zeitwerk (2.6.11)
252
254
 
253
255
  PLATFORMS
254
256
  ruby
@@ -257,4 +259,4 @@ DEPENDENCIES
257
259
  github-pages
258
260
 
259
261
  BUNDLED WITH
260
- 2.1.4
262
+ 1.17.2
package/docs/_config.yml CHANGED
@@ -18,7 +18,7 @@ defaults:
18
18
  values:
19
19
  layout: "example"
20
20
 
21
- jqtree_version: 1.7.1
21
+ jqtree_version: 1.7.2
22
22
 
23
23
  # Build settings
24
24
  markdown: kramdown
@@ -9,7 +9,7 @@ name: features
9
9
  - Saves the state
10
10
  - Keyboard support
11
11
  - Lazy loading
12
- - Works on ie11+, firefox, chrome and safari
12
+ - Works on all modern browsers
13
13
  - Written in Typescript
14
14
 
15
15
  The project is [hosted on github](https://github.com/mbraak/jqTree).
@@ -3,6 +3,11 @@ 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
+
6
11
  #### 1.7.1 (august 6 2023)
7
12
 
8
13
  - Issue #724: improve accessibility
@@ -5,8 +5,22 @@ name: options-closedicon
5
5
 
6
6
  A character or symbol to display on closed nodes. The default is '&amp;#x25ba;' (&#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
- $('#tree1').tree({
10
- closedIcon: '+'
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 '&amp;#x25bc;' (&#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
- $('#tree1').tree({
10
- openedIcon: '-'
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
@@ -11,8 +11,8 @@
11
11
  },
12
12
  "devDependencies": {
13
13
  "@tailwindcss/typography": "^0.5.9",
14
- "autoprefixer": "^10.4.14",
15
- "postcss": "^8.4.27",
14
+ "autoprefixer": "^10.4.15",
15
+ "postcss": "^8.4.28",
16
16
  "postcss-cli": "^10.1.0",
17
17
  "postcss-import": "^15.1.0",
18
18
  "postcss-load-config": "^4.0.1",