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
package/.editorconfig DELETED
@@ -1,12 +0,0 @@
1
- # EditorConfig helps developers define and maintain
2
- # consistent coding styles between different editors and IDEs.
3
-
4
- root = true
5
-
6
- [*]
7
- end_of_line = lf
8
- charset = utf-8
9
- trim_trailing_whitespace = true
10
- insert_final_newline = true
11
- indent_style = space
12
- indent_size = 4
package/.eslintrc DELETED
@@ -1,48 +0,0 @@
1
- {
2
- "parser": "@typescript-eslint/parser",
3
- "plugins": ["@typescript-eslint", "import"],
4
- "extends": [
5
- "eslint:recommended",
6
- "plugin:@typescript-eslint/eslint-recommended",
7
- "plugin:@typescript-eslint/recommended",
8
- "plugin:@typescript-eslint/recommended-requiring-type-checking",
9
- "plugin:import/recommended",
10
- "plugin:import/typescript"
11
- ],
12
- "rules": {
13
- "@typescript-eslint/explicit-function-return-type": "off",
14
- "@typescript-eslint/interface-name-prefix": "off",
15
- "@typescript-eslint/no-explicit-any": "off",
16
- "@typescript-eslint/no-use-before-define": "off",
17
- "@typescript-eslint/no-unused-vars": ["error", {
18
- "argsIgnorePattern": "^_",
19
- "varsIgnorePattern": "^_"
20
- }],
21
- "@typescript-eslint/prefer-includes": "off",
22
- "@typescript-eslint/triple-slash-reference": "off",
23
- "@typescript-eslint/prefer-string-starts-ends-with": "off",
24
- "@typescript-eslint/restrict-template-expressions": [
25
- "error",
26
- {
27
- "allowNumber": true,
28
- "allowBoolean": true,
29
- "allowAny": false,
30
- "allowNullish": false
31
- }
32
- ]
33
- },
34
- "parserOptions": {
35
- "project": "./tsconfig.json"
36
- },
37
- "settings": {
38
- "import/parsers": {
39
- "@typescript-eslint/parser": [".ts"]
40
- },
41
- "import/resolver": {
42
- "typescript": {
43
- "alwaysTryTypes": true,
44
- "project": "./tsconfig.json"
45
- }
46
- }
47
- }
48
- }
@@ -1,68 +0,0 @@
1
- name: Continuous integration
2
-
3
- on: [push]
4
-
5
- jobs:
6
- runner-job:
7
- runs-on: ubuntu-latest
8
-
9
- steps:
10
- - name: Check out repository code
11
- uses: actions/checkout@v4
12
- - name: Setup node
13
- uses: actions/setup-node@v4
14
- with:
15
- node-version: "20"
16
- - name: Install pnpm
17
- run: npm install -g pnpm
18
- - name: Get pnpm store directory
19
- id: pnpm-cache
20
- run: |
21
- echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
22
- - uses: actions/cache@v4
23
- name: Setup pnpm cache
24
- with:
25
- path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
26
- key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
27
- restore-keys: |
28
- ${{ runner.os }}-pnpm-store-
29
- - uses: actions/cache@v4
30
- name: Setup Playwright browsers cache
31
- with:
32
- path: /home/runner/.cache/ms-playwright/
33
- key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
34
- restore-keys: |
35
- ${{ runner.os }}-playwright-
36
- - name: Install packages
37
- run: |
38
- pnpm install
39
- - name: Build
40
- run: |
41
- pnpm run production
42
- - name: Lint
43
- run: |
44
- pnpm run lint
45
- - name: Check types
46
- run: |
47
- pnpm run tsc
48
- - name: Clean coverage
49
- run: rm -rf .nyc_output && npx jest --clearCache
50
- - name: Run jest tests
51
- run: pnpm run jest
52
- - name: Playwright install
53
- run: npx playwright install chromium
54
- - name: Run playwright tests
55
- run: pnpm run playwright
56
- - name: Screenshots artifact
57
- if: always()
58
- uses: actions/upload-artifact@v4
59
- with:
60
- name: screenshots
61
- path: src/playwright/playwright.test.ts-snapshots/
62
- - name: Merge coverage
63
- run: cp jest-coverage/coverage-final.json .nyc_output/coverage_jsdom.json
64
- - name: Codecov
65
- uses: codecov/codecov-action@v3
66
- with:
67
- directory: .nyc_output
68
- verbose: true
@@ -1,32 +0,0 @@
1
- name: "CodeQL"
2
-
3
- on:
4
- push:
5
- branches: [dev]
6
- pull_request:
7
- branches: [dev]
8
-
9
- jobs:
10
- analyze:
11
- name: Analyze
12
- runs-on: ubuntu-latest
13
-
14
- strategy:
15
- fail-fast: false
16
- matrix:
17
- language: ["javascript"]
18
-
19
- steps:
20
- - name: Checkout repository
21
- uses: actions/checkout@v4
22
-
23
- - name: Initialize CodeQL
24
- uses: github/codeql-action/init@v3
25
- with:
26
- languages: ${{ matrix.language }}
27
-
28
- - name: Autobuild
29
- uses: github/codeql-action/autobuild@v3
30
-
31
- - name: Perform CodeQL Analysis
32
- uses: github/codeql-action/analyze@v3
@@ -1,24 +0,0 @@
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@v4
11
- - name: Setup node
12
- uses: actions/setup-node@v4
13
- with:
14
- node-version: "20"
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/**}"
@@ -1,57 +0,0 @@
1
- name: Deploy static content to Pages
2
-
3
- on:
4
- push:
5
- branches: ["master"]
6
- workflow_dispatch:
7
- branches: ["master"]
8
-
9
- permissions:
10
- contents: read
11
- pages: write
12
- id-token: write
13
-
14
- concurrency:
15
- group: "pages"
16
- cancel-in-progress: false
17
-
18
- jobs:
19
- deploy:
20
- environment:
21
- name: github-pages
22
- url: ${{ steps.deployment.outputs.page_url }}
23
- runs-on: ubuntu-latest
24
- steps:
25
- - name: Checkout
26
- uses: actions/checkout@v3
27
- - name: Setup ruby
28
- uses: ruby/setup-ruby@v1
29
- with:
30
- ruby-version: '3.2'
31
- - name: Setup node
32
- uses: actions/setup-node@v3
33
- with:
34
- node-version: 20
35
- - name: Install pnpm
36
- run: npm install -g pnpm
37
- - name: Install ruby packages
38
- working-directory: ./docs
39
- run: bundle
40
- - name: Install javascript packages
41
- working-directory: ./docs
42
- run: pnpm install
43
- - name: Build docs css
44
- working-directory: ./docs
45
- run: pnpm run build_docs_css
46
- - name: Jekyll Build
47
- working-directory: ./docs
48
- run: bundle exec jekyll build
49
- - name: Setup Pages
50
- uses: actions/configure-pages@v3
51
- - name: Upload artifact
52
- uses: actions/upload-pages-artifact@v2
53
- with:
54
- path: './docs/_site'
55
- - name: Deploy to GitHub Pages
56
- id: deployment
57
- uses: actions/deploy-pages@v2
package/.prettier DELETED
@@ -1,3 +0,0 @@
1
- {
2
- "tabWidth": 4
3
- }
package/config/.postcssrc DELETED
@@ -1,6 +0,0 @@
1
- {
2
- "plugins": {
3
- "postcss-nested": {},
4
- "autoprefixer": {}
5
- }
6
- }
@@ -1,11 +0,0 @@
1
- {
2
- "presets": ["@babel/preset-typescript", "@babel/preset-env"],
3
- "env": {
4
- "test": {
5
- "presets": [
6
- "@babel/preset-typescript",
7
- "@babel/preset-env"
8
- ]
9
- }
10
- }
11
- }
@@ -1,4 +0,0 @@
1
- {
2
- "presets": ["@babel/preset-typescript", "@babel/preset-env"],
3
- "plugins": ["istanbul"]
4
- }
@@ -1,24 +0,0 @@
1
- module.exports = {
2
- coverageDirectory: "jest-coverage",
3
- coverageReporters: ["json"],
4
- modulePathIgnorePatterns: [
5
- "<rootDir>/docs/_site/",
6
- "<rootDir>/docs/static/",
7
- "<rootDir>/lib/",
8
- ],
9
- rootDir: "../",
10
- setupFilesAfterEnv: [
11
- "<rootDir>/src/test/support/setupTests.ts",
12
- "givens/setup.js",
13
- "jest-extended/all",
14
- ],
15
- setupFiles: ["<rootDir>/config/jest.polyfills.js"],
16
- testEnvironment: "jsdom",
17
- testEnvironmentOptions: {
18
- customExportConditions: [""],
19
- },
20
- testRegex: "\\/src\\/test\\/.*\\.test\\.ts",
21
- transform: {
22
- "\\.tsx?$": ["babel-jest", { root: __dirname }],
23
- },
24
- };
@@ -1,14 +0,0 @@
1
- const { TextEncoder, TextDecoder } = require("node:util");
2
-
3
- Reflect.set(globalThis, "TextEncoder", TextEncoder);
4
- Reflect.set(globalThis, "TextDecoder", TextDecoder);
5
-
6
- const { Blob } = require("node:buffer");
7
- const { fetch, Request, Response, Headers, FormData } = require("undici");
8
-
9
- Reflect.set(globalThis, "fetch", fetch);
10
- Reflect.set(globalThis, "Blob", Blob);
11
- Reflect.set(globalThis, "Request", Request);
12
- Reflect.set(globalThis, "Response", Response);
13
- Reflect.set(globalThis, "Headers", Headers);
14
- Reflect.set(globalThis, "FormData", FormData);
@@ -1,18 +0,0 @@
1
- const { devices } = require("@playwright/test");
2
-
3
- const config = {
4
- testDir: "../src/playwright",
5
- projects: [
6
- {
7
- name: "Chromium",
8
- use: { ...devices["Desktop Chrome"] },
9
- },
10
- ],
11
- webServer: {
12
- command: "pnpm devserver-with-coverage",
13
- cwd: "..",
14
- port: 8080,
15
- },
16
- };
17
-
18
- module.exports = config;
package/config/production DELETED
@@ -1,6 +0,0 @@
1
- rm -rf ./lib &&
2
- mkdir lib &&
3
- rollup -c config/rollup.config.mjs &&
4
- DEBUG_BUILD=true rollup -c config/rollup.config.mjs &&
5
- babel src --config-file ./config/babel.config.json --out-dir lib --extensions .ts &&
6
- postcss --config ./config -o jqtree.css css/jqtree.postcss
@@ -1,71 +0,0 @@
1
- import fs from "fs";
2
- import jsonfile from "jsonfile";
3
- import template from "lodash.template";
4
- import { babel } from "@rollup/plugin-babel";
5
- import resolve from "@rollup/plugin-node-resolve";
6
- import serve from "rollup-plugin-serve";
7
- import terser from "@rollup/plugin-terser";
8
-
9
- const getBanner = () => {
10
- const headerTemplate = fs.readFileSync("./src/header.txt", "utf8");
11
- const { version } = jsonfile.readFileSync("package.json");
12
-
13
- const data = {
14
- version,
15
- year: new Date().getFullYear(),
16
- };
17
-
18
- const banner = template(headerTemplate)(data);
19
- return `/*\n${banner}\n*/`;
20
- };
21
-
22
- const debugBuild = Boolean(process.env.DEBUG_BUILD);
23
- const devServer = Boolean(process.env.SERVE);
24
- const includeCoverage = Boolean(process.env.COVERAGE);
25
-
26
- const resolvePlugin = resolve({ extensions: [".ts"] });
27
-
28
- const babelConfigFile = includeCoverage
29
- ? "babel.coverage.config.json"
30
- : "babel.config.json";
31
-
32
- const babelPlugin = babel({
33
- babelHelpers: "bundled",
34
- configFile: `./config/${babelConfigFile}`,
35
- extensions: [".ts"],
36
- });
37
-
38
- const plugins = [resolvePlugin, babelPlugin];
39
-
40
- if (!debugBuild) {
41
- const terserPlugin = terser({
42
- output: {
43
- comments: /@license/,
44
- },
45
- });
46
- plugins.push(terserPlugin);
47
- }
48
-
49
- if (devServer) {
50
- const servePlugin = serve({
51
- contentBase: ["./devserver", "./docs/static", "./"],
52
- port: 8080,
53
- });
54
- plugins.push(servePlugin);
55
- }
56
-
57
- export default {
58
- input: "src/tree.jquery.ts",
59
- output: {
60
- banner: getBanner(),
61
- file: debugBuild ? "tree.jquery.debug.js" : "tree.jquery.js",
62
- format: "iife",
63
- globals: {
64
- jquery: "jQuery",
65
- },
66
- name: "jqtree",
67
- sourcemap: true,
68
- },
69
- external: ["jquery"],
70
- plugins,
71
- };
@@ -1,193 +0,0 @@
1
- ul.jqtree-tree {
2
- list-style: none outside;
3
- margin-left: 0;
4
- margin-bottom: 0;
5
- padding: 0;
6
-
7
- &.jqtree-dnd {
8
- touch-action: none;
9
- }
10
-
11
- ul.jqtree_common {
12
- list-style: none outside;
13
- margin-left: 12px;
14
- margin-right: 0;
15
- margin-bottom: 0;
16
- padding: 0;
17
- display: block;
18
- }
19
-
20
- li.jqtree-closed > ul.jqtree_common {
21
- display: none;
22
- }
23
-
24
- li.jqtree_common {
25
- clear: both;
26
- list-style-type: none;
27
- }
28
-
29
- .jqtree-toggler {
30
- border-bottom: none;
31
- color: #333;
32
- text-decoration: none;
33
- vertical-align: middle;
34
-
35
- &:hover {
36
- color: #000;
37
- text-decoration: none;
38
- }
39
-
40
- &.jqtree-closed {
41
- background-position: 0 0;
42
- }
43
-
44
- &.jqtree-toggler-left {
45
- margin-right: 0.5em;
46
- }
47
-
48
- &.jqtree-toggler-right {
49
- margin-left: 0.5em;
50
- }
51
- }
52
-
53
- .jqtree-element {
54
- cursor: pointer;
55
- position: relative;
56
- display: flex;
57
-
58
- &:has(.jqtree-title-button-right) {
59
- display: block;
60
- }
61
- }
62
-
63
- .jqtree-title {
64
- color: #1c4257;
65
- vertical-align: middle;
66
- }
67
-
68
- .jqtree-title-button-left {
69
- margin-left: 1.5em;
70
-
71
- &.jqtree-title-folder {
72
- margin-left: 0;
73
- }
74
- }
75
-
76
- li.jqtree-folder {
77
- margin-bottom: 4px;
78
-
79
- &.jqtree-closed {
80
- margin-bottom: 1px;
81
- }
82
- }
83
-
84
- li.jqtree-ghost {
85
- position: relative;
86
- z-index: 10;
87
- margin-right: 10px;
88
-
89
- span {
90
- display: block;
91
- }
92
-
93
- span.jqtree-circle {
94
- border: solid 2px #0000ff;
95
- border-radius: 100px;
96
- height: 8px;
97
- width: 8px;
98
- position: absolute;
99
- top: -4px;
100
- left: -6px;
101
- box-sizing: border-box;
102
- }
103
-
104
- span.jqtree-line {
105
- background-color: #0000ff;
106
- height: 2px;
107
- padding: 0;
108
- position: absolute;
109
- top: -1px;
110
- left: 2px;
111
- width: 100%;
112
- }
113
-
114
- &.jqtree-inside {
115
- margin-left: 48px;
116
- }
117
- }
118
-
119
- span.jqtree-border {
120
- position: absolute;
121
- display: block;
122
- left: -2px;
123
- top: 0;
124
- border: solid 2px #0000ff;
125
- border-radius: 6px;
126
- margin: 0;
127
- box-sizing: content-box;
128
- }
129
-
130
- li.jqtree-selected > .jqtree-element,
131
- li.jqtree-selected > .jqtree-element:hover {
132
- background-color: #97bdd6;
133
- background: linear-gradient(#bee0f5, #89afca);
134
- text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
135
- }
136
-
137
- .jqtree-moving > .jqtree-element .jqtree-title {
138
- outline: dashed 1px #0000ff;
139
- }
140
- }
141
-
142
- ul.jqtree-tree.jqtree-rtl {
143
- direction: rtl;
144
-
145
- ul.jqtree_common {
146
- margin-left: 0;
147
- margin-right: 12px;
148
- }
149
-
150
- .jqtree-toggler {
151
- margin-left: 0.5em;
152
- margin-right: 0;
153
- }
154
-
155
- .jqtree-title {
156
- margin-left: 0;
157
- margin-right: 1.5em;
158
-
159
- &.jqtree-title-folder {
160
- margin-right: 0;
161
- }
162
- }
163
-
164
- li.jqtree-ghost {
165
- margin-right: 0;
166
- margin-left: 10px;
167
-
168
- span.jqtree-circle {
169
- right: -6px;
170
- }
171
-
172
- span.jqtree-line {
173
- right: 2px;
174
- }
175
-
176
- &.jqtree-inside {
177
- margin-left: 0;
178
- margin-right: 48px;
179
- }
180
- }
181
-
182
- span.jqtree-border {
183
- right: -2px;
184
- }
185
- }
186
-
187
- span.jqtree-dragging {
188
- color: #fff;
189
- background: #000;
190
- opacity: 0.6;
191
- cursor: pointer;
192
- padding: 2px 8px;
193
- }
@@ -1,7 +0,0 @@
1
- const $tree = $("#tree1");
2
-
3
- $tree.tree({
4
- autoOpen: 0,
5
- data: ExampleData.exampleData,
6
- dragAndDrop: true,
7
- });
@@ -1,8 +0,0 @@
1
- const $tree = $("#tree1");
2
-
3
- $tree.tree({
4
- autoOpen: true,
5
- data: ExampleData.exampleData,
6
- dragAndDrop: true,
7
- useContextMenu: false,
8
- });
@@ -1,22 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <title>JqTree devserver</title>
6
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
- <meta
8
- name="description"
9
- content="JqTree is a jQuery widget for displaying a tree structure in html"
10
- />
11
- <link rel="stylesheet" href="/jqtree.css" />
12
- </head>
13
- <body>
14
- <div class="container">
15
- <div id="tree1"></div>
16
- </div>
17
- </body>
18
- <script src="/bower_components/jquery/dist/jquery.min.js"></script>
19
- <script src="/tree.jquery.js"></script>
20
- <script src="/example_data.js"></script>
21
- <script src="/devserver.js"></script>
22
- </html>
@@ -1,22 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <link rel="stylesheet" href="/jqtree.css" />
6
- <script src="/bower_components/jquery/dist/jquery.min.js"></script>
7
- <script src="tree.jquery.js"></script>
8
- <script src="/example_data.js"></script>
9
- <style>
10
- .wide-tree {
11
- font-size: 20px;
12
- }
13
-
14
- .wide-tree ul.jqtree-tree ul.jqtree_common {
15
- margin-left: 128px;
16
- }
17
- </style>
18
- </head>
19
- <body>
20
- <div id="tree1"></div>
21
- </body>
22
- </html>